id
stringlengths
10
10
title
stringlengths
15
207
summary
stringlengths
513
1.91k
source
stringlengths
33
33
authors
stringlengths
9
126
categories
stringlengths
5
146
primary_category
stringlengths
5
14
content
stringlengths
10.6k
342k
references
dict
2011.13240
Blockchain mechanism and distributional characteristics of cryptos
We investigate the relationship between underlying blockchain mechanism of cryptocurrencies and its distributional characteristics. In addition to price, we emphasise on using actual block size and block time as the operational features of cryptos. We use distributional characteristics such as fourier power spectrum, moments, quantiles, global we optimums, as well as the measures for long term dependencies, risk and noise to summarise the information from crypto time series. With the hypothesis that the blockchain structure explains the distributional characteristics of cryptos, we use characteristic based spectral clustering to cluster the selected cryptos into five groups. We scrutinise these clusters and find that indeed, the clusters of cryptos share similar mechanism such as origin of fork, difficulty adjustment frequency, and the nature of block size. This paper provides crypto creators and users with a better understanding toward the connection between the blockchain protocol design and distributional characteristics of cryptos.
http://arxiv.org/pdf/2011.13240v2
Min-Bin Lin, Kainat Khowaja, Cathy Yi-Hsuan Chen, Wolfgang Karl Härdle
cs.CR, q-fin.GN
cs.CR
Blockchain mechanism and distributional characteristics of cryptos∗ Min-Bin Lin†Kainat Khowaja‡Cathy Yi-Hsuan Chen§ Wolfgang Karl H ardle¶ Abstract We investigate the relationship between underlying blockchain mechanism of cryptocurren- cies and its distributional characteristics. In addition to price, we emphasise on using actual block size and block time as the operational features of cryptos. We use distributional charac- teristics such as fourier power spectrum, moments, quantiles, global we optimums, as well as the measures for long term dependencies, risk and noise to summarise the information from crypto time series. With the hypothesis that the blockchain structure explains the distribu- tional characteristics of cryptos, we use characteristic based spectral clustering to cluster the selected cryptos into ve groups. We scrutinise these clusters and nd that indeed, the clus- ters of cryptos share similar mechanism such as origin of fork, diculty adjustment frequency, and the nature of block size. This paper provides crypto creators and users with a better un- derstanding toward the connection between the blockchain protocol design and distributional characteristics of cryptos. Keywords: Cryptocurrency, price, blockchain mechanism, distributional characteristics, clustering JEL Classi cation: C00 ∗Financial support of the European Union's Horizon 2020 research and innovation program \FIN- TECH: A Finan- cial supervision and Technology compliance training programme" under the grant agreement No 825215 (Topic: ICT- 35-2018, Type of action: CSA), the European Cooperation in Science & Technology COST Action grant CA19130 - Fintech and Arti cial Intelligence in Finance - Towards a transparent nancial industry, the Deutsche Forschungs- gemeinschaft's IRTG 1792 grant, the Yushan Scholar Program of Taiwan and the Czech Science Foundation's grant no. 19-28231X / CAS: XDA 23020303 are greatly acknowledged. †International Research Training Group 1792, Humboldt-Universit at zu Berlin, Spandauer Str. 1, 10178 Berlin, Germany. Email: min-bin.lin@hu-berlin.de ‡International Research Training Group 1792, Humboldt-Universit at zu Berlin, Spandauer Str. 1, 10178 Berlin, Germany. Email: kainat.khowaja@hu-berlin.de §Adam Smith Business School, University of Glasgow, United Kingdom; IRTG 1792 High Dimensional Non Stationary Time Series, Humboldt-Universit at zu Berlin. Email: cathyyi-hsuan.chen@glasgow.ac.uk ¶BRC Blockchain Research Center, Humboldt-Universit at zu Berlin, Berlin, Germany; Sim Kee Boon Institute, Singapore Management University, Singapore; WISE Wang Yanan Institute for Studies in Economics, Xiamen Uni- versity, Xiamen, China; Dept. Information Science and Finance, National Chiao Tung University, Hsinchu, Taiwan, ROC; Dept. Mathematics and Physics, Charles University, Prague, Czech Republic, Grants{DFG IRTG 1792 grate- fully acknowledged. Email: haerdle@hu-berlin.de 1arXiv:2011.13240v2 [cs.CR] 24 Aug 2021 1 Introduction Cryptocurrency (crypto) is a digital asset designed to be as a medium of exchange wherein individual coin ownership is recorded in a digital ledger or computerised database. Its creation of monetary units and veri cation of fund transactions are secured using encryption techniques and distributed across several nodes (devices) on a peer-to-peer network. Such technology-enhanced and privacy- preserving features make it potentially di erent to other existing nancial instruments and has attracted attention of many investors and researchers (H ardle et al., 2020). Many studies have investigated the similarity between a pool of cryptocurrencies in order to classify the important features of digital currencies. For example, Blau et al. (2020) has concluded that the top sixteen most active cryptocurrencies co-move with bitcoin. Researchers have also focused on describing the price behaviour of cryptos using economic factors (Ciaian et al., 2016; Sovbetov, 2018). However, owing to the unique technology of cryptocurrencies, there still exists a gap between the creators of blockchain mechanism and users operating the nancial market of the crytocurrencies and through this research, we aim to take a step towards mitigating that gap. We specialise our research on the following research questions. First, we characterise crypto behaviour using distributional characteristics of time series data. Also, instead of using the prices alone, we use actual block time and block size to incorporate the operational features of cryp- tos. Second, we hypothesise that the blockchain structure that the coin attaches plays a pivotal role in explaining the behaviour. More explicitly, we investigate the extent to which blockchain structure leads to explain the distributional characteristics. Using a characteristic based clustering coupled with spectral clustering technique, we group the selected cryptos into a number of clusters and stratify the mechanisms that make the coins within the particular cluster showing the same behaviour in price, actual block time, and actual block size, respectively. When studying cryptocurrencies, many researchers only focus on crypto price and daily returns (Trimborn and H ardle, 2018; Hou et al., 2020). While price is important when cryptos are used as a medium of payment, it is de nitely not the only measure for evaluation of cryptocurrencies. For example, many low price coins are highly traded and many coins that are not used as medium 2 of payment have low prices, e.g., XPR and Dogecoin. Cryptos were introduced to serve various purposes and the purpose of the coin does matter. This makes it necessary to use other time series while studying crypto markets. In this research, we propose to use actual block size and actual block time alongside price. Actual block size is the average actual size "usage" of a single block in data storage for one day. Since a block comprises of transaction data, it can represent the status of how a blockchain mechanism allocates transactions to a block. We consider it a measure of scalability of the system. A well-functioning blockchain should be able to level the transaction arrivals. Transaction distribution within a day for any crypto needs such balancing because it a ects miners rewards and hence the demand of the coin. An ideal block size would keep con rmation times from ballooning while keeping fees and security reasonable. Therefore, actual block size of cryptos can provide insight into the behaviour of cryptos. Actual block time, on the other hand, measures the consistency and performance of the system. It is de ned as the mean time required in minutes for each day to create the next block. In other words, it is the average amount of time for the day a user has to wait, after broadcasting their transaction, to see this transaction appear on the blockchain. Think of crypto markets as a fast food franchise and miners as customers who have to wait a certain time to make the purchase. If the waiting time is shorter on certain days while on other instances, the customers have to wait much longer, there is a discrepancy in the system. Analogously, the time series of block time, which is the distribution of waiting time, can be seen as a service level of the whole system and it is necessary to maintain as the users' expectation or target block time set by the system depend on it. The idea of investigating the underlying blockchain mechanism, a cornerstone of crypto technol- ogy, and its connection to the crypto behaviour is still in its infancy. One of the rst endeavours in explaining this relationship was made by Guo et al. (2018) who highlight that the the fundamental characteristics of cryptocurrencies (e.g., algorithm and proof type) have a vital role in di eren- tiating the performance of cryptocurrencies. They develop a spectral clustering methodology to 3 group cryptos in a dynamic fashion, but their research is limited in the exploitation of blockchain characteristics. With a similar spirit, Iwamura et al. (2019) start by claiming that high uctuation is a re ection of the lack of exibility in the Bitcoin supply schedule. They further strengthen their arguments by considering the predetermined algorithm of cryptos (speci cally, the proof of work) to explain the volatility in cryptocurrency market. Zimmerman (2020) argue in their work that the higher congestion in blockchain technology leads to higher volatility in crypto prices. They claim that the limited settlement space in blockchain architecture makes users compete with one another, a ecting the demand. In his model, the value of cryptos is governed by its demand, making the price sensitive to blockchain capacity. These research results, albeit true, are limited to a particular set of cryptocurrency mechanism and do not thoroughly explain the dynamics of cryptocurrencies. Also, most of the papers only use price as a proxy of behaviour. We advance the previous ndings by incorporating a rich set of underlying mechanisms and connecting them to multiple time series. We take a deep dive into eighteen cryptos with a variety of mechanisms- concluded in Garriga et al. (2020))- from a technical perspective to summarise their mechanism and algorithm designs using variables, such as consensus algorithm, type of hashing algorithm, diculty adjustment frequency and so on. We investigate a relationship between underlying blockchain mechanism of cryptocurrencies and the distributional characteristics. Using the a characteristic-based clustering technique, we cluster the selected coins into a number of clusters and scrutinise the compositions of fundamental characteristics in each group. We observe that the clusters obtained from these time series indeed share common underlying mechanism. Through empirical evidence, we show that the cryptos forked from same origin and same consensus mechanism tend to become part of same clustering group. Furthermore, the clusters obtained by the time series of block time have same hashing algorithms and diculty adjustment algorithms. Also, a similar nature (static or dynamic) of block size was observed within clusters obtained by the time series of actual block size. We conclude with empirical evidence that the crypto behaviour is actually linked with their blockchain protocol architectures. The implications of this study are abundant. The creators of cryptocurrencies can manage the 4 impact of blockchain underlying mechanisms on the corresponding distributional characteristics, in a consideration of adoption rate of invented coins. From the users' perspective, they can make an optimal decision in which coins should be adopted while concerning the price uctuation. This paper proceeds as follows. Section 2 discusses data source and the underlying mechanisms of the cryptos. Section 3 presents the methodology used for classifying characteristics of time series and clustering algorithm. Section 4 provides an illustration of analysis results. Section 5 concludes and provides several avenues for future research. 2 Data Source and Description According to CoinMarketCap (https://coinmarketcap.com), currently there are over 7,000 cryp- tocurrencies and their total market capitalisation has surpassed USD $400 billion as of November 09, 2020. Most of studies have focused on the mainstream coins (e.g., Bitcoin, Ethereum), and little has been investigated on the coins which have been introduced and featured with a diverse blockchain mechanisms and invented technologies. The work of Guo and Donev (2020) is one of exceptions. In this study, 18 cryptos with di erent set of blockchain mechanisms have been ex- amined {Bitcoin, Bitcoin Cash, Bitcoin Gold, Bitcoin SV, Blackcoin, Dash, Dogecoin, Ethereum, Ethereum Classic, Feathercoin, Litecoin, Monero, Novacoin, Peercoin, Reddcoin, Vertcoin, XRP (Ripple), and Zcash. We explore an interplay between distributional characteristics of crpytos and blockchain mechanism. We discuss the key characteristics of blockchain mechanisms and the time series data in this section. 2.1 Underlying Mechanism Most of cryptos nowadays apply blockchain-based systems in which transactions are grouped into blocks and cryptographically interlinked to form a back-linked list of blocks containing transactions. The transactions are validated using the nodes within the crypto peer-to-peer network through a majority consensus directed by algorithms instead of a central authority's approval. In such an operation process, many algorithmic mechanisms are required to govern the performance and 5 outcome of a crypto system. Some key blockchain-based characteristics are discussed below: Fork: It occurs as user base or developers conduct a fundamental or signi cant software change, see as in Figure 1. There are two types of forks { soft and hard forks. The former is an update to the protocol architecture and then all the nodes are enforced to follow in order to proceed with the operations of a crypto. The latter one creates a duplicate copy of the origin blockchain and modi es the copy to meet the desired quality (e.g., safety, scalability). In this case, a new crypto can be generated accordingly. For example, Peercoin network facilitates an alternative consensus mechanism {proof-of-stake (PoS) to Bitcoin's proof-of-work (PoW) system for reducing dependency on energy consumption from mining process (King and Nadal, 2012). Going beyond a digital currency, Ethereum establishes an open-ended decentralised platform for diverse applications such as decentralised applications (dapps) and smart contracts (Buterin, 2014). Consensus mechanism: In order to establish an agreement on a speci c subset of the candi- date transactions, consensus mechanism provides a protocol for a large number of trust-less nodes in a decentralised blockchain network. For instance, PoW (Proof-of-Work, as adopted by e.g., Bitcoin, Litecoin) achieves consensus with a competition among miners on solving computational puzzles, which consume numerous computational resources; and PoS (Proof-of-Stake, as adopted by e.g., Peercoin, Blackcoin) randomly assigns a block creator (transaction validator) with probability proportional to their coins staked. Hashing algorithm: It is a mathematical algorithm that encrypts a new transaction (or a new block) into a xed length character string, known as hash value, and later interlinks this string with a given blockchain to ensure the security and immutability of a crypto. Various hashing algorithms are implemented in cryptos such as SHA-256, Scrypt and Equihash. These provide di erent degree of complexity to blockchain operations. Diculty adjustment algorithm: It is an adaptive mechanism which periodically adjusts the diculty toward hashrate to target an average time interval between blocks, known as target block 6 Figure 1: Blockchain software forks in cryptocurrency. time or target con rmation time. It regulates the creation rate of a block and maintains a certain amount of outputs of a blockchain. Such a mechanism is commonly seen in a PoW framework. An example from Bitcoin is shown in Figure 2 where its diculty adjustment algorithm, known as DAA, modi es the diculty every 2016 blocks to meet target block time of 10 minutes. 2.2 Time Series Data The data applied in this paper are collected from Bitinfocharts which is available at https://bitinfocharts.com/. These time series are composed of data points observed daily from the genesis date of each crypto. The lengths of these time series are thus varied coin by coin, but as explained in the section 2.2, we continue to use the whole time series for each coin. Price: Much previous literature has been triggered by the substantial uctuations in crypto 7 Figure 2: Bitcoin's diculty adjustment toward actual block time. Blockchain mechanism - plotting prices. In this study we investigate 18 crypto prices in USD on daily time series. Among these 18 cryptos, Bitcoin has been dominant and Reddcoin has the lowest price on balance as seen in Figure 3. We characterise these price time series in Table 1. Most of these coins (i.e., Bitcoin, Ethereum, Bitcoin Cash) have high uctuations in price; while some coins (i.e., XRP, Blackcoin) tends to be steady. Figure 3: Time series of prices of the 18 cryptos Blockchain mechanism plotting 8 Actual block time: It is the mean time required in minutes for each day to create the next block. In other words, it is the average amount of time for the day a user has to wait, after broadcasting their transaction, to see this transaction appear on the blockchain. Some literature also refers it as con rmation time. It can be considered as a service level indicator for cryptos which should be maintained by underlying mechanisms. Most of the coins discussed in this paper tend to have lower block time compared with Bitcoin as seen in Figure 4. Also, many coins show outliers in observations and this can indicate that the extreme events appear in the blockchain system. The underlying mechanisms can be ine ective to accommodate the current system demand. The distributional characteristics for time series of actual block time are presented in Table 2. The data for XRP are missing but its designed block time is around 5 second per transaction. Figure 4: Actual block time in minutes. Blockchain mechanism plotting 9 Actual block size: It is de ned as the average actual size "usage" of a single block in data storage for one day. Since a block is is comprised of transaction data, it can represent the status of how a cryptocurrency mechanism allocates transactions to a block. In this study, as introduced in Section 1, we consider it as an indicator for the stableness of scalability of a crypto. In Figure 5 shows that most of the cryptos under study have smaller block size usage than Bitcoin, except Bitcoin SV. The plot also depicts that almost all the coins have outliers. These outliers can lead to the imbalance in transaction fee and reward which can in uence the ecosystem of a crypto. The characteristics for block size time series are shown in Table 3. XRP does not have typical blockchain structure, hence, there is no block size data in the study. The data for Peercoin are missing. Figure 5: Actual block size in megabytes. Blockchain mechanism plotting 10 3 Methodology In order to investigate the relationship between underlying blockchain mechanism of cryptocur- rencies and the distributional characteristics of cryptos as a proxy of behaviour, we aim to group them into number of clusters and scrutinise the compositions of features in each group. These blockchain-based features manifest the underlying mechanism of how the cryptos operate trans- actions on their chains, and subsequently govern the price, actual block size and block time. As described in the previous section, we use the time series data of 18 di erent cryptos with a range of di erent mechanisms. The time series data available for the cryptos is subject to numerous limitations. The most important one of them is that di erent coins were introduced at di erent time points, therefore, the data available for each coin has di erent lengths. For the clustering problems (Aghabozorgi et al., 2015), de ning the distance metric between points in time series with various lengths is not conventional. For many analytical problems, this issue is easily tackled by truncating the time series to the shared sample period. We refrain from doing so because, in the analysis of cryptocurrency prices, the evolution of the data in time is highly crucial for an investigation in the short term and long term dynamics and therefore, truncating the time series would lead to loss of important information. Hence, we deal with the time series data of cryptos with di erent lengths and do not directly impose a distance metric on the input data points. Furthermore, characterising the behaviour of a time series in terms of a single quantitative attribute (such as range based volatility) has its own limitations. The chosen attribute usually captures the dynamics of time series in one particular aspect, which may not be sucient to encompass an entire behaviour or introduces a biased assessment. This becomes particularly true in the problems of crypto classi cation and clustering where these attributes, used as a similarity measure, are very diverse, resulting in weak robustness in the results. To cope with these limitations, we resort to the characteristic based clustering method proposed by Wang et al. (2005). It was recently applied by Pele et al. (2020) for classifying cryptos in order to 11 distinguish them from traditional assets. This methods recommends to incorporate various global measures describing the structural characteristics of a time series for a clustering problem. These global measures are obtained by applying statistical operations that best represent the underlying characteristics. Also, by extracting a set of measures from the original time series we simply bypass the issue of de ning a distance metric. It's understood that the global measures are domain- speci c. Employing a greedy search algorithm, Wang et al. (2005) selects the pivotal features in the clustering tasks. In our case, we import the experts' discretion on the choice of features as distributional characteristics which best represent the dynamics of cryptocurrencies. We choose a variety of measures for our analysis. Starting from the rst four moments and quantiles that characterises the distribution and symmetry of the data, we include the statistics for concluding the global structure such as global optimum, as well as the measures for long term dependencies, risk and noise. The selected features are mean, standard deviation, skewness, kur- tosis, maximum, minimum, rst quartile, median, third quartile, 1% and 5% extreme quantiles as a measure of downside risk, linear trend, intercept, autocorrelation for long term dependency, self-similarity using Hurst exponent and chaos using Lyaponav's exponents. We further extend the methodology by including the power spectrum of time series as an addi- tional measure. The power spectrum is obtained in this work using Fast Fourier Transform (FFT). For computational ease, discrete fourier transform (DFT) has been formalised as a linear operator that maps the data points in a discrete input signal Xfx1;x2;;xngto the frequency domain f=ff1;f2;fng. For a given time series Xofntime points, sine and cosine functions are used to get the coecients !n=e2i=and the frequencies are calculated using the matrix multiplication: 12 2 666666666664f1 f2 f3 ... fn3 777777777775=2 6666666666641 1 1  1 1!n!2 n!n1 n 1!2 n!4 n!2(n1) n ............... 1!n1 n!2(n1) n!(n1)2 n3 7777777777752 666666666664x1 x2 x3 ... xn3 777777777775(1) This matrix multiplication involves O(n2) and makes DFT computationally expensive. FFT is a fast algorithm to compute DFT using only O(nlogn) operations (Brunton and Kutz, 2019). A simple tcommand in python computes the FFT of the given time signal. The power spectrum of this signal is the normalised squared magnitude of the fand it indicates how much variance of the initial space each frequency explains (Brunton and Kutz, 2019). Including the power spectrum as a feature for characteristic based clustering allows capturing the variability in the time signal that is not explained by any other measure. Accumulating all the aforementioned features in a vector gives in a reduced dimensional rep- resentation of time series of each crypto. These vectors are then used to cluster the cryptos into groups using spectral clustering. Spectral clustering exploits the eigenvalues of similarity matrix to cluster and results in more balanced clusters than other techniques that were employed during the process. For details related to spectral clustering, the readers are recommended to follow the tutorial on spectral clustering by von Luxburg (2006). The results of the above methodology are discussed in detail in the next section. 4 Empirical Evidence In this section, we showcase the result from the characteristic based clustering individually on the crypto price and operational features{which are constructed with price, block size "scalability" and block time "service level" time series. We explore the clustering results and classify them with the underlying mechanisms of the investigated 18 cryptos. The 18 cryptos are: Bitcoin, Bitcoin Cash, Bitcoin Gold, Bitcoin SV, Blackcoin , Dash, Dogecoin, Ethereum, Ethereum Classic, Feathercoin, 13 Litecoin, Monero, Novacoin, Peercoin, Reddcoin, Vertcoin, XRP, and Zcash. We calculate the characteristics for each of these cryptos for prices, block size and block time separately. The results of all other attributes except the FFT are summarised in Tables 1, 2, 3 correspondingly in Appendix. Note that the data for XRP are not available for the block size and block time, and for Peercoin block size is missing as described before in Section 3. After calculating the attributes and FFT power spectrum described in section 2.2, the feature space is 216 dimensional (200 dimensional vector of power spectrum and 16 characteristics), vi- sualisation of which is not possible. We project the feature space into a three dimensional space using principle component analysis (PCA), and the results of which are exhibited for an intuitive understanding. We discuss each of the clustering in detail below. Moreover, in order to avoid a monopoly outcome and sustain a certain level of interpretability, we impose the maximum number of the clusters to avoid a single coin case in each cluster. 4.1 Clustering with crypto prices Table 1 shows that as expected, Bitcoin has the highest average price and highest standard deviation, due to high magnitude of its prices. The VaR99 and VaR95 for Bitcoin are, however, very low, showing a low downside risk of Bitcoin. On the contrary, Bitcoin Cash, Bitcoin SV, Bitcoin Gold and Zcash all show high value at risk. This could be due to low persistence of risk shocks (de Souza, 2019; Katsiampa et al., 2019). The high positive coecients of self similarity for all the coins show high dependency on the previous time values. The high autocorrelation further con rms the presence of long term dependencies of the time series. The Lyaponov exponent as a measure of chaos is greater than 0 for all the time series which shows unstable dynamics throughout the prices of cryptos. The characteristics of Dogecoin in Table 1 assume very low values, unlike any other coin, because the prices of Dogecoin are very low, despite it being a popular coin. This can be due to high supply of the coin with no limit on the total number of coins created. The coin also has no technical innovations, which is considered as one of the reasons why the coin has such small price. Hence, 14 the uncontrolled underlying mechanism of the coin has signi cant impact on the prices, despite the high trading volumes of the coin. Same can be concluded for XRP and Reddcoin, which also have a very high maximum supply that is re ected in their very low prices. Using characteristic based clustering on price time series, we have the result with 5 clusters as below: 0. Bitcoin, Dash 1. Bitcoin SV, Zcash 2. Bitcoin Cash, Bitcoin Gold 3. Ethereum, Litecoin, XRP, Monero, Peercoin, Vertcoin, Reddcoin, Feathercoin, Blackcoin 4. Ethereum Classic, Dogecoin, Novacoin Most of coins are close to each others in a three-dimensional space, as seen in Figure 6. Except Dash, all the altcoins are in a di erent clusters than Bitcoin. Bitcoin Cash and Bitcoin Gold, which principally inherit the protocol architecture from Bitcoin, are clustered together, but not centred around with other coins. However, Bitcoin SV{which is a fork from Bitcoin Cash and mainly increases the designed block size to lower the transaction fee as a main software change{is not in the same cluster. This indicates that even as a crypto adopts a similar blockchain mechanism with the other crypto, it might have di erent price dynamics than its origin. XRP, Monero, Peercoin, Reddcoin, and Blackcoin which apply signi cantly di erent blockchain protocols in their governance types and consensus mechanisms are in the same cluster. Speci cally, XRP, Monero and Peercoin are private based blockchain which possesses a stronger moderator to control the entrants (users or investors) to their network. Peercoin, Reddcoin, and Blackcoin, instead of using PoW as their consensus mechanisms, employ PoS which does not depends on miners' e ort to create a block. So that, coin supply and demand can reach an equilibrium without the interference of miners, which leads to higher transaction costs. Moreover, the forks from Litecoin{ Vertcoin, Reddcoin and Feathercoin are within the same cluster with Litecoin. 15 Figure 6: Visualisation of ve clusters 0, 1, 2, 3, 4 of cryptos based on the prices Blockchain - mechanism clustering Ethereum Classic is, in fact, the version of Ethereum that existed before the hard fork of Ethereum resulting after the DAO attack, but it is not within the cluster with Ethereum. 4.2 Clustering with actual block time The block time here is measured in minutes. Likewise, we apply the characteristic based clustering on the data and conclude them into 5 clusters as below. 0. Dogecoin, Feathercoin 16 1. Ethereum, Litecoin, Ethereum Classic, Dash, Zcash, Monero, Blackcoin 2. Bitcoin, Bitcoin Cash, Vertcoin 3. Bitcoin SV, Bitcoin Gold, Novacoin 4. Peercoin, Reddcoin The result is correspondingly visualised in Figure 4. The gure shows that Peercoin and Redd- coin lie far away from other coins (marked by cyan cluster). They are clustered in the same group because they both use PoS and their initial block takes the maximum time to be added, as shown by the maximum and intercept characteristics in Table 2. This shows that even though the coins have lower actual block time later (with low mean), their behaviour is still the similar, resulting them in the same cluster. Also, the cryptos using PoS tend to lower the complexity of their hashing algorithms since it is not required for miners to spend computational e ort on them. The diculty adjustment algorithms of theirs are purely used as a mechanism for maintaining the certain service level for users without considering hashrate from miners. Their block time performance is relatively stable after the initialisation. Here we emphasise that the initial price, block time and block size that are usually characterised by the underlying mechanism play a pivotal role in determining the price behaviour of cryptos. This is why we did not truncate the time series, as mentioned in the Section 4. Though Bitcoin, Bitcoin Gold, Bitcoin Cash and Bitcoin SV are not completely grouped into the same cluster, they are close to each others in the three dimensional space as seen in Figure 4. They apply the same hashing algorithm{SHA-256 and also with the same expected block time for their diculty adjustment algorithms. Let's call attention to forks again. Dogecoin and Feathercoin are both forked from Litecoin with the Script-based hashing algorithm and diculty adjustment frequency after large number of blocks{240 and 504 blocks. Litecoin is in a di erent cluster because the frequency is much higher as 2016 blocks. Given the cryptos forked from the same origin coins, their block time can be found in the same group, likewise Ethereum and Ethereum Classic. 17 Figure 7: Visualisation of ve clusters 0, 1, 2, 3, 4 of cryptos based on block time Blockchain - mechanism clustering 4.3 Clustering with actual block size As previously done for price and block time, we use the characteristics based clustering and grouped these cryptos into 5 clusters according to the characteristics of their time series. The block size here is measured in bytes for a better data representation. As stated before in Section 3, XRP and Peercoin data are missing due to the mechanism design and incomplete data from the source, respectively. The clustering result is shown as below and the corresponding visualisation is in Figure 5. 18 0. Zcash, Bitcoin Gold, Reddcoin, Novacoin 1. Ethereum, Ethereum Classic, Dogecoin 2. Bitcoin Cash, Bitcoin SV 3. Bitcoin, Dash, Monero, Feathercoin 4. Litecoin, Vertcoin, Blackcoin Figure 8: Visualisation of ve clusters 0, 1, 2, 3, 4 of cryptos based on block size Blockchain - mechanism clustering The actual block size (usage) of these cryptos does rarely meet their designed block size limit 19 (capacity), except for Bitcoin that it nearly outstretches its limit, 1 megabyte, as seen in Table 3. In this case, it raises an issue: Can increasing crypto's block size limit improves scalability? For example, Bitcoin SV enlarges dramatically its limit to 128 megabytes but it is out of the necessity for such a design. Likewise, Bitcoin Cash, which Bitcoin SV forks from, has its limit as 32 megabytes. These two coins are, therefore, clustered together. Moreover, instead of having a static block size limit, Ethereum and Ethereum Classic grouped in the same cluster apply block gas limit, which is the energy consumption limit for a block, to adaptively regulate its block size. Both Monero and Blackcoin have a dynamic mechanisms to control the block size, however, it does not represent in the clustering result. 5 Conclusion In this paper we investigate the relationship between crypto behaviours and their underlying mech- anisms. We specify the crypto behaviour with their price and operational features de ned by actual block time and block size. We calculate the distributional characteristics to de ne the behaviour of time series. Using a characteristics based spectral clustering technique, we cluster the selected coins into a number of clusters and scrutinise the blockchain mechanism in each group. We nd that the underlying mechanism of cryptos are re ected in the clustering results. We observe that cryptos forked from same origin and same consensus mechanism tend to become part of same clustering group. Furthermore, the clusters obtained by the time series of block time have same hashing al- gorithms and diculty adjustment algorithms. Also, a similar nature (static or dynamic) of block size was observed within clusters obtained by the time series of actual block size. We conclude with empirical evidence that the crypto behaviour is indeed linked with their blockchain protocol architectures. As a result, cryptocurrency users and investors can have a better understanding and explanation of price and operational features through cryptocurrency mechanism. In the future re- search, we would elaborate the relation of price and operational features to underlying mechanism with an economic model and conduct relevant simulations. We would also like to investigate the impact of versions revisions on the dynamics of cryptos. 20 References S. Aghabozorgi, A. S. Shirkhorshidi, and T. Y. Wah. Time-series clustering{a decade review. Information Systems , 53:16{38, 2015. B. Blau, T. Grith, and R. Whitby. Comovement in the Cryptocurrency Market. Economics Bulletin , 40(1):448{455, 2020. S. L. Brunton and J. N. Kutz. Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control . Cambridge University Press, 2019. doi: 10.1017/9781108380690. V. Buterin. A next-generation smart contract and decentralized application platform. white paper , 2014. P. Ciaian, M. Rajcaniova, and d'Artis Kancs. The economics of bitcoin price formation. Applied Economics , 48(19):1799{1815, 2016. doi: 10.1080/00036846.2015.1109038. M. de Souza. Var and persistence of risk shocks in cryptocurrencies market. The Empirical Eco- nomics Letters , 18:1{12, 04 2019. M. Garriga, S. Dalla Palma, M. Arias, A. Derenzis, R. Pareschi, and D. Tamburri. Blockchain and cryptocurrencies: A classi cation and comparison of architecture drivers. Concurrency and Computation Practice and Experience , 10 2020. doi: 10.1002/cpe.5992. L. Guo, Y. Tao, and W. H ardle. Understanding latent group structure of cryptocurrencies market: A dynamic network perspective. SSRN Electronic Journal , 01 2018. doi: 10.2139/ssrn.3658206. X. Guo and P. Donev. Bibliometrics and network analysis of cryptocurrency research. Journal of Systems Science and Complexity , pages 1{26, 2020. A. J. Hou, W. Wang, C. Y. H. Chen, and W. K. H ardle. Pricing Cryptocurrency Options*. Journal of Financial Econometrics , 18(2):250{279, 05 2020. ISSN 1479-8409. doi: 10.1093/ jj nec/nbaa006. URL https://doi.org/10.1093/jjfinec/nbaa006 . W. K. H ardle, C. R. Harvey, and R. C. G. Reule. Understanding Cryptocurrencies*. Journal of 21 Financial Econometrics , 18(2):181{208, 02 2020. ISSN 1479-8409. doi: 10.1093/jj nec/nbz033. URL https://doi.org/10.1093/jjfinec/nbz033 . M. Iwamura, Y. Kitamura, T. Matsumoto, and K. Saito. Can we stabilize the price of a cryp- tocurrency?: Understanding the design of bitcoin and its potential to compete with central bank money. Hitotsubashi Journal of Economics , 60(1):41{60, 2019. P. Katsiampa, S. Corbet, and B. Lucey. High frequency volatility co-movements in cryptocur- rency markets. Journal of International Financial Markets, Institutions and Money , 62:35 { 52, 2019. ISSN 1042-4431. doi: https://doi.org/10.1016/j.int n.2019.05.003. URL http: //www.sciencedirect.com/science/article/pii/S104244311930023X . S. King and S. Nadal. Ppcoin: Peer-to-peer crypto-currency with proof-of-stake. self-published paper, August , 19:1, 2012. D. T. Pele, N. Wesselh o t, W. K. H ardle, M. Kolossiatis, and Y. Yatracos. A statistical classi cation of cryptocurrencies. Available at SSRN 3548462 , 2020. Y. Sovbetov. Factors in uencing cryptocurrency prices: Evidence from bitcoin, ethereum, dash, litcoin, and monero. Journal of Economics and Financial Analysis , 2(2):1{27, 2018. S. Trimborn and W. K. H ardle. Crix an index for cryptocurrencies. Journal of Empirical Finance , 49:107 { 122, 2018. ISSN 0927-5398. doi: https://doi.org/10.1016/j.jemp n.2018.08.004. URL http://www.sciencedirect.com/science/article/pii/S0927539818300616 . U. von Luxburg. A tutorial on spectral clustering. Technical Report 149, Max Planck Institute for Biological Cybernetics, T ubingen, Aug. 2006. X. Wang, K. Smith-Miles, and R. Hyndman. Characteristic-based clustering for time series data. Data Mining and Knowledge Discovery , 13:335{364, 2005. P. Zimmerman. Blockchain structure and cryptocurrency prices. Bank of England Working Paper , 2020. 22 Appendix Table 1: Characteristics of prices of di erent cryptocurrencies Characteristic Bitcoin Ethereum LitecoinBitcoin CashEthereum ClassicXRP mean 2659.127 178.966 34.394 537.723 9.381 0.192 standard deviation 3798.466 222.452 48.645 509.244 7.827 0.302 skewness 1.338 1.950 2.389 2.322 1.491 4.193 kurtosis 0.672 4.654 7.272 6.157 2.239 29.471 maximum 19401.000 1356.000 352.799 3526.000 43.765 3.649 minimum 0.050 0.401 0.032 58.626 0.687 0.003 lowerquant 20.193 7.975 3.153 233.404 4.364 0.007 median 455.892 136.557 8.618 324.646 6.571 0.024 upperquant 5128.000 250.965 53.128 620.947 13.813 0.291 VaR99 0.062 0.578 0.040 107.426 0.809 0.004 VaR95 0.393 0.696 0.072 129.491 1.105 0.005 slope 2.781 0.163 0.032 -0.876 -0.002 0.000 intercept 0.050 2.820 0.033 63.765 0.892 0.006 autocorrelation 0.998 0.998 0.997 0.992 0.994 0.991 selfsimilarity 1.574 1.611 1.596 1.609 1.564 1.551 chaos 0.088 0.093 0.091 0.086 0.087 0.085 CharacteristicBitcoin SVDash Zcash Monero DogecoinBitcoin Gold mean 145.401 113.910 135.596 57.588 0.006 43.167 standard deviation 66.784 187.915 125.654 75.569 0.193 70.420 skewness 0.678 3.126 1.756 2.145 49.692 2.879 kurtosis 0.079 11.777 3.208 5.300 2469.511 8.351 maximum 370.647 1436.000 728.159 439.391 9.608 513.293 minimum 52.683 0.516 23.940 0.233 0.000 5.093 lowerquant 87.323 3.950 50.251 1.100 0.000 9.710 median 135.217 66.508 72.251 44.090 0.001 15.869 upperquant 191.739 133.239 199.807 84.834 0.003 29.706 VaR99 53.377 0.711 27.767 0.272 0.000 5.357 VaR95 62.111 1.833 31.842 0.417 0.000 6.604 slope 0.218 0.083 -0.134 0.053 0.000 -0.147 intercept 111.700 1.380 286.297 1.911 0.000 513.293 autocorrelation 0.990 0.997 0.995 0.997 0.002 0.961 selfsimilarity 1.628 1.642 1.573 1.577 1.024 1.431 chaos 0.077 0.090 0.092 0.091 0.086 0.073 CharacteristicPeer coinVertcoinRedd- coinFeather- coinBlack- coinNova- coin mean 1.004 0.670 0.001 0.062 0.095 2.185 standard deviation 1.238 1.319 0.003 0.102 0.127 2.989 skewness 2.511 3.637 4.175 3.379 3.397 3.102 kurtosis 7.017 14.792 24.526 17.172 15.251 12.916 maximum 9.118 9.386 0.029 1.203 1.108 24.777 minimum 0.110 0.006 0.000 0.002 0.014 0.078 lowerquant 0.291 0.043 0.000 0.008 0.030 0.507 median 0.445 0.237 0.001 0.019 0.045 0.901 upperquant 1.275 0.626 0.001 0.072 0.088 3.301 VaR99 0.125 0.009 0.000 0.003 0.015 0.156 VaR95 0.168 0.015 0.000 0.004 0.020 0.187 slope 0.000 0.000 0.000 0.000 0.000 -0.001 intercept 0.382 6.315 0.000 0.559 0.035 0.078 autocorrelation 0.993 0.992 0.988 0.983 0.993 0.994 selfsimilarity 1.577 1.603 1.548 1.523 1.537 1.596 chaos 0.088 0.085 0.079 0.078 0.084 0.09123 Table 2: Characteristics of Block time of di erent cryptocurrencies Characteristic Bitcoin Ethereum LitecoinBitcoin CashEthereum ClassicXRP mean 10.453 0.257 2.507 11.167 0.246 NA standard deviation 8.814 0.045 0.385 11.009 0.032 NA skewness 21.779 3.098 5.003 11.597 5.144 NA kurtosis 701.717 11.987 54.589 160.209 61.066 NA maximum 360.000 0.509 8.521 205.714 0.800 NA minimum 2.081 0.208 0.149 1.275 0.153 NA lowerquant 8.623 0.235 2.357 9.664 0.235 NA median 9.474 0.241 2.474 9.931 0.238 NA upperquant 10.435 0.268 2.599 10.360 0.242 NA VaR99 5.923 0.220 1.710 2.331 0.215 NA VaR95 7.129 0.222 2.111 8.479 0.218 NA slope -0.001 0.000 0.000 -0.007 0.000 NA intercept 102.857 0.208 0.149 160.000 0.208 NA autocorrelation 0.494 0.981 0.705 0.395 0.818 NA selfsimilarity 1.027 1.522 0.787 0.704 1.249 NA chaos 0.012 0.070 0.012 0.003 0.068 NA CharacteristicBitcoin SVDash Zcash Monero DogecoinBitcoin Gold mean 10.195 2.659 2.409 1.686 1.048 9.823 standard deviation 1.639 0.805 0.345 0.541 0.043 0.741 skewness 12.504 19.831 -3.025 3.258 -9.220 -5.375 kurtosis 221.950 409.827 7.261 57.807 222.460 60.686 maximum 40.000 22.500 2.618 10.992 1.288 11.250 minimum 7.310 0.348 1.240 0.829 0.100 0.254 lowerquant 9.600 2.609 2.487 1.025 1.038 9.664 median 10.000 2.623 2.509 1.951 1.044 9.931 upperquant 10.511 2.637 2.531 2.020 1.050 10.141 VaR99 8.361 2.476 1.248 0.947 0.980 7.767 VaR95 9.034 2.571 1.258 0.984 1.031 8.623 slope -0.001 0.000 0.000 0.001 0.000 0.001 intercept 40.000 0.348 2.286 1.627 0.100 0.254 autocorrelation -0.115 0.707 0.982 0.805 0.787 0.378 selfsimilarity 0.367 0.811 1.121 0.922 1.044 0.494 chaos 0.023 0.003 0.010 0.001 0.011 -0.001 CharacteristicPeer- coinVert- coinRedd- coinFeather- coinBlack- coinNova- coin mean 10.085 2.502 4.646 2.005 1.090 6.819 standard deviation 47.070 0.180 68.175 6.443 0.105 2.295 skewness 30.324 -1.782 20.761 11.521 -4.368 24.326 kurtosis 919.356 30.015 434.280 157.793 18.525 891.281 maximum 1440.000 4.079 1440.000 130.909 1.335 96.000 minimum 1.377 0.151 0.646 0.148 0.442 0.451 lowerquant 7.742 2.412 0.986 1.042 1.111 6.154 median 8.372 2.500 1.007 1.048 1.114 6.606 upperquant 9.057 2.590 1.028 1.171 1.117 7.164 VaR99 5.464 2.144 0.935 1.034 0.551 4.364 VaR95 6.545 2.289 0.957 1.036 0.949 5.390 slope -0.003 0.000 -0.010 -0.002 0.000 -0.001 intercept 1440.000 0.151 1440.000 0.291 1.309 1.765 autocorrelation 0.667 0.154 0.821 0.914 0.976 0.373 selfsimilarity 0.717 0.437 1.051 1.210 1.337 0.697 chaos 0.002 0.008 -0.001 0.032 0.006 0.00924 Table 3: Characteristics of Block size of di erent cryptocurrencies Characteristic Bitcoin Ethereum LitecoinBitcoin CashEthereum ClassicXRP mean 407162.152 14376.916 12909.684 138173.724 1297.638 NA standard deviation 363245.372 11337.562 15590.195 284058.956 340.581 NA skewness 0.241 0.285 4.309 9.176 0.679 NA kurtosis -1.583 -0.819 31.780 109.791 2.106 NA maximum 998092.000 58953.000 206020.000 4710539.000 3594.000 NA minimum 134.000 575.164 134.000 4982.000 575.164 NA lowerquant 21246.000 1627.750 4004.750 60455.500 1054.750 NA median 310990.000 17024.000 7016.000 94775.000 1310.500 NA upperquant 777369.500 23068.750 19366.500 122827.500 1492.250 NA VaR99 134.548 658.423 561.630 15574.520 653.404 NA VaR95 134.952 788.678 800.306 27169.700 775.052 NA slope 266.541 17.464 8.806 -89.253 0.189 NA intercept 204.000 643.886 199.000 385996.000 643.886 NA autocorrelation 0.985 0.981 0.872 0.626 0.850 NA selfsimilarity 1.067 1.310 1.148 1.074 1.131 NA chaos 0.058 0.058 0.065 0.027 0.045 NA CharacteristicBitcoin SVDash Zcash Monero DogecoinBitcoin Gold mean 1100149.254 12999.389 23802.102 39874.397 10523.242 25312.953 standard deviation 1278250.457 26340.294 38911.209 47310.430 6607.125 67527.275 skewness 6.673 27.654 8.711 1.703 5.917 6.269 kurtosis 84.455 1040.743 117.847 4.063 68.981 45.828 maximum 20460199.000 1059232.000 687685.000 347816.000 116605.000 739259.000 minimum 5005.000 226.545 379.573 375.434 143.000 133.000 lowerquant 257789.500 3038.000 7189.500 3047.250 6775.000 6512.500 median 996071.500 9240.000 11670.000 20980.000 9510.000 9316.000 upperquant 1573243.000 19193.000 28242.000 62002.000 12022.000 14118.000 VaR99 6435.000 1312.960 2605.530 1058.990 3432.400 2727.870 VaR95 14660.750 1736.200 3103.900 1320.350 4491.000 3983.600 slope 2318.003 14.357 -25.267 26.939 1.018 -67.625 intercept 10871172.000 226.545 379.573 375.434 143.000 133.000 autocorrelation 0.377 0.298 0.836 0.958 0.798 0.618 selfsimilarity 1.004 0.947 1.138 1.214 1.070 1.015 chaos 0.009 0.018 0.030 0.041 0.021 -0.012 CharacteristicPeer- coinVert- coinRedd- coinFeather- coinBlack- coinNova- coin mean NA 2641.881 772.025 806.556 687.622 539.712 standard deviation NA 3611.409 634.442 1621.154 3441.373 1223.175 skewness NA 3.420 3.613 10.605 28.388 38.218 kurtosis NA 16.189 21.857 158.924 894.526 1712.453 maximum NA 36709.000 7808.000 36789.000 120169.000 57527.000 minimum NA 105.000 105.000 109.625 252.514 110.835 lowerquant NA 682.104 388.361 359.746 286.296 360.352 median NA 1149.000 526.043 460.827 386.251 436.181 upperquant NA 3185.000 937.696 598.841 627.727 542.228 VaR99 NA 248.950 317.797 126.333 255.520 262.588 VaR95 NA 310.697 337.320 247.907 261.297 284.524 slope NA -0.586 -0.475 -0.739 -0.025 -0.204 intercept NA 130.000 175.000 109.625 464.500 141.000 autocorrelation NA 0.894 0.609 0.705 0.360 0.069 selfsimilarity NA 1.129 1.007 1.063 0.959 0.951 chaos NA 0.100 0.034 0.034 0.039 0.01125 IRTG 1792 Discussion Paper Series 2020 For a complete list of Discussion Papers published, please visit http://irtg1792.hu-berlin.de. 001 ”Estimation and Determinants of Chinese Banks’ Total Factor Efficiency: A New Vision Based on Unbalanced Development of Chinese Banks and Their Overall Risk” by Shiyi Chen, Wolfgang K. H¨ ardle, Li Wang, January 2020. 002 ”Service Data Analytics and Business Intelligence” by Desheng Dang Wu, Wolfgang Karl H¨ ardle, January 2020. 003 ”Structured climate financing: valuation of CDOs on inhomogeneous asset pools” by Natalie Packham, February 2020. 004 ”Factorisable Multitask Quantile Regression” by Shih-Kang Chao, Wolfgang K. H¨ ardle, Ming Yuan, February 2020. 005 ”Targeting Cutsomers Under Response-Dependent Costs” by Johannes Haupt, Ste- fan Lessmann, March 2020. 006 ”Forex exchange rate forecasting using deep recurrent neural networks” by Alexander Jakob Dautel, Wolfgang Karl H¨ ardle, Stefan Lessmann, Hsin-Vonn Seow, March 2020. 007 ”Deep Learning application for fraud detection in financial statements” by Patricia Craja, Alisa Kim, Stefan Lessmann, May 2020. 008 ”Simultaneous Inference of the Partially Linear Model with a Multivariate Unknown Function” by Kun Ho Kim, Shih-Kang Chao, Wolfgang K. H¨ ardle, May 2020. 009 ”CRIX an Index for cryptocurrencies” by Simon Trimborn, Wolfgang Karl H¨ ardle, May 2020. 010 ”Kernel Estimation: the Equivalent Spline Smoothing Method” by Wolfgang K. H¨ ardle, Michael Nussbaum, May 2020. 011 ”The Effect of Control Measures on COVID-19 Transmission and Work Resumption: International Evidence” by Lina Meng, Yinggang Zhou, Ruige Zhang, Zhen Ye, Senmao Xia, Giovanni Cerulli, Carter Casady, Wolfgang K. H¨ ardle, May 2020. 012 ”On Cointegration and Cryptocurrency Dynamics” by Georg Keilbar, Yanfen Zhang, May 2020. 013 ”A Machine Learning Based Regulatory Risk Index for Cryptocurrencies” by Xinwen Ni, Wolfgang Karl H¨ ardle, Taojun Xie, August 2020. 014 ”Cross-Fitting and Averaging for Machine Learning Estimation of Heterogeneous Treatment Effects” by Daniel Jacob, August 2020. 015 ”Tail-risk protection: Machine Learning meets modern Econometrics” by Bruno Spilak, Wolfgang Karl H¨ ardle, October 2020. 016 ”A data-driven P-spline smoother and the P-Spline-GARCH models” by Yuanhua Feng, Wolfgang Karl H¨ ardle, October 2020. 017 ”Using generalized estimating equations to estimate nonlinear models with spatial data” by Cuicui Lu, Weining Wang, Jeffrey M. Wooldridge, October 2020. 018 ”A supreme test for periodic explosive GARCH” by Stefan Richter, Weining Wang, Wei Biao Wu, October 2020. 019 ”Inference of breakpoints in high-dimensional time series” by Likai Chen, Weining Wang, Wei Biao Wu, October 2020. IRTG 1792, Spandauer Strasse 1, D-10178 Berlin http://irtg1792.hu-berlin.de This research was supported by the Deutsche Forschungsgemeinschaft through the IRTG 1792. IRTG 1792 Discussion Paper Series 2020 For a complete list of Discussion Papers published, please visit http://irtg1792.hu-berlin.de. 020 ”Long- and Short-Run Components of Factor Betas: Implications for Stock Pricing” by Hossein Asgharian, Charlotte Christiansen, Ai Jun Hou, Weining Wang, October 2020. 021 ”Improved Estimation of Dynamic Models of Conditional Means and Variances” by Weining Wang, Jeffrey M. Wooldridge, Mengshan Xu, October 2020. 022 ”Tail Event Driven Factor Augmented Dynamic Model” by Weining Wang, Lining Yu, Bingling Wang, October 2020. 023 ”The common and speci fic components of infl ation expectation across European countries” by Shi Chen, Wolfgang Karl H¨ ardle, Weining Wang, October 2020. 024 ”Dynamic Spatial Network Quantile Autoregression” by Xiu Xu, Weining Wang, Yongcheol Shin, October 2020. 025 ”Non-Parametric Estimation of Spot Covariance Matrix with High-Frequency Data” by Konul Mustafayeva, Weining Wang, October 2020. 026 ”Data Analytics Driven Controlling: bridging statistical modeling and managerial intuition” by Kainat Khowaja, Danial Saef, Sergej Sizov, Wolfgang Karl H¨ ardle, November 2020. 027 ”Blockchain mechanism and distributional characteristics of cryptos” by Min-Bin Lin, Kainat Khowaja, Cathy Yi-Hsuan Chen, Wolfgang Karl H¨ ardle, November 2020. IRTG 1792, Spandauer Strasse 1, D-10178 Berlin http://irtg1792.hu-berlin.de This research was supported by the Deutsche Forschungsgemeinschaft through the IRTG 1792.
{ "id": "2011.13240" }
2301.02734
Political, economic, and governance attitudes of blockchain users
We present a survey to evaluate crypto-political, crypto-economic, and crypto-governance sentiment in people who are part of a blockchain ecosystem. Based on 3710 survey responses, we describe their beliefs, attitudes, and modes of participation in crypto and investigate how self-reported political affiliation and blockchain ecosystem affiliation are associated with these. We observed polarization in questions on perceptions of the distribution of economic power, personal attitudes towards crypto, normative beliefs about the distribution of power in governance, and external regulation of blockchain technologies. Differences in political self-identification correlated with opinions on economic fairness, gender equity, decision-making power and how to obtain favorable regulation, while blockchain affiliation correlated with opinions on governance and regulation of crypto and respondents' semantic conception of crypto and personal goals for their involvement. We also find that a theory-driven constructed political axis is supported by the data and investigate the possibility of other groupings of respondents or beliefs arising from the data.
http://arxiv.org/pdf/2301.02734v1
Lucia M. Korpas, Seth Frey, Joshua Tan
cs.CY
cs.CY
Political, economic, and governance attitudes of blockchain users Lucia M. Korpas 1 , Seth Fr ey 2,3 , Joshua Tan 1,4* 1 The Metagovernance Project, Brookline, MA, USA 2 Department of Communication, University of California Davis, Davis, CA, USA 3 The Ostrom Workshop, Indiana University , Bloomington, IN, USA 4 University of Oxford, Oxford, Oxfordshire, UK * Corr espondence: Joshua Tan joshua.z.tan@gmail.com Abstract We present a survey to evaluate crypto-political, crypto-economic, and crypto-governance sentiment in people who are part of a blockchain ecosystem. Based on 3710 survey responses, we describe their beliefs, attitudes, and modes of participation in crypto and investigate how self-reported political affiliation and blockchain ecosystem affiliation are associated with these. We observed polarization in questions on perceptions of the distribution of economic power , personal attitudes towards crypto, normative beliefs about the distribution of power in governance, and external regulation of blockchain technologies. Differences in political self-identification correlated with opinions on economic fairness, gender equity , decision-making power and how to obtain favorable regulation, while blockchain affiliation correlated with opinions on governance and regulation of crypto and respondents’ semantic conception of crypto and personal goals for their involvement. We also find that a theory-driven constructed political axis is supported by the data and investigate the possibility of other groupings of respondents or beliefs arising from the data. 1 Introduction As blockchain technology has evolved over more than a decade, cryptocurrencies and crypto-economic systems have had a growing impact on the world. Millions of people have involved themselves in crypto 1 : as of 2021, around 15 percent of American adults have reported owning cryptocurrency (Perrin 2021), and many other countries have even higher adoption rates (Buchholz 2021). The past few years have seen the growth of decentralized apps and the crypto startup industry . Correspondingly , governments are beginning to take regulatory actions. Also, even as blockchain ecosystems move towards less computationally-intensive consensus mechanisms, the ongoing environmental impact of blockchain use is huge. Given the impact of crypto-economic activity on individuals and on shared resources, it is increasingly important to understand how its users are relating to the technology . While the hard data of cryptocurrency transactions and account balances is often publicly available by design, users’ 1 Throughout the text, we use the term “crypto” to encompass blockchain technologies such as cryptocurrencies and the communities and ideologies which drive their development and use. 1 motivations for engaging with crypto are more opaque. There is little existing data on the stated beliefs or attitudes of the variety of people using blockchain technologies. What do blockchain users believe about the economic, political, and social relevance of crypto? While there has been attention to the attitudes of the general population towards cryptocurrencies and blockchain technology (Perrin 2021; “Global State of Crypto, 2022” 2022), there is also a need to understand the beliefs of active participants of blockchain ecosystems. What do blockchain ecosystem participants believe about how the technology is being – or should be – developed, used, and regulated? Are there discrete types of crypto contributors, or is there a spectrum of beliefs? What specific beliefs are most relevant in distinguishing respondents between types or along axes? This work is a first step in the development of a framework for thinking about this spectrum or grouping of beliefs in crypto. We report the results of a lar ge-scale survey of participants in the blockchain economy . The survey was designed to shed light on respondents’ socioeconomic and sociopolitical beliefs relating to crypto, economic modes of engagement with crypto, and attitudes towards governance of blockchain technology . We describe the distributions of these responses and their relationships to self-reported political ideology and specific crypto ecosystems such as Bitcoin and Ethereum. We also evaluate the survey instrument itself: are the questions able to assess distinct and relevant facets of beliefs? Can we identify underlying factors which describe broader groupings of beliefs? Using factor analysis methods, we find that a political axis and corresponding typology , informed by the Pew Research Center ’s Political Typology Quiz, meaningfully describes variation between respondents. 2 Backgr ound While there is no existing political theory of crypto per se, there are substantial ethnographic studies of crypto communities (and related digital communities) that address the political dimensions of crypto. For example, ethnographic studies have informed the creation of a proposed political typology of blockchain projects (Husain, Franklin, and Roep 2020), reflecting earlier ideas on the “intrinsic” political values of technical artifacts (W inner 1980). In this vein, cryptocurrencies have been characterized as realizations of crypto-anarchist values such as privacy and autonomy (Chohan 2017; Beltramini 2021), following in the footsteps of earlier cypherpunk writings (Hughes 1993; May 1994) as well as the original Bitcoin whitepaper (Nakamoto 2008). Other ethnographies have described issues of on- and of f-chain governance (De Filippi and Loveluck 2016) and the political motivations and cultural context of projects such as Bitcoin (Golumbia 2016) and Ethereum (Brody and Couture 2021). A previous industry survey , conducted by CoinDesk in 2018, contained several questions related to politics and governance (R yan 2018; Bauerle and R yan 2018), though the questions focused more specifically on individual projects and topical questions such as reactions to SEC rulings on the securitization status of Ethereum. Distinct from questions about political values, the topic of blockchain governance—including the relationship between blockchains and traditional governments—is one of the most salient and polarizing questions in crypto, one that has led to the creation, forking, and dissolution of many projects. While we cannot recount all the major positions here (some of which are reflected in the survey itself; see “Methodology”), there is a broad distinction between approaches that emphasize on-chain governance and those that emphasize of f-chain governance. A number of academic analyses 2 have studied these dif ferent approaches to blockchain governance (Reijers, O’Brolcháin, and Haynes 2016; Liu et al. 2021; van Pelt et al. 2021), along with a vastly greater number of industry manifestos and opinion pieces (Zamfir 2019; Szabo 1996). 3 Methodology 3.1 Survey questions The survey consists of 19 questions related to respondents’ crypto-related beliefs and activities, with three types of questions interspersed: those eliciting opinions about the political dimensions of crypto activity (“crypto-political”), those eliciting economics opinions (“crypto-economic”), and those eliciting attitudes about the governance of crypto projects (“crypto-governance”). All questions were multiple choice, with 2-4 possible selections, and the respondent could opt not to answer . See Table 1 for the full list of questions. The survey questions and provided choices included both a formal portion drawing from existing political survey instruments and a more exploratory portion intended to elicit beliefs relevant to a general crypto-political typology . In particular , a few of the questions selected (Q1 1-13, Q15, Q19), were based on questions from Pew’ s Political Typology Quiz (Nadeem 2021) and intended to relate to political sentiment. Other questions (e.g., Q1, Q17) were developed in collaboration with a number of community members in crypto, drawing on the culture, memes, and references common in crypto. Altogether , the content was designed to elicit respondents' primary modes of economic engagement with crypto, their political sentiment, and opinions as to how crypto communities themselves should be governed. 3.2 Construction of political “types” and identification of “axes” of belief Our choice to identify separate “axes” of economic, political, and governance beliefs were based on discussion with community members and in analogy to existing classifications such as the traditional “left-right” political axis. For one of these, the political axis, we also leveraged our study design to group and relate questions more directly by defining a continuous construct intended to assess respondents' crypto-political leanings. We identified a subset of questions as most relevant to political orientation, and computed a score for each participant by summing the responses to these questions (coded with values in the range [-1, 2] as described in Table 1) in analogy to the Pew methodology (Nadeem 2021). The lowest and highest scores on this political “axis” were designed to highlight extreme positions of collectivist and anarcho-capitalist approaches to using blockchain technology . Five discrete types were defined by thresholds in the score according to Table 2: crypto-anarcho-capitalist, crypto-libertarian, centrist, crypto-communitarian, and crypto-leftist; these types were developed both with definitions from the Pew typologies and with input from the community . 3.3 Recruitment We relied on a convenience (self-selected) sample of participants in the crypto community . Participants were recruited by distributing the survey through blockchain-focused forums and listservs, conferences (LisCon and ETHDenver), social media posts, and articles published on blockchain-focused news sites. We motivated voluntary participant engagement with two strategies. We presented the survey as a quiz that assigned respondents one out of an entertaining typology of “types” on the basis of their 3 responses (“crypto-leftist,” “cryptopunk,” etc.) immediately upon completion of the survey . Stylized as “factions”, the crypto-political types corresponded to the political types we defined based on the Pew typology , while the crypto-economic and crypto-governance types were constructed by using thresholds to partition respondents into five ad hoc types (for more detail, see Section 1.1 of the Supplementary Material). We also incentivized survey completion with the opportunity to receive a non-fungible token (NFT) corresponding to their assigned “type”, contingent upon their provision of a valid Ethereum wallet address or ENS name. 3.4 Analysis To survey the overall landscape of crypto-political beliefs, we observed the distribution of choices selected by respondents. We aggregated these responses for each question, including the null response of no choice selected, and computed the mar gins of error for a 95% confidence interval, assuming a random sample of the population. To investigate how political self-identification and participation in specific blockchain ecosystems related to beliefs, we grouped participants by their responses to the corresponding questions. We then determined which questions displayed a statistically significant dif ference in the distribution of responses between these groups. We also wanted to understand which questions were most meaningful in dif ferentiating respondents. To this end, we first performed a check on the extent to which each question measured a distinct belief by computing the correlation between responses to dif ferent questions as Cramer ’s V (a version of Pearson’ s chi-squared statistic scaled to provide a measure of association). Then we used principal component analysis (PCA) to identify which of the 48 choices provided across 17 questions explained the most variance between respondents. Specifically , we looked at the component loading for each feature, i.e., contribution to the first principal component. For use with PCA, we normalized the feature data (shifted to a mean of 0 with unit variance). Note that for questions where only two choices were provided, the alternative answer contributed with equal magnitude (though opposite sign). We omitted questions 2 and 19, relating to specific blockchain ecosystems. We also omitted answers from respondents that did not answer all questions. We also wished to evaluate to what extent our crypto-political types, delineated from the political score we defined, corresponded with patterns in beliefs across respondents. From the PCA results, we can identify to what extent the assigned types or classes directly correlate with any of the first few components. 4 Results 4.1 Responses and r espondents Between September 27, 2021 and March 4, 2022, the survey received 3710 responses. In 3418 (92%) of these, all questions were answered. For questions presented to all respondents, the percentage of respondents who chose not to answer each question was between 0.5% and 1.5% across all questions. The survey took on average 8 minutes and 40 seconds to complete. 4.2 Responses to questions: political, economic, and governance attitudes Overall, respondents were varied in their perceptions of the distribution of economic power in crypto and their personal attitudes towards crypto. They were also split between the most common 4 Figure 1. Responses to (A) question 11, (B) question 12, and (C) question 13 on perceptions of the distribution of economic power in crypto, with 95% confidence intervals. Though optimistic beliefs about the current state of crypto-economics were slightly more prevalent, dissatisfaction with the fair distribution and attainability of crypto-economic wealth was nearly as frequent. responses to two questions on the distribution of power in governance of crypto. There was somewhat more agreement on broad beliefs towards external regulation of crypto, though respondents disagreed on some of the specifics and in matters of degree. The lar gest majorities were observed in questions relating to the social implications of crypto. Perceptions of the distribution of economic power in crypto were closely split between the two choices provided for each question (Figure 1). By a few percentage points, a slightly higher proportion of respondents believed that most crypto teams make “a fair and reasonable amount of profit” rather than “too much profit” (Q1 1, Fig. 1(A)) and that the economic system in crypto “is generally fair to most of its participants” rather than “unfairly favors powerful interests” (Q12, Fig. 1(B)). A majority (58%) believed that “most people who want to get ahead in crypto can make it if they’re willing to work hard” (Q13, Fig. 1(C)). 5 Figure 2. Responses to (A) question 3 and (B) question 4 on personal attitudes towards blockchain, with 95% confidence intervals. Together, these responses show that both a desire for sociopolitical change and an interest in personal financial gain were common factors in participants’ interest in blockchain technologies. Figure 3. Responses to (A) question 5 and (B) question 16 on blockchain governance, with 95% confidence intervals. Personal attitudes towards crypto were also diverse (Figure 2). Respondents were divided on whether they regarded crypto as “mainly a political philosophy and/or lifestyle” or “mainly an economic technology”, with a slight majority favoring the latter (Q3, Fig. 2(A)). There was no majority in respondents’ goals for their own involvement in crypto: the most common goal was “to create social change and/or disrupt the industry” (39%), followed by “to make as much money as possible” (29%) (Q4, Fig. 2(B)). Normative beliefs about the distribution of power in governance of crypto appear to be in some tension (Figure 3). Most respondents favored a hands-of f approach to the governance of crypto, with 45% believing that “most or all cryptogovernance should be on-chain” and 30% believing “crypto does not need (human) governance” (Q5, Fig. 3(A)). However , a majority of respondents believed that “a wide variety of on- and of f-chain stakeholders” should have decision-making power over a blockchain (though the next most common response was “the token holders and/or node operators, i.e., voters, as determined by the protocol”) (Q16, Fig. 3(B)). Note that while the most common responses to each of these questions are not incompatible, their coexistence indicates a possible tension in the community between maximizing on-chain governance and empowering of f-chain stakeholders. 6 Figure 4. Responses to (A) question 7 and (B) question 14 on external regulation of blockchain technologies, with 95% confidence intervals. Regarding external regulation of blockchain technologies, respondents were somewhat more consistent (Figure 4). A majority of respondents believed at least some good will come of government regulation of crypto, though nearly 40% asserted that “government regulation of crypto will almost always do more harm than good” (Q7, Fig. 4(A)). In line with the above, when asked what the most important thing the crypto community can do to get more favorable regulation of cryptocurrencies from national governments, a plurality of respondents sought a cooperative relationship with government, choosing to “work hand-in-hand with regulators to identify a solution that works for both government and industry ,” versus adopting an evasive approach to “adapt our technology and practices in order to minimize potential conflicts with the law” or even an antagonistic one to “mount a public pressure campaign on politicians” or to “keep doing what we’re doing, legal or not” (Q14, Fig. 4(B)). Also, more than three-quarters of respondents believed that “having a central bank run a cryptocurrency is a bad idea” (Q8). Overall, though a majority of respondents were willing to accept or even collaborate on regulation, lar ge minorities strongly disagreed, and distaste for direct government involvement in implementations of crypto technology was common. On the social implications of crypto, most respondents were in agreement, believing that blockchain and DeFi are “beneficial technologies that, on balance, will help most members of society” (Q10). Even so, more than a quarter of respondents believed that crypto “has a gender problem” (Q15). Also, around a quarter of respondents indicated privacy is “the most important feature of blockchain and crypto” (Q6). We asked two additional questions on political orientation and blockchain ecosystem af filiation (Figure 5). Only 14 percent of respondents considered themselves “conservative or right-wing” (532 respondents) with the remaining participants split equally (with no statistically significant dif ference) between “liberal or left-wing” (1550) and “neither” (1599; Q18, Fig. 5(A)). Nearly all participants (97%) stated an af filiation with at least one blockchain ecosystem or community (Q19, Fig. 5(B)), supporting our use of this dataset to focus on users of blockchain technology (rather than the general public). In particular , of the 3591 respondents who indicated af filiation with at least one blockchain, 2175 (61%) selected af filiation with Ethereum and 1 120 (31%) with Bitcoin (Fig. 5b). Note that these are not mutually exclusive groups (789 indicated af filiation with both); furthermore, though a majority of respondents only specified one af filiation, less than a quarter believe that “there is one (layer 1) blockchain that is the best” (Q1). In the following two subsections, we discuss the relation of these distributions with respondents’ beliefs in more depth. 7 Figure 5. Responses to (A) question 18 on political orientation and (B) question 19 on blockchain ecosystem affiliations, with 95% confidence intervals. The distribution of responses for the questions not covered in this section are included in the Supplementary Material (Supplementary Figures S1-S4). 4.3 Differ ences between r espondents by self-r eported political orientation To examine the dif ferences in opinion between the left-of-center , right-of-center , and unaligned groups, we compared the distribution of answers selected by respondents af filiated with each group (Q18). We found that perceptions of economic fairness and gender equity elicited the clearest differences between the three political orientation groups, with economic fairness especially differentiating left-of-center respondents from the other two groups. Beliefs about governance, regulation, and personal goals in crypto dif ferentiated right-of-center respondents from the other two groups. Dif ferences between political orientation groups were ubiquitous: all but one question had at least one statistically significant dif ference between the responses groups. The economic fairness questions (Q1 1, Q12, and Q13) were among those with the greatest differentiation between the three groups. Somewhat surprisingly , unlike nonaligned and right-of-center respondents, a majority of left-of-center respondents believe that “most crypto teams Figure 6. Responses, grouped by self-reported political affiliation, to question 12 on crypto-economic fairness, with 95% confidence intervals. Taken together with questions 11 and 13, this distribution shows that left-of-center respondents overall held a different set of beliefs about wealth distribution and economic opportunity than other respondents. 8 make a fair and reasonable amount of profit” (Q1 1) and “the economic system in crypto is generally fair to most of its participants” (Q12, Fig. 6). Though a majority of both right-of-center and nonaligned respondents believed instead that “the economic system in crypto unfairly favors powerful interests”, right-of-center respondents were more likely than nonaligned respondents to choose this answer (Q12). However , left-of-center respondents were more likely than right-of-center or nonaligned respondents to believe that “hard work and determination are no guarantees of success” in crypto (Q13). Question 12 was one of three questions for which all three groups had a statistically dif ferent distribution of responses. Another was on gender equity: right-of-center respondents were least likely to believe “crypto has a gender problem,” nonaligned respondents somewhat more likely , and left-of-center respondents most likely , with about half of left-of-center respondents selecting this answer (Q15). This spread shows that self-reported political alignment relates to not only economic but also social issues in the use of blockchain technology . Differences also arose between the groups in the most common answer to questions on decision-making power and how to obtain favorable regulation. When asked who should hold decision-making power over a blockchain, right-of-center respondents were more likely to choose “the token holders and/or node operators” than “a wide variety of on- and of f-chain stakeholders”; the reverse was true for left-of-center and nonaligned respondents, with left-of-center respondents more likely than other respondents to choose a variety of stakeholders (Q16, Fig. 7). Concerning how to obtain favorable regulation, left-of-center and nonaligned respondents were most likely to choose “work hand-in-hand with regulators” out of the available choices, and more likely to do so than right-of-center respondents; in contrast, right-of-center respondents were, within confidence intervals, evenly split between three of the four available choices (Q14). Other statistically significant dif ferences occurred in the distribution of responses, where one of the three groups dif fered from the other two. Right-of-center respondents were most likely to choose “make as much money as possible” as their goal and less likely to select “create social change and/or disrupt the industry”; the reverse was true for left-of-center and nonaligned respondents (Q4). However , left-of-center respondents were less likely than others to believe crypto needs to prioritize “building art and community” to grow (Q9). Also, a smaller proportion of left-of-center respondents than other respondents believed that privacy is “the most important feature of blockchain” (Q6). Figure 7. Responses, grouped by self-reported political affiliation, to question 16 on decision-making power, with 95% confidence intervals. Together with question 14, this distribution indicates that right-of-center respondents were more likely than other respondents to hold beliefs aligned with minimizing external influence on blockchain governance and development. 9 Left-of-center respondents were less likely to believe that “crypto does not need (human) governance,” while nonaligned respondents were less likely to believe “however crypto governs itself, it should also be regulated by the government” (Q5). Left-of-center respondents were also more polarized on government regulation: they were less likely to believe it “can do some good,” and more likely to believe it is either “critical to protect the public interest” or “will always do more harm than good” (Q7). 4.4 Differ ences between r espondents by Bitcoin and Ether eum affiliation At present, dynamics in the crypto community are lar gely driven by actors in two ecosystems: Bitcoin and Ethereum. To examine dif ferences in opinion between the 61% of respondents af filiated with Ethereum and the 31% (non-exclusive) af filiated with Bitcoin, we compared the distribution of answers selected by respondents af filiated with each of the two blockchains. We found an overall quite similar distribution of responses regardless of af filiation, with a few statistically significant differences arising in beliefs about cryptogovernance, the semantics of the term crypto, personal goals in crypto, and stated political orientation. Governance and regulation of crypto were a key topic distinguishing Bitcoin af filiates from Ethereum affiliates (Figure 8). Bitcoin af filiation was associated with a higher likelihood of believing that “crypto does not need (human) governance” (Q5, Fig. 8(A)) and that “token holders and/or node operators” should have decision-making power over a blockchain, whereas Ethereum was associated with “a wide variety of on- and of f-chain stakeholders” (Q16, Fig. 8(B)). Somewhat surprisingly , Bitcoin af filiation was also associated with a higher likelihood of believing that government regulation of crypto “can do some good” (Q7), although there was no statistically significant difference in opinions on how to obtain favorable regulation (Q14). Thus, it appears that Bitcoin affiliation is associated with a higher rate of wanting to maximize on-chain governance but also of tolerance of external regulation, perhaps in particular that which “can help force blockchains to become more decentralized,” as is included in the wording of question 7. Respondents’ semantic conception of crypto and their personal goals for their involvement also had some relation to blockchain af filiation: Bitcoin af filiation was associated with a higher likelihood of believing “crypto is mainly an economic technology” (Q3) and identifying with the statement “my goal in crypto is to make as much money as possible” (Q4). Ethereum af filiation was associated with a higher likelihood of believing that “the economic system in crypto unfairly favors powerful interests” (Q12) and that “crypto has a gender problem” (Q15). Figure 8. Responses, grouped by blockchain affiliation, to (A) question 5 and (B) question 16 on blockchain governance, with 95% confidence intervals. These distributions indicate that Bitcoin affiliates were more likely to favor a narrow definition of governance and its participants. 10 Figure 9. Responses, grouped by blockchain affiliation, to question 18 on self-reported political affiliation, with 95% confidence intervals. While there was a statistically significant difference between affiliates of the two blockchains in identifying as right-of-center or nonaligned, Cramer’s V indicates that the strength of association between blockchain affiliation and political orientation was low. For question 18 on political orientation, Bitcoin af filiation correlated with a higher likelihood of selecting “conservative or right-wing” and lower likelihood of selecting “neither” (Figure 9). There was no statistically significant dif ference between the proportions of respondents who chose “liberal or left-wing”. Given that we were interested in analyzing blockchain af filiation separately from stated political orientation, we additionally checked for the strength of association between Q18 and a reduced version of Q19 with the options “Bitcoin”, “Ethereum”, and “Neither” (not mutually exclusive). Cramer ’s V was low (less than 0.15) for all combinations of responses, indicating at most very weak association between the two questions (Supplementary Figure S5). This gives us confidence that Bitcoin and Ethereum af filiation were not strongly associated with stated political orientation. 4.5 Validation of survey instrument To assess any correlations between responses to dif ferent questions, we computed the correlation matrix for all pairs of questions (Supplementary Fig. S6). Of the 153 unique pairs, most showed little if any association (V < 0.1); the strength of association was weak for 52 questions (0.1 <= V < 0.3), and one question pair related to wealth distribution (Q1 1-Q12) showed a moderate strength of association (0.33). The prevalence of weak or no association between distinct questions supports our assertion that each question addresses a distinct facet of a respondent’ s beliefs or actions. This allows us to assess the relative importance of the specific statements provided in the answer choices to explain dif ferences between respondents. 4.6 Featur e selection and factor analysis To identify the beliefs which most contributed to explaining variance between respondents and to test our hypothesis, we computed the PCA vectors for individual choices (features) and examined the first principal component. Beliefs above a threshold of magnitude 0.18, corresponding to the loading each response would have if all questions contributed equally to the component, were labeled as important. The features with the lar gest contributions to the first principal component were the following (listed in descending order of importance): 11 - “The economic system in crypto unfairly favors powerful interests.” (Q12) - “Crypto has a gender problem.” (Q15) - “Government regulation of crypto will almost always do more harm than good.” (Q7) - “[I consider myself] liberal or left-wing.” (Q18) - “Crypto teams make too much profit.” (Q1 1) - “In crypto, hard work and determination are no guarantee of success for most people.” (Q13) - “However crypto governs itself, it should also be regulated by the government.” (Q5) - “Blockchain and DeFi are predatory technologies that, on balance, will harm most members of society .” (Q10) All three questions relating to wealth distribution and economic fairness (Q1 1-13) contributed more to explaining variance than most other questions. Polarized opinions on government regulation (Q5 and Q7) and one specific political af filiation (Q18) also featured here. Altogether , 5 of the 8 questions that we had coded as defining an axis of political belief had a lar ge contribution to this leading component. The same analysis can be done for the remaining principal components. The features with the lar gest component loading for the next two principal components are “Privacy is the most important feature of blockchain and crypto” (Q6) for the second principal component and “Crypto is mainly a political philosophy and/or lifestyle” (Q3) for the third. These choices, and their corresponding questions, are therefore among the more salient in explaining variance between respondents. Altogether , however , the variance explained by only the first few components was relatively low (21% for the first three components) and less than 10% was explained by the first component alone. Taken together with weak associations between questions as described in Section 4.5, this implies that the number of latent variables required to describe respondents' beliefs is lar ge. Indeed, factor analysis using PCA and feature agglomeration yielded a null result, meaning that features did not cluster into a few interpretable groupings (see Section 1.3 of the Supplementary Material). Even so, we find that the first principal component axis corroborates a theory-first constructed axis, as described in the following section. 4.7 Validation of constructed crypto-political axis For each respondent, a political score was calculated using the values in Table 1 and a type was assigned according to the score thresholds described in Table 2. The feature selection and factor analysis results can be used to evaluate the validity of this constructed crypto-political axis. The distribution of scores and types assigned to participants who completed the survey is shown in Figure 10. On the left-of-center side, 20% of respondents were identified as “crypto-communitarian” or “crypto-leftist”, while 9% of respondents were given the “crypto-centrist” label. The most commonly assigned type was the “crypto-libertarian” types, with nearly half of respondents receiving this designation; overall, right-of-center types (“crypto-libertarian” and “crypto-anarcho-capitalist”) dominated with 71% of respondents. This distribution is unimodal, low skewness, and centered around the median possible score. However , because the range of possible scores was not centered around zero, we find that a majority of respondents were labeled as crypto-politically “right-of-center”. For a summary of how this distribution dif fered with political self-identification and blockchain af filiation, Section 1.2 of the Supplementary Material. 12 Figure 10. Distribution of assigned crypto-political scores and corresponding sentiment types. Despite a 14% minority of respondents identifying as ideologically conservative or right-wing, our measure placed 71% in the right-of-center libertarian and anarchocapitalist categories. Figure 11. Box plots showing the distribution of values for each political type along each of the first three principal components produced by PCA, with the mean scores indicated by a white triangle. There is essentially no overlap between crypto-leftist and crypto-ancap types for component 0. Partitioning the respondents by the types we identified for them, and plotting them in the first three PCA components, we find, again, that the first principal component succeeds at capturing the political dimension of respondent variation, while the next two components are less informative (Figure 1 1). The low overlap between the interquartile ranges for adjacent types indicates that the continuous construct we defined and the defined types which discretize it help to explain dif ferences between respondents’ beliefs. Thus, the constructed political axis seems to reflect true variation in the population and may be of use in future work characterizing the ideological structure of the crypto community . 5 Discussion Though optimistic beliefs about the current state of cryptoeconomics were slightly more prevalent, the survey responses indicate nearly as much dissatisfaction with the fair distribution and attainability of cryptoeconomic wealth. Both a desire for sociopolitical change and an interest in personal financial gain were common factors in participants’ interest in blockchain technologies. Respondents 13 generally were optimistic about the social potential of blockchain technology , with some having reservations about its gender equity and some focusing on its privacy implications. Overall, though a majority of respondents were willing to accept or even collaborate on regulation, lar ge minorities strongly disagreed, and distaste for direct government involvement in implementations of crypto technology was common. Despite low rates of respondents’ self-identification with “conservative or right-wing” politics, we observed a prevalence of right-of-center crypto-political types. A broadly similar distribution was observed in a CoinDesk report published in 2018 (R yan 2018). The discrepancy between general political self-identification and our crypto-specific labeling bears further investigation. It may relate to an association of the term “conservative” with social conservatism, whereas crypto-libertarianism, the crypto-political type we found to be most common, emphasizes a form of economic libertarianism. Furthermore, the connotations of “conservative” and “liberal” vary significantly by geographic region, so the question may have been interpreted dif ferently across respondents based on their country of residence. The correlation of the constructed political axis with the first principal component–a commonly-used, well-validated axis–suggests a primacy of political variation in explaining patterns of responses. Furthermore, the existence of dif ferences in the distribution of beliefs between self-identified political orientations indicates that traditional political ideologies have some bearing on how participants relate to blockchain technology . For example, the “left-of-center” group articulated distinct beliefs about economic opportunity , fairness of wealth distribution, privacy , and the growth of crypto (Q1 1-13, Q6, and Q9), suggesting that left-of-center respondents are more likely to apply more community-oriented multi-stakeholder values to the blockchain ecosystem. The “nonaligned” group, on the other hand, articulated distinct beliefs about gender equity and government regulation (Q15 and Q5), suggesting this group is more clearly defined by lower trust in existing government institutions 2 . This lower approval of government regulation suggests that those who identified as neither left-of-center nor right-of-center are more likely to position themselves as separate from existing political and governance systems entirely . We are interested in understanding the extent to which the characteristics of developers and users of specific blockchains are distinctive of each blockchain. Critics like David Golumbia have ar gued that Bitcoin, both in its design and ideological constitution, is principally a conservative movement interested strictly in Bitcoin’ s record of gaining value (Golumbia 2016). Those observations were not made in opposition to Ethereum or any other blockchain, although Ethereum had been live for a year at the time of Golumbia’ s writing. Our findings indicate that in fact, there are few dif ferences between Bitcoin and Ethereum users. However , differences in technical implementation between Bitcoin and Ethereum may relate to dif ferences in opinion on their governance. Unlike Bitcoin, which has limited support for transactions other than money transfers, Ethereum as an infrastructure enables the developing and building of various applications and projects. The broader set of use cases for Ethereum may lead its users to believe a broader set of stakeholders should be involved in its governance. Furthermore, Ethereum af filiation was associated with a greater sensitivity to perceived socioeconomic inequity , which may relate to dif ferences in how the blockchains are used alongside other technology . In Ethereum ecosystems, users linking their own blockchain activity to other 2 We refer in this work to respondents who chose to identify as neither left-of-center nor right-of-center as “nonaligned”. We choose this term in contrast to a term such as “apolitical” in a nod to ideas of political agnosticism developed by ethnographers in observing open-source communities (Gabriella Coleman 2013) . 14 personally-identifying information, such as Discord handles or Twitter accounts, is not uncommon; more research is needed to understand whether lower rates of anonymity relate to greater awareness of actual or perceived social demographics. Communities or ganized around crypto are proving to be a laboratory for new ways that humans can organize collective action, but are not operating in a historical vacuum: it appears that some patterns observed in early users of other internet technologies have arisen or continue to appear in the blockchain context as well. To complement this sociological work, further anthropological research could shed some light on the extent to which the economic and political beliefs held by participants in crypto echo the ideologies of two earlier movements: the cryptographic hacker and open-source software communities. The distribution of responses relating to fair rewards for developer teams and the utility of hard work and in crypto indicates that meritocratic values are prevalent; meritocracy may play a similar role in blockchain ecosystems, themselves often open source, as it has in prior open source and hacker communities (Gabriella Coleman 2013; Dunbar -Hester 2019). Privacy has been at the forefront of concerns in the development of internet technologies since the cypherpunks (Hughes 1993) and remains prevalent in blockchain (Brunton 2020). Further research is needed to understand how these values compare to those of open-source software communities and early adopters of the internet or how they may have changed over time as cryptocurrencies become more mainstream. 6 Limitations 6.1 Survey methodology Selection bias may arise given that the random sample assumption is limited by how the survey was distributed. In particular , since the survey was opt-in, people with stronger and potentially more extreme opinions may have been more motivated to complete the survey . Also, the survey was made available only in English, and so is likely not representative of the full geographic distribution of users of blockchain technologies. Presentation of some preliminary findings prior to finalizing data collection may also have influenced some respondents. Additionally , we do not have a guarantee of uniqueness of each respondent; moreover , the two recruitment strategies we used may have motivated respondents to provide multiple responses. In choosing the wording of each question and answer choice, we made an ef fort to mitigate response bias. Still, we have identified some limitations in interpreting questions based on the wording of the questions. Q5 may have had an insuf ficient distinction between the two most commonly-selected choices. In answering Q14, respondents who selected “Keep on doing what we’re doing” may have rejected the premise of the question rather than believed this was a way to achieve the stated goal. Additionally , while we intended Q15 to refer to perceptions of gender inequity in participation or compensation within crypto, the wording of the choices may have been too vague. Further demographic information would be valuable context for interpreting some questions. Future work could include a question on the geographic location of respondents, where local regulations and political attitudes could inform a more detailed analysis of questions on national government regulation and political af filiation. Interpretation of question 18 on political self-identification may be similarly limited by dif ferences in how terms such as “liberal” and “conservative” are understood across the world. 15 6.2 Analysis To be able to use PCA for the discrete data, we one-hot encoded specific choices. While PCA is generally better suited to continuous data than boolean data, we find that in this context the results were cleanly interpretable. We also chose not to include null responses as an additional coded choice for feature selection or factor analysis. While this does result in using only a subset of the responses and potentially removing relevant information about respondents’ beliefs, it prevents the null responses from receiving artificially high importance due to their relative rarity and bypasses the difficulty in interpreting the null response. 7 Conclusion In this work, we have introduced a new survey of blockchain users’ political, economic, and governance opinions with respect to crypto. Based on 3710 survey responses, we find that users were spread across a variety of perceptions of the distribution of economic power , normative beliefs about the distribution of power in governance, and opinions on the role of external regulation of crypto, though they were broadly in agreement that crypto has a net-positive impact on the world. Equal numbers of respondents self-identified as liberal or non-aligned, while only about a third as many respondents self-identified as conservative; this self-reported political af filiation was associated with differences in opinions on most questions, but especially on economic fairness, decision-making power , and how to obtain favorable regulation. In contrast, we observed few dif ferences in opinions between respondents af filiated with Bitcoin and with Ethereum, on issues of blockchain governance and regulation and on personal attitudes towards crypto. While the full field of beliefs elides neat interpretation in terms of underlying factors, we found that the existence of a political dimension was supported both by a theory-driven construct and by a common, well-validated analytical method (PCA). While this dataset is an important step towards understanding the distribution of crypto users’ beliefs about blockchain technology and its utility , open questions remain as to why users believe what they do about crypto and how their beliefs match up with reality . For example, considering the question of who should have decision-making authority over a blockchain: Is the lar ge-minority opinion that token-holding voters should control a blockchain underlied by a belief that minimizing human input to governance will make it more ef ficient and less flawed? Is there a disconnect between the common normative beliefs of what should be happening in cryptogovernance and which types of stakeholders actually can and do participate in governance of major blockchains? Although our research found only a few instances where af filiation with a specific blockchain was associated with dif ferences in beliefs, further research is needed to better understand whether specific architectures or ecosystems within crypto dif fer in the values or goals embedded in them. Future interdisciplinary work could shed some light on the extent to which participants have common understandings of core signifiers such as decentralization and autonomy . Given that our work takes inspiration from the long-running Pew political survey , we see the need for a regular survey of cryptopolitical sentiment, with an added demographic panel. This could facilitate the identification and comparison of ideologies and modes of participation within newer chains such as Solana, L2s such as Polygon, and even lar ge DAOs. 16 8 Conflict of Inter est The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. 9 Author Contributions LMK conducted data analysis and wrote manuscript. SF advised on methodology and advised on manuscript. JT designed and deployed the survey instrument and advised on manuscript. 10 Funding Lucia Korpas and Joshua Tan were supported by grants from the Filecoin Foundation and from One Project. 11 Acknowledgments The authors would like to acknowledge Michael Zar gham for technical discussion, Ann Brody for qualitative discussion, and Tyler Sullber g and Nathan Schneider for feedback on the manuscript. 12 Data Availability Statement The dataset generated and analyzed for this study can be found in the Metagovernance Project’ s Govbase repository on Airtable ( https://airtable.com/shr gnUrj0dqzZDsOd/tblvwbt4KFm8MOSUQ/viw82nVNrdHFrowoo ). The Python code used to conduct the analysis and produce the figures can be found in the GitHub repository for this work ( https://github.com/metagov/cryptopolitics-paper ). 17 13 Refer ences Bauerle, Nolan, and Peter R yan. 2018. “CoinDesk Releases Q2 2018 State of Blockchain Report.” CoinDesk. July 25, 2018. https://www .coindesk.com/business/2018/07/25/coindesk-releases-q2-2018-state-of-blockchai n-report/. Beltramini, Enrico. 2021. “The Cryptoanarchist Character of Bitcoin’ s Digital Governance.” Anar chist Studies 29 (2): 75–99. Brody , Ann, and Stéphane Couture. 2021. “Ideologies and Imaginaries in Blockchain Communities: The Case of Ethereum.” Canadian Journal of Communications 46 (3): 19 pp-19 pp. Brunton, Finn. 2020. Digital Cash: The Unknown History of the Anar chists, Utopians, and Technologists Who Cr eated Cryptocurr ency . Princeton University Press. Buchholz, Katharina. 2021. “These Are the Countries Where Cryptocurrency Use Is Most Common.” World Economic Forum. February 18, 2021. https://www .weforum.or g/agenda/2021/02/how-common-is-cryptocurrency/. Chohan, Usman W. 2017. “Cryptoanarchism and Cryptocurrencies.” https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3079241. De Filippi, Primavera, and Benjamin Loveluck. 2016. “The Invisible Politics of Bitcoin: Governance Crisis of a Decentralized Infrastructure.” Internet Policy Review 5 (4). https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2852691. Dunbar -Hester , Christina. 2019. Hacking Diversity . Princeton University Press. https://press.princeton.edu/books/hardcover/9780691 182070/hacking-diversity . Gabriella Coleman, E. 2013. Coding Fr eedom: The Ethics and Aesthetics of Hacking . Princeton University Press. “Global State of Crypto, 2022.” 2022. Gemini . Gemini. https://www .gemini.com/state-of-us-crypto. Golumbia, David. 2016. The Politics of Bitcoin: Softwar e as Right-W ing Extr emism . U of Minnesota Press. Hughes, Eric. 1993. “A Cypherpunk’ s Manifesto.” March 9, 1993. https://www .activism.net/cypherpunk/manifesto.html. Husain, Syed Omer , Alex Franklin, and Dirk Roep. 2020. “The Political Imaginaries of Blockchain Projects: Discerning the Expressions of an Emer ging Ecosystem.” Sustainability Science 15 (2): 379–94. Liu, Yue, Qinghua Lu, Liming Zhu, Hye-Y oung Paik, and Mark Staples. 2021. “A Systematic Literature Review on Blockchain Governance,” May . https://doi.or g/10.48550/arXiv .2105.05460. May, Timothy C. 1994. “THE CYPHERNOMICON: Cypherpunks F AQ and More.” September 1994. https://nakamotoinstitute.or g/static/docs/cyphernomicon.txt. Nadeem, Reem. 2021. “Beyond Red vs. Blue: The Political Typology .” Pew Research Center . https://www .pewresearch.or g/politics/2021/1 1/09/beyond-red-vs-blue-the-political-typology-2 /. Nakamoto, Satoshi. 2008. “Bitcoin: A Peer -to-Peer Electronic Cash System.” https://bitcoin.or g/bitcoin.pdf. Pelt, Rowan van, Slinger Jansen, Djuri Baars, and Sietse Overbeek. 2021. “Defining Blockchain Governance: A Framework for Analysis and Comparison.” Information Systems Management 38 (1): 21–41. https://doi.or g/10.1080/10580530.2020.1720046. Perrin, Andrew . 2021. “16% of Americans Say They Have Ever Invested in, Traded or Used Cryptocurrency .” Pew Research Center . https://www .pewresearch.or g/fact-tank/2021/1 1/11/16-of-americans-say-they-have-ever -inves ted-in-traded-or -used-cryptocurrency/. 18 Reijers, Wessel, Fiachra O’Brolcháin, and Paul Haynes. 2016. “Governance in Blockchain Technologies & Social Contract Theories.” Ledger 1 (December): 134–51. https://doi.or g/10.5195/ledger .2016.62. Ryan, Peter . 2018. “Left, Right and Center: Crypto Isn’ t Just for Libertarians Anymore.” CoinDesk , July 2018. https://www .coindesk.com/markets/2018/07/27/left-right-and-center -crypto-isnt-just-for -libert arians-anymore/. Szabo, Nick. 1996. “Smart Contracts: Building Blocks for Digital Markets.” EXTROPY : The Journal of Transhumanist Thought 18 (2). Winner , Langdon. 1980. “Do Artifacts Have Politics?” Daedalus , Winter 1980. Zamfir , Vlad. 2019. “Against Szabo’ s Law , For A New Crypto Legal System.” Crypto Law Review (blog). January 2019. https://medium.com/cryptolawreview/against-szabos-law-for -a-new-crypto-legal-system-d00 d0f3d3827. 19 14 Tables Table 1 Question number Question text Choice text Contribution to political score 1 Which statement comes closest to your views? There is one (layer 1) blockchain that is the best. There is no one best blockchain. 2 Which blockchain is the best? Bitcoin Ethereum Solana Cardano Polkadot Other 3 Which statement comes closest to your views? Crypto is mainly an economic technology. Crypto is mainly a political philosophy and/or lifestyle. 4 Which statement comes closest to your views? My goal in crypto is to have fun. My goal in crypto is to make as much money as possible. My goal in crypto is to create social change and/or disrupt the industry. My goal in crypto is to earn a living and/or build my career. 5 Which statement comes closest to your views? Most or all cryptogovernance should be on-chain. Most or all cryptogovernance should be off-chain. Crypto does not need (human) governance; let the algorithms run as they were designed. However crypto governs itself, it should also be regulated by the government. 6 Which statement comes closest to your views? Privacy is the most important feature of blockchain and crypto. 2 Privacy is nice, but it’s not the most important feature of blockchain and crypto. 0 7 Which statement comes closest to your views? Government regulation of crypto will almost always do more harm than good. 1 Government regulation of crypto can do some good, e.g. it can help force blockchains to become more decentralized. Government regulation of crypto is critical to protect the public interest in these technologies. -1 8 Which statement comes closest to your views? Having a central bank run a cryptocurrency is a good idea. Having a central bank run a cryptocurrency is a bad idea. 9 In order to grow, the crypto ecosystem should: Build art and community. -1 Help people around the world earn a living. -1 Build useful tech that solve real problems for a set of users. 1 20 Provide financial instruments for maximum wealth creation. 1 10 Which statement comes closest to your views? Blockchain and DeFi are beneficial technologies that, on balance, will help most members of society. Blockchain and DeFi are predatory technologies that, on balance, will harm most members of society. 11 Which statement comes closest to your views? Most crypto teams make a fair and reasonable amount of profit. 1 Crypto teams make too much profit. -1 12 Which statement comes closest to your views? The economic system in crypto is generally fair to most of its participants. 1 The economic system in crypto unfairly favors powerful interests. -1 13 Which statement comes closest to your views? Most people who want to get ahead in crypto can make it if they're willing to work hard. 1 In crypto, hard work and determination are no guarantee of success for most people. -1 14 To get more favorable regulation of cryptocurrencies from national governments, the most important thing the crypto community can do is: Adapt our technology and practices in order to minimize potential conflicts with the law. Work hand-in-hand with regulators to identify a solution that works for both government and industry. Hire lawyers and lobbyists; organize the community to mount a public pressure campaign on politicians. Keep on doing what we’re doing, legal or not. 1 15 Which statement comes closest to your views? Crypto has a gender problem. 0 Crypto does not have a gender problem. 1 16 Who should have decision-making power over a blockchain? The public, elected representatives, and/or national leaders A wide variety of on- and off-chain stakeholders including token holders, node operators, application developers, foundations, and users The token holders and/or node operators, i.e. voters, as determined by the protocol The core developers and technical staff of a blockchain 17 I'm here for... the memes the jobs the tech the airdrops 18 I identify as: Liberal or left-wing -1 Conservative or right-wing 1 Neither 0 21 19 OPTIONAL: Do you affiliate with any of the following ecosystems or communities? Bitcoin Ethereum Solana Cardano Polkadot Other Table 2 Politics score Assigned type [-7,9] Overall possible range of scores >= 5 Crypto-anarchocapitalist 0 < x < 5 Crypto-libertarian x = 0 Crypto-centrist -3 < x < 0 Crypto-communitarian <= -3 Crypto-leftist 22 Supplementary Material 1 Supplementary Information 1.1 Recruitment strategy: Ad-hoc typology Based on their responses to the survey , each respondent was assigned a political faction, an economic faction, and a governance class. These were computed immediately upon completion of the survey according to numerical weights assigned to each answer choice and formulas defined for each faction. The faction definitions and names were developed with input from the community , and served lar gely as a way to (1) recruit participants and (2) help participants interpret their results. Depending on the response to Question 3 – whether the respondent considered crypto to be primarily a political philosophy or an economic technology – each respondent was correspondingly presented with either their political faction or economic faction as their overall assigned faction. The five political factions (“crypto-leftist”, “DAOist”, “true neutral”, “crypto-libertarian”, and “crypto-ancap”) were an alternate naming scheme for our constructed political axis. The five economic factions (“earner”, “cryptopunk”, “NPC”, “techtrepreneur”, “degen”) were intended to represent the respondents’ primary mode of economic engagement with crypto. Additionally , we defined four “classes” (Szabian, Gavinist, Zamfirist, and Walchian) that were intended to capture respondents’ beliefs about governance and government regulation, inspired by the positions articulated by Nick Szabo, Gavin Wood, Vlad Zamfir , and Angela Walch. The mechanism for assigning the factions based on respondents’ answers was a weighted sum of their responses to each question; every answer choice in every question adds points to one or more factions, and the faction assigned is the one with the most points, with some thresholding to account for respondents who did respond to all questions. In cases where not enough responses were given, the assignment defaulted to “true neutral” or “NPC”. Questions 6, 7, 9, 1 1, 12, 13, 14, 15, and 18 were used in computing the political faction, questions 4, 9, 17 in computing the economic faction, and questions 5, 7, 8, 14, and 16 in computing the governance class. The political faction names and definitions were conceptualized and iterated through a community-based ef fort at crypto conferences and online, especially within the Metagovernance Project Slack community . The names of the factions reflected both popular slang in crypto (degen, cryptopunk, crypto-libertarian, crypto-leftist, DAOist, crypto-ancap) as well as a few inventions of the authors when there was no existing slang or word for that archetype (earner , techtrepreneur , true neutral, NPC). The visual representations of the factions, which were used as the underlying images of a series of NFT s, played of f various memes (e.g. shiba inu / doge representing degens) and cultural icons (e.g. Shrek representing crypto-libertarians) common in crypto and on the internet more broadly . Within the main text, the political “factions” were renamed to the described “types”. 1.2 Differ ences in assigned political types by self-r eported political orientation and blockchain ecosystem affiliation There was a statistically significant dif ference in the overall distribution of assigned cryptopolitical factions across the left-of-center , right-of-center , and nonaligned groups. Right-of-center respondents were the only group more likely to be assigned the crypto-anarcho-capitalist faction than the crypto-libertarian faction, and less likely than the other two groups to be assigned true neutral, 23 DAOist, or crypto-leftist. Unlike the other two groups, left-of-center respondents were more likely to be assigned any of crypto-centrist, crypto-communitarian, or crypto-leftist than to be assigned crypto-anarcho-capitalist. Nonaligned respondents generally split the dif ference between the proportions of left-of-center and right-of-center respondents assigned each faction except for crypto-libertarian, which they were more likely to be assigned than either of the other two groups. Note that while Q18 was used directly in assigning the political faction, it was one of nine such questions, each with similar weights in the overall cryptopolitical score. A higher percentage of Bitcoin-af filiated respondents than Ethereum-af filiated respondents received the “crypto-anarcho-capitalist” label. 1.3 Are ther e clusters of r espondents or featur es? We were interested in understanding whether the range of responses would be better captured by the idea of “types” (groupings of respondents, consistent with data-driven clustering methods) or “axes” (grouping of questions, consistent with factor analysis techniques). We investigated this by extending our PCA analysis with feature agglomeration, based on a feature set of 48 choices provided across 17 questions. We used feature agglomeration to hierarchically generate clusters of features, where each feature corresponded to the selection of a provided choice. Given that these features are boolean in nature, we used the Dice distance metric to determine distances between features; this can be understood as the fraction of the sample for which the two features intersect or overlap, as a representation of the shared information between them. To determine which clusters should be mer ged and when, we used the complete linkage criterion, which relates to the maximum distances between all features of the two clusters. From the feature agglomeration results, we ask whether the assigned political types directly correlate with any of the identified factors (i.e., to what extent does our categorization of beliefs as political, economic, or governance-related meaningfully describe joint variations in the choices selected?). At the threshold where three clusters were present, the clusters contained A=31, B=10, and C=7 choices. The cluster that shared the most features in common with the important principal component features listed above was the cluster with 10 features: the specific choices listed above for beliefs on economic fairness, gender , and political af filiation (Q1 1-Q13, Q15, and Q18) appeared in this feature. The two specific choices relating to government regulation (Q5 and Q7) were present together in the cluster with 7 features Although cluster B aligned fairly well with the first (politically-focused) principal component, our exploration of the other clusters, and the hierarchy that produced them, did not indicate much qualitative support for this approach. This null assessment is supported by our mapping of respondents into feature space: both factor analysis methods shown in Supplementary Figure S7 shows responses or ganized around a single centroid, not the multiple clusters that would be expected in the presence of clear respondent types. Given that the feature agglomeration method allowed us to traverse the entire hierarchy of feature clusters, we also looked at the agglomerated clusters to see whether three stable feature clusters arise from the full feature set. Based on the distances required for clusters to mer ge, it appears instead that five distinct latent variables may best describe the distribution of respondents’ beliefs, as shown in Supplementary Figure S8 . That said, the smaller two out of the three clusters identified above persisted unchanged at the five-cluster threshold, suggesting that the underlying factors for each of those two clusters have more explanatory power . 24 2 Supplementary Figur es and Tables 2.1 Supplementary Figur es Supplementary Figur e S1 . Distribution of responses to questions 1, 2, and 5. Note that question 2 was presented only to respondents who selected the response “There is one (layer one) blockchain that is the best” for question 1, and that respondents were given the option to select Ethereum, Bitcoin, Solana, Polkadot, Cardano, or a fill-in-the-blank “Other”. 25 Supplementary Figur e S2 . Distribution of responses to questions 6, 8, and 9. 26 Supplementary Figur e S3 . Distribution of responses to questions 10, 15, and 17. 27 Supplementary Figur e S4 . Distribution of responses to question 19, and distribution in the number of those multiple-select choices that respondents who answered the question chose. Note that respondents were given the option to select Ethereum, Bitcoin, Solana, Polkadot, Cardano, or a fill-in-the-blank “Other”. For plot legibility , only the ecosystems listed by at least 10 respondents are shown here. 28 Supplementary Figur e S5. Correlation (Cramer ’s V) between choices to questions 18 and 19. The low correlation between choices belonging to dif ferent questions indicates that political self-identification and blockchain af filiation are lar gely independent. 29 Supplementary Figur e S6 . Correlation (Cramer ’s V) between all questions. Gray indicates that the correlation between questions was not computed; this is used when one question was only presented to the respondents upon a particular selection for the other question. No clusters are clearly observable: the questions are not systematically related in macro groupings. 30 (A) (B) Supplementary Figur e S7. ( A ) Projection of the respondents onto the first two principal components. ( B ) Projection of the respondents onto the feature clusters B (10 features) and C (7 features). In both cases, there is a continuous (rather than discrete) distribution of respondents along the two axes. The unimodal distribution of respondents along the two axes does not suggest the presence of clusters of respondents by their responses. 31 Supplementary Figur e S8. Dendrogram describing the hierarchical agglomeration of feature clusters. The colors delineate the first five clusters that branch of f from the one-cluster case (i.e., the one containing all features). The three-cluster case involves grouping some of these together . 32
{ "id": "2301.02734" }
2012.02147
The Application of Blockchain-Based Crypto Assets for Integrating the Physical and Financial Supply Chains in the Construction & Engineering Industry
Supply chain integration remains an elusive goal for the construction and engineering industry. The high degree of fragmentation and the reliance on third-party financial institutions has pushed the physical and financial supply chains apart. The paper demonstrates how blockchain-based crypto assets (crypto currencies and crypto tokens) can address this limitation when used for conditioning the flow of funds based on the flow of products. The paper contrasts the integration between cash and product flows in supply chains that rely on fiat currencies and crypto assets for their payment settlement. Two facets of crypto asset-enabled integration, atomicity and granularity, are further introduced. The thesis is validated in the context of construction progress payments. The as-built data captured by unmanned aerial and ground vehicles was passed to an autonomous smart contract-based method that utilizes crypto-currencies and crypto tokens for payment settlement; the resulting payment datasets, written to the Ethereum blockchain, were analyzed in terms of their integration of product and cash flow. The work is concluded with a discussion of findings and their implications for the industry.
http://arxiv.org/pdf/2012.02147v1
Hesam Hamledari, Martin Fischer
cs.CR, cs.AI
cs.CR
The Application of Blockchain -Based Crypto Assets for Integrating the Physical and Financial Supply Chains in the Construction & Engineering Industry By Hesam Hamledari & Martin Fischer CIFE Technical Report #TR 245 Decem ber 2020 STANFORD UNIVERSITY The Application of Blockchain -Based Crypto Asset s for Integrating the Physical and Financial Supply Chains in the Construction & Engineering Industry Hesam Hamledari1, Martin Fischer2 1 PhD Candidate, Stanford University, Department of Civil & Environmental Engineering, Stanford, CA, United States, hesamh@stanford.edu 2 Kumagai Professor of Engineering and Professor in Civil & Environmental Eng ineering, Stanford University, Stanford, CA, United States, fischer@stanford.edu ABSTRACT Supply chain integration remains an elusive goal for the construction and engineering industry. The high degree of fragmentation and the reliance on third -party financial institutions has p ushed the physical and financial supply chains apart . The paper demonstrates how blockchain-based crypto asset s (crypto currencies and crypto tokens) can address this limitation when used for conditioning the flow of funds based on the flow of products. The paper contrasts the integration between cash and product flows in supply chains that rely on fiat currencies and crypto asset s for their payment settlement. Two facets of crypto as set- enabled integration, atomicity and granularity, are further introduced. The thesis is validated in the context of construction progress payments . The a s-built data captured by unmanned aerial and ground vehicles was passed to an autonomous smart contract -based method that utilizes crypto -currencies and crypto tokens for payment settlement ; the resulting payment data sets, written to the Ethereum blockchain, were analyzed in terms of their integration of product and cash flow . The work is concluded with a discussion of findings and their implications for the industry. 1 INTRODUCTION The construction and engineering industry has long been in the pursuit of supply chain integration (Howard et al. 1989; O'Brien and Fischer 1993) . Most effort s have focused on increasing the strategic collaboration and partnership between the construction supply chain partners (Briscoe and Dainty 2005; Cheng et al. 2010; Dainty et al. 2001) . A goal that is equally importan t and often neglected is the integration of flows (Rai et al. 2006) and in particular the cash and product flows (Blount 2008; Hofmann 2005) . In an integrated supply chain, the flow of products (physical supply chain) and funds (financial supply chain) need to be integrated throughout the life cycle of a project (Rai et al. 2006) ; they should not be separate . Integrating the physical and financial supply chain enables supply chain optimization (Kifokeris and Koch 2020) and creates a single source of truth, key to successful delivery of projects (Barbosa 2017; Fischer et al. 2017) . Despite the desired benefits of such integration, t he physical and financial supply chains have been pushed apart due to the high degree of fragmentation in the industry (Bilal et al. 2016; Maria João Ribeirinho et al. 2020) . This fragmentation stems from the high number of stakeholders (Briscoe and Dainty 2005; Cheng et al. 2010) and the siloed data development in the industry’s information technology infrastructure (Barua et al. 2004; Chen et al. 2018) . To manage its financial supply chain , the fragmented construction industry has to rely on trusted third parties, banks and financial institutions (Bitran et al. 2007; Feldmann and Müller 2003) . These institutions play a role that is key to achieving integration (Blount 2008) , yet their involvement as an external stakeholder has hurt the integration between the physical and financial supply chains (Blount 2008; Fellenz et al. 2009; John Mathis and Cavinato 2010) . This lack of integration has led to misalignments between the documentations of flows across different project information sources (Čuš -Babič et al. 2014) . This paper demonstrates how blockchain -based crypto asset s can address this limitation when used for conditioning payments based on the flow of products. The underlying mechanisms contributing to crypto asset -enabled integration are elaborated by contrast ing the flow of cash in today’s supply chains, reliant on fiat currency , and those using crypto assets. Two facets of crypto asset -enabled integration, atomicity and granularity, are further introduced. To validate this work’s thesis, a series of experiments are conduc ted where crypto asset s are used for payment processing and lien right management on two commercial construction projects. The r obot-capture d observations of two job sites are passed to a smart contract -based method that uses crypto currencies and crypto tokens for p rocessing payments to subcontracto rs. T he resulting payment datasets, written to a public blockchain, are examined in terms of their integration of cash and product flow . Th e paper is concluded with a discussion of finding s, limitations, and the implications for the AEC industry. 2 POINT OF DEPARTURE Blockchain and smart contract are the underlying technologies that empower crypto asset s. This section first reviews the studies around the use of these two technologies in managing cash flow and its integration with product flow (section 2.1) . This is followed by a review of crypto asset classes (section 2.2). In this work, the terms “ financial supply chain ”, “cash flow” , “the flow of cash ”, and “ the flow of funds ” are used interchangeably. 2.1 Applications of Smart Contract for Cash Flow Management Cash flow management is currently governed by inefficient contracts that rely on manual workflows and third party interference (Salleh et al. 2020) ; these limitations make traditional contracts a major source of delay (Odeh and Battaineh 2002) , distrust (Gabert and Grönlund 2018; Manu et al. 2015) , and information asymmetry between supply chain partners (Xiang et al. 2015) . Blockchain -enabled smart contract s are believed to provide cost and time savings by reducing the administrative work (Sreckovic and Windsperger 2019) and to promote collaboration by increasing transparency (McNamara and Sepasgozar 2018) . Therefore , smart contract s can reduce the cost of contracting (Qian and Papadonikolaki 2020) . Others argue that smart contract s’ true value proposition in cash flow management is twofold: 1) they increase the confidence in the output of the computational systems (De Filippi et al. 2020) and the input data (Penzes et al. 2018) used in payment processing; and 2) they add reliability to payment automation due to their elimination of centralized control mechanisms and providing guarantee of execution (Hamledari and Fischer 2020a) . While alternative technologi es may support automation, they lack such reliability. An example is internet -based payment applications ; they are proven to decrease the processing time by 84% compared with paper -based payment applications (Barrón and Fischer 2001) , but they still rely on the same workflows that hurt traditional contracts . Despite these potential benefits, practitioners have doubts about the technology’s capabilit ies (Mason and Escott 2018) . The adoption will remain slow (Sharma and Kumar 2020) until th e industry adapt s its policies (Hamma-adama et al. 2020; Li et al. 2019) , addresses the legal hurdles (Badi et al. 2020) , and develops new business models (Tezel et al. 2020) . Others argued that semi -automated contracts (Altay and Motawa 2020) and modular construction (Owusu et al. 2020) provide a more feasible path to adoption due to their relatively simpler contract structure. One study (Elghaish et al. 2020) propose d a framework for the execution of financial transactions in integrated project delivery (IPD) projects using smart contracts. The method , based on Hyperledger F abric (Androulaki et al. 2018) , keeps track of achieved profit in comparison with planned profit. Others argue d that the alignment between IPD and blockchain’s incentive structure can enhance collaboration (Hunhevicz et al. 2020) . To improve the security of payments, a method was proposed (Ahmadisheykhsarmast and Sonmez 2020) to lock funds in a smart contract account for a period of 30 days, reducing the trades’ exposure to the insolvency of clients. To enable the sharing of payment records at project -level, a key management strategy was proposed (Das et al. 2020) to provide “ selective- transparency ”, keeping sensitive information only visible between two contracting parties. A semi -autonomous solution (Luo et al. 2019) proposed the use of a consensus mechanism in the place of today’s payment workflows; contracto rs submit data regarding the applications for payment which is processed in a decentralized peer -to-peer network of stakeholders . Payments are executed by a smart contract if the relevant stakeholders reach consensus. The integrations with BIM is key to successful applications of the smart contract s (Mason 2017) , and this has been the focus of recent work on payment automation. A framework was introduced for using 5D BIM in the context of automated billing (Ye and König 2020; Ye et al. 2020) , extracting the bill of quantities from the project models and enhancing transparency ; the framework needs to be implemented , validated, and imporve its design to include payments to subcontractors. Two studies took a more integrated approach , focusing on the manag ement of the cash flow in relationship with the physical supply chain: a framework was proposed (Chong and Diamantopoulos 2020) for conditioning the smart contract’s payments based on the sensor feed and the BIM used for tr acking the on-site installation of building façade panels. This work created a link between off - and on-chain realities by its direct use of product flow for payment processing. The smart contract design was not detailed however . A smart contract -enabled solution (Hamledari and Fischer 2020b) was introduced to autonomously translate the on-site reality captures to direct payments to general contractor and subcontractors ; it eliminated the need for payment applications . The progress data and as-built BIMs are stored off -chain on a private InterPlantary File Sharing (IPFS) (Ben et 2014) with their cryptographic summary stored on the Ethereum blockchain (Buterin 2014) and used for on-chain payment settlement . It was argued (Hamledari and Fischer 2020a) that such autonomous conditioning of cash flow on produc t flow , as described in the two studies above, cannot be achieved with other technological alternatives. The C ash and product flows are respectively institutional and brute facts; the former is a soc ial reality, relying on the collective agreement of stakeholders . The transition from brute to institutional facts necessitates an elimination of single points of failure and centralized control mechanisms that are present in payment applications ; smart contracts make this possible (Hamledari and Fischer 2020a) . A conceptual blockchain-based business model (Kifokeris and Koch 2020) was introduced for use by construction logistics consultants and in support of integrating supply chain flows. The process flows and the the lo gistics set up was motivated through a review of literature and empirical findings in the context of sweedish construction industry. The review of the literature reveals a need for increased attention on the integration between physical and financial suppl y chains (Kifokeris and Koch 2019) . The research landscape has remained mostly theoretical (Darabseh and Martins 2020; Hunhevicz and Hall 2020; Kasten 2020) and lack s validation of usability (Hijazi et al. 2019) . While a handful of studies focus ed on the transition from product flow to cash flow, it is not clear whether this transition leads to integration and how such integration compares with that of today’s construction supply chain. In addressing this challenge, this work focuses on the role of crypto asset s as enabler s of integration between physical and supply chain. The section 2. 2 provides a brief overview of crypto asset classe s, a point of departure used in this work. 2.2 Crypto asset The term “crypto asset ” is used herein to refer to both crypto currencies and crypto tokens. At their core, crypto asset s provide a decentralized governance model for reaching agreement on a shared notion of reality in trust-less environment s. 2.2.1 Crypto Currency In the case of crypto currencies, th is shared notion is the concept of money and its exchange between a network of peers. Money is an institutional fact (Searle 1995) , and it require s the active participation of trusted third -part y institutions such as banks who define and back this shared notion of value . The invention of Bitcoin (Nakamoto 2008) and its Nakamoto consensus allowed for independent parties, with competing objectives, to collectively execute and agree on the exch anges of monetary value (bitcoin) without reliance on trusted third -party intermediaries . In their early writings, the Bitcoin inventor Satoshi Nakamoto referred to the blockchain as “ proof - of-work chain ” (Champagne 2014) . This further emphasizes the critical role of the consensus/ governance model as the core contribution of Bitcoin (Tschorsch and Scheuermann 2016) , and not the use of a shared distributed ledger . This decentralization reduces the cost of transaction verification and networking (Catalini and Gans 2016) , and it is the innovation that distin guishes Bitcoin and other crypto currencies from their unsuccessful predecessors (Narayanan et al. 2016; Narayanan and Clark 2017) such as B-Money (Dai 1998) , and Bit Gold (Szabo 2005) . Bitcoin ’s shortcomings gave rise to alternative coins ( “alt-coin ”) (Antonopoulos 2014) . The Litecoin (Lee 2011) was announced as a “lite version of Bitcoin ”, and it replaced the Bitcoin’s SHA-256 with the Scrypt algorithm . This made its mining more accessible since the Scrypt algorithm is less susceptible to custom -hardware solutions and the resulting high consolidation of miners. Privacy is a concern due to the Bitcoin ’s use of pseudonymous transactions (Conti et al. 2018) . The study of transaction patterns may jeopardize users’ spending habits and their identity . For e xample, one study successfully distilled millions of transactions into a few thousand superclusters, each representing a business entity (Tasca et al. 2018) . This need for privacy gave rise to Monero (Van Saberhagen 2013) , Dash (D uffield and Diaz 2015) , and Zerocash (also Zcash) (Sasson et al. 2014) . For example, Zcash provides zero -knowledge proofs for transactions without revealing the ir source, amount, and destination. This is achieved with the combined use of an anonymous and a base non-anonymous c urrency. In addition to privacy, there are concerns with respect to scalability and the li mited tr ansaction throughput (Eyal et al. 2016) . While both permission-less and private chains use shared distributed legers to manage the exchanges of their native coin s, their functionality and security stem from the design of their consensus mechanism (Antonopoulos 2017a) . The mere use of a distributed database for exchange of crypto currencies does not guarantee that transactions are irreversible, and that consensus can be emerged. The anti-trust risks associated with consortium blockchains (Schrepel 2019; Schrepel and Buterin 2020) are one example of such challenges; this can posit difficulties for distributed leger technology (DLT) -based solutions (Mills et al. 2016) . While a lt-coins face difficulties in bootstrapping (Böhme et al. 2015) , they continue to gain adoption and constitute a bigger portion of the market . As a result, the support for Bitcoin has slightly declined , dropping from 98% in 2017 to 90% in 2020 (Blandin et al. 2020) . Regardless of which crypto currencies survive, their innovation in the decentralized exchange of money is here to stay (Lo and Wang 2014) . 2.2.2 Crypto Token The invention of Bitcoin made decentralized money a reality , yet it fell short of supporting decentralized applications (DApp) due to its limited stack -based scripting language and its lack of turning completeness (Swan 2015) . This motivated the invention of the Ethereum blockchain (Buterin 2014; Wood 2014) and its quasi -Turning complete Ethereum Virtual Machine (EVM). Ether (ETH) is the native coin of the Ethereum blockchain. This innovation enabled computerized algorithms to be executed in a decentralized manner , making earlier visions such as smart contract (Szabo 1994; Szabo 1997) a reality. Crypto token s are one example of smart contracts. A crypto token contract is executed on the EVM , and it manages its supply of tokens and their exchanges by updating a set of variables written to the underlying Ethereum blockchain. For smart contracts to transact with one another and for trading to take place, these token contracts and their functionalities needed to be standardized. This gave birth to the Ethereum Request for Comments (E RC) documents that describe a token standard. The two notable token standards are the ERC20 standard (Vogelsteller and Buterin 2015) and ERC721 standard (Entriken et al. 2018) , respectively used to represent fungible and non-fungible digital assets. ERC20 tokens are fungible; each token can be swapped with another . In contrast to fungible crypto currencies, however, these tokens can have additional functionalities, acting as “ programmable money” (Antonopoulos 2017b) . For example, they can represent a share in a venture; this has given rise to initial coin offerings (ICO), the crypto world’s parallel to initial public offerings and a means of fund raising (Howell et al. 2020) . The ERC20 ’s popularity a nd utilization has made ETH the second most common crypto currency (Rauchs et al. 2018) trailing bitcoin . ERC721 tokens are unique and cannot be swapped with one another. This enables tokenization, wit h each non-fungible token (NFT) representing a unique asset. This concept , however, has origins in the earlier writings by Nick Szabo on the decentralized exchanges of secure property titles (Szabo 1998) and the efforts in the Bitcoin ecosystem for the development of “ colored coins ” (Rosenfeld 2012) . The application of NFTs has been proposed f or infrastructure financing (Tian et al. 2020) , the lien right management in construction industry (Hamledari and Fischer 2020b) , life cycle management of information in AEC (Succar and Poirier 2020) , and tracking goods across supply chains (Westerkamp et al. 2020) . 3 CRYPTO ASSET -ENABLED INTEGRATION OF PHYSICAL AND FINANCIAL SUPPLY CHAINS This work argues that the application of crypto assets in the place of fiat currencies and for conditioning payments on the updates in the product flow status can increase the integration between physical and financial supply chains . The authors first elaborate the underlying mechanisms that create such integration by contrasting the flow of cash in supply chains that are rely on fiat currencies and those using crypto assets (section 3.1). Two types of integration enabled by crypto asset s are further introduced in section 3.2. 3.1 The Movement of Money: Seeming Versus Actual Financial institutions such as banks have become indispensable parts of today’s construction supply chain (Fig 1), responsible for processing payments in fiat currencies throughout a project’s life cycle and between all its stakeholders. Banks operate based on the concept of liability . An account balance represents the sum owed to an account holder by a bank, and not reserves of cash. Banks process payments by adjusting their liability and the amounts they owe to project stakeholders on the receiving and sending end of a payme nt. A bank owes respectively more and less to the payee and payer; these changes in liability are respectively called credit and debit operations. This process is more straightforward when both stakeholders hold accounts with the same bank (Fig. 1b), where the financial institution debits one account by the exact amount it credits the other. The bank sees no change in its net liabilities, but instead changes in its liability to each individual stakeholder. Fig. 1. The payment workflows in today’s AEC industry: a) the lack of integration between physical and financial supply chains, b) payment settlement when parties hold accounts with the same bank or c) with different banks In the more complex situations where stakeholders hold accounts with different banks (Fig. 1c). Correspondent banking is a model used in the past, where each bank holds accounts with other banks (Nostro account) and hosts accounts for them (Vostro account) . Payments are settled by changes in the net liability of banks on the receiving and sending end of a transaction, reflected in their Vostro and Nostro accounts. More recently, payments between banks are handled using central banking models and batch processing approaches (Fig. 1c), where a network receives and batches transactions from the originating depository financial institutions (ODFI) and reports them to the receiving depository financial institutions (RDFI); the resulting net debit and credit positio n of a bank is determined by the aggregate effect of outgoing and incoming transactions and is reflected in the bank’s Nostro account with a central reserve (Fig. 1c). Examples of batch processing include the automated clearing house (ACH) (McAndrews 1994) in USA and the clearing house automated payment system (CHAPS) in UK (Bech er et al. 2008) . In instances explained above , the bank does not move money; the payment is settled by flowing information , arithmetic operations on the banks’ books , and not by flowing cash. This is a key factor that distinguishes current supply chains from those empowered by crypto asset use (Fig. 2): Fig. 2. Integration of physical and financial supply chains in the crypto asset -enabled supply chains In a crypto asset -enabled system, th e payment can be settled using native crypto currencies or overlay crypto tokens, with transactions formed between externally owned accounts (EOA), between contract accounts and EOAs, and between contract accounts; the first two are illustrated in Fig. 2a . Regardless of the crypto asset and the account type: 1) each account’s balance represents the existence of actual reserves of crypto currencies, crypto tokens, or unique unspent transaction outputs; these funds are under the control of the party with access to the private key of the account address; 2) each payment changes the ownership of the aforementioned funds; this change represents a movement of money. This movement is written to and can be tracked on the blockchain. The payment moves crypto asset s from one account to the next, such that the funds can be controlled only by the private key of the payee. This actual movement of funds is what crypto asset -enabled supply chain in terms of integration; each movement of money provides an opportunity for integrating the product flow data with the payments (cash flow) they trigger. The updates in the status of product flows such as material deliveries, installation s, and the construction of building elements at job sites can be directly tied to the crypto asset s’ change of ownership. 3.2 Two Facets of Crypto Asset-Enabled Integration: Granularity and Atomicity The application of crypto asset s for payments enhances 1) the granularity and 2) the atomicity of the integration between physical and financial supply chains : 3.2.1 Granularity This work characterizes granularity from three perspectives: 1) time , 2) trade, and 3) product. Therefore, a more g ranular integration between cash and product flows is herein characterized by payments that are more frequent, are payable to fewer parties, and are associated with smaller amount of work or fewer products (Fig. 3b). • Temporal granularity refers to the peri od of time for which the construction work is documented in the payment application s and for which trades are entitled to a compensation. Increased temporal granularity equals more frequent payments. • Trade -level granularity refers to the number of trades included in a payment. For example, a payment made to general contractor for indoor finishing work can include compensation for multiple trades such as insulation installer, drywaller, painter, and electrician. A more granula r trade-level payment would involve fewer trades per transaction, resulting in more direct payments to each trade for their share of the work during a billing period. • Product -level granularity refers to the number of products and building elements for which a party is compensated. For example, a payment to a general contractor for the concrete pour on one floor has higher product -level granularity than a payment for multiple floors. Fig. 3. A comparison between low and high granularity in payments: a) longer payment cycles, compensation to multiple trades, and for bigger scope of work; b) high temporal, trade -level, and product -level granularity The increased granular ity in the integration of cash and product flows makes it easier to align various sources of project data. The information, product, and cash flows are currently documented at different granularity and across sources such as 3D models, construction progress data, invoices, payment applications, and lien waivers, among others (Fig. 4) . For example, the product documentation has the least granularity in the payment application submitted to owner , medium granularity in subcontractor invoices, and most granularity in the 3D models. These discrepancies make it difficult to connect these data sources; this problem is compounded when matching data using other features such as trade and time . The time-consuming workflows associated with today’s fragmented payment systems (Fig.1) hampers project stakeholders from achieving more granular integrations. Increased temporal, trade -level, and product -level granularity would result in exponentially higher number of payment applications and interactions with outside financial institutions ; the resources required for preparation, review, approval, and the enforcement of these applications make such high granularity impossible to achieve. In the crypto asset - enabled system, on the other hand, the exchange of monetary value is decentralized a nd processed using an overlay protocol that benefits from the underlying blockchain’s autonomy and consensus mechanism. This autonomy allows for direct use of product data for payment processing, increasing the granularity of integration. The third -party i nstitutions are not involved in processing these granular payments; they instead are located at the periphery of the supply chain (Fig. 2) , where they provide financial services to stakeholders. Fig. 4. The level of granularity significantly varies bet ween different sources of project information 3.2.2 Atomicity Atomicity is herein defined as both the product and cash flows documented within the same space; an atomic integration is characterized by a grouping of product flow status updates and the corresponding flow of cash into a single transaction. Increased atomicity contributes to the creation of a single source of truth and integrated information. The construction supply chain currently lacks atomicity because the physical and financial supply chains are pushed apart from each other due to the heavily intermediated nature of the supply chain and reliance on external financial institutions (Fig. 1). This has resulted in a siloed data development ecosystem; the product flow is stored with project members and scattered through virtual models and remote captured progress data, whereas banks hold onto t he corresponding cash flow data. The product flow status updates that trigger payments cannot be retrieved from t he records of payments; the latter appear as a series of credit and debit operations on the bank’s books and in aggregate form. The applicatio n of crypto asset s pushes financial institutions to the periphery (Fig. 2). This changes the role of banks in the construction supply chain, giving project stakeholders the ability to settle payments and agree on the concept of money without reliance on third -party intermediaries. As a result, the flow of funds is executed and documented within the supply chain network and not outside its boundaries. In this crypto asset -enabled supply chain, both the cash and product flows are documented in the same transactions, stored on the underlying blockchain (Fig. 2). 4 EXPERIMENT SET UP A series of experiments were conducted in the context of construction progress payments to explore the role of crypto asset s in enabling integration between product and cash flows. Fig. 5 illustrates the design of experiments, where the instances of crypto asset s were used for payment processing. To validate this work’s thesis, the resulting payment data was assessed in terms of the atomicity and granularity of integration between cash and product flows. The product flow data (Fig. 5a) consists of two sets of 1) on-site reality captures, 2) as-built BIMs , and 3) artificial intelligence -enabled progress assessments for two commercial construction projects in California (USA) and Ontario (Canada). The first data set (Law et al. 2020) is captured by an unmanned ground vehicle (UGV) equipped with a laser scanner, where three subcontractors were compensated for work on plumbing, indoor partitions, and heating, ventilations, and cooling. The second da taset (Hamledari et al. 2017a; Hamledari et al. 2017b) is captured by a camera- mounted unmanned aerial vehicle (U AV), where four subcontractors performed work on indoor partitions (framing, insulation, installation and plastering of drywalls, and painting). The product flow data is passed to an autonomous smart contract -based payment method (Hamledari and Fischer 2020b; Hamledari et al. 2018) (Fig. 5b) which uses three instances of crypto assets: ERC721, ERC20, and ETH . The former is used for the transfer of lien rights; each to ken represent s the right to physical property for which a payment is made. T he ERC20 and ETH are used for on -chain payment settlement (see section 2. 2 for an overview of these crypto asset classes). The smart contract -based solution stores product flow off -chain on a private IPFS network; the updates in the status of product flow are communicated to a smart contract on the Ethereum virtual machine (EVM) which performs the on -chain payment settlements and directly writes to the Ethereum blockchain. Table 1. The two levels of granu larity defined for product, temporal, and trade features of the payment data Level of granularity Low High Product all elements of the same type one building element Time monthly weekly Trade general contractor subcontractors Fig. 5. The experiments designed to evaluate the effectiveness of crypto asset s in enabling integration between cash and product flows: a) product flow data on two commercial construction projects, 2) smart contract -based method used for payment processing, c) the eight testing scenarios defined based on variations in the product -level, temporal, and trade -level granularit y, and d) the resulting 18 data sets of payment data To evaluate the effectiveness of crypto asset s in enabling granularity, the low and the high level of granularity were defined for product -level , temporal, and trade -level features of the payment data (Table 1). For example, the low and high trade -level granularity respectively correspond to payments from the owner to general contractor (GC) and the direct payments from the owner to subcontractors. Fig. 6 illustrates these levels of granularity for product-level, temporal, and trade -level features. The combination of the low and high granularity for these three features resulted in a total of 8 testing scenarios (Fig. 5c). Each of the UGV and UAV dat asets was used to generate 8 sets of payment data, ranging from the lowest granularity (i.e., monthly payment from the owner to GC for work on all building elements) to highest (i.e., weekly payment from the owner to a subcontractor for work on one particu lar building element). These tests were run in parallel and for a period of one month. Fig. 6. The low and the high levels of granularity for product, time, and trade 5 RESULTS & DISCUSSION The experiments resulted in 16 sets of payment data (Fig. 5d), c onsisting of transactions written to the blockchain. Tests 1 -8 only vary in terms of their granularity and otherwise correspond to the same scope of work on the first project. This is also the case for tests 9 -16, corresponding to payments on the second project. The payment datasets were examined to verify whether granularity and atomicity were achieved in the integration between cash and product flows; the results are detailed in sections 5 .1 and 5.2 respectively. The implications of these findings are further discussed in section 5 .3. 5.1 Granularity of Integration The integration is successfully achieved if the payments have the intended level of granularity as specified in the testing scenarios (Fig. 5c). According to the on-chain transactions for the UGV dataset (Fig. 5a), payments in the tests 4, 5, 7 and 8 failed to materialize; these unsuccessful tests all correspond to high product -level granularity. As for the UAV dataset (Fig. 5a), all eight tests (9 -16) were successfully executed and achieved the intended granularity. Further analysis of the tests’ input data reveals that this discrepancy is due to the differences between the product flow’s level of detail (LoD) in the two datasets. In both projects, the BIM provides design and construction data for each building element, available per globally unique identifiers (GUID). The progress assessments (i.e., as-built condition at the jobsites), on the other hand, are provided in aggregate form for the UGV dataset and per GUID in the UAV dataset . As a result, the high product -level granularity failed to materialize in payments associated with the former. Fig. 7 illustrates four transactions achieved using ETH and ERC20 for payment settlement. These transactions vary i n terms of their levels of granularity and are respectively part of the transaction pools in tests 1 (low granularity), 4 (high product granularity), 8 (high product, temporal, and trade granularity), and 6 (high temporal and trade granularity). They respe ctively correspond to 1) payment to the GC for the framing, insulation, drywall installation, plastering, and painting performed during the month of June on 104 partitions (Fig. 7a); 2) payment to the GC for the framing, insulation, drywall installation, a nd plastering performed on one particular partition during the week of June 4- 11 (Fig. 7b); c) payment to the framing subcontractor for the work on one particular partition during the week of June 4-11 (Fig. 7c); and d) payment to the insulation subcontrac tor for the insulation work performed on 42 partitions during the week of June 12 -19. Fig. 7. Different levels of granularity achieved using ERC20 and ETH in payment settlement: a) low granularity, b) high product granularity, c) high product, temporal , and trade granularity, and d) high temporal and trade granularity This increased granularity is not limited to the payment settlement and is extended to the transfer of lien right. As shown in Fig. 7, the smart contract -based method (Hamledari and Fischer 2020b) uses the ERC721 -based LIEN token to transfer the lien right to the owner for the scope of work for which the trades are compensated in the ERC20/ETH transaction. The se two transactions are broadcasted simultaneously by the smart contract . As the construction progresses, instances of LIEN token are minted and transferred to the owner, with each having its own unique ID. Fig. 8 shows the LIEN token corresponding to the payment depicted in Fig. 7c; it represents the right to the framing work on the partition shown in Fig. 8b. Fig. 8. The application of ERC721 in the transfer of lien rights: granular definition of scope of work in the LIEN token and the atomic integration between product data (off-chain) and financial data (on-chain) 5.2 Atomicity of Integration The transactions in all tests were observed to achieve atomicity in their integration of cash and product flows: the product flow updates corresponding to each flow of cash were directly retrieved from the payment transactions and vice versa. These flows are stored within th e same space (Fig. 9) and not in separate siloes. Fig. 9 illustrates how the application of the crypto assets enables this atomic integration: the EVM is a singleton state machine, and the transactions processed by its miners result in changes to the state of the Ethereum blockchain. This change is reflected in the state trie (also “state tree”) (Fig. 9c). It is a modified Merkle Patricia trie, a global tree -like data structure that maps key -value pairs, where the key and value are respectively an account address and the encoding of its nonce , balance , StorageRoot , and CodeHash (Fig. 9d). These changes are recorded for both EOAs and contract accounts. Fig. 9. Crypto asset application enables atomic integration of cash and product flows, connecting the off - and on-chain realities The StorageRoot is the 256 -bit hash of the account storage trie , where all the smart contract data and the mapping between product and cash flow i s stored . This includes the content identifiers (CID) corresponding to the product flow updates stored off -chain and on the project’s IPFS private network (Fig. 9e); the off-chain data include , among others, the construction progress, as-built BIM, and the schedule of values. Each transaction, stored in the transaction trie and the body of a block (Fig. 9a), can be linked with the corresponding CID that initiated that transaction, creating an atomic integration where both flows are stored within the same sp ace. The CIDs cannot be interpreted by individuals outside the IPFS network and hence do not jeopardize the privacy of the data. As shown in Fig. 8, this atomicity is also extended to the transfer of lien rights . As part of the ERC721 standard, each LIEN token has a uniform resource identifier (URI) which stores its metadata. A LIEN token’ s URI store s the CID of the product flow updates for which the right is transferred. For example, the token shown in Fig. 8a stores the CID referencing the framing work on the partition shown in Fig. 8b. This atomicity makes it possible to retrieve the monetary value and the product flow associated with each transfer of lien right directly from the LIEN token. 5.3 Implications for the AEC Industry The application of crypto asset s was observed to enhance the atomicity and the granularity of the integration between cash and product flows. In contrast with today’s payment systems, the crypto asset use provides a means of payment processing and the transfer of lien rights for the scopes of work that have varying levels of granularity. This enables the flow of funds on projects to occur more frequently, to compensate smaller scopes of construction work, and to be more directly payable to the trades. For instance, the application of ETH and ERC20 made it possible for a project to compensate a subcontractor on a weekly basis for the framing work on a single interior partition. The ERC721 use allowed for the transfer of lien right corresponding to the same granular scope of work. These transactions were recorded in an immutable manner and timestamped on the Ethereum blockchain, creating a permanent and auditable link between the flow of funds and the corresponding product flow updates. The record of each paym ent provides access to the construction progress data triggering that payment along with project information such as BIM, schedule of values, and the data analytics tools used in the valuation of the work. This level of granularity and atomicity is not pos sible in today’s supply chains . Based on the results, it is evident that the product flow’s LoD plays a critical role in achieving increased granularity. The use of crypto asset alone does not guarantee an increase in granularity. This incentivizes the dev elopment of robust product flow management systems using robotics and artificial intelligence. Stakeholders that invest in such data -driven solutions across their supply chain can benefit from an increased granularity in their financial supply chain, enabl ed by crypto asset use. These same investments do not currently translate to enhancements in the payment systems. The p ayment applications currently used in the industry have the same granularity regardless of how technology is used in man aging the physic al supply chain; the end result is blind to improvements in the on-site use of reality capture technologies, the robust tracking of construction material, and the use of as- built BIMs. In the crypto asset -enabled system, on the other hand, the financial supply chain can be as granular as the physical supply chain, and so can their integration. Increases in the frequency of data capture, the LoD of progress data, and the detailed modeling of trades in BIM directly translate to enhancements in payment’s granularity. Achieving atomicity, on the other hand, appeared to be independent of the product flow’s LoD. The application of crypto asset increases atomicity even when the payment granularity is as its lowest and matches that of today’s payment applications. Both the physical and financial supply chain data can be retrieved directly from the on-chain transactions or the instances of the crypto assets. T he stakeholders do not need to run full nodes in the public blockchain to access this data. Integrating information is key to successful project delivery and cr eating a single source of truth (Fischer et al. 2017) . The combination of atomicity and granularity, enabled by crypto asset use, can enhance the alignment between project data stored across different data sources (Fig. 4); this is because information can be stored in a single space, rather than in siloes, and it can be highly granular, allowing for successful matching across different sources such as BIM, activities, schedule of values, and on -site observations. Increased transparency is another potential impact of su ch improvements . In the blockchain data structures such as state trie, storage trie, and transaction trie, the changes propagate upwards; any alteration of the project data results in inconsistencies that can be automatically detected. This has potential to both detect and prevent fraud, one of the common form s of corruption in the construction industry (Le et al. 2014) . 6 LIMITATIONS & RISKS The experiments conducted in this work used datasets that were collected at different construction projects, described work conducted on a variety of building elements, and were collected using different sensors. However, they both focused on the on-site installation and construction of elements. They did not , for example, include off-site construction and the delivery of materials . That said, t he on- and off -chain documentation of flows occurs independent of the type of product flow status updates, the type of sensor, and the source of the product flow data. Therefore , it is expected that crypto asset use enabl es the same integration for those scopes of wo rk. Future work should validate this by extending the experiments to a broader range of activities. In this work, t he experiments were conducted on the Ethereum blockchain, a permission-less chain. While it is expected that the findings extend to private or consortium blockchains , this was not validated . In private chains, t he integrity of the transactions depends on the design of the consensus algorithm and the possibility of collusion between parties. It is not certain that the integration of physical and financial supply chain, once achieved on a private chain , will remain immutable and secure. On the other hand, the applicat ion of permission-less chains in this work necessitates a closer look at privacy concerns; this was not part of the scope and needs to be addressed in future. The application of crypto asset s for conditioning the cash flow on product flow may expose proje cts to risks associated with 1) the regulat ions and 2) the price volatility of c rypto currencies: The crypto asset space is fast evolving , and so are the regulation s surrounding their use. Crypto asset s may be considered securities (De Filippi and Wright 2018) ; this can make them subject to scrutiny by regulatory bodies such as the Securities and Exchange Commission (SEC) and the Federal Trade Commission (FTC). While there is debate as to whether more regulation is needed, some case studies suggest that the current regulation s are sufficient in addressing the risks of crypto asset s to financial stability and monetary policy (Manaa et al. 2019) . The regulatory bodies need to provide clarity as to which tokens are considered security (Edwards et al. 2019) . This reduces the uncertainties for the industry applications. Crypto currencies have higher price volatility compared with fiat currency. While stablecoins (Calcaterra et al. 2019) can offer a feasible alternative, the increased adoption of crypto currencies can reduce the volatility in future . The price of a crypto currency is a function of its utilization and the market’s speculation about its potential value as an investment asset. As more industries adopt a crypto currency, its utilization increases, and the changes in the speculative component will have smaller influence on the overall price of that crypto currency . Increased adoption also means the availability of more buyers and sellers; this increases market liquidity , further reducing the price volatility. 7 CONCLUSION In response to recent technological disruptions, t he construction and e ngineering industry is projected to undergo consolidations across its value chain; this can particularly benefit the financial supply chain and its integration with the physical supply chain. The transition from product flow to payments is currently heavily intermediated; the product flow is scattered across several supply chain partners, and the cash flow sits with external financial institutions. There is a disconnect between the two. This wo rk demonstrated how the application of blockchain-based crypto assets (crypto currencies and crypto tokens) can enable integration when used in the place of fiat currency and for conditioning the payments on the flow of products. The thesis was validated i n a series of experiments where crypto assets were used for processing payments to subcontractors on two commercial construction projects. The findings indicate that supply chains empowered by crypto asset s can benefit from increased granularity and atomic ity in their integration of flows. The increase in the granularity , however, is dependent on the product flow’s LoD . This motivates further attention automated and data -driven approaches toward the management of product flow. The atomicity, on the other ha nd, can be achieved regardless of the LoD for product flow. Projects can benefit from crypto asset -enabled integration regardless of the LoD used in their product flow management. The investments in the latter, however, can directly translate to improvements in the financial supply chain. While this work examined the mechanisms contributing to the integration of flows, it is crucial to analyze the impact of such integration on the supply chain visibility and the performance of supply chain partners. It is n ot currently clear how enhancements in the granularity and atomicity of integration affects the experience of stakeholders retrieving and using the data. This necessitates the design of experiments where the acc uracy of the data retrieval, the level of effort, and other measures of supply chain visibility can be quantified in supply chains using fiat currency and crypto assets. 8 ACKNOWLEDGEMENT This work is financially supported by the Center for Integrated Facility Engineering (CIFE) at Stanford University (grants 2020- 09, 2018-06 , 2017-06). The authors are grateful to Swinerton, PMX Construction, Perkins+Will, Inc., for their support during the d ata collection phase and granting access to project data. The first author extends his gratitude to Eric Law and Tristen Magallanes (Swinerton); Dr. Kincho Law, Dr. Michael Lepech, Dr. Forest Flager, Alissa Cooperman, Parisa Nikkhoo, and Tulika Majumdar (S tanford University); Dr. Brenda McCabe, and Pouya Zangeneh (University of Toronto) for their immense role in his PhD journey and for their invaluable intellectual companionship. 9 REFERENCES Ahmadisheykhsarmast S., and Sonmez, R. (2020). "A smart contract system for security of payment of construction contracts." Automation in Construction, 120, 103401. https://doi.org/10.1016/j.autc on.2020.103401 Altay H., and Motawa, I. (2020). "An investigation on the applicability of smart contracts in the construction industry." Proc., ARCOM Doctoral Workshop Proceedings, 12. Androulaki E., Barger, A., Bortnikov, V., Cachin, C., Christidis, K., D e Caro, A., Enyeart, D., Ferris, C., Laventman, G., and Manevich, Y. (2018). "Hyperledger fabric: a distributed operating system for permissioned blockchains." Proc., Proceedings of the thirteenth EuroSys conference, 1 -15. Antonopoulos A. M. (2014). Mastering Bitcoin: unlocking digital cryptocurrencies, " O'Reilly Media, Inc.". Antonopoulos A. M. (2017a). The internet of money volume two , Merkle Bloom LLC. Antonopoulos A. M. (2017b). The internet of money, Merkle Bloom LLC. Badi S., Ochieng, E., Nasaj, M., and Papadaki, M. (2020). "Technological, organisational and environmental determinants of smart contracts adoption: UK construction sector viewpoint." Construction Management and Economics , 1-19. https://doi.org/10.1080/01446193.2020.1819549 Barbosa F., Woetzel, J., & Mischke, J. (2017). "Reinventing Construction: A Route to Higher Productivity "McKinsey and Company. https://www.mckinsey.com/~/media/McKinsey/Industries/Capi tal%20Projects%20and %20Infrastructure/Our%20Insights/Reinventing%20construction%20through%20a%20productivi ty%20revolution/MGI -Reinventing-Construction -Executive -summary.ashx Barrón A., and Fischer, M. (2001). "Potential Benefits of Internet -Based Project C ontrol Systems –A Study On Change Order Processing." Center for Integrated Facility Engineering, TR125 . https://purl.stanford.edu/qv736hg5369 Barua A., Konana, P., Whinston, A. B., and Yin, F. (2004). "A ssessing internet enabled business value: An exploratory investigation." MIS Quarterly, 28(4), 585-620. Becher C., Millard, S., and Soramaki, K. (2008). "The network topology of CHAPS Sterling." Bank of England Working Paper No. 355. http://dx.doi.org/10.2139/ssrn.1319277 Benet J. (2014). "IPFS - Content Addressed, Versioned, P2P File System." arXiv preprint arXiv:1407.3561. https://arxiv.org/abs/1407.3561v1 Bilal M., Oyedele, L. O., Qadir, J., Munir, K., Ajayi, S. O., Akinade, O. O., Owolabi, H. A., Alaka, H. A., and Pasha, M. (2016). "Big Data in the construction industry: A review of present status, opportunities, and future trends." Advanced engineering informatics , 30(3), 500- 521. https://doi.org/10.1016/j.aei.2016.07.001 Bitran G. R., Gurumurthi, S., and Sam, S. L. (2007). "The need for third -party coordination in supply chain governance." MI T Sloan management review , 48(3), 30-37. Blandin A., Pieters, G. C., Wu, Y., Dek, A., Eisermann, T., Njoki, D., and Taylor, S. (2020). "3rd Global Cryptoasset Benchmarking Study." Available at SSRN 3700822. http://dx.doi.org/10.2139/ssrn.3700822 Blount C. (2008). "Physical and financial supply chains meet." Com. Lending Rev. , 23, 13. Böhme R., Christin, N., Edelman, B., and Moore, T. (2015). "Bitcoin: Economics, technology, and governance." Journal of economic Perspectives, 29(2), 213- 238. http://doi.org/10.1257/jep.29.2.213 Briscoe G., and Dainty, A. (2005). "Construction supply chain integration: an elusive goal?" Supply chain management: an interna tional journal , 10(4), 319-326. https://doi.org/10.1108/13598540510612794 Buterin V. (2014). "A next -generation smart contract and decentralized application platform." white paper , 3, 37. https://cryptorating.eu/whitepapers/Ethereum/Ethereum_white_paper.pdf Calcaterra C., Kaal, W. A., and Rao, V. K. (2019). "Stable cryptocurrencies-first order principles." Stanford Journal of Blockchain Law & Policy . https://stanford -jblp.pubpub.org/pub/stable - cryptocurencies-principles Catalini C., and Gans, J. S. (2016). "Some simple economics o f the blockchain." Communications of the ACM , 63(7), 80-90. Champagne P. (2014). The book of Satoshi: The collected writings of Bitcoin creator Satoshi Nakamoto, e53 Publishing, LLC. Chen Q., de Soto, B. G., and Adey, B. T. (2018). "Construction automatio n: Research areas, industry concerns and suggestions for advancement." Automation in Construction, 94, 22 -38. https://doi.org/10.1016/j.autcon.2018.05.028 Cheng J. C., Law, K. H., Bjornsson, H., Jones, A., and Sriram, R. (2010). "A service oriented framework for construction supply chain integration." Automation in construction, 19(2), 245-260. https://doi.org/10.1016/j.autcon.2009.10.00 3 Chong H. -Y., and Diamantopoulos, A. (2020). "Integrating advanced technologies to uphold security of payment: Data flow diagram." Automation in Construction, 114, 103158. https://doi.org/10.101 6/j.autcon.2020.103158 Conti M., Kumar, E. S., Lal, C., and Ruj, S. (2018). "A survey on security and privacy issues of bitcoin." IEEE Communications Surveys & Tutorials, 20(4), 3416-3452. http://do i.org/10.1109/COMST.2018.2842460 Čuš-Babič N., Rebolj, D., Nekrep -Perc, M., and Podbreznik, P. (2014). "Supply- chain transparency within industrialized construction projects." Computers in Industry , 65(2), 345- 353. https://doi.org/10.1016/j.compind.2013.12.003 Dai W. (1998). "B -money proposal." White Paper . http://www.weidai.com/bmoney.txt Dainty A. R., Millett, S. J., and Briscoe, G. H. (2001). "New perspectives on construction supply chain integration." Supply chain management: An international journal , 6(4), 163 -173. https://doi.or g/10.1108/13598540110402700 Darabseh M., and Martins, J. P. (2020). "Risks and Opportunities for Reforming Construction with Blockchain: Bibliometric Study." Civil Engineering Journal , 6(6), 1204-1217. http://doi.org/10.28991/cej -2020- 03091541 Das M., Luo, H., and Cheng, J. C. (2020). "Securing interim payments in construction projects through a blockchain-based framework." Automation in Construction, 118, 103284. https://doi.org/10.1016/j.autcon.2020.103284 De Filippi P., Mannan, M., and Reijers, W. (2020). "Blockchain as a confidence machine: The problem of trust & challenges of governance." Technology in Society , 62, 101284. https://doi.org/10.1016/j.techsoc.2020.101284 De Filippi P., and Wright, A. (2018). Blockchain and the Law: The Rule of Code , Harvard University Press. Duffield E., and Diaz, D. (2015). "Dash: A privacy -centric cryptocurrency." Edwards F. R., Hanley, K., Litan, R., and Weil, R. L. (2019). "Crypto Assets Require Better Regulation: Statement of the Financial Economists Roundtable on Crypto Assets." Financial Analysts Journal , 75(2), 14 -19. https://doi.org/10.1080/0015198X.2019.1593766 Elghaish F., Abrishami, S., and Hosseini, M. R. (2020). "Integrated project delivery with blockchain: An automated financial system." Automation in Construct ion, 114, 103182. https://doi.org/10.1016/j.autcon.2020.103182 Entriken W., Shirley, D., Evans, J., and Sachs, N. (2018). "Erc -721 non-fungible token standard." Ethereum Foundation. https://eips.ethereum.org/EIPS/eip -721 Eyal I., Gencer, A. E., Sirer, E. G., and Van Renesse, R. (2016). "Bitcoin -ng: A scalable blockchain protocol." Proc., 13th {USENIX} symposium on networked systems design and implementation ({NSDI} 16) , 45-59. Feldmann M., and Müller, S. (2003). "An incentive scheme for true information providing in supply chains." Omega , 31(2), 63- 73. https://doi.org/10.1016/S0305- 0483(02)00096- 8 Fellenz M. R., Augustenborg, C., Brady, M., and Greene, J. (2009). "Requirements for an evolving model of supply chain finance: A technology and service providers perspective." Communications of the IBIMA , 10(29), 227- 235. https://ibimapublishing.com/articles/CIBIMA/2009/704526/704526.pdf Fischer M., Ashcraft, H. W., Reed, D., and Khanzode, A. (2017). Integrating project delivery, Wiley. Gabert H., and Grönlund , H. (2018). "Blockchain and smart contracts in the Swedish construction industry." Hamledari H., and Fischer, M. (2020a). "Role of Blockchain -Enabled Smart Contracts in Automating Construction Progress Payments." Journal of Legal Affairs and Dispute Resol ution in Engineering and Construction, 13(1). https://doi.org/10.1061/(ASCE)LA.1943- 4170.0000442 Hamledari H., and Fischer, M. (2020b). "Construction Payment Automation Using Blockchain -Ena bled Smart Contracts and Reality Capture Technologies." arXiv preprint arXiv:2010.15232. https://arxiv.org/abs/2010.15232 Hamledari H., Fischer, M., and Lepech, M. (2018). "CryptoBIM: Cryptographic and Blockchain -Enabled Building Information Modeling ", Stanford University, Center for Integrated Facility Engineering (CIFE) Hamledari H., McCabe, B., and Davari, S. (2017a). "Automated computer vision -based detection of components of under -construction indoor pa rtitions." Automation in Construction, 74, 78 -94. https://doi.org/10.1016/j.autcon.2016.11.009 Hamledari H., McCabe, B., Davari, S., and Shahi, A. (2017b). "Automated schedule and progress updati ng of IFC -based 4D BIMs." Journal of Computing in Civil Engineering, 31(4), 04017012. https://doi.org/10.1061/(ASCE)CP.1943-5487.0000660 Hamma- adama M., Salman, H., and Kouider, T. (2020). "Blockchain in construction industry: challenges and opportunities." Proc., 2020 International engineering conference and exhibition (IECE 2020) . Hijazi A. A., Perera, S., Alashwal, A., and Calheiros, R. N. (2019). "Blockchain Adoption in Construction Supply Chain: A Review of Studies Across Multiple Sectors." Proc., CIB World Building Congress 2019. Hofmann E. (2005). Supply chain finance: some conceptual insights , Springer Gabler, Wiesbaden. Howard H., Levitt, R. E., Paulson, B., Pohl, J. G., and Tatum, C . (1989). "Computer integration: reducing fragmentation in AEC industry." Journal of computing in civil engineering, 3(1), 18- 32. https://doi.org/10.1061/(ASCE)0887-3801(1989)3:1(18 ) Howel l S. T., Niessner, M., and Yermack, D. (2020). "Initial coin offerings: Financing growth with cryptocurrency token sales." The Review of Financial Studies , 33(9), 3925-3974. https://doi.org/10.1093/rfs/hhz131 Hunhevicz J. J., Brasey, P. -A., Bonanomi, M. M., and Hall, D. (2020). "Blockchain and Smart Contracts for Integrated Project Delivery: Inspiration from the Commons." EPOC 2 020 Working Paper Proceedings. https://doi.org/10.3929/ethz -b-000452056 Hunhevicz J. J., and Hall, D. M. (2020). "Do you need a blockchain in construction? Use case categories and decision framework for DLT design options." Advanced Engineering Informatics , 45, 101094. https://doi.org/10.1016/j.aei.2020.101094 John Mathis F., and Cavinato, J. (2010). "Financing the global supply chain: growing need for management action." Thunderbird International Business Review , 52(6), 467- 474. https://doi.org/10.1002/tie.20373 Kasten J. E. (2020). "Engineering and Manufacturing on the Blockchain: A Systematic Review." IEEE Engineering Management Review , 48(1), 31-47. http://doi.org/10.1109/EMR.2020.2964224 Kifokeris D., an d Koch, C. (2019). "Blockchain in construction logistics: state -of-art, constructability, and the advent of a new digital business model in Sweden." Proc., 2019 European Conference on Computing in Construction . Kifokeris D., and Koch, C. (2020). "A concept ual digital business model for construction logistics consultants, featuring a sociomaterial blockchain solution for integrated economic, material and information flows." Journal of Information Technology in Construction (ITcon) , 25(29), 500-521. doi.org/ https://dx.doi.org/10.36680/j.itcon.2020.029 Law E., Magallanes, T., and Hamledari, H. (2020). "Automated and robotic data capture: streamlining construction monitoring and payments using artifici al intelligence and robotics." Swinerton, Swinerton Le Y., Shan, M., Chan, A. P., and Hu, Y. (2014). "Overview of corruption research in construction." Journal of management in engineering, 30(4), 02514001. https://doi.org/10.1061/(ASCE)ME.1943-5479.0000300 Lee C. (2011). "Litecoin -open source p2p digital currency." Li J., Greenwood, D., and Kassem, M. (2019). "Blockchain in the built environment and construction industry: A systematic review, conceptual models and practical use cases." Automation in Construction, 102, 288-307. https://doi.org/10.1016/j.autcon.2019.02.005 Lo S., and Wang, J. C. (2014). "Bitcoin as money?" Current Po licy Perspectives, 14(4). https://EconPapers.repec.org/RePEc:fip:fedbcq:2014_004 Luo H., Das, M., Wang, J., and Cheng, J. (2019). "Construction payment automation through smart contract -based blockchain framework." Proc., ISARC. Proceedings of the International Symposium on Automation and Robotics in Construction, IAARC Publications, 1254 -1260. Manaa M., Chimienti, M. T., Adachi, M. M., Athanassiou, P., Balteanu, I., Calza, A., Devaney, C., Diaz Fernandez, E., Eser, F., and Ganoulis, I. (2019). "Crypto -Assets: Implications for financial stability, monetary policy, and payments and market infrastructures." ECB Occational Paper , 223. https://ssrn.com/abstract=3391055 Manu E., Ankrah, N., Chinyio, E., and Proverbs, D. (2015). "Trust influencing factors in main contractor and subcontractor relationships during projects." International Journal of Project Management , 33(7), 1495-1508. https://doi.org/10.1016/j.ijproman.2015.06.006 Maria João Ribeirinho, Jan Mischke, Gernot Strube, Erik Sjödin, Jose Luis Blanco, Rob Palter, J., Biörck, David Rockhill, and Andersson, T. (2020). "The next normal in construction: How disruption is reshaping the world’s largest ecosystem."McKinsey & Company. https://www.mckinsey.com/~/media/McKinsey/Industries/Capital%20Projects%20and %20Infrastructure/Our%20Insights/The%20next%20normal%20in%20construction/The -next - normal -in-construction.ashx Mason J. (2017). "Intelligent contracts and the construction industry." Journal of Legal Affairs and Dispute Resolution in Engineering and Construction, 9(3), 04517012. https://doi.org/10.1061/(ASCE)LA.1943-4170.0000233 Mason J., and Escott, H. (2018). "Smar t contracts in construction: views and perceptions of stakeholders." Proc., Proceedings of FIG Conference, FIG. McAndrews J. (1994). "The Automated Clearing House system: moving toward electronic payment." Business Review (Jul), 15 -23. https://core.ac.uk/download/pdf/6648903.pdf McNamara A., and Sepasgozar, S. (2018). "Barriers and drivers of Intelligent Contract implementation in construction." Proc., 42nd AUBEA Conference 2018, article number 0251-7006. Mills D. C., Wang, K., Malone, B., Ravi, A., Marquardt, J., Badev, A. I., Brezinski, T., Fahy, L., Liao, K., and Kargenian, V. (2016). "Distributed ledger technology in payments, clearing, and settlement." FEDS Working Paper No. 2016-095 . http://dx.doi.org/10.17016/FEDS.2016.095 Nakamoto S. (2008). "Bitcoin: A peer -to-peer electronic cash system." https://git.dhimmel.com/bitcoin - whitepaper/v/a5f36b332cb6a5fa9e701886f376ac1ac2946d07/ Narayanan A., Bonneau, J., Felten, E., Miller, A., and Goldfeder, S. (2016). Bitcoin and cryptocurrency technologies: a comprehensive introduction, Princeton Univer sity Press. Narayanan A., and Clark, J. (2017). "Bitcoin's academic pedigree." Communications of the ACM , 60(12), 36-45. https://dl.acm.org/doi/fullHtml/10.1145/3132259 O'Brien W. J., and Fisc her, M. (1993). "Construction supply-chain management: a research framework." Proc., Proceedings of Civil -COMP , 17-19. Odeh A. M., and Battaineh, H. T. (2002). "Causes of construction delay: traditional contracts." International journal of project manageme nt, 20(1), 67-73. https://doi.org/10.1016/S0263- 7863(00)00037-5 Owusu E. K., Chan, A. P., Nani, G., and Agymang, D. Y. (2020). "A Turn to Smart Contracts and Future Applications towards Construc tion Innovation: A Hybrid-Metric Review." Proc., Construction Research Congress 2020: Computer Applications , American Society of Civil Engineers Reston, VA, 246 -257. Penzes B., KirNup, A., Gage, C., Dravai, T., and Colmer, M. (2018). "Blockchain technology in the construction industry: digital transformation for high productivity." Proc., Institution of Civil Engineers (ICE) . Qian X. A., and Papadonikolaki, E. (2020). "Shifting trust in construction supply chains through blockchain technology." Engineering, Construction and Architectural Management . https://doi.org/10.1108/ECAM -12-2019-0676 Rai A., Patnayakuni, R., and Seth, N. (2006). "Firm performance impacts of digitally enabled supply chain integr ation capabilities." MIS quarterly , 225-246. https://doi.org/10.2307/25148729 Rauchs M., Blandin, A., Klein, K., Pieters, G. C., Recanatini, M., and Zhang, B. Z. (2018). "2nd global cryptoasset benchmarking study." http://dx.doi.org/10.2139/ssrn.3306125 Rosenfeld M. (2012). "Ove rview of colored coins." 41. https://bitcoil.co.il/BitcoinX.pdf Salleh R. M., Mustaffa, N. E., and Rahiman, N. A. (2020). "The Adoption of Building Information Modelling and Intelligent Contract to Payment Process in Malaysian Conventional Contract." Journal of Computational and Theoretical Nanoscience , 17(2), 1378-1387. https://doi.org/10.1166/jctn.2020.8814 Sasson E. B., Chiesa, A., Garman, C., Green, M., Miers, I., Tromer, E., and Virza, M. (2014). "Zerocash: Decentralized anonymous payments from bitcoin." Proc., 2014 IEEE Symposium on Security and Privacy, IEEE, 459 -474. Schrepel T. (2019). "Collusion by Bl ockchain and Smart Contracts." Harvard Journal of Law and Technology , 33. http://dx.doi.org/10.2139/ssrn.3315182 Schrepel T., and Buterin, V. (2020). "Blockchain Code as Antitrust." http://dx.doi.org/10.2139/ssrn.3597399 Searle J. R. (1995). The construction of social reality , Simon and Schuster. Sharma M. G., and Kumar, S. (2020). "The Implication of Blockchain as a Disruptive Technology for Constr uction Industry." IIM Kozhikode Society & Management Review , 9(2), 177-188. https://doi.org/10.1177/2277975220932343 Sreckovic M., and Windsperger, J. (2019). "Decentralized Autonomous Organizations and Network Design in AEC: a conceptual framework." Available at SSRN 3576474. http://dx.doi.org/10.2139/ssrn.3576474 Succar B., and Poirier, E. (2020). "Lifecycle information transformation and exchange for delivering and managing digital and physical assets." Automation in Construction, 112, 103090. https://doi.org/10.1016/j.autcon.2020.103090 Swan M. (2015). Blockchain: Blueprint for a new economy, " O'Reilly Media, Inc.". Szabo N. (1994). "Smart contracts." Nick Szabo’s Papers and Concise Tutorials . https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwintersc hool2006/szabo.best.vwh.net/smart.contracts.html Szabo N. (1997). "The idea of smart contracts." Nick Szabo’s Papers and Concise Tutorials , 6. https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwintersc hool2006/szabo.best.vwh.net/s mart_contracts_idea.html Szabo N. (1998). "Secure property titles with owner authority." Nick Szabo’s Papers and Concise Tutorials . https://nakamotoinstitute.org/secure -property-titles/ Szabo N. (2005). "Bit Gold." Nick Szabo’s Papers and Concise Tutorials . https://nakamotoinstitute.org/bit-gold/ Tasca P., Hayes, A., and Liu, S. (2018). "The evolution of the bitcoin economy." The Jou rnal of Risk Finance . https://doi.org/10.1108/JRF-03 -2017- 0059 Tezel A., Papadonikolaki, E., Yitmen, I., and Hilletofth, P. (2020). "Preparing construction supply chains for blockchain technology: An investigation of its potential and future directions." Frontiers of Engineering Management , 1-17. http://doi.org/10.1007/s42524-020-0110- 8 Tian Y., Lu, Z., Adriaens, P., Minchin, R. E., Caithness, A., and Woo, J. (2020). "Finance infrastructure through blockchain-based tokenization." Frontiers of Engineering Management , 1-15. https://d oi.org/10.1007/s42524- 020-0140-2 Tschorsch F., and Scheuermann, B. (2016). "Bitcoin and beyond: A technical survey on decentralized digital currencies." IEEE Communications Surveys & Tutorials, 18(3), 2084-2123. http://doi.org/10.1109/COMST.2016.2535718 Van Saberhagen N. (2013). "CryptoNote v 2.0." https://static.coinpaprika.com/storage/cdn/whitepapers/1611.pdf Vogelsteller F., and Buterin, V. (2015). "ERC -20 token standard." https://eips.ethereum.org/EIPS/eip -20 Westerkamp M., Victor, F., and Küpper, A. (2020). "Tracing manufacturing processes using blockchain- based tok en compositions." Digital Communications and Networks , 6(2), 167- 176. https://doi.org/10.1016/j.dcan.2019.01.007 Wood G. (2014). "Ethereum: A secure decentralised generalised transaction ledger." E thereum project yellow paper , 151(2014), 1 -32. https://gavwood.com/paper.pdf Xiang P., Huo, X., and Shen, L. (2015). "Research on the phenomenon of asymmetric information in construction projects —The case of Ch ina." International journal of project management , 33(3), 589-598. https://doi.org/10.1016/j.ijproman.2014.10.007 Ye X., and König, M. (2020). "Framework for Automated Billing in the Constructi on Industry Using BIM and Smart Contracts." Proc., International Conference on Computing in Civil and Building Engineering, Springer, 824 -838. Ye X., Sigalov, K., and König, M. (2020). "Integrating BIM -and cost -included information container with Blockchain for construction automated payment using billing model and smart contracts." 37th International Symposium on Automation and Robotics in Const ruction (ISARC 2020)
{ "id": "2012.02147" }
2309.12322
The Rise and Fall of Cryptocurrencies: Defining the Economic and Social Values of Blockchain Technologies, assessing the Opportunities, and defining the Financial and Cybersecurity Risks of the Metaverse
This paper contextualises the common queries of "why is crypto crashing?" and "why is crypto down?", the research transcends beyond the frequent market fluctuations to unravel how cryptocurrencies fundamentally work and the step-by-step process on how to create a cryptocurrency. The study examines blockchain technologies and their pivotal role in the evolving Metaverse, shedding light on topics such as how to invest in cryptocurrency, the mechanics behind crypto mining, and strategies to effectively buy and trade cryptocurrencies. Through an interdisciplinary approach, the research transitions from the fundamental principles of fintech investment strategies to the overarching implications of blockchain within the Metaverse. Alongside exploring machine learning potentials in financial sectors and risk assessment methodologies, the study critically assesses whether developed or developing nations are poised to reap greater benefits from these technologies. Moreover, it probes into both enduring and dubious crypto projects, drawing a distinct line between genuine blockchain applications and Ponzi-like schemes. The conclusion resolutely affirms the continuing dominance of blockchain technologies, underlined by a profound exploration of their intrinsic value and a reflective commentary by the author on the potential risks confronting individual investors.
http://arxiv.org/pdf/2309.12322v1
Petar Radanliev
cs.CY, q-fin.CP, q-fin.TR
cs.CY
University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 1 The Rise and Fall of Cryptocurrencies: Defining the Economic and Social Values of Blockchain Technologies, assessing the Opportunities, and defining the Financial and Cybersecurity Risks of the Metaverse. Dr Petar Radanliev Department of Engineering Science, University of Oxford, United Kingdom: petar.radanliev@eng.ox.ac.uk Abstract: The study examines blockchain technologies and their pivotal role in the evolving Metaverse, shedding light on topics such as how to invest in cryptocurrency, the mechanics behind crypto mining, and strategies to effectively buy and trade cryptocurrencies. Through an interdisciplinary approach, the research transitions from the fundamental principles of fintech investment strategies to the overarching implications of blockchain within the Metaverse. Alongside exploring machine learning potentials in financial sector s and risk assessment methodologies, the study critically assesses whether developed or developing nations are poised to reap greater benefits from these technologies. Moreover, it probes into both enduring and dubious crypto projects, drawing a distinct l ine between genuine blockchain applications and Ponzi -like schemes. The conclusion resolutely affirms the continuing dominance of blockchain technologies, underlined by a profound exploration of their intrinsic value and a reflective commentary by the auth or on the potential risks confronting individual investors. Keywords: Blockchain Technologies, Cryptocurrencies, Metaverse, Decentralised Finance (DeFi), Crypto Regulations, Blockchain Standards, Risk, Value. This paper contextualises the common queries of "why is crypto crashing?" and "why is crypto down?", the research transcends beyond the frequent market fluctuations to unravel how cryptocurrencies fundamentally work and the step -by-step process on how to create a cryptocurrency. " " University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 2 Note about the author : Dr Petar Radanliev began his career as a penetration tester for the military and the defence industry. Subsequently, he transitioned to cyber risk management in the finance sector. After a decade in defence and finance, he re -joined the academic realm, obtaining hi s Ph.D., MSc, and BA (Hons) from the University of Wales. Before joining Oxford, Petar undertook postdoctoral research projects at Imperial College London, the University of Cambridge, MIT, and the University of North Carolina. He held positions as a Princ e of Wales Innovation Scholar at the University of Wales and as a Fulbright Scholar at both MIT and the University of North Carolina. His research areas encompass Artificial Intelligence, Generative Pre -trained Transformers (GPT), Cybersecurity, Blockchain Technologies, Cryptocurrencies, and the Internet of Things. Recent research specialisations include the Software Bill of Materials (SBOM) and the Vulnerability Exploitability Exchange (VEX). Funding : This work has been supported by the PETRAS National Cen tre of Excellence for IoT Systems Cybersecurity, which has been funded by the UK EPSRC [under grant number EP/S035362/1]; the Software Sustainability Institute [grant number: EP/S021779/1]; and by the Cisco Research Centre [grant number CG1525381]. Acknowl edgements : Eternal gratitude to the Fulbright Commission. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 3 1. Introduction . In recent years, cryptocurrency has emerged as a significant and often contentious component of the financial landscape. This article delves deep into the complex world of dig ital currencies, clarifying the methods of investing in these volatile assets and the intricate mechanisms of crypto mining vs crypto staking . We explore the various platforms and methodologies for purchasing cryptocurrency, whilst also casting insights on the frequent price fluctuations observed in the market, analysing both the technical and external factors leading to periodic crashes and downturns. To provide a comprehensive understanding, the underlying technology that powers these digital tokens is br oken down, offering insights into the decentralised nature of blockchain -based assets. This study navigate s the steps and challenges involved in creating a new cryptocurrency and guide readers through the intricacies of trading and maximising potential ret urns in the crypto market. This article provides an up -to-date assessment of the current state of cryptocurrencies, examining both their values and associated risks within the realm of blockchain technology. With the exponential growth of over 20,000 crypto projects, the study offers a snapshot of the landscape in 2023, tracing the historical trajectory from Satoshi's ground -breaking paper on decentralised blockchains to the present day. The study clarifies the distinctions between cryptocurrencies and blockchain technologies while exploring pertinent research questions: Is blockchain technology an innovation or an obsolete concept? What significant risks do cryptocurrencies entail? Are the potential societal and economic benefits worth pursuing? In lig ht of the immense growth observed in the crypto market, encompassing over 20,000 projects, this investigation offers a timely snapshot of the landscape in 2023 while providing a historical account from the seminal work of Satoshi on decentralised blockchai ns to the present day. The study objectives extend beyond merely examining values and risks associated with cryptocurrencies; we also aim to delineate the nuances distinguishing cryptocurrencies from blockchain technologies. Guided by a series of research questions, we seek to ascertain the nature of blockchain technology as either an innovation or an outdated concept, identify significant risks posed by cryptocurrencies, evaluate their potential value to society and the economy, and determine which countri es are likely to benefit the most from these technologies. Additionally, we endeavour to shed light on the surviva bility prospects of various blockchain projects, thereby addressing whether the allure surrounding them is hype or a substantial opportunity. While acknowledging the presence of numerous fraudulent crypto ventures, often functioning as Ponzi schemes, our focus p rimarily lies in exploring the genuine use cases of blockchain projects. Ultimately, this research study culminates in a resolute affirmation that blockchain technologies are here to stay, substantiated by an extensive discussion of their intrinsic value. Furthermore, we re-evaluate vital risks, including a personal statement from the author regarding the perils faced by individual investors. 1.1. Historical context This article has been around 13 years in the making. I started writing this article back in 2009 , with the emergence of Bitcoin [1]. The report is influenced by points of view that existed before 2009 and have long been forgotten, such as the fear of Bitcoin University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 4 (BTC) legality, the ethics of decentralised control, and the ‘ethical impact of cryptocurre ncies as morally beneficial, detrimental, and ambiguous’ and the ‘antisocial use for shadow banking and transactions in the ‘dark net’ and cryptocurrencies’ effect on inflation and deflation’ [2]. Although some of these viewpoints have subdued, and crypt ocurrencies are legal to own and operate in many countries, many of these fears remain among early adopters. The article discusses the values and risks of a few selected Blockchain projects based on real- world value and their potential to contribute to the future of society. The main research areas reviewed in this study are included in Figure 1, which also helps visualise the main areas of interest in the year 2023 in the Metaverse concept . Figure 1: Overview of the research topics discussed. 1.2. Historical ov erview of Blockchain technologies The first whitepaper on Bitcoin emerged at the peak of the financial crisis in 2008 [1] and it promoted the idea of a different economic system that is not dependent on a trusted third party. In 2009, the main concern w as the legality of such currencies and projects. Bitcoin was considered a mechanism for criminals and drug dealers to bypass the legal banking system. Between 2020 and 2022, investment in cryptocurrencies (crypto) exploded. Despite the collapse of Terra Lu na, the FTX University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 5 exchange in 2022, and the overall downturn in the market for crypto, crypto investments have continued. Cryptocurrencies, or digital assets, serve as virtual currencies underpinned by cryptography, offering heightened security and privacy meas ures. They often operate decentralised , distinguishing them from traditional forms of money . Notably, a defining characteristic of cryptocurrencies is their purported immunity to governmental or institutional control. However, the validity of this claim is subject to debate, as the potential for a single government, such as the United States, or a dominant institution, like BlackRock, to acquire a controlling stake in a cryptocurrency undermines this principle. It is crucial to recogni se that while Bitcoin remains the most widely recognized cryptocurrency, numerous other cryptocurrencies exist in the market. Cryptocurrencies can facilitate the purchase of goods and services and are actively traded on various online platforms. It is worth noting, however, that none of these platforms are subject to comprehensive regulation. This regulatory vacuum presents a unique opportunity for countries like the UK, which seek to establish their presence internationally , particularly in light of recent challenges stemming from the impacts of Covid -19 and Brexit. One argument for pursuing Cryptocurrencies as a solution to financial risk is ‘that the main indicators to improve financial development should enhance the process of bank lending and equity mark et development’ [3] Second argument is that smart contracts and metaheuristic can help with securing the quality -of-service and even help with the ‘ cost-efficient scheduling of medical -data processing’ [4], which seems of crucial importance for the med ical systems in the UK – after the Covid shock to the National Health Service ( NHS ) [5]–[7]. In summary, pursuing cryptocurrencies as a solution to financial risk is supported by the potential to improve economic development indicators, such as bank lending and equity market development, while simultaneously addressing crucial challenges in the healthcare sector. By harnessing the capabilities of smart contracts and metaheuristic techniques, cryptocurrencies offer opportunities for enhancing the quality-of-service and cost -efficiency of medical data processing, which is of utmost importance for the UK's healthcare systems in the aftermath of the Covid -19 pandemic. These advancements can potentially bring about transformative changes, promoting financi al stability and bolstering the resilience of the healthcare sector. 1.3. Brief History of Cryptocurrencies . Cryptocurrencies (crypto) are digital assets, or more precisely , a set of digital currencies that emerged with the release of Bitcoin in 20091. As of January 2021, there are over 4,000 in circulation, some cryptos with minimal trading volume (or not at all). Cryptocurrencies are traded as digital ‘tokens’ or ‘coins’ on a distributed and decentralised ledger. Bitcoin leads on market capitalisatio n, but other cryptos are trying to break into the market by providing different and improved services to Bitcoin. Some of the other cryptos - also known as ‘altcoins’ , i.e., all cryptocurrencies other than Bitcoin – are used to create a decentralised finan cial system , e.g., 1 https://bitcoin.org/en/ University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 6 Ethereum2, with the ability to handle more transactions , e.g., Dogecoin3, or just use different consensus algorithms , e.g., Cardano4. Cryptocurrencies remain highly volatile, and without central control , a single statement by Elon Mus k has been sufficient to trigger a spike in search trends (as seen in Figure 2) and attract significant interest in news media. Figure 2: Comp arison of search trends on some of the most popular cryptos (data from 2020 – before the last prominent bull run in crypto) Although the search trends can spike about specific cryptos , i.e., Bitcoin and Dogecoin in Figure 2, a dynamic equicorrelation [8] shows a contagious correlation (a mutual relationship or connection) effect between cryptocurrencies (i.e., when Bitcoin crashes, altcoins follow) , and the exact relationship is also connected between Bitcoin and NASDAQ . This disincentivises diversification into multiple cryptocurrencies, but a more robust analysis with a value -at-risk [9]–[13] and expected shortfall must be computed to confirm this. Looking at t he spikes in search trends after the announcement from Elon Musk on Bitcoin purchase and comparing them to the price cap of Bitcoin and Dogecoin, it almost resembles a specific behaviour in crypto markets. The user behaviour in some crypto (e.g., Ethereum ) appears more stable . In contrast, the behaviour of users in Bitcoin seems more speculative, with fluctuations based on market trends, followed by more considerable sell-outs when the market is down [14]. This is not to say that influential people canno t manipulate the stock 2 https://ethereum.org/en/ 3 https://dogecoin.com/ 4 https://cardano.org/ University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 7 market, but the point here is that stock market investors are protected by regulations which don’t yet exist in crypto markets. Figure 3 shows that ‘interest over time’ has generally changed for Bitcoin and Cryptocurrencies – including Altcoins. While the interest in Google Trends for Bitcoin peaked in the 2018 bull run, the interest in cryptocurrencies , as a search trend, has increased (to a new 100%) in the 2021 bull run. Bitcoin: Interest over time – 1st of January 2004 until 7th of March 20 23 Cryptocurrencies: Interest over time – 1st of January 2004 until 7th of March 2023 Figure 3: Interest over time: Bitcoin vs Cryptocurrencies (including Altcoins) Crypto users can be categorised according to their actions and resources , e.g., fortune, hunter, and idealist [15]. Still, the bigger question is, can we classify cryptocurrencies into taxonomies and forecast individual Altcoin categories' future success or failure ? Another important topic discussed in t his article is related to cryptocurrencies , the idea of Central Bank Digital Currencies (CBDCs) [16]–[18], and Friedrich von Hayekʼs theory of private money , which some experts argue could lead to national currencies being replaced by ‘the currency of th e digital platform’ [19]. Another point on centralisation is that even cryptocurrencies that are meant to be very decentralised, such as Ethereum (ETH), and stablecoins , such as UDSC , can be (in reality) very centrali sed and potentially controllable. 1.4. Research questions and structure . The research aims, objectives, questions, and goals motivating this article can be defined in one sentence as the current and future values and risks associated with blockchain projects . The areas of focus encouraging this study include : University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 8 1. To assess the potential of blockchain technology as a catalyst for innovation in future iterations of the internet and Web3 and to determine whether it represents a cutting -edge tech nology or an outdated concept in the context of financial invention . 2. To comprehensively analyse and evaluate the risks associated with cryptocurrencies, including but not limited to market volatility, security vulnerabilities, regulatory challenges, and po tential illicit activities, to understand the risk landscape within financial innovation better . 3. Investigating and identifying the intrinsic values derived from cryptocurrencies, considering their potential impact on financial systems, economic growth, financial inclusion, transaction efficiency, and transparency, thus contributing to understanding their value proposition within financial innovation. 4. Conduct a thorough analysis of different blockchain projects and their underlying technologies to identify critical factors that contribute to their long - term viability and survival in the dynamic landscape of financial innovation, thereby providing insights into the sustainability of blockchain projects. 5. To explore and identify blockchain projects that have the potential to further the development and advancement of already developed countries' financial systems, addressing specific areas such as efficiency, security, transparency, financial inclusion, and regulatory compliance, thus providing valuable insights into the role of blockchain in enhancing financial innovation in advanced economies. 6. To examine and identify blockchain projects that can foster development and progress in developing countries, taking into consideration their unique challenges and needs, including financial inclusion, access to capital, remittances, land registries, supply chain management, and government services, thereby contributing to the understanding of how blockchain can drive financial innovation in developing economies. 7. To critica lly evaluate the feasibility and implications of regulating cryptocurrencies and blockchain projects, including both national and international regulatory frameworks, to assess the potential benefits, challenges, and trade -offs associated with effective re gulation in the context of financial innovation. This research objective seeks to contribute to the ongoing discourse on appropriate regulatory approaches for cryptocurrencies and blockchain technology. The article follows a traditional (standard) structure , starting with chapter one (1) Introduction, chapter two ( 2) Methodology, then (3) the research engages with a Case study review of secondary data sources , and compliments the case study with a new chapter ( 4) that comprises a s urvey r eview . The article ends with a chapter ( 5) discussion and (6) Conclusion. 1.5. Crypto regulations . Given that the US has already started crafting new regulations on cryptocurrencies [16] and after the markets collapsed in 2022 , the European Union also started catching up with rules [20] the UK recently started initial consultation plans to regulate cryptocurrencies [20]. It is difficult to determine if the proposed methods are positive or negative . Still, the consultation generally builds upon previous HM University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 9 Treasury proposals on stablecoins . If the plan is to develop a UK stablecoin (USD and GBR), the talk could prove positive for ensuring stability in cryptocurrency markets. However, the proposed regulation sugg ests that cryptocurrenc ies should be overseen by the Financial Conduct Authority (FCA), and not all crypto is just a simple cryptocurrency . Ethereum (for example) is a virtual computer and can perform far more tasks than just transact payments. The consult ation also suggests that all UK- based cryptocurrency firms should have anti -money laundering and KYC processes . This can be managed in the UK, but the regulation ignores that cryptocurrencies are designed to bypass such rules . The effectiveness of this reg ulation remains questionable , but it could help stabilise and legalise the trade of cryptocurrencies in the UK . In other words, these regulations could apply to large companies compliant with many different rules. Still, it’s difficult to see how such laws would prevent money laundering on non-UK-based cryptocurrency firms. 1.6. Structure and novelty of the research study This study offers a multifaceted exploration of blockchain technologies, investigating their economic, social, and wider implications within the Metaverse. The research highlights key themes from blockchain's impact across sectors to the fintech revolution . Contrasting with existing literature, this work broadens the discussion from the mechanics of cryptocurrency trading to the wider ramifications of blockchain, emphasising its financial and cybersecurity risks. The novelty of the research is further under scored by its interdisciplinary approach, merging the fundamental principles of fintech investment strategies, blockchain, and the metaverse. Such a comprehensive perspective positions this study uniquely, complementing and enriching the current academic d iscourse on cryptocurrency trading, machine learning potentials in financial sectors, and financial risk assessment methodologies. The research not only provides insights into the evolving digital landscape but also sets a new benchmark for future investig ations at the crossroads of finance, technology, and societal constructs. Then, the study investigates whether developed or developing countries stand to gain more from these technologies and which blockchain projects are likely to endure in the long term. This review acknowledges the prevalence of dubious crypto projects, delving into the realm of Ponzi schemes yet ultimately shifting the focus towards the practical applications of blockchain projects. The study concludes with a resolute assertion that blo ckchain technologies are here to stay, supported by a comprehensive discussion of their inherent value. Moreover, the article reassesses critical risks, including a personal reflection from the author on the potential risks’ individual investors face. 2. Meth odology . In this article, we present a robust research methodology, employing a combination of the case study method, survey review, and literature review to delve into the dynamic realm of financial innovation and its social implications. Drawing inspirat ion from established and time -tested guidelines such as Eisenhardt's 'Building Theories from Case Study Research' [21], Yin's recommendations on case study research, design, and methods [23], and the principles of Grounded theory [22], and the Grounded theory [23]–[25] Figure 4, provides a visual representation of the University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 10 structured methodology, delineating areas of interest and focus. Our research methodology is thoughtfully divided into a dual emphasis on economic and social values. Recognising that assessing values, risks, and impact extends beyond purely economic metric s, we aim to elucidate the interplay between financial and social considerations. A prominent concern driving the exploration of Web3 arises from the challenges posed by Web2, particularly regarding diminishing personal privacy. Web2 sceptics advocate for a transition to Web3 not solely for its decentralised financial framework but also for its potential to enhance individual privacy. Embracing Blockchain technologies in the Web3 design, along with the integration of virtual and augmented (mixed) reality in education, fosters opportunities for improved personal privacy, decentralised social media, and global community building of like -minded individuals. By adopting this methodological approach, we aspire to offer a coherent and understandable analysis of th e intricate landscape of financial innovation, elucidating the role of Web3 in addressing critical issues and shaping the future of finance, privacy, and social interactions. Through a multidimensional lens, we aim to contribute valuable insights into the potential benefits and challenges of embracing Web3, shedding light on its transformative impact on the digital landscape. Figure 4: The case study method and the study objectives Since the initial search on the Web of Science and Scopus didn’t result in many records on the topics discussed in Figure 4, the search was expanded into a broader University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 11 review of Google Scholar, IEEE, and other libraries. Although the initial stages focused on new technologies , the study expanded into the literature on ethics , trading, gambling, decentralised finance, and the Metaverse after the initial search . 2.1. Data sources . The primary data collection included 20 case study interviews and three workshops. The secondary data collection included n ew and emerging forms of data (NEFD) that present new records of value in IoT-based intelligent contracts, including open data – (e.g., Open Data Institute); spatiotemporal data; high -dimensional data; time - stamped data; real -time data and big data. To ana lyse NEFD, t he data collection strategy in this article applied stratified sampling and random sampling for comparative analysis of collected NEFD. 2.2. Contextualising this study with the existing body of literature This section is focused on contextualisatio n of the findings and the novelty of the work in this study. This section compares the differences and similarities, including the findings and novelty, of this work, with eight articles closely related to the research area investigated in this study. This study started with a systematic review of existing studies that used data recor ds obtained from the Web of Science Core Collection [26], focusing on the broad landscape of blockchain's impact across sectors, highlighting key themes from economic benefits to the fintech revolution. Within this body of literature, this study on "The Rise and Fall of Cryptocurrencies" offers a complex and interesting exploration, delving deep into the intricacies of cryptocurrency and the broader implications in the metaverse. This article not only complements the identified themes but goes a step furt her by elucidating the financial and cybersecurity risks associated with blockchain technologies. This in -depth focus on the metaverse and its associated challenges underlines the novelty of this work, positioning it as a pivotal piece that bridges gaps in the current literature and offers fresh insights into the evolving digital realm. This study delves into the intricacies of blockchain technologies, highlighting their economic and social values while scrutinising opportunities and risks inherent to the metaverse. In juxtaposition to the comprehensive survey on cryptocurrency trading by Fan Fang et al., [27] this work holds significance. While Fang and colleagues extensively map out the landscape of cryptocurrency trading, from sentiment -based research t o the public nature of blockchain technology, our study on exploration underscores broader implications, particularly in relation to the metaverse's opportunities and challenges. This positions this new article uniquely, as it extends the dialogue beyond t he mechanics of trading to the ramifications of blockchain technologies in shaping our digital futures. This new investigation into the metaverse, an area not deeply touched upon by Fang et al., accentuates the novelty and contemporaneity of this research, presenting a holistic view that complements and augments existing literature. In the broader discourse surrounding the implications of cryptocurrencies, this study delineates the multi -dimensional societal and economic repercussions of blockchain innovat ions, setting an expansive stage to understand their systemic influences. By University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 12 contrast, the research on "Forecasting and trading cryptocurrencies with machine learning under changing market conditions" [28] offers a deep dive into the predictive and profi t-centric paradigms of these digital assets, specifically focusing on machine learning's applicability in this domain. The convergence of these studies is particularly enlightening. While the former casts a wide net, encompassing the multifaceted socio -economic interplays and the emergent realm of the metaverse, the latter drills down, examining the nuances of cryptocurrency trading amidst volatile market conditions. The overarching narrative of "The Rise and Fall of Cryptocurrencies," when viewed in tandem with the in -depth findings on ML's potential and challenges in deciphering cryptocurrency markets, offers a synergistic understanding. It enriches the academic conversation, providing a holistic and multi - layered exploration of the cryptocurrency ecosyste m, from its foundational technologies to the Metaversal futures they portend. In the contemporary milieu of group decision -making processes, the study titled "Soft consensus cost models for group decision -making and economic interpretations" [29]provide s a robust foundation for understanding the nuances and costs of consensus -building among experts. This work unravels the complexity of striking a balance between achieving consensus and incurring associated costs with the introduction of the novel concept of soft minimum cost consensus. Their findings not only advance previous models but also delve into the economic underpinnings of such consensus mechanisms. Within this context, this study on "The Rise and Fall of Cryptocurrencies" emerges as a novel cont ribution to the discourse. This investigation transcends the traditional realms of consensus -building in decision - making contexts and dives deep into the multifaceted world of cryptocurrencies and the burgeoning metaverse. It not only seeks to define the i ntrinsic economic and social values underpinning blockchain technologies but also aspires to critically assess the opportunities and challenges presented by the metaverse. The novelty of this work lies in its ability to contextualise and intertwine the fou ndational principles of consensus models, as observed in the prior study, with the intricate dynamics of blockchain technologies. By comparing the core tenets of group decision -making and the rapidly evolving world of digital assets, this study offers fres h insights and sets a new precedent for interdisciplinary research in this domain. In the dynamic world of financial technology, the pivotal research "Fintech investments in European banks: a hybrid IT2 fuzzy multidimensional decision - making approach" [30] pedantically evaluates the essence of Fintech investments in European banking services, elucidating key criteria and offering indispensable insights into optimal investment alternatives. Notably, the emphasis on payment and money -transferring systems a s paramount Fintech investment alternatives presents a foundational benchmark in the industry. Within this rich tapestry of Fintech investigations, "The Rise and Fall of Cryptocurrencies: Defining the Economic and Social Values of Blockchain Technologies a nd Assessing the Opportunities, and Risks of the Metaverse" offers an innovative and integrative exploration of blockchain technologies and their interplay with the metaverse. By seamlessly weaving the threads of cryptocurrencies' economic and social value s, this research transcends the conventional boundaries of financial technology discussions and ventures into the evolving realms of the Metaverse. The novelty of this study is underscored by its University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 13 multidisciplinary approach, integrating the core tenets of Fintech investment strategies with the multifaceted nuances of blockchain and the metaverse. In doing so, it not only complements existing works but also carves a distinct niche in contemporary financial and technological scholarship, presenting fresh vistas and research trajectories in the interplay of Fintech, blockchain, and virtual realms. In comparison with the research on the "Integrated Cluster Detection, Optimization, and Interpretation Approach for Financial Data," [31] which concentrat es on the identification and interpretation of clusters within financial data to enhance decision - making processes, this study on cryptocurrencies offers a broader perspective. Where the former employs sophisticated methodologies to discern patterns in vas t financial datasets, emphasising adaptivity, speed, and interpretability, our exploration into the realm of cryptocurrencies and the metaverse endeavours to contextualise these innovations within the larger socio -economic canvas. The novelty of our invest igation lies in its interdisciplinary approach, bridging the gaps between finance, technology, and social constructs and presenting a holistic understanding of the current digital transformation. Thus, while the study offers invaluable tools for immediate financial data interpretation, our research equips readers with a comprehensive understanding of the evolving landscape of blockchain technologies and the metaverse, forecasting potential trajectories and their implications on our collective future. This study casts a discerning eye on the emergent dynamics of blockchain technologies, pivoting on their socio -economic implications and the opportunities and risks they introduce in the digital realm of the metaverse. When compared with the study titled " Machine Learning Methods for Systemic Risk Analysis in Financial Sectors," [32] which delves into the potent intersections of machine learning and systemic risk within the financial sphere, our research offers a more expansive vista, encompassing not jus t the financial but also the societal reverberations of digital currencies and virtual spaces. While the referenced article meticulously maps the deployment of machine learning techniques in gauging financial systemic risk, underscoring the power of big da ta, network, and sentiment analyses in this quest, our study pivots on the broader implications and trajectory of blockchain and the metaverse. The novelty of our research resides in its comprehensive purview, encapsulating not just financial but also soci o-cultural and technological dimensions. While the surveyed work offers invaluable insights into the detection and modulation of systemic risks through machine learning, our article contextualises cryptocurrencies and the metaverse within the evolving tape stry of our digital age, seeking to foretell and shape the contours of this transformation. For a final contextualisation of the findings and novelty of the work in this study, we need to emphasise that in this study, the multifaceted impacts, and prospect s of blockchain technologies, with a particular focus on cryptocurrencies, are scrutinised within both socio -economic dimensions and the expanding horizon of the metaverse. Contextualising this work against the study titled "Evaluation of clustering algori thms for financial risk analysis using MCDM methods," [33] which meticulously dissects the application of multiple criteria decision -making methods in ranking clustering algorithms for financial risk analyses reveals notable distinctions. While the latte r delves deep into the computational methodologies employed to enhance precision in University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 14 financial risk evaluation, our investigation spans a broader spectrum, exploring the underpinnings of blockchain's socio -economic repercussions and the metaverse's potentia l. The innovative aspect of our work lies in its amalgamation of technological, financial, and social dynamics within the realm of cryptocurrencies and the Metaverse. Conversely, the compared article offers a deep technical dive into the optimisation of cl ustering algorithms for targeted financial outcomes. In essence, while both pieces contribute valuably to the discourse on financial systems and risk, they illuminate different facets — one the technical intricacies and the other a comprehensive socio -econo mic and technological panorama. 3. Academic literature review . Decentralised finance is at present isolated to Blockchain projects . Still, most of the existing financial instruments can be transferred into an alternative economic infrastructure with the help of Blockchain Oracles [34]. Decentralised finance transactions can be cleaner than traditional finance and support ‘local climate adaptation planning and implementation’ [35]. This was a natural progression, given that digital finance and renewable energy consumption have already been studied for economic growth and technological progress, with evidence from China [36]. Blockchain and digital finance have also been the subject of other studies [38]. Especially the ‘risk of blockchain technology in Internet finance supported by wireless network’ [37]. It has been almost half a decade since the Blockchain was suggested as the new ‘secure, decentralised , trusted cyber infrastruc ture solution for future energy systems' [38]. One of the solutions proposed in 2019 was the new concept for improving industry with private capital in China, with renewables finance and investment [39]. However, these concepts are not immune to the earlier problems related to ‘the governance of local infrastructure funding and financing’ [40], especially the role of mitigating the effect of the recession. As the authors stated in 2015, ‘austerity and th e fiscal consolidation of public finances have reinforced government efforts to reduce expenditure and debt, and secure private sector engagement and resources [40]. Blockchain values are also studied in decentralised electricity access developed with private investment as a sustainable development finance business model [41]. There are various platforms for decentralised autonomous organisations [42], even in just one of the existing blockchain s, such as Ethereum. Many new Blockchains , such as Algora nd, Cardano, Solana, and Avalanche, are emerging daily . The most interesting are the new Blockchains with cross -chain operability, such as Cosmo, Polkadot, and Chainlink. There are also numerous ‘automated market makers and decentralised exchanges’ [43], some even for cryptocurrency trading [44]. The question is, do the new regulations ‘provide legal certainty’ [45]? The proper form of decentralised finance will alway s be based on private investment . Still, solid regulations and guidance also support centralisation in financial instruments. Before transferring traditional instruments into a new system, we must analyse ‘ the return –volume relationship in decentralised fi nance ’ [46]. Although decentralised banking is not an entirely accepted model yet, even in the present University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 15 adoption stage , digital banks ‘can learn from decentralised finance’ [47]. The European Union has recently advanced into new Blockchain regulations based on the ‘Regulation on Market in Crypto -Assets' and 'Decentralised Finance - MiCA’ [48]. The United States has also produced new regulations [16], [17], [49] , and the United Kingdom is slowly catching up [20]. However, the countries that can benefit the most from new financial instruments are not the EU, the US, and the UK. Developing African countries have been very flexible in adopting Blockchain projects, as recorded in the recent study on ‘Decentralised Finance and Cryptocurrency Activity in Africa’ [50]. The values from Blockchain projects and new Metaverses do not have to be purely financial . For example, Blockchain projects have been ‘empowering school -based managem ent through decentralised financial control’ since 2008 [51]. Despite these best efforts, even in 2023, we are still working on the ‘conceptualisation and outlook’ of ‘decentralised finance platform ecosystems’ [52]. This is predominately because Blockchain projects, and decentralised finance , have been advancing and developing in various areas . One example is creating an asset - backed decentralised finance instrument for food supply chains in the livestock export industry [53]. Another ex ample is the ‘decentralisation on health -related equity ’ for the ‘decentralised governance of health care ’ [54]. The most critical example is from the Monetary and Economic Department , which discusses the ‘potential benefits and challenges of the new sys tem and presents a comparison to the traditional system of financial intermediation’ [55]. This signals that decentralised finance is becoming a mainstream topic. 4. Case Study Review : Case studies of existing Blockchain solutions. 4.1. Blockchain 3.0 and Web 3.0 Blockchain technology, initially introduced through Bitcoin, combines cryptography with distributed computing, both of which have existed for several decades. Blockchain 1.0 repre sents a distributed secure database where a network of computers collaborates and shares data. In this architecture, individual computers, acting as network nodes, validate transactions and propagate them to other network nodes, creating a blockchain . Blockchain relies on a distributed consensus algorithm, requiring agreement among different nodes before any alteration can be made. The interdependence of blocks is achieved through hash values, making it virtually impossible to delete a block without affecti ng the entire chain. The evolution of blockchain technology has led to Blockchain 2.0, exemplified by Ethereum, which introduces the capability to execute any computer code on the system, essentially creating a distributed virtual computer. This advancemen t opens the doors to various applications, envisioning a decentralised Turing -complete virtual machine. Blockchain 2.0 enables the creation of decentralised ledgers for asset registries, encompassing physical and intangible assets, such as property, curren cies, patents, votes, identity, and healthcare data. It replaces the need for multiple private databases with a shared, trusted database accessible by all relevant University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 16 parties. The immutability of data stored on a blockchain enhances its credibility, as it is incredibly challenging to alter or corrupt. Despite the potential of existing blockchain solutions, they are often considered inefficient and face scalability issues, leading to the emergence of the third generation, Blockchain 3.0. Prominent examples of t his generation include IOTA and Dfinity. Blockchain 3.0 introduces "The Distributed Cloud," a pivotal infrastructure supporting the development of the next generation of the internet, also known as Web 3.0 or the decentralised web. A broader ecosystem of t echnologies is required, including advanced web data analytics and the Internet of Things (IoT). This integration of technologies enables the storage and analysis of vast amounts of sensitive data, unlocking new value and insights through cross -correlation s from diverse IoT data sources integrated into the blockchain. The actual value of IoT data lies not in making individual devices or systems bright , but in enabling seamless processes across domains, organisations , and procedures . This necessitates open n etworks capable of communicating and coordinating components on demand. Blockchain 3.0 and Web 3.0 mark a paradigm shift from ownership to "Servitization," where assets are used as services rather than owned outright. This shift requires the establishment of frictionless markets and automated exchanges, with the blockchain acting as the trust machine, ensuring secure and transparent transactions. In summary, the case study review demonstrates the evolution of blockchain technology from its initial implement ation in Bitcoin (Blockchain 1.0) to Ethereum and other platforms (Blockchain 2.0) and the ongoing development of Blockchain 3.0 solutions. These advancements present new opportunities for decentralisation , enhanced data analytics, and the integration of I oT, culminating in Web 3.0. By embracing these technologies, we can transition towards a future where assets are utilised as services, supported by seamless processes and trust -enabled exchanges facilitated by the blockchain. 4.2. IoT-based Blockchain solutions . The Internet -of-Things (IoT) is already used in Blockchain 3.0 as an open -source distributed ledger (e.g., IOTA, NEO, EOS) and has presented many unique alternatives for storing transactions with a potential for higher scalability (by using Tangle) over Blockchain 1.0 based distributed ledgers (such as Bitcoin). However, the interest in some of the early crypto projects seems to be dying down. In Figure 5 we can see the main research interest from the pre -2018 bull run . University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 17 Figure 5: Trends in interest for early (pre -2018) crypto projects vs interest in cryptocurrencies in general. One solution that seems to be under consideration is to rename existing projects (e.g., NEO is renamed to N3 – with a promise of a better Blockchain)5. IOTA is keeping its name but evolving into a new blockchain called Crysalis6. Although the idea of IoT-based crypto is undeni ably valuable, further research is required to determine how IoT technologies would resolve the main problem of Blockchain 1.0, namely the (i) speed of transactions , and the (ii) security risk from quantum computers [56]–[62]. For the first part of the objective, the IOTA project can process around 500 -800 transactions per second. Many faster blockchains like Solana can process 50,000 transactions per second. However, Solana and other Blockchain 2.0 are run by validators or en tirely by volunteers . In other words, random people making impossible to guarantee that the network is altogether reliable. IOTA and other Blockchain 3.0 technologies are run by IoT systems, which can be considered reliable if the devices are secure. Secur ity and reliability are necessary for technological adoption in critical infrastructure, and NHS supply chains can benefit from improved security that comes with Blockchain technologies . Still, scalability is a significant concern for the adoption of Block chain 1.0. In other words, at present, Blockchain 1.0 can process up to seven cryptographic hash function computations per second and has a confirmation time of 15 minutes. In comparison, Visa processes around 1,700 transactions per second on average (base d on a calculation derived from the official claim of over 150 million daily transactions ). The potential for Blockchain adoption is there but is currently bottlenecked by scalability. Another obstacle to the adoption of blockchain is the energy demand and the cost (fees). Most Blockchain 1.0 (Bitcoin) and 2.0 (Ethereum) come with heavy fees, while Blockchain 3.0 (e.g., IOTA) can have zero fees. Zero fees are possible because IoT devices can communicate autonomously and send verified messages, enabling full automation of decentralised crypto, and future versions can make nano payments possible. The main problem with IoT Blockchains is the security of IoT devices. Until 5 https://neo.org/ 6 https://chrysalis.iota.org/status University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 18 these devices are secure, it is difficult to see mass adoption of IoT-based crypto. The IOTA project has been in the cryptocurrency markets for a long time (in crypto terms) and still hasn’t picked up in price or mass adoption. 4.3. IoT for healthcare . The increased adoption of IoT in health services seems inevitable [63]–[68] because IoT offers increased efficiency at a reduced amount of time spent, which appears to be what the NHS needs , but the value of the low cost of IoT comes at risk [69]–[71]. To reduce costs and provide the required support , the NHS must automate some essential data collection and monitoring, freeing skilled staff to focus on patient safety and patient service. This IoT automation in national critical infrastructure must come with increased (or at least matched) security to the traditional legacy IT systems [72]–[74], and there are various solutions for improved cybersecurity [75]– [81]. One of the leading crypto projects that could benefit NHS is the ‘VeChain’ project, which resolves many of the existing supply chain issues [82]–[123] , especially the software supply chain, which has many areas of current work, including the Software Bill of Materials (SBOM) [124] –[128] , the Vulnerability Exploitability Exchange (VEX) [129] –[131] , and many other research efforts. The ‘VeChain ’ project addresses many of these long-standing areas of concern and is already operational . Still , it would be interesting to have even more automated, machine -controlled supply chains in the future. For that, we have a very different set of Blockchain so lutions – based on IoT systems [97], [132] –[138] . Using existing IoT Blockchain solutions in the NHS -specific requirements, multiple healthcare functions can be performed simultaneously . The main concern is the lack of interoperability. Designing specific solitons individually and rolling out such solutions piecemeal could result in a lack of interoperability between one NHS trust and another, or even one hospital and another in the same trust. The expected outcome of su ch blockchain solutions is an interoperable of-the-shelf solution explicitly tested for compatibility with existing NHS systems. In addition, by using established IoT Blockchains solutions, the expected outcomes are resolutions to some challenging philoso phical questions around the use of IoT in NHS, such as issues around data ownership. Since IoT Blockchains operate as decentralised systems, with cryptographic hashing of data in blocks, this will resolve whether the data belongs to patients, the NHS, and the technology providers. By storing personal data in Blockchain Cloud solutions, such as the NuNet Cloud, a centralised authority won't own the data , and sharing of the data, or alternative uses and analysis, could only be achieved by a consensus of the B lockchain validator nodes. Depending on what Blockchain is used, this could be many validator nodes. 4.4. Decentralised finance – DeFi . Decentralised finance (DeFi) is built upon automated protocols that offer financial services. DeFi solutions bring numerous advantages compared to traditional finance, including faster transaction speeds, improved transparency, interoperability, and immutability. However, these strengths also give rise to specific weaknesses. In other sections of this review, we explore the cha llenges of ensuring compliance with University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 19 anti-money laundering processes when conducting cross -border transactions at high speeds. The rapid pace of DeFi operations often comes at the expense of non - compliance . Although this issue is expected to be resolved in the future, it poses a significant hurdle for widespread adoption, particularly on a national level, as observed in the case of El Salvador. In 2023, several significant DeFi protocols have emerged, such as Aave, Compound, Curve Finance, Synthetix, PancakeSwap, Kyber Network, Uniswap, and others. While new protocols are gaining momentum, Uniswap remains the most popular decentralised exchange. The collapse of centralised exchanges, including FTX, has created new market potential for decentralised exchanges. Nevertheless, questions persist regarding the level of decentralisation achieved by some of these platforms. As DeFi continues to evolve, striking a balance between speed, compliance, and decentralisation becomes crucial for sustainable growth. Overcoming the challenges associated with regulatory compliance will facilitate the broader adoption and integration of DeFi into existing financial systems. Addressing concerns about the degree of decentralisation within decentralised exchanges will foster greater trust and confidence among users. By navigating these complexities, the DeFi ecosystem can unlock its full pot ential and reshape the accessibility of financial services, empowering individuals worldwide with greater financial inclusivity and autonomy. 4.5. Centralised exchanges . Centralised exchanges faced significant challenges in 2022, and without comprehensive regul atory oversight, they appear poised to repeat past mistakes. While surviving centralised exchanges like Binance, Coinbase, Kraken, and KuCoin, among others, claim to adhere to compliance standards, the absence of effective oversight is evident, with limite d exceptions in the United States, Australia, and New Zealand. In Australia and New Zealand, certain major exchanges are subject to regulatory measures that encompass ATO (Australian Taxation Office) and AML (Anti-Money Laundering) compliance, as well as K YC (Know Your Customer) protocols. Coinbase in the United States operates under a similar regulatory framework. However, the effectiveness of such compliance measures warrants further examination in a separate article. In this piece, we focus on the level of compliance necessary for crypto assets to be fully compliant. The issue of partial compliance can be perplexing, as classifying inherently risky assets as compliant creates opportunities for fund managers to include these assets within seemingly secure financial products, such as pension funds. This scenario raises concerns about a potential future parallel to the subprime mortgage crisis 2008. Thus, it is crucial to thoroughly assess and understand the actual compliance status of crypto assets to avoid misleading categorisations that may inadvertently contribute to the creation of unstable financial products. Implementing robust regulatory measures and ensuring effective oversight are imperative steps towards fostering transparency and safeguarding inves tors' interests within the cryptocurrency landscape. Striking a balance between innovation and regulation will be critical in building a sustainable and resilient financial ecosystem that mitigates risks and instils confidence among market participants. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 20 4.6. Layer 1s and 2s , Non-Fungible Tokens (NFTs), and the Metaverse s. Blockchains such as Bitcoin and Ethereum are called Layer 1 in decentralised terminology . Alongside these Blockchains, there are Layer 2 protocols that can be utilised in conjunction, enhancing the capabilities of the underlying Blockchain. Examples of Layer 2 protocols include Arbitrum and Optimism. Within the Metaverse landscape, many platf orms operate as Layer 2 protocols built upon existing Blockchains. For instance, Decentraland (MANA), ApeCoin (APE), Axie Infinity (AXS), the Sandbox (SAND), Enjin Coin (ENJ), Gala (GALA), Render (RNDR), and Metahero (HERO) are all powered by the Ethereum (ETH) blockchain. Theta (THETA) initially started as an ERC -20 token but subsequently transitioned to its native THETA token. Theta utilises two tokens: THETA for governance and TFUEL for utility. Stacks (STX) is one of the few layer -1 blockchains in the M etaverse ecosystem. Non-Fungible Tokens (NFTs) represent unique pieces of art, digital content, or media within the Metaverse. These tokens enable trading and serve as a means of storing value. However, it is essential to note that not all NFTs have proven to possess the anticipated value that some investors had hoped for. To summarise the information presented: Blockchain/Protocol Layer Type Notable Tokens Bitcoin Layer 1 - Ethereum Layer 1 MANA, APE, AXS, SAND, ENJ, GALA, RNDR, HERO Arbitrum Layer 2 - Optimism Layer 2 - Theta Layer 1 THETA (governance), TFUEL (utility) Stacks Layer 1 STX The Metaverse ecosystem encompasses a diverse range of blockchains, protocols, and tokens, providing unique opportunities for participation and engagement within virtual environments. 4.7. Crypto Bridges and Oracles . Blockchain bridges enable the movement of assets from one Layer 1 to another Layer 1 or from Layer 1 to Layer 2 and the reverse. Some of the most famous bridges in 2023 include Hop Exchange, Orbiter, Rango Exchange, cBridge , xPollinate, AllBridge, and many others . Many of the major hacks that resulted in a significant loss of Crypto in 2022 were based on cyber -attacks on Crypto bridges. While Bridges resolve interoperability issues across chains , Oracles (such as University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 21 Chainlink) enable cross -chain communication and intelligent contracts to execute on different Blockchains. 4.8. Crypto Wallets . Cryptocurrency digital wallets can be classified into three main categories. The first category comprises safe storage tricky wallets, where cryptocurrencie s are securely stored on a personal device. Examples of such wallets include Ledger and Trezor. The second category consists of hot wallets, such as Metamask and TrustWallet, software -based wallets typically accessed through internet -connected devices. Lastly, there are exchange wallets, such as Coinbase Wallet, provided by Centralised exchanges. Considering the recent collapses of Centralised exchanges, it becomes challenging to understand why individuals still choose to store their cryptocurrencies in exchange wallets. Users may prefer the convenience of having someone else manage the day - to-day operations of their savings and finances. Howev er, this reliance on Centralised exchanges highlights the importance of implementing robust regulations to ensure the security and integrity of these platforms. To summarise the information presented: Wallet Type Examples Safe Storage Ledger, Trezor Hot Wallet Metamask, TrustWallet Exchange Wallet Coinbase Wallet Classifying cryptocurrency wallets into these categories provides users with various options to suit their preferences for security, accessibility, and management of their digital assets. It is crucial to weigh the advantages and risks associated with each type of wallet to make informed decisions regarding the storage and protection of cryptocurrencies. 5. Lessons to be learned from the past errors: the two Cases of FTX and Terra Luna FTX was a centralised cryptocurrency exchange, providing crypto derivatives and leverage trading services . Still, the primary use for centralised exchanges is to enable customers to buy and exchange different cryptocurrencies. The main problems resulting from the collapse of FTX also apply to all other centralised cryptocurrency exchanges currently in operation. Cryptocurrency exchanges are not regulated, which leads to individuals taking risks without the approval of the asset owners , which is an oversimplified description of why centralised cryptocurrency exchanges should not be allowed to operate without regulations. Individual savers are not always keen on keeping their assets on a USB drive or writing the private keys on a piece of p aper, which , if lost, would result in the loss of their savings. Hence, many small crypto savers use centralised cryptocurrency exchanges (such University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 22 as FTX) to store their crypto savings and earn interest – similarly to the traditional banking system. Despite a ll the warning signs, individual savers are still locking their crypto savings in unregulated centralised exchanges. This presents three options to the UK government and all other governments worldwide . 1. The first is to create standards and regulations fo r cryptocurrencies because as of today (08 Jan 2023), we have 22,228 different cryptos (i.e., crypto projects) and 534 crypto exchanges, with a market cap of $824,468,428,103 and 24h trade volume of $16,374,071,351 [139] . None of the trades are regulated in the UK, nor most other countries. 2. The second is to ban all use of cryptocurrencies, including ownership and trading, but this is unlikely to be effective because most crypto projects are run from outside of the UK, and some (e.g., Bitcoin) are decentralised. Hence, even if a global task force could be created to track and trace cryptocurrency projects and exchanges, it would be ineffective against decentralised crypto and will only push trade and ownership into the dark econ omy. In addition, it is unlikely that the legal mechanisms can cope with persecuting all cryptocurrency projects and exchanges because , as we can see from the case of the XRP legal proceedings, just one point can take years to resolve. The US Government ha s proven that it can effectively ban crypto projects . In August 2022, the U.S. Treasury sanctioned the virtual currency mixer Tornado Cash [140] . The Tornado Cash DAO was shut down , and its lead developer Aleksey Pertsev was arrested, but what this trans lates to is that the mixer's code itself is banned for use, and it does not mean that the code has been disabled and cannot be used. It means that the Tornado Cash U.S. crypto customers are not allowed to use the mixer, at least not without permission from the U.S. Treasury. The mixer is blacklisted in the US because of its use in money laundering. However, the Tornado Cash app will continue to operate on the Ethereum blockchain exists . The critical point is that it is impossible to shut down such technolog y without shutting down the entire Blockchain. Since some Blockchains are decentralised, this will prove difficult, and even, if possible, many new Blockchains are constantly emerging . Hence, sanctioning and banning are unlikely to be valid for completely closing all operations. 3. The third option is to create fully centralised Government run Blockchains, upon which open crypto projects and exchanges can be built. In this scenario, Governments could control the type of projects and impose regulations and standards upon the developers and the user community. In such fully centralised Blockchains, the government could allow the development of centralised and decentralised crypto exchanges and fund or encourage the development of CBDCs (Central Bank Digital Curr encies) and regulated Stablecoins (cryptocurrency with a pegged value to another currency, commodity, or financial instrument). By enabling the development of a fully regulated Stablecoin, the UK Government would prevent one of the main risks for individua l crypto savers : the collapse of another Stablecoin , which happened to the UST Algorithmic Stablecoin in 2022. Many of the current stablecoins are highly speculative, and at present most stablecoins are not University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 23 audited or regulated – at least not in any meanin gful way. Although Tether (USDT) has announced that it is preparing to be audited by a large accounting firm to prove the transparency of Tether, at present , USDT market reserves are not audited . As of today, Tether's market cap is $66,268,895,618. Around $11,106,992,770 of the cryptocurrency stablecoins traded in the last 24 hours alone. Tether (USDT) is just one of many stablecoins on the many current crypto exchanges . In the top 10 cryptocurrencies by market cap, apart from USDT, we also have the USDC (m arket cap of $43,922,152,193) and BUSD (market cap of $16,377,185,225) . 4. In contrast, in 11th place , we have DAI (market cap of $5,790,436,026) . In the 41st place , we have USDP (market cap of $876,254,775) . On the 43rd place is TUSD (market cap of $846,271, 617), in the 52nd place is USDD (market cap of $707,743,989) and so on – data from the 8th of January 2023 [139] . From the above -listed stablecoins, USDC has reserves regularly attested but not audited . None of the stablecoins are audited. This creates a systemic risk for all cryptocurrencies , and regulating the stablecoins will not only prevent future loss of savings for individual users and savers (hodlers), but it would increase the confidence in the market . Combined with a regulated crypto exchange, it would provide security and quick exit for investors during times of volatility. In the final comment on CBDCs, we must point out that t he view emerging from this article is not sympathetic to the values of society and economy from CBDCs. Although CBDCs would resolve many issues related to fluctuations in the price of all cryptocurrencies, the stablecoin solution could be a preferred versi on of a Blockchain -based currency, specifically, decentralised stablecoin s. However, the collapse of UST – LUNA has exposed vulnerabilities in some of the decentralised algorithmic stablecoins . We need new solutions to address some of the vulnerabilities disclosed in 2022. 5. The main lesson we must learn from FTX is that without taking regulatory action, corporate malfunction and malfeasance cases will continue to dominate the cryptocurrency ecosystems. Even if governments worldwide embrace the concept of co mplete monetary decentralisation (which seems highly unlikely), some crypto market elements still need to be regulated to ensure that self -governance is not replaced again with malfeasance. The collapse of FTX (which was considered one of the safest exchan ges because of the public display of approval from various high -profile politicians), has proven that corporate malfeasance exists in cryptocurrencies on a much greater level than we are aware. To put this into perspective, if users start withdrawing large volumes from any of the above -listed stablecoins, it seems questionable if they will survive. That is not to say that the concept of stablecoins should be abandoned or that the currency should be pegged to gold and not to the USD. Stablecoins provide cruc ial services in the crypto markets, and USD is the most traded currency. The concept seems sound, but the regulations, standards and accountancy audits are missing. These three scenarios could be seen as opportunities for the UK Government to intervene and take advantage of the situation to establish the UK as the leading country in the world, that is providing a highly demanded service (which is also highly profitabl e), but also highly regulated, standardised, and audited according to University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 24 international standards. Would this expose the UK economy to unnecessary risk? That depends on how this process is undertaken. Suppose the UK develops a new Blockchain that provides the services that companies use to build crypto projects . In that case, the risk to the UK is minimal, even if the crypto markets collapse . The value of Bitcoin dropped to its all -time lows from year 2009 . The Blockchain would still charge transaction fees un til the market cap goes down to zero, at which point, there won’t be any transactions, and there won’t be any cost, because there won’t be any need for maintaining the new Blockchain. Similar arguments can be made about the development of a UK crypto excha nge. Regardless of the level of centralisation, the code for Uniswap and many other exchanges are open and can be copied to create a new exchange without building a new code. That is precisely what SushiSwap did, gaining a significant market cap and tradin g volume almost instantly. 6. Survey of Crypto use cases . The use case for crypto projects depends mainly on the specifics of the project features and characteristics. Some of the most popular use cases come with questionable motives. For example, the idea that bitcoin can be considered as digital gold, or as a store of value, and that bitcoin can be used to preserve wealth and hedge against inflation . This use case is very debatable. There are many use cases for crypto, and below I list some realistic use c ases, but the idea that a digital asset with no other purpose or a use case can replace gold, is not very convincing. It seems more likely that Bitcoin will need to be wrapped and transferred to a different chain, where the cost of transactions is much low er, and be used as a payment system, similar to SWIFT. That could be a real -world use case, and we already have the Algorand Blockchain, which is capable of handling wrapped Bitcoins, and the cost of transactions is very low, while security is high. Algor and could even enhance the security of Bitcoin. There will be many other Blockchains that can do the same function. Hence, the bitcoin community needs to start innovating because back in 2009, Satoshi presented the most innovative and secure technology, bu t surely, he didn’t expect this to remain the same forever. Some of the real -world use cases include: 1. Borderless payments without any centralised entities acting as an intermediary, 2. Decentralised finance for lending and borrowing, accessible to anyone an d everyone that has an internet connection and knows how to use the specific blockchain –crypto project, 3. Security and privacy of products (and services) as they move through different supply chains, 4. Authenticity verification for products and services, 5. Ensuring payments are processed somewhat in supply chains - with the use of smart contracts, 6. Buying and owning digital assets, such as gaming and collectables , can be held as non -fungible tokens (NFTs). University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 25 7. Crypto transactions can be designed to help with priva cy and anonymity, creating added value for users that prefer to keep their finances private. 8. Crypto can be used for crowdfunding, where new funds can be raised by issuing initial coin offerings (ICO) or token generation events (TGEs). 9. Creatives can use c rypto to monetise their work . For example, digital content creators can accept payments for premium content, opening a safer and cheaper environment for various artists, from dancers, tutors, and painters to fitness instructors, digital consultants and edu cation providers. 10. Charitable donations, crypto can be used as a fast and secure method for transferring wealth to people in need. New use cases will continue to emerge with the increased adoption of decentralised blockchain technology. One way to compare the current state of crypto is to think of web one vs web two and the emergence of web three. Web one was just a collection of data an d information made available for free online. 6.1. Evolution and Uncertainties of the Internet: From Web1 to Web3 The internet has undergone significant transformations over the years, from the emergence of Web1 as the "information highway" to the interactive capabilities of Web2. However, Web2 has raised concerns regarding privacy exploitation, paving the way for the anticipated arrival of Web3, which is expected to be built on blockchain technology. The blockchain's primary use case has already found its place in adopting blockchains within Web3. This section explores the evolution of the Internet and the uncertainti es surrounding the dominance of specific platforms and cryptocurrencies. The transition from Web1 to Web2 can be likened to the shift from AOL (the initial popular web browser) to Hotmail. Similarly, Ethereum has emerged as the dominant force in the crypto world, particularly with the introduction of layer two projects like Optimism and Arbitrum. Ethereum's upgraded blockchain, transitioning from proof of work to proof of stake, became a prominent player in 2023. However, whether Ethereum will sustain its p opularity in the coming years or if another cryptocurrency will surpass it. This draws parallels to Hotmail's decline despite experimenting with features similar to its competitors. The similarity between the current version of WhatsApp and the older MSN c hat is quite puzzling. While WhatsApp remains popular, MSN lost many users and was eventually abandoned. Although some argue that WhatsApp relies on mobile signals, it uses personal mobile numbers as usernames rather than a communication method. In contras t, MSN offered the advantage of creating new and random usernames, making it seemingly more secure. This example highlights the unpredictability of platform preferences among users. As the emergence of Web3 unfolds, multiple platforms aim to provide simila r services. Identifying the platform that will prevail in the long run is challenging. Ethereum may be the MSN in this scenario, but who will be the WhatsApp? It's not a single platform; projects like NEAR and SOL, among others, offer comparable functional ities to Ethereum. The long -term viability of crypto projects depends on their ability to deliver unique services and align with user preferences. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 26 The question arises whether Bitcoin will experience a revival with the Lightning network. When transmitted vi a the Lightning network, there is no real distinction between layer one and layer two solutions. Additionally, Bitcoin has been striving to increase the use of renewable energy and improve speed and user -friendliness for everyday transactions. Perhaps, the re is potential for new blockchain innovations to emerge from Bitcoin. In summary, the Internet has evolved from Web1 to Web2, and the anticipated arrival of Web3 brings new uncertainties regarding platform dominance and the emergence of innovative cryptoc urrencies. The future landscape of the internet and blockchain technologies remains unpredictable, as users' preferences and advancements in various projects play pivotal roles in shaping the future of the digital landscape. 6.2. The Buterin's trilemma . This re view article would not be complete without discussing the Buterin's trilemma and how that fundamentally captures the trade -offs between security, decentralisation, speed, and the attendant risks. Some blockchains (e.g., Sol) go for speed but are more centr alised; others are less centralised but often more secure. One study suggested a solution called ‘The Blockchain Quadrilemma’ but also recognised that for basic Blockchain operations ‘, Algorand can often be the right choice’ , but Ethereum is recommended for ‘more sophisticated computations’ [141] . Another research study recommended ‘a dichotomy of algorithms between leader - based and voting -based consensus algorithms’ based on ‘tradeoffs … for a given distributed system’ [142] It is worth mentioning t hat some experts recommend an ‘incentive -based role in the governance of DeFi as opposed to an enforcement - oriented role’ because we need to build new tools that enable new ‘ policy options in a transnational environment hostile to formal state intervention ’ [143] . 7. Discussion . Crypto is still subject to many risks for investors and users. One of the main risks for investors is that the value is highly volatile and fluctuates significantly in short periods . This makes crypto price and value extremely difficult to predict , leading to significant losses when the value drops significantly. Since crypto is also a speculative asset, investors cannot be confident that the value of their investment will ever recov er or go to zero. Another risk is that no one, a government, or any financial institution regulate crypto . This is the clearest indicator that there won’t be any protection or oversight from fraud, mismanagement, or financial malfeasance. In other words, crypto investors need to be aware that they will have very little recourse if something goes wrong . Apart from these risks, one commonly discussed risk is the safety and security of blockchain technology. The common topic in media is that the underlying blockchain technology is not as secure as it was thought . The rationale for this assumption is that in the past, we had some very high-profile hacks that resulted in the theft of large amounts of crypto from exchanges and wallets. Although the latest is cor rect, the first is not. Bitcoin and other secured blockchains have never been hacked, the University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 27 hacks happen on crypto exchanges and digital wallets that do not apply appropriate security, and most of the theft has been on crypto bridges, pools, and other instru ments unrelated to the blockchain technology itself. To explain this , in other words, the Blockchain is as secure as it has been described in the first paper written by Satoshi, but the new projects are bypassing the security requirements, often because t here are no cybersecurity standards . The hacks are increasing, but this does not mean that blockchain technology is not secure . It means that we need cybersecurity standards for projects that use blockchain technology. 7.1. The good . Traditional finance has a lso been slowly developing new , faster and more secure solutions. The SWIFT network is very slow compared to some of the crypto solutions, and the idea of tokenised USD does seem appealing to many users, specifically traders. Cryptocurrencies can also solv e many of the banking problems in developing countries. The ability to make payments and transfer tokens pegged with the value of USD could provide solutions to much of the developed world still lacking essential banking services. Since existing payment me thods like Visa or Mastercard charge service fees, it is reasonable to expect that some small fees would be acceptable to users. However, there is no evidence of crypto being adopted as a payment method in developing countries. Although some countries like El Salvador have adopted Bitcoin, its use for everyday payment has not been adopted. Another point to make here is related to the value of Bitcoin (BTC) and private money and wallets. Although decentralised cryptocurrencies don’t hedge against short -term inflation, Bitcoin has massively outperformed gold over a decade despite monetary easing/printing. 7.2. The bad . Bitcoin emerged from the financial chaos in 2008, and it was presented as a solution to the centralised banking system and the high -risk pract ices of a few greedy financial firms that only care about profits. The cryptocurrencies only replaced one centralised set of intermediaries that are strictly regulated, with another set of centralised intermediaries that are not regulated. Despite the fall of FTX, crypto exchanges do not want to be controlled, and they are challenging to regulate, because they can be run from anywhere in the world. One of the reasons for this is that consumers prefer the safety and service of third parties looking after their money and rarely prefer keeping their savings in a cold wallet that can be lost, damaged, or hacked, along with all the money saved. The shift from decentralised money to centralised exchanges just shows that people prefer the convenience of a third party looking after their money. The long -term economic utility is also questionable. Why would one coin created out of code be valued in thousands of pounds and another coin created out of code be worth zero. It is often compared with traditional securities such as stock shares, but stocks generate cash flow, and we can discount the cash flow to the present time to come up with a valuation. Another e xample is that a fiat currency is valued relative to University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 28 other fiat currencies based on GDP, inflation, interest rates, and other data from different countries. None of these valuations apply to cryptocurrencies. This means that cryptocurrencies cannot be val ued because they do not have any trade fundamentals. Instead, cryptocurrencies trade purely on sentiment, and most of the price spikes are created by influence rs and social media. If this trend continues, we can argue that even decentralised cryptocurrenci es are just decentralised Ponzi schemes and rely on a supply of new buyers to buy new tokens at higher prices . The supply of new buyers will run out eventually. Worth emphasising here is that from the five most famous Ponzi schemes of the 2020s, are alloca ted to cryptocurrencies (QuadrigaCX, Terra Luna, and FTX7). What is really striking in this scenario is that the poorest usually learn last about the scheme and tend to lose the most. A clear example of this is the case of El Salvador, where they adopted Bitcoin as a legal tender, followed by credit rating agencies downgrading their sovereign credit rating . The IMF has started to cut off funding, nobody is using Bitcoin there to buy anything, and it turned out to be a disaster. Other developing countries have found effective fintech solutions that do not require crypto, such as the M -Pesa in Africa, which is based on SIM card payment from a mobile phone, or We Chat Pay , a QR Code payment. Both examples have proven success in adoption and financial inclusion, with billions of users and almost no banking infrastructure investment. If we compare this to Bitcoin, we are still not able to walk into a shop and buy things with Bitcoin or any of the cryptocurrencies that we have at present . It is questionable if we will ever be able to do that because of the cost of validatin g the transaction – it might simply not be viable to process so many transactions with the current Bitcoin mechanisms. It seems more likely that Bitcoin would need to be wrapped as a token on a different – less secure Blockchain just to be used as a curren cy for payment of everyday things, like coffee or beer. For crypto to be seen as a long -term value, it must provide economic utility, and at present, crypto is not providing such utility. Another problem is that in technological terms, crypto is old techn ology, the first block was created in 2009, and we have seen a rapid technological change since then. Most of the mobile phones from 2009 are now considered old and almost obsolete. We are still waiting for some extraordinary use case for crypto, but since it hasn’t materialised until now, the question is when it will, and would it ever happen ? 7.3. The ugly . Currently , the crypto market is not connected to traditional markets and is relatively small. If the crypto market relates to the traditional finance, t he spill -over effect must be considered. The main concern is that if the crypto market is regulated in a way that it would get supercharged and it’s allowed to create the connections between regulated finance and the crypto system, then crypto problems can become much bigger problems. This would mean that people that never invested in crypto are affected by price fluctuations and crypto market risks, in the same way that investors were affected by the mortgage -backed securities in 2008. Hence, the focus in 7 https://en.wikipedia.org/wiki/List_of_Ponzi_schemes University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 29 regulations should be on minimising the connections between the crypto market and the regulated financial system. One significant risk from cryptocurrencies to our society is gambling, including leveraged and other forms of trading. I n this article, we fo cused on the crypto ecosystem and the risk and values of the technology for society and the economy – from a perspective of improved wealth of a nation. But we also noticed that in the literature , we seem to have ignored that trading and gambling are addic tions that humans have been subjected to since the early age of humanity, and th e gambling market is booming in crypto. Wherever there is a demand, there will be a supply, and this needs to be regulated because gambling is a severe addiction. One of the more concerning discoveries in this area is that Crypto gambling is ‘distinct with regard to higher novelty seeking, higher gambling tendencies, and unique investmen t patterns ’ [144] and this conclusion has been reached with the use of established and new Crypto specific methods, including ‘Fear of Missing Out (FoMO) scale, Temperament and Character Inventory -Revised -Short (TCI -RS), Mood Disorder Questionnaire (MDQ) , trait anxiety part of the State -Trait Anxiety Inventory (STAI -T), and the Korean version of the Canadian Problem Gambling Index (K -CPGI) ’. Cryptocurrency trading and gambling have also been associated with mental health problems , including depression an d anxiety , with the main findings confirming a direct similarity between the demographic and personality characteristics of cryptocurrency traders and gamblers [145] . However, the study recognises that there could be ‘differences between long -term investors and short -term traders of cryptocurrency’, although, given the market uncertainty, some of the long-term investors in Terra Luna of FTX might disagree . Another recent study found that cryptocurr ency trading results in ‘rise to excessive or harmful behaviour including over-spending and compulsive checking’ , and although they identified many ‘similarities between online sports betting and day trading’, there are also some even more concerning facto rs, like ‘the continuous 24 -hour availability of trading, the global nature of the market, and the vital role of social media, social influence and non-balance sheet related events as determinants of price movements’ [146] . These examples illustrate tha t we have reviewed some of the leading and most recent journal papers on this topic, but this topic needs much deeper research and understanding from a mental health perspective . 8. Conclusion . In conclusion, this article has comprehensively examined the cu rrent state of cryptocurrencies and blockchains, aiming to enhance coherence, structure, and comprehensibility within the domain. We have shed light on the values and risks associated with these digital assets by presenting an up -to-date snapshot of the crypto landscape in 2023 and tracing its historical development from Satoshi's pioneering work. Moreover, we have endeavoured to clarify the distinctions between cryptocurrencies and blockchain technologies, addressing pertinent research questions regarding the innovative nature of blockchain, the significant risks posed by cryptocurrencies, and the potential societal and economic benefits of pursuing University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 30 these technologies. Furthermore, we have explored the varying impacts on developed and developing countries and contemplated the longevity of different blockchain projects. While acknowledging the prevalence of fraudulent schemes, we have shifted our focus to the practical applications of blockchain projects, ultimately affirming the enduring presence of blockcha in technologies. Our comprehensive discussion on the value derived from blockchain projects underscores their significance while re -evaluating key risks, including a personal reflection from the author on the potential risks. The question that emerges from this review paper is, if we fast forward ten years, would all the transactions that we perform in our society be in fiat currencies, and the answer is that most probably they won’t. With the emergence of Web3, assets, money and marketplaces will become interconnected, and some of the cryptocurrencies will form part of these new digital assets, but would that be Bitcoin, or some of the other 22,250 cryptos that are in circulation today, that is difficult to predict. What also becomes clear is that regulation would eliminate many of the cases of corporate malfeasance. Regulations will most likely also remove many current use cases for crypto. Much of the recent hype around crypto is around the lack of regulations, and when regul ations are applied, the promise of getting rich from crypto will certainly start to weaken. With regulations, crypto projects will have to start making checks (KYC) on who their customers are, and this argument for regulations killing the crypto is especia lly strong for cryptocurrencies that are created with no actual use case and based purely on the promise of making a great deal of money for early investors. Once regulations are created, these cryptos will be out of the picture. Most of the crypto project s are almost certainly not compliant with the derivatives or either security regulators. Crypto has been operating in a very grey area, where different crypto project is considered as commodities, and because of that, crypto exchanges do not need to regis ter with the federal government and be subject to regulation. This debate has been ongoing for far too long . The issue of whether crypto is a commodity or crypto is a security is not the main point of concern. The main concern is not the naming but whethe r crypto is subject to regulation, and from this perspective, it makes sense to call all crypto assets securities, which will mean that all crypto is subjected to robust oversight. The issue is that, if that happens, most crypto projects won’t be able to c omply, which will hurt not only the crypto industry but also the crypto investors. Given that regulations are designed to protect investors, it is uncertain if such robust approach would serve the purpose it intended to , or would it lead to a significant l oss for crypto investors. A more realistic approach would be to regulate crypto exchanges and ensure that exchanges are registered as investment dealers. This seems realistic and reasonable because if a crypto investor engages in a contract with a crypto exchange, where the exchange would promise a very lucrative return or some exceptional benefits that are not very realistic, there are small crypto investors that might fail for such advertisements. This makes crypto exchanges investment deadlier, and they need to be regulated. Regulators need to engage in University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 31 how these exchanges keep their assets, how they get the returns, and ensure that exchanges are not taking unnecessary risks that expose investors to risks they are unaware of or do not fully understand. T he old saying in crypto is ‘not your keys, not your crypto’, and regulating the centralised exchanges, won’t even come with any disagreement from the crypto community. 8.1. Final comments . A final comment on investing in crypto, despite the remarkable returns some investors have benefited from, the crypto market has not matured yet, and the market – including the technology – is still evolving. There are risks, and investing in crypto comes with serious risks, and investors should approach crypto with caution. In addition, we still cannot use Bitcoin or any other Crypto to buy coffee in Costa or Starbucks, we cannot buy food in Tesco, and transactions come at a cost, while using fiat doesn’t cost. Until we can use crypto as a fiat currency in every aspect of t he use cases, we won't be able to claim that retail and commerce adoption is increasing . Even if the price of crypto goes up (or down ), the use case doesn’t change much, which triggers concerns. On the other hand, the claim that Bitcoin is used for crime and money laundry has been contradicted by blockchain analysis company Chainalysis, which reported that only a very small percentage ( 0.15% total of $14bl ) of known cryptocurrency transactions conducted in 2021 were inv olved in illicit activities [147] . 9. Abbreviations Bitcoin – the first decentralised blockchain . Terra Luna – collapsed crypto project. FTX – collapsed crypto exchange . Solana (SOL) – crypto project that got affected by the FTX collapse . Ethereum, Cardano, Dogecoin, Litecoin, Algorand, NEAR – crypto projects that remained popular with investors in the 2021 bull run . IOTA, NEO, EOS – crypto projects that were popular in the previous bull runs, and are still present in the crypto market in 2023 . NEFD - new and emerging forms of data . CBDCs - Central Bank Digital Currencies . Tornado Cash DAO – crypto mixer that has been prohibited for use by the USA UST Algorithmic Stablecoin – collapsed stablecoin . USDT, USDC, DAI, BUSD, USDP, USDD, TUSD - Stablecoins still in existence in 2023 (as of 25th of January 2023) . NHS – National health Service . Uniswap / SushiSwap – decentralised exchanges . NFTs - non-fungible tokens . University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 32 ICO - initial coin offerings . TGEs - token generation events . ChatGPT – AI based chat designed to replace the Google search engine . M-Pesa - SIM card payment from a mobile phone . We Chat Pay - a QR Code payment . KYC – know your customer . 10. References [1] S. Nakamoto, “Bitcoin: A peer -to-peer electronic cash system,” Decentralized Business Review , p. 21260, 2008. [2] C. Dierksmeier and P. See le, “Cryptocurrencies and Business Ethics,” Journal of Business Ethics , vol. 152, no. 1, pp. 1 –14, Sep. 2018, doi: 10.1007/S10551 - 016-3298 -0/TABLES/1. [3] A. Mikhaylov, H. Dinçer, and S. Yüksel, “Analysis of financial development and open innovation orient ed fintech potential for emerging economies using an integrated decision -making approach of MF -X-DMA and golden cut bipolar q - ROFSs,” Financial Innovation , vol. 9, no. 1, pp. 1 –34, Dec. 2023, doi: 10.1186/S40854 -022-00399 -6/TABLES/26. [4] A. A. Khan et al. , “QoS -Ledger: Smart Contracts and Metaheuristic for Secure Quality -of-Service and Cost -Efficient Scheduling of Medical -Data Processing,” Electronics 2021, Vol. 10, Page 3083 , vol. 10, no. 24, p. 3083, Dec. 2021, doi: 10.3390/ELECTRONICS10 243083. [5] M. C. Chang and D. Park, “How Can Blockchain Help People in the Event of Pandemics Such as the COVID -19?,” Journal of Medical Systems , vol. 44, no. 5. Springer, May 01, 2020. doi: 10.1007/s10916 -020-01577 -8. [6] B. Pranggono and A. Arabo, “COVI D‐19 pandemic cybersecurity issues,” Internet Technology Letters , vol. 4, no. 2, p. e247, Mar. 2021, doi: 10.1002/itl2.247. [7] D. S. W. Ting, L. Carin, V. Dzau, and T. Y. Wong, “Digital technology and COVID -19,” Nature Medicine , Nature Research, pp. 1 –3, Mar. 27, 2020. doi: 10.1038/s41591 -020-0824 -5. [8] E. Bouri, X. V. Vo, and T. Saeed, “Return equicorrelation in the cryptocurrency market: Analysis and determinants,” Financ Res Lett , vol. 38, p. 101497, Jan. 2021, doi: 10.1016/j.frl.2020.101497. [9] Y. Ma lhotra, “Advancing Cyber Risk Insurance Underwriting Model Risk Management beyond VaR to Pre -Empt and Prevent the Forthcoming Global Cyber Insurance Crisis.” Dec. 07, 2017. Accessed: Mar. 22, 2018. [Online]. Available: https://papers.ssrn.com/sol3/papers.c fm?abstract_id=3081492 [10] FAIR, “What is a Cyber Value -at-Risk Model?,” 2017. http://www.fairinstitute.org/blog/what -is-a-cyber -value -at-risk-model (accessed Dec. 25, 2017). University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 33 [11] P. Jorion, Value at risk: the new benchmark for controlling market risk . Irwin Professional Pub., 1997. [12] E. Khorshidi and V. R. Ghezavati, “Application of mathematical modeling value -at-risk (VaR) to optimize decision making in distribution networks,” SN Appl Sci , vol. 1, no. 12, p. 1671, Dec. 2019, doi: 10.1007/s42452 -019-1715-6. [13] J. Buith, “Cyber Value at Risk in the Netherlands,” 2016. Accessed: Apr. 03, 2017. [Online]. Available: https://www2.deloitte.com/content/dam/Deloitte/nl/Documents/financial - services/deloitte -nl-fsi-cyber -value -at-risk.pdf [14] A. T. Aspembitova , L. Feng, and L. Y. Chew, “Behavioral structure of users in cryptocurrency market,” PLoS One , vol. 16, no. 1, p. e0242600, Jan. 2021, doi: 10.1371/journal.pone.0242600. [15] C. F. Breidbach and S. Tana, “Betting on Bitcoin: How social collectives shape cryptocurrency markets,” J Bus Res , vol. 122, pp. 311 –320, Jan. 2021, doi: 10.1016/j.jbusres.2020.09.017. [16] The Federal Reserve, “Central Bank Digital Currency (CBDC),” 2022. [Online]. Available: https://www.federalreserve.gov/central -bank -digital -currency.htm [17] T. Hansen and K. Delak, “Security Considerations for a Central Bank Digital Currency,” FEDS Notes , vol. 2022, no. 2970, Feb. 2022, doi: 10.17016/2380 - 7172.2970. [18] P. Cheng, “Decoding the rise of Central Bank Digital Currency in China: designs, problems, and prospects,” Journal of Banking Regulation 2022 , pp. 1–15, Feb. 2022, doi: 10.1057/S41261 -022-00193 -5. [19] A. Y. Mikhaylov, “Development of Friedrich von Hayekʼs theory of private money and economic implications for digital currencies,” Terra Economicus , vol. 19, no. 1, pp. 53 –62, 2021, doi: 10.18522/2073 -6606 -2021 -19-1-53-62. [20] HMT, “UK sets out plans to regulate crypto and protect consumers - GOV.UK,” HM Treasury - Gov.UK , Feb. 01, 2023. https://www.gov.uk/government/news/uk -sets-out-plans -to-regulate -crypto - and-protect -consumers (accessed Mar. 05, 2023). [21] K. M. Eisenhardt, “Building Theories from Case Study Research,” The Academy of Management Review , vol. 14, no. 4, p. 532, Oct. 1989, doi: 10.2307/258557. [22] R. K. Yin, Case study research: Design and methods , vol. 5. Sage, 2009. [23] K. Charmaz, Constructing grounded theory : a practical guide through qualitative analysis . Sage Publications, 2006. [24] B. G. Glaser and A. L. Strauss, The discovery of grounded theory : strategies for qualitative research . Abingdon, Oxford: Routledge, 1967. [25] Christina. Goulding, Grounded theory : a practical guide for management, business and market researchers . SAGE, 2002. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 34 [26] M. Xu, X. Chen, and G. Kou, “A systematic review of blockchain,” Financial Innovation , vol. 5, no. 1, pp. 1 –14, Dec. 2019, doi: 10.1186/S40854 -019-0147 - Z/FIGURES/2. [27] F. Fang et al. , “Cryptocurrency trading: a comprehensive survey,” Financial Innovation , vol. 8, no. 1, pp. 1 –59, Dec. 2022, doi: 10.1186/S40854 -021- 00321 -6/TABLES/11. [28] H. Sebastião and P. Godinho , “Forecasting and trading cryptocurrencies with machine learning under changing market conditions,” Financial Innovation , vol. 7, no. 1, pp. 1 –30, Dec. 2021, doi: 10.1186/S40854 -020-00217 -X/TABLES/7. [29] H. Zhang, G. Kou, and Y. Peng, “Soft consensus cos t models for group decision making and economic interpretations,” Eur J Oper Res , vol. 277, no. 3, pp. 964 –980, Sep. 2019, doi: 10.1016/J.EJOR.2019.03.009. [30] G. Kou, Ö. Olgu Akdeniz, H. Dinçer, and S. Yüksel, “Fintech investments in European banks: a hy brid IT2 fuzzy multidimensional decision -making approach,” Financial Innovation , vol. 7, no. 1, pp. 1 –28, Dec. 2021, doi: 10.1186/S40854 -021-00256 -Y/TABLES/15. [31] T. Li, G. Kou, Y. Peng, and P. S. Yu, “An Integrated Cluster Detection, Optimization, and I nterpretation Approach for Financial Data,” IEEE Trans Cybern , vol. 52, no. 12, pp. 13848 –13861, Dec. 2022, doi: 10.1109/TCYB.2021.3109066. [32] G. Kou, X. Chao, Y. Peng, F. E. Alsaadi, and E. Herrera -Viedma, “Machine learning methods for systemic risk ana lysis in financial sectors,” Technological and Economic Development of Economy , vol. 25, no. 5, pp. 716 –742, May 2019, doi: 10.3846/TEDE.2019.8740. [33] G. Kou, Y. Peng, and G. Wang, “Evaluation of clustering algorithms for financial risk analysis using MC DM methods,” Inf Sci (N Y) , vol. 275, pp. 1 –12, Aug. 2014, doi: 10.1016/J.INS.2014.02.137. [34] M. Kumar, N. Nikhil, and R. Singh, “Decentralising finance using decentralised blockchain oracles,” 2020 International Conference for Emerging Technology, INCET 2020 , Jun. 2020, doi: 10.1109/INCET49848.2020.9154123. [35] V. Sharma, V. Orindi, C. Hesse, J. Pattison, and S. Anderson, “Supporting local climate adaptation planning and implementation through local governance and decentralised finance provision,” https ://doi.org/10.1080/09614524.2014.907240 , vol. 24, no. 4, pp. 579 –590, 2014, doi: 10.1080/09614524.2014.907240. [36] M. Yu, F. S. Tsai, H. Jin, and H. Zhang, “Digital finance and renewable energy consumption: evidence from China,” Financial Innovation 2022 8:1, vol. 8, no. 1, pp. 1 –19, May 2022, doi: 10.1186/S40854 -022-00362 -5. [37] Y. Chen, Y. Zhang, and B. Zhou, “Research on the risk of block chain technology in Internet finance supported by wireless network,” EURASIP J Wirel Commun Netw , vol. 2020, no. 1, pp. 1 –11, Dec. 2020, doi: 10.1186/S13638 -020-01685 -6/FIGURES/9. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 35 [38] Z. Dong, F. Luo, and G. Liang, “Blockchain: a secure, decentralized, trusted cyber infrastructure solution for future energy systems,” Journal of Modern Power Systems and Clean Energy , vol. 6, no. 5, pp. 958 –967, Sep. 2018, doi: 10.1007/S40565 -018-0418 -0/FIGURES/5. [39] P. Liu and P. Chu, “Renewables finance and investment: how to improve industry with private capital in China,” Journal of Modern Power Systems and Clean Energy , vol. 7, no . 6, pp. 1385 –1398, Nov. 2019, doi: 10.1007/S40565 - 018-0465 -6/FIGURES/8. [40] P. O’Brien and A. Pike, “‘The governance of local infrastructure funding and financing,’” Infrastructure Complexity 2015 2:1 , vol. 2, no. 1, pp. 1 –9, Jun. 2015, doi: 10.1186/S40551 -015-0007 -6. [41] G. Falchetta, B. Michoud, M. Hafner, and M. Rother, “Harne ssing finance for a new era of decentralised electricity access: A review of private investment patterns and emerging business models,” Energy Res Soc Sci , vol. 90, p. 102587, Aug. 2022, doi: 10.1016/J.ERSS.2022.102587. [42] Y. Faqir -Rhazoui, J. Arroyo, an d S. Hassan, “A comparative analysis of the platforms for decentralized autonomous organizations in the Ethereum blockchain,” Journal of Internet Services and Applications , vol. 12, no. 1, pp. 1–20, Dec. 2021, doi: 10.1186/S13174 -021-00139 -6/TABLES/5. [43] V. Mohan, “Automated market makers and decentralized exchanges: a DeFi primer,” Financial Innovation , vol. 8, no. 1, pp. 1 –48, Dec. 2022, doi: 10.1186/S40854 -021-00314 -5/FIGURES/12. [44] F. Fang et al. , “Cryptocurrency trading: a comprehensive survey,” Financial Innovation , vol. 8, no. 1, pp. 1 –59, Dec. 2022, doi: 10.1186/S40854 -021- 00321 -6/TABLES/11. [45] T. van der Linden and T. Shirazi, “Markets in crypto -assets regulation: Does it provide legal certainty and increase adoption of crypto -assets?,” Financ ial Innovation , vol. 9, no. 1, pp. 1 –30, Dec. 2023, doi: 10.1186/S40854 -022- 00432 -8/TABLES/2. [46] J. Chu, S. Chan, and Y. Zhang, “An analysis of the return –volume relationship in decentralised finance (DeFi),” International Review of Economics & Finance , vol. 85, pp. 236 –254, May 2023, doi: 10.1016/J.IREF.2023.01.006. [47] O. Yavin and A. Reardon, “What digital banks can learn from decentralised finance”. [48] G. C. Maia and J. Vieira dos Santos, “MiCA and DeFi (‘Proposal for a Regulation on Market in Cryp to-Assets’ and ’Decentralised Finance’),” SSRN Electronic Journal , Jul. 2021, doi: 10.2139/SSRN.3875355. [49] M. Barrett, J. Marron, V. Yan Pillitteri, J. Boyens, G. Witte, and L. Feldman, “Draft NISTIR 8170, The Cybersecurity Framework: Implementation Gui dance for Federal Agencies,” Maryland, 2017. Accessed: Mar. 08, 2018. [Online]. Available: https://csrc.nist.gov/CSRC/media/Publications/nistir/8170/draft/documents/nisti r8170 -draft.pdf University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 36 [50] P. K. Ozili, “DECENTRALISED FINANCE AND CRYPTOCURRENCY ACTIVITY I N AFRICA,” Contemporary Studies in Economic and Financial Analysis , vol. 109A, pp. 3 –11, 2022, doi: 10.1108/S1569 - 37592022000109A001/FULL/XML. [51] R. N. Marishane and R. J. Botha, “Empowering school -based management through decentralised financial control ,” https://doi.org/10.1080/18146620408566272 , vol. 1, no. 1, pp. 95 –112, Jan. 2008, doi: 10.1080/18146620408566272. [52] B. C. Eikmanns, P. Mehrwald, P. G. Sandner, and I. M. Welpe , “Decentralised finance platform ecosystems: conceptualisation and outlook,” https://doi.org/10.1080/09537325.2022.2163886 , 2023, doi: 10.1080/09537325.2022.2163886. [53] T. Miller, S. Cao, M. Foth, X. Boyen, and W. Powell, “An asset -backed decentralised finance instrument for food supply chains – A case study from the livestock export industry,” Comput Ind , vol. 147, p. 103863, May 2023, doi: 10.1016/J.COMPIND.2023.103863. [54] A. M. Sumah, L. Baatiema, and S. Abimbola, “The impacts of decentralisation on health -related equity: A systematic review of the evidence,” Health Policy (New York) , vol. 120, no. 10, pp. 1183 –1192, Oct. 2016, doi: 10.1016/J.HEALTHPOL.2016.09.003. [55] I. Makarov and A. Schoar, “Cryptocurrencies and Decentralised Finance (DeFi),” Bank for International Settlements , 2022, Accessed: Apr. 24, 2023. [Online]. Available: www.bis.org [56] S. K. Routray, M. K. Jha, L. Sharma, R. Nyamangoudar, A. Javali, and S. Sarkar, “Quantum cryptography for IoT: APerspective,” IEEE International Conferen ce on IoT and its Applications, ICIOT 2017 , Oct. 2017, doi: 10.1109/ICIOTA.2017.8073638. [57] NIST, “Post -Quantum Cryptography PQC,” 2022. https://csrc.nist.gov/Projects/post -quantum -cryptography [58] NIST, “Post -Quantum Cryptography | CSRC | Competition f or Post -Quantum Cryptography Standardisation,” 2022. Accessed: Mar. 16, 2023. [Online]. Available: https://csrc.nist.gov/projects/post -quantum -cryptography [59] C. H. Bennett and G. Brassard, “Quantum cryptography: Public key distribution and coin tossing, ” in Proceedings of IEEE International Conference on Computers, Systems and Signal Processing , New York, 1984, pp. 1 –8. Accessed: Mar. 16, 2023. [Online]. Available: https://web.archive.org/web/20200130165639/http://researcher.watson.ibm.co m/researcher/fil es/us -bennetc/BB84highest.pdf [60] L. Gyongyosi and S. Imre, “Secret Key Rate Adaption for Multicarrier Continuous -Variable Quantum Key Distribution,” SN Comput Sci , vol. 1, no. 1, pp. 1 –17, Jan. 2020, doi: 10.1007/s42979 -019-0027 -7. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 37 [61] P. W. Shor, “Poly nomial -Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer,” SIAM Journal on Computing , vol. 26, no. 5, pp. 1484 –1509, Oct. 1997, doi: 10.1137/S0097539795293172. [62] NIST, “Post -Quantum Cryptography | CSRC | Selected Algo rithms: Public -key Encryption and Key -establishment Algorithms,” 2022. Accessed: Mar. 16, 2023. [Online]. Available: https://csrc.nist.gov/Projects/post -quantum - cryptography/selected -algorithms -2022 [63] B. Farahani, F. Firouzi, and K. Chakrabarty, “Health care IoT,” in Intelligent Internet of Things , Springer International Publishing, 2020, pp. 515 –545. doi: 10.1007/978 -3-030-30367 -9_11. [64] K. Piya, Q. A. Au, S. Shrestha, A. Singh, and T. K. Mohd , “IoT in Health Care Industry: A Promising Prospect,” pp. 0466 –0474, Jan. 2022, doi: 10.1109/UEMCON53757.2021.9666731. [65] A. Aldahiri, B. Alrashed, and W. Hussain, “Trends in Using IoT with Machine Learning in Health Prediction System,” Forecasting , vol. 3, no. 1, pp. 181 –206, Mar. 2021, doi: 10.3390/forecast3010012. [66] R. Rastogi, P. Singhal, D. K. Chaturvedi, and M. Gupta, “Investigating Correlation of Tension -Type Headache and Diabetes: IoT Perspective in Health care,” Springer, Singapore, 2021, pp. 71–91. doi: 10.1007/978 -981-15- 4112 -4_4. [67] A. Banerjee, C. Chakraborty, A. Kumar, and D. Biswas, “Emerging trends in IoT and big data analytics for biomedical and health care technologies,” in Handbook of Data Science Approaches for Biomedical Engineer ing, Elsevier, 2020, pp. 121 –152. doi: 10.1016/b978 -0-12-818318 -2.00005 -2. [68] K. Jayavel, V. Nagarajan, and G. Sharma, “An Analysis of IOT Test beds with Application in the Field of Medicine and Health Care,” Research J. Pharm. and Tech , vol. 10, no. 12, 2017, doi: 10.5958/0974 -360X.2017.00757.0. [69] J. L. Beavers, M. Faulks, and J. Marchang, “Hacking NHS Pacemakers: A Feasibility Study,” Proceedings of 12th International Conference on Global Security, Safety and Sustainability, ICGS3 2019 , Apr. 2019, do i: 10.1109/ICGS3.2019.8688214. [70] X. Feng, M. Conrad, and K. Hussein, “NHS Big Data Intelligence on Blockchain Applications,” pp. 191 –208, 2022, doi: 10.1007/978 -3-030-87954 - 9_8. [71] NHS Digital, “Adult Psychiatric Morbidity Survey (APMS): Survey of Men tal Health and Wellbeing, England, 2014 - NHS Digital,” England, Sep. 2016. [72] U. D. Ani, J. D. McK. Watson, J. R. C. Nurse, A. Cook, and C. Maple, “A Review of Critical Infrastructure Protection Approaches: Improving Security through Responsiveness to t he Dynamic Modelling Landscape,” in PETRAS/IET Conference Living in the Internet of Things: Cybersecurity of the IoT - 2019 , Apr. 2019, pp. 1 –16. Accessed: Sep. 03, 2019. [Online]. Available: http://arxiv.org/abs/1904.01551 University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 38 [73] M. S. Jalali, J. P. Kaiser, M. Siegel, and S. Madnick, “The Internet of Things Promises New Benefits and Risks: A Systematic Analysis of Adoption Dynamics of IoT Products,” IEEE Secur Priv , vol. 17, no. 2, pp. 39 –48, Mar. 2019, doi: 10.1109/MSEC.2018.2888780. [74] D. Crawford and J. Sherman, “Gaps in United States federal government IoT security and privacy policies,” Journal of Cyber Policy , vol. 3, no. 2, pp. 187 – 200, May 2018, doi: 10.1080/23738871.2018.1514061. [75] B. Russell and D. Van Duren, Practical internet of things securi ty : a practical, indispensable security guide that will navigate you through the complex realm of securely building and deploying systems in our IoT -connected world . 2016. Accessed: Mar. 05, 2019. [Online]. Available: https://www.packtpub.com/hardware -and-creative/practical -internet -things - security [76] M. Roopak, G. Yun Tian, and J. Chambers, “Deep learning models for cyber security in IoT networks,” in 2019 IEEE 9th Annual Computing and Communication Workshop and Conference, CCWC 2019 , Institute of Electrical and Electronics Engineers Inc., Mar. 2019, pp. 452 –457. doi: 10.1109/CCWC.2019.8666588. [77] S. Latvala, M. Sethi, and T. Aura, “Evaluation of Out -of-Band Channels for IoT Security,” SN Comput Sci , vol. 1, no. 1, pp. 1 –17, Jan. 20 20, doi: 10.1007/s42979 -019-0018 -8. [78] H. Abie and I. Balasingham, “Risk -Based Adaptive Security for Smart IoT in eHealth,” SeTTIT 2012, September 24 -26, Oslo, Norway , 2012, Accessed: Mar. 24, 2018. [Online]. Available: https://pdfs.semanticscholar.org/c 39d/04c6f3b84c77ad379d0358bfbe7148ad4f d2.pdf [79] I. Brass, L. Tanczer, M. Carr, M. Elsden, and J. Blackstock, “Standardising a Moving Target: The Development and Evolution of IoT Security Standards,” in Living in the Internet of Things: Cybersecurity of t he IoT - 2018 , Institution of Engineering and Technology, 2018, pp. 24 (9 pp.) -24 (9 pp.). doi: 10.1049/cp.2018.0024. [80] A. Ayad, A. Zamani, A. Schmeink, and G. Dartmann, “Design and Implementation of a Hybrid Anomaly Detection System for IoT,” in 2019 6 th International Conference on Internet of Things: Systems, Management and Security, IOTSMS 2019 , Institute of Electrical and Electronics Engineers Inc., Oct. 2019, pp. 87 –92. doi: 10.1109/IOTSMS48152.2019.8939206. [81] R. Ahmad and I. Alsmadi, “Machine le arning approaches to IoT security: A systematic literature review,” Internet of Things , vol. 14, p. 100365, Jun. 2021, doi: 10.1016/j.iot.2021.100365. [82] A. Dubois, K. Hulthén, and A. -C. Pedersen, “Supply chains and interdependence: a theoretical analysi s,” Journal of Purchasing and Supply management , vol. 10, no. 1, pp. 3 –9, Jan. 2004, doi: 10.1016/j.pursup.2003.11.003. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 39 [83] J. T. Mentzer et al. , “Defining supply chain management,” Wiley Online Library, 2001. [84] K. Zheng and L. A. Albert, “A Robust Approach for Mitigating Risks in Cyber Supply Chains,” Risk Analysis , vol. 39, no. 9, pp. 2076 –2092, Sep. 2019, doi: 10.1111/risa.13269. [85] T. Qu, G. Q. Huang, V. -D. Cung, and F. Mangione, “Optimal configuration of assembly supply chains using analytical target cascading,” Int J Prod Res , vol. 48, no. 23, pp. 6883 –6907, Dec. 2010, doi: 10.1080/00207540903307631. [86] I. Sukati, A. B. Hamid, R. Baharun, and R. M. Yusoff, “The study of supply chain management strategy an d practices on supply chain performance,” Procedia -Social and Behavioral Sciences , vol. 40, pp. 225 –233, 2012. [87] M. Dotoli, M. P. Fanti *, C. Meloni, and M. C. Zhou, “A multi -level approach for network design of integrated supply chains,” Int J Prod Res , vol. 43, no. 20, pp. 4267 –4287, Oct. 2005, doi: 10.1080/00207540500142316. [88] V. Manthou, M. Vlachopoulou, and D. Folinas, “Virtual e -Chain (VeC) model for supply chain collaboration,” Int J Prod Econ , vol. 87, no. 3, pp. 241 –250, 2004. [89] R. Cigolini, M. Cozzi, and M. Perona, “A new framework for supply chain management,” International Journal of Operations & Production Management , vol. 24, no. 1, pp. 7 –41, Jan. 2004, doi: 10.1108/01443570410510979. [90] R. Shaw, V. Takanti, T. Zullo, M. Direc tor, and E. Llc, “Best Practices in Cyber Supply Chain Risk Management Boeing and Exostar Cyber Security Supply Chain Risk Management Interviews,” 2017. Accessed: Mar. 08, 2018. [Online]. Available: https://www.nist.gov/sites/default/files/documents/itl/cs d/NIST_USRP -Boeing - Exostar -Case -Study.pdf [91] H. Fatorachian and H. Kazemi, “Impact of Industry 4.0 on supply chain performance,” Production Planning and Control , vol. 32, no. 1, pp. 63 –81, 2021, doi: 10.1080/09537287.2020.1712487. [92] B. M. Beamon, “Env ironmental and sustainability ethics in supply chain management,” Sci Eng Ethics , vol. 11, no. 2, pp. 221 –234, Jun. 2005, doi: 10.1007/s11948 -005-0043 -y. [93] S. Boyson and T. Corsi, “Building A Cyber Supply Chain Assurance Reference Model,” 2009. Accessed : Aug. 03, 2017. [Online]. Available: https://pdfs.semanticscholar.org/2757/9fc90accd57e0e5e4f402e33f0598841ba fb.pdf [94] S.-H. Liao, D. -C. Hu, and L. -W. Ding, “Assessing the influence of supply chain collaboration value innovation, supply chain capability and competitive advantage in Taiwan’s networking communication industry,” Int J Prod Econ , vol. 191, pp. 143 –153, Sep. 2017, doi: 10.1016/j.ijpe.2017.06.001. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 40 [95] R. Azzi, R. K. Chamoun, and M. Sokhn, “The power of a blockchain -based supply chain,” Comput Ind Eng , vol. 135, pp. 582 –592, Sep. 2019, doi: 10.1016/j.cie.2019.06.042. [96] J. Jayaram and K. -C. Tan, “Supply chain integration with third -party logistics providers,” Int J Prod Econ , vol. 125, no. 2, pp. 262 –271, 2010. [97] D. Sachdev, “Enabling data democracy in supply chain using blockchain and IoT,” Journal of Management (JOM) , vol. 6, no. 1, pp. 66 –83, 2019, Accessed: Apr. 21, 2020. [Online]. Available: http://www.iaeme.com/JOM/index.asp66http://www.iaeme.com/JOM/issues.as p?JType=JOM&VType=6&IType =1http://www.iaeme.com/JOM/issues.asp?JTy pe=JOM&VType=6&IType=1 [98] M. Ben -Daya, E. Hassini, and Z. Bahroun, Internet of things and supply chain management: a literature review , vol. 57, no. 15 –16. Taylor and Francis Ltd., 2019, pp. 4719 –4742. doi: 10.108 0/00207543.2017.1402140. [99] B. Yen, A. Farhoomand, and P. Ng, “Constructing an e -Supply Chain at Eastman Chemical Company,” Journal of Information Technology , vol. 19, no. 2, pp. 93 –107, Jun. 2004, doi: 10.1057/palgrave.jit.2000011. [100] C. Martínez -Olvera, D. Shunk, C. Martinez -Olvera, and D. Shunk, “Comprehensive framework for the development of a supply chain strategy,” Int J Prod Res , vol. 44, no. 21, pp. 4511 –4528, Nov. 2006, doi: 10.1080/00207540600621698. [101] C. C. Bozarth, D. P. Warsing, B. B. Flynn, and E. J. Flynn, “The impact of supply chain complexity on manufacturing plant performance,” Journal of Operations Management , vol. 27, no. 1, pp. 78 –93, 2009. [102] M. Frohlich and R. Westbrook, “Arcs of Integration: An International Study of Supply Chain Strategies,” 2001. [103] P. Chowdhury, S. K. Paul, S. Kaisar, and M. A. Moktadir, “COVID -19 pandemic related supply chain studies: A systematic review,” Transp Res E Logist Transp Rev , vol. 148, p. 102271, Apr. 2021, doi: 10.1016/j.t re.2021.102271. [104] X. F. Shao, W. Liu, Y. Li, H. R. Chaudhry, and X. G. Yue, “Multistage implementation framework for smart supply chain management under industry 4.0,” Technol Forecast Soc Change , vol. 162, p. 120354, Jan. 2021, doi: 10.1016/j.techfore .2020.120354. [105] K. Bär, Z. N. L. Herbert -Hansen, and W. Khalid, “Considering Industry 4.0 aspects in the supply chain for an SME,” Production Engineering , vol. 12, no. 6, pp. 747 –758, Dec. 2018, doi: 10.1007/s11740 -018-0851 -y. [106] K. Leng and X. Chen , “A genetic algorithm approach for TOC -based supply chain coordination,” Applied Mathematics and Information Sciences , vol. 6, no. 3, pp. 767 –774, 2012. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 41 [107] I. Heckmann, T. Comes, and S. Nickel, “A critical review on supply chain risk - Definition, measur e and modeling,” Omega (Westport) , vol. 52, pp. 119 –132, 2015, doi: 10.1016/j.omega.2014.10.004. [108] R. Cigolini, M. Cozzi, and M. Perona, “A new framework for supply chain management: conceptual model and empirical test,” International Journal of Operat ions & Production Management , vol. 24, no. 1, pp. 7 –41, 2004. [109] T. J. Strader, F. -R. Lin, and M. J. Shaw, “Business -to-business electronic commerce and convergent assembly supply chain management,” Journal of Information Technology , vol. 14, no. 4, pp. 361–373, Dec. 1999, doi: 10.1080/026839699344476. [110] M. J. Schnetzler, A. Sennheiser, and P. Schönsleben, “A decomposition -based approach for the development of a supply chain strategy,” Int J Prod Econ , vol. 105, no. 1, pp. 21 –42, Jan. 2007, doi: 10.1 016/j.ijpe.2006.02.004. [111] O. Sakka, P. -A. Millet, and V. Botta -Genoulaz, “An ontological approach for strategic alignment: a supply chain operations reference case study,” Int J Comput Integr Manuf , vol. 24, no. 11, pp. 1022 –1037, 2011. [112] T. Lu, X. Guo, B. Xu, L. Zhao, Y. Peng, and H. Yang, “Next Big Thing in Big Data: The Security of the ICT Supply Chain,” in 2013 International Conference on Social Computing , IEEE, Sep. 2013, pp. 1066 –1073. doi: 10.1109/SocialCom.2013.172. [113] W. Jackson , “Code, Cars, and Congress: A Time for Cyber Supply Chain Management (1 of 3),” Sonatype , 2014. https://blog.sonatype.com/2014/12/cyber -supply -chain -management -part1/ (accessed Jan. 02, 2023). [114] P. K. Dutta and S. Mitra, “Application of Agricultural D rones and IoT to Understand Food Supply Chain During Post COVID ‐19,” in Agricultural Informatics , Wiley, 2021, pp. 67 –87. doi: 10.1002/9781119769231.ch4. [115] R. G. G. Caiado, L. F. Scavarda, L. O. Gavião, P. Ivson, D. L. de M. Nascimento, and J. A. Garza -Reyes, “A fuzzy rule -based industry 4.0 maturity model for operations and supply chain management,” Int J Prod Econ , vol. 231, p. 107883, Jan. 2021, doi: 10.1016/j.ijpe.2020.107883. [116] D. Ivanov, “An adaptive framework for aligning (re)planning decisio ns on supply chain strategy, design, tactics, and operations,” Int J Prod Res , vol. 48, no. 13, pp. 3999 –4017, Jul. 2010, doi: 10.1080/00207540902893417. [117] E. R. Royce, “H.R.5793 - 113th Congress (2013 -2014): Cyber Supply Chain Management and Transpare ncy Act of 2014,” Congress.Gov , 2014. http://www.congress.gov/ (accessed Jan. 02, 2023). [118] R. Perez -Franco, “A methodology to capture, evaluate and reformulate a firm’s supply chain strategy as a conceptual system.” Massachusetts Institute of Technolog y, 2010. [119] K. Nikolopoulos, S. Punia, A. Schäfers, C. Tsinopoulos, and C. Vasilakis, “Forecasting and planning during a pandemic: COVID -19 growth rates, supply University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 42 chain disruptions, and governmental decisions,” Eur J Oper Res , vol. 290, no. 1, pp. 99 –115, Apr. 2021, doi: 10.1016/j.ejor.2020.08.001. [120] K. Pramatari, T. Evgeniou, and G. Doukidis, “Implementation of collaborative e-supply -chain initiatives: an initial challenging and final success case from grocery retailing,” Journal of Information Techno logy, vol. 24, no. 3, pp. 269 – 281, Sep. 2009, doi: 10.1057/jit.2008.11. [121] D. Prajogo and J. Olhager, “Supply chain integration and performance: The effects of long -term relationships, information technology and sharing, and logistics integration,” Int J Prod Econ , vol. 135, no. 1, pp. 514 –522, 2012. [122] S. K. Vickery, J. Jayaram, C. Droge, and R. Calantone, “The effects of an integrative supply chain strategy on customer service and financial performance: an analysis of direct versus indirect relation ships,” Journal of operations management , vol. 21, no. 5, pp. 523 –539, 2003. [123] M. Moore et al. , “Scudo: A Proposal for Resolving Software Supply Chain Insecurities in Vehicles The second in a series of whitepapers on emerging and critical issues in aut omotive cybersecurity”. [124] NTIA, “SBOM at a Glance,” NTIA Multistakeholder Process on Software Component Transparency | ntia.gov/sbom , 2021. https://tiny.cc/SPDX (accessed Jan. 02, 2023). [125] J. Wiesner, “CSAF, Not SBOM, Is The Solution,” S4x22 - BSI, 2022. https://www.youtube.com/watch?v=fKlW9vOs7X4&t=504s (accessed Jan. 02, 2023). [126] J. S. Meyers, “Are SBOMs Any Good? Preliminary Measurement of the Quality of Open Source Project SBOMs,” Chainguard , 2022. https://www.chainguard.dev/unchained/are -sboms -any-good -preliminary - measurement -of-the-quality -of-open -source -project -sboms (accessed Jan. 02, 2023). [127] T. Alrich, “Hmm…It seems SBOMs might become big one of these days…,” Blog, 2022. htt ps://tomalrichblog.blogspot.com/2022/04/hmmit -seems -sboms - might -become -big-one.html (accessed Jan. 02, 2023). [128] M. P. on S. C. T. -S. and F. W. G. NTIA, “Survey of Existing SBOM Formats and Standards -Version 2021 Survey of Existing SBOM Formats and Standards Credit: Photo by Patrick Tomasso on Unsplash NTIA Multistakeholder Process on Software Component Transparency Standards and Formats Working Group,” 2021. Accessed: Dec. 24, 2022. [Online]. Available: https://www.ntia.gov/files/ntia/publications/sbom_ formats_survey - version -2021.pdf [129] T. Alrich, “Real -time VEX,” Blog, Sep. 07, 2022. https://tomalrichblog.blogspot.com/2022/09/real -time-vex.html (accessed Jan. 02, 2023). [130] S. Springett, “Vulnerability and Exploitability Transparency - VDR & VEX | OWASP Foundation,” OWASP , Feb. 2023. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 43 https://owasp.org/blog/2023/02/07/vdr -vex-comparison (accessed Apr. 24, 2023). [131] VEX, “Vulnerability Exploitability eXchange (VEX) – Use Cases,” 2022. https://www.cisa.gov/sbom. (accessed Jan. 02, 2023). [132] G. Ishmaev, “The Ethical Limits of Blockchain -Enabled Markets for Private IoT Data,” Philos Technol , pp. 1 –22, Jun. 2019, doi: 10.1007/s13347 -019-00361 -y. [133] M. Chanson, A. Bogner, D. Bilgeri, E. Fleisch, and F. Wortmann, “Blockchain for the IoT: Privacy -preserving protection of sensor data,” J Assoc Inf Syst , vol. 20, no. 9, pp. 1271 –1307, Sep. 2019, doi: 10.17705/1jais.00567. [134] M. A. I. Mozumder, M. M. Sheeraz, A. Athar, S. Aich , and H. -C. Kim, “Overview: Technology Roadmap of the Future Trend of Metaverse based on IoT, Blockchain, AI Technique, and Medical Domain Metaverse Activity,” in International Conference on Advanced Communication Technology (ICACT) , Institute of Electrica l and Electronics Engineers (IEEE), Mar. 2022, pp. 256 – 261. doi: 10.23919/ICACT53585.2022.9728808. [135] V. Chamola, V. Hassija, V. Gupta, and M. Guizani, “A Comprehensive Review of the COVID -19 Pandemic and the Role of IoT, Drones, AI, Blockchain, and 5G in Managing its Impact,” IEEE Access , vol. 8, pp. 90225 –90265, 2020, doi: 10.1109/ACCESS.2020.2992341. [136] A. Javaid, M. Zahid, I. Ali, R. J. U. H. Khan, Z. Noshad , and N. Javaid, “Reputation System for IoT Data Monetization Using Blockchain,” in Lecture Notes in Networks and Systems , Springer, 2020, pp. 173 –184. doi: 10.1007/978 -3-030-33506 -9_16. [137] D. D. Nguyen and M. I. Ali, “Enabling On -demand decentralized I oT collectability marketplace using blockchain and crowdsensing,” in Global IoT Summit, GIoTS 2019 - Proceedings , Institute of Electrical and Electronics Engineers Inc., Jun. 2019. doi: 10.1109/GIOTS.2019.8766346. [138] S. Bajoudah, C. Dong, and P. Missier , “Toward a decentralized, trust -less marketplace for brokered IoT data trading using blockchain,” in Proceedings - 2019 2nd IEEE International Conference on Blockchain, Blockchain 2019 , Institute of Electrical and Electronics Engineers Inc., Jul. 2019, pp . 339 –346. doi: 10.1109/Blockchain.2019.00053. [139] CoinMarketCap, “Cryptocurrency Prices, Charts And Market Capitalizations | CoinMarketCap.” https://coinmarketcap.com/ (accessed Jan. 08, 2023). [140] OFAC, “U.S. Treasury Sanctions Notorious Virtual Curr ency Mixer Tornado Cash ,” U.S. Department of the Treasury , Aug. 08, 2022. https://home.treasury.gov/news/press -releases/jy0916 (accessed Jan. 08, 2023). [141] F. Mogavero, I. Visconti, A. Vitaletti, and M. Zecchini, “The Blockchain Quadrilemma: When Also Computational Effectiveness Matters,” Proc IEEE Symp Comput Commun , vol. 2021 -September, 2021, doi: 10.1109/ISCC53001.2021.9631511. University of Oxford Petar Radanliev, BA Hons., MSc., Ph.D. POSTDOCTORAL RESEARCH ASSOCIATE 44 [142] A. Altarawneh, T. Herschberg, S. Medury, F. Kandah, and A. Skjellum, “Buterin’s Scalability Trilemma viewed through a State -change -based Classification for Common Consensus Algorithms,” 2020 10th Annual Computing and Communication Workshop and Conference, CCWC 2020 , pp. 727–736, Jan. 2020, doi: 10.1109/CCWC47524.2020.9031204. [143] A. Wang, “Rethinking the Rule and Role o f Law in Decentralized Finance,” Proceedings - 2022 IEEE 24th Conference on Business Informatics, CBI 2022 , vol. 2, pp. 118 –125, 2022, doi: 10.1109/CBI54897.2022.10057. [144] H. J. Kim, J. S. Hong, H. C. Hwang, S. M. Kim, and D. H. Han, “Comparison of Psyc hological Status and Investment Style Between Bitcoin Investors and Share Investors,” Front Psychol , vol. 11, p. 3230, Nov. 2020, doi: 10.3389/FPSYG.2020.502295/BIBTEX. [145] B. Johnson et al. , “Cryptocurrency trading and its associations with gambling and mental health: A scoping review,” Addictive Behaviors , vol. 136, p. 107504, Jan. 2023, doi: 10.1016/J.ADDBEH.2022.107504. [146] P. Delfabbro, D. L. King, and J. Williams, “The psychology of cryptocurrency trading: Risk and protective factors,” J Behav Add ict, vol. 10, no. 2, p. 201, Jun. 2021, doi: 10.1556/2006.2021.00037. [147] M. Sun and D. Smagalla, “Cryptocurrency -Based Crime Hit a Record $14 Billion in 2021 - WSJ,” The Wall Street Journal , 2022. Accessed: Mar. 08, 2023. [Online]. Available: https://ww w.wsj.com/articles/cryptocurrency -based - crime -hit-a-record -14-billion -in-2021 -11641500073
{ "id": "2309.12322" }
1912.10105
Dissecting Ethereum Blockchain Analytics: What We Learn from Topology and Geometry of Ethereum Graph
Blockchain technology and, in particular, blockchain-based cryptocurrencies offer us information that has never been seen before in the financial world. In contrast to fiat currencies, all transactions of crypto-currencies and crypto-tokens are permanently recorded on distributed ledgers and are publicly available. As a result, this allows us to construct a transaction graph and to assess not only its organization but to glean relationships between transaction graph properties and crypto price dynamics. The ultimate goal of this paper is to facilitate our understanding on horizons and limitations of what can be learned on crypto-tokens from local topology and geometry of the Ethereum transaction network whose even global network properties remain scarcely explored. By introducing novel tools based on topological data analysis and functional data depth into Blockchain Data Analytics, we show that Ethereum network (one of the most popular blockchains for creating new crypto-tokens) can provide critical insights on price strikes of crypto-tokens that are otherwise largely inaccessible with conventional data sources and traditional analytic methods.
http://arxiv.org/pdf/1912.10105v1
Yitao Li, Umar Islambekov, Cuneyt Akcora, Ekaterina Smirnova, Yulia R. Gel, Murat Kantarcioglu
cs.SI, cs.LG, q-fin.ST
cs.SI
Dissecting Ethereum Blockchain Analytics: What We Learn from Topology and Geometry of Ethereum Graph Yitao LiUmar IslambekovyCuneyt AkcorazEkaterina Smirnovax Yulia R. Gel{Murat Kantarcioglu{ Abstract Blockchain technology and, in particular, blockchain-based cryptocurrencies o er us information that has never been seen before in the nancial world. In contrast to at currencies, alltransactions of crypto-currencies and crypto- tokens are permanently recorded on distributed ledgers and are publicly available. As a result, this allows us to construct a transaction graph and to assess not only its organization but to glean relationships between transaction graph properties and crypto price dynamics. The ultimate goal of this paper is to facilitate our understanding on horizons and limitations of what can be learned on crypto- tokens from local topology and geometry of the Ethereum transaction network whose even global network properties remain scarcely explored. By introducing novel tools based on topological data analysis and functional data depth into Blockchain Data Analytics, we show that Ethereum network (one of the most popular blockchains for creating new crypto-tokens) can provide critical insights on price strikes of crypto-tokens that are otherwise largely inaccessible with conventional data sources and traditional analytic methods. 1 Introduction Past few years marked the beginning of a new era of technology { the era of Blockchain. Blockchain has already revolutionized many elds, from e-payments to digital asset ownership management. Undoubtedly, one of the primary magnets of the Blockchain craze is to take advantage of the unprecedented opportunities to invest (and to lose!) in the largely unregulated crypto-markets via various forms of digital instruments such cryptocurrencies and crypto-tokens. Recent sharp soars and miraculous comebacks of crypto-assets only continue to further heat the investment mania due to unprecedented chances to make a quick, and strikingly high pro t, which in turn goes hand in hand with high investment risk. Naturally, one of the most momentous Purdue University, USA. yBowling Green State University, USA. zUniversity of Manitoba, Canada. xVirginia Commonwealth University, USA. {University of Texas at Dallas, USA.questions nowadays are whether ,howandto what extent we can forecast trading dynamics of crypto-currencies and tokens. Despite many novel analytic challenges associated with blockchain-based nancial instruments, the crypto- market o ers us highly informative and novel data that have never been available before due to data protection and privacy policies in banking { that is, all transactions are permanently recorded and publicly available. This in turn allows us, for the rst time in the history of nance, to construct a global transaction graph and relate its properties to price dynamics. The intuition behind this approach is multi-fold. First, as various patterns of retail shopper activity provide a foundation for assessment of the current state of the economy and form the basis of many economic indicators [32], it is natural to hypothesize that patterns of the transaction graph may also o er a glimpse into crypto-market health. Second, in contrast to retail shopper data that are both heavily aggregated and delayed in time, informa- tion on the transaction graph is available in real time and on a transaction-level basis. Third, availability of the transaction graph allows to study speculative and even malicious behavior of crypto-assets' users which, as often happens in the - nancial world, involves multiple players { such behavior remains largely inaccessible with conventional analytics and requires tools of complex network inference. We show that geometry and local topology of the transaction graph contains a wealth of information on crypto-token market, ranging from price prediction and price anomalies to hidden co-movement of multiple instruments. In contrast, we nd that both conventional variables of nancial time series and global network features of the transaction graph are not capable to glean a deeper insight into crypto price dynamics. Why Ethereum? Ethereum is one of the the most popular blockchain platforms. It allows creating smart contracts and, hence, enables everyone to create a crypto-asset on it. Ethereum tokens are sold through Initial Coin O erings (ICOs). Such token ICOs have Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibitedarXiv:1912.10105v1 [cs.SI] 20 Dec 2019 Figure 1: Betti pivot of the token Powerledger (shown in red). already enabled many start-ups and organizations to raise capital by selling digital coins which allow recip- ients to use a promised service if and when available. Only in 2018 and 2019, Ethereum ICOs raised billions of dollars. As such, analysis of Ethereum networks might be even more acute than cryptocurrency price predic- tion. However, despite this high token activity, net- work structure of Ethereum transaction graph remains largely understudied [12, 18]. Furthermore, to the best of our knowledge, there exist no studies of Ethereum that link crypto-token price analytics with the underly- ing Ethereum transaction graph. Why Not Simpler Methods? Ethereum data poses several challenges. First, the transaction graph is very sparse and dynamic. Nodes (i.e., account ad- dresses) appear and disappear (i.e., no future transac- tion) daily, while the number of transactions widely uc- tuates across days. Hence, conventional graph analytic tools such as global clustering coecient and k-core [15] analysis may not be feasible indicators of token activ- ity. Second, crypto-tokens may exhibit very di erent responses to external positive and negative shocks, and the signal on such a response to shocks which is con- tained in the crypto-token price and global network fea- tures, is weakened due to aggregation. These challenges require development of novel robust graph theoretic ap- proaches that are suitable for analysis of time-varying, highly irregular, and very sparse networks . Proposed Approach. We address the above- mentioned challenges by introducing the arsenal of topo- logical data analysis (TDA) tools into Ethereum data analytics. TDA allows us to systematically and robustly assess a local geometric and topological structure of the Ethereum transaction graph. Our approach is based on the premise that any abnormal situation, for instance price anomaly, viewed as a response to a negative or positive shock (e.g., announcement of a new crypto- currency regulation) is likely to be re ected in the un- derlying topology and geometry of a transaction graph.To study the local network geometry and topology of the Ethereum transaction graph, we blend concepts from al- gebraic topology and functional data analysis. The important methodological distinction of our new approach is that while TDA has been applied before to nancial time series, including time series of cryptocurrencies [20], TDA has never been yet applied to complex networks of nancial transactions on account- based blockchains such as Ethereum . Moreover, to the best of our knowledge, the only other paper discussing utility of TDA on nancial networks, including both traditional nance and blockchain , is our earlier study of Bitcoin graph [1] which belongs to the unspent transaction output (UTXO) based blockchains. Since UTXO based blockchain graphs have transactions with multiple inputs and outputs, the techniques developed for UTXO blockchains cannot be directly applied to account-based blockchains. As such, the importance of our methodology and ndings can be summarized as follows: We o er a novel perspective to risk analysis of crypto- assets, particularly, Ethereum tokens, by dissecting hidden linkages between the token price dynamics and local geometry of the Ethereum transaction graph. While the paper focuses on blockchain data analytics, the proposed novel methodology to risk analysis based on geometry and topology of the transaction graph is applicable beyond crypto instruments. For instance, subject to data availability on transactions and other nancial interactions, the proposed analytic tools can be used for analysis of systemic risk in interbank networks as well as for optimizing strategies in algorithmic stock trading. We propose a new measure of the most illustrative, or \normal" behavior on the Ethereum transaction network: a Betti pivot . Betti pivots, based on analysis of network persistent homology and functional data depth, allow us to quantify and visually assess di erences between normal and anomalous transaction activity, as we show in Fig. 1 for the PowerLedger token. We develop an innovative ltering approach that signi cantly reduces the (prohibitively high) computa- tional costs of TDA. We report the rst results where TDA tools can be adopted in large networks while pre- serving the performance. We report the rst results for crypto-token price anomaly prediction, and show that token networks are likely to contain adequate information to develop arbitrage trading strategies in the real world. As the crypto-token ICOs have reached $12B in the rst half of 2018 [25], our prediction results have important real- life implications for start-up funding. Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited 2 Related Work We outline four relevant research areas: Ethereum graph analysis, Blockchain price prediction and anomaly detection, as well as TDA. Ethereum graph analysis. Di ering from crypto- currencies (e.g., Bitcoin) where each transaction can have multiple inputs and outputs [33], Ethereum trans- actions transfer ether or tokens from one address to an- other. As such, Ethereum lends itself to traditional net- work analysis. For instance, [4] studied empirical prop- erties of Ethereum and [36] explored token networks, in terms of degree distribution, power laws and clustering. However, there are yet no results that employ network tools for Ethereum price analytics. Cryptocurrency price prediction . Analyzing trans- actions and addresses to track the Bitcoin economy has become an important research direction. A time se- ries prediction approach by [29] uses a Bayesian opti- mized RNN and LSTM network with varying degrees of success. Blockchain features, such as average trans- action amount, are also shown to exhibit mixed perfor- mance for cryptocurrency price forecasting [22]. Var- ious blockchain graph characteristics, such as average degree, can be used as prediction features. Recently, [2] employed blockchain motifs, termed chainlets, as fea- tures to predict Bitcoin price. However, all the mentioned approaches are carried out to track a single cryptocurrency. In contrast, our goal is to track multiple cryptoassets at the same time. Blockchain anomaly detection. Blockchain ad- dresses can be linked to identify people behind suspi- cious transaction patterns in cryptocurrencies [37]. The pattern is usually de ned as a repeating shape that in- volves moving coins from a (black) address to an online exchange, where the coins can be cashed out without be- ing con scated by authorities. The black address that starts the transaction chain may be related to money laundering [30], blackmailing [34] and ransomware pay- ments [24]. There exists ample evidence of these anoma- lies in the transaction network [5]. A more recent ap- proach found anomalies in Bitcoin price by linking ad- dresses to transactions in time [23]. In contrast, we do not assume any prior knowledge about pattern shapes or addresses; our unsupervised data depth approach tracks token networks for price anomalies. Topological Data Analysis. TDA is an emerging eld at the interface of algebraic topology, statistics, and computer science. The rationale is that the observed data are sampled from some metric space and the underlying unknown geometric structure of this space is lost due to sampling. The key idea is to recover the lost underlying topology [39]. Persistent homology (PH) is one of the tools to characterize a topologicaldata structure under varying scales of dissimilarity. The most widely used topological summaries of persistent features are the Betti numbers, barcode plots, persistent diagrams, and persistent landscapes [19]. However, barcode plots and persistent diagrams cannot be easily used in machine learning models [7]. Di ering from these approaches, we propose Betti pivots, which can be directly integrated with functional data analysis tools. 3 Methodology Problem Statement: Given the transaction network of an Ethereum token and time series of the token prices in at currency, predict whether the token absolute price return R t= (PricetPricet1)=(Pricet1) will change more than jj>0, in the next hdays. Further- more, identify the maximum horizon value hsuch that the prediction accuracy is at least . That is, the ulti- mate goal is to predict whether a window of the next hdays,h >0, will contain a price return anomaly. In return, an informed and reliable answer to this question allows to optimize investment strategies in algorithmic trading, and higher his preferred. The key idea behind our approach is the following: rst, armed with TDA, extract multi-resolution topo- logical summaries of the Ethereum network and then in- corporate the resulting geometric information into anal- ysis of token prices. As the primary TDA methodolog- ical engine, we employ the tool of persistent homology due to its exibility in integration with machine learning models. We start by detailing persistent homology and associated topological summaries. 3.1 Persistent Homology and a New Look at Its Summaries via Functional Data Analysis { Betti Limits LetG= (V;E;! ) be a weighted graph, where VandEare the set of nodes and edges, respectively; !:E!R[f1g is a weight function encoding similarity between two nodes connected by an edge. To account for dissimilarity between two disconnected nodes, we introduce the weight ~ !:VV!R[f1g ~!uv= !uv(u;v)2E; 1 (u;v)=2E: where !uv=h 1 + AuvAmin AmaxAmini1 : HereAuvis the amount of transferred tokens by transactions between nodes uandv;AminandAmax are the smallest and largest transaction amounts, re- spectively. That is, the larger the transferred amount, the smaller the inter-nodal dissimilarity. We set = 9 to map weights to the interval [0 :1;1]. The most important aspect of Persistent Homology Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited (PH) is that it allows us to analyze data at multiple spa- tial resolutions in a uni ed way, bypassing a subjective selection of the dissimilarity parameter or searching for its optimal value. However, to be able to extract topo- logical information from a point cloud, it needs to be equipped with a structure of a topological space. In the context of PH, this is commonly achieved by construct- ing an abstract simplicial complex on the top of data points. De nition 1. (Abstract simplicial complex) Let Xbe a discrete set. An abstract simplicial complex is a collectionCof nite subsets of Xsuch that if 2C then2Cfor all. Ifjj=p+ 1, thenis called ap-simplex . Intuitively, a simplicial complex can be viewed as a higher dimensional generalization of graphs which rep- resents a structure consisting of points, edges, triangles and their higher order counterparts. Vietoris-Rips is a widely used simplicial complex due to its easy construc- tion and fast computational implementation [8]. De nition 2. (Vietoris-Rips complex) LetXbe a discrete set in some metric space. A Vietoris-Rips complex on Xat dissimilarity scale 0, denoted byVR, is an abstract simplicial complex whose p- simplices,p= 0;:::;d , consist of points which are pairwise within distance of . Here,dis called the dimension of the complex. Remarkably, simplicial complexes can not only be re- garded as topological spaces from which topological information is derived, but also as combinatorial ob- jects which are convenient for computational purposes. Hence, this dual nature of simplicial complexes turns the task of extracting topological information into a compu- tationally feasible combinatorial problem [13]. Now, we x a sequence of scale resolutions 1<2< :::<nand form a chain of nested VR complexes called a( nite) VR ltration VR1VR2:::VRn, whereVRk,k= 1;:::;n , is a VR complex on Vsuch thatVRk= Vj~!uvk;8u;v2 . Armed with the VR ltration, we now get a for- mal multi-resolution glimpse into the Ethereum network topology and geometry and track topological features that appear and later disappear as the scale param- eter increases. Evolution of such topological features sheds light on organization of the Ethereum transac- tion network. That is, we can expect that features with a longer lifespan, i.e. persistent features , have a higher role in explaining functionality of the Ethereum network than features with a shorter lifespan. These short term features are regarded as topological noise . Persistent features are instrumental for distinguishing anomalous dynamics in token transaction activities. We extractdescriptors of such topological features at a multi level in the form of sequences of Betti numbers . De nition 3. (Betti number) Betti-pnumber of a simplicial complex Cof dimension d, denoted by p(C), is de ned as the rank of the p-th homology group of C, p= 0;1;2;:::;d . Fortunately, for applied data analysis Betti- pnumber has a simpler practical interpretation, i.e. Betti-0 is the number of connected components, Betti-1 is the number of loops (or holes), Betti-2 is the number of voids (or cavities), etc. In this paper, we consider features up to dimension 2 and takeCto be a VR complex. Following the PH methodology, we compute sequences of Betti numbers of a chain of nested VR complexes and thereby track the counts of di erent topological features at increasing scales of complexity. Note that the resulting topological descriptors in the form of Betti numbers over a VR ltration depend on kand are intrinsically in nite dimensional. As such, an intuitive approach to analyze their dynamic properties is via functional data analysis (FDA) [31, 38]. In this context, we introduce a novel concept of Betti limits which relates these counts to the scale parameter viewed as continuum . De nition 4. (Betti limit) LetfCkgn k=0be a ltra- tion of simplicial complexes where fkgn k=0is an increas- ing sequence of scales such that 0= 0 andn=Lfor someL > 0. Then, the Betti- plimitBp: [0;L]! Z[f0g,p= 0;:::;d , is de ned as Bp() = lim max k!0 p(Ck) where the max is taken over all k= 0;:::;n ,k= kk1andkis the index such that 2[k1;k) The Betti limits can be regarded as functional sum- mary statistics of the network's topological structure and o er multi-fold bene ts. First, the Betti limits pro- vide a systematic linkage with the tools of functional data analysis (FDA). For instance, underlying nonlin- ear dynamics of the Betti limits can be then assessed with derivatives and associated manifold learning and empirical di erential equations. In turn, relative posi- tions of individual trajectories of the Betti limits can be quanti ed using a concept of functional data depth . Furthermore, Betti limits can be viewed as generalized descriptors of network topology for a class of continu- ous latent space models, particularly, including distance models and graphons [9, 35]. We leave this more funda- mental mathematical hypothesis on characterizing ge- ometry of the continuous latent space network models via Betti limits for future research. Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited 3.2 Functional Data Depth of Betti Limits Let f(Gt;~!t)gT t=1be a time series of weighted graphs and fBp;tgT t=1be the associated sequence of Betti limits. To assess which topological descriptors (or equivalently which transaction networks) signal towards anomalous patterns relative to others, we employ the notion of data depth . De nition 5. (Data Depth) Informally, data depth is a function that measures how closely a given mul- tivariate observation is located to the \center" of the observed point cloud. That is, data depth extends the concept of quantiles from univariate to multivariate dis- tributions. Formally, let Fbe a set of probability dis- tributions on a Banach space X(e.g.,X=Rn). A data depth is a function D:XF! [0;1]such that D(jF)is a center-outward ordering of elements of X with respect to F. (Here, by a center-outward order- ing, we mean that each element of Xis assigned a score from 0 to 1 such that a higher score implies that the element is more centrally located within a point cloud and a lower score implies that the element is likely to be an outlier in respect to the remaining elements.) The depth ofy2X with respect tofyigm i=1X , denoted byD(yjy1;:::;ym), is de ned as D(yj^Fm), where ^Fmis the empirical distribution of fyigm i=1. Since we focus on Betti limits, we resort to func- tional data depths (i.e., where Xis a space of func- tions). Among such functional depths, the modi ed band depth (MBD) [26] is particularly well-suited for detecting anomalies as MBD accounts for both the shape and magnitude of the function graphs. In ad- dition, MBD is robust and enjoys fast computational implementation. However, our framework is suciently general and can be integrated with any functional data depth function. De nition 6. (MBD) LetB(I)be the Banach space of bounded functions on interval Iandbe the Lebesgue measure. Given Y=fy1;y2;:::;ymg B(I). The MBD ofy2B(I)with respect toYis MBD (yjY) =m 21 (I)1X 1i1i2m(A(y;yi1;yi2)) whereA(y;yi1;yi2) =fx2I:min r=i1;i2yr(x)y(x) max r=i1;i2yr(x)g Intuitively, MBD (yjY) measures the extent to which the graph of a function ylies within the bands deter- mined by the graphs of all possible pairs from Y= fy1;y2;:::;ymg. MBD enables us to order a set of func- tions in [0;1]-scale, where the depth values closest tozero and one correspond to the most anomalous and central functions, respectively. We introduce a concept ofBetti pivots which is de ned as the deepest or most central Betti limit. De nition 7. (Betti pivot) For a given collection of Betti limitsfBp;t1;Bp;t2;:::;Bp;tmg, their Betti pivot is de ned as Bs p=argmax Bp;t2fBp;t1;:::;Bp;tmgMBD (Bp;tjBp;t1;:::;Bp;tm) To measure how the Betti limits change over time and compare with the ones prior to them, we calculate the MBD depth of each day's Betti limit with respect to those of the past wdays. We introduce a notion of rolling depth (RD) on Betti limits RDw(Bp;t) :=MBD (Bp;tjBp;t;:::Bp;tw+1): (3.1) Note that RD2(0;1) and shows the position of the Betti limit on any given day t, relative to the past w days. In turn, the Betti pivot yields the most central, or the "baseline" behavior of Betti limits over a subset of dayst1;:::;tm. The concept of RD echoes the rolling window approaches used to detect signals of short and long term trends in algorithmic trading and to construct stock price indicators such as percentage price oscillator and moving average convergence divergence [40]. 3.3 Anomaly Detection with Topological Fea- tures We label a day tas anomalous in Ethereum to- ken trading, if there is a price shock on day t, that is, if jRtj, where>0 is a trader-de ned threshold (i.e., magnitude of a price shock) (see Problem Statement in Section 3). We combine new graph topological features with traditional network summaries and build one pre- dictive model for each token. We then examine model performance for di erent prediction horizons h>0. Our token-based price anomaly detection methodol- ogy for Ethereum crypto-tokens problem is summarized as follows. For each day, t, with available token data, we calculate the binary ag variable with values equal to true if price strike in terms of the absolute token price return (jRtj), has been detected in at least one of the nexthdays (i.e., days t+ 1;t+ 2;:::;t +h) and false otherwise. Here, t= 1;:::;Tkis the set of histor- ical dates for which we have the k-th token data. For dayt, we compute the token's normalized open price, PNt=Pricet=maxfPrice 1;:::;Price Tkg. Next, we construct the user transactions network Gfork-th to- ken on day t. FromG, we calculate the number of user transactions E. Model validity: In our prediction models we use past information up to and including day tto predict anomalies for day t+ 1 (i.e., prediction horizon hof 1) or dayst+h(i.e., longer prediction horizons h,h>1). Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited Table 1: Model descriptions Model Description F: Model Inputs M1 Baseline PN,nE,nV,GC M2 Betti 0PN,nE,nV,GC, RD7(B0) M3 Betti 0, 1PN,nE,nV,GC, RD7(B0);RD 7(B1) M4 Full modelPN,nE,nV,GC, RD7(B0),RD7(B1); RD 7(B2) Hence, these experimental settings ensure that no data leakage occurs. Filtering. Although Betti numbers provide a non- parametric solution to combine information on edge dis- similarity with node connectedness, the computational complexity of Betti calculations prohibits their usage in large networks. For example, for 2-simplicial complexes, \currently no upper bound better than a constant times n3is known" [16]. To decrease complexity, we induce a sub-network G0by selecting Kusers who have the most edges in the network G. This ltering not only re- duces the network size, but also removes network order uctuations across time. Di erences in Betti numbers of daily token networks can now be attributed to edges and their weights directly. From G0, we then calculate 7-day rolling depth values (3.1) RD7(B0),RD7(B1) and RD7(B2), respectively. Rationale behind our modeling approach is that network topological features, summarized in terms of RD of Betti limits, add an important layer of infor- mation that can be missed by the traditional net- work summaries. Hence, to test the improvement in anomaly prediction due to adding the network topo- logical features, we evaluate predictive performance of the four models listed in Table 1, using normalized token price (PN), graph based (edge count nE, node countnV, average clustering coecient GC) and topo- logical variables (rolling depth values of Betti limits RD7(B0);RD 7(B1);RD 7(B2)). Models are tted using Random Forest (see Section 4). 4 Experimental Settings Dataset. We created our dataset by installing the of- cial Ethereum Wallet and downloading all blocks. We used the EthR ( github.com/BSDStudios/ethr ) library to query Ethereum blocks through the Go Ethereum Client (i.e., Geth). Our set contains all Ethereum data during 07/2015-05/2018, with a total of 5.5 million blocks. Our data and code are available at github. com/yitao416/EthereumCurves . By parsing the data, we discovered 1.7K ERC20 tokens which had more than 10K transactions. We Figure 2: Ethereum token start dates. included an ERC20 token in our analysis if it had more than $100M in market value, as reported by the EtherScan.io online explorer. This choice has resulted in 31 tokens and is motivated by a goal of developing veri able prediction results on valuable tokens which likely will not fail and disappear in a short time. On average, each token has a history of 297 days, with minimum and maximum of 151 and 576 days, respectively. The rst dates of tokens on the Ethereum blockchain are reported in Figure 2. Betti Descriptors. We compute the Betti limits for up top= 2 (i.e.,B0;:,B1;:andB2;:) by using GUDHI (i.e., a generic open source C++ library for TDA [28]). We a- priori setKof 150 in the ltered network approach (see Section 3.3), as even for the most traded tokens such as Tronix and Bat, top 150 nodes in daily networks form 75% and 80% of all edges, respectively. The ltered node approach e ectively removes 20 25% of edges in Betti calculations, which reduces computational costs. Prediction Models. We set the rst 2 =3 and 1=3 of a token's timeline period as training and testing sets, re- spectively. We report our results based on Random For- est models which consistently outperform Box-Jenkins models for all prediction horizons. For example, at 2- day ahead forecasting, the best Box-Jenkins autoregres- sive integrated moving average (ARIMA) model with all predictors (M4) yields a prediction accuracy of 89%, whereas our results for Random Forest model (M4) reach 94%. For space limitations, we detail ARIMA settings and results in the supplementary material. Each Ran- dom Forest model uses 500 trees, and sampling all rows of the dataset is done with replacement. Number of variables used at each split for all the four models is the oor of number of features. The models are imple- mented using the randomForest package in R. Finally, for illustrative purposes we set the magni- tude of the price shock = 0:25, following the guidelines on the trading cost perspectives by [14]. (For the de- tailed overview on the trader-de ned choice of and Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited associated investment strategies see [3, 10, 6].) 5 Experimental Results We now illustrate what practical insights the resulting extracted information on the local geometry and topol- ogy of the Ethereum transaction graph can bring into crypto-token analytics. 5.1 Hidden Cointegration of Price and Graph Topology: How Do Tokens Co-move? Cointegra- tion refers to a phenomenon when two economic or - nancial time series follow a common stochastic trend which is represented as a linear combination of system shocks [17] { that is, the two time series exhibit a simi- lar response to shocks. In contrast, hidden cointegration analysis, as a variant of nonlinear cointegration, allows to assess a response of the two time series to various asymmetric system shocks, i.e. upward and downward movements due to, for example, positive and negative media news [21]. To develop the best arbitrage trading strategy based on multiple assets [11], the primary interest of many al- gorithmic trading platforms is to gain an insight on: which nancial instruments exhibit joint co-movement trends?, and what can serve as a sign for future co- movement patterns? Intuitively, pairs of instruments that have exhibited co-movements in the past, are like- lier to show co-movements in the future [27]. Our study is then motivated by the following queries: Can cointe- gration in the currently observed local topological struc- tures of crypto-tokens be a sign for future cointegration in crypto-token prices? Does this information contain an additional utility, compared to the cointegration of the currently observed crypto-token prices? To address these queries, for each pair of tokens, we nd their common trading time interval and equally divide it into two periods. The hidden cointegration tests [17, 21] are then conducted in both periods for pairs of crypto-tokens in terms of their i) prices and ii) Betti descriptors. As Figure 3 shows, only 9 pairs of crypto-tokens are cointegrated in price in both training and testing periods. In contrast, in 15 cases a cointegration in Betti descriptors in the training period is also re ected in a crypto-token price cointegration in the testing period. Hence, we can conclude that previous cointegration in Betti descriptors of crypto-tokens might be a stronger sign for future cointegration in the prices of these crypto-tokens . Furthermore, price and Betti cointegrations found in the training period among the 31 considered tokens are almost disjoint, with the exception of the civic - qtum pair. These ndings suggest that local topology of crypto-token graphs is likely to contain importantcomplementary information to more traditional data sources such as prices . (a) Price co-integration in to- kens. (b) Betti co-integration in to- kens. Figure 3: Cointegrated tokens that are also cointegrated in future price. An edge denotes cointegration. Figure 4: Model Accuracy 5.2 Performance in Crypto-Token Price Anomaly Forecasting We predict price anomalies in 31 token networks, where a total of 9,042 days are predicted as anomalous (anomaly:true) or non- anomalous (anomaly:false). On 145 of these days, a true price anomaly occurs, as de ned by a change in the absolute price return of more than 0.25. Mean and median numbers of anomalies are 6.59 and 2 per token, respectively. The Veros token had a maximum of 46 anomalies. Nine tokens do not have any price anomalies in their test period (the last 1/3 of their timeline). In the days leading up to 2018 January, token prices exhibit substantial increases; on some days more than 20 tokens show >0:25 absolute price returns. In this period (Oct-Dec 2017) price of the Ethereum currency, ether, increased from $305 to $1,389. In 2018 Jan we see token prices decreasing sharply, but unlike the increase period, we observe fewer ( 7) anomalies in tokens on the same day. Fig. 5 depicts the number of anomaly/true predic- tions by models. Models M2, M3 and M4 (Betti models) predict the same 138 days as anomalous. Additional 13 Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited Figure 5: A Venn diagram for the number of predicted anomalies in all token networks for h= 2. Intersecting regions indicate agreement on predictions days are predicted anomalous by either only Betti model M2 (6 days) or Betti model M3 (7 days). Betti models make a lower number of anomaly:true predictions com- pared to the baseline M1 model, which uses traditional features such as price and number of edges. For exam- ple, there are 186 true anomalies ( h= 2, i.e., anomalies in either of the next two days) in the considered token networks. M4 makes 146 anomaly/true predictions, and 86 of them are indeed true anomalies. In M1 these val- ues are 238 and 94, respectively. Compared to M4, M1 predicts 92 more days as anomalous, but only 8 of them are true anomalies. Table 2 shows model accuracy values for the top ten tokens, ordered by average edge counts in daily networks. Models have high accuracy values, but for some tokens, such as icon, we reach high accuracy (i.e., 0.9) with the full model only. We show the accuracy improvement over the baseline model M1 in Fig. 4. For up to 7-day horizons, all Betti models have a positive gain over the baseline model M1. Compared to other models, the M4 (full) model has the best performance as horizon increases from 1 to 7. The accuracy results o er evidence that Betti models are more conservative in making anomalous day predictions, and their accuracy is better than the baseline model M1. The recall results in Fig. 6a show that M3 delivers the highest gain in recall for all horizons. Fig 6b depicts the precision results. For hof 1, recall values are the highest but precision gains are negative. We achieve the best performance for hof 2, where both precision (in M4) and recall (in M3) gains are over 20%. As M4 di ers from M3 in its use of B2, we nd the di ering performance of M3 and M4 in Figures 6a and 6b interesting. In particular, the results indicate that the use of B2in M4 decreases the number of correctly predicted true anomalies, but increases the number of true anomalies in predictions. Although predicting true negatives (non-anomalous days) is useful, the most important task of anomaly (a) Recall (Sensitivity) (b) Precision Figure 6: Performance for increasing horizon values. detection is to predict true anomalies well in advance. The unbalanced nature of our dataset complicates this task; only 1.58% of all days are true anomalies, limiting the training cases to a few days per each token. For h of 2, we achieve the highest average precision of 0.393 per token in M4. 6 Conclusions We have introduced the concepts of persistent homol- ogy and functional data depth to analysis of a yet un- tapped source of information on cryptocurrency dynam- ics: Ethereum transaction graph, and we have inves- tigated such phenomena as price anomaly forecasting and hidden co-movement in pairs of tokens (Please see appendix for more details). Furthermore, we have pro- posed new functional summaries of topological descrip- tors, namely, Betti limits and Betti pivots. Our ndings indicate that Betti pivots of the Ethereum transaction graph deliver up to 40% improvement in precision over baseline methods in price anomaly prediction. Based on our analysis, we advocate that local geometry and topology of the transaction graph has a high utility in Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited Table 2: Accuracy for h= 2 for the top-10 (by edge count E) tokens. token M1 M2 M3 M4 E tronix 0.861 0.962 0.962 0.975 5198.2 omisego 0.890 0.970 0.940 0.990 3027.7 mcap 0.887 0.904 0.913 0.913 1502.1 storj 0.933 0.971 0.952 0.962 1224.3 bnb 0.927 0.969 0.979 0.979 1089.5 zrx 0.955 0.966 0.966 0.978 905.4 cybermiles 0.922 0.961 0.961 0.961 872.7 vechain 0.954 0.966 0.920 0.954 851.7 icon 0.754 0.877 0.877 0.908 783.5 bat 0.965 0.965 0.965 0.965 773.5 such important research directions on blockchain data analytics as health of the crypto-token ecosystem and identi cation of malicious trading activities. Further- more, the newly proposed concepts of Betti limits and Betti pivots and, more generally, a systematic linkage of TDA and FDA o er new perspective in data shape analysis way beyond blockchain applications. 7 Acknowledgments Gel has been partially supported by NSF DMS 1925346, IIS 1633331 and ECCS 1824716. Kantarcioglu has been partially supported by NIH 1R01HG006844, NSF CICI- 1547324, and IIS-1633331. References [1]N. Abay, C. Akcora, Y. Gel, U. Islam- bekov, M. Kantarcioglu, B. Thuraisingham, and Y. Tian ,Chainnet: Learning on blockchain graphs with topological features , in IEEE ICDM, 2019, pp. 1{7. [2]C. G. Akcora, A. K. Dey, Y. R. Gel, and M. Kantarcioglu ,Forecasting bitcoin price with graph chainlets , in PaKDD, 2018, pp. 765{776. [3]S. Amini, B. Gebka, R. Hudson, and K. Keasey ,A review of the international literature on the short term predictability of stock prices conditional on large prior price changes: Microstructure, behavioral and risk related explanations , Int. Review of Financial Analysis, 26 (2013), pp. 1{17. [4]A. Anoaica and H. Levard ,Quantitative description of internal activity on the ethereum public blockchain , in NTMS, IEEE, 2018, pp. 1{5. [5]A. Bogner ,Seeing is understanding: anomaly detec- tion in blockchains with visualized features , in ISWC, ACM, 2017, pp. 5{8. [6]K. Brady and A. Premti ,How do investors deter- mine stock prices after large price shocks? , Journal of Behavioral Finance, 20 (2019), pp. 354{368. [7]P. Bubenik ,Statistical topological data analysis using persistence landscapes , JMLR, 16 (2015), pp. 77{102.[8]G. Carlsson ,Topology and data , Bull. of the AMS, 46 (2009). [9]F. Caron and E. B. Fox ,Sparse graphs using exchangeable random measures , JRSS B, 79 (2017), pp. 1295{1366. [10]D. Chambers, K. Black, and N. Lacey ,Alternative investment: A primer for investment professionals , Chartered Financial Analyst Institute, (2018). [11]E. Chan ,Algorithmic trading: winning strategies and their rationale , vol. 625, John Wiley & Sons, 2013. [12]W. Chan and A. Olmsted ,Ethereum transaction graph analysis , in 2017 IEEE 12th ICITST, 2017, pp. 498{500. [13]F. Chazal and B. Michel ,An introduction to Topo- logical Data Analysis: fundamental and practical as- pects for data scientists , ArXiv, (2017), pp. 1{38. [14]A. Claes, M. De Ceuster, and H. Zhang ,How do stocks react after extreme daily returns? the dutch case , Dynamics in economics: Essays in honour of Joseph Plasmans, (2010), pp. 11{24. [15]S. N. Dorogovtsev, A. V. Goltsev, and J. F. F. Mendes ,K-core organization of complex networks , Physical review letters, 96 (2006), p. 040601. [16]H. Edelsbrunner and S. Parsa ,On the computa- tional complexity of betti numbers: reductions from ma- trix rank , in ACM-SIAM SODA, 2014, pp. 152{160. [17]R. Engle and C. W. Granger ,Long-run Economic Relationships: Readings in Cointegration, Advanced Texts in Econometrics , Oxford University Press, 1991. [18]S. Ferretti and G. D'Angelo ,On the ethereum blockchain structure: A complex networks theory per- spective , Concurrency and Computation: Practice and Experience, (2019). [19]R. Ghrist ,Barcodes: The persistent topology of data , Bull. Amer. Math. Soc, 45 (2008), pp. 61{75. [20]M. Gidea, D. Goldsmith, Y. A. Katz, P. Roldan, and Y. Shmalo ,Topological recognition of critical transitions in time series of cryptocurrencies , Available at SSRN 3202721, (2018). [21]C. Granger and G. Yoon ,Hidden cointegration , (2002). [22]A. Greaves and B. Au ,Using the bitcoin transaction graph to predict the price of bitcoin , No Data, (2015). [23]J. M. Griffin and A. Shams ,Is bitcoin really un- tethered? , (2018). [24]D. Y. Huang and D. McCoy ,Tracking ran- somware end-to-end , in Tracking Ransomware End-to- end, IEEE, 2018, pp. 1{12. [25]C. Long ,Icos were 45% of ipos in q2 2018, as cryptos disrupt investment banks . online: https://www.forbes.com/sites/caitlinlong/. [26]S. Lopez-Pintado and J. Romo ,On the concept of depth for functional data , JASA, 104 (2009), pp. 718{ 734. [27]B. G. Malkiel and E. F. Fama ,Ecient capital markets: A review of theory and empirical work , J. of Finance, 25 (1970), pp. 383{417. [28]C. Maria, J.-D. Boissonnat, M. Glisse, and M. Yvinec ,The gudhi library: Simplicial complexes Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited and persistent homology , in Int. Congress on Mathe- matical Software, 2014, pp. 167{174. [29]S. McNally, J. Roche, and S. Caton ,Predicting the price of bitcoin using machine learning , in PDP, IEEE, 2018, pp. 339{343. [30]M. Moser, R. Bohme, and D. Breuker ,An inquiry into money laundering tools in the Bitcoin ecosystem , in eCrime Res. Summit, 2013, pp. 1{14. [31]J. O. Ramsay ,Functional data analysis , Encyclopedia of Statistical Sciences, 4 (2004). [32]M. Reinsdorf and J. E. Triplett ,A review of reviews: Ninety years of professional thinking about the consumer price index , in Price index concepts and measurement, U. of Chicago Press, 2009, pp. 17{83. [33]D. Ron and A. Shamir ,Quantitative analysis of the full bitcoin transaction graph , in ICFCDS, Springer, 2013, pp. 6{24. [34]A. D. S. Phetsouvanh, F. Oggier ,Egret: Extortion graph exploration techniques in the bitcoin network , inICDM DaMNet, 2018. [35]A. L. Smith, D. M. Asta, and C. A. Calder ,The geometry of continuous latent space models for network data, arXiv preprint arXiv:1712.08641, (2017). [36]S. Somin, G. Gordon, and Y. Altshuler ,Net- work analysis of erc20 tokens trading on ethereum blockchain , in ICCS, 2018, pp. 439{450. [37]M. Spagnuolo, F. Maggi, and S. Zanero ,Bitio- dine: Extracting intelligence from the bitcoin network , in ICFCDS, Springer, 2014, pp. 457{468. [38]J.-L. Wang, J.-M. Chiou, and H.-G. M uller , Functional data analysis , Annual Review of Statistics and Its Application, 3 (2016), pp. 257{295. [39]L. Wasserman ,Topological data analysis , Annual Review of Statistics and Its Application, (2018). [40]V. Zakamulin ,Market Timing with Moving Averages: The Anatomy and Performance of Trading Rules , 2017. Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited A Supplementary Material This supplementary material consists of two parts. We provide the generation algorithm for Betti pivots and rolling depths (RD) on Betti limits, and discussion of performance of conventional time series models. Sym- bols are listed in Table 3. A.1 The Pivot generation algorithm Algo- rithm 1 details the generation process for Betti pivots and rolling depths (RD) on Betti limits. Figure 7 depicts discrete realizations of Betti limits (i.e., Betti numbers) for the Tronix token on 4 consecu- tive days in February 2018. Figure 7: Betti numbers of the Tronix token.A.2 Temporal Models To advocate the use of Ran- dom Forest classi ers, in this subsection we o er a glimpse into performance of traditional time series mod- els based on conventional information sources as well as Betti pivots of the transaction graph. In time series analysis and forecasting, Autore- gressive Integrated Moving Average (ARIMA) model with exogeneous regressors is a conventional benchmark choice [ ?]. For each token, we divide the data set into training and test by ratio 2:1. The ARIMA model is constructed in the training set to predict anomalies in the test set. The optimal ARIMA model is selected based on the Hyndman-Khandakar algorithm [ ?] which considers unit root tests, the minimization of the corrected Akaike Information Criterion (AICc) and maximum likelihood estimator (MLE). We consider ve models based on the employed features: the price autoregressive model and four dynamic regression models with di erent sets of lagged predictors. The lagged period is experimented from 1 day to 7 days; the lagged 3 days' predictors have the best price prediction. The calculation of prediction intervals is under the conventional assumption that the residuals are a white noise and follow a normal distribution. As Figure 8 shows, all dynamic regression models outperform the price autoregressive model. Compared with the benchmark (M1), the models with topological inputs have much narrow con dence intervals. Espe- cially, for the shown Bat token, there exists a strong alignment between the full model prediction (M4) and the actual price movement. Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited Figure 8: ARIMAx performance with topological models in the BAT token. The shaded region shows the vertical con dence interval ( = 0:05) around the predicted price. The M4 model contains all Betti predictors, and its predicted con dence interval gives the closest prediction to the actual price. Table 3: Symbols and notations. Symbol Explanation ~! extension of ! F feature matrix h prediction horizon (in days)  min price change for anomaly  scale parameter C simplicial complex at scale  Rt Price return for day t nE,nV number of edges, nodes GC average clustering coecient PN Normalized price VR Vietoris-Rips complex at scale  p,Bp,Bs p Betti-pnumber, limit and pivot RD and MBD rolling and modi ed band depthAlgorithm 1 Betti Pivots and Rolling Depths (RD) on Betti Limits Generation 1:procedure number (G: token graph, K: lter,d: Betti dimension max, w: window) 2: induce graph G0fortopKnodes 3: compute ~!uvfor eache= (u;v)2G0 4: forBetti dimension p = f0,. . . ,dgdo 5: foreach dayG0 t2G0do 6: computeBp;t 7:Bs p argmax Bp;t2fBp;t1;:::;Bp;tmgMBD (Bp;tjBp;t1; : : : ;Bp;tm) 8: Ft p RDw(Bp;t) 9: end for 10: end forreturn feature matrix F 11:end procedure Copyright c 2020 by SIAM SDM 2020 Unauthorized reproduction of this article is prohibited
{ "id": "1912.10105" }
2209.09832
Disorder Unleashes Panic in Bitcoin Dynamics
The behaviour of Bitcoin owners is reflected in the structure and the number of bitcoin transactions encoded in the Blockchain. Likewise, the behaviour of Bitcoin traders is reflected in the formation of bullish and bearish trends in the crypto market. In light of these observations, we wonder if human behaviour underlies some relationship between the Blockchain and the crypto market. To address this question, we map the Blockchain to a spin-lattice problem, whose configurations form ordered and disordered patterns, representing the behaviour of Bitcoin owners. This novel approach allows us to obtain time series suitable to detect a causal relationship between the dynamics of the Blockchain and market trends of the Bitcoin and to find that disordered patterns in the Blockchain precede Bitcoin panic selling. Our results suggest that human behaviour underlying Blockchain evolution and the crypto market brings out a fascinating connection between disorder and panic in Bitcoin dynamics.
http://arxiv.org/pdf/2209.09832v1
Marco Alberto Javarone, Gabriele Di Antonio, Gianni Valerio Vinci, Raffaele Cristodaro, Claudio J. Tessone, Luciano Pietronero
physics.soc-ph, cond-mat.stat-mech
physics.soc-ph
Disorder Unleashes Panic in Bitcoin Dynamics Marco Alberto Javarone,1, 2,Gabriele Di Antonio,1, 3, 4, Gianni Valerio Vinci,3, 5,Ra aele Cristodaro,6Claudio J. Tessone,6, 7and Luciano Pietronero1 1Centro Ricerche Enrico Fermi, Rome, Italy 2University College London - Centre for Blockchain Technologies, London, UK 3Istituto Superiore di Sanit a, Rome, Italy 4Universit a degli Studi Roma Tre, Rome, Italy 5Universit a Roma Tor Vergata, Rome, Italy 6Blockchain and Distributed Ledger Technologies, Institute of Informatics, University of Zurich, Z urich, Switzerland 7UZH Blockchain Center, University of Zurich, Z urich, Switzerland (Dated: September 21, 2022) The behaviour of Bitcoin owners is re ected in the structure and the number of bitcoin transactions encoded in the Blockchain. Likewise, the behaviour of Bitcoin traders is re ected in the formation of bullish and bearish trends in the crypto market. In light of these observations, we wonder if human behaviour underlies some relationship between the Blockchain and the crypto market. To address this question, we map the Blockchain to a spin-lattice problem, whose con gurations form ordered and disordered patterns, representing the behaviour of Bitcoin owners. This novel approach allows us to obtain time series suitable to detect a causal relationship between the dynamics of the Blockchain and market trends of the Bitcoin and to nd that disordered patterns in the Blockchain precede Bitcoin panic selling. Our results suggest that human behaviour underlying Blockchain evolution and the crypto market brings out a fascinating connection between disorder and panic in Bitcoin dynamics. Introduction - Blockchain [1, 2] is a distributed ledger technology introduced by Satoshi Nakamoto [1], rapidly expanding in many sectors of our society, the economy and industry. Among the several applications, cryptocurrencies such as Bitcoin represent the most successful ones. Bitcoin is a digital currency whose transactions get managed by a fully decentralised system that hinges on a blockchain. The latter has a data structure composed of a chain of blocks. Each block stores a set of transactions commonly veri ed by block creators termed miners in this context. Within the block size limit, the miners can receive an incentive to add as many transactions as possible. Nevertheless, the chain of blocks keeps growing no matter the amount of executed transactions since, in principle, even blocks with no transactions can be mined and added to the chain. Cryptographic protocols protect the Blockchain from double-spending [3] and other risks. Remarkably, while at money requires third-party authorities, such as banks, to verify transactions, Blockchain does not need any additional authority. Over the years, many blockchains based on new tokens, such as Bitcoin (BTC), have been implemented. These tokens are also called cryptocurrencies, or cryptos, due to the underlying cryptographic mechanisms supporting and securing transactions. Nowadays, a crypto ecosystem [4{7] which includes, for instance, Ethereum (ETH), XRP (XRP), Cardano (ADA), Bitcoin Cash (BCH), Solana (SOL), Dogecoin (DOGE), Bitcoin Satoshi Vision (BSV), and These authors contributed equally to this work. marcojavarone@gmail.commany other tokens, continuously grows. Many cryptos of such an ecosystem get exchanged in the crypto market and accessed by several trading platforms. Like in nancial markets, the crypto market shows positive (i.e. bullish) and negative (i.e. bearish) trends resulting from the behaviour of traders. In summary, the behaviour of Bitcoin users, i.e. wallet owners, traders, and so on, is relevant for the evolution of the Blockchain and the crypto market. But several questions remain unanswered in this complex socio-technical system: Does human behaviour underlie some relevant relationship between the Blockchain and the crypto market? The goal of this investigation is to face this question. To this end, we map the Blockchain to a spin model, which allows assessing and measuring interactions with the crypto market. Before moving to the details of the proposed model and related results, we remark that the Blockchain and cryptocurrencies constitute a modern and expanding research area. Just to cite a few, previous investigations studied the Bitcoin price dynamics [8{11], the crypto network of transactions [12{18], the predic- tive signals [19], using social data [20{23] and machine learning-based approaches [24, 25], and the interplay between the network of Bitcoin transactions and the crypto market [26]. From Data to Model - Datasets used in this inves- tigation refer to a time interval from 2013 to 2022, including about 518643 blocks and 730662636 transac- tions. Blockchain data can be accessed at [27] and crypto market data at [28]. Blockchain data describe blocks and contain Bitcoin transactions and other parameters such as the Timestamp and the Blockheight. For instance, thearXiv:2209.09832v1 [physics.soc-ph] 20 Sep 2022 2 Timestamp corresponds to the time a block gets 'mined' (i.e. generated), whereas the Blockheight identi es the position of a block along the chain. As above-mentioned, we de ne a spin model by map- ping blocks to vectors (see also [29]). In particular, we consider the following parameters: the number of trans- actions, the number of inputs, and the number of out- puts per block. The number of transactions per block has a self-explanatory meaning, while the other parame- ters, which refer to the structure of transactions [2], need further details. To this end, we describe a simple transac- tion between Alice and Bob. Alice owns 3 BTC, collected from previous transactions, and wants to send 2 :5 BTC to Bob. She previously received: 1 :0 BTC, 0:35 BTC, 0:45 BTC, 0:9 BTC, and 0 :3 BTC, each constituting an 'un- spent transaction output' (UTXO) for a motivation later clari ed. To send 2 :5 BTC to Bob, she has to compose a transaction using a combination of UTXOs, e.g. choos- ing 1:0 BTC, 0:9 BTC, 0:45 BTC, and 0 :35 BTC, whose summation equals 2 :7 BTC. The chosen UTXOs consti- tute the inputs of the new transaction. Then, noting that the UTXO summation is greater than the amount of Bitcoin Alice wants to send to Bob, the transaction has two outputs. The rst output is addressed to Bob's wallet (i.e. 2 :5 BTC), while the other is to Alice's wallet (i.e. 0:2). These two outputs, in turn, become UTXOs that the respective receivers (i.e. Bob and Alice) can use for future transactions. Detailed information about the microstructure of the Blockchain, i.e. the content of its blocks, can be accessed by anyone, albeit the Bit- coin owners' identity remains preserved. Coming back to our model, using three parameters, each block gets represented by a 3-dimensional normalised vector B, and the Blockchain gets mapped to a one-dimensional lattice. The resulting structure resembles an n-vector model [30] withn= 3. Now, we highlight that the content of blocks cannot change over time, as the Blockchain is an im- mutable ledger. Therefore, although new spin vectors add to the chain, those added in the past do not modify their con guration. Also, spin vectors forming the cur- rent chain do not a ect spin vectors that will add in the future. In summary, the Blockchain does not evolve as an Ising-like model. However, that does not prevent de ning a Hamiltonian function, for instance, by xing an instant of time to consider a limited number of spin vectors. In addition, we may assume that the spin con guration we observe at a given time represents an equilibrium con g- uration obtained at some temperature. In general, the Hamiltonian of a spin model minimises at low tempera- tures as ordered spin patterns emerge. Similarly, it in- creases its value at high temperatures as disordered spin patterns show up. As detailed below, the formation of ordered and disor- dered spin patterns o ers valuable information to analyse the evolution of the Blockchain. Then, the Hamiltonian of the obtained spin model (see also [31]) reads H(B;T) =X i;jJi;j(1(B| iBj)) (1) FIG. 1. Blockchain evolution derived from local Hamiltonian (H) and its time derivative (dH). The small uctuations in- dicate blocks are usually very similar to each other. In July 2015, a clear peak shows up. withJi;jinteraction weight whose value is set to 0 if i>j , andBispin vector corresponding to the i-th block of the chain (the index irepresents the Blockheight and goes from 0 to T). The scalar products in equation 1 get close to 1 when consecutive vectors, i.e. blocks, are simi- lar, otherwise get close to 0. Note that the scalar product usually can range from 1 to +1. However, according to the range of values of the selected block parameters, the scalar product can span the interval [0 ;+1]. Eventually, to include long-range interactions in the Hamiltonian, whose amplitude decays with the distance Jtk;tek , Equation 1 gets re-written as follows: H(B;T) =TX t=01tX k=1ek  ZtB| tkBt (2) withZt=Pt k=1ek . In doing so, each block interacts with all previous ones. However, the exponential term weights the interactions between blocks, decaying over long distances. Such a decay gets controlled by the parameter . Using the single components which sum over in equation 2, we obtain a collection of spin con- gurations that form ordered and disordered patterns. Lastly, we emphasise that the formation of ordered and disordered patterns in the 3-vector model can get exploited for studying the relationships between the Blockchain and trends of Bitcoin in the crypto market. Results - The Hamiltonian de ned in 2 can be decom- posed in single contributions H(B;T) =PT t=0Ht(B) forming a time series, to which we refer to as H. The latter, shown on the top of Figure 1, gets computed by setting a small enough to include only signi cant long-range interactions limited to the previous 90 days. In addition, after applying an exponential moving aver- age (EMA) to H, we compute its time derivative. The resulting time series, i.e. dH, is shown at the bottom of Figure 1. Interestingly, signals in Figure 1 have a 3 FIG. 2. Causality test between HandATH .A) The p-value for Granger causality (using F-test) is shown as a function of time lags used in the t. Increasing the knowledge of the past of Hin forecasting ATH leads to higher signi cance in the test (always below p=0.05), whereas the opposite is found when trying to forecast Husing ATH .B) The results of the CCM test for the same variables. The convergence to an asymptotic value of the reconstruction of the variables, increasing the library length, indicates causal relation in both directions. The test was performed, for each L, using 400 random points or contiguous segments. The straight lines are median values, and the error is computed with the 95-th percentile. prominent peak temporally located around July 2015. After looking for the possible sources of such a peak, we found it corresponds to the Flood attack [32], a stress test performed for testing the Bitcoin network. Both H anddHcan get used for studying causal relationships with the crypto market and related phenomena. To this end, we focus on the BTC=USD ratio (i.e. Bitcoin in American Dollars) and work on the time series composed of samples of the percentual drawdown from the All-Time-High of the BTC=USD ratio. Notably, these samples equal 1 every time Bitcoin overcomes its previous historical maximum. Accordingly, the time series related to the BTC=USD ratio, which we refer to asATH , andHhave the same range. To study the causal relationship between the Blockchain and the crypto market, we use only the Htime series, as H anddHare strongly related. However, we anticipate that thedHtime series becomes particularly relevant in the subsequent analysis. Accordingly, we now aim to infer a causal relationship between HandATH , whose task constitutes a complex and old problem [33]. For this purpose, we consider approaches relying on statistics and dynamical systems theory. For the rst case, i.e. approaches based on statistics, we perform the Granger causality test [34]. Given two variables, xand y, the Granger causality test compares the forecasting quality of future values of y, of a standard ARMA model (Null-hypothesis), with the same ARMA having additional information on previous values of the variable x. More in detail, xis said to be Grange-cause of y whether the quality of the forecasting using information overxis signi cantly higher (p-value <0:05) than the quality of the forecasting obtained without x. The plotAin Figure 2 shows the result of this test, whosevariables are HandATH . In that gure, we report the p-value as a function of previous data points used in the t of the ARMA model. Interestingly, the quality of the t improves as the forecasting of ATH exploits more information on H, i.e. more historical data, suggesting a strong causal e ect of HoverATH . The reverse is not the case since, according to the p-value, we have to accept the Null-Hypothesis, i.e. ATH has no Granger causality over H. For the sake of completeness, we also perform a Cross Convergent Mapping (CCM) [35, 36] test, which relies on dynamical systems theory and is deeply related to the Takens theorem and embedding theory [37]. In this case, we look for a deterministic causality, which means that if two variables belong to the same dynamical system, one of them could be reconstructed by using the other (and vice versa) via a delayed embedding. Here, we consider the quality of the reconstruction of a variable ythrough a second variablex, which we refer to as yjMx. If such a quality increases with the number of data samples (de ned as library length) the variable xcausally in uences y. Moreover, the faster the convergence to an asymptotic value of the CCM test, the stronger the dependence between the considered variables. A critical point of the CCM test lies in the sample selection to compose the library. So, following [38], we perform the CCM test composing the library of samples by a random selection of contiguous segments and by a random selection of samples. Results are reported in the plot Bof Figure 2. Here, we observe that both sampling strategies suggest a causal relationship between the two variables, i.e. H andATH , in both directions. We deem that the di erence between the results obtained by the CCM test and the Granger causality 4 FIG. 3. A) The trend of the dHtime series. Coloured lines indicate positive (red, above the 98 :5 percentile) and negative (green, below the 1 :5 percentile) uctuations. B) Percentual drawdown from the ATH in time. Colored dots identify events of large uctuations in dH. Red arrows highlight events followed by a decrease of at least 10% in the next 90 days. Rapid increases in the Htime series can predict collapses in the BTC price, while fast relaxation may indicate a local market recovery. C) Sentiment level after dHpositive large uctuation. In the 83% of cases, these events predate interval in which the BTC price remains below the initial price most of the time (taken a 90-day time window). D) Boolean of the exceeding the minimum price change threshold ( 10%, respectively OTH =) after dHpositive large uctuation. 90% of these signals gets followed by a price reduction of at least 10% (in a 90-day time window), while only the 29% gets followed by a 10% price growth highlighting a clear downtrend. test, i.e. a bi-directional causal relationship and a one-directional causal relationship, respectively, might be motivated considering that the Granger causality test can only detect linear causal relationships. In light of the above result, we study whether the Htime series contains information to forecast Bitcoin trends in the crypto market. Remarkably, rapid variations ofHpredate large uctuations of ATH . Therefore, thedH time series becomes particularly relevant for quantifying such phenomenon (Figure 3). More in detail, we observe that rapid increases in the H time series (i.e. large positive uctuations of dH) can predict collapses in the BTC value, while fast relaxations may indicate a local market recovery |see plotBin Figure 3. In addition, the 90% of positive large uctuations of dHare followed by a reduction of theBTC value of at least10% (see plot Din Figure 3). Conclusion - In summary, this work unveils relevant relationships between the dynamics of the Blockchain and the crypto market, focusing on the Bitcoin price. The investigation, motivated by observing that human behaviour a ects both the dynamics of the Blockchain and those of the crypto market, exploits tools from statistical physics. More speci cally, we generated time series describing the evolution of the Blockchain via a spin-lattice model. Such time series allowed us to obtain the following results. Firstly, we detected a causal rela- tionship between the Blockchain and the crypto market, and then we found Blockchain contains information to forecast some trends in Bitcoin price. Remarkably,disordered patterns in the Blockchain, identi ed via the spin model, predate the phenomenon of Bitcoin panic selling, suggesting a fascinating connection between disorder and panic. Before concluding, let us report a few observations about some previous investigations. In [10], authors highlight the potential role of Bitcoin transactions in driving the Bitcoin trading volume and price. That is con rmed by our results, as we show that the number of Bitcoin transactions plays a role in forecasting the Bitcoin market trends. In addition, some ideas and outcomes of our investigation remind works [39, 40], which aimed at forecasting nancial market trends by looking at Wikipedia and Google Trends analytics, respectively. Likewise, here we aim to foresee relevant phenomena in the crypto market, e.g. panic selling, by exploiting analytics data related to an external system, i.e. the Blockchain. Finally, we deem the proposed model sheds light on relevant aspects of Bitcoin dynamics. Therefore, future works based on this investigation could address the behaviour of other cryptocurrencies and assess whether related results can support the design of trading strategies for the crypto market. ACKNOWLEDGEMENT MAJ wishes to thank Marco Corradino for stimulating discussions and Mario Bortoli for helpful suggestions. 5 [1] Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash system. https://bitcoin.org/bitcoin.pdf , 2008 [2] Antonopoulos, A. M.: Mastering Bitcoin: unlocking dig- ital cryptocurrencies. O'Reilly Media, Inc. , 2014. [3] Javarone, M. A., Wright, C. S.: Modeling a double- spending detection system for the bitcoin network. arXiv:1809.07678 , 2018 [4] ElBahrawy, A., Alessandretti, L., Kandler, A., Pastor- Satorras, R., Baronchelli, A.: Evolutionary dynamics of the cryptocurrency market. Royal Society open science , 4(11) , 170623, 2017 [5] de Marzo, G., Pandolfelli, F., Servedio, V. D.: Model- ing innovation in the cryptocurrency ecosystem. Scien- ti c Reports ,12(1) , 1{12, 2022 [6] Tasca P, Tessone CJ.: Taxonomy of blockchain technolo- gies. Principles of identi cation and classi cation. Ledger , 4, 1{39, 2019 [7] Spychiger F, Tasca P, Tessone C.J.: Unveiling the impor- tance and evolution of design components through the \tree of blockchain". Frontiers in Blockchain ,3:613476 , 2021 [8] Kristoufek, L.: What are the main drivers of the Bitcoin price? Evidence from wavelet coherence analysis. PloS one,10(4) , e0123923, 2015 [9] Blau, B. M. : Price dynamics and speculative trading in bitcoin. Research in International Business and Finance , 41, 493-499,2017 [10] Aalborg, H. A., Moln ar, P., de Vries, J. E.: What can ex- plain the price, volatility and trading volume of Bitcoin? Finance Research Letters ,29, 255-265, 2019 [11] Amjad, M., Shah, D.: Trading bitcoin and online time se- ries prediction. NIPS 2016 time series workshop - PMLR , 1{15, 2017 [12] Javarone, M.A., Wright, C.S.: From Bitcoin to Bitcoin Cash: a network analysis. Proceedings of the 1st Work- shop on Cryptocurrencies and Blockchains for Distributed Systems - ACM ,77{81 , 2018 [13] Vallarano, N., Tessone, C. J., Squartini, T.: Bitcoin Transaction Networks: an overview of recent results. Frontiers in Physics ,8286, 2020 [14] Lin, J. H., Primicerio, K., Squartini, T., Decker, C., Tes- sone, C. J.: Lightning Network: a second path towards centralisation of the Bitcoin economy. New Journal of Physics ,22(8) , 083022, 2020 [15] Campajola C, Cristodaro R, De Collibus FM, Yan T, Val- larano N, Tessone CJ. The evolution of centralisation on cryptocurrency platforms. 2022, arXiv:2206.05081 , 2022 [16] De Collibus FM, Partida A, Pi skorec, M., Tessone CJ. Heterogeneous preferential attachment in key ethereum- based cryptoassets. Frontiers in Physics ,568, 2021 [17] De Collibus FM, Pi skorec, M., Partida, A., Tessone, CJ: The structural role of smart contracts and exchanges in the centralisation of ethereum-based cryptoassets. En- tropy ,24(8) ,1048, 2022 [18] Lin, J. H., Marchese, E., Tessone, C. J., Squartini, T.: The weighted Bitcoin Lightning Network. Chaos, Soli- tons & Fractals ,164, 2022 [19] Yu, M.: Forecasting Bitcoin volatility: The role of lever- age e ect and uncertainty. Physica A: Statistical Mechan- ics and Its Applications ,533, 120707, 2019[20] Ortu, M., Uras, N., Conversano, C., Bartolucci, S., Destefanis, G.: On technical trading and social media indicators for cryptocurrency price classi cation through deep learning. Expert Systems with Applications ,198, 116804, 2022 [21] Garcia, D., Tessone, C.J., Mavrodiev, P., Perony, N.: The digital traces of bubbles: feedback cycles between socio-economic signals in the Bitcoin economy Journal of the Royal Society Interface ,11(99) , 20140623, 2014 [22] Garcia, D., Schweitzer, F.: Social signals and algorith- mic trading of Bitcoin. Royal Society open science ,2(9), 150288, 2015 [23] Matta, M., Lunesu, I., Marchesi, M.: Bitcoin Spread Prediction Using Social and Web Search Media. UMAP workshops , 1{10, 2015 [24] Cocco, L., Concas, G., Marchesi, M.: Using an arti - cial nancial market for studying a cryptocurrency mar- ket. Journal of Economic Interaction and Coordination , 12(2) , 345{365, 2017 [25] Alessandretti, L., ElBahrawy, A., Aiello, L. M., Baronchelli, A.: Anticipating cryptocurrency prices us- ing machine learning. Complexity , 2018 [26] Kondor, D., Csabai, I., Sz ule, J., P osfai, M., Vattay, G.: Inferring the interplay between network structure and market e ects in bitcoin. New Journal of Physics , 16(12) , 125003, 2014 [27] Blockchain.com Last Access: 20/09/2022, 2022 [28] Glassnode Studio Last Access: 20/09/2022, 2022 [29] Dai, D., Bao, F. S., Zhou, J., Chen, Y.: Block2vec: A deep learning strategy on mining block correlations in storage systems. 45th International Conference on Paral- lel Processing Workshops (ICPPW)-IEEE , 230{239, 2016 [30] Stanley, H. E.: Dependence of critical properties on di- mensionality of spins. Physical Review Letters ,20(12) , 589, 1968 [31] Welsh, D. J., Merino, C.: The Potts model and the Tutte polynomial. Journal of Mathematical Physics ,41(3) , 1127{1152, 2000 [32] July 2015 ood attack , Last Access: 20/09/2022 , 2017 [33] Cecconi, F., Cencini, M., Falcioni, M., Vulpiani, A.: Predicting the future from the past: An old problem from a modern perspective. American Journal of Physics , 80(11) , 1001-1008, 2012 [34] Granger, Clive WJ: Investigating causal relations by econometric models and cross-spectral methods. Econo- metrica: journal of the Econometric Society ,1969 , 424{ 438, 1969 [35] Sugihara, G., May, R., Ye, H., Hsieh, C. H., Deyle, E., Fogarty, M., Munch, S.: Detecting causality in complex ecosystems. Science ,338(6106) , 496{500, 2012 [36] Vinci, G.V., Benzi, R.: Economic complexity: Correla- tions between gross domestic product and tness. En- tropy ,20.10:766 (2018): 766. [37] Kantz, H., Schreiber, T.: Nonlinear time series analysis. Cambridge university press , 2004. [38] Luo, M., Kantz, H., Lau, N.-C., Huang, W., Zhou, Y.: Questionable dynamical evidence for causality between galactic cosmic rays and interannual variation in global temperature. Proc Natl Acad Sci , 2015 [39] Moat, H. S., Curme, C., Avakian, A., Kenett, D. Y., Stanley, H. E., Preis, T.: Quantifying Wikipedia usage 6 patterns before stock market moves. Scienti c reports , 3(1), 1{5, 2013. [40] Preis, T., Moat, H. S., Stanley, H. E.: Quantifying trad- ing behavior in nancial markets using Google Trends.Scienti c reports ,3(1), 1{6, 2013
{ "id": "2209.09832" }
2205.08087
An Empirical Study of Blockchain Repositories in GitHub
Blockchain is a distributed ledger technique that guarantees the traceability of transactions. Blockchain is adopted in multiple domains like finance (e.g., cryptocurrency), healthcare, security, and supply chain. In the open-source software (OSS) portal GitHub, we observe a growing adoption of Blockchain-based solutions. Given the rapid emergence of Blockchain-based solutions in our daily life and the evolving cryptocurrency market, it is important to know the status quo, how developers generally interact in those repos, and how much freedom they have in applying code changes. We report an empirical study of 3,664 Blockchain software repositories from GitHub. We divide the Blockchain repositories into two categories: Tool (e.g., SDKs) and Applications (e.g., service/solutions developed using SDKs). The Application category is further divided into two sub-categories: Crypto and Non-Crypto applications. In all Blockchain repository categories, the contribution interactions on commits are the most common interaction type. We found that more organizations contributing to the Blockchain repos than individual users. The median numbers of internal and external users in tools are higher than the application repos. We observed a higher degree of collaboration (e.g., for maintenance efforts) among users in Blockchain tools than those in the application repos. Among the artifacts, issues have a greater number of interactions than commits and pull requests. Related to autonomy we found that less than half of total project contributions are autonomous. Our findings offer implications to Blockchain stakeholders, like developers to stay aware of OSS practices around Blockchain software.
http://arxiv.org/pdf/2205.08087v1
Ajoy Das, Gias Uddin, Guenther Ruhe
cs.CR, cs.SE
cs.CR
An Empirical Study of Blockchain Repositories in GitHub Ajoy Das ajoy.das@ucalgary.ca DISA Lab, University of Calgary Calgary, CanadaGias Uddin gias.uddin@ucalgary.ca DISA Lab, University of Calgary Calgary, CanadaGuenther Ruhe ruhe@ucalgary.ca University of Calgary, Canada Calgary, Canada ABSTRACT Blockchain is a distributed ledger technique that guarantees the traceability of transactions. Blockchain is adopted in multiple do- mains like finance (e.g., cryptocurrency), healthcare, security, and supply chain. In the open-source software (OSS) portal GitHub, we observe a growing adoption of Blockchain-based solutions. Given the rapid emergence of Blockchain-based solutions in our daily life and the evolving cryptocurrency market, it is important to know the status quo, how developers generally interact in those repos, and how much freedom they have in applying code changes. We report an empirical study of 3,664 Blockchain software repositories from GitHub. We divide the Blockchain repositories into two cat- egories: Tool (e.g., SDKs) and Applications (e.g., service/solutions developed using SDKs). The Application category is further divided into two sub-categories: Crypto and Non-Crypto applications. In all Blockchain repository categories, the contribution interactions on commits are the most common interaction type. We found that more organizations contributing to the Blockchain repos than indi- vidual users. The median numbers of internal and external users in tools are higher than the application repos. We observed a higher degree of collaboration (e.g., for maintenance efforts) among users in Blockchain tools than those in the application repos. Among the artifacts, issues have a greater number of interactions than commits and pull requests. Related to autonomy we found that less than half of total project contributions are autonomous. Our findings offer implications to Blockchain stakeholders, like developers to stay aware of OSS practices around Blockchain software. CCS CONCEPTS •Software and its engineering →Software libraries and reposi- tories . KEYWORDS Blockchain, GitHub, Repositories, Bitcoin, Cryptocurrency ACM Reference Format: Ajoy Das, Gias Uddin, and Guenther Ruhe. 2022. An Empirical Study of Blockchain Repositories in GitHub. In The International Conference on Eval- uation and Assessment in Software Engineering 2022 (EASE 2022), June 13–15, 2022, Gothenburg, Sweden. ACM, New York, NY, USA, 10 pages. https://doi.org/10.1145/3530019.3530041 Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. EASE 2022, June 13–15, 2022, Gothenburg, Sweden ©2022 Association for Computing Machinery. ACM ISBN 978-1-4503-9613-4/22/06. . . $15.00 https://doi.org/10.1145/3530019.35300411 INTRODUCTION Ginni Rometty, CEO, 2019, IBM “What the internet did for communications, Blockchain will do for trusted transactions. ” Blockchain is a distributed ledger technology that stores records as identical copies on multiple computers to ensure security and transaction traceability [ 31]. It was invented in 2008 to serve the public transaction ledger of the Bitcoin cryptocurrency. In 2014, Marc Andersson wrote a widely cited article in New York Times by comparing the influence of bitcoin with those of internet during 1993 [ 7]. He predicted that prominent industry vendors would soon develop critical solutions using Blockchain. Indeed, by 2016, Block- chain funding overtook Bitcoin, i.e., Blockchain-based solutions became more diverse than simply offering cryptocurrency-based solutions [13]. Many Blockchain projects are open-sourced to promote rapid growth and adoption. As such, we find an increasing number of Blockchain-based software repositories (denoted as ‘repos’ from hereon) in the open-source software (OSS) portal GitHub. As of July 2021, GitHub hosts more than 200M repos from over 65M develop- ers worldwide. Several studies investigated the source code of the Blockchain software in GitHub, e.g. [ 8]. The studies so far focused on a specific and small number of Blockchain repos like healthcare operationalization of three cryptocurrencies [ 27], or the analysis of 481 Bitcoin repos to learn the Bitcoin-based cryptocurrency as- pects [ 9]. However, we are aware of no studies that analyzed the diverse states and user interactions in the GitHub Blockchain soft- ware ecosystem. Such insights can complement existing studies with insights into the overall Blockchain software ecosystem. This paper reports the results of an empirical study to learn about the Blockchain OSS ecosystem in GitHub. An open-source Blockchain project tends to be more secure as many people can verify security. People can trust such OSS projects more, which is a crucial factor to ensure the success of a Blockchain-based solution. Given that Github is the biggest platform to host OSS projects, the Blockchain repos from Github can offer a comprehensive overview of the states of the Blockchain OSS ecosystem. In our empirical study, we analyze total 3,664 Blockchain repos from GitHub. Our goal is to learn about the states of entities (e.g., users) and interac- tions among the users as observed in the GitHub Blockchain repos. Our empirical study has two major phases: •Phase 1. We manually label the 3,664 Blockchain repos un- der three categories: Tool, Application (Cryptocurrency vs. non Cryptocurrency-based). This categorization ensures that we have a better understanding on the type of Blockchain OSS software systems being developed in GitHub. •Phase 2. We use the categories and combine those with the GitHub repo-based metrics (e.g., star rating, forks, interac- tions, users) to conduct our empirical study with a focus toarXiv:2205.08087v1 [cs.CR] 17 May 2022 EASE 2022, June 13–15, 2022, Gothenburg, Sweden Ajoy Das, Gias Uddin, and Guenther Ruhe understand the status quo of user engagement and interac- tions for this special class of software systems. Our study offers several findings as summarized below: •We find that Ethereum and Bitcoin Blockchain platforms have the highest number of projects. The Blockchain tools show more development activities than the Blockchain applications. Even though crypto applications are more popular, the development activity of the crypto and non-crypto applications are mostly similar. This finding corroborates with a sustained focus on cryp- tocurrencies and the use of Blockchain to create those. Similar development activities across crypto and non-crypto indicate the growing emphasis on applying Blockchain-based solutions across diverse domains (details in Section 3.1). •Organizations are contributing more to the Blockchain repos than the individual users. Many organizations (like Ethereum with mostly tool-based repos and IBM with mostly application- based) own multiple Blockchain repos (see Section 3.2). •We see higher degrees of collaboration among the users in Block- chain tool repos than those in the application repos. The interac- tions of commit contribution are higher in number than almost all other types of interactions. Developers interact more via is- sues than via the other artifacts (commits and pull requests). This finding indicates that Blockchain OSS repos hosted in GitHub are being used by users and the users report their issues of using the OSS by logging or commenting on issues (see Section 3.3). •We also find that the contributing users of the Blockchain repos are not autonomous. This means that many internal developers generally face restrictions in merging code changes. Therefore, future measures can be taken to improve the autonomy of the internal developers in these projects (see Section 3.4). Our study findings offer implications to diverse stakeholders in the Blockchain ecosystem: (1) Blockchain vendors to improve auton- omy in their Blockchain repositories, (2) Blockchain developers to learn about current trends in Blockchain ecosystem, (3) Blockchain researchers to offer new tools and techniques for quality assurance of the Blockchain software and the interactions among users. Replication Package https://github.com/disa-lab/ BlockchainEmpiricalEASE2022 2 STUDY DATA COLLECTION 2.1 Project Selection Picking Blockchain OSS repos from GitHub is a non-trivial task due to the following reasons: (1) There is no standard label/tag/i- dentifier in a GitHub repo that can be used to decide whether it is a Blockchain repo or not. (2) GitHub topic (which is introduced as a tag) is not universally applied to tag each GitHub repo. (3) A GitHub topic may use any Blockchain-related label other than simply the keyword ‘Blockchain’. (4) Searching by the keyword ‘Blockchain’ using GitHub search API will not provide all GitHub repo (e.g., when the description does not have Blockchain as the keyword) or may contain false positives (e.g., when the repo simply mentions Blockchain while referring to a non-Blockchain feature). We, there- fore, adopted the following process (see Figure 1) to pick a list of Blockchain repos. We discuss the steps below. Build a keyword list containing Blockchain related topics, top Cryptocurrency and Blockchain names, and popular Blockchain -related keywords Search for repositories in GHTorrent dataset containing any of the keywords in the repository name, description, or topics Filter out repositories based on metrics such as popularity measure, activity periodBlockchain -related keywords for search List of GitHub repos that are potentially Blockchain OSS Filter out non source code repositoriesList of Relevant Blockchain Repos in GitHub 3,664 Blockchain RepsFigure 1: Steps in Blockchain repos selection process First, we collect a set of 86 keywords that we can use to search di- verse Blockchain repos. We produce the keywords using the follow- ing sources: (1) Top 100 Blockchains-based cryptocurrencies from CoinMarketCap [ 2] (Bitcoin, Ethereum, Polkadot, etc), to include top Blockchain platforms in terms of cryptocurrency market capi- talization; (2) Top permissioned Blockchain names (Hyperledger Fabric, Corda, etc.), as permissioned Blockchains generally do not have cryptocurrencies, we need to add these names so that we don’t miss them while searching for the Blockchain projects; (3) Popular Blockchain keywords (smart contract, solidity, dapp, etc.), so that we can include Blockchain-related tools and applications that do not have the Blockchain names directly in their descriptions. However, we needed to exclude some Blockchain names from the keyword list because they were very common words (e.g., icon, waves), and they produced a substantial amount of false positives in the project selection step. But, as we also included popular Blockchain-related keywords (e.g., blockchain, dapp, smart contract), the projects re- lated to these Blockchains came up in the project selection even though the Blockchain platform names were filtered out. Second, we searched the GHTorrent dataset [ 18] with the above keywords. GHTorrent is an offline database that provides a snapshot of the GitHub database. We used the latest GHTorrent database that was available during the time of our analysis (January 2021). For each repo in GHTorrent, we searched the keywords in the project name, description, and topic fields. This returned 802K GitHub repos. 2.2 Project Filtering We then filtered the 802K repos to find relevant and informative Blockchain repos. Specifically, we followed the same sampling cri- teria used by Gonzalez et al. [ 17], who previously investigated the ecosystem of Machine Learning (ML) repositories in GitHub. To fil- ter out unused, inactive, and non-source code repositories, these cri- teria have been selected following the best practices [ 19,21,24,26]. The filtering criteria are as follows: (1) Size: A repo must have a size greater than 0 (KB) (2) Popularity: Must have ≥5 stars (3) Activity: The last commit of the repo must be on and after January 2019 (4) Data Availability: Project data must be accessible by the GitHub API and GHTorrent (5) Content: Must be a software project and not An Empirical Study of Blockchain Repositories in GitHub EASE 2022, June 13–15, 2022, Gothenburg, Sweden a tutorial, homework assignment, coding challenge, or ‘resource’ storage. This step returned around 5200 GitHub repos. Not all the repos returned after the third step are Blockchain-related projects because few non-Blockchain projects also matched with some key- words that we used to select the projects initially, we also found non-source code repositories (such as course lectures) after the above filtering. So, we manually analyzed each of the 5200 repos to discard irrelevant repositories. This step resulted in our final list of 3,664 Blockchain repos. 3 EMPIRICAL STUDY In this section, we answer four research questions (RQ) by analyzing the data of Blockchain software repositories collected in Section 2. RQ1. How do the popularity and activity across the Blockchain repos vary? (Section 3.1) RQ2. How do different users in the Blockchain repositories vary? (Section 3.2) RQ3. How do the different users collaborate in the Blockchain repositories? (Section 3.3) RQ4. How autonomous are the internal users in the Blockchain repositories? (Section 3.4) Like any OSS project in GitHub, a Blockchain project in GitHub can have two major entities: (1) Repository (repo), (2) User. The two entities can show diverse status (e.g., user growth). Therefore, our RQ1 attempts to offer an understanding of the popularity of the Blockchain repos in GitHub based on their growth and user ac- tivity. Given the Blockchain stakeholders can be diverse in GitHub, RQ2 offers an empirical evidence of the distribution of the different users observed in the GitHub Blockchain repos and RQ3 investi- gates how the users collaborate while RQ4 offers insights into how autonomous the internal users to a repo are, i.e., whether they can make progress without much help from external users to a repo. 3.1 RQ1. How do the popularity and activity across the Blockchain repos vary? 3.1.1 Approach. First, we divide the Blockchain repos into two categories: (1) Tool (i.e., offering a stand-alone API/SDK with Block- chain algorithm/model), and (2) Application (i.e., offering software to address specific use case scenario). The definition of the cate- gories is taken from Gonzalez et al. [ 17]. Such categorization can also offer deeper insights into our Blockchain projects. We thus attempted to categorize our Blockchain repos into two categories (i.e., Tools and Applications). We can divide the blockchain appli- cations into two subcategories. Applications that focus on cryp- tocurrencies that have direct monetary value, applications that focus on encompassing blockchain features in other various do- mains (health, business, law, entertainment, etc). Given the current focus on Blockchain-based cryptocurrencies, we divided the ‘App- lication’ category into two sub-categories: (1) Application Crypto, and (2) Application Non-Crypto/Others , to find out whether these application categories are in fact separate in terms of different met- rics (e.g., development activities), or we can consider them as a single group in future studies. We labeled each Blockchain repo to one of the three categories in two steps. (1) Automatic categorization: We attempted to label a repo automatically using a suite of keywords (see Table 1). TheTable 1: Keywords to categorize the Blockchain repos Category Keywords Tool tool, library, stack, client, node, protocol, helper, utility, , evm, scripts, package framework, sdk, service, ide, api, miner Applications exchanges, trading platform, trading bot, (Crypto) arbitrage, mining pool, payment channels, crypto/coin/currency/token related, wallet, wallet extensions Applications not categorized in tool or crypto application (Others) Table 2: Agreements between coders Iteration ID # of Repositories Cohen 𝜅 1 40 0.63 2 40 0.80 Table 3: Summary of studied 3,664 repos in our dataset Project Type #Repos # Orgs # Users Blockchain Tools 2,470 1,536 934 Applications (Crypto) 546 253 293 Applications (Others) 648 358 290 Total Blockchain Projects 3,664 2,147 1,517 list of keywords is picked based on our manual analysis and by consulting the keywords for the ‘Tool’ category from Gonzalez et al. [17]. The automated approach was able to categorize about only 25% of the dataset. (2) Manual labeling: Even though we used an automated approach, we checked each repo manually to determine its label. This helped us to fix any misclassification that happened at the automatic categorization step as well as classify the repos that the automated approach was not able to classify. A total of three human coders participated in the labeling process. First, two of the authors consulted in two iterations to create a labeling guide. In the first iteration, both authors separately labeled 40 repos. They then computed the agreement between them using Cohen 𝜅value and resolved disagreements by discussing them together. The Cohen 𝜅 value was 0.63 which is considered substantial (see Viera et al. [ 37]). This process also helped them update the labeling guide. In the second phase, both authors again separately labeled 40 repos and repeated the process of agreement calculation and disagreement resolution. The Cohen 𝜅value was 0.80. Therefore, after this stage, any of the authors could continue with the manual labeling of the rest of the repos without introducing any individual bias. The first author then completed the rest of the manual labels. Nevertheless, we further validated the manual labels by consulting with a third coder, who is not an author of this paper. In a Github repository, the owner of the repository can set multi- ple words describing the summary of a repository, these are called EASE 2022, June 13–15, 2022, Gothenburg, Sweden Ajoy Das, Gias Uddin, and Guenther Ruhe topics of the repository. Topics generally mean what the repository is about. For example, Blockchain-based projects use blockchain, cryptocurrency, etc. as their topics. We also find these topics in the GHTorrent [ 18] dataset that we used to calculate the most common topics across different repository types. 3.1.2 Results. During the manual labeling step (described in Sec- tion 2.1), we categorized each repository in the dataset into the Blockchain platform it belongs to. We found in total 71 Blockchain platforms in our 3,664 repos (e.g., Ethereum). Figure 2 shows the top 10 of these platforms based on the total number of repos. Ethereum wins the race, followed by Bitcoin, then follows the “others” cat- egory (which denotes the rest of the Blockchain-based projects that we have not explicitly monitored during the classification of Blockchain platforms). Then comes the multi-Blockchain projects; these projects are those projects that used or targeted more than one Blockchain platforms in their development phase. ethereumbitcoin othersmultieos hyperledgerfabricstellarbinance monerotezos051015202530Percentage # of all repositories Figure 2: Top Blockchain platforms by # of projects Top four topics per project category based on all the repos are: (a) Tools: blockchain, ethereum, bitcoin, solidity; (b) Applications (Crypto): bitcoin, ethereum, cryptocurrency, wallet; (c) Applications (Others): ethereum, blockchain, bitcoin, smart-contracts. Overall, we can see some cross-cutting topics like Ethereum and Bitcoin which are mainly Blockchain platform names and these platforms are used in Blockchain-based application development. We also see specific topics like ‘wallet’ in Application Crypto, which is to develop a virtual wallet for the cryptocurrencies. In Figure 3, we show the violin plot distribution of two popularity metrics (# of stars and # of forks) per category. Overall, the median values are similar across the three categories. Still, the differences in quartiles are greater between Tools and Applications Others, which are also two categories with the most repos. In Figure 4, we show the distribution of the commits, issues, and pull requests per repository type. We can see that, just like the above popularity measures, tool repos have a higher number of commits, issues, and pull requests than the application repos. We performed Kruskal-Wallis tests on both the popularity and activity measures and found that in both cases distribution of the measures is not the same across the repository types (p < 0.001). But from the Dunn’s tests (Bonferroni adjustment), we see both for the # of stars and # of forks, the distributions of Tool repositories are not significantly different than the Application Tools Applications (Crypto)Applications (Others)020406080100Stars Tools Applications (Crypto)Applications (Others)01020304050ForksFigure 3: Distribution of the repos by # of stars and # of forks Crypto repositories (p >0.05). On the other hand, we found from the Dunn’s tests that the distribution of the activity measures (all of the commits, issues, and pull requests) of the crypto applications are not different from the non-crypto ones (p >0.05). The rest of the distributions are significantly different from each other. Hence, we can say, though the popularity of the crypto applications is similar to the popularity of tools repos, the development activities of the crypto applications are primarily identical to non-crypto applications. RQ1. How do the popularity and activity across the Blockchain repos vary? (1) Ethereum (31.7%) and Bitcoin (15.9%) projects occupy a good portion of the total repositories. (2) The tools based Blockchain repos show more dev activities (e.g., issue creation) than the application based Blockchain repos. (3) Though the crypto applications are more popular, the development activity of the non-crypto applications are mostly similar to crypto applications. 3.2 RQ2. How do different users in the Blockchain repositories vary? 3.2.1 Approach. We got the ownership data of the repositories from the dataset itself. But finding out the internal and external users was not a straightforward task. Following the steps discussed by Gonzalez et al. [ 17], we calculated and summarized each reposi- tory user’s contribution such as how many issues, pull requests, or commits the user created, how many of them are closed/merged by the user himself/herself, how many of them have been processed by other users instead, etc. After summarizing the degree of a user’s contribution in a repository, we categorized them into internal and external users. We marked the internal users with significant par- ticipation in processing other users’ issues or pull requests as the maintainers of the repository. 3.2.2 Results. The distributions of project owners by three project categories are shown on Table 3. We also indicate the number of total repos, the total number of contributing organizations, and the total number of users that created those repositories for each project category. The number of contributing organizations is 2,147 among the total 3664 repositories demonstrating a significant focus on Blockchain OSS in GitHub from the software vendors. An Empirical Study of Blockchain Repositories in GitHub EASE 2022, June 13–15, 2022, Gothenburg, Sweden Tools Applications (Crypto)Applications (Others)100 0100200300400500600700Commits Tools Applications (Crypto)Applications (Others)0255075100125150175Issues Tools Applications (Crypto)Applications (Others)020406080100Pull Requests Figure 4: Violin plots for # of Commits, # of Issues, and # of Pull Requests per repo category Tools Applications (Crypto)Applications (Others)05101520Contributing Users (a) Distribution of internal users Tools Applications (Crypto)Applications (Others)0510152025External Users (b) Distribution of external users Figure 5: Distribution of (a) Internal users and (b) External users (outliers omitted) As we have shown in Table 3, organizations own most of the Blockchain projects of our analysis (58.6%), the rest are owned by individual user accounts. In Blockchain repositories, 501 accounts own more than one repositories (20.9% of the dataset), and 86 ac- counts own at least 5 repositories (3.6% of the dataset). In fact, the majority of GitHub accounts with more than five Blockchain repos are organizational accounts. The top 3 accounts with most Block- chain repositories are Ethereum (46 repos), IBM (32 repos), and input-output-hk (30 repos). Here we see, Ethereum is the topmost contributor, followed by IBM. The organizations are working on multiple Blockchain-based solutions in GitHub, which signifies the significant focus on the Blockchain OSS ecosystem from the industry. Some of these organizations (e.g., Ethereum, Stellar) are dedicated to support specific Blockchain platforms, while others offer Blockchain-based solutions (e.g., IBM). The top organization Ethereum, has mostly tool-based repositories as it works on sup- porting the infrastructure of the Ethereum Blockchain platform. On the other hand, IBM works on multiple Blockchains with most of its repositories are non-crypto applications (56.3%). Figures 5a and 5b show the distribution of internal and external users across Blockchain project categories. We see that tool reposi- tories has higher number of both external and internal users than the application repositories. Among the Blockchain tool repos, bitcoin [ 1] has the most in- ternal users (614) and go-ethereum [ 3] has the most external users (4402). Among the crypto application repos, gekko [ 36] has the most internal users (199) and metamask-extension [ 4] has the mostexternal users (3013). Among non-crypto application repos, con- denser [ 6] has the most internal users (82) and monero-gui [ 5] has the most external users (560). The performed Kruskal-Wallis tests denote that the distribution of the users is significantly different across repo types. But the Dunn’s tests with Bonferroni adjustment show that the distribution of the internal users for crypto applications are not significantly different than the non-crypto repos (p >0.05). On the other hand, for the tools and crypto applications, the distributions of the external users do not differ significantly (p >0.05). RQ2. How do different users in the Blockchain reposi- tories vary? (1) We find more organizations contributing to the Blockchain repos than individual users. (2) Organizations like Ethereum and IBM own multiple Blockchain repos. While Ethereum repos are mostly tool-based, IBM repos are mostly application-based. (3) The median numbers of internal and external users in tools are higher than the application repos. 3.3 RQ3. How do the different users collaborate in the Blockchain repositories? 3.3.1 Approach. We quantify the collaboration among users in a repo based on five types of interactions defined by Gonzalez et al. [17]: (1) Contribution, (2) Maintenance, (3) Process, (4) Review, and (5) Discussion. Description of each of these interaction types have been provided in Table 4. The goal then is to compute how frequently users show the above interaction types when interacting with each other in a repository. 3.3.2 Results. We find that median number of the user per artifact per repository for (a) Tools are Commits (15.5), Issues (10), Pull Requests (7); (b) Applications (Crypto) are Commits (10), Issues (8), Pull Requests (4); (c) Applications (Others) are Commits (12), Issues (9), Pull Requests (7). Overall, users’ median per artifact is higher in the Blockchain tools (across all three categories) than the Blockchain application repos. In Figures 6, 7, and 8, we quantify the collaboration among different users in a repo based on the five interaction types defined in Table 4: (a) Code contribution (blue bar) denotes the frequency of interaction between the author of a commit and the committer of that commit. We see that this interaction is the most prevalent in both tools and non-crypto applications. (b) Maintenance EASE 2022, June 13–15, 2022, Gothenburg, Sweden Ajoy Das, Gias Uddin, and Guenther Ruhe Table 4: Interaction types used to measure Collaboration Type Description Contribution Interaction that happens between the author and the committer of a commit. Maintenance Interaction that happens between two users that initiate any event (i.e. approve, except commenting) for the same artifact (issue/ pull request), and any user who is not the creator (opener/reporter) of the artifact. Process Interaction that happens between the creator (opener/reporter) of the artifact and another user who initiates a maintenance event. Review Interaction that happens between a user who comments on an artifact and it’s creator (author/reporter/opener). Discussion Interaction that happens between two users who comments on an artifact and the users who are not the creator of the artifact. (brown bar) denotes the frequency of interaction between two users to approve/comment artifacts like pull requests. We see issue maintenance interactions are higher than the pull request maintenance in all repo types. (c) Process (green bar) denotes the frequency of interactions between the creator and a maintainer of an artifact. In all repo types, interaction in issue processing is higher than the pull request processing. (d) Review (red bar) denotes the frequency of interactions between the creator and a commenter of an artifact. For tools and non-crypto applications, reviews in pull requests are higher than the reviews in issues. (e) Discussion (purple bar) denotes the frequency of interactions between two users who are not the artifact’s creator but who nonetheless commented on the artifact. Discussion is the most prevalent interaction for crypto applications. We see that almost all of the collaborative interaction types are higher in tool repositories than the application repos (note that the scale is different in each graph). commits issues pull_requests020406080100120140Interaction per Artifactcontribution maintenanceprocess reviewdiscussion Figure 6: Collaborative interactions per artifact in Block- chain Tool repositories (outliers omitted) commits issues pull_requests020406080100Interaction per Artifactcontribution maintenanceprocess reviewdiscussionFigure 7: Collaborative interactions per artifact in Block- chain Crypto Applications repositories (outliers omitted) commits issues pull_requests020406080Interaction per Artifactcontribution maintenanceprocess reviewdiscussion Figure 8: Collaborative interactions per artifact in Block- chain Others (Non-Crypto) Applications repositories (out- liers omitted) RQ3. How do the different users collaborate in the Blockchain repositories? (1) We observe higher degrees of collaboration (e.g., for maintenance efforts) among users in Blockchain tools than those in the application repos. (2) The amount of interactions that happened in commit contri- bution are higher in number than almost all other types of interactions. (3) Among the artifacts, issues has overall greater number of interactions than commits and pull requests. 3.4 RQ4. How autonomous are the internal users in the Blockchain repositories? 3.4.1 Approach. To measure the autonomy of a repository, Gon- zalez et al. [ 17] divided the users of a repo into (1) Maintainer, (2) Autonomous contributor, and (3) Dependent contributor. The definition of these user types is provided in Table 5. The goal is to find the distribution of the above user types in a repository. Based on the percentage of users that belong to each group, the autonomy of the whole project is calculated. 3.4.2 Results. In Figure 9, we show the proportion of three user types (maintainer, autonomous and dependent contributors as defined in Table 5) across the Blockchain repo categories. We see that: (1) The proportion of maintainers in a repo is higher in crypto applications than both tools and non-crypto applications. An Empirical Study of Blockchain Repositories in GitHub EASE 2022, June 13–15, 2022, Gothenburg, Sweden Table 5: User types used for Autonomy calculation Type Description Maintainer A user who has merged or closed artifacts (issues and/or pull requests) opened by others. Autonomous A user who committed majority of his/her Contributor commits and also and/or self-merged majority of his/her pull requests. Dependent A user whose majority of the commits were Contributor not committed by others, and/or other users also merged/closed majority of his/her pull requests. (2) The proportion of autonomous users are the same across all of the repo types. (3) The proportion of dependent contributors are also the same across all types of repositories. Overall, we see a lower proportion of autonomous users but a higher proportion of dependent contributors across all Blockchain repo categories. This makes the Blockchain repos less autonomous, indicating more restriction in the Blockchain repos to make quick code changes. On the other hand, we can find some inherent reasons for this less autonomy in the Blockchain repositories. Blockchain networks are generally distributed networks, and no central authority has control over them. So, updating the network for fixing a bug becomes difficult because all the relevant parties need to update the software simultaneously across the network. So making the systems fault-tolerant and bug-free early on is very important for Blockchain-based projects, as merging buggy code into the codebase can be fatal. Hence multiple reviews are generally performed before the code changes are approved and merged, which in turn lessen the autonomy of the developers. RQ4. How autonomous are the internal users in the Blockchain repositories? (1) There are no significant dif- ferences in the autonomy of the teams across all repo types. Less than half of total project contributions are autonomous, that means that the development teams in Blockchain reposi- tories are not autonomous in terms of pushing changes to the code base. (2) The proportion of autonomous and dependent contributors are equal. Tools Applications (Crypto)Applications (Others)0.00.20.40.60.81.0Proportion of Total Project ContributorsMaintainers Dependent Autonomous Figure 9: Distribution of user types per project typeTable 6: Summary of Blockchain (BC) vs Non-Blockchain (Non-BC) Metrics in the studied 7,328 repos in our dataset MetricsBC Non-BC Avg Median Avg Median Commits 107 53 32 18 Issues 30 12 9 4 Pull Requests 19 8 5 3 Internal Users 5 4 3 3 External Users 3 1 3 1 Maintainers (%) 43 44 54 50 Autonomous Contrib (%) 32 33 35 40 Dependent Contrib (%) 34 33 24 25 4 DISCUSSIONS 4.1 Blockchain Vs Non-Blockchain Repositories Blockchain is a relatively new technology; it is important to know whether and how the findings we observed could differ from the non-Blockchain projects. We, therefore, randomly pick an equal number of non-Blockchain repos (i.e., 3664) from GitHub to com- pare these two categories. In this subsection, we compare both the states and the interactions of different entities in Blockchain vs. non-Blockchain projects using total 7,328 GitHub repos. Data Collection. At first, we sampled 10k repositories from Github using Github API after applying the same filtering crite- ria as of those applied for the Blockchain repositories (described in Section 2.2). Then we randomly selected an equal number of non-Blockchain repos (i.e., 3664) for the non-Blockchain GitHub repository set from the filtered set of 10k repos after removing any Blockchain repositories from this list. We show the summary of the calculated metrics of the Block- chain vs. non-Blockchain repos in Table 6. We can see in Table 6, the Blockchain repos have a higher number of commits, issues, and pull requests than the non-Blockchain repos in our dataset, denoting that Blockchain-based repos in our database are more actively developed than the non-Blockchain repos. There could be several reasons for this: •Larger investment in Blockchain projects in terms of both time and resources; •The domain is still actively growing, so rapid development is going on; •Blockchain industry’s one of the key selling points is fault tolerance of the systems, and to catch the bugs in the de- velopment phase, the artifacts (such as commits and pull requests) go through a lot of processing; Users. We find that organizations own 2,147 (58.6%) repos among 3664 Blockchain repos. In comparison, only 913 (24.9%) repos of 3664 non-Blockchain repos are owned by organizations which de- note that organizations have a significant focus on the Blockchain software ecosystem. From Table 6 we see, the number of both in- ternal and external users is higher in the Blockchain repos. EASE 2022, June 13–15, 2022, Gothenburg, Sweden Ajoy Das, Gias Uddin, and Guenther Ruhe commits issues pull_requests0510152025Interaction per Artifactcontribution maintenanceprocess reviewdiscussion Figure 10: Collaborative interactions per artifact in Non- Blockchain repositories (outliers omitted) Interactions. Comparing Figure 10 with Figures 6, 7, and 8 we see that: (1) The median of Contribution (blue bar) frequencies for Blockchain repos are between 15-20, but it is around 4 for Block- chain repos. (2) The median of Maintenance (brown bar) is around 5-10 for Blockchain repos and 1-2 for non-Blockchain repos. This indicates that more non-authors collaborate in the Blockchain arti- fact maintenance process. (3) The median for Process (green bar) is around 5 for Blockchain repos and 1-2 for non-Blockchain repos. (4) The median of Review (red bar) is around 5-10 for Blockchain repos and 1-2 for non-Blockchain repos. (5) The median for Dis- cussion (purple bar) is around 10 for Blockchain repos and 2-3 for non-Blockchain repos. Thus, across all the five interaction types, we observe higher degrees of collaboration among the users in Blockchain repos than in non-Blockchain repos. Autonomy. In Table 6 we see that: (1) The proportion of main- tainers in a repo is similar between Blockchain and non-Blockchain repos. (2) The proportion of autonomous users is more in non-Block- -chain repos (40% vs. 33% in Blockchain repos). (3) The proportion of dependent contributors is more in Blockchain repos (33% vs. 25% in non-Blockchain repos). Therefore, the lower proportion of au- tonomous users but a higher proportion of dependent contributors make the Blockchain repos less autonomous, which indicates more restriction in the Blockchain repos to make quick code changes. 4.2 The Case of Archived Blockchain Repos In software teams, obsolete projects are generally archived. Given Blockchain is a rapidly evolving paradigm, it is expected that inno- vative ideas are rapidly implemented in the Blockchain software ecosystem, with little or no guidance and previous expertise of developing such solutions. As such, it may happen that some ideas are less successful than others, resulting in their archival. We in- vestigated whether a repo is archived using two approaches: (1) We used Github API to search for the repositories that are marked as archived (2) We searched for relevant keywords (e.g., deprecated, obsolete, archived, no longer maintained, etc) in the Readme file of the repo. We find total 332 archived Blockchain repos and 316 archived non-Blockchain repos. Thus, we find a slightly higher proportion of archived repos in Blockchain than in non-Blockchain repos (9.1% vs 8.6%). In Figure 11a, we show the distribution of the archived repos over time based on their creation time. For the archived Blockchain repos, 2010 2012 2014 2016 2018 2020020406080100120# of New Archived Repositories Blockchain Non Blockchain(a) Trend of project archival 2008 2010 2012 2014 2016 2018 20200200400600800100012001400# of New Repositories Blockchain Non Blockchain (b) Trend of project creation Figure 11: Trend of (1) Archiving Projects (2) New projects we see a notable upswing between 2017-2018. No such upswing is visible for the non-Blockchain archived repos. To investigate the reasons of the upswing in 2017-2018 for the Blockchain repos, we checked the evolution of all the repos based on their creation time (see Figure 11b). For both the Blockchain and non-Blockchain repos (archived + non-archived), we see an upswing between 2017 - 2018, where the upswing is more prominent for Blockchain repos. This denotes that the more Blockchain repos got created in 2017 - 2018, the more Blockchain repos also got archived at the time. This indicates rapid evolution and implementation of new ideas in the Blockchain GitHub repos, which led to the creation of more new repos as well as the closure (i.e., archival) of old repos compared to the Blockchain repos. We analyze the reasons of archival in the repos using 200 randomly sampled repos, 100 each from Blockchain and non- Blockchain types. The sample size for each type is statistically significant with a 95% confidence level and 10 confidence interval. We then checked the description (i.e., Readme) file of each sampled repo, where the repo owners could provide their archival reasons. The first two authors analyzed the reasons together. We observed total of four archival reasons: (1) New repo migration denotes when a project development has been moved to a new repo due to change of ownership/name, rebuilding of the project from scratch, etc. (2) Resource unavailability denotes the lack of resources (e.g., developers, funding) to continue a repo. (3) Obsolete depen- dency denotes that an essential dependency (e.g., a Blockchain platform or an API/SDK) for a repo became obsolete, which led the project owner closing the project. (4) Obsolete usecases denotes a project is no longer needed because its use cases are no longer rele- vant in the evolving Blockchain ecosystem. In Table 7, we present the distribution of five archival reasons categories across the 200 sampled repos. The archival reasons for more than 50% repos are An Empirical Study of Blockchain Repositories in GitHub EASE 2022, June 13–15, 2022, Gothenburg, Sweden Table 7: Distribution of the archival reasons (in %) of repos Reason #Blockchain #Non Blockchain New repo migration 16 10 Resource unavailability 3 3 Obsolete dependency 4 4 Obsolete usecases 26 24 Not mentioned 51 59 not provided (see ‘Not Mentioned’ in Table 7). Except that, the two other major archival reasons are ‘Obsolete usecases’ and ‘New repo migration’, both of which are observed more in the Blockchain repos. 4.3 Implications of Findings Our study findings can be instrumental to following stakeholders. (1)Block chain Vendors. We find that majority of Blockchain re- pos in our dataset are owned by organizations (e.g., IBM, Ethereum), which is more than the user-owned repos (58.6% vs. 41.4%). Com- pared to the non-Blockchain repos, users in Blockchain repos show less autonomy while pushing changes in the codebase. This could indicate that the Blockchain OSS ecosystem is closely guarded by few users and industry vendors, which then can create a bottleneck while making rapid progress. Therefore, Blockchain repo owners in GitHub can create an environment with less restriction so that users can enjoy more autonomy while creating features. (2)Block chain Developersmay expect more development activ- ities and collaborative interaction in tool repos than the application repos. As the development teams of the repos are not autonomous, the developers may expect some restrictions (i.e., multiple review cycles) in applying code changes to the repos. (3)Block chain Career Enthusiasts can take note of the growth of Blockchain repos to stay aware of this rapidly evolving ecosys- tem. Blockchain repo creation peaked in 2016 - 2018, while we a high growth rate in the Blockchain repos in 2017 - 2018 (Figure 11b). Such insights can help career enthusiasts to make decisions like when to make a career change and when to invest in the ecosystem. (4)Block chain Researchers. We observed much more interac- tions of Blockchain users around issues in GitHub (see Figures 6, 7, and 8). This denotes that quality assurance of Blockchain repos is getting attention from Blockchain users. While significant research in Blockchain-based research has focused on improving security (e.g., smart-contracts [ 10,14]), our results show that research can develop tools to improve the autonomy in the repos. Autonomy can be improved by improved collaboration and the generation of automatic documentation for the Blockchain repos/APIs, e.g., by automatically expanding the documentation from online re- sources [ 33,34], where discussions and reviews about new and emerging techniques are readily available [12, 32]). 5 THREATS TO VALIDITY Internal validity threats relate to the author bias while conducting the analysis. We mitigated the bias in our manual labeling of Block- chain repos by using three human coders. We report the Cohen 𝜅agreement between the first two coders in two iterations, which show the substantial to a perfect agreement (according to Viera et al. [37]) between the coders. Construct Validity threats related to the potential errors in the study methodologies. To identify the Blockchain-related projects, we used both topics[ 17] and the project description metadata and followed best practices to analyze GitHub repos (e.g., [ 17,19,26]).External Validity threats relate to the generalizability of the findings. We study Blockchain projects that are hosted publicly in GitHub. We followed an extensive sampling process to collect the Blockchain and non-Blockchain repos (see Section 2.1). As we noted in Section 2, we picked our Blockchain repos based on a suite of 86 Blockchain-specific keywords. This approach was necessary because there is no other way to find the list of Blockchain repos in GitHub. Although GitHub offers the ‘topic’ feature to tag a repo, not all repos are tagged by the topics. Many of the Blockchain repos we found do not have any topic tag. Our keyword-based approach returned 802K GitHub repos. This large number of repos indicates that our keyword-based approach is sufficient to find a good number of Blockchain repos. 6 RELATED WORK Related work can broadly be divided into two types: Studies to understand the trends in Blockchain software and Techniques de- veloped to address problems in Blockchain-based solutions. Studies.In this research, we study the evolution of Blockchain technology from the perspective of OSS development in GitHub. Several recent empirical studies on Blockchain used GitHub data. There have been several systematic literature reviews that dis- cussed the ongoing software engineering-related research regard- ing blockchain-based software development [ 16,35]. This includes testing and analysis of smart contracts, performance and security of DApp, analyzing architecture types used during the blockchain- based software development, etc. However, no previous studies performed an empirical analysis of blockchain-based repos in the wild. Trockman et al. [ 8] report one year of development activity of around two hundred cryptocurrencies and observe that the popu- larity of the repos is associated with a higher market capitalization of the corresponding platforms. Zheng et al. [ 39] conducted an ex- tensive survey on Blockchain taxonomy, consensus algorithms, and technical challenges. Reyna et al. [ 29] investigate the challenges and potential applications for block-chain related IoT applications but do not analyze the development activity of the Blockchain projects. Tech niques. Analysing and finding vulnerabilities in Block- chain is an active research area [ 23,28]. There are also research opportunities in Blockchain scalability, i.e., improving throughput and reducing latency for cryptocurrencies [ 38,40]. Researchers have also presented tools such as Vandal [ 10], ContractFuzzer [ 20], TEETHER [ 22] to automatically detect security vulnerabilities in Blockchain smart contacts. While the above studies limit to either cryptocurrencies or spe- cific domains (e.g., healthcare), we study the overall Blockchain OSS ecosystem in GitHub based on a large sample of Blockchain repos. Similar to our study, many of the recent studies [ 11,15,17] study Collaboration among developers. Some recent analysis by Google [ 25] and Microsoft [ 30] showed that Autonomy is a crucial factor for productivity. We thus study both collaboration and au- tonomy of the users in the Blockchain repos. While they studied EASE 2022, June 13–15, 2022, Gothenburg, Sweden Ajoy Das, Gias Uddin, and Guenther Ruhe the states on the ML universe in GitHub, we study the Blockchain OSS ecosystem in GitHub. 7 CONCLUSIONS The promise of complete transparency, traceability and data im- mutability has made Blockchain a promising architecture to use in software for diverse domains like finance (e.g., cryptocurrency), supply chain management, security, etc. Given that this is a new but rapidly evolving ecosystem, it is important to understand the states of the Blockchain ecosystem. We conduct an empirical study by analyzing 3,664 Blockchain repositories in GitHub. We find that this domain is growing rapidly just after the release of the first Blockchain project in 2010 that peaked up in 2016 - 2018, when Blockchain-based solutions are adopted in diverse domains besides cryptocurrency. We find significantly more presence of large orga- nizations in the Blockchain repos, who own multiple Blockchain repos in GitHub. Moreover, we also see less autonomy of users in the Blockchain repos. With a view to foster further innovation in Blockchain OSS ecosystem, in our future work, we aim to study more the causes of low autonomy in the Blockchain repo and de- velop guidelines and tools to improve the user autonomy. ACKNOWLEDGMENTS Gias Uddin and Ajoy Das were supported by NSERC Grant (RGPIN- 2021-02575). REFERENCES [1]2021. bitcoin/bitcoin, Bitcoin Core integration/staging tree. https://github.com/ bitcoin/bitcoin. [2]2021. Cryptocurrency Prices, Charts And Market Capitalizations. https://coinmarketcap.com/. [3]2021. ethereum/go-ethereum, Official Go implementation of the Ethereum proto- col. ethereum. [4]2021. MetaMask/metamask-extension, The MetaMask browser extension enables browsing Ethereum blockchain enabled websites. MetaMask. [5]2021. monero-project/monero-gui, Ui for Monero: the secure, private, untraceable cryptocurrency. The Monero Project. [6]2021. steemit/condenser, The greatest application front-end to the Steem Block- chain. steemit. [7]Mard Andreesen. 2014. Why Bitcoin Matters. https://dealbook.nytimes.com/2014/01/21/why-bitcoin-matters. [8]Asher Trockman, Rijnard van Tonder, and Bogdan Vasilescu. 2019. Striking Gold in Software Repositories? An Econometric Study of Cryptocurrencies on GitHub. In2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR) . IEEE, Montreal, QC, Canada, 181–185. [9]Matthijs Berkhout, Fons van den Brink, Mart van Zwienen, Paul van Vulpen, and Slinger Jansen. 2018. Software Ecosystem Health of Cryptocurrencies. In Software Business (Lecture Notes in Business Information Processing) . Springer International Publishing, Cham, 27–42. [10] Lexi Brent, Anton Jurisevic, Michael Kong, Eric Liu, Francois Gauthier, Vincent Gramoli, Ralph Holz, and Bernhard Scholz. 2018. Vandal: A Scalable Security Analysis Framework for Smart Contracts. arXiv:1809.03981 [cs] (2018). [11] Marcelo Cataldo, James D Herbsleb, and Kathleen M Carley. 2008. Socio-technical congruence: a framework for assessing the impact of technical and work de- pendencies on software development productivity. In Proceedings of the Second ACM-IEEE international symposium on Empirical software engineering and mea- surement . 2–11. [12] Partha Chakraborty, Rifat Shahriyar, Anindya Iqbal, and Gias Uddin. 2021. How Do Developers Discuss and Support New Programming Languages in Techni- cal Q&A Site? An Empirical Study of Go, Swift, and Rust in Stack Overflow. Information and Software Technology (IST) (2021), 19. [13] CoinDesk. 2016. State of Blockchain Q1 2016. https://www.coindesk.com/state- of-blockchain-q1-2016. [14] Christian Colombo, Joshua Ellul, and Gordon J. Pace. 2018. Contracts over Smart Contracts: Recovering from Violations Dynamically. Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice (2018), 300–315.[15] Laura Dabbish, Colleen Stuart, Jason Tsay, and Jim Herbsleb. 2012. Social coding in GitHub: transparency and collaboration in an open software repository. In ACM 2012 conference on computer supported cooperative work . 1277–1286. [16] Selina Demi, Ricardo Colomo-Palacios, and Mary Sánchez-Gordón. 2021. Software Engineering Applications Enabled by Blockchain Technology: A Systematic Mapping Study. Applied Sciences 11, 7 (Jan. 2021), 2960. [17] Danielle Gonzalez, Thomas Zimmermann, and Nachiappan Nagappan. 2020. The State of the ML-universe: 10 Years of Artificial Intelligence & Machine Learning Software Development on GitHub. In Proc. MSR . ACM, Seoul Republic of Korea, 431–442. [18] Georgios Gousios. 2013. The GHTorent dataset and tool suite. In Proc. MSR (MSR ’13). IEEE Press, 233–236. [19] Georgios Gousios and Diomidis Spinellis. 2017. Mining Software Engineering Data from GitHub. In Proc. ICSE . IEEE, 501–502. [20] Bo Jiang, Ye Liu, and W. K. Chan. 2018. ContractFuzzer: Fuzzing Smart Con- tracts for Vulnerability Detection. In 33rd ACM/IEEE International Conference on Automated Software Engineering . 259–269. [21] Eirini Kalliamvakou, Georgios Gousios, Kelly Blincoe, Leif Singer, Daniel M. German, and Daniela Damian. 2016. An in-depth study of the promises and perils of mining GitHub. Empirical Software Engineering 21, 5 (Oct. 2016), 2035–2071. [22] Johannes Krupp and Christian Rossow. 2018. TEETHER: Gnawing at Ethereum to Automatically Exploit Smart Contracts. In 27th USENIX Conference on Security Symposium . 1317–1333. [23] Xiaoqi Li, Peng Jiang, Ting Chen, Xiapu Luo, and Qiaoyan Wen. 2020. A survey on the security of blockchain systems. Future Generation Computer Systems 107 (2020), 841–853. [24] Nuthan Munaiah, Steven Kroh, Craig Cabrey, and Meiyappan Nagappan. 2017. Curating GitHub for engineered software projects. Empirical Software Engineering 22, 6 (Dec. 2017), 3219–3253. [25] Emerson Murphy-Hill, Ciera Jaspan, Caitlin Sadowski, David Shepherd, Michael Phillips, Collin Winter, Andrea Knight, Edward Smith, and Matt Jorde. 2019. What Predicts Software Developers’ Productivity? IEEE Transactions on Software Engineering (2019). [26] Paulo Anselmo da Mota Silveira Neto, Umme Ayda Mannan, Eduardo Santana de Almeida, Nachiappan Nagappan, David Lo, Pavneet Singh Kochhar, Cuiyun Gao, and Iftekhar Ahmed. 2020. A Deep Dive on the Impact of COVID-19 in Software Development. arXiv:2008.07048 [cs] (Aug. 2020). arXiv:2008.07048 [cs] [27] Khadija Osman. 2020. Studying the Health of the Bitcoin Ecosystem in GitHub. (2020), 137. [28] Jin Ho Park and Jong Hyuk Park. 2017. Blockchain security in cloud computing: Use cases, challenges, and solutions. Symmetry 9, 8 (2017), 164. [29] Ana Reyna, Cristian Martín, Jaime Chen, Enrique Soler, and Manuel Díaz. 2018. On blockchain and its integration with IoT. Challenges and opportunities. Future generation computer systems 88 (2018), 173–190. [30] Margaret-Anne Storey, Thomas Zimmermann, Christian Bird, Jacek Czerwonka, Brendan Murphy, and Eirini Kalliamvakou. 2019. Towards a theory of software developer job satisfaction and perceived productivity. IEEE Transactions on Software Engineering (2019). [31] The Economist. 2015. Blockchains: The great chain of being sure about things. https://www.economist.com/briefing/2015/10/31/the-great-chain-of- being-sure-about-things. [32] Gias Uddin and Foutse Khomh. 2017. Automatic Summarization of API Re- views. In Proc. 32nd IEEE/ACM International Conference on Automated Software Engineering . 12. [33] Gias Uddin and Foutse Khomh. 2019. Automatic opinion mining from API reviews from stack overflow. IEEE Transactions on Software Engineering (2019), 35. [34] Gias Uddin, Foutse Khomh, and Chanchal K Roy. 2020. Automatic Mining of API Usage Scenarios from Stack Overflow. Information and Software Technology (IST) (2020), 16. [35] Anna Vacca, Andrea Di Sorbo, Corrado A. Visaggio, and Gerardo Canfora. 2021. A Systematic Literature Review of Blockchain and Smart Contract Development: Techniques, Tools, and Open Challenges. Journal of Systems and Software 174 (April 2021), 110891. [36] Mike van Rossum. 2021. askmike/gekko, A bitcoin trading bot written in node. https://github.com/askmike/gekko. [37] Anthony J. Viera and Joanne M. Garrett. 2005. Understanding interobserver agreement: The kappa statistic. Family medicine 37, 4 (2005), 360–363. [38] Junfeng Xie, F Richard Yu, Tao Huang, Renchao Xie, Jiang Liu, and Yunjie Liu. 2019. A survey on the scalability of blockchain systems. IEEE Network 33, 5 (2019), 166–173. [39] Zibin Zheng, Shaoan Xie, Hong-Ning Dai, Xiangping Chen, and Huaimin Wang. 2018. Blockchain challenges and opportunities: A survey. International Journal of Web and Grid Services 14, 4 (2018), 352–375. [40] Qiheng Zhou, Huawei Huang, Zibin Zheng, and Jing Bian. 2020. Solutions to scalability of blockchain: A survey. IEEE Access 8 (2020), 16440–16455.
{ "id": "2205.08087" }
2405.19762
The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention
Current methods to prevent crypto asset fraud are based on the analysis of transaction graphs within blockchain networks. While effective for identifying transaction patterns indicative of fraud, it does not capture the semantics of transactions and is constrained to blockchain data. Consequently, preventive methods based on transaction graphs are inherently limited. In response to these limitations, we propose the Kosmosis approach, which aims to incrementally construct a knowledge graph as new blockchain and social media data become available. During construction, it aims to extract the semantics of transactions and connect blockchain addresses to their real-world entities by fusing blockchain and social media data in a knowledge graph. This enables novel preventive methods against rug pulls as a form of crypto asset fraud. To demonstrate the effectiveness and practical applicability of the Kosmosis approach, we examine a series of real-world rug pulls from 2021. Through this case, we illustrate how Kosmosis can aid in identifying and preventing such fraudulent activities by leveraging the insights from the constructed knowledge graph.
http://arxiv.org/pdf/2405.19762v1
Philipp Stangl, Christoph P. Neumann
cs.CR, cs.DC
cs.CR
The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention Technical Reports: CL-2024-01, February 2024 Philipp Stangl and Christoph P. Neumann CyberLytics-Lab at the Department of Electrical Engineering, Media and Computer Science Ostbayerische Technische Hochschule Amberg-Weiden Amberg, Germany Abstract —Current methods to prevent crypto asset fraud are based on the analysis of transaction graphs within blockchain networks. While effective for identifying transaction patterns in- dicative of fraud, it does not capture the semantics of transactions and is constrained to blockchain data. Consequently, preventive methods based on transaction graphs are inherently limited. In response to these limitations, we propose the Kosmosis approach, which aims to incrementally construct a knowledge graph as new blockchain and social media data become available. During construction, it aims to extract the semantics of transactions and connect blockchain addresses to their real-world entities by fusing blockchain and social media data in a knowledge graph. This enables novel preventive methods against rug pulls as a form of crypto asset fraud. To demonstrate the effectiveness and practical applicability of the Kosmosis approach, we examine a series of real-world rug pulls from 2021. Through this case, we illustrate how Kosmosis can aid in identifying and preventing such fraudulent activities by leveraging the insights from the constructed knowledge graph. Index Terms —blockchain; cyber fraud; rug pull; security; knowledge graphs; discovery; pseudonymity; untraceability. I. I NTRODUCTION Crypto assets are digital assets that use distributed ledger technology, such as blockchain, to prove ownership and main- tain a decentralized and public ledger of all transactions. There are distinct types of assets, each with unique characteristics and use-cases. Cryptocurrencies, like Bitcoin [1], are the most well- known form. They function as digital currencies and are used for storing or transferring monetary value. Fungible Tokens (FTs), another type of crypto asset, are interchangeable units representing various utilities or assets within a blockchain ecosystem. These tokens often play a vital role in Decentralized Finance ( DeFi) protocols and can represent anything from voting rights to a currency within a project ecosystem. Lastly, Non-Fungible Tokens ( NFTs) are unique digital assets that prove ownership and authenticity of digital or real-world assets [2]. Unlike cryptocurrencies and FTs, each NFT has a distinct value and cannot be exchanged on a one-to-one basis with other tokens. In the rapidly evolving landscape of crypto assets, the incidence of illicit activities has surged. Chainalysis, a leading blockchain analytics firm, reported that illicit transaction volume rose for the second consecutive year in 2022, reaching an all-time high of $20.6 billion in illicit activity [3]. Since the rise of DeFi in 2020, followed by NFT sin 2021, Rug Pulls have become a major fraud scheme in termsof amount stolen and frequency [4]. Thus, rug pulls pose a significant risk to investors and undermine the integrity of the crypto asset sector. The predominant approach for identifying patterns indicative of fraudulent activity is the transaction graph analysis within blockchain networks [5, 6], [7, pp. 21–24]. However, this approach presents two key challenges. Firstly, the transacting parties are pseudonymous and only their blockchain addresses are publicly known. This means that, although the transactions of a specific address can be tracked, linking that address to a real-world entity can be challenging since this approach is limited to information or patterns observable in blockchain data. Secondly, this approach is only concerned with the following aspects of a transaction: 1) The transferred asset, 2) the quantity, and 3) the sender and receiver. However, the semantics of a transaction, such as what happened in a transaction that caused the assets to get transferred, is not covered. Thereby limiting the depth of analysis that can be conducted on crypto asset movements. Knowledge Graphs ( KGs) [8] are increasingly recognized as a powerful means to integrate fragmented knowledge from heterogeneous data sources into a graph of data to facilitate semantic querying (e. g., [9, 10]) and reasoning (e. g., [11]). AKGprovides a holistic view for identifying patterns and hidden connections indicative of fraudulent activities in a highly connected dataset [12]. The KGconsists of semantically described entities, each with a unique identifier, and relations among those entities using an ontological representation [13, 14]. Their open world assumption allows for the continual integration of new data. By leveraging these capabilities, KGs can enhance crypto asset fraud analysis and aid in predicting future fraudulent activities. The remainder of this paper is organized as follows. We first outline the Kosmosis objectives in Section II. Next, we provide a background on the Ethereum blockchain and graph-based blockchain data mining methods in Section III. Subsequently, in Section IV we propose Kosmosis, our incremental KGconstruc- tion pipeline. In Section V we provide essential background on rug pulls before we demonstrate the effectiveness and practical applicability of the Kosmosis approach for the use case of NFT rug pull prevention in Section VI. Finally, we outline future work in Section VII and conclude the paper with a discussion of our findings. cb This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license. Please cite as: Philipp Stangl and Christoph P. Neumann. The Kosmosis Use-Case of Crypto Rug Pull Detection and Prevention . Technical Reports CL-2024-01. Ostbayerische Technische Hochschule Amberg -Weiden, CyberLytics -Lab at the Department of Electrical Engineering, Media and Computer Science, Feb. 2024.arXiv:2405.19762v1 [cs.CR] 30 May 2024 II. K OSMOSIS OBJECTIVES This section outlines the objectives of Kosmosis beginning with the primary objective that investigates the potential of a KGin identifying and alerting users before they interact with projects linked to known scammers, addressing a critical need for security and trust in blockchain ecosystems. Following that, we explore the technical implications of the primary objective. Objective 1: How can the KGidentify and aid in alerting users before interacting with a rug pull project? With the rise in illicit activities in the crypto asset market, especially rug pulls, there is a pressing need for effective means to detect and prevent fraudulent activities. Kosmosis aims to integrate fragmented knowledge from blockchains like Ethereum, social media like X1, and potentially other knowledge graphs into one unified KG, enabling semantic querying and reasoning over a graph of entities and the relationships among them. The KGcould serve as a knowledge base for a real-time alerting system, warning users of potential risks associated with certain projects or individuals. Objective 2: How to incrementally construct the KGfrom heterogeneous data sources? It is imperative to establish a pipeline capable of integrating updates into the KGin both batch- and streaming-like manner. Thereby, maintaining high data freshness by ensuring that the KGconsistently reflects the most up-to-date information from the blockchain and other sources. This approach should not entail a complete reconstruction of the KG, but rather concentrate on integrating new information, avoiding the reprocessing of data that is already incorporated. Objective 3: How to extract the semantics of blockchain transactions? Transaction graphs commonly only display transactions with asset transfers and provide answers to questions such as “what” assets were transferred and “where” were they transferred to. Understanding transactions semantically is vital in uncovering sophisticated fraudulent schemes that might otherwise go unnoticed. Kosmosis addresses this gap by extracting the semantics of transactions, providing answers to “why” and “how” assets were transferred in a transaction. This extraction of semantic information is primarily achieved through decoding the input data of a transaction using the Application Binary Interface ( ABI) of smart contracts a transaction interacts with. III. B ACKGROUND In this section we provide background2on blockchain tech- nology, specifically the Ethereum blockchain, in Section III-A . Subsequently, we outline related graph-based blockchain data mining methods in Section III-B. 1X is the platform formerly known as Twitter. 2As additional background, we described general security challenges for cloud applications in [15] and we did some previous work on correlating Reddit data with traditional stock market data in [16] as well as analyzing Twitter data with SPARQL [17].A. The Ethereum Blockchain Blockchain technology is based on the principles of im- mutability, decentralization, transparency, and cryptographic security and has seen various applications in recent years. For instance, in the financial sector (e. g., [1, 18]), or supply chain management (e. g., using a single blockchain [19], or using multiple, interoperable blockchains [20, 21]). Smart contract platforms represent a subset of blockchains that enable the development of decentralized applications through smart contracts. This section outlines the key concepts of Ethereum, as an example for smart contract platforms, that are essential for the following sections of this work, such as smart contracts, their execution environment, and account-based accounting. 1) Blockchain Data Structure: A blockchain is a data structure whose elements called blocks are linked together to form a chain of blocks [22]. Each block comprises two parts: a body and a header. The body of the block contains a set of transactions. A transaction typically involves the transfer of assets between a sender and a receiver. These participants are represented by addresses, which are unique alphanumeric strings that clearly specify the origin and destination of each transaction. Further, the block body is used to generate a unique identifier called the block hash. The block header contains a reference to the unique identifier of its immediate predecessor, known as the parent block. 2) Smart Contracts: Through smart contacts, which are executable source codes that enforce the terms and conditions of particular agreements, a smart contract platform like Ethereum facilitates the development of decentralized applications [23]. Once deployed on the blockchain, the smart contract is assigned an address where the code resides and cannot be altered or tampered with. By writing custom smart contracts, developers can create and manage tokens that adhere to the ERC-20 (FT) [24] orERC-721 (NFT) [25] standard [23]. An ABIspecifies the functions and data structures exposed by a smart contract, allowing external applications to understand the capabilities of the contract. Further, an ABIdefines a format for encoding and decoding data that is passed between smart contracts and external applications. This ensures a consistent and standardized way to exchange information. The Ethereum blockchain manages Ether ( ETH) as the native cryptocurrency of the platform. It operates with the Ethereum Virtual Machine ( EVM) as a fundamental building block, serving as the execution environment for smart contract code. Smart contracts, primarily written in a high-level language such as Solidity, undergo compilation into EVM bytecode. This bytecode is the executable format used by the EVM to enact smart contract functions. To interact with this bytecode, a contract ABIis utilized, which acts as a bridge between the high-level language and the low-level bytecode. In this context, an EVM disassembler plays a crucial role; it reverses the bytecode back into a more readable format, aiding developers in understanding and analyzing the code deployed on the Ethereum blockchain. Figure 1 shows the processes involved in deploying smart contracts to the Ethereum blockchain and reading contract data from it, including compilation and deployment steps, and the interaction between a web application and the Ethereum blockchain. The left side shows the compilation and deployment of a smart contract, and the right side depicts an interaction with the contract (e. g., from a web application). IDE/ Front-end Ethereum VM Ethereum Blockchain1. CompileSolidit y Source Co de ABI 2. Deplo yByteco de Opcodes Block nWeb Application 4. Deco de ABI Byteco de 3. Receive Block n+iDeploying Contracts to Ethereum Reading Contract Data from Ethereum Figure 1: Schematic representation of deploying and reading from smart contracts. Adapted from [26]. 3) Externally Owned Account: Unlike smart contracts, Externally Owned Accounts ( EOA s) are controlled by real- world entitys through private keys, enabling them to initiate transactions, such as transferring crypto assets or executing functions of a smart contract. When an EOA sends a transaction to a smart contract, it triggers the code of the contract to execute according to its predefined rules. 4) Account-based Accounting: For the record-keeping of transactions, blockchains utilize an accounting model. Com- pared to other blockchains, such as the equally well-known Bitcoin [1] blockchain that uses the Unspent Transaction Output (UTXO ) model, or its successor the extended UTXO [27] utilized by the Cardano [28] blockchain, Ethereum [18] employs the account-based accounting model. The account-based model can be best understood through the analogy of a bank account. This approach mirrors how a banking account operates. Like a bank account that tracks the inflow and outflow of funds, thereby reflecting the current balance, the account-based model in Ethereum maintains a state that records the balance of Ether. Thus, it is inherently stateful. Each transaction results in a direct adjustment to this balance, akin to a deposit or withdrawal in a bank account. This model’s stateful nature ensures that at any given moment, the system can accurately reflect the total amount of Ether held in each account, offering an up-to-date view of account balances within Ethereum. 5) Token Minting: The process of creating new tokens is called token minting. FTsare typically minted by the creator either at the inception of the project or progressively over time. This process is often governed by predefined rules or algorithms embedded within the smart contracts of the project. In contrast, NFTminting involves other individuals besides the token creator, commonly termed as token minters. They engage by invoking a specific function within a smart contract, in the ERC-721 token standard, called mint. This action results in an increase in the supply of the NFT sand simultaneously assigns these minted tokens to the blockchain address of the minter. Themechanism of minting NFT soften involves utilizing a dedicated minting website. Here, prospective minters or investors are required to invest a predetermined amount, as set by the creator, to initiate the minting process. This investment grants them the ability to mint one or multiple NFTs, depending on the terms set forth in the smart contract. This process not only facilitates the creation of new NFT sbut also serves as a means of transferring ownership directly from the creator to the NFT minter. B. Rug Pull Detection Methods This section explores two primary methodologies that have been employed in the past to detect rug pulls: smart contract code analysis and graph-based methods. Smart contract code analysis involves a thorough examination of the contract’s code to extract and analyze the semantic behavior of transactions. For instance, [29] utilizes smart contract code analysis to reveal potential vulnerabilities and fraudulent patterns within the contracts. By dissecting the code, their proposed method, dubbed "Tokeer”, can identify suspicious patterns and functions that might indicate a predisposition to rug pull scams. Graph theories and graph-based data mining methods are applicable for discovering information in blockchain network graphs, because blockchain transactions can be easily structured into graphs [7]. Elmougy and L. Liu [30] identified three types of graphs, applicable to any blockchain network: money flow transaction graphs visualize the asset flow over time, address- transaction graphs showing flow of an asset across transactions and addresses, and user entity graphs that clusters the graph for potential linking of addresses controlled by the same user, to deanonymize their identity and purpose. To detect rug pulls, graph-based approaches use network embedding methods to automatically extract features from the blockchain network (e. g., [31]) using a graph convolutional network IV. T HEKOSMOSIS APPROACH TO INCREMENTAL KNOWLEDGE GRAPH CONSTRUCTION To incrementally construct a knowledge graph that integrates data in a continuous and periodic way, we propose a multi- stage pipeline, as illustrated in Figure 2, that consists of three stages: Data ingestion, data processing, and knowledge storage. The initial stage, data ingestion, captures the raw data from the primary data sources (blockchain and social media) as well as enrichment data sources (e. g., another knowledge base). This phase is characterized by its versatility in the frequency of data acquisition: it can be 1) continuous , to capture real-time updates from sources such as blockchain nodes, 2) incremental for new posts via the X Streaming Application Programming Interface ( API), 3) periodic , to capture new entries in structured data sources like relational databases at regular intervals, or 4) event-based , responding to events that are emitted upon new entity additions to the KG. Following the ingestion stage, the data processing stage is initiated, which is partitioned into distinct workflows tailored to handle each type of ingested data. This segmentation allows for specialized processing depending on the structure of the Legend: Data Flo w Knowledge Extraction Step Load SubgraphTriplesto reAddress Relation ExtractionKnowledge Sto rage Attributions Database (structured data)Enrichment Data Sources Golden Kno wledge Graph API (structured data)Primary Data SourcesData Ingestion Address T aggingWebsocket (continuously) Text Entity ResolutionRelation ExtractionNamed Entit y Recognition Attributions Entity Resolution Golden Entit y ResolutionBlockchain Entity Resolution X Filtered Stream API (unstructured data)HTTP Requests (incrementally) RDBMS Client (periodically) HTTP Requests (event-driven) Connecto rData Pro cessing Blockchain No de (semi-structured data) Knowledge Pro cessing StepFigure 2: A high level overview of the Kosmosis pipeline. raw data. For instance, for text data sources, natural language processing techniques, such as named entity recognition [32], can be used to ensure that the data is accurately interpreted, and contextual relationships are discerned. In the third and final stage, the refined data is loaded into the knowledge storage, where it is systematically organized within a triplestore, a type of database optimized for storing and retrieving data in Resource Description Framework ( RDF) format. The triplestore can then be used for semantic querying capabilities to extract actionable insights from the knowledge graph for downstream processes. For the KGwe use the EthOn [33] ontology that formalizes the concepts and relations within the domain of the Ethereum network and blockchain. EthOn is written in RDF and Web Ontology Language ( OWL). A. Blockchain Data Processing The blockchain data processing workflow continuously ingests new transactions from the blockchain via websocket con- nections. Websockets enable open, interactive communication sessions between a client and a server, facilitating real-time data transfer without the need for repeated polling. Upon receiving these transactions, the workflow processes and integrates them into the KGby first extracting the address relationship, followed by tagging the addresses, and finally fusing the addresses with the entities of the KG. 1) Address Relation Extraction: In order to provide answers to “why” and “how” assets were transferred in a transaction, Kosmosis implements a pipeline module titled Address Relation Extraction . The responsibility of this module is to extractthe semantic information in a transaction through decoding the input data of a transaction using the ABIof the smart contract a blockchain address is interacting with in a blockchain transaction. First, the ABIis requested from Etherscan [34] and Sourcify [35] via their respective REST APIs. If the ABI cannot be successfully fetched from one of the aforementioned sources, the module resorts to reconstructing the ABIfrom the smart contract byte code, which is available at any time since the bytecode is deployed on the blockchain. This operation enables the decoding of transactions and the interaction with smart contracts beyond their compiled state. The pseudocode is given in the appendix as Algorithm 1, it outlines our systematic approach to this extraction process. The initial step involves the disassembly of the bytecode of the smart contract. This process, referred to as DISASM , decomposes the bytecode into a series of readable opcodes and associated data. Disassemblers (e.g., pyevmasm [36]) facilitate this step by translating the bytecode back into a form that represents the original instructions and operations defined within the smart contract. Following disassembly, the algorithm initializes by creating an empty array intended to store the ABIand defining lists of opcodes that either change the state (stateChangingOpcodes) or read from the state (stateReadingOpcodes) of the blockchain. These opcodes include SSTORE ,CREATE ,CREATE2 for state-changing operations, and SLOAD for state-reading operations, reflecting the fundamental actions a smart contract on the EVM can perform [18]. The core of the algorithm iterates over selector/offset pairs within the disassembled bytecode. Selectors serve as identifiers for functions in the EVM, facilitating the mapping to the corresponding functionality. If a given offset does not match any destination within the program’s destinations, the iteration skips to the next pair, ensuring only valid functions are considered. Upon finding a valid function destination, the algorithm retrieves the function definition and assigns tags based on its behavior. This tagging process involves analyzing the opcodes contained within the function and any related jump destinations. The purpose is to categorize functions according to how they alter the blockchain state, using a depth-first search algorithm to navigate through the function call graph. An AbiFunction object is then created for each valid function, with its payable status determined inversely by the presence of a notPayable marker at the corresponding offset. The algorithm next assigns mutability attributes (nonpayable, payable, view, or pure) based on whether the function alters state, reads state, or neither. This classification is crucial for understanding how functions interact with the blockchain and their implications on transaction costs and permissions. Finally, the algorithm decides on the inclusion of inputs and outputs in the function signature, informed by the presence of specific tags. For instance, tags indicating data retrieval or state mutation influence whether parameters are classified as inputs or outputs. This granular control ensures that the ABI accurately reflects the interface of the smart contract, allowing for effective transaction decoding. 2) Address Tagging: Since the exact identity of a real-world entity controlling a blockchain address is often times unknown, it can still be categorized and tagged accordingly. The address tagging module tags the sender and receiver address based on their extracted relationship from the preceding address relation extraction module. For instance, an EOA deploying a smart contract is tagged as deployer in case of a contract creation transaction. Likewise, if an EOA is sending Ether to an NFT contract Tvia a contract function containing the word “mint”, the EOA is tagged as is tagged as NFTminter of T. Tags are subclasses of EOA sand contract accounts, extending the address concept of the EthOn ontology. 3) Blockchain Entity Resolution: The blockchain entity resolution module is responsible for resolving blockchain addresses to either new entities or existing ones in the KG, by using the extracted information from preceding steps. It begins with mapping the result data from the preceding steps into the RDF format, adhering to the ontology defined by the knowledge graph. This ensures that the data is structured in a way that is compatible with the knowledge graph’s existing schema, facilitating seamless integration. Following the mapping to RDF, the next phase involves fusing this RDF data with the knowledge graph. This is accomplished through a two-step process. Initially, a subgraph that is relevant to the processed data is loaded into the system. This step, commonly referred to as “blocking,” narrows down the scope of the resolution process to the most relevant segments of theknowledge graph, thereby enhancing efficiency in the entity resolution process. Subsequently, the system proceeds to match the newly processed data with the corresponding entities within the knowl- edge graph. This matching process is crucial for identifying where the new data fits within the existing structure and for ensuring that it is integrated in a meaningful way. In certain cases, the fusion process may also involve the clustering of entities. This is particularly relevant for blockchain data, where unique characteristics of the data can be leveraged to enhance the integration process. For instance, when dealing with blockchains that utilize an account-based accounting model, address clustering heuristics can be employed to further refine the fusion process. One such heuristic is the deposit address reuse, as proposed by Victor [37]. Kosmosis capitalizes on the deposit address reuse pattern for blockchain data from Ethereum to resolve entities more effectively. B. Text Processing The workflow starts with the input of unstructured data from the X Filtered Stream API[38], which is incrementally streamed and parsed via a long-lived HTTP request into the pipeline for processing. The first step in processing this data is named entity recognition, where the system identifies and classifies named entities present in the text into predefined categories, such as the names of persons, organizations, and locations. The next step is relation extraction. This process involves identifying and extracting relationships between the named entities that were previously recognized. For instance, it could determine that a person named “Alice” works for a company named “Acme.” The final step in the text processing workflow is the entity resolution, achieved through blocking and matching. For each new entity, the system identifies all other entities within the KGthat need to be considered for matching. Considering the growing size of the KG, through the incremental updates, it is important to limit the matching process to as few candidates as possible [14]. The method of limiting candidates is known as blocking, which confines the matching process to entities of the same or most similar entity type. Following the blocking that serves as a preliminary filtering step, the matching is performed. This involves a pairwise comparison of the new entities with those existing entities in the KGidentified during the blocking phase. Its objective is to identify all entities that are sufficiently similar and, therefore, potential candidates for matching. This pairwise comparison relies on a nuanced assessment of similarity that encompasses both the properties of the entities and their relational connections within the KG. By evaluating both property values and the nature of relationships to other entities, the system determines the degree of similarity between entities. C. Enrichment Data Processing Enrichment data enhances the data obtained from primary data sources with supplementary context regarding real-world entitys. Attributions involve the mapping of blockchain ad- dresses to their corresponding real-world entities. This task is largely dependent on data sourced from a network of experts, such as team members from blockchain projects. The input data for the attribution process is typically not consistent in its timing, as it depends on when the experts provide updates or when new information becomes available. As a result, the enrichment data processing workflow is designed to operate at regular intervals, ensuring that the KGis updated systematically and remains as up-to-date as possible. To further enrich the KG, data from external knowledge bases is integrated. In our case, we use the Golden Knowledge Graph due to its concentrated information on tech startups and cryptocurrencies. This external graph offers a wealth of information about crypto projects, including details about their founders, team members, and project descriptions. Such depth of data provides a valuable context that can significantly improve the understanding of entities in the constructed KG. The workflow for integrating knowledge from an external Knowledge Graph is event-driven, activated once the knowledge storage indicates the addition of new entities from the social media platform X. Then, the workflow triggers a process to pull in additional background information from the Golden Enrichment API[39]. It uses the X username that has been newly included in the KGas unique identifier to fetch relevant data. V. R UGPULLS AND SERIAL FRAUDSTERS A rug pull can be categorized as a scam, i. e., the victim authorizes the transaction. This type of scam is typically carried out in five stages, according to [4]: (1) Project creation with roadmap and total supply of tokens (optional), (2) pre-mint hype, (3) set token mint price, (4) token mint, accumulation of more capital and increase in popularity, and finally (5) the creators cash out, abandon the project, and leave the investors defrauded. To attract users and investments for rug pulls, Sharma, Agarwal, and Shukla [4] suggest the involvement of individuals or groups that possess substantial technical skills and knowledge of blockchain technology and demonstrate a proficiency in marketing techniques. This specific use case is particularly relevant given the findings in [4] and [40]: Mazorra, Adan, and Daza, who analyzed ERC-20 tokens listed on decentralized exchanges in their 2022 study, labeled 97.7% out of 27,588 analyzed tokens as rug pulls [40]. Likewise, Sharma, Agarwal, and Shukla analyzed NFT sand identified a cluster of 168 NFT sassociated with what they termed the “Rug-Pull Mafia,” a group of creators responsible for orchestrating multiple and repeated rug pulls [4]. There is a growing trend in both the frequency and the financial impact of crypto rug pulls and scams [41], illustrated in Figure 5, provided as supplementary material in Appendix A. Notably, the year 2021 marks a peak in the amount stolen, while 2022 shows a sharp rise in the frequency of these fraudulent activities and remains elevated since.VI. T HEUSECASE OF RUGPULL PREVENTION To illustrate the vision of Kosmosis-enabled rug pull preven- tion methods, this section introduces a hypothetical user story3 centered around a character we name Bob, a crypto market participant. The Kosmosis user story is designed to provide a relatable perspective on how individuals like Bob are affected by such fraudulent activities. The story of Bob, while fictional, is grounded in a series of real-world rug pulls that took place in 2021. All rug pulls were carried out by the same fraudulent NFTcreator and Twitter user known as Homer_eth. In Section VI-C , we outline how the series of rug pulls experienced by Bob might have unfolded differently had he been equipped with a Kosmosis-enabled fraud prevention mechanism at the time. A. Past User Story In the span of two months, from October to November 2021, a fraudulent NFT creator and X user known as Homer_eth executed five different NFTproject rug pulls within two months, accumulating over $2.8 million in profits. Table I provides an overview of Homer_eth’s rug pull projects, each with launch date and the estimated profit. The basis of this user story is the transaction graph depicted in Figure 3 that shows the blockchain addresses (depicted as EOA nodes in the graph) that the rug puller used and how they are connected through transactions. Table I: Rug Pull Projects by Homer_eth Project Name Launch Date Estimated Profit Ether Bananas 10/07/2021 $125k Ether Monkeys 10/11/2021 $1.77m Zombie Monkeys 10/15/2021 $413k Ether Reapers 10/20/2021 $282k ETH Banana Chips 11/23/2021 $208k Bob’s story begins with a common enthusiasm for the burgeoning world of NFT s. His journey into the NFTmarket is marked by excitement and optimism, spurred by the success stories he sees online. Homer_eth, an NFTcreator and X user, has caught the attention of many like Bob by sharing his NFT projects on X. His first NT collection was Ether Bananas , consisting of 750 NFTs, was launched on October 7, 2021. Only four days later, on October 11, Homer_eth continued with the release of Ether Monkeys , followed by the release ofZombie Monkeys . The buzz around Homer_eth’s projects, especially Ether Monkeys , which promised additional utility through a casino to gamble and a decentralized autonomous organization to govern the NFT s, according to [44], draws Bob into the fray. Being relatively new to the NFT market, Bob views this as an opportunity not to be missed. Bob bought his first NFT from Homer_eth, an Ether Reapers , and with that purchase, he was no longer just a bystander; he was now an active participant in Homer_eth’s growing community. 3The user story method of use case illustration is adopted from our previous work in [42, 43]. 3.5 ETHEther Monk eys 2.5 ETH 0x2b ddLegend: Token Account Single T ransaction499.85 ETH36.25 ETH 499.85 ETH 0x872dEther Bananas 36.25 ETHDepositors 1.1 ETH 0xc3b c106.95 ETH Zombie Monk eys 106.95 ETHETH Banana Chips 0xe396 50.4 ETH 50.4 ETH EOA Aggregated T ransactionsEther Reap ers 0xc8a6 65.61 ETH 65.61 ETH 1.5 ETH 0xf580Figure 3: Simplified transaction graph of Homer_eth’s NFTrug pulls. Bob’s involvement in the community deepened over time. He engaged in discussions, shared his excitement with fellow members, and reveled in the rumors of more NFTlaunches in the future. His commitment paid off when he earned himself a whitelist spot that allows Bob to mint the upcoming NFTproject ETHBanana Chips by Homer_eth. Convinced of its potential, Bob didn’t hesitate to mint an ETHBanana Chips NFTwhen the opportunity arose. With a click to confirm the transaction in his browser wallet (e. g., MetaMask [45]), Bob became the proud owner of an ETH Banana Chips NFT, unaware of the underlying risks associated with his investment. However, the reality of the situation was far from the optimistic scenario Bob had envisioned. Unknown to him, since Bob had a limited understanding of blockchain transactions, the proceeds from the Ether Reapers mint were not being locked in the smart contract for future development as promised. Instead, they were directly funneled into Homer_eth’s deployer address. From there, Homer_eth will later transfer those mint proceeds either to his next deployer address or to exchanges in order to pay out his profits made from rug pulling the projects. After the launch of ETH Banana Chips , a tense silence enveloped the community. For months, there was no news from Homer_eth, no updates on the project, leaving everyone to wonder about the future. It wasn’t until March 2022, that Homer_eth broke the silence with the announcement of one last NFTproject, dubbed Froggy Frens . However, due to backlash from the community, Homer_eth deleted his X account and vanished [44]. B. Kosmosis Extension The basis of the extended user story is the Kosmosis KG, depicted for this specific user story in Figure 4. This KGis a direct enhancement over the basic transaction graph from Figure 3 as it was discussed in the previous subsection. The enhancement comprises semantically annotated edges and the incorporation of data from the social media platform X. The data integrated from platform X enriches the KGwith detailed information about user accounts, labeled as X Account ,and specific announcements or posts, referred to as X Post . This integration facilitates a deeper understanding of the context and relationships surrounding these rug pulls. For instance, it enables the KGto establish a connection between previously unrelated entities, such as the deployer address 0xc8a6 , the user Homer_eth, and his associated blockchain addresses. A key feature of this KGis its semantically annotated edges, particularly for blockchain data, made possible through the address relation extraction module. The edges semantically describe value transactions, such as mintMonkey andTransfer , and non-value transactions, such as the deployment of a smart contract, denoted as Deploy . These semantics allow describing (i. e., tagging) sender and receiver addresses as NFT minter (previously depositor) and deployer (previously EOA) addresses. C. Future User Story In an alternative scenario where Bob would have had access to Kosmosis-enabled rug pull prevention, his journey in the NFTmarket would have been safer, beginning with his initial transaction to purchase an Ether Reapers NFT. As soon as Bob initiated his transaction, the rug pull prevention mechanism would have accessed the KG, to analyze the rug pull risk of the contract. Based on the integrated knowledge from X, the system would have been able to link the contract, Bob is about to interact with, to all of Homer_eth’s prior blockchain activity. The KGwould have revealed a critical anomaly. Instead of the mint proceeds being transferred to the contract address of the project for future development, they were being diverted to the Ether Reapers deployer address via the MintReaper function. With smart contracts acting as an automated and trustless intermediary, where the code of the contract dictates the flow of funds according to predefined rules, this pattern of fund diversion is absent in legitimate projects. When funds are sent directly to a team member’s address, in this case the deployer address, the funds can be moved to exchanges or other addresses with ease (i. e., pulling liquidity from the project without fulfilling the promises). This is a common tactic in rug pulls, where the developers abandon p osted postedHomer _eth T ransfer 3.5 ETHEther Monk eys Transfer 2.5 ETH 0x2bddLegend: Token Account X Account Transaction X RelationshipDeplo y mintMonkey 499.85 ETHMintBanana 36.25ETHmintMonk ey 499.85 ETH Deployer 0x872dEther BananasDeployMintBanana 36.25 ETHNFT Mintersannounces announcesannounces Transfer1.1 ETH0xc3bcMintMonk ey 106.95 ETHZombie Monk eysDeployMintMonk ey 106.95 ETHDeplo yEther Reap ersmintReap er 65.61 ETH0xc8a6mintReap er 65.61 ETH ETH Banana Chips 0xe396 Deplo y MintBananachips50.4 ETH MintBananachips 50.4 ETHp ostedannouncesT ransfer 1.5 ETH0xf580 EOAAnnouncement Announcement Announcement Announcementposted X PostFigure 4: Knowledge graph of Homer_eth’s NFTrug pulls, constructed using Kosmosis. the project and disappear with the investor funds. Therefore, signaling a potential rug pull behavior. Upon detecting this anomaly, the system would have immediately issued a rug pull warning to Bob, prompting Bob to make an informed decision by asking whether he wishes to proceed with the transaction despite the identified risk. This proactive approach empowers Bob to reconsider his decision with full awareness of the potential danger, offering him a chance to opt-out before potentially falling victim to a rug pull. VII. F UTURE WORK The initial findings of our research on Kosmosis have shown promising results, indicating the potential of our approach in identifying and preventing rug pulls. However, recognizing the early stage of our project, there are ample improvement opportunities for Kosmosis in future work. The generalization, from the exemplary use case to a sophisticated general rug pull classification method, covering various data patterns in the KG, is open research. Our subsequent endeavor involves the development of an algorithm capable of discerning rug pull warnings at varying confidence levels. This pursuit commences with the formulation of an intricate SPARQL query. Furthermore, an alerting system that utilizes the KG, constructed with Kosmosis, to alert users before interacting with a potential rug pull project, as described in the user story of Section VI, requires future efforts.It will also be necessary to refine the filters used in the ingestion of data from the X Filtered Stream API. The current process of data ingestion depends on the presence of direct links to blockchain addresses in social media posts. For instance, the ability to link the user Homer_eth with theEtherReapers smart contract (Section VI-C ) was solely facilitated by the explicit mention of the smart contract address in Homer_eth’s announcement post on X. This example underscores the limitations of the current approach, which may overlook relevant connections in the absence of direct references. Consequently, a more sophisticated approach is required to ensure a broader and still relevant dataset is captured to associate X users with their respective blockchain addresses. Additionally, the implementation of knowledge fusion, the process of identifying true subject-predicate-object triples [46], sourced from the blockchain and social media stands out as a critical next step. By fusing multiple records representing the same real-world entity into a single and consistent representa- tion [47], knowledge fusion would allow for a more accurate representation of real-world entitys in the KG. Moreover, our current software prototype is limited to blockchains utilizing the account-based accounting model, such as Ethereum. Recognizing the diversity in blockchain architectures and their unique features, we aim to allow for the integration of blockchains using a different accounting system (e. g., Bitcoin). This expansion is essential for broadening the applicability and utility of Kosmosis across different blockchain platforms. VIII. C ONCLUSION In this paper, we demonstrated how to build a knowledge graph from blockchain and social media data using the Kosmosis approach to incremental knowledge graph construc- tion. Kosmosis becomes the basis for semantic querying and reasoning over a graph of entities and the relationships among them, facilitating analyses for cybercrime and fraud prevention, with the current focus on rug pulls as a major fraud scheme. The Kosmosis pipeline supports the ingestion of unstructured, semi-structured, and structured data, as well as the ingestion of new data at different time intervals. Continuously in a stream-like fashion, incrementally, periodically, or event-based. During construction, the semantics of blockchain transactions are extracted to address “why” and “how” crypto assets were transferred. A threat actor known as Homer_eth executed five NFTproject heists within two months, accumulating over $2.8 million in profits. We outlined our user story, in which Kosmosis provides a knowledge graph that improves the detection of such fraudulent schemes carried out through sophisticated patterns that might otherwise go unnoticed. APPENDIX The pseudocode in Algorithm 1 outlines our systematic approach to extract the ABIfrom a smart contract based on its byte code. This algorithm is important for the Address Relation Extraction module to be able to decode incoming transactions, even when no publicly accessible ABIfor the contract that is interacted with can be found. Figure 5 shows a growing trend in both the frequency and the financial impact of crypto rug pulls and scams using data from [41]. REFERENCES [1] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system . 2008. URL: https://bitcoin.org/bitcoin.pdf. [2] Sajjad Alizadeh, Amin Setayesh, Arash Mohamadpour, and Behnam Bahrak. “A network analysis of the non-fungible token (NFT) market: structural characteristics, evolution, and interactions”. In: Applied Network Science 8.1 (2023), p. 38. [3] Chainalysis. The 2023 Crypto Crime Report . Chainalysis. Feb. 2023. URL: https://go.chainalysis.com/2023- crypto- crime- report.html. [4] Trishie Sharma, Rachit Agarwal, and Sandeep Kumar Shukla. “Understanding Rug Pulls: An In-Depth Behavioral Analysis of Fraudulent NFT Creators”. In: ACM Trans. Web 18.1 (Oct. 2023). ISSN : 1559-1131. DOI: 10.1145/3623376. URL: https: //doi.org/10.1145/3623376. [5] Arijit Khan. “Graph analysis of the ethereum blockchain data: A survey of datasets, methods, and future work”. In: 2022 IEEE International Conference on Blockchain (Blockchain) . IEEE. Espoo, Finland: IEEE, 2022, pp. 250–257. [6] Ferenc Béres, István A. Seres, András A. Benczúr, and Mikerah Quintyne-Collins. “Blockchain is Watching You: Profiling and Deanonymizing Ethereum Users”. In: 2021 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPS) . Online: IEEE, 2021, pp. 69–78. DOI: 10 . 1109 / DAPPS52256.2021.00013.[7] Huawei Huang, Wei Kong, Sicong Zhou, Zibin Zheng, and Song Guo. “A survey of state-of-the-art on blockchains: Theories, modelings, and tools”. In: ACM Computing Surveys (CSUR) 54.2 (2021), pp. 1–42. [8] Aidan Hogan, Eva Blomqvist, Michael Cochez, Claudio Gutierrez, José Emilio Labra Gayo, Sabrina Kirrane, Sebastian Neumaier, Axel Polleres, Roberto Navigli, Axel-Cyrille Ngonga Ngomo, Sabbir M. Rashid, Anisa Rula, Lukas Schmelzeisen, Juan Sequeda, Steffen Staab, and Antoine Zimmermann. “Knowledge Graphs”. In: ACM Computing Surveys 54.4 (May 31, 2022), pp. 1–37. ISSN : 0360-0300, 1557-7341. DOI: 10 . 1145 / 3447772. arXiv: 2003 . 02320 [cs.AI] .URL: http : //arxiv.org/abs/2003.02320 (visited on 12/11/2023). [9] Anastasia Chernysheva, Jakob Götz, Ardian Imeraj, Patrice Korinth, Philipp Stangl, and Christoph P. Neumann. SGDb Semantic Video Game Database: Svelte- und Ontotext -basierte Webanwendung mit einer Graphen -Suche für Videospiele . Tech. rep. CL-2023-02. Ostbayerische Technische Hochschule Amberg -Weiden, CyberLytics -Lab an der Fakultät Elektrotech- nik, Medien und Informatik, Mar. 2023. DOI: 10.13140/RG.2. 2.11272.60160. [10] Johannes Halbritter, Helge Kohl, Lukas Kreussel, Stephan Prettner, Andreas Ziegler, and Christoph P. Neumann. Graphvio: Eine Graphdatenbank -Webanwendung für integrierte Daten- sätze von Streaminganbietern . Tech. rep. CL-2022-01. Ostbay- erische Technische Hochschule Amberg -Weiden, CyberLytics - Lab an der Fakultät Elektrotechnik, Medien und Informatik, Mar. 2022. DOI: 10.13140/RG.2.2.12111.46244. [11] Christoph P. Neumann, Thomas Fischer, and Richard Lenz. “OXDBS – Extension of a native XML Database System with Validation by Consistency Checking of OWL -DL Ontologies”. In:Proc of the 14th International Database Engineering & Applications Symposium (IDEAS’10) . Montreal, QC, CA, Aug. 2010, pp. 143–148. DOI: 10.1145/1866480.1866502. [12] Xiaoqian Zhu, Xiang Ao, Zidi Qin, Yanpeng Chang, Yang Liu, Qing He, and Jianping Li. “Intelligent financial fraud detection practices in post-pandemic era”. In: The Innovation 2.4 (2021). [13] Christina Feilmayr and Wolfram Wöß. “An analysis of ontolo- gies and their success factors for application to business”. In: Data & Knowledge Engineering 101 (2016), pp. 1–23. [14] Marvin Hofer, Daniel Obraczka, Alieh Saeedi, Hanna Köpcke, and Erhard Rahm. Construction of Knowledge Graphs: State and Challenges . 2023. eprint: 2302.11509 (cs.AI). [15] Amir Pakmehr, Andreas Aßmuth, Christoph P. Neumann, and Gerald Pirkl. “Security Challenges for Cloud or Fog Computing- Based AI Applications”. In: Proc of the 14th International Conference on Cloud Computing, GRIDs, and Virtualization (Cloud Computing 2023) . Nice, France, June 2023, pp. 21–29. DOI: 10.48550/ARXIV .2310.19459. [16] Tobias Bauer, Fabian Beer, Daniel Holl, Ardian Imeraj, Konrad Schweiger, Philipp Stangl, Wolfgang Weigl, and Christoph P. Neumann. Reddiment: Eine SvelteKit- und ElasticSearch - basierte Reddit Sentiment -Analyse . Tech. rep. CL-2022-06. Ostbayerische Technische Hochschule Amberg -Weiden, Cy- berLytics -Lab an der Fakultät Elektrotechnik, Medien und Informatik, July 2022. DOI: 10.13140/RG.2.2.32244.12161. [17] Bastian Hahn, Martin Kleber, Andreas Klier, Lukas Kreussel, Felix Paris, Andreas Ziegler, and Christoph P. Neumann. Twitter-Dash: React- und .NET -basierte Trend- und Sentiment - Analysen . Tech. rep. CL-2022-07. Ostbayerische Technische Hochschule Amberg -Weiden, CyberLytics -Lab an der Fakultät Elektrotechnik, Medien und Informatik, July 2022. DOI: 10. 13140/RG.2.2.15466.90564. [18] Gavin Wood. Ethereum: A Secure Decentralised Generalised Transaction Ledger . (Ethereum project yellow paper). Parity Technologies. 2024. URL: https : / / ethereum . github . io / yellowpaper/paper.pdf. [19] Shangping Wang, Dongyi Li, Yaling Zhang, and Juanjuan Chen. “Smart contract-based product traceability system in the supply chain scenario”. In: IEEE Access 7 (2019), pp. 115122–115133. [20] Philipp Stangl and Christoph P. Neumann. “FoodFresh: Multi- Chain Design for an Inter-Institutional Food Supply Chain Network”. In: Proc of the 14th International Conference on Cloud Computing, GRIDs, and Virtualization (Cloud Comput- ing 2023) . Nice, France, June 2023, pp. 41–46. DOI: 10.48550/ ARXIV .2310.19461. [21] Philipp Stangl. “Design and Implementation of a Heterogeneous Blockchain Consortium for a Food Supply Chain Network”. Bachelor’s Thesis. Ostbayerische Technische Hochschule Am- berg-Weiden, Jan. 2022. URL: https://www.cyberlytics.eu/ theses/all/OTH-AW/BT_2022_Stangl_Philipp_Thesis/BT_ 2022_Stangl_Philipp_Thesis.pdf. [22] Zibin Zheng, Shaoan Xie, Hongning Dai, Xiangping Chen, and Huaimin Wang. “An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends”. In: 2017 IEEE International Congress on Big Data (BigData Congress) . Boston, MA, USA: IEEE, 2017, pp. 557–564. DOI: 10.1109/ BigDataCongress.2017.85. [23] Oana Marin, Tudor Cioara, Liana Toderean, Dan Mitrea, and Ionut Anghel. “Review of Blockchain Tokens Creation and Valuation”. In: Future Internet 15.12 (Nov. 27, 2023), p. 382. ISSN : 1999-5903. DOI: 10.3390/fi15120382. URL: https://www. mdpi.com/1999-5903/15/12/382 (visited on 12/17/2023). [24] Fabian V ogelsteller and Vitalik Buterin. ERC-20: Token Stan- dard. Ethereum. Nov. 19, 2015. URL: https://eips.ethereum.org/ EIPS/eip-20. [25] William Entriken, Dieter Shirley, Jacob Evans, and Nastassia Sachs. ERC-721: Non-Fungible Token Standard . Ethereum. Jan. 24, 2018. URL: https://eips.ethereum.org/EIPS/eip-721. [26] Eiki Takeuchi. Explaining Ethereum Contract ABI & EVM Bytecode . Medium. July 16, 2019. URL: https://medium.com/ @eiki1212/explaining-ethereum-contract-abi-evm-bytecode- 6afa6e917c3b. [27] Manuel MT Chakravarty, James Chapman, Kenneth MacKenzie, Orestis Melkonian, Michael Peyton Jones, and Philip Wadler. “The extended UTXO model”. In: Financial Cryptography and Data Security: FC 2020 International Workshops, AsiaUSEC, CoDeFi, VOTING, and WTSC, Kota Kinabalu, Malaysia, February 14, 2020, Revised Selected Papers 24 . Springer. 2020, pp. 525–539. [28] Charles Hoskinson. Why we are building Cardano . IOHK. 2017. URL: https://api-new.whitepaper.io/documents/pdf?id= HkUIhFWhL. [29] Yuanhang Zhou, Jingxuan Sun, Fuchen Ma, Yuanliang Chen, Zhen Yan, and Yu Jiang. “Stop Pulling my Rug: Exposing Rug Pull Risks in Crypto Token to Investors”. In: (2024). [30] Youssef Elmougy and Ling Liu. “Demystifying Fraudulent Transactions and Illicit Nodes in the Bitcoin Network for Financial Forensics”. In: Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining . KDD ’23. Long Beach, CA, USA: Association for Computing Machinery, 2023, pp. 3979–3990. DOI: 10 . 1145 / 3580305 . 3599803. URL: https://doi.org/10.1145/3580305.3599803. [31] Liang Chen, Jiaying Peng, Yang Liu, Jintang Li, Fenfang Xie, and Zibin Zheng. “Phishing Scams Detection in Ethereum Transaction Network”. In: ACM Trans. Internet Technol. 21.1 (Dec. 2020). ISSN : 1533-5399. DOI: 10.1145/3398071. URL: https://doi.org/10.1145/3398071. [32] Jing Li, Aixin Sun, Jianglei Han, and Chenliang Li. “A survey on deep learning for named entity recognition”. In: IEEE Transactions on Knowledge and Data Engineering 34.1 (2020), pp. 50–70. [33] Johannes Pfeffer. EthOn: Ethereum Ontology . ConsenSys Software Inc. Dec. 7, 2023. URL: https://ethon.consensys.io/.[34] Etherscan. Etherscan: The Ethereum Blockchain Explorer . Etherscan LLC. Dec. 7, 2023. URL: https://etherscan.io/. [35] Sourcify. Sourcify: Source-verified smart contracts for trans- parency and better UX in web3 . 2023. URL: https://sourcify. dev/. [36] Felipe Aandres Manzano and Jay Little. Pyevmasm: Ethereum Virtual Machine disassembler and assembler . Crytic. 2024. URL: https://github.com/crytic/pyevmasm. [37] Friedhelm Victor. “Address Clustering Heuristics for Ethereum”. In:Financial Cryptography and Data Security . Ed. by Joseph Bonneau and Nadia Heninger. V ol. 12059. Cham: Springer International Publishing, 2020, pp. 617–633. ISBN : 978-3-030- 51279-8. DOI: 10.1007/978-3-030-51280-4_33. URL: http: //link.springer.com/10.1007/978-3-030-51280-4_33 (visited on 12/03/2023). [38] X Corp. Filtered Stream Introduction . X Corp. 2024. URL: https: //developer.twitter.com/en/docs/twitter- api/tweets/filtered- stream/introduction. [39] Golden Recursion Inc. Golden Enrichment API: Enrich re- search, sales, and marketing with fresh, canonical knowledge. Golden Recursion Inc. 2024. URL: https://golden.com/product/ api. [40] Bruno Mazorra, Victor Adan, and Vanesa Daza. Do not rug on me: Zero-dimensional Scam Detection . 2022. eprint: 2201. 07220 (cs.CR). [41] Rebecca Moody. Worldwide crypto & NFT rug pulls and scams tracker . Comparitech. Nov. 2023. URL: https://www. comparitech.com/crypto/cryptocurrency-scams/. [42] Christoph P. Neumann and Richard Lenz. “The alpha -Flow Use - Case of Breast Cancer Treatment – Modeling Inter -Institutional Healthcare Workflows by Active Documents”. In: Proc of the 19th Int’l Workshops on Enabling Technologies: Infrastructures for Collaborative Enterprises (WETICE 2010) . Larissa, GR, June 2010, pp. 12–22. DOI: 10.1109/WETICE.2010.8. [43] Christoph P. Neumann. “Distributed Document -Oriented Pro- cess Management in Healthcare”. PhD thesis. Erlangen: Friedrich -Alexander -Universität Erlangen -Nürnberg, Nov. 2012. DOI: 10 . 13140 / RG . 2 . 2 . 14719 . 79521. URL: https : / / nbn - resolving.org/urn:nbn:de:bvb:29-opus-39070. [44] ZachXBT [@zachxbt]. Homer.eth (formerly @homer_eth) Rug Pull Analysis . X. X Corp. May 26, 2022. URL: https://x.com/ zachxbt/status/1529973318563946496. [45] MetaMask. MetaMask: A crypto wallet & gateway to block- chain apps . ConsenSys Software Inc. 2023. URL: https : / / metamask.io/. [46] Xin Luna Dong, Evgeniy Gabrilovich, Geremy Heitz, Wilko Horn, Kevin Murphy, Shaohua Sun, and Wei Zhang. “From data fusion to knowledge fusion”. In: Proc. VLDB Endow. 7.10 (June 2014), pp. 881–892. ISSN : 2150-8097. DOI: 10.14778/2732951. 2732962. URL: https://doi.org/10.14778/2732951.2732962. [47] Jens Bleiholder and Felix Naumann. “Data Fusion”. In: ACM Computing Surveys 41.1 (Jan. 15, 2009), pp. 1–41. ISSN : 0360- 0300, 1557-7341. DOI: 10.1145/1456650.1456651. URL: https: //dl.acm.org/doi/10.1145/1456650.1456651. Algorithm 1 Extract ABIfrom Bytecode Input: the bytecode of a smart contract on the Ethereum blockchain. Output: the reconstructed ABI. 1:procedure ABIFROM BYTECODE (bytecode) 2: program←DISASM (bytecode ) 3: abi←empty array 4: stateChangingOpcodes ←[SSTORE ,CREATE ,CREATE2 ] 5: stateReadingOpcodes ←[SLOAD ] 6: foreach(selector ,offset)inprogram.selectors do 7: ifoffset not in program.destinations then 8: continue 9: end if 10: fn←program.destinations [offset] 11: tags←FUNCTION TAGS(fn,program.destinations ) 12: abiFunction←new AbiFunction with payable =¬program.notPayable [offset] 13: mutability←”nonpayable ” 14: ifabiFunction.payable then 15: mutability←”payable ” 16: else 17: hasStateChangingOps ←false 18: hasStateReadingOps ←false 19: foropcode instateChangingOpcodes do 20: ifopcode intags then 21: hasStateChangingOps ←true 22: break 23: end if 24: end for 25: ifnothasStateChangingOps then 26: foropcode instateReadingOpcodes do 27: ifopcode intags then 28: hasStateReadingOps ←true 29: break 30: end if 31: end for 32: ifhasStateReadingOps then 33: mutability←”view” 34: else 35: mutability←”pure” 36: end if 37: end if 38: end if 39: abiFunction.stateMutability ←mutability 40: iftags hasRETURN ormutability = ”view”then 41: add output to abiFunction.outputs 42: end if 43: iftags hasCALLDATA [LOAD/SIZE/COPY ]then 44: add input to abiFunction.inputs 45: end if 46: addabiFunction toabi 47: end for 48: return abi 49:end procedure Jan 2017 Jul 2017 Sep 2017 Oct 2017 Nov 2017 Dec 2017 Jan 2018 Feb 2018 Mar 2018 Apr 2018 May 2018 Jun 2018 Aug 2018 Oct 2018 Nov 2018 Dec 2018 Jan 2019 Feb 2019 Apr 2019 May 2019 Jun 2019 Jul 2019 Oct 2019 Dec 2019 Mar 2020 Apr 2020 Jun 2020 Jul 2020 Aug 2020 Sep 2020 Oct 2020 Nov 2020 Dec 2020 Jan 2021 Mar 2021 Apr 2021 May 2021 Jun 2021 Jul 2021 Aug 2021 Sep 2021 Oct 2021 Nov 2021 Dec 2021 Jan 2022 Feb 2022 Mar 2022 Apr 2022 May 2022 Jun 2022 Jul 2022 Aug 2022 Sep 2022 Oct 2022 Nov 2022 Dec 2022 Jan 2023 Feb 2023 Mar 2023 Apr 2023 May 2023 Jun 2023 Jul 2023 Aug 2023 Sep 2023 Oct 2023 Nov 2023 Dec 2023 Month-Year-Abbr01020304050CountRug Pull ScamNumber of Rug Pulls & Scams by Month and Year 2017 2018 2019 2020 2021 2022 2023 Year0123456Amount Stolen (USD)1e9 Amount Stolen at Time of Rug Pull by Year (USD) 2017 2018 2019 2020 2021 2022 2023 Year050100150200250Count Number of Rug Pulls by Year Figure 5: Token and NFTrug pulls and scams since 2017. (a) depicts the number of rug pull and scams by month and year since 2017, highlighting a far great number of rug pulls compared to scam, (b) shows the amount stolen at time of rug pull with a peak in 2021, and (c) shows the number of rug pulls per year with a sharp rise in 2021. Adapted from [41].
{ "id": "2405.19762" }
2109.01047
Crypto Currency Regulation and Law Enforcement Perspectives
This paper provides an overview of how crypto currency and blockchain engineering interacts with the law enforcement. We point out that a large proportion of crypto users are amateur investors and the dominant and the largest segment in crypto crime are simply investment scams (!). We look at various questions of criminal use and misuse of technology, especially in the areas of money laundering or cashing out the profits originating from illicit activities. The aim of the paper is to raise a set of concerns arising in the criminal justice and policing circles, based on the interviews with law enforcement practitioners, and to see how cryptos could be reconciled with public security and safety. We propose a simplified classification of crimes related to crypto currency. We study the development of blockchains in a broader context of applied cryptography and payment technology. Ransomware is a big threat but we also need protection against corporate misconduct or negligence, with untested financial services breaching customer trust or government regulations. Not paying taxes is illegal, but there is more at stake: exposing crypto holders to losing all their savings in scams or thefts. Interestingly, privacy helps to defend on multiple fronts: against social engineering, targeted crime, scams, and also against cybersecurity thefts and hacks.
http://arxiv.org/pdf/2109.01047v1
Nicolas T. Courtois, Kacper T. Gradon, Klaus Schmeh
cs.CR, cs.CY, cs.DC, K.4; K.5; C.3
cs.CR
arXiv:2109.01047v1 [cs.CR] 1 Sep 2021Crypto Currency Regulation and Law Enforcement Perspectives Nicolas T. Courtois1, Kacper T. Grado´ n2,3, and Klaus Schmeh4 1Department of Computer Science, University College London , UK 2Faculty of Law and Administration, University of Warsaw, Po land 3Department of Security and Crime Science, University Colle ge London, UK 4Cipherbrain.net, Gelsenkirchen, Germany Abstract. This paper provides an overview of how crypto currency and blockchain engineering interacts with the law enforcement . We point out that a large proportion of crypto users are amateur investor s and the dominant and the largest segment in crypto crime are simply i nvestment scams (!). We look at various questions of criminal use and mi suse of technology, especially in theareas ofmoneylaunderingor c ashing outthe profits originating from illicit activities. The aim of the p aper is to raise a set of concerns arising in the criminal justice and policing circles, based on the interviews with law enforcement practitioners, and t o see how cryptos could be reconciled with public security and safety . We propose a simplifiedclassification ofcrimesrelatedtocryptocurren cy.Westudythe development of blockchains in a broader context of applied c ryptography and payment technology. Ransomware is a big threat but we als o need protection against corporate misconduct or negligence, wi th untested financial services breaching customer trust or government r egulations. Not paying taxes is illegal, but there is more at stake: expos ing crypto holders tolosing all their savings in scams or thefts. Inter estingly, privacy helps to defend on multiple fronts: against social engineer ing, targeted crime, scams, and also against cybersecurity thefts and hac ks. Keywords: Blockchain,Cryptocurrencies,AppliedCryptography,Sma rt Cards, Payment, Blockchain Forensics, Crime Science, Nati onal Secu- rity, Law Enforcement, Criminal Justice, Investment Scams , Organized Crime, Crypto Currency Thefts, Crypto Mining, Money Launde ring, Ransomware. 1 Introduction Blockchain and associated payment methods are the emerging technolo- gies, which have 220 million of users [24]. In our view, the cu rrent crypto landscape and ecosystem must be considered to be more than ju st an evolution of an electronic payment system invented by a cert ain Satoshi Nakamoto [56]. It has then in fact “diversified” from the init ial intended function of transferring coins between peers. Cryptoandbl ockchain tech- nology is now becoming a major disruptor of how our economy an d our society functions. The challenge goes far beyond small nich e sectors such as trans-border foreign currency activity. It is now enteri ng substantially larger parts of the economy: like competing with banks and po tentially also stock markets, on attracting investor deposits and inv estment activ- ity fees. It is a powerful programmable toolset capable of do ing so many things in finance and beyond [34]. Many of these are new and ent irely impossible to do without cryptography and some form of decen tralized or “trustless” consensus. New ideas and new forms of distrib uted coop- erative social and economic order are proposed. This paper is organized as follows. In Section 2, we introduc e the main directions and we show that there exists more than one point o f view about the role of privacy. In Section 3, we elaborate on the ce ntral role played by crypto exchanges and discuss related risks. In Sec tion 4, we discuss themajor emerging risksatthecenterstage ofcrypt ocurrency.In Section 5, we look at the concerns emanating from the law enfo rcement sector. InSection6,weinvestigate thedangersofopensour ceandexplain how much engineers are responsible for the crime and theft la ndscape, which is also simply part of the DNA of our systems. In Section 7, we explain how cryptographers have been trying to improve the p rivacy of the original bitcoin in the last 10 years. In Section 8, we add ress certain misconceptions, which exaggerate the purpose andthe typeo f anonymity we obtain with privacy-enhanced crypto currencies. In Sect ion 9, we look at how law enforcement and regulators can cope with new emerg ing challenges. In Section 10, we look at three main types of crim e by volume of activity: thefts, scams and ransomware. In Section 11, we look at the idea of a criminal battlefields. In Section 12, we look at how t he emerging crypto economy can be better protected rather than banned. I n Section 13, we study how investors and asset holders may need legal pr otection and crime policing. Then comes our conclusion section with s ome public policy recommendations. 2 Main Directions and Historical Development of Crypto Currency 2.1 Legal and Technical Qualifications of Crypto Currency There existvariouslegal, regulatoryandtechnicalqualifi cations ofcrypto currency systems. These qualifications are not exclusive. W hile courts of law or the United States CFTC recognized bitcoin as a “curren cy”, the SEC has fined many companies for improperly issuing a “securi ty”, the police have been chasing bitcoins related to major crimes an d recognizes that crypto currency poses unique challenges around increa sed privacy. Then, national tax authorities e.g. IRS decided to consider bitcoin as “property”, imposing truly excessive transaction reporti ng obligations and discouraging mainstream adoption. This list is not exhaustive. For example, almost no one is cal ling bit- coin a lottery, even though the current proof of work (POW) me chanism creates a winner every 10 minutes, see [51], and the winner is system- atically awarded a substantial amount of 6.25 freshly creat ed bitcoins. Moreover we could also claim that bitcoin is a voting protoco l. In fact it is a self-governing financial cooperative: the entities mak ing the winning blocks are able to co-decide which transactions are accepte d and also which version of the protocol and software is dominant. This aspect of self-governance is substantially more developed in Ethere um and other blockchain systems where the smart contract functionality seems to be the main one. Most crypto currency systems are essentially a lso tools of ”disintermediation”: they provide secure methods of hol ding and con- trolling property and financial assets in ”direct” ways, wit hout trusted intermediaries, banks, notaries etc. This is achieved with help of crypto- graphic keys stored on secure devices controlled by users. L ikewise, they provide ways of controlling assets in completely new or dece ntralized ways. Blockcahin and crypto currency systems are an ongoing challenge to our ideas. They force us to revisit our ideas about questio ns such as how the focus of crime policing should change with new techno logy. We probably need to think twice about what is socially desirabl e to do in a market economy, or how financial services regulation in the 2 1st century should look like. 2.2 Waves of Disruption The story begins with users who needed bitcoins for their par a-banking ability: to store and transfer money. An anarchic system ini tially, oper- ating without too much consideration for national boundari es and regu- lations. Such users will be, for example, families who send t heir children to study abroad or small businesses which operate across bor ders. All this is however far from being the primary function of bitcoi n as of 2021. Bitcoin has yet failed so far to become a champion of small pay ments or to be adopted in the Internet retail commerce. In 2020-21 we fi nally have the lightning network, a major enhancement in this directio n. Yet elec- tronic commerce has not changed yet, it is working primarily with Visa and Mastercard, as it did for decades. Nevertheless a very su bstantial disruption is here. We see it in particular in the world of inv estment. If the first somewhat primary function of bitcoin is trans-bo rder money transfer, thesecondwouldbethestoreofvalue.Bitcoin has for morethan a decade managed to establish itself as a reliable store of va lue with a peculiar ultra deflationary monetary policy [23,51]. Since late 2014, there have been very substantial press blogosphere and mass-medi a coverage related to the crypto currencies and how they disrupt the wor ld of banks and businesses. For example, in 2019, twenty years after the creation of the Eurosingle currency,Google search showed more searche rs aboutbit- coin than about Euro. This is happening, even though we buy ou r food in Euro 100 % of the time, and 0 % of our house loans are denomina ted in bitcoins. As of 2021, bitcoin is and remains a curiosity fr om the main- stream economy point of view. Half-way between offshore para -banking, it is also a super-famous club of cyber-punk innovators and d isruptors. More recently we hear about institutional adoption and the a bility of bitcoin to go up faster than inflation, while governments are creating excessive quantities of fresh money in order to alleviate th e pandemic- driven recession. Investors have eventually diversified th eir portfolios and bitcoin became a mainstream financial asset in the recent yea rs and hun- dreds of millions of people own bitcoins, cf. [24]. It is totally incorrect to believe that crypto is just an inve stment bubble. It is way more. If it is a “bubble”, it involves an incredibly l arge amount of coder, developer, R&D and cryptographic engineering act ivity, open source software. We have a plethora of hardware and business infrastruc- ture projects developed by expert firms. Bitcoin adoption ha s increased by 880 % in 2021, according to Chainalysis [58]. It also invol ves a very substantial amount of academic research activity, which is not less sig- nificant than some of to the very major intellectual endeavou rs of the human civilisation, such as sending a man into space, or tack ling the Covid pandemics. It is also a “bubble” which leads to shortag e of cer- tain types of GPU computing hardware, as much as bitcoins are in short supply also. Hackers, cryptographers and coders have creat ed a monu- mental new technology development movement, which is self- funded. It is somewhat funded precisely, by inflated investment expect ations... and the unreasonable crazy ride which it offers to investors. Cry pto economy is poorly integrated with mainstream economy, yet it has cre ated a huge economic and startup company activity, which is unpreceden ted. Bitcoin is a brand, a cultural movement, and it is religious a t times. Bit- coin maximalists believe that bitcoin prevails no matter wh at. Bitcoin is an epic story, at thecrossroads of “geek mythology”and libe rtarian anar- chist cyberpunk ideas. Blockchains are distributed electr onic ledgers run with peer-to-peer cooperative consensus. They allow keepi ng money out- side of the presumably “evil” establishment and banks. As a r esult, law enforcement is not facilitated. It is more difficult, for exam ple, to seize assets or to undo a transfer. Beneficiaries can be anonymous, transac- tion flows can be obfuscated, and income can be possibly conce aled for taxation purposes. 2.3 Privacy - A Two Sided Coin There is a substantial amount of ambiguity about whether pri vacy is socially desirable, and to what extent privacy enhancing me thods and techniques are legal or ethical. Privacy, is a tool of choice which can be used to obscure your financial history for wrong reasons or an illegiti- mate purpose. However there are also many strong arguments i n favor of privacy. Privacy is a basic and constitutional human right. People ha ve a legiti- mate desire to escape the prying eyes and mass surveillance. The Article 8 of the European Convention on Human Rights (ECHR) establis hes the Right to Privacy. Initially this seems to have a limited scop e, with focus on family life and protection of private correspondence and relationships with other human beings. However, many courts and lawyers gi ve it a much broader interpretation, like to be free from “unlawful ” indiscrim- inate searches done at a large scale. A recent ruling of the Eu ropean Court of Justice CJEU of 6 August 2020 makes mass surveillanc e pro- grams run by the UK, French and Belgian governments simply il legal, cf. [47]. There are “public benefits” from increased anonymity, for ex ample we have reasonable expectations not to reveal to your spouse, y our employer or neighbor which political or social cause we support financ ially [41], for example with political donations in bitcoins. Lack of priva cy in financial transactions greatly exposes individuals to be easy targets for numerous serious crimes such as “identity theft, mugging, kidnappin g and black- mailing” [41]. For example, we consider investment scams wh ich account for some 54 % of bitcoin criminal activity. Here we observe th at pri- vacy and law enforcement are also at stake. The more all sorts of data items pertaining activity are exposed, collected, stored, used, re-used, compromised, shared or sold, the more criminals can operate sophisti- cated targeted scams. Or they will simply succeed in hacking into our accounts. A nice example of how the law can positively impact cyberse- curity is Texas law HB 3222 from 2009 which forces businesses to comply with payemnt card industry security standards which in part icular forbid storing certain items such as 3 digits printed at the back of c redit card, cf. PCI DSS section, cf. slide 99 in [21]. We see that orderly a nd legal business activity also requires privacy. Data collection a nd storage needs some form of regulation. Bruce Schneier has as early as 2005 a dvocated that we need to “reduce” and “limit” data collection and “how it can be used”, see slide 92 in [21]. In general large-scale indiscri minate bulk data collection, or retention, or negligence when information i s leaked out, is against the law in most jurisdictions. Large companies have been fined hundreds of millions of dollars or euros, for failing to secu re personal information under the new GDPR regulations in the EU, or olde r laws such as the U.S. GLBA regulations [41]. 2.4 Privacy vs. Law Enforcement - A Balancing Act Privacy is not only a political and legal question. It is also a technical question where we can try to achieve a certain equilibrium. P rivacy can help to evade taxes or circumventbusiness or financial secto r regulations. However, poor privacy of financial transactions is precisel y a key factor which makes it easier for hackers and thieves to operate. If w e have too much privacy, criminal activity is facilitated. Then also i f we have too little privacy, crime is also facilitated. In order to achie ve a reasonable balance between privacy and law enforcement we need toconsi der several key questions. Even though blockchains, in theory, are self-policing for c ertain questions such as theft of funds in transit, they are not very good on pro tecting customer privacy. Initially, the whole idea of “public” led gers is corrosive for our privacy: they expose our financial and personal data. Then we add privacy to these systems, for example with some cryptogr aphic tech- niques, or simply through mixing and obfuscation. At the end privacy becomes potentially too strong or so it seems, cf. Section 8, and criminal activity is potentially facilitated. A question is not quit e to see who wins: the policemen of the thieves. It is a classical problem in tec hnology and in law enforcement. Both sides follow a certain curve: secur ity and safety improves, and criminals and thieves also evolve. The questi on is really about achieving a better more detailed understanding of how technology actually impacts our lives. We need to put things in proportion. Expert studies show that the crimi- nal segment is small in bitcoin, or small in relative terms; i t is about 0.17 % on average and yet smaller in many jurisdictions, for examp le it is only 0.06 % in Germany, cf. [18]. Very similar statistic were obse rved in credit card payments in the last two decades: the fraud is 0.15 % typi cally and significantly smaller in well-policed jurisdictions [21]. Yet nobody says that credit cards are best friends of criminals. In both case s, we see that the legit payment activity is substantially larger. To summ arize, criminal activity is small in bitcoin and elsewhere, and 99.9 % of cryp to currency activity is legitimate trading or commercial activity. Thi s part arguably should get more attention than the relatively small illicit activity. 2.5 Investment: Major Not Minor A major angle to consider is gambling and investment questio ns, which are very hard to tell apart. On the one hand, we have a legitima te desire of the public to support and invest in crypto currency startu ps, as such businesses which are not listed on the stock market. On the ot her hand, we have the gambling question. In the eyes of millions of smal l investors, crypto currency markets are an offshore-operating casino wi th less strin- gent regulations. Wehavethe popular“rich-kid”dream ofma kingmoney through the crazy appreciation of bitcoin and other crypto a ssets [25]. Here bitcoin competes with the stock market, Internet casin os, and ama- teur Forex trading to offer some thrills and hopes to millions of investors, frequently millennials. According to [48] as many as 11 % of Americans own bitcoins. Ev ery single day, 1 million bitcoin wallets are active. There are m ore than 25 million bitcoin traders worldwide and “speculating is the m ost popular use of bitcoin” cf. [48]. In addition, according to a detaile d industry report, the rate at which the number of users of crypto curren cy has been growing faster than exponentially. In just four months between March 2021 and July 2021, the global number of crypto currenc y users has doubled from 100 to 200 million approximately, cf. page 9 in [24]. 3 Main Business Players - Crypto Exchanges In theory, Satoshi have imagined a utopian peer-to-peer eco nomy where we exchangecoins against goods andservices. Inrealitywe a lreadyhavea way more sophisticated economy, with intangible assets and major extra features: debt and leverage, network effects, business comp etition, and non-linear behaviour. The central players where the old and new worlds meet are the crypto exchanges. 3.1 Geography of Crypto Exchanges It is not true that bitcoin operates outside of the scope of la w and order. In fact, as much as 20 % of all bitcoins sent to exchanges globa lly are sent to exchanges based inside the U.S. At the same time, 59 % o f the volume goes to the so-called ‘high-risk’ exchanges [17]. Th ese exchanges are notorious for being lax on KYC (Know Your Curstomer) and A ML (Anti-Money Laundering). At the same time, they are also sim ply small independent offshore companies where customers are at risk o f losing ev- erything. It is important to see that these companies themse lves can be scams, and they can just disappear tomorrow with funds belon ging to na¨ ıve crypto currency holders. Users do however use them on a massive scale. Following [17] about 24 % of volume from US-based exch anges goes to these ‘high-risk’ exchanges, while for Russian exch anges this per- centage goes up to 69 %. 3.2 On Neeed for Investor Privacy We have seen that for all sorts of reasons, which could includ e tax eva- sion, individuals use and trust riskier crypto exchanges wi th their coins. A major reason for that is that these companies ask less quest ions and it is easier to pass various verification levels required and to remain anonymous. We hypothesize that it is NOT in order to escape go vern- ment surveillance that crypto currency privacy is aiming at . Regardless of whether we like it or not, amateur trading is a big industry and in- vestors need to be protected. First of all against losing all they have in investment scams and magical get-rich-quick schemes. Some 16 billion dollars were lost in some 132 major crypto currency scams cf. [11] and [40]. In fact, there is a balancing act to make: tax evasion deprive s govern- ments from some revenue, but there are substantially larger losses at sight. Would these amateur investors lose all their savings , governments worldwide will be facing larger bills for healthcare, socia l housing etc., overextendedperiods oftime. Governmentsare theultimate risk takers for amateur investors, for example assuring minimal income for pension- ers robbedfrom their savings, which normally should allow t hemtoretire comfortably. Thus, very clearly, investor privacy can indi rectlyprotect the governments , against future liabilities at an astronomical scale. This is given our aging population and the immense popularit y of ama- teur investing. We need to defend small investors against pr ivate sector predatory surveillance. Activities meant to deprive inves tors of their fun- damental rights such as freedom to buy and sell with some priv acy and without being “gamed” or manipulated. We have the right to pa rticipate in a fair and open market economy. One which is not rigged by cu rrent omni-scient monopolistic big data and AI players, which ten d to abuse their dominant position. 3.3 On the Neeed to Police the Investment Platforms Crime andlawenforcement occurwhenpeopleavoidpayingtax es. Larger crimes occur when companies do help tax evaders and organise the tax evasionatalarge scale. InNovember2020theU.S.Departmen tofJustice pressed criminal charges for BitMex, an exchange based in th e Seychelles for ”serving U.S.-based customers” making it very clear tha t U.S. law will be applied in such cases [61]. Law enforcement also occu rs when SEC fines companies that raised money in an ICO, selling a token wh ich is considered to be a security. Several businesses have been in structed to return vast sums of money to investors by the policeman of the financial markets, the powerful SEC. Market manipulation is also criminal. Policing this crime c an arguably involve increasing citizen security against predatory ban ks. Banks have beenfinedhugesumsinbillions ofdollars inthelast decade. Oneresearch question is the one ofadversarial trading andfront-runnin gcf. [61]. A key problem is that blockchains has so far focused on how to solve consensus problem, which is mainly about blocks that are eventually ap proved and final. Now there is a larger space for adversarial traders: the question of incentives and selection of transactions accepted withi n one block [61]. Then we have the questions of adversarial AI: predicting the behavior of humans, in order to play games against users in the marketpla ce. This does not seem illegal per se, but in fact it will clearly be une thical and fraudulent, if you pay a bank or the exchange some fees or subs cription, in order to advise you about investment opportunities. 4 Major Risks and Threats at the Center It is estimated that hundreds millions of dollars per year ar e made by criminals in extortion of ransom payments, which have plagu ed countless businesses worldwide, small and large [42] and Section 10.2 . Yet the illicit activity amounts to just 0.1 % of crypto deposits typ ically, and this figure went down by 60 % in two years [18]. Millions of peop le go to crypto currency markets not in order to acquire illegal good s, but rather to simply acquire bitcoins, which for most users are perfect ly legal to own. Then we sell them at profit or at a loss. Individuals can al so mine bitcoins at home, see Section 6.2. 4.1 Is Bitcoin Itself a Financial Scam? For more than 10 years, bitcoin has been traded. The value if b itcoin did not go to zero. Bitcooin holds hundreds of billions of dol lars in funds belonging to hundreds of millions of users [24]. The public p erception of the evils and dangers of bitcoin has been distorted by the i dea, that certain incumbentsinthefinancial industry,andsome gover nmentsalike, would like to make something like bitcoin or blockchain ille gal. However. The interestsofsmall investorsandthemonopolistic estab lished industry incumbents are not the same. Here we present both points of vi ew. In some sense, bitcoin potentially IS an investment scam, or we need to consider that it could be one, for example as a precautionary safety mea- sure to protect investors. It is a fact that banks are losing t heir deposits, which go to a para-banking offshore space, with less regulati ons and no borders. This makes laws harder to enforce. The world of inve stment is extremely old-fashioned slow and rigid: for example it is ve ry hard to buy and sell stocks from Asia for an investor who lives in Euro pe. New blockchains, currently under development, promise to allo w anyone to trade any asset freely. We see that banks and stock exchanges are losing some of their sources of income and the competition is increa sing. This ongoing process of disrupting a multi trillion-dollar global financial industry increases the risks due to bad choice of a financial p artner or broker and due to the new technology itself such as hacking. I t creates countlessopportunitiesfor negligence, misconduct,care less or“frivolous” behavior cf. [22]where asmall individualinvestorwill find it verydifficult to know which companies and which technical standards they c an trust. Investors can lose everything when hackers steal private ke ys. Open- source software can be malicious [46,22] or just insecure. C urrent laws and regulations favor the incumbents, and maybe only very la rge com- panies can apply. The financial industry remains highly regu lated and is a subject of intense government oversight and scrutiny. Law enforcement must simply expand and regulate as much it can. We need to extend the safety net, allow smaller business to operate, and prote ct individual investors. Law enforcement needs to follow the investor mon ey, and con- tribute to defining how the crypto industry should be run as a w hole. We also need to forbid or allow and regulate more clearly. As already explained, the criminal or illicit segment is ver y small essen- tially 0.1 % [18]. The next level will be “Joe the Plumber” sta shing some cash for his retirement at an offshore cryptoexchange, which income pos- sibly he forgot to declare with IRS, which raises serious que stions [19]. Here the source of funds is not illegal itself. It is not illeg al either for Joe to avoid his bank, which pays very little dividend or/and cha rges him large commissions on his retirement investment. We live in a free market economy, and it is not a crime at all for anyone, to seek a place to deposit money, where they can generate a better income. When local ec onomy and or the established investment providers suffer some setb acks, in- vestors do and will go to exotic places. One day it was gold, or some tech companies, today bitcoin is a popular asset for 1 million ama teur traders each day [48] worried about inflation or maybe a Covid-induce d reces- sion. The question is now simply, that startups and offshore fi rms which do not have a banking license, and yet are offering financial se rvices to Joe. Potentially they are incompetent, cheating, or just to o easygoing optimistic startups relying on untested cryptography and s oftware, or neglecting public safety for the sake of new exciting functi onalities. The risks for small investors are simply enormous, andbanks are regulated for a reason. The main idea is that small or amateur investors des erve accu- rate information and some protection against fraud, misrep resentation, or more ordinary ”preventable technical incidents”. 5 Anarchy Meets Law Enforcement Our sources of information are academic research, the chaot ic world of Internet forums and collaborative platforms, the abundant press cover- age of crypto industry, and interviews with law enforcement profession- als. Throughout the duration (2014-2017) of the European Co mmission FP7 PRIME Project (Preventing, Interdicting and Mitigatin g Extrem- ist Events) we have interviewed 132 front-line investigato rs and law en- forcement officers with security merit from Australia, Austr ia, Canada, Germany, Georgia, Hungary, India, Italy, Japan, Mexico, Ne w Zealand, Poland, Portugal, Spain and United States, cf. [36]. We also asked our interlocutors for their opinion on the abuse of modern techn ologies by violent extremists. If this paper contains certain stateme nts which are a matter of opinion, this will not be necessarily ours: they c ome from interviews with law enforcement professionals. We found that the awareness of blockchain technology among o ur target audience (specialists with a wide array of law enforcement b ackgrounds: police, border guard, intelligence, counterintelligence , military, govern- ment and special services) is very low and vague. In 2017 only a small number (less than 10 %) of our interlocutors understood the s ignificance of blockchain and appreciated the potential for the crimina l abuse of technology. It needs to be stressed that these officers were ex perts in financial analysis and represented top-level law enforceme nt institutions in their respective countries. Those specialists indicate d that the finan- cial analysis techniques can and are used to retroactively study the cash flows and money transfers (including crypto currency su ch as bit- coin) in the cases of known lone-actor extremists, in order t o search for patterns that could be later applied to investigate radical ized individuals [30]. However this approach is potentially ineffective and i nefficient for the purpose of regulating ordinary crypto market activity. It does not prevent thefts and scams, and does not help customers to reco gnise re- liable providers and reliable investment opportunities. O n the contrary. Many people are lured by exotic places where maybe the taxman or their spouse are no longer watching, and take substantial risks fo r no reason other than, a quite naive expectation of better privacy. It i s naive, be- cause unregulated offshore service providers are in fact MOR E likely to sell data to criminals than reputable crypto companies. Arg uably we need more ”legit” providers of financial privacy. A UK govern ment re- port explains that Suspicious Activity Reports (SARs) do no t help a lot [65]. They are filed in ”huge numbers” and are typically just p ersonal living expenses. The safeguards which help to catch terrori sts or totackle organized crime, are potentially not that useful in regulat ing a broader para-banking activity. A broader population of legitimate participants in these markets lacks sufficient protection against poor secur ity standards or negligent service providers. 5.1 Risk Awareness, Blockchain Education, Trends and Geography When consumer protection and technology fail, or when regul ating or banning does not help, or when policing does not reduce crime and fraud, we need to work on public awareness and education. Fir st of all, we should not underestimate the educational benefits of cryp to currency markets. Instead of unemployed youngsters depressed by ant i-capitalist propaganda and gloom, we have a game of building a new world or der by geeks, coders and hackers. A dream, of becoming a banker, c reating money out of nothing, being a stakeholder participating in t he economy of the future in active ways. The term “cryptographer’s drea m” is some- times used [49]. A new form of cooperative decentralized and inclusive economy is possible. Middle class peopleworldwide learn ab out newtech- nology, maths and cryptography, consult various blogs and w ebsites, and develop a feeling of being autonomous players and exploring the world of alternative finance. Coders and designers are empowered t o build fi- nancial systems, which work the way theythink is ethical and socially desirable. Even though blockchains were invented more than 12 years ago [56], it is still – in 2021 – a new and emerging phenomenon and the knowl - edge about it is poor. This is clearly indicated by the patter ns in search queries indicated by Google Trends analytics. We have seen a 10-fold increase in searches about the word “blockchain” in 2017, th en it goes down 3-fold but never reaches the pre-2017 levels, and again a 3-fold increase occurs at the end of 2020. The curve has two sharp pea ks which correspond exactly to moments when bitcoin price has peaked at the end of 2017 and again at the end of 2020. The pattern is similar amo ng the law enforcement and intelligence/security communities. G oogle trends also show that peripheral or emerging countries do more sear ches than Western countries. The ability of bitcoin to offer alternati ve international money transfer services in various countries was just the st arting point. Blockchains have now become an important piece of the libera l global- ized English-speaking economy. Among 78 countries Ghana an d China are those, where most searches about blockchain originate f rom, with a scores of 100 and 92/100. Most EU countries and the United St ates are way more conservative: they arrive at positions 30-50 ou t of 78 with scores between 12/100 to 20/100. Another detailed research report found that Vietnam followed by India and Pakistan lead the crypto c urrency adoption in 2021, [58], when adjusted w.r.t. the purchasing power per capita. We discover that new tech such as blockchain cataliz es progres- sive pro-business and pro-education forces in emerging cou ntries. This is great news. 6 On Critical Technical Choices 6.1 Trusting the Cryptographers There is a level of disconnection between traditional crypt o research and development of industry standards (e.g. in telecom, smart c ards, and at NIST, or in EU-funded R&D projects) and the nascent crypto in dustry since 2009. Developers in bitcoin and other crypto currenci es have made many deliberate choices in their specifications which are pe culiar, risky or non-standard features. This contrasts a lot with the domi nant culture in crypto research, which have been for 50 years very cautiou s, assuming that the attackers are more powerful than they really are, an d engineer- ing in truly paranoid ways. Traditional cryptographers hav e been very cautious and always considered that when something is very s pecial it should be banned. For example AES is the most important standardized encrypti on algo- rithm today. For this reason alone it is also used by the bad gu ys, e.g. in ransomware [60]. When the AES was standardized in 2000, th ere was some controversy around the special choice of S-box used, wi th New Scientist title “Cipher Crisis” in 2003 [45]. Bitcoin and cr ypto currency developer communities have ignored many traditional rules of careful security engineering, and are in general very easy-going: s hip it first, tell users this payment system is experimental, and hope tha t hackers and thieves do not have sufficient expertise to steal coins and exploit numerous vulnerabilities in existence. Bitcoin does not us e AES, it uses SHA256,RIPEMD-160andECDSAwithsecp256k1. Thelast parti spar- ticularly controversial cf. [23]. In fact secp256k1 is not w hat other people in the industry use for securing Internet commerce with TLS ( secp256r1 is used 90 % of the time). The crypto currency community has de veloped its own set of incompatible crypto standards. Similar but not quite the same or not exactly the same, as found in more traditional sec urity in- dustry such as in smart cards or in TLS. Bitcoin does not obey g lobal de-facto crypto standards such as defined by the U.S. NIST, ra ther it de- fines its own standards used primarily in crypto currencies a nd virtually nowhere else. They differ from security protocols used by maj or com- panies which define the technical standards in major operati ng systems and Internet commerce (Microsoft, Apple, Google etc.). Manyadvancedcryptographicprotocols specifyfurthernew ellipticcurves with further very special properties. For example, Ethereu m, ZeroCash, Algorand and Chia network use a special curve called BLS12 381. Inter- net Computer (a.k.a. DFINITY) uses also more exotic pairing -friendly curves such as BN254N, BN SNARK1, BN382M, BN462, see [66]. In general the more advanced is the crypto market functionalit y or privacy enhancement functionality we find in blockchain technology , the more risky and untested is the cryptography used there, see [9] an d how re- searchers are “cavalier about proposing untested cryptosy stems”, see [39] and [57]. Innovation requires some “riskier than usual” sec urity assump- tions, and this is normal. However. New cryptography standards are made and broken eac h year. History knows numerous examples of faulty cryptography sta ndards, which has nevertheless dominated the market very heavily. F or example, the Data Encryption Standard (DES) was developed in the mid 1 970s and is still used in 2021. Hundreds of millions of people use D ES every day, when they use their Chip and Pin bank card, and also in tod ay’s contactless payments. This cryptographic algorithm is far from being perfect, see in particular page 6 in [7]. For example in the ke y scheduling in DES there ”is no interaction across the two halves”, plus c ountless other known problems with DES, cf. [62,50]. Yet DES has thriv ed for 50 years and remains massively used in financial systems. Mor e recently the cryptographic hash function SHA-256 is used to secure th e integrity of bitcoin transactions and to secure the chain of events in e ssentially all current blockchain systems. If this cryptographic hash function was faulty, it would be extremely difficult to upgrade. Current systems do not consider that cryptographic algorit hms could be- come obsolete overnight, and we would need to switch and use a different crypto algorithm. This question of the “strategic” choice o f the crypto hash function is also related to feasibility of specific type s of attacks and crimes, as we will see below. 6.2 How Specific Crypto Engineering Choices Influence Fraud and Crime An interesting example to learn from, is a story of an electri c scooter one of the authors purchased in 2020. Then he visited a large b ike store and found that no lock currently on the market had the dimensi ons and shape, which would allow one to attach this scooter reliably . The market does not provide a solution. As result the scooter was stolen 3 days after purchase. In addition, it did not have at all any unique seria l number which could be communicated to the police. How does it relate to crypto currency market? It is a question of market regulation : potentially certain models of electric scooters should be banned from th e EU or US markets, because they lack consumer protection or any pro tection against theft whatsoever. It is a problem of industry standa rds, holistic crime prevention and reconciling government and private se ctor industry regulation when new technology is sold in the marketplace. Going back to crypto currencies, there is no doubt that sever al technical features of bitcoin facilitate specific types of crime, cf. l ast point in Ben- efits section page 9 in [43]. Is it possible to claim that some features of bitcoin could be banned? Yes without any doubt, and the key pr oblem is that bitcoin failed so far to become decentralized, on the contrary, cf. p.17 in [43]. One can argue that bitcoin developers could hav e, in early days, mandated a different hash function in bitcoin. One, whi ch could be mined with GPUs which are readily accessible in every comput er store. Sticking with current NIST crypto standard, which however i s GPU- incompatible, namely SHA-256 for mining, has immense conse quences. In some sense bitcoin mining is not a mainstream system, beca use bit- coin developers decided not to go this way. When crypto miner s started making specialist ASIC bitcoin mining equipment, such devi ces were not sold in any of traditional trusted merchants of electronics . They were just sold by mail/Internet order by extremely few small comp anies in remote countries. As a result, there were multiple scams, an d compa- nies who failed to deliver these machines. Thus, bitcoin min ing has been monopolized by larger investors. They were the only ones abl e not to fall victim of dishonest providers (a repeated game). This i s NOT possi- ble for individuals, who just order one unit from a foreign ma nufacturer advertised on the Internet. All this is a consequence of a que stionable choice of a crypto hashing algorithm, which has led to a large degree of centralization of bitcoin mining. Criminals have sold non- existing bitcoin miners to na¨ ıve investors, and a key problem was that there w as no reli- able supply chain whatsoever for small individual buyers, c f. [51]. There are additional problems which also lead to centralization. The reward from one block is very high which leads to mining with pools, w hich are a centralizing force and which have heavily distorted the Sa toshi original dream of a peer to peer anarchic cooperative system. Then, th e incred- ibly large electricity consumption by bitcoin creates seri ous problems. One problem is that for many years critics claimed that bitco in is a de fact Chinese crypto currency: as it is controlled by a few lar ge Chinese miners1. Why this matters? It is easy tosee that miners can influence t he future of bitcoin, such as adoption of upgrades. They can als o potentially censor individual bitcoin transactions, or simply privile ge transactions originating from China. Looking beyond China, there is a group of countries which offic ially are recognized as supporters of terrorism. These countries are then logically subject to international sanctions which attempt to preven t them from selling their oil and gas. It follows logically that they may use bitcoin in order to re-sell their energy production surplus. We see t hat bitcoin hash function is an unfortunate choice upheld by generation s of devel- opers in 2009-2021. It makes that terrorists, or just ordina ry authori- tarian regimes, are likely to mine bitcoins, which makes wid er adoption of bitcoin problematic. However, due to the choice of the has h function, this was never a problem with Ethereum, which can be mined wit h ev- ery GPU available in most computer stores worldwide. More re cently in 2021 we have seen GPUs which are decidated for gamers, and w here crypto mining is disabled and its performance is degraded. W e have also seen the emergence of Chia crypto currency which make extens ive use of computer hard drives. We see that a bad crypto hash functio n choice can be toxic (in bitcoin) and a good choice can be beneficial to some segments of the computer industry. This consideration was here for a long time, and countless ot her crypto currencies hadin contrastmandated ahash function, whichc an bemined even with ordinary PCs. However, this choice can backfire on t he crime front. There are hackers who break into computers of million s of people, in order to run networks of zombie machines, which are sold on the black market in order to be rented to other criminals. We also have s cammers and spammer activity. It appears that the most frequently mi ned crypto currency by such zombie networks is Monero. This is precisel y because, 1This has started changing in 2018-2021 when Chinese authori ties have taken numer- ous decisive steps in order to ban or discourage bitcoin mini ng. it can be mined on more or less any PC. This has serious consequ ences [26]. There is yet another side to this debate about the choice of a h ash func- tion. GPU mining with any PC is what we need if we want privacy- enhanced tech to protect us against mass surveillance, or ju st say bur- glars, who will use the Internet to find out that when we are not at home. Privacy can only improve, if millions of users can effectivel y conceal our precious transaction data in a larger cloud of user activity . Thus, it is preferable that a privacy enabling coin can be mined on any de vice. With more users, we obtain better privacy for our financial transa ctions, and credentials used to access them (password, cookies, etc). P rivacy is a basic right [41], and also a necessity, in order to prevent va rious forms of crime and theft, such as targeted phishing attacks agains t banks and trading platforms, or targeted kidnapping cf. Section 10.3 . 7 Privacy Enhanced Payments It is important to see what kind of privacy enhancing techniq ues are available today in blockchain and bitcoin space. For bitcoi n we refer to Section V in [43], dated 2017. A high level overview of variou s bitcoin anonymization techniques and main privacy altcoins can be f ound inside [43,41,9] and many others. In this section we also briefly rev iew these techniques. Our approach is to look at the history of ideas an d crypto technology adoption. The legality of privacy-enhanced coi ns and AML regulations are covered in [41]. Bitcoin was a first very approximative creation of Satoshi Na kamoto [56]. It is easy to see that later bitcoin is NOT at all as Satoshi has imagined it [23]. Nakamoto describes a system with a large number of pa rticipants where everybody is mining, connecting to peers and engaging in trans- actions. He did not anticipate that these 3 groups of people a re going to become almost entirely disjoint, and that we will have hug e for-profit mining farms using huge amount of energy, millions of wallet s connecting through trusted gateways and vast amounts of activity, whic h are not at all recorded on the bitcoin blockchain. Moreover the number of people who actually run the P2P network remains very low, between 5, 000 and 11,500 in recent 5 years, source: www.bitdes.io. Bitcoin ha s many serious problems [23,43] and this is precisely the challenge for the next genera- tions of crypto engineers. It has led to creation of hundreds of “altcoins” with distinct technical features trying to fix some of these p roblems like cost, speed [53], number of transactions per second, resist ance to attacks by powerful entities, etc. Among others, anonymity is not as good as it initially seemed. Initially, bitcoins are attributions of certain amounts of coins to pub- lic keys. A possibility inherent to the so-called public key cryptography. The owner of the private key can spend the coins. We have a pair of cryptographic keys which match each other. To a large extent bitcoin is an evolution of the French invention of the Chip-and-Pin b ank card. A card has a private cryptographic key, which allows to certi fy that one specific transaction was approved by the owner; the date the a mount and other details are digitally signed. This is in fact done more than once, with DES and with a public key algorithm, and at several stage s ever before the transaction is completed [21]. Then, with bitcoi n the card is no longer issued by a bank but by a community of peers, which cr eates their own coins and attribute them to each other. Bitcoin is s imply the next logical step in an evolution of commerce underpinned by public key cryptography. The reliance on security and secrecy of crypt ographic keys increases tremendously, and bitcoins which are not stored o n exchanges are typically stored on secure hardware devices. These devi ces are evolu- tions of a Chip and Pin banking smart card. More than 1 million Ledger Nano devices have been sold in the last 5 years (source: ledge r.com). Bitcoin can already offer pseudonymity: a user can use many di fferent public keys, which donot identify him easily. Coins from diff erent sources can be mixed at will. This works, if we do one transaction, how ever the more activity we do, themore information is leaked toattack ers. Weneed to use more advanced cryptography to do better. Interesting ly, almost all known ways to enhance privacy are simply and directly linked to more advanced types of public key cryptography. For example, wit h stealth address techniques cf. [23], coins can be sent to a recipient and we are not able to link this recipient to the address the recipient hims elf advertises or makes public. It is simply a more private form of PK cryptog raphy with additional tricks, where it is the sender not the receiv er, who creates ephemeral bitcoin public keys used to receive incoming paym ents. This is used in Monero crypto currency, one of the most frequently cited as used or mined by criminals [19]. As a result, Monero is now an o bject of sophisticated de-anonymization efforts for law enforcem ent purposes [18]. Then ringsignatures, also inMonero, are anonymousdecentr alized group signatures. A signer can be any of say 5 signers selected in on e trans- action. The power of this technique is that the other 4 signer s do not need to cooperate. Anyone is by default involved or can parti cipate in anonymous transactions without their approval, enhancing the privacy for everyone. ThenZero-Knowledge proofs can be used tocrea te methods of generating transactions with a far larger degree of ambig uity about who the signer is. It is a type of advanced public key cryptogr aphy, which is notoriously difficult to make. We see that crypto currency privacy innovation is primarily technical. Possibly and arguably the market and the economy does not yet require such high levels of privacy, however tomorrow it will. Cyber security is a never-ending quest of enhancing privacy and anonymity and security against fraudandtheftandstandards are always improvedan dextended, in order to eventually do more than necessary, and they rarel y get sim- pler. There is no end to this process. We need to understand th at ad- vancedcryptographic techniquesare primarily here in orde r topolice bad actors who cheat or steal the funds in various ways. They prev ent crime and fraud as much as they might help criminals. When anonymit y weak- ens the certitudes, new types of thefts and attacks can emerg e. There is a genuine expectation to enhance privacy, with intention to build bet- ter, fairer, and more secure payments systems. However, unq uestionably there exist evil geniuses of crime, enabled by new opportuni ties such as with ransomware and investment scams. Then we have rogue eng ineers with dubious goals, or the fact that cryptography and comput er systems fail most of the time and good security is very hard to achieve . Which brings again the question of the quality of the source code [4 6] and of regulating or just better organizing (self-regulation) th e chaotic payment and investment innovation world. 8 The Myth of Crypto Anonymity A popular misconception in the existing literature press an d blogosphere istheallegedfull-anonymity(oratleast pseudonymity)of differentcrypto currencies. In effect, the services responsible for maintai ning public se- curity and safety fall victim to the misconceptions and fear -mongering related to blockchain and cryptocurrencies, which is furth er amplified by the pressures of the governmental agencies supervising the work of law enforcement, with some countries going as far as endorsing t he idea of making blockchain “illegal” or supporting the all-inclusi ve state control over it [55]. In recent years we had multiple events of crypto currency exchanges in regulated territories such as US or South Korea officially de-listing several privacy coins due to regulatory pressure. It seems t hat they have been asked by law enforcement agencies to produce e xcessive quantities of SARs, which imply a certain cost burden, and ye t are not the useful in crime prevention, cf. pages 58 and 66 in [65]. Ac cording to the aforementioned interviews completed throughout the duration of the European Commission PRIME Project, as well as the furthe r stud- ies performed during the preparation of this paper, the most serious concern among law enforcement community is the potential us e of the crypto currencies as a vehicle for the financing of terrorism [36,30,65] and specifically, transacting with countries subject to int ernational sanc- tions. This is confirmed by the existing (and scarce) literat ure, where the authors explicitly refer to blockchain or bitcoin (or ma ybe Monero and similar privacy coins [19]) as an obvious method of provi ding funds to extremist and terrorist organizations and radicalized i ndividuals (so- called lone-actor terrorists or “lone wolves”) [2], [3]. Su ch observations are amplified by the (exaggerated) popular perception of cry ptocurrency being again completely anonymous [27] with some authors cla iming that the payments and transfer completed with bitcoin are untrac eable [42,4]. The claim becomes more serious when security researchers in dicate the existence of techniques such as crypto currency “tumblers” or “mixers”, with specific examples of existing services which combine tr ansfers that are happening at roughly the same time, and/or then re-route them to the final destinations [6]. In general, tumbling techniques obfuscate the provenance, possession, and movement of crypto currencies [12]. This seems extremely strong but is not, due to the fact that the com muni- cations are in general monitored, and their meta-data are re tained and stored, which is enshrined in legislation in most jurisdict ions worldwide. Until recently the law enforcement community has a very simp listic view of these issues reflected by a very limited vocabulary and sim plistic an- swers (such as: “forbid crypto currency”). Actual criminal or terrorists operations are very few, and operate with cash primarily cf. [65]. Crypto currencies are used primarily to solicit donations. Accord ing to Chapter 8 in [65] the role of crypto assets in terrorism financing has i ncreased in 2020 and the score was changed from low to medium. It is not productive to just claim pretended anonymity or lac k thereof dependingon whois talking. Inevitablyaspecialist viewis emergingwith a more detailed vocabulary. In recent years, criminal inves tigations have just shifted to specialized high-tech entities, which have developed the necessary expertise andtools [18]. From anapplied cryptog raphypoint of view, nothing is completely new and there is a long game where payment cryptography and security develop in many steps [21]. Even M onero was discovered to be traceable in open academic research, which methods are now implemented by specialist firms [18]. The main point i s that privacy is temporary, and can be disappear if additional fut ure events take place, or if additional countermeasures against anony mity are in place, orifadditionaldataarecollected andappropriatea ctionsaretaken bycertainentities.Whensome academics aretryingveryhar dtoenhance anonymity [4], others are wiser showing that privacy is impo ssible to achieve in general [35]. We need to get the basic facts right. The primary reason to use cryp- tography is to prevent theft and enable more business to make remote payments easier. Cryptography makes owning and controllin g assets eas- ier. It also creates new types of thefts which have never exis ted before, cf. [52], [54] however this is now within limits of cryptographi c engineering which is fragile and knows many points of failure. In particu lar prob- lems at operation due to human factors cf. [52], [54] and unex pected additional events which are deliberately engineered [35]. A mix of cryp- tography and secure hardware devices with anti-cloning pro tections is nevertheless an undeniable helper at the heart of our “Chip a nd Pin” bank cards and today’s bitcoin wallets. Users can physicall y control pay- ments and authorize transactions themselves and this crypt o + secure hardware revolution was inevitable and was started by the ba nks them- selves as early as in the 1980s [21]. A secure hardware device [21] with a private cryptographic key has three primary functions. One is to prove authenticity and to authorize payments or transfers remote ly, over large distances while minimizing disclosures. Another is to prev ent theft, for example through tamper-resistance and user authenticatio n with a PIN. The third is an anti-clone functionality, which is very stro ng with digital signatures, because the private key can be used but not compr omised, and it will never even leave the secure element inside the sma rt card. No one can obtain or extract it, and the bank card is already a tru stless pay- ment system because users need only to trust themselves, so t hat they no longer need to trust the bank which does not know the secret keys. Inevitably, payment industry embraced this technology, as on all the three accounts (remote acceptance, anti-cloning, anti-th eft), it is vastly superior to any payment technology, which was developed ear lier, for ex- ample with paper money and bank notes. New forms of electroni c money and new payment technologies are driving old solutions out o f business (potentially) where cryptography is a crucial ingredient. There is no end in making financial systems more robust and less prone to subt le insider threats and attacks, and such systems naturally distrust ev ery single transaction participant, including the banks and their com puter systems themselves. Interestingly, anonymity was yet totally abse nt. It arrives to- day, three decades later, and it comes in many different flavor s, such as receiver anonymity, sender anonymity or un-linkability, t race-ability for transfers, etc. Now it crucial to see that anonymity is not so mething that cryptographers produce, or something they are good at (!). C ryptogra- phycan traditionally encryptdata, which is not really done in blockchain where ledgers are highly transparent, designed for broader verifiability. Instead, cryptography is meant to authenticate payments an d transac- tions through hashing and digital signatures. This part of c ryptography is very solid, and the primary reason to use cryptography is t hat it solves the theft and remote authorization problems extremely well , as no one can steal bitcoins by forging a digital signature. This stro ng ability is the primary reason why bitcoin does not need a bank or a notary any more, and anyone can be their own bank if they wish to. However, it is a mis- conception or it is rather na¨ ıve to believe that cryptograp hy is here or even that it can at all solve personal and financial privacy pr oblems. We have a broad spectrum of “privacy enhancing technologies” a nd a lot of innovation such as Zero-Knowledge proofs, all of which howe ver are in fact imperfect. Yet privacy is potentially impossible to ac hieve in general [35]. All we need is to apply current law enforcement and AML r ules [41]. Privacy does not really exist, when the law enforcement has t he ability to monitor all our communications metadata, which is a stron g legally enforced capability in most jurisdictions. There is only a h andful of well- identified geographical hotspots for illicit activity [18] . Cybersecurity is in general an endless game between attackers and defenders, and even if cryptography makes unbreakable locks, so that bitcoins c annot be al- tered or stolen even by very powerful entities, modern crypt ography is yet weak and poorly suited to solve or address our privacy pre occupa- tions. In fact potentially no technology can solve these pro blems in a satisfactory way [35]. The law enforcement and security ser vices simply need to adapt and pay more attention to technology (and crypt ography), which works on both sides, helping attackers and defenders a like. 9 Challenges for Law Enforcement A more balanced assessment comes from the United Kingdom Nat ional RiskAssessmentofMoneyLaunderingandTerrorist Financin g[64]which – in 2015 – rated digital currencies as a low risk, saying that (at the time) the criminal use of crypto currency is focused predominantl y on the on- line market places for the sale and purchase of certain illic it goods and services. The same report indicated that such risk could ris e in the future and the current use of digital currency as a method by which te rrorists raise or movemoneyout oftheUKprovides aviableand working method of doing so [8]. Law enforcement serious concerns also include the relative ease in which the perpetrators, such as the terrorist organizations or or ganized crimi- nal group operatives, can increase and enhancetheir operat ional security. They may, for example, use anonymous email services for the p urpose of setting-up the crypto currency wallets and – for further aut hentication – use the anonymous prepaid phones [2]. Although some countr ies intro- duced laws which theoretically require the identification a nd registration of the mobile phone and SIM-card buyers, it is technically ve ry easy to obtain any numberof SIM-cards usingtheservices of theso-c alled “straw buyers” or “smurfs”, that is persons who offer their identific ation docu- ments in exchange for money [37], the alternative being the p urchase of virtual, pre-registered SIM-cards. From the point of view of the law enforcement, the additional enhance- ment of operational security for the criminal offenders and t errorists wishing to exploit blockchain technologies in the form of cr ypto currency is the availability of bitcoin (or other virtual currency) a t Automated Teller Machines (ATMs) and the freestanding electronic pay ment con- soles enabling purchase of and payments in bitcoin. For exam ple, such un-monitored (lacking any kind of surveillance) consoles a re available in Romania – and they may be used with the application of the simp le op- erational security techniques mentioned above (single-us e, anonymous e- mail accounts, single-use “burner” mobile phone and prepai d SIM-card) [8]. The examples of the threats that raise the concerns of the law enforce- ment and counter-terrorism agencies in regards to crypto cu rrencies in- clude the online postings by the supporters of the so-called ISIS (or ISIL: the Islamic State or Iraq and the Levant) that include YouTub e videos, discussion forum links and links to research and anonymity p rovided by bitcoins, where direct references are made to using digital currencies to transfer funds into countries where conventional or tradit ional methods of financial transactions are difficult because of lack of netw ork capacity or government surveillance and regulation [3]. The analyst s suggest that Bitcoins were used in a number of successful attacks, such as the bomb- ing attacks conducted by the ISIS-inspired lone wolf on the s hopping mall in Jakarta, Indonesia in 2015, and in the November 2015 c oordi- nated terror attacks in Paris. The same authors indicate, th at the Inter- net sites associated with terrorist organizations have sta rted to collect donations in bitcoins [3]. Other researchers state explici tly that, given the lack of adequate controls over transactions with bitcoi n, the risk of the anonymous transactions between entities financing terr orism is ex- tremely high [55]. Some scholars consider crypto currency t o be the next step in the evolution of the more traditional ways of financin g terrorism internationally. They refer to the ancient system called Ha wala, used in the Middle East and Asia to transfer funds across borders i n a safe and convenient manner: funds are deposited with the hawala b roker who arranges for the funds to be available from another hawala br oker in a different country (both hawala brokers then settle accounts through the normal process of trade). Hawala can be used for terrorism fin ancing and money laundering because funds do not actually cross border s, removing the international money trail [3]. The process may be consid ered slow and inefficient nowadays, but with the development of new tech nologies, such as crypto currency, it can be significantly accelerated , providing that the contemporary “brokers” (or intermediaries) are tr usted, thus minimizing the risk of the authorities learning about the il legal activity. Some security experts indicate, that – apart from the terror ism financ- ing - crypto currencies are an ideal vehicle for money launde ring, bribery and financing of illegal activities. The rationale behind it is to disguise the origins of illicit proceeds throughout a series of trans actions prior to integrating the crime proceeds into the legitimate financia l system. In re- gards to use of crypto currency, the process (divided into th ree stages of: placement, layering and integration) looks as follows [14] : In the place- ment stage the crime proceeds are introduced into the financi al system by acquiring crypto currencies. After the crime proceeds ha ve entered the financial system, the perpetrator engages in a series of t ransactions to distance the funds from their source. It is the layering st age, where the funds may be channeled through the purchase of crypto curren cies or by transferring money electronically through a series of cryp to currency ac- counts. It can be further disguised as payment for goods and s ervices or through the use of intermediaries who purchase crypto curre ncies under the reporting threshold in countries where such currencies are regulated (to avoid triggering identification or reporting requireme nts). In the final stage of integration, the “cleaned” money is introduced to t he legal mar- ket, where it appears to be legally earned [14]. Obviously, s uch stages of money transfer and money laundering are present also in the m ore “tra- ditional” forms of introducing the proceeds of crime to the r egular legal market, but the aforementioned methods of operational secu rity and the accessibility plus the sheer speed of transactions facilit ated by the use of crypto currencies significantly improves the pace and sec urity of such dealings, providing that the persons involved maintain the operational security algorithms at all stages of their behavior. According to the most recent report by RAND Corporation [10] , there is little evidence of the adoption of crypto currencies by te rrorist orga- nizations, and little motivation to do so. This is changing a nd lone-actor extremists and loosely associated groups are now likely to u se crypto currencies, simply because these systems are nowadays very widely used. 10 Crypto Currency Related Crimes: Overview Classification and Stats Our research indicates that criminality involving crypto c urrency allows for profits that are much higher than with conventional felon ies. In ad- dition, stealing virtual money appears to be less risky than robbing a bank or selling drugs. In this section we will attempt to clas sify crypto currency crimes in several categories and sub-categories. We are not the first to propose this type of classification, see [13] which do cument is no longer publicly available, and has a broader focus on polici ng the whole so called dark web activity. Our approach is more basic and ce ntered around payment technology: we “follow the money”. Our goal i s also to achieve some degree or proportionality: we spend more time o n crimes which were prominent in the recent years and had a large econo mic or public policy impact, cf. [17]. Our initial short classifica tion has 9 major categories, which are not entirely disjoint, and which are a s follows: 1.Crypto Hacks . Crypto currency itself is hacked. This doesn’t hap- pen very often but the impact can be enormous. Major issues ca n be as follows. (a) The peer network malfunctions or attackers achieve impo rtant network advantage (e.g. censoring or undoing transactions ). (b) The integrity and authenticity of digital signatures is broken. (c) The integrity of blockchain itself is compromised due to a hash function weakness. (d) Smart contracts or cross-chain swaps or oracle/referen ce servers fail to work correctly e.g. in DAO heist with 50 M $losses [63]. (e) The system is secure but implementation is insecure (e.g . with side channel attacks the private key of multiple users can be compromised and all their coins stolen). (f) There is failure at operation, for example with bad rando ms or weak passwords [52,54]. 2.Thefts. A crypto currency exchange or a business entity is hacked or dishonest, and money is stolen. (a) Indiscriminate loss: the whole exchange is a victim of a t heft. Such events are typically widely publicized, e.g. [15] and p ages 22-32 in [18], one notable exception was Crex24 hack [18]. (b) Fraudulent withdrawal: a hacker manages to impersonate a user and withdraw his funds. (c) Fraud at payment deposit stage: Server that accepts cryp to cur- rency (e.g. online market place) is hacked, money is stolen. (d) Client using crypto currency is exposed in interaction o r hacked, his money is stolen. 3.Investment Fraud@Exchanges. (a) Pure ponzi schemes. For example with OneCoin, PlusToken and Wotoken and similar, several billions of dollars in deposit s were collected from naive investors. cf. [18] and [11]. (b) A crypto currency operator deliberately creates barrie rs or lim- itations: disabling withdrawals or deposits, banning cert ain cat- egories of users, creating fake technical incidents, etc. (c) A crypto exchange will list or delist coins on false prete xts in order to manipulate the market. (d) Promoting alternative coins which have little or no valu e. Pro- duction of fake news about crypto coins. For example the Wall Street Journal have once written that GAW miners was the world’sfastestgrowingbitcoinminingoperation.Laterth efounder was charged with defrauding hundreds of individuals around the world for 9 M $, cf. [38]. (e) Dishonest use of information provided by users or trader s, e.g. making financial bets against customers. 4.Exit Scams. They can occur not only at exchanges. (a) Users at a crypto exchange cannot withdraw funds due to ar bi- trary decisions or on false technical pretexts. (b) Adopters of a specific crypto currency or ICO investors se e the sellers of this token disappear. (c) Failure to deliver coins: customer pays for crypto curre ncy but he doesn’t receive any. (d) With miners: see 5.c. 5.Software and Hardware Scams provide malicious or fake tools or services: (a) Insecure wallets which expose users to thefts. (b) Criminals recompile and modify some free open-source so ftware. (c) Failure to deliver miner equipment paid for by customers . (d) Miners with backdoors [16]. 6.Web Scams : a fraudulent web site imitating a legit company which is attracting investor activity e.g. fake exchanges. 7.Malware can steal crypto currency at one of. (a) At server/exchange side. (b) At client wallet side. (c) Or mining crypto currency at user expense. 8.Ransomware/Extortion . Crypto currency can be used for ransom payment with blackmail or kidnapping etc. 9.Law Enforcement Failures . (a) Police cannot seize crypto currency because the owner do es not collaborate, for example he does not reveal his password. (b) Crimesarespecificallycraftedtooperateacrossjurisd iction bound- aries or with unreliable offshore business entities. (c) Concealingmonetaryflowsfromtheauthorities, e.g.mon eylaun- dering with crypto currency. 10.1 Scams, Ransoms and Other Blockchain Fraud According to a recent crime report by CipherTrace from Febru ary 2021, cf. [17], ever since 2019, fraud and misappropriation are th e dominant form of crypto currency crime. Then come the thefts, and final ly we have ransomware which comes 3rd. According to [11] scams acc ount for 54 %, while ransomware accounts for 7 % of criminal activity. We cover ransomware in more detail in Section 10.2 below. In 2019 scam s have received an enormous 10 billion dollars from naive investor s, cf. [18,11]. Another author have identified 132 scams defrauding investo rs for a total of 16 billions of dollars since 2012, see [40]. Interestingl y after 2019, in 2020 the scam activity has apparently substantially declin ed cf. Fig. 1 in [17]. In 2020-21 we have seen many scams related to Covid. S cams remain a very major problem at all times. They concern an extr emely large population of more than 200 million amateur crypto inv estors [24] and beyond. 10.2 Ransoms Are Back A very major area of concern for the law enforcement agencies and se- curity services is the potential behind the use of crypto cur rencies in ransomware attacks. In the famous older case of the CryptoLo cker mal- ware of 2013, the trojan in question was using the 256-bit AES cryp- tography to encrypt user files so that they became irrecovera ble. Nearly 250,000 individuals and businesses around the world suffere d because of the CryptoLocker attack, which earned an estimated 30 milli on USD for its developer [27] in a period of just 100 days between mid-20 13 and May 2014 [42]. Following [11] the total amount of ransoms paid in 2019 was about 100 M $in one year in 2019, and this amount has more than tripled in 2020 to reach an estimated 350 M $. The ransomware attacks pose the extremely serious threat where they victimize not only the i ndividuals and small business, where the potential ransom is relativel y small, but when they target banks, telecoms, health service and critic al national in- frastructure. Since CryptoLocker, ransomware offenders tr ied to attack among others: the telephone provider TalkTalk in November 2 015, many banks etc. Bitcoin remains the primary method of paying the r ansom [8]. Privacy-enhanced coins such as Dash account for less than 2 % , cf. [44]. A major ransomware attack was certainly the coordinated, wo rldwide WannaCry assault of May 2017. It infected 230,000 computers in 150 countries and the total amount of losses was estimated at 4 bi llion USD [44]. Among the targeted institutions were the Deutsche Bah n, FedEx, National Health Service (NHS) in the UK, governmental and Po lice in- stitutions in several countries, airlines, universities, automobile manufac- turers, etc. The attack was stopped within a few days of its di scovery due to emergency patches released by Microsoft, and the discove ry of the kill switch that prevented infected computers from spreading Wa nnaCry fur- ther. A preliminary evaluation by security experts stated t hat the attack originated from North Korea [59]. Then in 2018 and 2019 ranso mware has declined, to explode with more force in 2020, cf. page 31 i n [11]. In 2020 the most prominent victims of ransomware were among o ther Barnes&Noble, LG or University Hospital of New Jersey [11]. A signif- icant observation in recent and major attacks, is that crimi nals publish some of the data online in order to increase the pressure on th e victims [11]. For example, in February 2021, the source code of the bl ockbuster video game maker CD Project was stolen. The company declined to pay the ransom. Then reportedly the code was then auctioned on da rk mar- kets for 7M $, see [32]. This resurgence of ransoms in 2020 is not at all surprising an d seems to be a logical consequence of two trends. The first is that los ses are reported in dollars and clearly the bitcoin price has increa sed up to 8 times in 2020 making some older ransom strains programmed to request certain standardized amounts in bitcoins substantially mo re profitable. A second observation is that, with the global Covid pandemic , businesses are more desperate to maintain business continuity at all co sts, and thus more inclined to pay ransoms, for example Travelex reported ly paid 2.3 million in ransom, see [18]. In 2020 we have seen malicious Co vid-related Android applications which spied on users, encrypted files a nd asked for ransoms, cf. page 23 in [18]. Peer to peer financial systems ar e a substan- tial challenge for the law enforcement and security agencie s and have a set of characteristics making them very attractive to the cr iminal and terrorist enterprises [2]: a certain level of anonymity (if the necessary operational security precautions are implemented), globa l reach (being geo-political border agnostic [29] and allowing to carry on the transac- tions through third countries), the speed (facilitating th e quick transac- tions thus limiting the chance of them being intercepted or b locked), low cost to use (dependent of the fees of the intermediaries in ca se of the crypto currency transfer, tumbling and exchange), relativ e ease of use (being increasingly user friendly – as it is true with most of the emerging technologies, TOR being the prime example), difficulty to tra ck by the authorities, and the lack of legal regulations and control o ver the decen- tralized crypto currency ledgers servers and distributed o r collaborative electronic systems. 10.3 On Kindnapping Front There are several high-profile kidnappingcases where ranso ms in millions of dollars were paid. For example, in 2017, a criminal group k idnapped an employee of a United Kingdom-registered crypto currency exchange in Kiev, Ukraine. The kidnappers released the victim on 29 De cember, reportedly following a ransom payment equivalent to USD 1 mi llion in Bitcoin. Several similar events were reported and we refer [ 20] for a com- prehensive review of this topic. It appears that crypto curr ency ransoms are not the norm or not yet for kidnappings in general. Instea d, kid- nappers are targeting wealthy individuals in general. It ap pears that in several cases of kidnapping where crypto currency payments were re- quested, the kidnappers were able to competently exploit op en or public information to identify individuals, whose crypto currenc y wealth have been publicly known. 11 New Criminal Battlefield Revisited In 2011, when the notion of the “Internet as a new criminal bat tle- field” was first introduced [28], the blockchain concept and t he crypto currencies were virtually unknown outside of the specialis ts and crypto enthusiasts’ circles. However, for these and many other tec hnological de- velopments, the use of any technology for the purposes that a re (directly or potentially) illegal in nature, is somewhat normal, as th ere is no rea- son why criminals would not adopt a new tool especially if it i s readily available, easy to use and inexpensive. Additionally, the y ounger gener- ation of criminals we are dealing with are more likely to embr ace the Internet and technology and will consider it to be their natu ral environ- ment. Therefore, we can assume that the frequency of on-line based and cyber-enabled crime increases in parallel to the generatio nal changes. It needs to be stressed that the Internet and new technology a re used at all stages of criminal behavior. From the planning and pre paration, through the completion of an act, destroying or altering the evidence, up to the stage of preparing an alibi or manipulating witness es [28]. We could compare these technologies to a multi-purpose tool, w hich was not originally designed to cause harm, but which was later skill fully and cre- atively adapted, by those who found other and previously unf oreseen applications for it. Now we should not ignore the fact that ce rtain very specific types of crimes, and this is primarily ransomware , are specif- ically enabled by this new technology. In the “old world”, it was harder for criminals to receive payments without being caught or mo nitored. Blockchain technology also offers the possibility to defer t he moment at which the criminal takes the money for potentially unlimite d time, and this is a completely new scenario that has never existed befo re. There- fore we must also recognize that beyond being just a tool, blo ckchain can genuinely be a disruptive technology and modify the land scape of criminal activity in which criminals engage. A useful comparison here is to the credit card payment histor y: there are several countries including the UK, France and Malaysia whe re the in- troduction of Chip and Pin technology [21] was motivated par tly by the quick increase of crime and fraud rates. In the same way, the v ery possi- bility of using credit cards to purchase goods over the Inter nethas played a major role in crime, and created a pre-bitcoin situation wh ere stealing data has become a potential moneymaker. Bitcoin has just amp lified the necessity to innovate, in the areas of payment and the digita l economy, and is the next logical step after the credit cards. First we h ad credit cards since the beginning of the 20th century, cf. [21], then in 1990s the credit cards have become trustless, in the sense that they po ssess private keys which authenticate transactions and they are the only e ntity able to authenticate payments so that our money is safe against fr aud even when we do not trust the bank. It is easy to see that even the ban k cannot forge or alter transactions made with Chip and Pin cre dit cards. Finally we have various forms of disintermediation. First o f all payment companies such as VISA, Mastercard or PayPal have deprived t he banks from substantial amount of income from payments, and the inc ome goes to the multinational firms, rather than traditional high str eet banks. Then we have a new wave of disintermediation, which seems “an archic” like bitcoin. Strangely, money lands at the end in some large crypto exchanges which are based in the United States primarily cf. [17]. Busi- nesses of that kind have enjoyed phenomenal growth rates. Be ing a fan or a user of bitcoin currency, in spite of undeniable extremely large impact and popularity [24], is possibly somewhat a smoke screen which hides a broader business reality. A large number of new unregulated para-bank companies are competing for “geek” customers which are fans of bit- coin and other innovations, and any method to capture their a ttention and their deposits is good. Disintermediation and business competition across borders is the main pattern. We simply observe banks l osing busi- ness and customers to certain offshore businesses. Crypto ex changes can now also compete wtih banks on getting funding from investor s. In 2021, a major crypto currency exchange, coinbase, has successful ly become a regular traded company on Nasdaq stock exchange with a marke t cap of 70 billion approximately at the time of writing, which is com parable to some of the largest banks in the world. Bitcoin is just a part of an inevitable trend in which payment technol- ogy and financial markets must change to serve the needs of the global digital economy better, and to respond and adapt to what the n ew tech- nology can enable and offer. We have a continuous wave of busin ess disruption, where jobs and business are moving to different j urisdictions. This is hardly avoidable. The crime is evolving likewise, ta king new and unprecedented forms An interesting point, is that in parallel, blockchain creat es a new liberal “geek” offshore jurisdiction where maths and code are law. In terestingly it is also a self-policing jurisdiction. It is meant to regul ate itself or to work in very different ways than the incumbent banking sector . We need to recognise that our old financial system was very costly to r un, for example the police forces of the whole planet collaborate on a very large scale in order to police fake currency crime. This problem di sappears with bitcoins, as un-forge-ability is a standard feature in modern cryp- tography. It is not true that the security is systematically degraded or that the lack of regulation is systematically a problem. On o ne side, bitcoin facilitates certain specific forms of crime such as r ansoms, cf. Section 6.2 or certain types of transgressions are allowed o r tolerated in the crypto economy. Then on the other side, security is rei nforced at many places. Accordingly, many crimes do not happen anymore . Many attacks or thefts occur only in very specific circumstances a nd typically one just cannot take bitcoins which are not theirs, because o f strong cryptography, see Section 6.1 and Section 6.2. 11.1 Law Enforcement Shortcomings A key problem is that the law enforcement is radically unprep ared to deal with the new types of payment business and supra-nation al business disruption, due to – among others – the administrative and le gal con- straints, lack of funding (translating in majority of the co untries to the inability to compete financially with the private sector whe n it comes to hiring the properly trained and skilled IT experts), lack or expertise and training, ineffective or non-existent exchange of informat ion, inability or difficulty in cross-border cooperation, the general lack of k nowledge and experience in regards tocyber-and cyber-enabledthreats [ 36]. According to our recent interviews with the Intelligence and security practitioners, the problem of the abuse of modern technologies by criminals and ter- rorist requires the multi-disciplinary approach involvin g the co-operation of the law enforcement, criminal justice, computer scienti sts and the in- dustry [36]. No matter how clich´ e it might sound, the most si gnificant improvement in the current situation can probably be achiev ed just by raising awareness and education of all parties involved. Th is specifically relates to the law enforcement community. Qualitative stud ies performed during the EC FP7 PRIME Project [36], [37] research show that the level of knowledge about modern technologies among the Police offic ers world- wide is extremely limited. One of the objectives of this pape r is to make the computer science community and IT industry aware of this fact. Law enforcement professionals have a very vague understand ing of the emerging technologies and their potential for abuse by the c riminal and terrorist enterprises. Moreover, we have unrealistic expe ctations about the potential and skills of the Police among the general publ ic and com- puter science industry representatives. The so-called “CS I Effect” orig- inally related to the impossibility to achieve (the alleged ) “standards” in forensic sciences is currently starting to impact the pop ular expecta- tions towards “cyber investigations”, resulting in na¨ ıve and improbable anticipations about the skills and capabilities of the Poli ce forces. It is thus necessary to re-consider and re-work the existing stra tegies and methodologies of Police education. No matter how idealisti c it might sound, in order to do it, it is necessary to involve the comput er science industry in such a framework, as the rapid changes and develo pments in technology render the traditional law enforcement trainin g based on the well-established and long-term curriculum largely useles s. A highly plau- sible approach [36] is to engage in public-private partners hips, with law enforcement practitioners, lawyers, computer science exp erts and cyber- forensics specialists. We recommend using the approach dev eloped by the field of Crime Science, namely the crime-scripting, unde rstood as a way of deconstructing an offence into its basic component act ions, and also criminal horizon scanning [31], [5]. Recent developme nts in the area are the new EU-funded project Titanium developing blockcha in analytic tools named GraphSense and DarkNet Monitor. Interpol has a w orking group and they have published at intepol.int web site a draft taxonomy under development of crimes involving darknets and crypto c urrencies, see [33]. 11.2 Difficulties and Perspectives Finally, it is important to re-consider the future of the leg al framework in which the well-established, emerging and forthcoming tech nologies will operate. As mentioned earlier [29], cyber-enabled crimina l or terrorist acts are geopolitically border agnostic, as their perpetra tors can operate simultaneously in several jurisdictions, and the flexibili ty and potentially high anonymity available to them hamper the potential for pr evention, detection, and prosecution. From the legal standpoint, the international harmonization and unification of the “cyber law” is a slow pro cess. In theory, it is more likely in the case of operational and proce dural do- main (including problem prevention, identification, and re cognition; risk detection and assessment; evidence investigation, gather ing, and presen- tation; and crisis management regulations), although – as o ur findings imply [36] – numerous substantial discrepancies still exis t. 11.3 Restoring Audit with Focused AML Money laundering cannot be just policed by banning some cryp tographic inventionssuch as ZeroCash, butrather by“focused AML”, te rm used by a US law firm in [41]. In a focused AML approach we disclose addi tional private transaction information to our bank or exchange, bu t not to a larger crowd. For example, many systems such as Stealth Adr ess in Monero or ZeroCash have socalled “view keys”for this purpos e. The fact is that these keys enable to establish high standards of proo f. They are cryptographically unforgeable, andpotentially theyhave more valuethan current AML reporting standards at crypto exchanges, where documents submitted could for example be fake, or authentic which were carefully crafted to show an inaccurate picture. 12 The New Economy is Here and it Deserves a Legal Protection In the discussion of the problem of the Internet as a new battl efield, we see that law enforcement and the criminal offenders compete f or domi- nation [29]. At the same time technology solutions and financ ial services compete for the sake of business, with well-known moral haza rds, namely compromising public safety and security in order to acquire a larger mar- ket share. It was noted that although it might seem natural th at such issues should be a domain of politicians and legislators, th e design of universal strategies and intervention measures is actuall y in the hands of scientists, industry, and end-users (security services). A central role is in fact going to be played by new emerging disciplines and new em erging professions, which are all in sense also new chapters of mode rn Computer Science. In particular we have the topics of Big Data, Applie d Cryptog- raphy, Artificial Intelligence and Deep Learning. We see tha t anonymity and innovation is disruptive for law enforcement sector as m uch as they are for thebankingandpaymentindustry.Wecan anticipate t hatthe law enforcement sector needs to change their culture radically in the sense that they need to become knowledge-based, employ radically more tech- nicians, research engineers, data scientists, and special ists with PhDs in related fields. Following [4] criminal activities involv ing crypto cur- rencies require to develop novel analytic methodology and t ools. Apart from the cultural shift, it is very difficult to expect the inte rnational legal community to come up with a comprehensive vision or str ategy, when dealing with challenges related to emerging technolog ies and busi- ness and software ecosystems which lead to radical changes i n criminal landscape. This is a process, and it requires collaboration on the inter- national scale [13]. As of today, we do not yet have an all-inc lusive and up-to-date, universally agreed set of solutions [13]. One o f the reasons for this is that different nations have very different levels a t which they have embraced new technology and cyber-security. Another p roblem is that different nations have different views on free speech, ci vil liberties such as usage of private communication or privacy enhancing technology, and personal or consumer rights and freedoms. Some countrie s will be tempted to address the emerging cybercrime problems from th e point of viewof nations, which stay onthe topof newtechnology imple mentation. Other nations will try to avoid complication and maybe say: “ forbid or regulate the payment technology we do not understand or mast er well enough”. Instead of having the philosophical or typical pro blem of main- taining the delicate balance between two fundamental expec tations: the right to privacy which is recognized as a human right, and the right to safety which is more about how industrial nations protect th eir citizens and businesses. We observe that different nations approach t he problem differently due to their culture and history. 12.1 On Risks of Banning or Blacklisting Money launderingcannotbe just policed bybanningsome powe rful cryp- tographic inventions such as ZeroCash. We need to embrace ne w tech- nology rather than see each new technology development as an anomaly, which we cannot handle. Banning is in fact hurting business, innova- tion and the 99.9 % of users. In [1] authors study payments fro m the point of view of network topology and connectivity and define fitness as the ability of the node to attract new connections. Then th ey show that the accounts that have high fitness are of two sorts. They are either short-lived and indulge in malicious or criminal activitie s, or they are long-lived and they represent large organizations. Here is the dilemma: policing crime without negatively impacting businesses. 13 Perspectives of Regulating and Policing Financial Innovation Provider Businesses We need a pro-innovation and pro-business agenda: whether t he new technologies such as blockchain are just a “hype” or not, nat ions are trying to attract the innovators to create jobs in their coun tries. In some sense new technology is always an uncertain bet from the poin t of view of investing in it, and assessing how successful or how influe ntial they might become. If so, it is perfectly logical for the countrie s to embrace disruptive innovations, maintaining their original parad igm of indepen- dence and freedom, and hoping that some unicorn companies ar e going to become rich and pay taxes, in a friendly jurisdiction whic h figures out the right mix of freedom to innovate and regulation. Such phi losophy was attempted in New York with Bit License and in France with A MF licencing. Then we deal with the associated criminal activi ty as it comes, with the idea of proportionality. In contrast, over-regula ting and plan- ning to be ten steps ahead of criminals, is an expensive strat egy for law enforcement agencies and security services. 13.1 Can Safeguards which Prevail In Financial Regulation Survive in the Immaterial World? We need to look at the spirit of laws and regulations which hav e under- pinned the payment and see that many ideas are obsolete with n ew tech- nology, and also with how modern capitalism works at large. T he whole idea is that a company can issue a “security” and this process must be very heavily policed by lawmakers and law enforcement agenc ies such as SEC in order to protect the investors is potentially obsolet e. Since 2000 numerous financial scandals and investment bubbles have sho wn that investors do and will fall into traps and buy the trendy share or coin, which is not always even trying to do a good job as an investmen t. Even properly regulated securities on the stock markets have fai led to protect millions of investors in practice. The crucial question here is that issuing a security is heavi ly regulated, and is expected to be a reliable link between what investors e xpect to own or invest in, and some material business operations or as sets. We want investors to know what they are buying and investors are entitled to be treated fairly and get the same share of corporate profit s in pro- portion, as for example the founders of the company. However the whole idea of business assets being material and subject to polici ng by accoun- tants, have become totally obsolete in the recent years. Now the 5 top tech companies on S+P500 stock index are worth more than 20 % o f the whole index, and the combined value of US tech companies in ge neral is more than the whole stock market in Europe. The key observati on is that a great part of what we see on the stock market are immaterial a ssets and intangible property, or assets which are non-exclusive . An Internet platform or system can benefit potentially anyone, and it is n ot possible to monopolize the virtual wealth stemming from the network e ffects, the economies of scale and collaboration easily. In this light, it is wrong to believe that bitcoin benefited only some scammers or specula tors. On Internet forums we observe that there is a broad population o f people, who are not unhappy with the profitability of their crypto cur rency in- vestments. In some sense investors were right to invest in th e Internet bubble in 2000 and in Tesla stocks or Bitcoin and Ethereum tod ay. They understood that tremendous amounts of wealth, power and inn ovation are at stake, and are going to be created somewhere here, for e xample with new electric cars. In fact it remains difficult to capture, own or monopolize all t his wealth. Stock markets and government regulation of how securities a re issued have frequently and again, failed to protect against invest ors investing in wrong assets. Some crypto currency enthusiasts contend t hat crypto currency companies will soon be allowed to issue securities and they will be fully compliant with US Laws and regulations. This is no ha ppen- ing yet and so far such companies have been facing severe regu latory backlash. In July 2021 many companies (e.g. Binance, UniSwa p) have suddenly halted trading crypto tokens which get too close in to imitat- ing stock market shares. Arguably however, one day, maybe in 10 or 20 yeas, securities could be eventually issued on blockchai ns. This is be- cause blockchains canprovideimportant andextensivenewf unctionality, which does not exist in current financial markets. In our view, both technology and law enforcement should work in their own way, on improving technical standards and safeguards. U ltra conser- vative blacklisting, banning or fear mongering attitudes, are rarely com- patible with disruptive new technology which creates new jo bs, new ways of doingthings, or newways tosecure propertyor engage inbu siness con- tracts, and this is how our economy evolves of improves. Cryp to market regulations should protect the small to average investors, primarily not against taking active part, and effectively co-funding the d evelopment of new disruptive technology, but against rogue traders, ro gue develop- ers, faulty cryptography standards, market manipulators, and predatory market mass surveillance leading to targeted fraud and crim e activities. 14 Conclusion Financial crime or tax avoidance are serious problems, whic h however should not conceal the fact that it is hardly possible to forb id users from using alternative unregulated financial services. Large so ftware ecosys- tems such as Bitcoin or Ethereum blockchains are nowadays co nsidered as good investment opportunities, and have year after year g ained an im- mense popularity. Bitcoin did not go to zero, instead it has c rossed the 60,000 $mark. Many cryptocurrencies havehigh prices duetoartifici ally created scarcity and poor investment opportunities elsewh ere. However there is no scarcity of developers bringing a plethora of inn ovative DeFi and crypto protocols to market. The blockchain ledgers grow every day and occupy hundreds of gigabytes. There is no scarcity of tra nsactions either. As of July 2021, blockchain has 200 million of users [ 24]. Every single day 1 million bitcoin wallets are in use. 14.1 Actionable Recommendations We need to uphold the free market economy while protecting in vestors from predatory forces and thieves through better privacy, b etter cryp- tography and better cybersecurity. If we look at the figures w e see that the biggest threats to individual customers are not thefts o r ransoms, but primarily scams whichsimply imitate theinvestmentopport unities inthe new economy [11,40]. Then, comes ransomware, a major threat on the rise, where victims are primarily businesses. Crypto curre ncy coins offer some unique features such decentralized ownership and prog rammable decentralized trading which brings to us, a completely new w orld of busi- ness functionalities. A controversial feature is privacy for all parties involved in financial transactions. Arguably future blockchain and cybersecuri ty standards should operate on the principle of proportionality and tack le the actual cybercrimeratherthanbanandforbidinadvance.Proportio nalitywould suggest to enable more privacy in the financial sector: it ben efits the 99.9% of legitimate activity. This even though it also helps the 0.1 % of illicit activity which remains small [17]. According to a re cent paper by a specialist US lawyer firm [41] the societal or economic bene fits from privacy coins are substantial and “substantially outweigh their risks”. According to this law firm, the situation is broadly under con trol, and existing AML regulations already “properly and sufficiently cover” those risks w.r.t. money laundering. Acknowledgements Although the preparation of this paper was not directly fund ed by a designated research grant, our research and expertise have been sup- ported indirectly from different grants and by our universit ies. Nicolas Courtois has also worked as a consultant for several crypto c urrency companies in UK, France and the US. His background and inspir ation in his security engineering and payment security research a nd teaching were eight years spent working as a crypto R&D engineer for th e French smart card industry (Bull CP8, now part of Gemalto), and seve n years of interactions and engagement with the crypto currency com munity. He was also funded by the EU with project RIBS on Resilient Infra struc- ture and Building Security. Kacper Gradon acknowledges the support of UCL Jill Dando Institute of Security and Crime Science. Some of the ideas expressed here arouse during the preparation of the de liverables of the EU-funded PRIME Project and throughout the duration o f the U.S. State Department Fulbright Scholarship at Institute o f Behavioral Science University of Colorado at Boulder. References 1. A. Aspembitova, L. Feng, V. Melnikov L. Chew: Fitness pref - erential attachment as a driving mechanism in bitcoin trans - action network . PLOS ONE, 14(8), 1–20, 2019. doi:10.1371/journal.pone.0219346 2. A. Brill, L. Keene: Cryptocurrencies: the nextgeneratio n of terrorist financing? Defense Against Terrorism Review, 6, no. 1, 7–30, 2014. 3. A. Irwin, G. Milad: The use of crypto-currencies in fundin g violent jihad. Journal of Money Laundering Control, 19, iss. 4, 407– 425, 2018. 4. Akcora, Purusotham, Gel Krawiec Thayer Kantarcioglu: Ho w to not get caught when you launder money on blockchain? arxiv.org/pdf/2010.15082.pdf , 2020. 5. B. Leclerc, R. Wortley (eds.): Cognition and Crime. Offend er Deci- sion Making and Script Analyses. Routledge Crime Science Se ries, New York, 2014. 6. Bartlett, J.: The Dark Net. Melville House, Brooklyn, 201 5. 7. Brown, Lawrence: A proposed design for an extended des . Vt h Int. Conf. on Computer Security, IFIP/Sec’88, 2018. 8. Brown, S.D.: Cryptocurrency and criminality: the Bitcoi n opportu- nity. The Police Journal: Theory, Practice and Principles, 89 (4), 327–339, 2016. 9. C. D. Clack, N. T. Courtois: Distributed Ledger Privacy: R ing Signatures, M¨ obius and CryptoNote. arxiv.org/abs/1902.02609 , 2019. 10. C. Dion-Schwarz, D. Manheim, P.B. Johnston: Terrorist u se of cryptocurrencies. Technical and organizational barriers and future threats. RAND Corporation Report, Santa Monica, 2019. 11. ChainAnalysis: The 2021 crypto crime reportThe 2021 Cry pto Crime Report. Everything you need to know about ransomware, darknet markets, and more,, February 2021. 12. Chohan, U.: The Cryptocurrency Tumblers: Risks, Legali ty and Oversight. University of New South Wales (Canberra) Discus sion Paper Series: Notes on the 21st Century. , 2017. 13. Chohan, Usman W.: International Law Enforcement Respon ses to Cryptocurrency Accountability: Interpol Working Group , https://papers.ssrn.com/sol3/papers.cfm?abstract_id =3156531 , 2018. 14. Choo, K K.R.: Cryptocurrency and Virtual Currency, Corr uption and Money Laundeering/Terrorism Financing Risks? Handboo k of Digital Currency. Bitcoin, Innovation, Financial Instr uments and Big Data., pp. 283–307, Boston, 2015. Academic Press/Elsev ier. 15. Choudhury, S. R.: More than $30 million worth of cryp- tocurrency was just stolen by hackers, company says. https://www.cnbc.com/2017/11/21/tether-hack-attacke r-report edly-steals-30-million-of-digital-tokens.html , 2017. 16. Cimpanu, Catalin: Backdoor Code Discov- ered in Popular Bitcoin Mining Equipment. https://www.bleepingcomputer.com/news/security/back door-code- discovered-in-popular-bitcoin-mining-equipment/ , April 2017. 17. Ciphertrace: Cryptocurrency crime and anti- money laundering reportCryptocurrency Crime and Anti-Money Laundering Report. February 2021. ciphertrace.com/2020-year-end-cryptocurrency-crime- and-anti- money-laundering-report/ 18. CipherTrace. Cryptocurrency Crime and Anti-Money Laundering Report, June 2020. https://ciphertrace.com/wp-content/uploads/2020/06/ spring- 2020-cryptocurrency-anti-money-laundering-report.pd f 19. CoinTelegraph: IRS offers usd 625,000 bounty to break Mon ero . https://tinyurl.com/cointelemonero , 2020. 20. controlrisks.com: Global kidnap, extortion and threat response operational and protective security cyber incident respon se . https://www.controlrisks.com/our-thinking/insights/ 2019- kidnapping-and-extortive-crime-trends-in-review , April 2020. 21. Courtois, N.: Lecture slides about chip and pin and bank card technology. taught at University Col- lege London GA12 Applied Cryptography, 2006-2011. At http://www.nicolascourtois.com/papers/sc/CB.pdf 22. Courtois, N.: On The Longest Chain Rule and Programmed Se lf- DestructionofCryptoCurrencies. arxiv.org/abs/1405.0534 ,2014. 23. Courtois, N.: Features or Bugs: The Seven Sins of Current Bitcoin. Banking Beyond Banks and Money, A Guide to Banking Services i n the Twenty-First Century, 97–120. Springer, 2018. 24. crypto.com: Measuring Global Crypto Users, A Study to Measure Market Size Using On-Chain Metrics. July 2021. https://crypto.com/images/202107_DataReport_OnChain _Market_ Sizing.pdf 25. D. Yaga, P. Mell, N. Roby and K. Scarfone: Blockchain Tech nol- ogy Overview. NIST and U.S. Dep. of Comm. Internal Report. NISTIR8202, 2018. 26. Felipe Ribas Coutinho, Victor Pires, Claudio Miceli Dan iel S. Menasche: Crypto-Hotwire: Illegal Blockchain Mining at Ze ro Cost Using Public Infrastructures. arxiv.org/pdf/2101.00845.pdf , 2021. 27. Goodman, M.: Future Crimes. Anchor Books, New York , 2016 . 28. Grado´ n, K.: Internet as a new criminal battleground? An essay on the future trends in crime. Disputatio, XII, pp. 152–161 , 20 11. 29. Grado´ n, K.: Crime Science and the Battlefield of the Inte rnet. Se- curing the Analogue World from the Digital Crime. IEEE Secur ity & Privacy Magazine, 11, iss. 5, 0–0, 2013. 30. Grado´ n, K.: Countering lone-actor terrorism: specific ation of re- quirements for potential interventions. Studia Iuridica V ol. 70 , 2017. 31. H. Brayley, E. Cockbain, G. Laycock: The Value of Crime Sc ripting: Deconstructing Internal Child Sex Trafficking. Policing: A J ournal of Policy and Practice, 5 iss. 2, pp. 132–143 , 2011. 32. Humphries, Matthew: CD Projekt’s Stolen Source Code Has Been Sold. https://uk.pcmag.com/security/131698/cd-projekts-st olen- source-code-has-been-sold , 2021. 33. Interpol: Helping police worldwide understand and in- vestigate digital crimes, consulted 1 September 2021, https://www.interpol.int/en/How-we-work/Innovation/ Darknet-and-Cryptocurrencies . 34. Javad Zarrin, Phang Hao Wen, Lakshmi Babu Saheer and Bahr am Zarrin: Blockchain for Decentralization of Internet: Pros pects, Trends, and Challenges. arxiv.org/abs/2011.01096 , 2020. 35. Jefferson E. Simoes, Eduardo Ferreira, Daniel S. Menasch e and Carlos A. V. Campos: Blockchain Privacy Through Merge Avoid - ance and Mixing Services: a Hardness and an Impossibility Re sult. arxiv.org/pdf/2101.00851 , 2021. 36. K. Grado´ n, A. Gutkowska, P. Karasek and N. Bouhana: PRIM E D7.2 Countermeasures Requirements White Paper. EC Confiden tial Report. Cordis, 2017. 37. K. Grado´ n, A. Gutkowska, P. Karasek E. Corner N.Bouhana and A. Thornton: PRIME D2.6 Context Analysis. Preventing, Mitiga ting and Interdicting Extremism. EC Confidential Report. Cordis , 2015. 38. Kelso, C. E.: Josh Garza Sentenced to Prison and Fined $9M over GAW & Paycoin Scam. Sept. 2018. https://news.bitcoin.com/josh-garza-imprisoned-and- fined- 9m-over-gaw-paycoin-scam/ 39. Koblitz, Neal: The Uneasy Relationship Between Math- ematics and Cryptography. Notices of the AMS. http://www.ams.org/notices/200708/tx070800972p.pdf 40. Lee, Lihan Hyunwoo: Crypto industry must keep scam- mers from stealing another $16 billion. Feb 2021. https://cryptoline.org/crypto-industry-must-keep-sc ammers- from-stealing-another-16-billion/ 41. LLP, Perkins Coie: Anti-Money Laundering Reg- ulation of Privacy enabling Cryptocurrencies. www.perkinscoie.com/images/content/2/3/237411/Perki ns-Coie- LLP-White-Paper-AML-Regulation-of-Privacy-enablin.p df, 2020. 42. Lucas, E.: Cyberphobia. Bloomsbury, New York, 2015. 43. M. Conti, S. Kumar, C. Lal S. Ruj: A Survey on Security and Privacy Issues of Bitcoin. Dec. 2017. arxiv.org/abs/1706.00916 44. M.A. Costandache, M.S. Mihalache, E. Simion: New direct ions in the ransomware phenomenon. eprint.iacr.org/2020/1610/ 45. Mackenzie, Dana: A Game of Chance. In New Scientist, 7 Jun e 2003 issue, pages 36-40. 46. Maese, Vivian A.: Divining the Regulatory Future of Ille gitimate Cryptocurrencies. Wall Street Lawyer, 188, iss 5, 2014. 47. McCarthy, Kieren: UK, French, Belgian blanket spying sy stems ruled illegal by Europe’s top court, Five-year legal battle pays off. Now countries have to figure out what to do, 2020. 48. Mitchell, Eddie: How Many People Use Bitcoin in 2021?, 20 20. bitcoinmarketjournal.com/how-many-people-use-bitcoi n/ 49. Nicolas Courtois, Lear Bahack: On Subversive Miner Stra tegies and Block Withholding Attack in Bitcoin Digital Currency, a t arxiv.org/abs/1402.1718 , Jan. 2014. 50. N. Courtois, G. Castagnos, L. Goubin: What do DES S-boxes Say to Each Other? ia.cr/2003/184/ , 2003. 51. N. Courtois, M. Grajek and R. Naik: The Unreason- able Fundamental Incertitudes Behind Bitcoin Mining. At arxiv.org/abs/1310.7935 , 2013. 52. N. Courtois, N. Song and R. Castellucci: Speed Optimizat ions in Bitcoin Key Recovery Attacks. CECC 2016, post-proceedings of Tatracrypt 2016, 2016. 53. N. Courtois, P. Emirdag and D. A. Nagy: Could Bit- coin Transactions Be 100x Faster? proc. of SECRYPT http://ieeexplore.ieee.org/document/7509520/ , 2014. 54. N. Courtois, P. Emirdag and F. Valsorda: Private Key Reco very Combination Attacks: On Extreme Fragility of Popular Bitco in Key Management, Wallet and Cold Storage Solutions in Presence o f Poor RNG Events. eprint.iacr.org/2014/848.pdf , 2014. 55. N. Vovchenko, E. Tishchenko, T. Epifanova and M. Gontmac her: Electronic Currency: The Potential Risks to National Secur ity and Methods to Minimize Them. European Research Studies, XX iss . 1, 36–48, 2017. 56. Nakamoto, S.: Bitcoin: A Peer-to-Peer Electronic Cash S ystem. published online on. CypherPunks mailing list , 2008. 57. Neal Koblitz, Alfred Menezes: The brave new world of boda cious assumptions in cryptography. Notices of AMS, 57, 357–365 pdfs.semanticscholar.org/0c3d/5fed9c27c9b5d6cadd43f c239029170c510e.pdf , 2010. 58. NAMCIOS: Bitcoin Adoption Surged 880 % In One Year, Emerging Markets Lead the Way, In Bit- coin Magazine, https://bitcoinmagazine.com/culture/ chainalysis-global-crypto-adoption-index 19 Aug 2021. 59. Orcutt, M.: How the North Korean hackers behind WannaCry got away with a stunning crypto-heist. MIT Technology Reviewhttps://www.technologyreview.com/2020/01/24/276082/ lazarus-group-dragonex-chainalysis/ , 2020. 60. Peter Svec, Roderik Ploszek: A Review of En- cryption Schemes Used in Modern Ransomware. web.math.pmf.unizg.hr/cecc2020/files/svec-ploszek-t alk.pdf , 2020. 61. Popper, Nathaniel: Owners of BitMEX, a Lead- ing Bitcoin Exchange, Face Criminal Charges. https://www.nytimes.com/2020/10/01/technology/ bitmex-bitcoin-criminal-charges.html , 2020. 62. Shamir,Adi: OnthesecurityofDES. Crypto’85, 280–281. Springer, 1985. 63. Siegel, D.: Understanding The DAO Attack. Coindesk https://www.coindesk.com/understanding-dao-hack-jou rnalists , 2016. 64. Treasury, Her Majesty’s and Home Office: United Kingdom Na - tional Risk Assessment of Money Laundering and Terrorist Fi nanc- ing. OGL Crown, London , 2015. 65. UK HM Treasury and Home Office: National risk as- sessment of money laundering and terrorist financing. https://www.gov.uk/government/publications/national -risk-assessment- of-money-laundering-and-terrorist-financing-2020 , 2020. 66. Y. Sakemi, T. Kobayashi, T. Saito R. Wahby Pairing-Friendly Curves. https://tools.ietf.org/id/ draft-irtf-cfrg-pairing-friendly-curves-07.html , June 2020.
{ "id": "2109.01047" }
2011.13837
A theory of transaction parallelism in blockchains
Decentralized blockchain platforms have enabled the secure exchange of crypto-assets without the intermediation of trusted authorities. To this purpose, these platforms rely on a peer-to-peer network of byzantine nodes, which collaboratively maintain an append-only ledger of transactions, called blockchain. Transactions represent the actions required by users, e.g. the transfer of some units of crypto-currency to another user, or the execution of a smart contract which distributes crypto-assets according to its internal logic. Part of the nodes of the peer-to-peer network compete to append transactions to the blockchain. To do so, they group the transactions sent by users into blocks, and update their view of the blockchain state by executing these transactions in the chosen order. Once a block of transactions is appended to the blockchain, the other nodes validate it, re-executing the transactions in the same order. The serial execution of transactions does not take advantage of the multi-core architecture of modern processors, so contributing to limit the throughput. In this paper we develop a theory of transaction parallelism for blockchains, which is based on static analysis of transactions and smart contracts. We illustrate how blockchain nodes can use our theory to parallelize the execution of transactions. Initial experiments on Ethereum show that our technique can improve the performance of nodes.
http://arxiv.org/pdf/2011.13837v4
Massimo Bartoletti, Letterio Galletta, Maurizio Murgia
cs.CR
cs.CR
Logical Methods in Computer Science Volume 17, Issue 4, 2021, pp. 10:1–10:44 https://lmcs.episciences.org/Submitted Nov. 30, 2020 Published Nov. 18, 2021 A theory of transaction parallelism in blockchains MASSIMO BARTOLETTI, LETTERIO GALLETTA, AND MAURIZIO MURGIA aUniversity of Cagliari, Italy e-mail address : bart@unica.it bIMT School for Advanced Studies, Lucca, Italy e-mail address : letterio.galletta@imtlucca.it cUniversity of Trento, Italy e-mail address : maurizio.murgia@unitn.it Abstract. Decentralized blockchain platforms have enabled the secure exchange of crypto- assets without the intermediation of trusted authorities. To this purpose, these platforms rely on a peer-to-peer network of byzantine nodes, which collaboratively maintain an append-only ledger of transactions, called blockchain . Transactions represent the actions required by users, e.g. the transfer of some units of crypto-currency to another user, or the execution of a smart contract which distributes crypto-assets according to its internal logic. Part of the nodes of the peer-to-peer network compete to append transactions to the blockchain. To do so, they group the transactions sent by users into blocks , and update their view of the blockchain state by executing these transactions in the chosen order. Once a block of transactions is appended to the blockchain, the other nodes validate it, re-executing the transactions in the same order. The serial execution of transactions does not take advantage of the multi-core architecture of modern processors, so contributing to limit the throughput. In this paper we develop a theory of transaction parallelism for blockchains, which is based on static analysis of transactions and smart contracts. We illustrate how blockchain nodes can use our theory to parallelize the execution of transactions. Initial experiments on Ethereum show that our technique can improve the performance of nodes. 1.Introduction Decentralized blockchain platforms like Bitcoin and Ethereum allow mutually untrusted users to create and exchange crypto-assets, without resorting to trusted intermediaries. These exchanges can be either simple transfers of an asset from one user to another one, or they can be the result of executing complex protocols, called smart contracts . All the actions performed by users are recorded on a public data structure, called blockchain , from which everyone can infer the amount of crypto-assets owned by each user. The disintermediation stems from the fact that maintaining the blockchain does not depend on trusted authorities: rather, this task is collaboratively performed by a peer-to-peer network, following a complex consensus protocol which guarantees the consistency of the blockchain also in the presence of (a minority of) adversaries in the network. LOGICAL METHODSl IN COMPUTER SCIENCE DOI:10.46298/LMCS-17(4:10)2021© M. Bartoletti, L. Galletta, and M. Murgia CC Creative Commons 10:2 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Users interact with the blockchain by sending transactions , which may request direct transfers of crypto-assets, or invoke smart contracts which in turn trigger transfers according to the programmed logic. The sequence of transactions on the blockchain determines, besides the balance of each user, the state of each smart contract. The nodes of the peer-to-peer network process the transactions sent by users, playing either the role of miner or that of validator . Miners group transactions into blocks, execute them serially to determine the new blockchain state, and append blocks to the blockchain. Validators read blocks, and re-execute their transactions to update their local view of the blockchain state. To do this, validators process transactions exactly in the same order in which they occur in the block, since choosing a di erent order could potentially result in inconsistencies between the nodes. Executing transactions in a purely sequential fashion is quite e ective to ensure the consistency of the blockchain state, but in the age of multi-core processors it fails to properly exploit the computational capabilities of nodes. By enabling miners and validators to concur- rently execute transactions, it would be possible to improve the eciency and the throughput of the blockchain. Although there exist a few works that address this problem (we discuss them in Section 1.3 below), their approach is eminently empirical, and they are focussed only on Ethereum. A comprehensive study of the theoretical foundations of transaction parallelism in blockchains would improve the understanding of these optimizations, and it would allow to extend them to other blockchains beyond Ethereum. 1.1.Contributions. This paper exploits techniques from concurrency theory to provide a formal backbone for parallel execution of transactions in blockchains. More speci cally, our main contributions can be summarised as follows: We introduce a general model of blockchain platforms, parameterized over the observables and the semantics of transactions (Section 2). Building upon it, we de ne the semantics of a blockchain by iterating the semantics of its transactions: this re ects the standard implementation of nodes, where transactions are evaluated in sequence, without any concurrency. We show that the two most widespread blockchain platforms, i.e. Bitcoin and Ethereum, can be expressed as an instance of this general model. We introduce two notions of swappability of transactions (Section 3). The rst one is extensional: two adjacent transactions can be swapped if this preserves the blockchain state. The second notion | strong swappability | is intensional: two adjacent transactions can be swapped is the static approximations of their read/written observables satisfy a simple condition, inspired by Bernstein's conditions for the parallel execution of processes. Basically, these conditions require that the observables written by a transaction are not read or written by the other transaction. Theorem 3.12 shows that the strong swappability relation is included in the extensional relation. Theorem 3.17 shows that, if we repeatedly exchange adjacent strongly swappable transactions, the resulting blockchain is observationally equivalent to the original one. For Bitcoin, we show that the static approximations checked by the strong swappability condition can be easily inferred by transactions: the least approximations of the written observables are the transaction inputs and outputs, while those of the read observables are the transaction inputs (Lemma 3.18). For Ethereum obtaining precise approximations is more complex, because of its Turing-complete contract language. We discuss in Section 3.2 a few tricky cases, and we report in Section 5 our experience with a novel tool to statically Vol. 17:4 A theory of transaction parallelism in blockchains 10:3 detect swappable Ethereum transactions. We further show that, for both Bitcoin and Ethereum, strong swappability is stricter then swappability (Examples 3.21 and 3.25). Building upon strong swappability, we devise a true concurrent model of transaction execution (Section 4). To this purpose, we transform a block of transactions into an occurrence net , describing exactly the partial order induced by the swappability relation. We model the concurrent executions of a blockchain in terms of the step ring sequences (i.e. nite sequences of setsof transitions) of the associated occurrence net. In Theorem 4.6 we establish that the concurrent executions are semantically equivalent to the serial one. Finally, we describe how miners and validators can use our results to parallelize transactions, exploiting their multi-core architecture (Section 5). An initial experimental validation of our technique on Ethereum, which exploits a novel static analyser of Ethereum bytecode, shows that there are margins to make it applicable in practice. 1.2.Overview of the approach: ERC-721 tokens. We illustrate the main elements of our theory by considering an archetypal Ethereum smart contract, which implements a \non-fungible token". A non-fungible token represents a digital version of real-world assets, e.g. access keys, pieces of arts, and serves as veri able proof of authenticity and ownership within a blockchain network. This kind of contracts are quite relevant: currently, token transfers involve 50% of the transactions on the Ethereum blockchain [ tok], with larger peaks due to popular contracts like Cryptokitties [You17]. We sketch the implementation of the Token contract (the full code is in the Appendix), using Solidity, the main high-level smart contract language in Ethereum. This contract follows the standard ERC-721 interface [ ESES ,FFB19 ] and de nes functions to transfer tokens between users, and to delegate their trade to other users. In Ethereum, a smart contract is similar to an object in an object-oriented language: it has an internal state, and a set of functions to manipulate it. Users and contracts are identi ed by their addresses . The state of the contract Token is de ned by the following mappings: mapping ( uint256 => address ) owner ; mapping ( uint256 => bool ) exists ; mapping ( address => uint256 ) balance ; mapping ( address => mapping ( address => bool )) operatorApprovals ; Tokens are uniquely identi ed by an integer value (of type uint256 ), while users are iden- ti ed by an address (the address 0 denotes a dummy owner). The mapping owner associates tokens to their owners' addresses, exists tells whether a token has been created or not, and balance gives the number of tokens owned by each user. The mapping operatorApprovals allows users to delegate the transfer of their tokens to third parties. The following function transferFrom transfers a token from the owner to another user: 1function transferFrom ( address from , address to , uint256 id) external { 2 require ( exists [id] && from == owner [id] && from != to && to != address (0)); 3 if( from == msg.sender || operatorApprovals [ from ][ msg.sender ]) { 4 owner [id] = to; 5 balance [ from ] -= 1; 6 balance [to] += 1; 7 } 8} 10:4 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 The require assertion at line 2rules out some undesirable cases, e.g., if the token does not exist, or it is not owned by the from user, or the user attempts to transfer the token to himself. Once all these checks are passed, the transfer succeeds if the sender of the transaction owns the token, or if he has been delegated by the owner (line 3). The mappings owner and balance are updated as expected (lines 4-6). The function setApprovalForAll delegates the transfers of all the tokens of the sender to the operator when the boolean isApproved is true, otherwise it revokes the delegation: function setApprovalForAll ( address operator , bool isApproved ) external { operatorApprovals [ msg.sender ][ operator ] = isApproved ; } Users interact with contracts by sending transactions to the blockchain. Transactions involve the execution of smart contract functions that may trigger contracts updates and transfer of crypto-currency from the caller to the callee. For example, consider a user (with address) A, which owns two tokens identi ed by the integers 1 and 2, and consider the following transactions: T1=A !Token :transferFrom (A;P;1) T2=A !Token :setApprovalForAll (B;true ) T3=B !Token :transferFrom (A;Q;2) T4=P !Token :transferFrom (P;B;1) Intuitively, transaction T1means that A(the sender) calls the function transferFrom of theToken contract to transfer the ownership of token 1 to user P. Transaction T2delegates userPto manage A's tokens. Transaction T3says that Btransfers token 2 from AtoQ; T4means that user Ptransfers token 1 to B. Since each transaction modi es the internal state of the contract Token , the order in which a miner executes them is relevant. For example, executing the sequence of transactions B=T1T2T3T4results in a state where Bowns token 1, and Qowns token 2. It is easy to see that T3can only succeed if executed after T2, because it depends on the fact that B is delegated by A, i.e. operatorApprovals [A][B] istrue . Therefore, to run in parallel the transactions of B, a miner would need to nd an execution schedule that does not a ect the resulting state. Our notion of swappability formalizes this intuition: two transactions Tand T0are swappable if they result in the same state, independently of their order (De nition 3.4). For example, consider the transactions T1andT2above: regardless of whether T1is executed before or after T2, after their execution we obtain a state where token 1 is owned by P, and Bcan act as delegate of A. Clearly, the notion of swappability outlined above is undecidable whenever the contract language is Turing-equivalent, like in the case of Ethereum. Therefore, swappability cannot be directly used by a miner to determine a parallel execution schedule. We overcome this issue by resorting to a static analysis of the smart contract. The underlying idea is to derive a syntactic approximation of swappability, called strong swappability (De nition 3.11). This captures the fact that two transactions TandT0depend and a ect di erent portions of a contract state. Thus, such transactions can be run in any order. For example, the transactions T1andT2above depend on and modify di erent parts of the state of the Token contract: therefore, they are strongly swappable. To detect if two transactions TandT0are strongly swappable (in symbols T#T0), one needs to statically over-approximate the state variables that may be read and written during Vol. 17:4 A theory of transaction parallelism in blockchains 10:5 the execution of the called functions. They are strongly swappable if the set of variables written by Tis disjoint from those written and read by T0and vice versa. This ensures that their executions are not interfering with each other. From the code of transferFrom , we see that T1updates the owner of token 1 and the balance of addresses AandP(lines 4-6). The variables read by T1areexists [1],owner [1] (line 2),operatorApprovals [A][A](line 3),balance [A](line 5), and balance [P](line 6). Transaction T2updates operatorApprovals [A][B]. Using the same reasoning for T3and T4, we obtain the following over-approximations of the state variables written/read by T1{T4 (we denote with WiandRithe variables written and read by Ti, respectively): R1=fexists [1];owner [1];balance [A];balance [P];operatorApprovals [A][A]g W1=fowner [1];balance [A];balance [P]g R2=; W2=foperatorApprovals [A][B]g R3=fexists [2];owner [2];balance [A];balance [Q];operatorApprovals [A][B]g W3=fowner [2];balance [A];balance [Q]g R4=fexists [1];owner [1];balance [P];balance [B];operatorApprovals [P][P]g W4=fowner [1];balance [P];balance [B]g By the approximations above, we have that T1#T2, because (R1[W1)\W2=;= (R2[W2)\W1. Similarly, it is straightforward to see that T2#T4andT3#T4, while the other combinations are notstrongly swappable. The strong swappability relation induces a partial order between transactions: this can be exploited by a blockchain node to choose a parallel execution schedule. To do that, from a given sequence of transactions, we build an occurrence net [BD87 ], a special kind of Petri net with no cycles and where places can hold at most 1 mark. This net encodes the partial order induced by the swappability relation and formalizes the concurrent semantics of transactions. One of our main results is that any concurrent execution in the occurrence net is equivalent to the serial one (see item (c) of Theorem 4.6). Consider again the the sequence of transactions B=T1T2T3T4above. The associated occurrence net is displayed in Figure 1. Intuitively, each transaction in Bcorresponds, in the net, to a transition (rendered as a box), linked to two places (rendered as circles). A transition can re when all its incoming places contain the mark. If two transactions are not strongly swappable, the corresponding transitions are linked through a place. In Figure 1, since T1and T3are not strongly swappable, the place between t1and t3ensures that t3 can be executed only after t1, so rendering the dependency implicitly de ned in B. The same holds for T2andT3, and for T1andT4. Instead, transitions corresponding to strongly swappable transactions can be red concurrently. In our example, this is the case for t1and t2(since T1#T2), as well as for t3andt4(since T3#T4). Although in our example we have considered the tricky case where the sender and the receiver of tokens overlap, in practice this is a marginal case: in Ethereum, the large majority of transactions in a block either involve distinct users, or invoke distinct ERC-721 interfaces.1Therefore, we expect that in practice the degree of concurrency of transferFrom transactions is higher than shown above. 1Although we are not aware of any work to support this claim, some empirical evidence can be obtained by inspecting the token-related transactions in https://etherscan.io/tokentxns , which shows that this overlapping is a rare event in practice. 10:6 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 t1t2 t3 t4 Figure 1. Occurrence net for B=T1T2T3T4of the ERC-721 token. 1.3.Related work. A few works study how to optimize the execution of transactions on Ethereum, using dynamic techniques adopted from software transactional memory. In [DGHK17 ,DGHK18 ], miners execute a set of transactions speculatively in parallel, using abstract locks and inverse logs to dynamically discover con icts and to recover from inconsistent states. The obtained execution is guaranteed to be equivalent to a serial execution of the same set of transactions. The work [ AKP+19] proposes a conceptually similar technique, but based on optimistic software transactional memory. The work [ SH20 ] studies the e ectiveness of speculatively executing smart contracts in Ethereum. After sampling past blocks of transactions (from July 2016 to December 2017), the authors replay them by using a speculative execution engine, and measure the speedup obtained by parallel execution. The results show that simple speculative strategies are enough to obtain non- negligible speed-ups. Another observation of [ SH20 ] is that many of the data con icts (i.e. concurrent read/write accesses to the same state location) arise in periods of high trac, and they are caused by a small number of popular contracts, like e.g. ERC-20 and ERC-721 tokens. The experiments in [ DGHK17 ] suggest that parallelizing transaction execution may lead to a signi cant improvement of the performance of nodes: the benchmarks on a selection of representative contracts show an overall speedup of 1.33x for miners and 1.69x for validators, using only three cores. A main di erence between these works and ours is that they study empirical aspects of transaction parallelism (e.g., the speedup obtained on a given benchmark), while ours is more focussed on the theoretical counterpart. Still, our theory is not intended to serve as a justi cation of the correctness of the above-mentioned approaches. Actually, we follow a di erent path to transaction parallelism, based on static analysis of transactions, rather than on speculative execution. The reason for this divergence lies in the fact that optimizations based on speculative execution of transactions are not fully compatible with current blockchain platforms. Indeed, since speculative execution is non-deterministic, miners need to communicate the chosen schedule of transactions to validators, which otherwise cannot correctly validate the block. This schedule must be embedded in the mined block: since current blockchains do not support this kind of block metadata, implementing in practice these approaches would require a \soft-fork" of the blockchain. Instead of performing dynamic checks, our approach relies on a static analysis to detect potential con icts. Miners can use any static analysis to execute transactions in parallel; once they have appended a block, validators just need to execute its transactions, possibly exploiting another static analysis to parallelize execution while preserving the semantics of the block. In this way, our approach is compatible with any blockchain platform, without requiring a soft-fork. Vol. 17:4 A theory of transaction parallelism in blockchains 10:7 Our approach is based on static analyses of the variables read and written by transactions. Although the literature describes various static analyses of smart contracts, most of them are focussed on nding security vulnerabilities [ MCJ18 ], and they do not produce the approximations needed for our purposes. A few papers propose static analyses of read/written variables, but they are not speci cally targeted to Ethereum bytecode contracts. The recent work [ PKS21 ] implements a static analysis that approximates the portion of a contract state a ected by the execution of a transaction. This analysis is then exploited to evaluate the parallel execution of transactions over multiple shards [LNZ+16]. Although the commutativity relation inferred by the analysis of [ PKS21 ] is similar of our swappability relation, it is not directly usable on arbitrary Ethereum contracts, since the analysis of [PKS21 ] is targeted to contracts written in the functional contract language Scilla [ SNJ+19]. Actually, the vast majority of transactions in Ethereum are sent to contracts written in Solidity (see footnote 7 in Section 5), hence this assumption could undermine the applicability of the analysis of [ PKS21 ] in the wild. The work [ DLP11 ] describes an analysis based on separation logic, and applies it to resolve con icts in the setting of snapshot isolation for transactional memory in Java. When a con ict is detected, the read/write sets are used to determine how the code can be modi ed to resolve it. The work [ CCG08 ] presents a static analysis of read and written locations in a C-like language with atomic sections, and uses it to translate atomic sections into standard lock operations. Designing precise static analyses for Solidity could perhaps take inspiration from these works. In the permissioned setting, Hyperledger Fabric [ ABB+18] natively supports transaction parallelism. It follows the \execute rst and then order" paradigm: transactions are executed speculatively, and then their ordering is checked for correctness [ Fab]. In this paradigm, appending a transaction requires a few steps. First, a client proposes a transaction to a set of \endorsing" peers, which simulate the transaction without updating the blockchain. The output of the simulation includes the state updates of the transaction execution, and the sets of read/written keys. These sets are then signed by the endorsing peers, and returned to the client, which submits them to the \ordering" peers. Ordering peers group transactions into blocks, and send them to the \committing" peers, which validate them. A block T1Tnis valid when the keys read by transaction Tiare not written by a transaction Tjwithj <i . Finally, validated blocks are appended to the blockchain. A preliminary version of this work was presented at COORDINATION 2020 [ BGM20 ]. The current version substantially extends it, generalising the theory to arbitrary blockchain platforms (while [ BGM20 ] is focussed only on Ethereum). Besides making it possible to extend our results to blockchains beyond Ethereum, this generalization has allowed us to re ne some of our results to UTXO-based blockchains like Bitcoin. The current work also contains the complete technical machinery, including proofs, of our theory, and the experimental validation of our optimization technique on Ethereum. 2.An abstract model of blockchains In this section we introduce a general model of blockchain platforms, abstracting from the actual form of transactions, from the language to write smart contracts, and from the fact that transactions are grouped into blocks. We then show how to instantiate this model to the two most widespread blockchain platforms, i.e. Bitcoin and Ethereum. De nition 2.1 (Blockchain platform) .Ablockchain platform is a tuple (T;O;V;;0;JK), where: 10:8 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Tis a set of transactions (ranged over by T;T0;:::); Ois a set of observables (ranged over by p;q;::: ); Vis a set of values (ranged over by v;v0;:::); O*Vis a set of valid blockchain states (ranged over by ;0;:::); 02is the initial state ; JK2T!is the state transition function (we write JTKfor J(;T)K). The set of all nite sequences of transactions is denoted by T, and the empty sequence is denoted by ". The set Twith the concatenation operator and the neutral element " is a monoid, referred to as the free monoid over T. A blockchain Bis an element of T. The semantics of a blockchain Bstarting from a state , denoted as JBK, is obtained by iterating the semantics of its transactions: J"K= JTBK=JBK0where0=JTK We write JBKfor JBK0, where0is the initial state. We say that a blockchain state is reachable if=JBKfor some B. Astate update :O*Vis a function which de nes how values associated with observables are modi ed. We denote with fv=pgthe state update which maps the observable pto the value v. Given a blockchain state and a state update , applyingtoresults in a blockchain state such that, for all observables p: ()p=( p ifp2dom p otherwise We useP;Q;::: to range over sets of observables. 2.1.Bitcoin. Bitcoin [ Nak08 ] is the rst crypto-currency based on a decentralized ledger. Its mechanism to transfer currency (the bitcoin, B) is based on the Unspent Transaction Output (UTXO ) model. This means that each transaction spends the outputs generated by one or more previous transactions, and it creates new outputs, that can be spent by later transactions according to programmable redeem conditions. This model contrasts with the so-called account-based model, implemented, e.g., by Ethereum, where transactions update a global state, recording the amount of crypto-currency in each account, and updating the state of smart contracts. By contrast, in Bitcoin the state is given by the unspent transactions outputs, which represent either Bdeposits redeemable by users or the state of smart contracts [ ABC+18]. Although the language for specifying redeem conditions is quite basic, complex smart contracts can be crafted by suitably chaining transactions [BZ18]. We now formalise the basic functionality of Bitcoin within our general blockchain model, simplifying or omitting the parts that are irrelevant for our subsequent technical development. Transactions. Bitcoin transactions are records with the following elds: outis the list of outputs . Each output is a record of the form fscr:e;val:vg, where e is ascript , andv0 is the amount of bitcoins stored in the output. Intuitively, a later transaction can spend the bitcoins stored in a transaction output by providing a witness which satis es its script. inis the list of inputs . Each input is a pair ( T;i), meaning that the transaction wants to spend thei-th output of the transaction T; Vol. 17:4 A theory of transaction parallelism in blockchains 10:9 witis the list of witnesses , of the same length as in. Intuitively, if the j-th input is ( T;i), then thej-th witness must make the i-th script of Tevaluate to true.2 We let frange over transaction elds, and we denote with T:fthe content of eld fof transaction T. We write T:f(i) for thei-th element of the sequence T:f, when in range. We interchangeably use the notation ( T;i) and T:out(i) for transaction outputs . We use A;B;::: to range over users, and, we just write the name Aof a user in place of her public/private keys, e.g. we write versig (A;e) for versig (pkA;e), and sigA(T) for sigskA(T). Bitcoin scripts are small programs written in a non-Turing equivalent language. Follow- ing [ABLZ18], we model them as terms with the following syntax: e::=v constant (integer or bitstring) jee operators (2f +;;=;<g) jifethen eelsee conditional je:n n -th element of sequence e(n2N) jrtx:wit witnesses of the redeeming tx jjej size (number of bytes) jH(e) hash jversig (e;e0) signature veri cation Besides constants v, basic arithmetic/logical operators, and conditionals, scripts can access the elements of a sequence ( e:n), and the sequence of witnesses of the redeeming transaction ( rtx:wit); further, they can compute the size jejof a bitstring and its hash H(e). The script versig (e;e0) evaluates to 1 if the signature resulting from the evaluation of e0is veri ed against the public key resulting from the evaluation of e, and 0 otherwise. For all signatures, the signed message is the redeeming transaction (except its witnesses). The evaluation of scripts is de ned as a function JKT;i, which takes two additional parameters (used for signature veri cation): the redeeming transaction T, and the index i of the redeeming input/witness. The result of the semantics can be an integer or a bitstring. The rules of the semantics are standard: we refer to [ABLZ18] for a formalization. Example 2.2. Consider a transaction of the form: T0 in(1):" wit(1):" out(1):fscr:versig (A;rtx:wit);val: 80Bg out(2):fscr:versig (B;rtx:wit);val: 20Bg The inand wit elds are empty, making T0acoinbase transaction (i.e., the rst transaction in the blockchain). This transaction has two outputs: ( T0;1) allows Ato redeem 80B, while ( T0;2) allows Bto redeem 20 B. Assume that ( T0;1) is unspent, and that A 2Bitcoin transactions can also impose time constraints on when they can be appended to the blockchain, or when they can be spent. Since our theory is applied to parallelize transactions within the same block, hence satisfying exactly the same time constraints, we omit them. 10:10 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 wants to transfer 10 BtoB, and keep the remaining 70 B. To do this, Acan append to the blockchain a new transaction, e.g.: T1 in(1): ( T0;1) wit(1): sigA(T1) out(1):fscr:versig (A;rtx:wit);val: 70Bg out(2):fscr:versig (B;rtx:wit);val: 10Bg The in eld points to the rst output of T0, and the wit eld contains A's signature on T1(but for the wit eld itself). This witness makes the script ( T0;1):screvaluate to true, hence the redemption succeeds, and the output ( T0;1) is spent . Assume now that the outputs ( T0;2) and ( T1;2) are unspent. Participant Bcan spend both of them by appending a new transaction T2to the blockchain: T2 in(1): ( T0;2) in(2): ( T1;2) wit(1): sigB(T2) wit(2): sigB(T2) out(1):fscr:H(rtx:wit) = 51;val: 30Bg In this case, the recipient of the 30 Bis not explicitly speci ed by the script ( T2;1):scr: actually, any transaction which provides as witness a preimage of 51 can spend that output. Blockchain states. We de ne observables as transaction outputs ( T;i), and the set of values as V=f0;1g. In this way, blockchain states are partial functions 2O*f0;1g, modelling the set of unspent transaction outputs (UTXO ). We denote with Uthe set whose characteristic function is , i.e.U=1f1g. Hereafter, when not ambiguous we treat T:in as a set, rather than as a sequence, and we write T:outfor the set of pairs f(T;1);:::; (T;n)g, wheren=jT:outj. The initial blockchain state is the UTXO fT0:outg, where T0is a coinbase transaction (i.e., T0:in="). State transitions. We start by de ning when a transaction is valid in a blockchain state. De nition 2.3 (Valid Bitcoin transactions) .We say that a transaction Tisvalid in a blockchain state (in symbols, BT) when the following conditions hold: (1) ( T0;j)2U, for each ( T0;j) inT:in (2) J(T0;j):scrKT;i=v6= 0, for each ( T0;j) inT:in (3)P p2T:inp:valP q2T:outq:val We say that Tisconsistent when there exists some such thatBT. Condition (1)requires that all the inputs of Tare unspent in ; condition (2)asks that all the scripts referred to by T:inevaluate to true, using the witnesses in T:wit; condition (3) asks that the value of the inputs of Tis greater or equal to the value of its outputs. We now de ne the state transition function of Bitcoin as JTK=0, where: U0=( (UnT:in)[T:out ifBT U otherwise Vol. 17:4 A theory of transaction parallelism in blockchains 10:11 We extend validity to blockchains by passing through their semantics, i.e. we write BBT when JBKBT. Further, we write BT1Tni JT1Ti1KBTi, for allin.3 Example 2.4. Recall the transactions T0,T1,T2from Example 2.2, and let U0=fT0:outg. We have that 0BT1T2, and JT1T2K0is the UTXOf(T1;1);(T2;1)g. 2.2.Ethereum. Ethereum [ But13 ] is one of the most used platforms for smart contracts: it actually implements a decentralized virtual machine that runs contracts written in a Turing-complete bytecode language, called EVM [ Eth21 ]. Abstractly, an Ethereum contract is similar to an object in an object-oriented language: it has an internal state, and a set of functions to manipulate it. Each contract controls an amount of crypto-currency (the ether ), that it can exchange with other users and contracts. Transactions trigger contracts updates, which may possibly involve a transfer of crypto-currency from the caller to the callee. Users and contracts are identi ed by their addresses . We use C;D;:::to range over contract addresses, and f;g;:::for contract functions. We denote with Addr the set of all addresses X;Y;:::, including both user and contract addresses. Transactions. Ethereum transactions are terms of the form: An !X:f(v) where Ais the address of the caller, Xis the address of the called contract or user, fis the called function, nis the amount of ether transferred from AtoX, andvis the sequence of actual parameters. A contract has a nite set of functions, i.e. terms of the form f(x)fSg, where fis a function name, xis the sequence of formal parameters (omitted when empty), and Sis the function body. The functions in a contract have distinct names. We denote with ( X) the contract at address X. We abstract from the actual syntax of S, and we just assume that the semantics of function bodies is de ned (see e.g. [ BGM19 ,CPZ19 ,JKL+20] for concrete instances of syntax and semantics of function bodies). For uniformity, we assume that user addresses are associated with a contract having exactly one function, which just skips. In this way, the statement A:transfer (n), which transfers ncurrency units to user A, can be rendered as a call to this function. Blockchain states. Each Ethereum contract has a key-value store, rendered as a partial functionV*Vfrom values to values. The elements in the domain of this function are also called keys. The set of values Vincludes basic types, e.g. integers and strings. An observable is a term of the form X:k, i.e. a key in the key-value store at a given address. The possible blockchain states are the partial functions 2O*Vsuch that: for all addresses X,X:balance is de ned; for all user addresses A,A:kis de ned i k=balance . The second constraint allows for a uniform treatment of users and contracts. The initial state0maps each address Xto a balance n0 X0, while all the other keys are unbound. 3The Bitcoin consensus protocol ensures that each transaction Tiin the blockchain is valid with respect to the sequence of past transactions T0Ti1. Since our model requires the state transition function to be total, we make the operation of appending invalid transactions idempotent. 10:12 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 State transitions. LetConst be a set of constant names x;y;::: . We denote with JSKX ; the semantics of the statement S. This semantics is either a blockchain state 0, or it is unde ned (denoted by ?). The semantics is parameterised over a state , an address X (the contract wherein Sis evaluated), and an environment :Const*V, used to evaluate the formal parameters and the special names sender and value . These names represent, respectively, the caller of the function, and the amount of ether transferred along with the call. We postulate that sender andvalue are not used as formal parameters. We de ne the auxiliary operators + and on blockchain states as follows: (X:n) =f(X:balance )n=X:balanceg (2f +;g) i.e.,+X:nupdatesby increasing the balance ofXofncurrency units. De nition 2.5 (Valid Ethereum transactions) .A transaction T=An !X:f(v) isvalid in a blockchain state (in symbols, BT) when the following conditions hold: (1)A:balancen (2) if f(x)fSg2(X), then JSKX A:n+X:n;fA=sender;n=value;v=xg6=? We say that Tisconsistent when there exists such thatBT. Condition (1)requires that A's balance is sucient to transfer nether toX; condition (2) asks that the function call terminates in a non-error state. We de ne the semantics of a transaction in a blockchain state as follows: JAn !X:f(v)K=( JSKX A:n+X:n;fA=sender;n=value;v=xgifBTandf(x)fSg2(X)  otherwise If the transaction is valid, the updated state is the one resulting from the execution of the function call. Note that nunits of currency are transferred to Xbefore starting to execute f, and that the names sender andvalue are bound, respectively, to Aandn. If the transaction is not valid, i.e. A's balance is not enough or the execution of ffails, then the transaction does not alter the blockchain state. Invalid transactions can actually occur in the Ethereum blockchain, but they have no e ect on the state of contracts: so, our semantics makes them identities w.r.t. the append operation. Example 2.6. Consider a contract at address Cwhich includes the following functions: f0()fx:=1g f1()fifx= 0thenB:transfer (1)g f2(y)fy:transfer (value )g The rst function only sets the value of the key xto 1; the second one transfers a unit of ether to address Bwhenxis 0; the last one always sends a unit of ether toy. Consider a blockchain B=T0T1T2where: T0=A0 !C:f0() T1=A1 !C:f1() T2=A1 !C:f2(B) Let0be a state such that 0A:balance2. The semantics of Bin0is: JBK0=0f1=C:xgA: 2 +B: 1 +C: 1 where the semantics of the single transactions is: JT0K0=Jx:=1 KC 0;fA=sender;0=valueg=0f1=C:xg=1 JT1K1=Jifx= 0thenB:transfer (1)KC 1A:1+C:1;fA=sender;1=valueg=1A: 1 +C: 1 =2 JT2K2=Jy:transfer (1)KC 2A:1+C:1;fB=y;A=sender;1=valueg=2A: 1 +B: 1 Vol. 17:4 A theory of transaction parallelism in blockchains 10:13 3.Swapping transactions We de ne two blockchain states to be observationally equivalent when they agree on the values associated to all observables. The actual de nition of equivalence is a bit more general, allowing us to restrict the set Pof observables over which we require the agreement. De nition 3.1 (Observational equivalence) .For allPO, we de ne P0i 8p2P: p=0p. We say that and0areobservationally equivalent , in symbols 0, when P0holds for all P. The following lemma ensures that our notion of observational equivalence is an equiva- lence relation, and that it is preserved when we restrict the set of observables: Lemma 3.2. For allP;QO: (i)Pis an equivalence relation; (ii) if P0and QP, thenQ0; (iii)=O. We extend the relations above to blockchains, by passing through their semantics. For allP, we de ne BPB0i JBKPJB0Kholds for all reachable (note that all the de nitions and results in this paper apply to reachable states, since the unreachable ones do not represent actual blockchain executions). We write BB0when BPB0holds for all P. A relation RTTis a is a congruence (with respect to concatenation) if: BRB0=) 8B0;B1:B0BB1RB0B0B1 The following lemma states that is a congruence: therefore, if BandB0are observationally equivalent, then we can replace Bwith B0in a larger blockchain, preserving its semantics. Lemma 3.3.is a congruence relation. We say that two transactions are swappable when exchanging their order preserves observational equivalence. De nition 3.4 (Swappability) .We say that two transactions T6=T0areswappable , in symbols TT0, when TT0T0T. The theory of trace languages originated from Mazurkiewicz's works [ Maz88 ] allows us to study observational equivalence under various swappability relations. In general, given an alphabet  and a symmetric and irre exive relation I (which models independence between two elements in ), the Mazurkiewicz's trace equivalence 'Iis a congruence between words on . Intuitively, all the words in the same equivalence class of 'Irepresent equivalent concurrent executions. In our setting,  is the set of transactions, and Iwill be instantiated with various swappability relations. The fact that 'Iis a congruence will allow us to replace a sequence of transactions with an equivalent one within a blockchain. De nition 3.5 (Mazurkiewicz equivalence) .LetIbe a symmetric and irre exive relation onT. The Mazurkiewicz equivalence 'Iis the least congruence in the free monoid Tsuch that:8T;T02T:TIT0=)TT0'IT0T. To exemplify De nition 3.5, let I=f(T1;T2);(T2;T1)g. The equivalence class of the word T0T1T1T2T0under the relation 'IisfT0T1T1T2T0;T0T1T2T1T0;T0T2T1T1T0g. Note that, starting from the word T0T1T1T2T0, the other words in its equivalence class can be obtained by swapping adjacent occurrences of T1andT2. This re ects the fact that T1 andT2are assumed to be concurrent, as they are related by I. 10:14 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Intuitively, all the words in the same equivalence class (with respect to 'I) represent equivalent executions. This is made formal by Theorem 3.6 below, which ensures that the Mazurkiewicz equivalence constructed on the swappability relation is an observational equivalence. Hence, we can transform a blockchain into an observationally equivalent one by a nite number of swaps of adjacent swappable transactions. Theorem 3.6.'  . Note that the converse of Theorem 3.6 does not hold: indeed, B'B0requires that BandB0have the same length, while BB0may also hold for blockchains of di erent lengths (e.g., B0=BTwhere Tis a transaction which does not alter the state). Safe approximations of read/written observables. The relationis undecidable whenever the contract language is Turing-equivalent, e.g., in the case of Ethereum. When is undecidable, to detect swappable transactions we can follow a static approach. First, we over-approximate the set of observables read and written by transactions (De nition 3.7). We then check a simple condition on these approximations (De nition 3.14) to detect if two transactions can be swapped. Of course, the quality of the approximation is crucial to the e ectiveness of the approach. In general, the coarser the approximation, the stricter the induced swappability relation: therefore, an overly coarse approximation would undermine the parallelization of transactions. In De nition 3.7 we state that Psafely approximates the observables written byT(in symbols,Pj=wT) when executing Tdoes not alter the state of the observables not in P. De ning the set of read observables is a bit trickier: we require that executing Tin two states that agree on the values of the observables in the read set results in two states that di er at most on the observables where they did not agree before the execution of T. De nition 3.7 (Safe approximation of read/written observables) .Given a set of observables Pand a transaction T, we de ne: Pj=wT i 8Q:Q\P=;=)TQ" Pj=rT i 8B;B0;Q:BPB0^BQB0=)BTQB0T Example 3.8. Recall from Example 2.6 the Ethereum transaction: T2=A1 !C:f2(B) where f2(y)fy:transfer (1)g The execution of T2a ects the balance ofA,BandC; however, C:balance is rst incre- mented and then decremented, so its value is unchanged. Then, fA:balance;B:balancegis a safe approximation of the observables written byT2, i.e.fA:balance;B:balancegj=wT2. A safe approximation of the observables read byT2isP=fA:balanceg. To prove this, consider two blockchains BandB0, and a set of observables Qsuch that BPB0and BQB0. We have two cases: IfJBKA:balance<1, then T2is not valid in B, and so JBT2K=JBK. Since BPB0, then JB0KA:balance<1, so T2is not valid also in B0, from which we have JB0T2K=JB0K. IfJBKA:balance =n1, then T2is valid in B, and T2a ects exactly A:balance and B:balance , as it transfers 1 ether fromAtoB. Since BQB0, the states of BT2and Vol. 17:4 A theory of transaction parallelism in blockchains 10:15 B0T2may only di er on A:balance orB:balance . However: JB0T2KA:balance =n1 = JBT2KA:balance JB0T2KB:balance =JB0KB:balance + 1 = JBKB:balance + 1 = JBT2KB:balance Therefore, in both cases BT2QB0T2, and so we have proved that fA:balancegj=rT2. Widening a safe approximation (either of read or written observables) preserves its safety; further, the intersection of two write approximations is still safe. From this, it follows that there exists a least safe approximation of the observables written by a transaction. Lemma 3.9. Let2fr;wg. Then: (a)ifPj=TandPP0, thenP0j=T; (b)ifPj=wTandQj=wT, thenP\Qj=wT. The following example shows that, in general, part (b) of Lemma 3.9 does not hold for read approximations. Example 3.10. LetCbe an Ethereum contract with functions: f(x)fk:=x;k0:=xg g()fifk6=AthenB:transfer (balance )else skipg and let T=A0 !C:g(). Note that, in any reachable state , it must be C:k=C:k0. LetQbe such that BQB0, and let=JBK,0=JB0K, letn=C:balance , and let n0=0C:balance . Appending TtoBandB0will result in: JTK=( C:n+B:nifC:k6=A  otherwiseJTK0=( 0C:n0+B:n0if0C:k6=A 0otherwise IfBfC:kgB0, then the conditions C:k6=Aand0C:k6=Aare equivalent. Therefore, JBTK=JTKQJTK0=JB0TK, and so we have proved that fC:kgj=rT. Similarly, we obtain thatfC:k0gj=rT, sincekandk0are always bound to the same value. Note however thatfC:kg\fC:k0g=;isnota safe approximation of the observables read by T. For instance, if C:k=A6=0C:k0andC:balance =0C:balance , then appending TtoB or to B0results in states which di er in the balance of C. Strong swappability. We use safe approximations of read/written observables to detect when two transactions are swappable, recasting in our setting Bernstein's conditions [ Ber66 ] for the parallel execution of processes. More speci cally, we require that the set of observables written by Tis disjoint from those written or read by T0, and vice versa. When this happens, we say that the two transactions are strongly swappable . De nition 3.11 (Strong swappability) .We say that two transactions T6=T0arestrongly swappable , in symbols T#T0, when there exist W;W0;R;R0Osuch thatWj=wT, W0j=wT0,Rj=rT,R0j=rT0, and: R[W \W0=;= R0[W0 \W The following theorem ensures the soundness of our approximation: if two transactions are strongly swappable, then they are also swappable. Since its proof depends on notions that have yet to be de ned, we postpone it at the end of the section. The converse implication does not hold neither in Bitcoin nor in Ethereum, as shown by Examples 3.21 and 3.25. 10:16 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Theorem 3.12. T#T0=)TT0. Theorem 3.13 states that the Mazurkiewicz equivalence '#is stricter than'. Together with Theorem 3.6, if Bis transformed into B0by exchanging adjacent strongly swappable transactions, then BandB0are observationally equivalent. Theorem 3.13. '#'. Parameterised strong swappability. Note that if the contract language is Turing- equivalent, then nding approximations which satisfy the disjointness condition in De ni- tion 3.11 is not computable, and so the relation # is undecidable. This is because strong swappability abstracts from the actual static analysis used to compute the safe approxima- tions: it just assumes that these approximations exist. De nition 3.14 below parameterises strong swappability over a static analysis, which we render as a function from transactions to sets of observables. Formally, Wis astatic analysis of written observables when W(T)j=wT, for all T; similarly, Ris astatic analysis of read observables when R(T)j=rT, for all T. De nition 3.14 (Parameterised strong swappability) .LetWand Rbe static analyses of written/read observables. We say that two transactions T6=T0arestrongly swappable w.r.t. WandR, in symbols T#W RT0, if: R(T)[W(T) \W(T0) =;= R(T0)[W(T0) \W(T) By the de nition, it directly follows that T#W RT0implies that T#T0. Further, if WandR are computable, then #W Ris decidable. Later on, we will show that the relations #W Rand # are equivalent in Bitcoin (Theorem 3.22). Lemma 3.15. T#W RT0=)TT0W(T)T0T Proof. By De nition 3.14, W(T)\W(T0) =;and R(T)\W(T0) =;. Since W(T0)j=wT0, by De nition 3.7 we have T0W(T)"andT0R(T)". SinceW(T)is a congruence, TT0W(T)T. Since R(T)j=rT,T0R(T)"and T0W(T)", by De nition 3.7 we have T0TW(T)T. By simmetry and transitivity of (Lemma 3.2), we conclude TT0W(T)T0T. The following lemma states that the relation #W Ris a sound approximation of swappability. Lemma 3.16. T#W RT0=)TT0 Proof. By applying Lemma 3.15 twice, we obtain TT0W(T)T0Tand T0TW(T0)TT0. Let P=On(W(T)[W(T0)). SinceP\W(T) =;=P\W(T0), by applying De nition 3.7 twice we obtain"PTand"PT0. SincePis a congruence, TT0PT0T. Summing up: TT0P[(W(T)[W(T0))T0T from which we obtain the thesis, since P[(W(T)[W(T0)) =OandO=. Note that if T#T0, then there exist WandRsuch that T#W RT0. Then, from Lemma 3.16 it follows that TandT0are swappable. This proves Theorem 3.12, from which in turns we obtain Theorem 3.13. Putting it all together, we have proved the inclusions: Theorem 3.17. '#W R ' # '. Vol. 17:4 A theory of transaction parallelism in blockchains 10:17 3.1.Swapping transactions in Bitcoin. By instantiating our general blockchain model to Bitcoin, we can re ne some of the swappability results presented before. In particular, in Bitcoin we can easily construct safe approximations of the observables read/written by a transaction, by just considering their inputs and outputs (Lemma 3.18). Further, while strong swappability is stricter than swappability (Example 3.21), strong and parameterized strong swappability coincide in Bitcoin (Theorem 3.22). The following lemma provides the least safe approximations of the observables read and written by consistent transactions. For inconsistent transactions, these approximations are just the empty set (Lemma 3.19). Intuitively, the observables written by Tcan be approximated as T:in[T:out, because Tspends all the transaction outputs in T:in, and creates the transaction outputs in T:out. Instead, the read observables can be approximated asT:in, since by De nition 2.3, executing Tfrom two states which agree on T:inleads to two states which only di er on the observables for which they di ered before. Lemma 3.18. LetTbe a consistent Bitcoin transaction, and let: W=T:in[T:out R=T:in Then,W(resp.R) is the least safe approximation of written (resp. read) observables. Proof. We rst show that WandRare safe approximations of written / read observables, and then that they are the least ones. Wis a safe approximation of written observables. LetQbe such that Q\(T:in[T:out) =;. For all blockchain states , we have that J"K=, and: JTK=0whereU0=( (UnT:in)[T:out ifBT U otherwise SinceQand T:in[T:outare disjoint, we have that Q0. Therefore, TQ". By De nition 3.7, it follows that T:in[T:outj=wT. Ris a safe approximation of read observables. Assume that B0T:inB1. Then, Tis valid inB0i it is valid in B1. LetQbe such that B0QB1, let0=JB0Kand1=JB1K. Fori2f0;1g, we have that: JTKi=0 i whereU0 i=( (UinT:in)[T:out ifiBT Ui otherwise Since0Q1, it follows that 0 0Q0 1, and therefore B0TQB1T. By De nition 3.7, it follows that T:inj=rT. Wis the least safe approximation of written observables. By contradiction, let W0(W be such that W0j=wT, and letR0(Rbe such that R0j=rT. Letp2WnW0. Since fpg\W0=;andW0j=wT, then Tfpg". Since Tis consistent, there exists such thatBT. Then, JTK=0, whereU0= (UnT:in)[T:out. Sincep2T:in[T:out, it follows that 0p6=p, and so T6fpg"| contradiction. Therefore, Wis the least approximation of the observables written by T. Ris the least safe approximation of read observables. LetQ=T:out. Since Tis consistent, there exists a reachable 0such that0BT. Since0is reachable, there exists B0such that JB0K=0. Let B=B0T0, where T0spendsRnR0. Then, BR0B0andBQB0. Since R0j=rT, it must be BTQB0T. Since in Bsome of the inputs needed by Thave been spent, we have that Tis not valid in B, and so JBTK=JBK. On the other hand, since Tis valid in B0, then JB0TK=00, whereU00= (U0nT:in)[T:out. SinceQ=T:outbelongs 10:18 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 toJB0TKbut not to JBTK, it follows that BT6QB0T| contradiction. Therefore, Ris the least approximation of the observables read by T. Lemma 3.19. Tis inconsistent if and only if ;j=wTand;j=rT. Proof. For the \only if" part, assume that Tis inconsistent. For j=w, for allwe have that JTK==J"K. Therefore, for all Qe have TQ", from which it follow that ;j=wT. For allj=r, for all B,B0andQwe have that if BQB0then BTQB0T. Therefore, ;j=rT. For the \if" part, assume that ;j=wT. Then, for all Qit must be TQ", i.e. T". By de nition of this implies that, for all ,JTK=J"K=. Therefore, Tis not valid in any blockchain state , and so Tis inconsistent. By exploiting the results above, we can provide an alternative sucient condition for (strong) swappability. If Tis valid in some state where it is also possible to append another transaction T0before T(i.e., T0Tis valid in that state), then TandT0are strongly swappable. This is a peculiar property of UTXO-based blockchains like Bitcoin: in Example 3.26 we show that this is not the case for Ethereum. Lemma 3.20. In Bitcoin, if there exists such thatBTandBT0T, then T#T0. Proof. Letbe such that BTandBT0T. Then, by condition (1) of De nition 2.3: T0:in\T:out =T:in\T0:out =T:in\T0:in=T:out\T0:out =; (3.1) By Lemma 3.18, T:in[T:outandT:inare safe approximations of written/read observables. By (3.1), these approximations satisfy the condition of De nition 3.11, and so T#T0. The following example shows that the converse of Theorem 3.12 does not hold in Bitcoin, i.e. there exist transactions which are swappable but not strongly swappable. Example 3.21 (Swappable transactions, but not strongly) .Consider the transactions in Figure 2, where the scripts and currency values are immaterial (we just assume that condition (2)of De nition 2.3 is satis ed for each matching input/output pair). We show that T1and T3are swappable. Let be a blockchain state. If T1is not valid in , then JT1T3K=JT1T3Kholds trivially, since also T3is not valid. Otherwise, if BT1: JT1T3K=JT3K0 whereU0= (UnT1:in)[f(T1;1);(T1;2)g =0since06BT3, as ( T2;1)62U0 JT3T1K=JT1K since6BT3, as ( T1;1)62U =0whereU0= (UnT1:in)[f(T1;1);(T1;2)g Therefore, T1andT3are swappable. We now show that they are not strongly swappable. Assume that T1is consistent. Then, by Lemma 3.18 it follows that W1=T1:in[T1:out is the least safe approximation of the observables written by T1. Letbe such that T1 is valid in . Then, T3is valid in JT1T2K, and so by Lemma 3.18 is also follows that W3=T3:in[T3:outis the least safe approximation of the observables written by T3. Since (T1;1)2W1\W3, then T1andT3are not strongly swappable. Finally, we prove that strong and parameterized strong swappability coincide in Bitcoin. Theorem 3.22. LetT,T0be consistent Bitcoin transactions. If T#T0, then T#W RT0, using the static analyses W(T) =T:in[T:outandR(T) =T:in. Vol. 17:4 A theory of transaction parallelism in blockchains 10:19 T1 in(1) : out(1) : out(2) :T2 in(1): ( T1;2) out(1): T3 in(1): ( T1;1) in(2): ( T2;1) out(1): Figure 2. Transactions T1andT3are swappable but not strongly swappable. Proof. Since T#T0, then there exist safe approximations Wj=wT,W0j=wT0,Rj=rT, and R0j=rT0such that R[W \W0=;= R0[W0 \W. Since Tand T0are consistent, then by Lemma 3.18 the static analyses W(T) =T:in[T:outandR(T) =T:ingive their least safe approximation of written/read observables. Then, W(T)W,W(T0)W0,R(T)R, and R(T0)R0. Then, the disjointess condition required by De nition 3.14 holds for the static analyses, and so T#W RT0. 3.2.Swapping transactions in Ethereum. We now illustrate our notions of swappability in Ethereum through a series of examples. We postpone to Section 5 a discussion on how to approximate the observables read/written by Ethereum contracts, so to compute the parameterized strong swappability relation. Example 3.23 (Swappability) .Recall the contract Cand the blockchain B=T0T1T2from Example 2.6. By De nition 3.4, we have that: T0T2(see Figure 3, top left). Indeed, regardless of whether T0is appended to the blockchain before or after T2, after their execution we obtain the same state: 0f1=C:xg, whenA:balance1, andf1=C:xgotherwise. T16T2(see Figure 3, top right). Let be such that C:x6= 0 andA:balance = 1. If we append T1before T2we obtain the state 0=A: 1 +C: 1 and in this state T2is idempotent. Instead, the result of executing T2before T1is the state 00=A: 1+B: 1 and in this state T1is idempotent. Therefore, T16T2. T06T1(see Figure 3, bottom). Depending on how we append T0andT1we obtain two di erent states. Let be such that C:x= 0 andA:balance1. If we append T1 before T0we obtain the state 0f1=C:xg. Instead, if we append T0and then T1we obtain the statef1=C:xgA: 1 +C: 1. Example 3.24 (Strong swappability) .LetCbe the contract of Example 2.6, and let f3()fskipgbe a function of a contract D. Then, consider the following transactions: T3=A1 !D:f3() T4=B1 !C:f2(F) where A,B, andFare account addresses. Intuitively, T3#T4because they are operating on observables of di erent addresses. Formally, consider the following safe approximations of the written/read observables of T3andT4: W3=fA:balance;D:balancegj=wT3R3=fA:balancegj=rT3 W4=fB:balance;F:balancegj=wT4R4=fB:balancegj=rT4 10:20 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 0=A: 1 +B: 1  f1=C:xg 0f1=C:xg  f1=C:xgT 0 T0 Abalance1T2 T2 Abalance <1Abalance1T2 Abalance <1T2 T0 (a)Proof of T0T2.0=A: 1 +C: 1 Cx6= 0 Abalance = 1 00=A: 1 +B: 1T2 T1 T2 T1 (b)Proof of T16T2. 0=A: 1 +B: 1 0f1=C:xg Cx= 0 Abalance1 f1=C:xg f1=C:xgA: 1 +C: 1T0=T1 T0 T1 (c)Proof of T06T1. Figure 3. Proofs for T0T2andT06T1. A transition Tfromcan be taken only if the guard below the arrow is satis ed in . Since (W3[R3)\W4=;= (W4[R4)\W3, the two transactions are strongly swappable. Now, consider the following transaction that calls the function f2with the address A: T5=B1 !C:f2(A) This transaction transfers 1 currency unit from BtoA. Intuitively, since T5touches A:balance , then it should not be swappable with T3and T4. Formally, consider the following safe approximations W5andR5: W5=fB:balance;A:balancegj=wT5R5=fB:balancegj=rT5 SinceW3\W56=;6=W4\W5, then:(T3#T5) and:(T4#T5). The following example shows that the converse of Theorem 3.12 does not hold, i.e. there may exist transactions that are swappable but not strongly swappable. This is because of static analyses could produce false negatives. Example 3.25 (Swappable transactions, but not strongly) .Consider the following functions of a contract C1, and the following transactions sent by users AandB: h1()fif sender =A&&k1= 0thenk1:=1else throwg T1=A1 !C1:h1() h2()fif sender =B&&k2= 0thenk2:=1else throwg T2=B1 !C1:h2() We have that T1andT2are swappable. To see why, consider the following two cases: (1)a statewhereA:balance>1,B:balance>1,C1:balance =n,C1:k1= 0 and C1:k2= 0. Init holds that: JT1T2K=f1=C1:k1;1=C1:k2;n+2=C1:balanceg=JT2T1K Vol. 17:4 A theory of transaction parallelism in blockchains 10:21 (2)a statesuch thatA:balance<1, orB:balance<1, orC1:k16= 0, orC1:k26= 0. Since it is not possible that the guards of h1andh2are both true, one of T1orT2raises an exception, leaving the state una ected. Then, also in this case we have that JT1T2K=JT2T1K However, T1andT2arenotstrongly swappable. Intuitively, this is because there exist reachable states ;0such thatC1k1= 0 =0C1k2. Formally, consider the following sets W1=fA:balance;C1:balance;C1:k1gW2=fB:balance;C1:balance;C1:k2g which are the least safe over-approximations of the written observables by T1and by T2, respectively. This means that every safe approximation of T1must include the observables ofW1, and similarly for the set W2. SinceW1\W26=;, then T1#T2does not hold. The following example shows that Lemma 3.20, which is speci c to Bitcoin and UTXO- based blockchains, does not hold on Ethereum. Example 3.26. Recall the functions f0()fx:=1gand f1()fifx= 0thenB:transfer (1)g from Example 2.6, and consider the following transactions: T1=A1 !C:f1() T5=A1 !C:f0() Letbe a state such that C:x= 0 andA:balance2. We have that BT1, and so JT1K=A: 1 +B: 1. Further, BT5T1andBT1T5. Then: 5;1=JT5T1K=f1=C:xgA: 2 +C: 11;5=JT1T5K=f1=C:xgA: 2 +B: 1 Hence, T1andT5are not swappable, because 1;5and5;1di er in the balances of CandB. 4.True concurrency for blockchains Given a swappability relation R, we transform a sequence of transactions Binto an occurrence netNR(B), which describes the partial order induced by R. Our main result is that any concurrent execution of the transactions in Bwhich respects this partial order is equivalent to the serial execution of B(Theorem 4.6). Occurrence nets. We start by recapping the notion of Petri net [ Rei85 ]. A Petri net is a tuple N= (P;Tr;F;m0), where Pis a set of places ,Tris a set of transitions (with P\Tr=;), andF: (PTr)[(TrP)!Nis aweight function . The state of a net is a marking , i.e. a multiset m:P!Nde ning how many tokens are contained in each place; we denote with m0the initial marking. The behaviour of a Petri net is speci ed as a transition relation between markings: intuitively, a transition tis enabled at mwhen each place phas at least F(p;t) tokens in m. When an enabled transition tis red, it consumes F(p;t) tokens from each p, and produces F(t;p0) tokens in each p0. Formally, given x2P[Tr, we de ne the presetxand the postsetxas multisets:x(y) =F(y;x), andx(y) =F(x;y). A transition tisenabled atmwhentm. The transition relation between markings is de ned as mt !mt+t, where tis enabled. We say that t1tnis a ring sequence from mtom0 when mt1 !tn!m0, and in this case we say that m0isreachable from m. We say that m0 isreachable when it is reachable from m0. Anoccurrence net [BD87 ] is a Petri net such that: (i) jpj1 for all p; (ii)jpj= 1 if p62m0, andjpj= 0 if p2m0; (iii) Fis a relation, i.e. F(x;y)1 for allx;y; (iv) Fis a 10:22 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Tr=f(Ti;i)j1ing P=f(;t)jt2Trg[f (t;)jt2Trg[ (t;t0) t<t0 where ( T;i)<(T0;j),(i<j )^:(TRT0) F(x;y) =8 >< >:1 ify=tand x= (;t) orx= (t0;t) 1 ifx=tand y= (t;) ory= (t;t0) 0 otherwisem0(p) =( 1 if p= (;t) 0 otherwise Figure 4. Construction of a Petri net from a blockchain B=T1Tn. acyclic, i.e.8x;y2P[Tr: (x;y)2F^(y;x)2F=)x=y(where Fis the re exive and transitive closure of F). From blockchains to occurrence nets. We describe in Figure 4 how to transform a blockchain B=T1Tninto a Petri net NR(B), where Ris an arbitrary relation between transactions. Although any relation Rensures that NR(B) is an occurrence net (Lemma 4.1), our main results hold when Ris a strong swappability relation. The transformation works as follows: the i-th transaction in Bis rendered as a transition ( Ti;i) inNR(B), and transactions related by Rare transformed into concurrent transitions. Technically, this concurrency is speci ed as a relation <between transitions, such that ( Ti;i)<(Tj;j) whenever i<j , but TiandTjare not related by R. The places, the weight function, and the initial marking of NR(B) are chosen to ensure that the ring ot transitions respects the relation <. Lemma 4.1. NR(B)is an occurrence net, for all RandB. Step ring sequences. Theorem 4.6 establishes a correspondence between concurrent and serial execution of transactions. Since the semantics of serial executions is given in terms of blockchain states , to formalise this correspondence we use the same semantics domain also for concurrent executions. This is obtained in two steps. First, we de ne concurrent executions of Bas the step ring sequences (i.e. nite sequences of setsof transitions) of N#(B). Then, we give a semantics to step ring sequences, in terms of blockchain states. We denote nite sets of transitions, called steps , asU;U0;:::. Their preset and postset are de ned asU=P p2Upand U=P p2Up, respectively. We say that Uisenabled atmwhenUm, and in this case ring Uresults in the move mU !mU+U. Let U=U1Unbe a nite sequence of steps. We say that Uis astep ring sequence from m tom0ifmU1!Un!m0, and in this case we write mU !m0. Concurrent execution of transactions. To execute transactions in parallel, the idea is to execute them in isolation , and then merge their changes, whenever they are disjoint. The state updates resulting from the execution of a transaction are formalised as in Section 2. Anupdate collector is a function  that, given a state and a transaction T, gives a state update = (;T) which maps (at least) the updated observables to their new values. In practice, update collectors can be obtained by instrumenting the run-time environment of blockchains, to record the state updates resulting from the execution of transactions. We Vol. 17:4 A theory of transaction parallelism in blockchains 10:23 formalise update collectors in De nition 4.2 by abstracting from the implementation details of such an instrumentation: De nition 4.2 (Update collector) .We say that a function  is an update collector when JTK=((;T)), for allandT. There exists a natural ordering of update collectors, which extends the ordering between state updates (i.e., set inclusion, when interpreting them as sets of substitutions): namely, v0holds when8;T: (;T)0(;T). The following lemma characterizes the least update collector w.r.t. this ordering. Lemma 4.3 (Least update collector) .Let?(;T) = JTK, where we de ne 0asS 0p6=pf0p=pg. Then, ?is the least update collector. The merge of two state updates is the union of the corresponding substitutions; to avoid collisions, we make the merge unde ned when the domains of the two updates overlap. De nition 4.4 (Merge of state updates) .Let0,1be state updates. When dom0\ dom1=;, we de ne 01as follows: (01)p=8 >< >:0pifp2dom0 1pifp2dom1 ? otherwise The merge operator enjoys the commutative monoidal laws, and can therefore be extended to ( nite) sets of state updates. We now associate step ring sequences with state updates. The semantics of a step U=f(T1;1);:::; (Tn;n)ginis obtained by applying to the merge of the updates (;Ti), for alli21::n| whenever the merge is de ned. The semantics of a step ring sequence is then obtained by folding the semantics of its steps. De nition 4.5 (Semantics of step ring sequences) .We de ne the semantics of step ring sequences, given  and , as: J"K = JUUK =JUK 0where0=JUK =M (T;i)2U(;T) Concurrent execution of blockchains. Theorem 4.6 below relates serial executions of transactions to concurrent ones (which are rendered as step ring sequences). Item (a) establishes a con uence property: if two step ring sequences lead to the same marking, then they also lead to the same blockchain state. Item (b) ensures that the blockchain, interpreted as a sequence of transitions, is a step ring sequence, and it is maximal (i.e., there is a bijection between the transactions in the blockchain and the transitions of the corresponding net). Finally, item (c) ensures that executing maximal step ring sequences is equivalent to executing serially the entire blockchain. Theorem 4.6. LetB=T1Tn. Then, in N#W R(B): (a)ifm0U !mandm0U0 !m, then JUK? =JU0K? , for all reachable ; (b)f(T1;1)gf (Tn;n)gis a maximal step ring sequence; (c)for all maximal step ring sequences U, for all reachable ,JUK? =JBK. 10:24 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 (;tf) (;th)(;tg) (tf;) (th;) (tg;) (tf;tg) tf th tg Figure 5. Occurrence net for Example 4.7. Example 4.7 (Occurrence Net construction in Ethereum) .Consider the following Ethereum transactions and functions of a contract C: Tf=A0 !C:f() f()fifx= 0theny:=1else throwg Tg=A0 !C:g() g()fify= 0thenx:=1else throwg Th=A0 !C:h() h()fz:=1g Let the following sets be safe approximations of the corresponding transactions Pw f=Pr g=fC:yg;Pr f=Pw g=fC:xg;Pw h=fC:zg;Pr h=; where the subscript denotes the transaction and the superscript denotes if the set approxi- mates the read or written keys, e.g., Pw fsafely approximates the keys written by Tf, whereas Pr gsafely approximates the keys read by Tg. By De nition 3.11 we have that Tf#ThandTg#Th, but:(Tf#Tg). By instantiating the construction of Figure 4 using the relation #, we obtain the occurrence net N#(TfThTg) of Figure 5, where tf= (Tf;1),th= (Th;2), and tg= (Tg;3). From this occurrence net is easy to see that transition tgcan only be red after tf, while thcan be red independently from tfandtg. This is coherent with the fact that This swappable with both TfandTg, while TfandTgare not swappable. Recall that ?is the least update collector, i.e. a function that given a state returns the minimal update mapping quali ed keys to their new values. To run in parallel the transactions, we execute them in isolation and then we merge their e ect, by merging their state updates. For example, given a state such thatC:x=C:y= 0 the minimal updates fortf;tg, and thare: ?(;Tf) =f1=C:yg ?(;Tg) =f1=C:xg ?(;Th) =f1=C:zg By De nition 4.5 the parallel execution of tf;tg, and thinresults in the following states Jftf;thgK? =(f1=C:ygf 1=C:zg) =f1=C:y;1=C:zg Jftg;thgK? =(f1=C:xgf 1=C:zg) =f1=C:x;1=C:zg Jftf;tggK? = (f1=C:ygf 1=C:xg) =f1=C:y;1=C:xg Note that, for all the serial execution of Tfand Th(in both orders) is equal to their concurrent execution (similarly for TgandTh): JTfThK=JThTfK=f1=C:y;1=C:zg=Jftf;thgK?  JTgThK=JThTgK=f1=C:x;1=C:zg=Jftg;thgK?  Instead, for all such thatCx=Cy= 0 the concurrent executions of Tfand Tgmay di er from serial ones: JTfTgK=f1=C:yg JTgTfK=f1=C:xg Jftf;tggK? =f1=C:y;1=C:xg Vol. 17:4 A theory of transaction parallelism in blockchains 10:25 This is due the fact that tfandtgarenotconcurrent in the occurrence net of Figure 5. Now let U=ftf;thgftggbe a maximal step ring sequence of N#(B). Since tfandth are concurrent by item (c) of Theorem 4.6 we can conclude that the semantics of Uin the stateis equivalent to the serial one of B=TfThTg: JBK=f1=C:ygf1=C:zg=JUK?  It is worth noticing that any other maximal step ring sequence of N#(B) results in the same state. For example, consider U0=ftfgftg;thg, where the places ( tf;), (tg;) and (th;) contain one token each, while the other places have no tokens. Since UandU0lead to the same marking, by item (a) of Theorem 4.6 we conclude that JUK? =JU0K?  Now, consider U00=fthgftf;tgg. Although U00is maximal, it is not a step ring sequence, since the second step is not enabled, therefore, no items of Theorem 4.6 apply to U00. This is coherent with the fact that U00does not represent any sequential execution of B. 5.Experimental validation In this section we discuss how to exploit our theoretical results in practice to improve the performance of blockchain nodes. We start by sketching the algorithm used by miners and validators to construct blocks. Miners should perform the following steps: (1)gather from the network a set of transactions, and put them in an arbitrary linear order B, which is the mined block; (2) compute the relation #W RonB, using a static analysis of read/written observables; (3) construct the occurrence net N#W R(B); (4)execute the transactions in Bconcurrently according to the occurrence net, exploiting the available parallelism. The protocol followed by validators is almost identical to that of miners: the main di erence is that step 1 is skipped, and at step 2, the relation #W Ris computed starting from the block Bto be validated. Note that the static analysis used by a validator could be di erent from the analysis used by the node which mined B, and therefore the occurrence net could be di erent from that used by the miner. However, this is not a problem: from item (c) of Theorem 4.6 it follows that executing Bon any occurrence nets built on any static analysis of read/written variables leads to the same state. In this way, blocks do not need to carry the occurrence net as metadata: this makes our approach is compatible with any blockchain platform, without requiring a soft-fork. For the case of Bitcoin, we argue that implementing this algorithm is straightforward: indeed, Lemma 3.18 allows to compute the strong swappability relation directly from the transactions inputs and outputs. For Ethereum the problem is more complex, since the algorithm relies on a static analysis of the observables read/written by transactions. Therefore, in the rest of this section we evaluate the feasibility of our approach on Ethereum. To this purpose, we implement a prototype analyser of Ethereum bytecode, and we evaluate its precision on a relevant contract. We then compare the time of sequential executions of blocks against their parallel executions (which includes the time for the static analysis). Despite the limitations of the static analysis tool (that we discuss at the end of the section), we nd that our technique improves the execution time in our experiment. 10:26 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Sequential execution Net construction Parallel execution Total time 41:38 ms 4 :4 ms 25 :02 ms 29 :42 ms Table 1. Average times for executing Lottery sequentially and in parallel. The total time is the sum of times for analyzing the contract bytecode, computing the occurrence net, and of running the transactions in parallel. Analysing Ethereum bytecode. In general, precise static analyses at the level of the Ethereum bytecode are dicult to achieve, since the language has features like dynamic dispatching and pointer aliasing which are notoriously a source of imprecision for static analysis. As far as we know, none of the analysis tools for Ethereum contracts exports an over-approximation of read/written keys which is usable to the purpose of this paper. The only tool we know of that outputs such an over-approximation is ES-ETH [ Mar19 ], but it has several limitations which make its output too coarse to be usable in practice. So, to perform an empirical validation of our approach we develop a new prototypical tool [ Tos20a ]. Our tool takes as input the EVM bytecode of a contract and a sequence of transactions, and gives as output the occurrence net, using the construction in Section 4. The tool implements as a standalone library [ Tos20b ] a static analysis that over-approximates the read and written keys for each function of a given smart contract. Before presenting the design underlying our static analyzer, we brie y recall the EVM memory model and how the bytecode generated by Solidity compiler is organized (see [ Eth21 , Woo14 ] for further details). The execution of a smart contract involves three kinds of memory: (i) the world state , i.e. a mapping from addresses to account information (e.g., balances, functions, etc.); (ii) the contract storage , mapping keys to values; (iii) the working memory , i.e. a stack which stores function parameters, local variables and temporary values created during the function execution. The EVM machine features instructions to load and store values from these memories, e.g., SSTORE and SLOAD operate on the world state. The Solidity compiler splits the generated bytecode in two sections: the constructor code and the runtime code . The constructor code is executed upon contract creation, and typically returns the runtime code to be deployed on the blockchain. The runtime code is executed upon a function call. This code rst initializes the contract storage and the stack, and then transfers the control to the body of the function called in the transaction. Our static analysis symbolically executes both the constructor and runtime code. Since EVM bytecode has no explicit notion of function declaration, we analyze the constructor code and the rst part of the runtime code to detect which functions are declared in the contract and where their code is located. Once we identify the functions, we analyze their code separately. For each function we compute three sets: the sets of keys that are read/written by the function, and the set of calls made to external contracts. To construct these sets we exploit a symbolic semantics of EVM instructions, that operates on abstract versions of the stack and memory storage. Intuitively, the analysis of each instruction results in an abstract value, specifying the operation performed and the a ected keys. Experiments. We experimentally validate our approach by estimating the potential speed up achieved by running transactions in parallel. To this purpose we consider a contract Vol. 17:4 A theory of transaction parallelism in blockchains 10:27 (;tn) tn (tn;)tj0(tn;tj0) (;tj0) (tj0;) tj1(tn;tj1) (;tj1) (tj1;) tc0(tj0;tc0) (;tc0) (tc0;) tc1(tj1;tc1) (;tc1) (tc1;) tr0(tc0;tr0) (;tr0) (tr0;) tr1(tc1;tr1) (;tr1) (tr1;) (tr1;tw) (tr0;tw)(;tw) tw (tw;)(tc0;tr1) (tc1;tr0) Figure 6. Occurrence net for the Lottery contract. which implements a two-players lottery (see Listing 2 in the Appendix for its Solidity code). Intuitively, a user who wants to participate in the lottery performs the following steps: (1)join the game by sending a certain amount of cryptocurrency, representing the bid; (2)commit to a secret string by sending its hash, which is stored on the contract state; (3)once both players have completed the commit phase, they can reveal their secrets, independently from each other; (4)once both players have revealed, anyone can call the winfunction to transfer the bets to the winner, who is determined according to the parity of the length of players' secrets. Once the contract has been initialized (with transaction tn), a complete execution of the lottery then requires 7 transactions: tj0,tc0,tr0, representing the join,commit and reveal of the rst player, tj1,tc1,tr1for the second player, and twfor invoking the win function. Figure 6 displays the occurrence net computed by our tool from a single complete execution of the lottery. The occurrence net shows that players can join,commit and reveal independently from each other. However, the commit transactions can be red only after both join have been red, while the reveal transactions can be red only after both commit . Further, the wintransaction can be red only after both players have revealed their secrets. To estimate the possible speed up obtained by running the transactions in parallel, we play the whole lottery 10 times, generating a total amount of 70 transactions (besides the contract creation). We rst run these transactions sequentially, and measure the execution 10:28 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 time of each transaction. Then, we use our tool to nd a parallel schedule, and compute the time spent if the transactions were run in parallel. We carry out our experiments on a laptop machine with Intel Core i5-3320M CPU @ 2.60GHz and 4Gb of RAM.4We use geth5to setup a development chain, and True6to deploy a local instance of the Lottery contract on this chain. We rst compute the sequential execution time by summing up the time spent for running each transaction, as reported by the logs of geth. The rst column of Table 1 displays the time of sequential execution, averaged over 10 measurements. Then, we analyze the sequence of transactions using our tool, obtaining the occurrence net. The second column of Table 1 displays the average time spent by the tool to analyze the transactions and to build the occurrence net (again, the measurements are repeated for 10 times). From the occurrence net, we estimate the average time required by the most expensive parallel schedule. This schedule is computed as the longest and most expensive path (in terms of time) of the occurrence net. The time required to execute this schedule is in the third column of Table 1. Note that estimating the cost of the parallel execution in this way implies that we are assuming to have a sucient number of threads to execute the transactions (in the Lottery experiment, two threads are enough), and that once a transaction is assigned to a thread it is executed with no latency or queuing time. Finally, the fourth column of Table 1 displays the total time required to analyze the transactions and to run them in parallel. Although the experiment is carried with simplifying assumptions and on a single contract, the results of Table 1 are a rst empirical evidence of the practical applicability of our approach, and that parallelizing the execution of transaction may lead to performance improvements in Ethereum nodes. We discuss below some current limitations and possible improvements of our experimental validation. Limitations and possible improvements. The current version of our static analysis tool of Ethereum bytecode has been developed under some simplifying assumptions. First, the tool can only analyse contracts whose bytecode respects the following conditions, which are always satis ed for bytecode obtained by the Solidity compiler: (i) the constructor code always returns the runtime code; (ii) the runtime code does not access the world state in response to a call with an invalid function signature; (iii) when a transaction calls a valid function, the runtime code always transfers the control to the body of the function. While the tool could be adapted to updates of the Solidy compiler, pieces of bytecode not generated by the compiler may easily violate these conditions, and it seems implausible to obtain a precise analysis without making any assumption on the structure of bytecode. However, this should not be an issue in practice, since the vast majority of transaction currently occurring in Ethereum blocks looks like to call contracts with a veri ed Solidity source7. A second simpli cation used in our tool is that the over-approximation of the keys read/written by a transaction does not exploit the transaction elds (besides the called 4Our scripts and data are available online at https://github.com/lillo/lmcs-analysis-validation 5https://geth.ethereum.org/ 6https://www.trufflesuite.com/ 7Although we are not aware of any research explicitly quantifying the fraction of Ethereum transactions directed to Solidity contracts, some empirical evidence of this conjecture can be obtained by inspecting blocks and their transactions in https://etherscan.io/ , which displays the Solidity code of target contracts. According to [ OHJ20 ],72% of all transactions sent to contracts target contracts with veri ed source code. Vol. 17:4 A theory of transaction parallelism in blockchains 10:29 contract and function). Thus, di erent calls to the same function but with di erent actual parameters result in the same over-approximation. Although this simpli es the implementation, it may decrease the precision of the analysis, because the values of the function parameters are left abstract. Consequently, the occurrence net constructed by the tool contains more dependencies than strictly needed. For instance, the tool would not detect the swappable transactions in the ERC-721 example described in Section 1.2, since there the transaction elds are essential to obtain a precise over-approximation. A possible improvement could be to re ne the analysis tool using all the transaction elds. Finally, the measurements we performed in our experiment are too coarse-grained to allow a precise estimation of the speed up achieved by running the transactions in parallel. For example, we did not consider the overhead required to maintain the threads and to dispatch the transactions when executing the schedule given by the occurrence net. To precisely measure this overhead, one would need to integrate our approach with an Ethereum node, and use it to compute the achieved speed up. Although preliminary, the results of our experiment shown in Table 1 are positive enough to make us believe that a speed up will be con rmed also when taking into account these overheads. 6.Conclusions We have proposed a theory of transaction parallelism for blockchains, aimed at improving the performance of blockchain nodes. We have started by introducing a general model of blockchain platforms, and we have shown how to instantiate it to Bitcoin and Ethereum, the two most widespread blockchains. We have de ned two transactions to be swappable when inverting their order does not a ect the blockchain state. Since swappability is undecidable in general, we have introduced a static approximation, called strong swappability, based on a static analysis of the observables read/written by transactions. We have rendered concurrent executions of a sequence of transactions as step ring sequences in the associated occurrence net. Our main technical result, Theorem 4.6, shows that these concurrent executions are semantically equivalent to the sequential one. An initial experimental assessment of our approach in Ethereum shows that there are margins to make it applicable in practice. We remark that our work does not address the problem of selecting and ordering transactions to maximize the gain of the miner, i.e. it does not proposes strategies to construct blocks of transactions (step 1 in the miner algorithm described in Section 5). Rather, our theory studies how to exploit the available parallelism to execute a block of transactions, assuming that the block is given (which is always the case for validators). Miners can follow di erent strategies to construct blocks, driven by the economic incentives provided by the blockchain platform. In Bitcoin, miner incentives are given by block rewards and by the fees paid by users for each transaction included in a block. In Ethereum, besides these incentives, miners can extract value directly from smart contracts by suitably ordering users' transactions and inserting their own. This form of miner extractable value has become prominent with the emergence of DeFi contracts like decentralized exchanges [ DGK+20,QZG21 ,ZQC+21]. Once a miner has formed a block of transaction according to its strategy, our theory tells how to speed up its execution by parallelizing transactions. In Ethereum, malevolent users could attempt a denial-of-service attack by bloating the blockchain with transactions directed to contracts which are hard to statically analyse. This would make a na ve miner spend a lot of time executing the static analysis on these adversarial transactions. This kind of attacks can be mitigated by miner strategies which 10:30 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 put a strict upper bound to the execution time of the analysis. Note that, since most transactions in Ethereum are directed to a small number of well-known contracts, like e.g. ERC tokens, DeFi contracts, etc. [ OHJ20 ], to achieve an e ective speed up it would be enough to parallelize the transactions sent to these contracts, and execute the transactions sent to unknown contracts without any concurrency. Aiming at minimality, our model does not include the gas mechanism , which is used in Ethereum to pay miners for executing contracts. The sender of a transaction deposits into it some crypto-currency, to be paid to the miner which appends the transaction to the blockchain. Each instruction executed by the miner consumes part of this deposit; when the deposit reaches zero, the miner stops executing the transaction. At this point, all the e ects of the transaction (except the payment to the miner) are rolled back. Our transaction model could be easily extended with a gas mechanism, by associating a cost to statements and recording the gas consumption in the environment. Remarkably, adding gas does not invalidate approximations of read/written keys which are correct while neglecting gas. However, a gas-aware analysis may be more precise of a gas-oblivious one: for instance, in the statement ifkthen flong();x:=1elsey:=1 (where flongis a function which exceeds the available gas) a gas-aware analysis would be able to detect that xis not written. Acknowledgements. Massimo Bartoletti is partially supported by Aut. Reg. Sardinia project \Sardcoin" . Letterio Galletta is partially supported by MIUR project PRIN 2017FTXR7S \Methods and Tools for Trustworthy Smart Systems" . Maurizio Murgia is partially supported by MIUR PON \Distributed Ledgers for Secure Open Communities" . References [ABB+18]Elli Androulaki, Artem Barger, Vita Bortnikov, Christian Cachin, Konstantinos Christidis, Angelo De Caro, David Enyeart, Christopher Ferris, Gennady Laventman, Yacov Manevich, Srinivasan Muralidharan, Chet Murthy, Binh Nguyen, Manish Sethi, Gari Singh, Keith Smith, Alessandro Sorniotti, Chrysoula Stathakopoulou, Marko Vukolic, Sharon Weed Cocco, and Jason Yellick. Hyperledger Fabric: a distributed operating system for permissioned blockchains. In EuroSys , pages 30:1{30:15, 2018. [ABC+18]Nicola Atzei, Massimo Bartoletti, Tiziana Cimoli, Stefano Lande, and Roberto Zunino. SoK: unraveling Bitcoin smart contracts. In Principles of Security and Trust (POST) , volume 10804 of LNCS , pages 217{242. Springer, 2018. [ABLZ18] Nicola Atzei, Massimo Bartoletti, Stefano Lande, and Roberto Zunino. A formal model of Bitcoin transactions. In Financial Cryptography and Data Security , volume 10957 of LNCS , pages 541{560. Springer, 2018. [AKP+19]Parwat Singh Anjana, Sweta Kumari, Sathya Peri, Sachin Rathor, and Archit Somani. An ecient framework for optimistic concurrent execution of smart contracts. In Euromicro International Conference on Parallel, Distributed, and Network-Based Processing (PDP) , pages 83{92, 2019. [BD87] Eike Best and Raymond R. Devillers. Sequential and concurrent behaviour in petri net theory. Theoretical Computer Science , 55(1):87{136, 1987. [Ber66] A. J. Bernstein. Analysis of programs for parallel processing. IEEE Trans. on Electronic Computers , EC-15(5):757{763, 1966. [BGM19] Massimo Bartoletti, Letterio Galletta, and Maurizio Murgia. A minimal core calculus for Solidity contracts. In Cryptocurrencies and Blockchain Technology , volume 11737 of LNCS , pages 233{243. Springer, 2019. [BGM20] Massimo Bartoletti, Letterio Galletta, and Maurizio Murgia. A true concurrent model of smart contracts executions. In Simon Bliudze and Laura Bocchi, editors, COORDINATION , volume 12134 of LNCS , pages 243{260. Springer, 2020. Vol. 17:4 A theory of transaction parallelism in blockchains 10:31 [But13] Vitalik Buterin. Ethereum: a next generation smart contract and decentralized application platform. https://github.com/ethereum/wiki/wiki/White-Paper , 2013. [BZ18] Massimo Bartoletti and Roberto Zunino. BitML: a calculus for Bitcoin smart contracts. In ACM SIGSAC Conference on Computer and Communications Security (CCS) , pages 83{100. ACM, 2018. [CCG08] Sigmund Cherem, Trishul M. Chilimbi, and Sumit Gulwani. Inferring locks for atomic sections. InACM SIGPLAN Programming Language Design and Implementation (PLDI) , pages 304{315, 2008. [CPZ19] Silvia Crafa, Matteo Di Pirro, and Elena Zucca. Is Solidity solid enough? In Financial Cryptography Workshops , volume 11599 of LNCS , pages 138{153. Springer, 2019. [DGHK17] Thomas D. Dickerson, Paul Gazzillo, Maurice Herlihy, and Eric Koskinen. Adding concurrency to smart contracts. In ACM Symposium on Principles of Distributed Computing (PODC) , pages 303{312. ACM, 2017. [DGHK18] Thomas D. Dickerson, Paul Gazzillo, Maurice Herlihy, and Eric Koskinen. Adding concurrency to smart contracts. Bulletin of the EATCS , 124, 2018. [DGK+20]P. Daian, S. Goldfeder, T. Kell, Y. Li, X. Zhao, I. Bentov, L. Breidenbach, and A. Juels. Flash boys 2.0: Frontrunning in decentralized exchanges, miner extractable value, and consensus instability. InIEEE Symposium on Security and Privacy , pages 910{927. IEEE, 2020. [DLP11] Ricardo J Dias, Jo~ ao M Louren co, and Nuno M Pregui ca. Ecient and correct transactional memory programs combining snapshot isolation and static analysis. In USENIX Conf. on Hot topics in Parallelism (HotPar) , 2011. [ESES] William Entriken, Dieter Shirley, Jacob Evans, and Nastassia Sachs. EIP 721: ERC-721 non- fungible token standard. https://eips.ethereum.org/EIPS/eip-721 . [Eth21] Ethereum. Ethereum Virtual Machine (EVM). https://ethereum.org/it/developers/docs/ evm/, 2021. [Fab] Hyperledger Fabric: Read-write set semantics. https://hyperledger-fabric.readthedocs.io/ en/release-1.4/readwrite.html . [FFB19] Michael Fr owis, Andreas Fuchs, and Rainer B ohme. Detecting token systems on Ethereum. In Financial Cryptography and Data Security , volume 11598 of LNCS , pages 93{112. Springer, 2019. [JKL+20] Jiao Jiao, Shuanglong Kan, Shang-Wei Lin, David San an, Yang Liu, and Jun Sun. Semantic un- derstanding of smart contracts: Executable operational semantics of Solidity. In IEEE Symposium on Security and Privacy , pages 1695{1712. IEEE, 2020. [LNZ+16] Loi Luu, Viswesh Narayanan, Chaodong Zheng, Kunal Baweja, Seth Gilbert, and Prateek Saxena. A secure sharding protocol for open blockchains. In ACM SIGSAC Conference on Computer and Communications Security , pages 17{30. ACM, 2016. [Mar19] Diego Marcia. ES-ETH: Ethereum state change examiner. https://github.com/DiegoMarcia/ ES-ETH , 2019. [Maz88] Antoni W. Mazurkiewicz. Basic notions of trace theory. In Linear Time, Branching Time and Partial Order in Logics and Models for Concurrency , volume 354 of LNCS , pages 285{363. Springer, 1988. [MCJ18] Andrew Miller, Zhicheng Cai, and Somesh Jha. Smart contracts and opportunities for formal methods. In International Symposium on Leveraging Applications of Formal Methods, Veri cation and Validation. , volume 11247 of LNCS , pages 280{299. Springer, 2018. [Nak08] Satoshi Nakamoto. Bitcoin: a peer-to-peer electronic cash system. https://bitcoin.org/bitcoin. pdf, 2008. [OHJ20] Gustavo Ansaldi Oliva, Ahmed E. Hassan, and Zhen Ming (Jack) Jiang. An exploratory study of smart contracts in the ethereum blockchain platform. Empir. Softw. Eng. , 25(3):1864{1904, 2020. [PKS21] George P^ rlea, Amrit Kumar, and Ilya Sergey. Practical smart contract sharding with own- ership and commutativity analysis. In ACM SIGPLAN Programming Language Design and Implementation (PLDI) , 2021. [QZG21] Kaihua Qin, Liyi Zhou, and Arthur Gervais. Quantifying blockchain extractable value: How dark is the forest? 2021. [Rei85] Wolfgang Reisig. Petri Nets: An Introduction , volume 4 of Monographs in Theoretical Computer Science. An EATCS Series . Springer, 1985. 10:32 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 [SH20] Vikram Saraph and Maurice Herlihy. An empirical study of speculative concurrency in Ethereum smart contracts. In International Conference on Blockchain Economics, Security and Protocols (Tokenomics) , volume 71 of OpenAccess Series in Informatics (OASIcs) , pages 4:1{4:15, Dagstuhl, Germany, 2020. Schloss Dagstuhl{Leibniz-Zentrum fuer Informatik. [SNJ+19] Ilya Sergey, Vaivaswatha Nagaraj, Jacob Johannsen, Amrit Kumar, Anton Trunov, and Ken Chan Guan Hao. Safer smart contract programming with Scilla. Proc. ACM Program. Lang. , 3(OOPSLA):185:1{185:30, 2019. [tok] Ethereum token dynamics. https://stat.bloxy.info/superset/dashboard/tokens . [Tos20a] Samuele Tosi. Commandline dependency builder. https://github.com/lillo/cmd_net_tool , 2020. [Tos20b] Samuele Tosi. Ethca: Ethereum Concurrency Analyzer. https://github.com/lillo/contract_ analyzer , 2020. [Woo14] Gavin Wood. Ethereum: a secure decentralised generalised transaction ledger. gavwood.com/ paper.pdf , 2014. [You17] Joseph Young. CryptoKitties sales hit $12 million, could be Ethereum's killer app after all. https://cointelegraph.com/news/ cryptokitties-sales-hit-12-million-could-be-ethereums-killer-app-after-all , 2017. [ZQC+21]Liyi Zhou, Kaihua Qin, Antoine Cully, Benjamin Livshits, and Arthur Gervais. On the just-in-time discovery of pro t-generating transactions in de protocols. 2021. Vol. 17:4 A theory of transaction parallelism in blockchains 10:33 Appendix A.Proofs for Section 3 Proof of Lemma 3.2. Items (i) and (ii) are trivial. The inclusion Ois trivial, and  Ofollows from item (ii). Proof of Lemma 3.3. Direct from the fact that semantics of transactions is a function, and it only depends on the blockchain states after the execution of BandB0, which are equal starting from any blockchain state , since BB0. Theorem 3.6.'  . Proof. By de nition,'is the least equivalence relation closed under the rules: "'"['0]T'T['1]TT0 TT0'T0T['2]B0'B0 0B1'B0 1 B0B1'B0 0B0 1['3] LetB'B0. We have to show BB0. We proceed by induction on the rules above. For rules ['0]and ['1], the thesis follows by re exivity, since is an equivalence relation (Lemma 3.2). For rule ['2], the thesis follows immediately by De nition 3.4. For rule ['3], rst note that B=B0B1andB0=B0 0B0 1. By the induction hypothesis it follows that: B0B0 0and B1B0 1 Therefore, by two applications of Lemma 3.3: B=B0B1B0B0 1B0 0B0 1=B0 Proof of Lemma 3.9. Item (a). For the case =w, letPj=wTandPP0. LetQbe such thatQ\P0=;. We have to show that TQ". SincePP0, it must be Q\P=;. Then, since Pj=wT, it must be TQ", as required. For the case =r, letPj=rT andPP0. We have to show that, for all B1;B2, ifB1P0B2andB1QB2, then B1TQB2T. But this follows immediately by the fact that PP0andPj=rT. Item (b). Let Rbe such that R\(P\Q) =;. SincePj=wTand (RnP)\P=;, then: TRnP" Similarly, since Qj=wTand (RnQ)\Q=;, we have that: TRnQ" By assumption R\(P\Q) =;, then (RnP)[(RnQ) =R. By De nition 3.1, we conclude: TRT(RnP)[(RnQ)" Lemma A.1. B'#B0=)BB0 Proof. Direct by Theorems 3.6 and 3.13. 10:34 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Appendix B.Proofs for Section 4 Lemma B.1.is commutative and associative, with p:?as neutral element. Proof. Trivial. Lemma B.2. If12=, then=12. Proof. Since12is de ned, it must be dom1\dom2=;. Letpbe an observable. We have two cases: p2dom. Since dom = dom1[dom2, we have two subcases: {p2dom1. Then,p=1p. By disjointness, p62dom2, and hence 12p=1p. {p2dom2. Then,p=2p=12p. p62dom. Then,p62dom1,p62dom2, and sop=?=12p. Lemma B.3. IfB1CT1andB2CT2, then B1B2C(T1[T2). Proof. By induction onjB2j. For the base case, it must be B2="and hence T2=;. Then, B1B2=B1andT1[T2=T1. Therefore, the thesis coincides with the rst hypothesis. For the induction case, it must be B2=B0 2T, withjB0 2j=n. Furthermore, it must be T2=fTg[T02, for some T02such that B0 2CT02. By the induction hypothesis: B1B0 2C(T1[T02) Then: B1B0 2T=B1B2C(fTg[T1[T02) =T1[T2 Lemma B.4. LetBand Tbe such that B=B1T0B2=)T#W RT0. Then, for all B0, JB0KR(T)JBKJB0Kand JB0KW(T)JBKJB0K. Proof. A simple induction on jBj, using De nition 3.7 for the induction case. We now formalize when a blockchain Bis a serialization of a multiset of transactions T. De nition B.5 (Serialization of multisets of transactions) .We de ne the relation Cbetween blockchains and multisets of transactions as follows: "C[]BCT BTC([T] +T) Lemma B.6. IfT#W RT0for all T02TandBCTthen, B=B1T0B2=)T#W RT0. Proof. By a simple induction on jTjwe can conclude that, whenever Bis of the form B1T0B2 for some B1;B2andT0, we have that T02T. The thesis then follows immediately. Lemma B.7. Ifpj=rT,B1pB2andB1qB2, then JB1TKqJB1K(JB2K;T). Proof. Let1= ( JB1K;T) and2= ( JB2K;T). By De nition 4.2, JB1TK=JB1K1. Let p2Q. We have two cases: p2dom2. JB1K2p=2p=JB2K2p=JB2TKp=JB1TKp p62dom2. JB1K2p=JB1Kp=JB2Kp=JB2K2p=JB1TKp De nition B.8. Let  be a state updater, and let Wbe such that8T:W(T)j=wT. We say that  and Warecompatible when8;T: dom (;T)W(T). Vol. 17:4 A theory of transaction parallelism in blockchains 10:35 We extend the semantics of transactions to nite multisets of transactions. Hereafter, we denote with [] the empty multiset, with [ T1;:::; Tn] the multiset containing T1;:::; Tn, and withA+Bthe sum between multisets, i.e. ( A+B)(x) =A(x) +B(x) for allx. De nition B.9 (Semantics of multisets of transactions) .We denote the semantics of a multiset of transactions T, in a stateand an update collector , as JTK , where the partial function JK is de ned as: JTK =L T2T(;T). Hereafter, we say that a multiset Tis strongly swappable w.r.t. a relation R# when: 8T2T;8T02T[T] :TRT0 Lemma B.10. LetTbe strongly swappable w.r.t. #W R, letBCT, and let be compatible with W. Then, for all B0:JTK JB0K=JBKJB0K. Proof. By induction on jBj. For the base case, it must be B="andT=;, and hence J;K JB0K=JB0K=J"KJB0K. For the induction case, it must be B=B0T, withjB0j=n. Clearly,T= [T] +T0for someT0such that B0CT0. Let ( JB0K;T) =T. By the induction hypothesis: JT0K JB0K=JB0KJB0K(B.1) Notice that: JT0K JB0K=JB0K0(B.2) where0L T02T0(JB0K;T0)). Let ( JB0K;T) =T. SinceTis strongly swappable w.r.t. #W R and  is compatible with W, it must be dom0\domT=;, and hence ( 0T) is de ned. Then, it must be: JTK JB0K=JB0K(0T) =JB0K0T By Lemma B.2 =JT0K JB0KT By Equation (B.2) =JB0KJB0KT By Equation (B.1) (B.3) We have that: JBKJB0K=JB0TKJB0K=JB0KJB0K0 T where0 T= ( JB0 0KJB0K;T). Since domTW(T) and domTR(T), it follows immediately that JB0KJB0KTpJBKJB0Kfor allp62W(T). It remains to show that JB0KJB0KTW(T)JBKJB0K. First notice that, by Lemmas B.6 and B.4: JB0KR(T)JB0KJB0KJB0KW(T)JB0KJB0K Then, by Lemma B.7: JB0KJB0KTW(T)JBKJB0K And hence: JB0KJB0KT=JBKJB0K(B.4) The thesis JTK JB0K=JBKJB0Kthen follows by Equations (B.3) and (B.4). 10:36 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 The following theorem ensures that the parallel execution of strongly swappable trans- actions is equivalent to any sequential execution of them. Theorem B.11. LetTbe strongly swappable w.r.t. #W R, and let BCT. Then, for all : JTK? =JBK Proof. Direct by Lemma B.10 and by the fact that every Wis compatible with ?. Aparellelized blockchain Bis a nite sequence of multisets of transactions; we denote with "the empty sequence. We extend the semantics of multisets (Theorem B.9) to parallelized blockchains as follows. De nition B.12 (Semantics of parallelized blockchains) .The semantics of parallelized blockchains is de ned as follows: J"K = JTBK =JBK JTK  We write JBKfor JBK 0, where0is the initial state. We also extend the serialization relation C(De nition B.5) to parallelized blockchains. De nition B.13 (Serialization of parallelized blockchains) .We de ne the relation Cbetween blockchains and parallelized blockchains as follows: "C"B1CTB2CB B1B2CTB The following theorem states that our technique to parallelize the transactions in a blockchain preserves its semantics. Theorem B.14. Let each multiset in Bbe strongly swappable w.r.t. #W R, and let BCB. Then, for all : JBK? =JBK Proof. By induction on the rule used for deriving BCB. Rule:"C". The thesis follows trivially, since J"K==J"K? . Rule:B1CTB2CB B1B2CTB. By Theorem B.11, for some reachable 0it must be JB1K=0=JTK? . By the induction hypothesis, JB2K0=JBK? 0. The thesis then follows by: JB2K0=JB1B2K JBK? 0=JTBK?  Lemma B.15. LetNR(T1Tn) = ( P;Tr;F;m0). Then (Tr;<)is a partial order. Proof. Transitivity and re exivity hold by de nition. For antisymmetricity, assume that (Ti;i)<(Tj;j) and ( Tj;j)<(Ti;i). Then, it is easy to verify that ijandji, and so i=j. Since TiandTjare uniquely determined by iandj, we have that Ti=Tj. Therefore, (Ti;i) = ( Tj;j), as required. Lemma B.16. NR(B)is an occurrence net, for all RandB. Vol. 17:4 A theory of transaction parallelism in blockchains 10:37 Proof. By De nition 4, the rst three conditions of the de nition of occurrence net are easy to verify. To prove that Fis acyclic, we proceed by contradiction. Assume that there is a sequence x=x0;x1;:::xmsuch that ( xi;xi+1)2Ffor all 0i<m , andx0=xmwith m> 0. Notice that the above sequence alternates between transitions and places, and so, sincem> 0, at least one place and one transition occur in x. Further, a place between two transitions t6=t0can exist only if t<t0. Therefore, if t;t0occur in x, it must be t<t0and t0<t. So, if xcontains at least two transitions, by Lemma B.15, we have a contradiction. If only one transition t= (T;i) occurs in x, then there is a place of the form ( t;t) occuring inx. Therefore, t<t, which implies i<i | contradiction. Lemma B.17. LetN= (P;Tr;F;m0)be an occurrence net. For all t;t02Tr, ift6=t0then t\t0=;. Proof. By contradiction, assume that p2t\t0with t6=t0. Then,ft;t0gp, and hence jpj2 | contradiction with constraint (i) of the de nition of occurrence nets. Lemma B.18. Letmbe a reachable marking of an occurrence net N. Then: (1)Ifmt !m0andmt !m00, then m0=m00(determinism). (2)Ifmt !m0,mt0 !m00andt6=t0, then there exists m000such that m0t0 !m000andm00t !m000 (diamond property). (3)Ifmt ! !t0 !then t6=t0(linearity). (4)Ifmt !mthenjtj= 0(acyclicity). Proof. For item 1, by de nition of the ring of transitions of Petri Nets it must be m0= mt+t=m00. For item 2, since mt !m0andmt0 !m00, it must be: tm m0=mt+t t0m m00=mt0+t0 By Lemma B.17, t0is enabled at m0, and tis enabled at m00. Then, by de nition of ring: m0t0 !m0t0+t0and m00t !m00t+t Then: m0t0+t0= (mt+t)t0+t0 = (mt0+t0)t+t(ast0m) =m00t+t Hence, the thesis follows by choosing m000=m0t0+t0. Item 3 follows directly by induction on the length of the reduction !, exploiting the fact that Fis a partial order. Item 4 follows by the fact that Fis a partial order. Lemma B.19. LetN= (P;Tr;F;m0)be an occurrence net, and let mbe a reachable marking, such that, for some t,m0,m00: 10:38 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 mn+1m0 m00t=t Then, m00 !nm0. Proof. By induction on n. For the base case, it must be m !1m0, and hence mt0 !m0for some t0. Since mt !m00, by the contrapositive of item 2 of Lemma B.18 (diamond property) it follows t=t0. So, by item 1 of Lemma B.18 (determinism) we have that m0=m00. Clearly: m00 !0m0 For the induction case, let n=m+ 1, for some m. Then, for some t0;m000: mt0 !m000 !m+1m0 Ift=t0, then by item 1 of Lemma B.18 (determinism) it follows that m000=m00, and so we have the thesis m00 !nm0. Otherwise, if t6=t0, by item 2 of Lemma B.18 (diamond property), there must exists m1such that: m00t0 !m1and m000t !m1 We are in the following situation: m000m+1m0 m1t=t Sincem+ 1 =n, by the induction hypothesis: m1 !mm0 Therefore, we have the thesis: m00t0 !m1 !mm0 Lemma B.20. Let(T;i);(T0;j)be transitions of NR(B). Ifmis a reachable marking, then: (T;i)<(T0;j)and m(T;i)! =) m6(T0;j)! Proof. By the construction in Figure 4, since ( T;i)<(T0;j), then p= ((T;i);(T0;j)) is a place of the occurrence net, and F((T;i);p) = 1 and F(p;(T0;j)) = 1. De nition B.21 (Independency) .LetNbe an occurrence net. We say that two transitions tandt0areindependent , in symbols tIt0, ift6=t0and there exists a reachable marking m such that: mt !and mt0 ! We de ne'as the least congruence in the free monoid Trsuch that, for all t;t02Tr: tIt0=)tt0't0t. Lemma B.22. LetNbe an occurrence net, with a reachable marking m. IfmU !then tIt0, for all t6=t02U. Vol. 17:4 A theory of transaction parallelism in blockchains 10:39 Proof. Since mU !, then mt !for all t2U. Lemma B.23. LetNbe an occurrence net, and let mbe a reachable marking. If mt1!m0 andmt2!m0, then t1't2. Proof. We proceed by induction on the length of the longest reduction among mt1!m0 and mt2!m0. For the base case, the thesis is trivial as both t1andt2are empty. For the induction case, assume that t1is longer or equal to t2(the other case is symmetric). Lett1=t1t0 1. We rst show that t2is not empty. By contradiction, if t2is empty, then m=m0. But then, by item 4 of Lemma B.18 (acyclicity) it follows that t1is empty as well: contradiction. Therefore, t2=t2t0 2for some t2andt0 2. Clearly, t1is longer than t0 1andt0 2. Letmt1 !m1andmt2 !m2. We have two subcases. Ift1=t2, by determinism (Lemma B.18) it follows that m1=m2. Let m00=m1. By the hypothesis of the theorem, we have m00t0 1!m0and m00t0 2!m0. Then, by the induction hypothesis we have t0 1't0 2, and so the thesis t1t0 1't2t0 2follows since'is a congruence. Ift16=t2, then by De nition B.21 it must be t1It2. By the diamond property (Lemma B.18), there exists m00such that m1t2 !m00andm2t1 !m00. By linearity (item 3 of Lemma B.18), m06t1!and m06t2!. By Lemma B.19, applied on m2, there exists tsuch that m00t !m0andjtj+ 1 =jt0 2j. So, we are in the following situation: m0 m1 m m00 m2 m0=t2 t01 t2t1 t2 tt1 t0 2 =t1 Therefore, we have that: m1t2 !t !m0and m1t0 1!m0 m2t1 !t !m0and m2t0 2!m0 Notice thatjt2tj=jt1tj=jtj+ 1 =jt0 2jjt0 1j<jt1j. Hence, by applying the induction hypothesis twice: t2t't0 1and t1t't0 2 Then, since'is a congruence: t1t2t't1t0 1and t2t1t't2t0 2 Since t1It2, then t1t2t't2t1t. By transitivity of ': t1=t1t0 1't1t2t't2t1t't2t0 2=t2 10:40 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 De nition B.24. For all sequences of transitions t, we de ne the set tr(t) of the transitions occurring in tas: tr(t) =ftj9t1;t2:t=t1tt2g and we extend trto step ring sequences Uas follows: tr(U) =[ fUj9U1;U2:U=U1UU2g Lemma B.25. Ift't0then tr (t) =tr(t0). Proof. Trivial by De nition B.21. Lemma B.26. LetNbe an occurrence net, and let mbe a reachable marking. If mU1!m1, mU2!m2and tr (U1) =tr(U2), then m1=m2. Proof. Since mU1!m1andmU2!m2, there exist sequentialisations t1ofU1andt2ofU2 such that mt1!m1andmt2!m2. Since by hypothesis tr(U1) =tr(U2), then tr(t1) =tr(t2). We proceed by induction on the length of t1. The base case is trivial, as m=m1=m2. For the inductive case, suppose t1=t1t0 1, withjt0 1j=n. By determinism, there exists a unique marking m0 1such that mt1 !m0 1(a single step). Since tr(U1) =tr(U2), it must be t2=t2t0 2, withjt0 2j=n. Let m0 2be the unique marking such that mt2 !m0 2(a single step). There are two subcases. Ift1=t2, then m0 1=m0 2, and so the thesis follows directly by the induction hypothesis. Ift16=t2, by the diamond property (item 1 of Lemma B.18), there exists m0such that m0 1t2 !m0andm0 2t1 !m0. Since t22tr(t0 1), by linearity (item 3 of Lemma B.18) it follows that m16t2!, and hence, by applying Lemma B.19 on m0 1we obtain m0t00 1!m1for some t00 1. Summing up, we have that: m0 1t0 1!m1 and m0 1t2t00 1! m1 Then, by Lemma B.23, t0 1't2t00 1, and hence: t1=t1t0 1't1t2t00 1 By Lemma B.25: tr(t1) =tr(t1t2t00 1) Similarly, we can conclude that m0t00 2!m2for some t00 2and that: tr(t2) =tr(t2t1t00 2) Since tr(t1) =tr(t2), we can conclude: tr(t00 1) =tr(t00 2) Sincejt00 1j=n1<n+ 1 =jt1j, the thesis follows by the induction hypothesis. Lemma B.27. Let(T;i)and(T0;j)be transitions of NR(B). Then: (T;i) I (T0;j) =) TRT0 Proof. By De nition B.21, ( T;i) I (T0;j) implies that ( T;i)6= (T0;j) and there exists some reachable marking msuch that m(T;i)! and m(T0;j)! . By contradiction, assume that :(TRT0). Then, since i<j orj >i , by De nition 4 we would have that ( T;i)<(T0;j) or (T0;j)<(T;i). Then, by Lemma B.20 we obtain a contradiction. Vol. 17:4 A theory of transaction parallelism in blockchains 10:41 De nition B.28. LetNR(B) = ( P;Tr;F;m0). We de ne :Tr!Tas (T;i) =T. We then extend to a function from steps to multisets of transactions as follows: (;) = [] (U[ftg) = [ (t)] + (U) Finally, we extend to nite sequences of steps as follows: (") =" (UU) = (U) (U) Lemma B.29. LetNR(B) = ( P;Tr;F;m0), and let Ube a step ring sequence. Then, for alland: JUK =J (U)K  Proof. Straightforward by De nitions 4.5 and B.12. Lemma B.30. Ift't0holds in NR(B), then (t)'R (t0). Proof. De ne: '0= (t;t0) (t)'R (t0) It suces to show that ''0. Notice that'0is a congruence satisfying: TRT0=) (T;i)(T0;j)'0(T0;j)(T;i) But then, by Lemma B.27, it follows that '0also satis es: (T;i) I (T0;j) =) (T;i)(T0;j)'0(T0;j)(T;i) Since'is the smallest congruence satisfying this implication, we have ''0. Theorem 4.6. LetB=T1Tn. Then, in N#W R(B): (a)ifm0U !mandm0U0 !m, then JUK? =JU0K? , for all reachable ; (b)f(T1;1)gf (Tn;n)gis a maximal step ring sequence; (c)for all maximal step ring sequences U, for all reachable ,JUK? =JBK. Proof. For item (a), assume that m0U !mandm0U0 !m. A standard result from Petri nets theory ensures that there exists sequentializations tofUandt0ofU0such that: m0t !mand m0t0 !m By Lemma B.23, it must be t't0. Then, by Lemma B.30: (t)'#W R (t0) By Lemma A.1: J (t)K=J (t0)K By Lemmas B.22 and B.27, it follows that all multisets of transactions in (U), as well as those in (U0), are strongly swappable w.r.t. #W R. Therefore, by Theorem B.14: J (U)K? =J (U0)K?  Then, by Lemma B.29: JUK? =JU0K?  For item (b), note that a transition ( Ti;i) is enabled if all transitions ( Tj;j) withj <i have been red. Sof(T1;1)gf (Tn;n)gis a step ring sequence. Moreover, f(T1;1)gf (Tn;n)g contains all the transactions of N#W R(B), and so, by linearity (Lemma 3) it is maximal. 10:42 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 For item (c), let U0=f(T1;1)gf (Tn;n)g. By item (b), we have that U0is a maximal step ring sequence. It is easy to see that BC (U0). By Theorem B.14: J (U0)K? =JBK Since UandU0are both maximal, by Lemma B.26 and by item (a), it follows that: JU0K? =JUK?  Since JU0K? =J (U0)K? (by Lemma B.29) we have that: JUK? =JBK This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, 171 Second St, Suite 300, San Francisco, CA 94105, USA, or Eisenacher Strasse 2, 10777 Berlin, Germany Vol. 17:4 A theory of transaction parallelism in blockchains 10:43 Listing 1. A simple ERC-721 token implementation pragma solidity >= 0.4.2; contract Token { mapping ( uint256 => address ) owner ; mapping ( uint256 => address ) approved ; mapping ( uint256 => bool ) exists ; mapping ( address => uint256 ) balance ; mapping ( address => mapping ( address => bool )) opApprovals ; function ownerOf ( uint256 tkId ) external view returns ( address ) { require ( exists [ tkId ]); require ( owner [ tkId ] != address (0)); return owner [ tkId ]; } function balanceOf ( address addr ) external view returns ( uint256 ) { require ( addr != address (0) ); return balance [ addr ]; } function approve ( address addr , uint256 tkId ) external { require ( exists [ tkId ]); require ( owner [ tkId ] == msg.sender && addr != msg.sender ); approved [ tkId ] = addr ; } function setApprovalForAll ( address op , bool isApproved ) external { operatorApprovals [ msg.sender ][ op] = isApproved ; } function getApproved ( uint256 tkId ) external view returns ( address ) { require ( exists [ tkId ]); return approved [ tkId ]; } function isApprovedForAll ( address addr , address op) external view returns ( bool ) { return operatorApprovals [ addr ][ op ]; } function transferFrom ( address from , address to , uint256 tkId ) external { require ( exists [ tkId ]); require ( from == owner [ tkId ] && from != to); require (to != address (0) ); if( from == msg.sender || operatorApprovals [ from ][ msg.sender ] || approved [ tkId ] == msg.sender ) { owner [ tkId ] = to; approved [ tkId ] = address (0); balance [ from ] -= 1; balance [to] += 1; } } function mint ( address to , uint256 tkId ) external { require (! exists [ tkId ]); require (to != address (0) ); exists [ tkId ] = true ; owner [ tkId ] = to; balance [to] += 1; } } 10:44 M. Bartoletti, L. Galletta, and M. Murgia Vol. 17:4 Listing 2. A two-players lottery contract pragma solidity >=0.4.22 <0.6.0; contract Lottery { address public owner ; address payable player0 ; address payable player1 ; address payable winner ; bytes32 hash0 ; bytes32 hash1 ; string secret0 ; string secret1 ; constructor () public { owner = msg.sender ; } function join0 () payable public { require ( player0 == address (0) && msg.value > .01 ether ); player0 = msg.sender ; } function join1 () payable public { require ( player1 == address (0) && msg.value > .01 ether ); player1 = msg.sender ; } function commit0 ( bytes32 h) public { require ( msg.sender == player0 && hash0 ==0) ; hash0 = h; } function commit1 ( bytes32 h) public { require ( msg.sender == player1 && hash1 ==0) ; hash1 = h; } function reveal0 ( string memory s) public { require ( msg.sender == player0 ); require ( hash0 !=0 && hash1 !=0 && hash0 != hash1 ); require ( keccak256 (abi . encodePacked (s))== hash0 ); secret0 = s; } function reveal1 ( string memory s) public { require ( msg.sender == player1 ); require ( hash0 !=0 && hash1 !=0 && hash0 != hash1 ); require ( keccak256 (abi . encodePacked (s))== hash1 ); secret1 = s; } function win () public { uint256 l0 = bytes ( secret0 ). length ; uint256 l1 = bytes ( secret1 ). length ; require (l0 !=0 && l1 !=0) ; if(( l0+l1) % 2 == 0) { winner = player0 ; } else { winner = player1 ; } winner . transfer ( address ( this ). balance ); // reset state for next round player0 = player1 = address (0) ; hash0 = hash1 = 0; secret0 = secret1 = ""; } }
{ "id": "2011.13837" }
1805.02818
Blockchain for the IoT: Opportunities and Challenges
Blockchain technology has been transforming the financial industry and has created a new crypto-economy in the last decade. The foundational concepts such as decentralized trust and distributed ledger are promising for distributed, and large-scale Internet of Things (IoT) applications. However, the applications of Blockchain beyond cryptocurrencies in this domain are few and far between because of the lack of understanding and inherent architectural challenges. In this paper, we describe the opportunities for applications of blockchain for the IoT and examine the challenges involved in architecting Blockchain-based IoT applications.
http://arxiv.org/pdf/1805.02818v1
Gowri Sankar Ramachandran, Bhaskar Krishnamachari
cs.DC, cs.CR, cs.CY
cs.DC
Blockchain for the IoT: Opportunities and Challenges Gowri Sankar Ramachandran University of Southern California Email: gsramach@usc.eduBhaskar Krishnamachari University of Southern California Email: bkrishna@usc.edu Abstract —Blockchain technology has been transforming the financial industry and has created a new crypto-economy in the last decade. The foundational concepts such as decentralized trust and distributed ledger are promising for distributed, and large-scale Internet of Things (IoT) applications. However, the applications of Blockchain beyond cryptocurrencies in this domain are few and far between because of the lack of understanding and inherent architectural challenges. In this paper, we describe the opportunities for applications of blockchain for the IoT and examine the challenges involved in architecting Blockchain-based IoT applications. 1. Introduction Satoshi Nakamoto laid the foundation for the Blockchain technology in 2008 by presenting a solution for decentral- ized trust among unknown entities [1]. BitCoin, the first de- centralized digital currency, impacted financial institutions, and a wide-number of cryptocurrencies entered the market in the following years. The majority of blockchain applica- tions currently involve digital cryptocurrencies, where the users exchange monetary value with each other through the decentralized framework. Enabling decentralized trust through a consensus proto- col and distributed storage through a tamper-proof ledger are the critical features of the Blockchain technology. Any application that involves multiple stakeholders can benefit from these features because it enables transparent interac- tions without requiring a trusted third party. IoT applications in the context of smart cities and supply chain management consist of numerous stakeholders, where the Blockchain technology can be used to strengthen the confidence among the involved entities and organizations. Although the technology has been around for almost a decade, its technical underpinnings are made clearer only in the last two years. On the one hand, architects designing IoT applications are fully aware of the limitations and ca- pabilities of contemporary IoT platforms and technologies. On the other hand, Blockchain developers and enthusiasts understand the practical details of the Blockchain frame- works and their viability on different classes of computation and storage platforms. We notice a gap between the two communities, and it is essential to bridge this gap to fully exploit the capabilities of blockchain technology beyond cryptocurrencies and FinTech applications.This paper presents the promises of Blockchain for IoT and describes the challenges and limitations of the blockchain by correlating the architectural elements of IoT with the Blockchain. Furthermore, the paper also discusses the fundamental design questions for the application devel- opers who are designing and implementing applications at the intersection of Blockchain and IoT. Section 2 provides an overview and the architecture of IoT. Building blocks and architectural elements of the blockchain are presented in Section 3. Section 4 discusses the opportunities for applying blockchain for the IoT. Sec- tion 5 describes the challenges and open questions. Finally, Section 7 concludes the paper. 2. Overview of the IoT Application areas of IoT include air quality monitoring, smart cities, supply chain management, and production line monitoring. Internet-of-Things comprises of computation, communication, sensing, and actuation functionalities, and such functionalities are distributed throughout the network. IoT architecture can be broadly classified into three layers as shown in Figure 1. End-device Layer: The end-device layer comprises of sensors, low-power embedded platforms, wireless commu- nication technologies, and power sources. Low-power em- bedded IoT platforms act as a hub for sensors and one or more wireless communication technologies. IoT platforms are typically deployed in challenging and hard-to-reach en- vironments. Thus, it is essential to keep the devices running longer on battery power or harvested energy. IETF defines the devices in this layer as very constrained sensor motes with limited processing and storage capabilities, and they are referred to as class 0 devices. The end-device layer is the most resource-constrained layer in IoT application architecture. Edge-device Layer: The edge-device layer is responsi- ble for collecting sensor data from end-devices. This layer consists of a network gateway for handling inbound and outbound communications with the end-device layer. Also, the data from multiple end-devices are processed in this layer to meet the real-time demands of the application. Devices at this layer are more capable than the end-device layer with respect to computation and storage capabilities.arXiv:1805.02818v1 [cs.DC] 8 May 2018 Figure 1. Layered architecture of the Internet-of-Things applications. Server or backend layer: The server or the cloud backend layer is responsible for storage and visualization functionalities. End-users of the IoT application interact with this layer for monitoring and control of their infras- tructure. Web servers, data analytics engines, and databases operate at this layer to cater the demands of the end-users. Devices in this layer have the maximum processing and storage capacities among all the layers in the stack. Table 1 summarizes the resource capacities at different layers of the IoT stack. The end-device layer is a constrained layer with insufficient resources for computation, commu- nication, and storage, while the server or the backend layer consists of maximum resources. Application of any new technology and protocol to the IoT must consider the resource capacities of different layers before their deployment. IoT applications following the above architecture have been widely used in various deployments, but the integration of blockchain into such an architecture remains challenging as discussed in Section 5. The overview of blockchain and its fundamental building blocks are presented in the next section. 3. Overview of the Blockchain technology The Blockchain technology uses the combination of cryptography, a consensus algorithm, and a distributed ledger to create a decentralized and trustworthy platform. In this section, we will discuss the three key aspects of Blockchain technologies.Cryptographic Digital Signature : The public-key cryp- tography is used in blockchain to generate a signature for Blockchain transactions. Users carry out transactions by cre- ating a digital signature using their private keys. Recipients in the blockchain network verify the transaction using the public key of the sender to ensure that the transaction is indeed signed by the sender. Source or end-devices sign the transactions when they create a transaction. Distributed Ledger : Blockchain use a distributed stor- age to record the transactions. In essence, all the platforms in the network store either the entire transactions or a subset of transactions. All the nodes in the network come to a consensus (using a consensus algorithm) before entering the transactions into the ledger. This feature makes blockchain effectively immutable. Consensus algorithm : Blockchain does not rely on a centralized server for verification and validation of transac- tions. Instead, Blockchain uses a peer-to-peer model, and all the decisions within the network are made by the partici- pating members through a consensus protocol. Figure 2 shows the components of Blockchain. The core functionalities of Blockchain are distributed across the hardware wallet, light nodes, and full nodes in a blockchain network. Table 1 presents the resource requirements of blockchain at different layers. 4. Opportunities The core building blocks of blockchain such as public- key cryptography, distributed ledger, and consensus algo- Figure 2. Components of Blockchain. TABLE 1. R ESOURCE REQUIREMENTS OF IOTAND BLOCKCHAIN . Layers CPU Memory Power Budget Bandwidth Internet-of-Things (IoT) End-device Low Low Low Low Edge-device Medium Medium High High Server and Backend High High High High Blockchain Hardware Wallet Low Low Low Low Light Node Medium Medium High High Full Node High High High High rithms are promising for the IoT. We will describe the opportunities for applying blockchain technologies to the IoT in this section. Privacy/anonymity: Transactions in Blockchain use the digital identity generated using public-key cryp- tography and a hashing algorithm. IoT applications with sensitive information can leverage these mech- anism to hide real identity in the network. Monetary exchange of data and compute: Mone- tary exchange of data and compute: IoT applications in the area of smart cities use sensors in combination with crowdsourcing to deliver digital services to the city population. Monetary rewards may be essen- tial to involve the community members in smart city applications and to leverage the edge resources such as computation power, storage, and bandwidth. Blockchain technology can also be used to set up a monetary system to issue tokens to the community members for their participation. Record transactions for account and audit: The data from IoT applications are transported through infrastructure owned by multiple organizations. Sup- ply chain monitoring focuses on tracking and moni- toring assets throughout the supply chain process.Traditional supply chain monitoring systems rely on a centralized architecture, wherein all the data from assets are stored in a central database. Using blockchain for recording the data in a decentralized ledger increases the trust while moving assets (real or digital) through infrastructure owned by multiple and diverse stakeholders. Smart Contracts Nick Szabo introduced the con- cept of Smart Contracts [2] as an alternative to the traditional paper-based contracts. A smart con- tract is a digital contract embedded in the system, which gets executed when the conditions declared in the agreement are met. Smart contracts arbitrate transactions autonomously while exchanging assets between parties or dealing with non-trusted members in a blockchain network. IoT applications, for exam- ple, can employ smart contracts when transporting sensor data through infrastructures owned by mul- tiple stakeholders and selling data produced by the sensors 5. Challenges We now discuss the challenges that arise in applying blockchain for the IoT. Resource constraints: IoT platforms have limited resources for computation, communication, and stor- age, while Blockchain technologies demand exces- sive resources. Class A low-power IoT platforms have less than 10 KB of data memory and less than 100 KB of program memory [3], while a Blockchain node requires memory in the order of GBs [4]. In addition, the computation requirements of consensus algorithms such as Proof-of-Work are well-beyond the capabilities of low-power, resource- constrained IoT devices. Contemporary Blockchain technologies are therefore ill-suited for such low- power IoT devices because their resource demands. From Figure 1, the end-devices and edge-devices does not have the capacity to execute the Blockchain processes, and the server layer is ideally suited for contemporary Blockchain technologies. Such an ap- proach might connect a centralized IoT deployment to a decentralized blockchain network, where the server layer of the IoT deployment acts as the entry point to the blockchain network. Bandwidth requirements: Platforms in the Blockchain network have to interact with other platforms in the network to participate in the consensus process. Due to the decentralized nature of the consensus process, platforms in the network exchange information about the blockchain to validate transaction and to create new blocks. IoT devices operating at end-device layer have severe bandwidth constraints, which also means the contemporary blockchain solutions are not suited for end-devices. Edge-devices and servers may have sufficient bandwidth, but it is important to note that the bandwidth requirement of blockchain may exceed the bandwidth requirement of the application itself, at least with most contemporary blockchain protocols. Security: Blockchain technology follows a decen- tralized architecture, wherein all the devices in the network coordinate and cooperate with each other through pre-defined protocols. Thus, the devices stay connected to the blockchain network for participat- ing in the consensus process. This always-connected feature makes IoT devices potentially more suscep- tible to security attacks. Latency demands: IoT applications typically con- sist of a collection of data producers and data con- sumers, and in some cases, the data consumers react to an event and perform an actuation. The intro- duction of Blockchain technology in this context may reduce the responsiveness if the data consumer may be required to wait for the conclusion of the consensus process before reacting to an event. Con- temporary Blockchain technologies are not suitable for time-sensitive IoT applications that need fully confirmed transactions. Transaction fees: Most open Blockchain technolo- gies charge a fee for transactions, and use it torewarding the nodes involved in consensus process. IoT devices cannot store all the data to such a blockchain since storing the data to a blockchain incurs a transaction fee. If one wishes to put data from IoT devices on such a blockchain, it may need to be aggregated to reduce the transaction fees, but in this case it would be important to make sure that the aggregation process does not filter out essential information. Alternatively, an architecture where the data itself is transported off the chain and only hashed values or key transaction records are stored on the blockchain for verification and provenance purposes may be preferred. Permissioned vs public: Contemporary blockchain technologies can be broadly classified into two cat- egories as public and permissioned blockchains. Public blockchains such as Bitcoin and Ethereum allow anyone to become a part of the network without any authorization. Anyone wishing to par- ticipate in the public blockchain can simply down- load and install the necessary frameworks, and this type of blockchain technologies require substan- tial resources for consensus process. Permissioned blockchains, on the other hand, consists of au- thorized members in the network. This type of blockchain may be suitable for IoT applications involving multiple known organizations as the net- work consists of authorized members, which open up opportunities for fast, higher-throughput consensus protocols. Partition tolerance for intermittently connected devices: IoT applications in the space of supply chain monitoring consist of mobile devices with intermittent connectivity. Also, the end-devices run- ning on batteries use duty cycling to prolong the lifetime. Furthermore, the devices operating on the wireless bands regulated by ETSI and FTC has to adhere to the bandwidth limitations enforced federal authorities. In such scenarios, the devices connect to a server or edge-device intermittently to exchange data. Assuming an architecture in which the server is acting as a lightweight node for recording the IoT data to a blockchain, the server has to download and store the headers of the blockchain to keep itself synchronized. For intermittently connected IoT devices, the cost of running a lightweight node for recording IoT data in a blockchain network may outweigh the benefits because of the bandwidth, computation, and storage costs. New blockchain pro- tocols and frameworks are essential for reducing the infrastructure cost when using blockchain for recording IoT transactions and DAG-based protocols such as IOTA provide partition tolerance by making it easy to merge transactions from partitioned parts of the network. Transaction Volumes - these are quite severely lim- ited on most current open, permissionless blockchain technologies, also preventing high volume sensor data applications from being carried directly on the blockchain. Physical interface weakness - As cyber-physical systems, individual sensors and actuators could be hacked or misused to report false or erroneous data that gets logged on to the blockchain in an im- mutable fashion. 6. Related Work Literature combining blockchain and IoT contributes security and privacy solutions. Kshetri [5] validates the applications of blockchain for securing the IoT. Tomer et al.contribute CIoTA [6] to detect anomalies in IoT appli- cations. CIoTA applies the concepts of blockchain in com- bination with extensible Markov Model (EMM) to identify malicious activities. Dorri et al. [7] presents the gaps in contemporary security and privacy methods, and contribute LSB, a lightweight and scalable blockchain for IoT security and privacy. LSB’s lightweight protocols reduce the band- width and computation costs. Pietro et al. [8] investigate the communication overhead of blockchain synchroniza- tion protocols for the IoT and highlight the uplink and downlink bandwidth demands. PlaTIBART [9] is a testing framework to manage and deploy blockchain networks for transactive IoT applications. Hossein et al. [10] introduce a distributed data storage framework for IoT applications using the blockchain. [10] ensures that the IoT data owner- ship stays with the stakeholders. These papers address some of the challenges in described in Section 5, however, the architectural details and performance implications are not clearly addressed, especially for resource-constrained IoT platforms. The opportunities and challenges of applying blockchain for the IoT are presented in the literature. Huckle et al. [11] discuss the applications of blockchain for monetizing IoT applications, but their work does not describe the chal- lenges. Seyoung et al. [12] demonstrates how blockchain can be used for storing sensor data using smart con- tracts. Canoscenti et al. [13] reviews the use cases of the blockchain and highlights the open problems in integrity, anonymity, and adaptability when storing IoT data in a decentralized network. The authors of [8] analyze the com- munication overhead of blockchain synchronization for the IoT. Unlike [12] and [13], our work focuses on architec- tural challenges and performance implications when using blockchain for IoT for data storage, monetization, security, and privacy. 7. Conclusion Blockchain technology has already made a significant impact in the cryptocurrency applications. The fundamental building blocks - distributed ledger, consensus mechanisms, and public-key cryptography - of blockchain technology is promising for IoT and supply chain monitoring applications. We have discussed the architecture of IoT applications andmapped the functional blocks of the blockchain technology to reveal the architectural challenges involved in applying blockchain for the IoT. Next, we have presented oppor- tunities for applying blockchain for the IoT. Finally, we concluded with the challenges which need to be addressed to fully exploit the benefits of blockchain technologies in the IoT domain. Despite the challenges, blockchain technologies are highly promising for resolving security, privacy, and trust issues in multi-stakeholder application environments. Acknowledgments This work is supported by the USC Viterbi Center for Cyber-Physical Systems and the Internet of Things (CCI). References [1] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” 2008. [2] N. Szabo, “Smart contracts,” Unpublished manuscript , 1994. [3] C. Bormann, M. Ersue, and A. Keranen, “Terminology for constrained-node networks,” Internet Requests for Comments, RFC Editor, RFC 7228, May 2014, http://www.rfc-editor.org/rfc/rfc7228. txt. [Online]. Available: http://www.rfc-editor.org/rfc/rfc7228.txt [4] (2018) Running a full node. https://bitcoin.org/en/full-node# minimum-requirements. [5] N. Kshetri, “Can blockchain strengthen the internet of things?” IT Professional , vol. 19, no. 4, pp. 68–72, 2017. [6] T. Golomb, Y . Mirsky, and Y . Elovici, “CIoTA: Collaborative IoT Anomaly Detection via Blockchain,” ArXiv e-prints , Mar. 2018. [7] A. Dorri, S. S. Kanhere, R. Jurdak, and P. Gauravaram, “LSB: A Lightweight Scalable BlockChain for IoT Security and Privacy,” ArXiv e-prints , Dec. 2017. [8] P. Danzi, A. Ellersgaard Kalør, ˇC. Stefanovi ´c, and P. Popovski, “Anal- ysis of the Communication Traffic for Blockchain Synchronization of IoT Devices,” ArXiv e-prints , Nov. 2017. [9] M. A. Walker, A. Dubey, A. Laszka, and D. C. Schmidt, “PlaTI- BART: a Platform for Transactive IoT Blockchain Applications with Repeatable Testing,” ArXiv e-prints , Sep. 2017. [10] H. Shafagh, L. Burkhalter, A. Hithnawi, and S. Duquennoy, “Towards Blockchain-based Auditable Storage and Sharing of IoT Data,” ArXiv e-prints , May 2017. [11] S. Huckle, R. Bhattacharya, M. White, and N. Beloff, “Internet of things, blockchain and shared economy applications,” Procedia Computer Science , vol. 98, pp. 461 – 466, 2016, the 7th International Conference on Emerging Ubiquitous Systems and Pervasive Networks (EUSPN 2016)/The 6th International Conference on Current and Future Trends of Information and Communication Technologies in Healthcare (ICTH-2016)/Affiliated Workshops. [Online]. Available: http://www.sciencedirect.com/science/article/pii/ S1877050916322190 [12] S. Huh, S. Cho, and S. Kim, “Managing iot devices using blockchain platform,” in 2017 19th International Conference on Advanced Com- munication Technology (ICACT) , Feb 2017, pp. 464–467. [13] M. Conoscenti, A. Vetr, and J. C. D. Martin, “Blockchain for the internet of things: A systematic literature review,” in 2016 IEEE/ACS 13th International Conference of Computer Systems and Applications (AICCSA) , Nov 2016, pp. 1–6.
{ "id": "1805.02818" }
2107.11592
Blockchain Transaction Processing
A blockchain is an append-only linked-list of blocks, which is maintained at each participating node. Each block records a set of transactions and their associated metadata. Blockchain transactions act on the identical ledger data stored at each node. Blockchain was first perceived by Satoshi Nakamoto as a peer-to-peer digital-commodity (also known as crypto-currency) exchange system. Blockchains received traction due to their inherent property of immutability-once a block is accepted, it cannot be reverted.
http://arxiv.org/pdf/2107.11592v2
Suyash Gupta, Mohammad Sadoghi
cs.DB, cs.CR, cs.DC
cs.DB
Blockchain Transaction Processing Suyash Gupta, Mohammad Sadoghi Synonyms • Blockchain Data Management • Blockchain Consensus • Cryptocurrency Definitions A blockchain is an append-only linked-list of blocks, which is main- tained at each participating node. Each block records a set of transac- tions and their associated metadata. Blockchain transactions act on the identical ledger data stored at each node. Blockchain was first perceived by Satoshi Nakamoto (Satoshi 2008) as a peer-to-peer digital-commodity (also known as crypto-currency) ex- change system. Blockchains received traction due to their inherent property of immutability—once a block is accepted, it cannot be reverted.Overview In 2008, Satoshi Nakamoto (Satoshi 2008) introduced the design of an unan- ticipated technology that revolutionized the research across the distributed systems community. Nakamoto pre- sented the design of a peer-to-peer digital-commodity exchange system, which although employed by several participants, prevents the use of a cen- tralized design. Nakamoto envisioned a system where the participants exchange commodities among themselves in a democratic, decentralized and trans- parent manner while upholding their right to privacy. Nakamoto visualized this digital-commodity as a monetary token that could be used by partici- pants to provide or receive services. This led to the birth of Bitcoin —a cryptocurrency—and introduction of a new design paradigm Blockchain . A blockchain in its simplest form is anappend-only linked-list of blocks. 1arXiv:2107.11592v2 [cs.DB] 4 Aug 2021 2 Suyash Gupta, Mohammad Sadoghi Fig. 1: Basic Blockchain Representations Each block in this chain is linked to the previous block in the chain Gupta et al (2019a, 2020a). Blockchains are often termed as immutable as modifying an existing block requires modifying all the previous blocks in the chain. Each block includes a set of transactions and the associated meta-data. Figure 1 presents a schematic representation of a blockchain. Blockchain systems guar- antee decentralization as the full-copy of the chain is maintained by several participants1. Moreover, a block is only accepted into the chain after all the participants have reached consensus on theorder andcontents of the block. In specific, admittance of a block to the chain implies that the transactions iin the block have been executed and verified. Hence, blockchain helps in achieving key properties such as democracy and transparency. A blockchain system can be de- scribed as a collection of layers. At theapplication layer , there are clients, which send their transactions to a set of severs to process. The communication among the clients and servers take place at the networking layer. Servers participate at the ordering layer to assign a unique order to each incoming client transaction in a Byzantine Fault- Tolerant (henceforth referred to as BFT) manner. Following a successful order- ing, the client transaction is processed 1In sharded blockchain systems, no shard may have complete copy but data is still securely replicated.at the execution layer and persisted in the immutable ledger at the storage layer . Clients and servers also employ necessary cryptographic constructs to securely exchange messages among each other. The preceding discussion allows us to summarize that a blockchain system aims at providing a safe and resilient storage for transactions. In the suc- ceeding sections, we will discuss these concepts in detail and will illustrate the mechanisms pertaining to blockchain transaction processing. We will also study key principles required to order and validate these client transactions and provide analysis of some existing blockchain applications. Key Research Findings Each blockchain system can be visu- alized as a secure representation of a traditional database system (Nawab 2018). Similar to a database system, each blockchain application also re- ceives transactions from multiple clients. In its vanilla form, a blockchain transaction is a collection of read or write operations. Clients issue these transactions to the servers for processing and exchange of digital-commodities. In general, each server in a blockchain application stores a full- copy of the chain. Hence, without any loss of generality, we can claim that servers of a blockchain system are replicas of each other. In specific, a blockchain application lays down a replicated design where each replica participates in ordering and executing the incoming client transaction. Blockchain Transaction Processing 3 Prior works have shown that it is possible to make a replicated system handle failures (Lamport 1998; Steen and Tanenbaum 2017). In any replicated system, replicas participate in a fault- tolerant consensus protocol to decide the order to execute a client transaction. Blockchain applications also adhere to this philosophy. They employ a BFT consensus protocol to achieve consensus under byzantine failures. But, why do BFT protocols need to handle byzantine failures? As a blockchain system promotes democracy, it permits display of adversarial behavior by malicious replicas during consensus. To tackle such malicious activities, each blockchain application relies on the design and properties dictated by a BFT consensus protocol. Blockchain Topologies A key parameter that renders the design of a blockchain system is its underlying application. On the basis of permissions available to a participating node, a blockchain application can be categorized blockchain as permissioned, permissionless or hybrid (Pilkington 2015; Cachin and Vukolic 2017). Although the blockchain community agrees on the characteristics of a permissionless or public blockchain infrastructure, there is a lack of concise definitions to explain other models. On the basis of topology, we cate- gorize a blockchain systems under four heads: public, private, permissioned and hybrid. Figure 2 presents a pic- torial representation of the different categories. In these figures, nodes that lack any connections are disallowedfrom participating in the management of the blockchain. Further, we use circles to demarcate different zones of operation; certain nodes are allowed to lead the consensus (or create the next block) while some nodes are allowed to participate in the consensus protocol. Public Blockchain systems, such as Bitcoin (Satoshi 2008) and Ethereum (Wood 2015), allow any node to participate in the consensus process and propose the next valid block for the chain. Hence, a public or per- missionless blockchain system upholds its democratic nature by providing each node with equal probability2of creating the next block to be added to the chain. Private Blockchain systems run at the other extreme end of the spectrum. These blockchain systems permit only a specific set of nodes to be part of the consensus protocol and restrict the creation of next block to an even smaller subset of nodes. Private blockchain de- signs are attractive to large multi-sector companies and banks, which may chose to allow some of their customers to participate in the consensus protocol, while restricting creation of next block to its employees. Hybrid Blockchain systems attain a middle ground between the two extremes. Although these systems allow any node to be part of the consensus protocol, they restrict the task of propos- ing and creating the next block to a designated subset of replicas. For in- stance, Ripple (Schwartz et al 2014)—a cryptocurrency—supports a variant of the hybrid model. In Ripple, only some public institutions have the permissions 2The equal probability of creating a block is only guaranteed when all the nodes have ex- actly same amount of resources, and each node is working independently. 4 Suyash Gupta, Mohammad Sadoghi (a) Public Blockchain. (b) Hybrid Blockchain. (c) Permissioned Blockchain. (d) Private Blockchain. Fig. 2: Topologies for Blockchain Systems. to select the transactions that will be part of the next block. Amidst all these topologies, per- missioned blockchain systems have successfully created a niche space for their design (Androulaki et al 2018; Gupta et al 2020c). Permissioned blockchain applications allow any node participate in the consensus protocol but require the identities of all participants to be known a priori. Although partici- pants loose their privacy, permissioned blockchain applications provide each participant equal opportunity to propose the next block. Notice that permissioned blockchain applications place no other special restrictions on the behavior of a participant. Hyperledger Fabric (An- droulaki et al 2018), Libra coin (Libra 2019) and R ESILIENT DB (Gupta et al2020c) are some of the state-of-the-art permissioned blockchain applications and fabrics. Blockchain Transactional Flow The initial block of any blockchain is termed as the genesis block (Decker and Wattenhofer 2013). Genesis block is a special block that is numbered zero, and is hard-coded in every blockchain application. Each other block links to some previously existing block. Hence, a blockchain grows by appending new blocks to the existing chain. A transaction in a blockchain system is identical to any distributed or OLTP transaction (TPP Council 2010) that acts Blockchain Transaction Processing 5 on some data. Traditional blockchain applications (such as Bitcoin) consist of transactions that represent an ex- change of money between two entities (or users). Each valid transaction is recorded in a block, which can can con- tain multiple transactions, for efficiency. Immutability is achieved by leveraging strong cryptographic properties such as hashing (Katz and Lindell 2007). Figure 3 illustrates the three main phases required by any blockchain application to create a new block. The client transmits a transactional request to one of the participants. This partici- pating node multicasts the client request to all other nodes. We term this phase asTransaction Dissemination . Once, all the nodes have a copy of client request, they initiate a consensus protocol. The choice of underlying consensus protocol affects the time complexity and resource consumption. The winner of the consensus phase proposes the next block and transmits it to all other nodes. This transmission process is equivalent to adding an entry (block) to the global distributed ledger. Blockchain Consensus At the core of any blockchain applica- tion is a BFT consensus protocol which states that given a client transaction, the aim of this consensus protocol is to ensure all the non-faulty replicas assign the same order to this trans- action. Depending on the underlying topology, we can broadly categorize consensus protocols into two categories: permissionless consensus protocols and permissioned consensus protocols.Achieving fault-tolerant distributed consensus is an age-old problem. Commit protocols such as Two-Phase Commit (Gray 1978), Three-Phase Commit (Skeen 1982) and Easy- Commit (Gupta and Sadoghi 2018, 2020) help in reaching agreement among the participants in a parti- tioned distributed databases (Qadah and Sadoghi 2018; Qadah et al 2020; Sadoghi and Blanas 2019). However, commit protocols can only handle node failures and are unsafe under message delay or loss. Paxos (Lamport 1998) and View- stamped Replication (Oki and Liskov 1988) allow a distributed system of replicas to achieve consensus in the presence of crash-faults . In a system ofnreplicas, a system employing Paxos for consensus can handle up to nfailures where n2f+1. Notice that these ffailures need not be simple replica crashes but can also take form of message losses and delays. However, crash-fault tolerant protocols such as Paxos and Viewstamped Replication cannot handle any malicious behavior. A byzantine-fault tolerant protocol aims at reaching consensus in a system ofnreplicas where at most freplicas can act as byzantine and n3f+1. Traditional BFT protocols promote aprimary-backup model where one replica is designated as the primary and other replicas act as backups. It is the task of the primary to initiate consensus among all the backups. Notice that all the above discussed protocols, such as Two-Phase Commit, Paxos and so on, follow the primary-backup model. The key reason primary-backup model is preferred is because of its simplicity and its ability to blame the primary for an unsuccessful consensus. 6 Suyash Gupta, Mohammad Sadoghi Fig. 3: Blockchain Flow: Three main phases in any blockchain application are represented. (a) Client sends a transaction to one of the server, which it disseminates to all the other servers. (b) Servers run the underlying consensus protocol, to determine the block creator. (c) New block is created, and transmitted to each node, which also implies adding to global ledger. Recent blockchain applications present several new protocols for achiev- ing consensus: Proof-of-Work (Jakob- sson and Juels 1999; Satoshi 2008), Proof-of-Stake (King and Nadal 2012) and Proof-of-Authority (Parity Tech- nologies 2018). Prior works have shown that these consensus protocols provide similar guarantees as traditional BFT protocols (Garay et al 2015). Hence, in the rest of this section, we illustrate some of the state-of-the-art blockchain protocols for both permissioned and permissionless systems. Permissioned Consensus A decade prior to the inception of the first blockchain application, the problem of achieving fault-tolerant distributed consensus problem had already excited practitioners and researchers (Lamport 1998; Oki and Liskov 1988; Castro and Liskov 1999). Distributed systems research community agreed that a byzantine-fault tolerant system can only be considered correct if it is both safeandlive. A replicated system is called assafe if all its replicas are consistent, that is, have the same state. A replicated system is termed as liveif its replicas are able to make progress, that is, process incoming client requests. A majority of existing BFT protocols guarantee safety under asynchronous environment, that is, messages can get loss, delayed or duplicated, and up to freplicas may act byzantine. Further, any BFT protocol employs cryptographic constructs to prevent malicious replicas from impersonating non-faulty replicas. As clients send their transactions to other replicas, so each client uses digital signatures to sign its message (Menezes et al 1996; Katz and Lindell 2007). For all other messages, depending on the algorithmic steps, the system can employ either asymmetric-key digital signatures or less-expensive symmetric-key message authentication codes (Katz and Lindell 2007). Hence, we assume authenticated communication : malicious replicas can impersonate each other, but no replica can impersonate a non-faulty replica. Further, replicas will accept only those Blockchain Transaction Processing 7 messages which are well-formed, that is, have valid message authentication codes or digital signatures (as applicable). PBFT. Practical Byzantine Fault Tol- erance (Castro and Liskov 1999) if often considered as the first protocol to present a practical design for achieving byzan- tine fault-tolerance in a distributed sys- tem. P BFT follows the primary-backup model where the primary replica initi- ates the consensus among all the repli- cas. It is the responsibility of the primary to ensure all the backup replicas success- fully order every incoming client trans- action otherwise it risks replacement. If the primary is non-malicious and the net- work is reliable, P BFT guarantees con- sensus in three phases. PBFTprotocol starts when a client C wants a transaction to be executed and sends a request mto the primary replica P. The primary Pchecks if the client signature is valid and if this is the case, it creates a P RE-PREPARE message and sends that message to all the backups. This P RE-PREPARE message includes a sequence number (an integer) and a hash of the client request. The sequence num- berkstates the order to execute the trans- action while the hash acts as a digest, which can be used in future communica- tions as an alias for the client request3. When a replica Rreceives a PRE-PREPARE message from the pri- maryP, it performs the following checks: (i) verifies the client signature onm, (ii) checks if Pis the primary, and (iii) ensures the sequence number khas not already been used. If the PRE-PREPARE message passes all the checks, Ragrees to support primary’s order for this request and sends a 3Client requests are often of the order of several kilobytes and sending an hash instead optimizes the communication.PREPARE message to all the replicas. When a replica Rreceives P REPARE messages from 2 freplicas in support of the request msent by P, thenR marks the request as prepared . This information gives Ran assurance that a majority of non-faulty replicas are also agreeing to order this request at sequence k. Next,Racknowledges the prepared request by sending a C OMMIT message to all the replicas. When a replicaRreceives C OMMIT messages from 2 f+1 replicas, then Rachieves a unique guarantee on the order of m, that is, a majority of non-faulty replicas have also prepared m. This allows replica R to go ahead and execute the request m as the k-th request. Finally, Rsends the result of executing mas a response to the client C. The client Cneeds f+1 matching responses from distinct replicas, to mark its request mas complete. It is possible that the client may not receive sufficient number of matching responses. To handle such cases, the client initiates a timer prior to sending its request. In specific, each client waits on a timer for receiving f+1 identical responses. If the client timeouts while waiting forf+1 responses, then it forwards its request mto all the replicas. When abackup replica Rreceives a client request m, it forwards that request to the primary Pand starts its timer. If P fails to send a P RE-PREPARE message corresponding to m, thenRconcludes thatPis byzantine and initiates pri- mary replacement. Existing literature terms this primary replacement process asview-change because each primary represents a view of the system. The view-change protocol only starts when at least f+1 replicas are ready to replace the primary. This condition is 8 Suyash Gupta, Mohammad Sadoghi necessary as up to freplicas can be byzantine and may even request replace- ment of a non-faulty primary. Hence, when at least f+1 replicas request replacement, remaining replicas assume that there is at least one non-faulty replica which has been affected. For a successful view-change to take place, a new primary has to be selected. PBFT follows a simple principle: if the replica with index iis the current pri- mary, then replica with index jwill be the next primary, where j= (i+1)mod n. But, how does a replica concludes that it is time for it to act as the new primary. When any replica Rreceives VIEW-CHANGE messages from 2 f+1 distinct replicas that want to elect it as the primary, then it initiates the process of switching to next view. Notice that the process of switching to next view re- quires ensuring all the replicas have the common state. Thus, the new primary also needs to provide this information as part of the N EW-VIEW message. Zyzzyva. It is evident from P BFT’s design that it requires three phases of communication of which two necessitate quadratic communication complexity. Hence, there is a need for optimized protocols, which can achieve the same goals with much lesser communication overheads. Z YZZYVA (Kotla et al 2007) presents a twin-path protocol that achieves consensus in a single linear phase if there are no failures. All the replicas in the Z YZZYVA start in the fast-path and switch to the slow-path under failures. Note that a recent work has illustrated that Z YZZYVA is unsafe under failures (Abraham et al 2017). In Z YZZYVA , when a non-primary replica Rreceives a P RE-PREPARE message from the primary P, it as- sumes that the primary is non-faulty andagrees to execute this request. Such an execution is termed as speculative as the replica Ris unaware of the state at other replicas. In specific, a byzantine primary could have equivocated and sent different replicas distinct client requests. Once the replica Rexecutes the request, it sends the reply to client C. The client Cmarks the request complete if it receives matching identical responses from at least 3 f+1 replicas. A keen reader can easily notice that the onus is on the client to ensure system is safe. Further, when n=3f+1, then the client has to wait for responses from all the replicas. Due to these restrictions, ZYZZYVA ’s fast-path works only if there are no failures. In Z YZZYVA , the client waits on a timer while ex- pecting 3 f+1 responses. If the client timeouts prior to receiving responses, then it initiates the slow-path . In the slow-path, client has to summarize the state it received from different replicas and needs to decide whether primary replacement needs to be initiated or a simple recovery protocol is sufficient to ensure system remains live. Clearly, the slow-path is no longer linear and requires multiple phases. Moreover, if the client is malicious, then the replicas could be momentarily unsafe until there is a good client. Another key challenge with twin-path protocols is finding the optimal timeout value. Prior works have shown that finding a timeout value can be hard and Z YZZYVA faces severe reduction is throughput under failures (Clement et al 2009a,b; Gupta et al 2021a). SBFT.The key aim behind the design of S BFT (Golan Gueta et al 2019) is to make a consensus protocol that can guarantee safe consensus with linear message complexity in periods of no Blockchain Transaction Processing 9 failures. In fact, like Z YZZYVA , SBFTis also a twin-path protocol. S BFTemploys threshold signatures to achieve linear communication complexity. Threshold signatures are based on asymmetric cryptography. In specific, each replica holds a distinct private key , which it can use to create a signature share . Next, one can produce a valid threshold signature given at least tsuch signature shares from distinct replicas (the exact value of tis dependent on the underlying consensus protocol). At a closer look, it seems like S BFT requires more phases than P BFT. This occurs because S BFT linearizes each phase of P BFT through use of threshold signatures. In S BFT, when a replica R receives a P RE-PREPARE message, it agrees to support from the primary’s sequence by generating a threshold share. The replica Rsends this share to a specific replica designated as the collector . When a collector receives message from at least 3 f+2c+1 repli- cas it generates a threshold signatures and sends this signature to all the repli- cas. When a replica receives a threshold signature from the collector, it executes the request to generate a response, cre- ates a threshold share on this response and sends these to a specific replica designated as the executor . The executor waits for f+1 identical responses and combines them into threshold signature. Next, the executor sends this signature to all the replicas and clients. For S BFT’s fast path to work as stated, either there should be no failures or at least 3 f+2c+1 replicas should participate in consensus where up to c>0 replicas can crash-fail (no byzan- tine failures). Moreover, the primary can act as both collector and executor but SBFT suggests using distinct replicas infast path. If the collector timeouts wait- ing for threshold shares from 3 f+c+1 replicas, it switches to the slow path, which requires two additional linear phases to complete consensus. HotStuff. In any primary-backup BFT protocol, if the primary acts malicious, then the protocols employ the accompanying view-change algorithm to detect and replace the malicious primary. This view-change algorithm leads to a momentary disruption in system throughput until the resumption of service. HOTSTUFF (Yin et al 2019) proposes eliminating the dependence of a BFT consensus protocol from one primary by replacing primary at the end of every consensus. Although this rotating leader design escapes the cost of a view-change protocol, it enforces an implicit sequen- tialparadigm. Each primary needs to wait for its turn before it can propose a new request. In H OTSTUFF , in round i, the replica with identifier imod nacts as the pri- mary and proposes a request to all the replicas. Each replica on receiving this request, creates a threshold share and sends to the replica Rwith identifier (i+1)mod n. IfRreceives threshold shares from 2 f+1 replicas, then it com- bines them into a threshold signature and initiates the consensus for round i+1 by broadcasting its proposal along with the computed threshold signature. No- tice that replicas have not executed the request and replied to the client. H OT- STUFF ’s aim is to linearize the consen- sus proposed by P BFT protocol, which it does by splitting each phase of P BFT into two using threshold signatures. To reduce the communication, it chains the phases. Hence, a replica executes the re- quest for the i-th round once it receives 10 Suyash Gupta, Mohammad Sadoghi a threshold signature from the primary of(i+3)-th round. Evidently, chaining helps H OTSTUFF to some extent but it does not eliminate its sequential nature. This sequential nature forces H OTSTUFF to loose out on an opportunity to process messages out-of-order. PoE. Proof-of-Execution (henceforth referred to as P OE) consensus protocol aims at achieving consensus in three linear phases without relying on any twin-path model (Gupta et al 2021a). Further, P OE recognizes that no one size fits all systems (Singh et al 2008). Hence, its design is independent of the choice of underlying cryptographic signature scheme. This implies that the POE protocol can employ both sym- metric and asymmetric-cryptographic signature schemes depending on the application environment. The design of P OE is built on three key insights. First, P OE prevents use of any twin-path paradigm as switching from fast to slow-path requires depen- dence on timeouts, which degrades system performance. Second, P OE allows replicas to speculatively execute the requests but facilitates rollbacks in case of inconsistencies. Final, P OE allows out-of-order processing, which eliminates any bottlenecks associated with sequential consensus protocols. For the sake of brevity, we will de- scribe P OE built on top of threshold sig- natures. In P OE, the client Cinitiates execution by sending its request mto the primary P. To initiate replication and execution of mas the k-th transaction, the primary proposes mto all replicas by broadcasting a P ROPOSE message. After a replica Rreceives a P ROPOSE message from P, it checks whether at least 2 fother replicas also received the same proposal from P. To perform thischeck, each replica agrees to support the first k-th proposal it receives from the primary by sending a S UPPORT message that includes its unique threshold share to the primary. The primary Pwaits for 2f+1 threshold shares, and on receiv- ing such shares, it combines them into athreshold signature and broadcasts as a C ERTIFY message. When a replica Rreceives the C ERTIFY message, it view-commits tomas the k-th transaction in view v. AfterRview-commits to m, Rschedules speculative execution of m. Consequently, mwill be executed by Rafter all preceding transactions are executed. After execution, Rinforms the client of the order of execution and of any execution result. A client considers its transaction successfully executed after it receives identical response messages from 2 f+1 distinct replicas. Aardvark. The design philosophy behind Aardvark is distinct in compari- son to existing BFT protocols (Clement et al 2009b). It aims at building a robust BFT protocol that can continue performing under failures. Hence, in the failure-free cases, Aardvark attains lower throughput than a majority of the existing BFT protocols. In Aardvark, prior to sending its request to the primary, the client signs the request using both digital signatures and message authentication codes. This prevents malicious clients from performing a denial-of-service attack as it is expensive for client to sign each message twice. Aardvark also employs apoint-to-point network rather than the multicast network for exchange of messages among clients and replicas. The key intuition behind such a choice is to disallow a faulty client or replica from blocking the complete network. Blockchain Transaction Processing 11 Aardvark also periodically changes the primary replica. Each replica tracks the throughput of the current primary and suggests replacing the primary when there is a decrease in its throughput. To perform such tracking, each replica sets a timer and measures the rate of primary’s responses. RBFT. The key intuition behind the design of R BFT is to facilitate detection ofclever malicious primaries (Aublin et al 2013). R BFTextends Aardvark and aims to detect those malicious primaries, which cannot be detected by simple timers suggested by Aardvark. In Aardvark, a clever primary can avoid detection by delaying messages just slightly below the timeout threshold. Such a primary can throttle the system throughput without risking eviction. To tackle this challenge, R BFT insists running f+1 independent instances of the Aardvark protocol on each replica. One of these instances is designated as themaster while other instances act as backups . Irrespective of the designation of an instance, all the instances order all the requests. However, only the master instance executes the requests. The key task of the backup instances is to monitor the performance of the master instance. If any backup instance observes a degradation of the system throughput at the master, it broadcasts a message to elect a new primary. Further, to guarantee at least one of the f+1 instances is led by a non-faulty replica, RBFT requires each instance to be led by a distinct replica. In comparison to both P BFTand Aardvark, R BFTrequires an additional phase, which is used to propagate the client requests across all the replicas. RCC. Although R BFT successfully utilizes redundancy to detect clevermalicious primaries, it also wastes excessive bandwidth by requiring all the instances to order the same set of requests. Resilient Concurrent Consensus (henceforth referred to as RCC) paradigm resolves this issue by parallelizing the consensus (Gupta et al 2019b, 2021b). In specific, R CCruns at each replica multiple instances of a primary-backup protocol. The key challenge with the design of primary-backup protocols is their re- liance on the primary. This dependence can severely affect the throughput and scalability of these protocols. The pri- mary replica not only receives all client requests but is also responsible for en- suring consensus is reached on the order for these requests among all other repli- cas. If the primary fails to ensure consen- sus, then all remaining replicas need to replace this primary. This replacement process is necessary as, without it, non- faulty replicas may never converge. Un- fortunately, primary replacement is not cheap, as it requires pausing consensus on all outstanding requests until the pri- mary is replaced. RCCaims at making a BFT consen- sus primary agnostic. To achieve such a property, R CCadvocates running zpar- allel instances at each replica. Further, RCCensures that each instance is man- aged by a distinct replica. Using par- allelization, R CCensures that the non- faulty replicas are always accepting and ordering client requests , this indepen- dent of any malicious behavior or attack. We now present the design of R CC paradigm that parallelizes the seminal PBFT consensus protocol. For the sake of explanation, we assume R CCworks inrounds . Each round of R CCincludes three stages :parallel consensus ,unifi- cation , and execution . The notion of a 12 Suyash Gupta, Mohammad Sadoghi round helps in generating a common or- der and recovering from instance failures but it does not prevent individual pri- maries from working independently. Prior to any round, R CCrequires each replica to prepare to run zinstances of P BFT protocol in parallel. A round rbegins when the primary of each in- stance proposes a client request. Firstly, in the parallel consensus stage, each instance runs P BFTon its client request. Secondly, in the unification stage, the replica waits for all its zinstances to complete replication (reach consensus on their respective requests). If every in- stance successfully replicates a request, then a common order for execution of these requests is determined. If one or more instances are unable to replicate requests, then the primaries for those instances must be faulty and recovery is initiated. Finally, in the execution stage, each replica executes all the client requests in the common order. GeoBFT. Existing BFT protocols do not distinguish between the local and global communication, which is a nec- essary requirement to enable geo-scale deployment of a blockchain system. To resolve this challenge, Geo-Scale Byzan- tine Fault-Tolerant consensus protocol (henceforth referred to as G EOBFT) that uses topological information to group all replicas in a single region into a single cluster (Gupta et al 2020b). Likewise, GEOBFTassigns each client to a single cluster. This clustering helps in attaining high throughput and scalability in geo- scale deployments. G EOBFToperates in rounds, and in each round, every clus- ter will be able to propose a single client request for execution. Each round con- sists of the three steps: local replication , global sharing , and ordering and execu- tion, which we further detail next.At the start of each round, each cluster chooses a single transaction of a local client. Next, each cluster locally replicates its chosen transaction in a Byzantine fault-tolerant manner using PBFT. At the end of successful local replication, P BFT guarantees that each non-faulty replica can prove successful local replication via a commit certificate . Next, each cluster shares the locally- replicated transaction along with its commit certificate with all other clusters. To minimize inter-cluster communication, we use a novel op- timistic global sharing protocol . Our optimistic global sharing protocol has a global phase in which clusters exchange locally-replicated transactions, followed by a local phase in which clusters distribute any received transactions locally among all local replicas. Finally, after receiving all transactions that are locally-replicated in other clusters, each replica in each cluster can determin- istically order all these transactions and proceed with their execution . After execution, the replicas in each cluster inform only local clients of the outcome of the execution of their transactions (e.g., confirm execution or return any execution results). Permissionless Consensus Permissionless applications inspired by Nakamoto’s Bitcoin (Satoshi 2008) ad- vocate a public blockchain system where any replica can participate in the consen- sus. Hence, the identity of a participat- ing replica can be protected. This design property requires the underlying consen- sus protocol used to order the transac- tions to expend the resources of a partic- Blockchain Transaction Processing 13 ipant. In specific, each participant needs to spend some of its resources if it wants to propose the next block. If such a re- source consumption is not enforced, then a malicious participant can create multi- ple pseudonymous identities and subvert the system, also known as the Sybil at- tack (Douceur 2002). Proof-of-Work. Bitcoin relies on the Proof-of-Work (henceforth referred to as P OW) protocol to achieve consensus among a set of replica. P OW protocol builds on top of a simple intuition “What is mathematically hard to compute but easy to verify?” Hence, P OW protocol requires the computation to be expen- sive, that is, it should deplete some resources of the prover . In P OW protocol, the participating nodes compete among themselves to propose the next block by solving a complex puzzle. In nature, several computationally hard problems exist, such as Diophantine Equation, RSA Factorization, One-way Hash Functions, and so on. Among these hard problems, following the Nakamoto’s vision, P OW protocol is associated with the computa- tion of one-way hash functions such as computation of a 256-bit SHA3 value. When a node Nsuccessfully computes this hash value, it disseminates this so- lution to all other nodes for verification. Any node can verify this solution to check N’s claim. The main critic behind P OW’s design is that leads to excessive wastage of energy. Permissionless applications that employ P OW consensus have to set large targets to prevent Sybil attacks. Further, P OW’s design facilitates unfair practices—higher the computational capabilities a node has higher are its chances of solving the complex puzzle. Such a design promotes pooling ofresources where several nodes work together to compute the hash. Moreover, a node has to be given incentives to participate in the P OW consensus. If the incentives are not sufficient, then nodes may decline creating the next block, which in turn can either stall the system or compromise its security. Another issue with the P OW consen- sus protocol is that it can lead to tricky situations where it is hard to determine the next block in the chain. For instance, two nodes N1andN2may solve the com- plex puzzle at the same time. In such a case, it is possible that one half of the remaining participants may receive a so- lution from N1before N2while the other half receives solution from N2before N1. To handle this scenario, some form of resolution mechanism is needed, which would lead to wastage of resources of either N1orN2as both of their blocks cannot be appended to the chain. Notice that any new block added to the chain in- cludes the hash of the previous block. Proof-of-Stake. In P OW protocol, miners have to deplete their computa- tional resources in order to earn the right to create the next block. Each miner who controls a fraction sof the total computational power, has a probability nearly equal to sto create the next block. Proof-of-Stake (henceforth referred to as P OS) presents a principle that contrasts the resource usage philoso- phy of P OW. In a blockchain system employing P OS protocol, a replica possessing a higher stake than the other replicas gets a chance to create a new block (Bentov et al 2016). In specific, the probability a replica possessing a fraction sof the total stakes in the system creates the next block is s. The key security rationale behind P OS is that replicas who have some stake involved 14 Suyash Gupta, Mohammad Sadoghi in the system are also well-suited to ensure its security. PPCoin or PeerCoin (King and Nadal 2012) is often regarded as the first implementation of P OS. The key motivation behind PPCoin’s design was to implement a crypto-currency that does not require participating replicas to spend its resources in performing large computations. Initial P OS-based design were based on the notion of coinage . In specific, a replica’s ability to create the next block is determined on its value of coinage. Coinage is calculated on the basis of number of days a replica has held some coins or stake. To pre- vent Sybil attacks, P OS-based systems require replicas to algorithm requires a node to spend its coinage if it wants to propose the next block. Initial implementations of the P OS protocol lacked the fairness criterion. This is evident as the replica with the highest stake gets the chance to propose the next block. Although a high stake replica looses its coinage once it creates the next block, it may create the subse- quent block if its stake is much larger in value than that of the other replicas. To resolve this issue, a chain-based variant of P OS algorithm has been pro- posed. The chain-based P OS protocol employs a psuedo-random algorithm to select a validator, which then creates a new block and adds it to the existing chain of blocks. The frequency of selecting the validator is set to some pre-defined time interval. Another vari- ant of P OS algorithm follows BFT-style consensus. In this design, the replicas participate in a BFT protocol to select the next valid block. Here, validators are given right to propose the next block, at random. The key difference between these algorithms is the synchrony re-quirement; chain-based POS algorithms are inherently synchronous, while BFT-style POS is partially synchronous. Another keychallenge for P OS-based designs is an attack by rational stake- holders. A rational replica would always aim at maximizing its profit, an expected behavior in a democracy in correspon- dence with the Nash equilibrium Bentov et al (2016). Rational replicas can affect the security of P OS, as in at attempt to maximize their gains, they may partici- pate in multiple chains. A rational miner could get blocks from distinct forks of the blockchain. To maximize its returns, a miner would attempt to propose the next block for each such fork. As miners don’t lose any actual resources (like computational energy in P OW), so they are free to propose blocks on different chains. This could lead to an ever-expanding divergent network. Proof-of-Authority. A variation of POS algorithm to be employed in hybrid blockchain topologies is termed as Proof-of-Authority (henceforth referred as P OA) (Parity Technologies 2018). The key idea is to designate a set of nodes as the authorities or leaders. These authorities are entrusted with the task of creating new blocks and validating the transactions. P OA marks a block as part of the blockchain if it is signed by majority of the authorized nodes. The incentive model in P OA highlights that it is in the interest of an authority node to maintain its reputation. In case an authority acts malicious, it can loose its status and periodic incentives. Hence, POA does not select nodes based on their claimed stakes. Proof-of-Space. A consensus al- gorithm orthogonal to the design proposed by P OW is proof-of-space Blockchain Transaction Processing 15 orproof-of-capacity (henceforth re- ferred as P OC) (Ateniese et al 2014; Dziembowski et al 2015). POC expects nodes to provide a proof that they have sufficient “storage” to solve a computational problem. P OC al- gorithm targets computational problems such as hard-to-pebble graphs (Dziem- bowski et al 2015) that need large amount of memory storage to solve the problem. In the P OC algorithm, the verifier first expects a prover to commit to a labeling of the graph, and then it queries the prover for random locations in the committed graph. The key intuition behind this approach is that unless the prover has sufficient storage, it would not pass the verifica- tion. SpaceMint (Park et al 2015)—a POC-based cryptocurrency—claims that P OC based approaches are more resource efficient in comparison to P OW as storage consumes less energy. Blockchain Systems We now briefly look at the design of some of the state-of-the-art blockchain applications and fabrics. The key aim of this section is to illustrate the differ- ent design practices adopted by existing blockchain systems. Bitcoin (Satoshi 2008) is regarded as the first ever blockchain application. It is a cryptographically secure digital currency designed with the aim of dis- rupting the traditional institutionalized monetary exchange. Bitcoin acts as the token of transfer between two parties undergoing a monetary transaction. The underlying blockchain system is a net- work of nodes (also known as miners ) that take a set of client transactionsand validate the same by demonstrating aproof-of-work , that is generating a block. The process of generating the next block is non-trivial and requires large computational resources. Hence, the miners are given incentives (such as Bitcoins) for dedicating their resources and generating the block. Each miner maintains locally an updated copy of the complete blockchain and the associated ledgers for every Bitcoin user. To ensure Bitcoin system remains fair towards all the machines, the dif- ficulty of proof-of-work challenge is periodically increased. Prior works have illustrated that Bitcoin is vulnerable to 51% attack, which can lead to double spending (Rosenfeld 2014). The in- tensity of such attacks increases when multiple forks of the longest chain are created. To avoid these attacks, Bitcoin developers suggest the clients to wait for their block to be confirmed before they mark the Bitcoins as transferred. This wait ensures that the specific block is a little deep (nearly six blocks) in the longest chain (Rosenfeld 2014). Bitcoin critics also argue that its proof-of-work consumes huge energy4and may not be a viable solution for future. Ethereum (Wood 2015) is blockchain framework that permits users to create their own applica- tions ( smart-contracts ) on top of the Ethereum Virtual Machine (EVM). Ethereum utilizes the notion of smart contracts to facilitate development of new operations. It also supports a digital cryptocurrency, ether , which is used to incentivize the developers to create correct applications. One of the key advantage of Ethereum is that it 4As per some claims one Bitcoin transaction consumes power equivalent to that required by 1:5 American homes per day. 16 Suyash Gupta, Mohammad Sadoghi supports a Turing complete language to generate new applications on top of EVM. At the time of writing this article, Ethereum employs a variant of POW protocol to achieve consensus among its miners. Ethereum makes its miners solve challenges that were not only computational intensive, but also memory intensive. This design prevented existence of miners who utilized specially designed hardware for compute intensive applications. In future, Ethereum Foundation aims to switch to a variant of P OS protocol to reach consensus among its replicas. The modified protocol is referred to asCasper (Buterin and Griffith 2017). Casper introduces the notion of final- ity, that is, it ensures that one chain becomes permanent in time. It also introduces the notion of accountability , which penalizes any validator that at- tempts the nothing-at-stake attack. The penalty leveraged on such a validator is equivalent to negating all his stakes. Parity (Parity Technologies 2018) is an application designed on top of Ethereum. It provides an interface for its users to interact with the Ethereum blockchain. Parity allows its blockchain community to use either Proof-of-Work andProof-of-Authority to reach consen- sus in their applications. Hence, if some users select P OA consensus, then Parity provides mechanisms for setting up the authority nodes. Ripple (Schwartz et al 2014) is con- sidered as third largest cryptocurrency after Bitcoin and Ethereum in terms of market cap. It employs a consensus algorithm which is a simple variant of existing traditional BFT algorithms. Ripple requires number of failures fto be bounded as follows: (n1)=5+1, where nrepresents the total number ofnodes. Ripple’s consensus algorithm introduces the notion of a Unified Node List (UNL), which is a subset of the network. Each server communicates with the nodes in its UNL for reaching a consensus. The servers exchange the set of transactions they received from the clients and propose those transactions to their respective UNL for vote. If a transaction receives 80% of the votes, it is marked permanent. Notice that if the generated UNL groups are a clique then forks of the longest chain could co-exist. Hence, UNLs are created in a manner that they share some set of nodes. Another noteworthy observation about Ripple protocol is that each client needs to select a set of validators or unique nodes that they trust. These validators utilize the ripple consensus algorithm to verify the transactions. Hyperledger (Cachin 2016) is a suite of resources aimed at modeling industry standard blockchain applica- tions. It provides a series of Application Programming Interfaces (APIs) for de- velopers to create their own non-public blockchain applications. Hyperledger provides implementations of blockchain systems that uses RBFT and other vari- ants of the PBFT consensus algorithm. It also facilitates use and development of smart contracts. It is important to understand that the design philosophy of Hyperledger leans towards blockchain applications that require existence of non-public networks, and so, they do not need a compute intensive consensus. ResilientDB (Gupta et al 2020c; Rahnama et al 2020) is a state-of-the-art permissioned blockchain fabric, which is designed with the aim of foster- ing academic and industry research. RESILIENT DB also acts as a reliable test-bed to implement and evaluate Blockchain Transaction Processing 17 HASHINGTOOLKIT SIGNINGTOOLKITSECURE LAYER STORAGE LAYER BLOCKCHAIN METADATA THREADSBFT CONSENSUS EXECUTION LAYER NETWORKQUEUES Fig. 4: Architecture of R ESILIENT DB. enterprise-grade blockchain applica- tions5. R ESILIENT DB evolved from the ExpoDB platform (Sadoghi 2017; Gupta and Sadoghi 2018) which is an experimental research platform to design and test emerging database tech- nologies, agreement and concurrency control protocols. In Figure 4, we illustrate the overall architecture of R ESILIENT DB, which lays down an efficient client-server architecture. At the application layer , we allow multiple clients to co-exist, each of which creates its own requests. For this purpose, they can either em- ploy an existing benchmark suite or design a Smart Contract suiting to the active application. Next, clients and replicas use the transport layer to exchange messages across the net- work. R ESILIENT DB also provides a storage layer where all the metadata corresponding to a request and the blockchain is stored. At each replica, there is an execution layer where the underlying consensus protocol is run on the client request, and the request is ordered and executed. During ordering, 5RESILIENT DB is open-sourced at https://resilientdb.com and code is available at https://github.com/resilientdb. 4 8 16 32 Number of Replicas406080100120140160Throughput (KTxns/s) ResilientDB ZyzzyvaFig. 5: Two permissioned applications employing distinct BFT protocols (80K clients per experiment). thesecure layer provides support for cryptographic constructs. RESILIENT DB is written entirely in C++ and provides a graphical user inter- faceto ease user interaction with the sys- tem. Further, it also provide a Docker- ized deployment that allows any user to experience and test the R ESILIENT DB fabric (comprising of multiple replicas and clients) on its local machine. The key motivation behind R E- SILIENT DB’s design was to show that a system-centric permissioned blockchain fabric can outperform a protocol-centric blockchain fabric even if the former is made to employ a slow consensus 18 Suyash Gupta, Mohammad Sadoghi protocol. To prove this claim, we refer to Figure 5, which compares the through- put achieved by two permissioned fabrics. In this figure, R ESILIENT DB employs the slow P BFT protocol while the other fabric adopts the practices sug- gested in the paper BFTSmart (Bessani et al 2014) and employs the single-phase linear Z YZZYVA protocol. Despite this disadvantageous choice of consensus protocol, R ESILIENT DB achieves a throughput of 175K transactions per second, scales up to 32 replicas, and attains up to 79% more throughput. Future Directions for Research Although blockchain technology is just a decade old, it gained majority of its momentum in the last five years. This allows us to render different elements of the blockchain systems and achieve higher performance and throughput. Some of the plausible directions to develop efficient blockchain systems are: (i) reducing the communication messages, (ii) defining efficient block structure, (iii) improving the consensus algorithm, and (iv) designing secure light-weight cryptographic functions Statistical and machine learning approaches have presented interesting solutions to automate key processes such as Face Recognition (Zhao et al 2003), Image classification (Krizhevsky et al 2012), Speech Recognition (Graves et al 2013) and so on. The tools can be leveraged to facilitate easy and efficient consensus. The intuition behind this approach is to allow learning algorithms to select nodes, which are fit to act as a block creator and prune the rest from the list of possible creators. The keyobservation behind such a design is that the nodes selected by the algorithm are predicted to be non-malicious. Machine learning techniques can play an impor- tant role in eliminating the human bias and inexperience. To learn which nodes can act as block creators, a feature set, representative of the nodes, needs to be defined. Some interesting features can be: geographical distance, cost of com- munication, available computational resources, available memory storage and so on. These features would help in generating the dataset that would help to train and test the underlying machine learning model. This model would be ran against new nodes that wish to join the associated blockchain application. The programming languages and software engineering communities have developed several works that provide semantic guarantees to a language or an application (Wilcox et al 2015; Leroy 2009; Kumar et al 2014). These works have tried to formally verify (Keller 1976; Leroy 2009) the system using the principles of programming languages and techniques such as finite state automata, temporal logic and model checking (Grumberg and Long 1994; Baier and Katoen 2008). We believe similar analysis can be performed in the context of blockchain applications. The- orem provers (such as Z3 (De Moura and Bjørner 2008)) and proof assis- tants (such as COQ (Bertot 2006)) could prove useful to define a certified blockchain application. A certified blockchain application can help in stat- ing theoretical bounds on the resources required to generate a block. Similarly, some of the blockchain consensus has been shown to suffer from Denial of Ser- vice attacks (Bonneau et al 2015), and a formally verified blockchain application Blockchain Transaction Processing 19 can help realize such guarantees, if the underlying application provides such a claim. References Abraham I, Gueta G, Malkhi D, Alvisi L, Kotla R, Martin J (2017) Revisiting fast practical byzantine fault tolerance. URL https:// arxiv.org/abs/1712.01367 Androulaki E, Barger A, Bortnikov V , Cachin C, Christidis K, Caro AD, Enyeart D, Ferris C, Laventman G, Manevich Y , Muralidha- ran S, Murthy C, Nguyen B, Sethi M, Singh G, Smith K, Sorniotti A, Stathakopoulou C, Vukolic M, Cocco SW, Yellick J (2018) Hyperledger fabric: A distributed operating system for permissioned blockchains. CoRR abs/1801.10228, URL http://arxiv. org/abs/1801.10228 Ateniese G, Bonacina I, Faonio A, Galesi N (2014) Proofs of space: When space is of the essence. In: Abdalla M, De Prisco R (eds) Security and Cryptography for Networks, Springer International Publishing, pp 538– 557 Aublin PL, Mokhtar SB, Qu ´ema V (2013) RBFT: Redundant Byzantine Fault Toler- ance. In: Proceedings of the 2013 IEEE 33rd International Conference on Distributed Computing Systems, IEEE Computer Soci- ety, ICDCS ’13, pp 297–306 Baier C, Katoen JP (2008) Principles of Model Checking (Representation and Mind Series). The MIT Press Bentov I, Gabizon A, Mizrahi A (2016) Cryp- tocurrencies without proof of work. In: Clark J, Meiklejohn S, Ryan PY , Wallach D, Brenner M, Rohloff K (eds) Financial Cryp- tography and Data Security, Springer Berlin Heidelberg, Berlin, Heidelberg, pp 142–157 Bertot Y (2006) Coq in a Hurry. CoRR abs/cs/0603118, URL http://arxiv. org/abs/cs/0603118 ,cs/0603118 Bessani A, Sousa J, Alchieri EEP (2014) State machine replication for the masses with bft- smart. In: DSN Bonneau J, Miller A, Clark J, Narayanan A, Kroll JA, Felten EW (2015) SoK: Research Perspectives and Challenges for Bitcoin andCryptocurrencies. In: Proceedings of the 2015 IEEE Symposium on Security and Pri- vacy, IEEE Computer Society, Washington, DC, USA, SP ’15, pp 104–121 Buterin V , Griffith V (2017) Casper the Friendly Finality Gadget. CoRR abs/1710.09437, URL http://arxiv.org/abs/ 1710.09437 ,1710.09437 Cachin C (2016) Architecture of the Hyper- ledger blockchain fabric. In: Workshop on Distributed Cryptocurrencies and Consen- sus Ledgers, DCCL 2016 Cachin C, Vukolic M (2017) Blockchain Consensus Protocols in the Wild. CoRR abs/1707.01873 Castro M, Liskov B (1999) Practical byzantine fault tolerance. In: Proceedings of the Third Symposium on Operating Systems Design and Implementation, USENIX Association, Berkeley, CA, USA, OSDI ’99, pp 173–186 Clement A, Kapritsos M, Lee S, Wang Y , Alvisi L, Dahlin M, Riche T (2009a) Upright clus- ter services. In: Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles, ACM, SOSP, pp 277– 290, DOI 10.1145/1629575.1629602 Clement A, Wong E, Alvisi L, Dahlin M, Marchetti M (2009b) Making byzantine fault tolerant systems tolerate byzantine faults. In: Proceedings of the 6th USENIX Symposium on Networked Systems Design and Implementation, USENIX Association, NSDI, pp 153–168 De Moura L, Bjørner N (2008) Z3: An Effi- cient SMT Solver, Springer Berlin Heidel- berg, Berlin, Heidelberg, pp 337–340 Decker C, Wattenhofer R (2013) Information Propagation in the Bitcoin Network. In: 13th IEEE International Conference on Peer-to- Peer Computing (P2P), Trento, Italy Douceur JJ (2002) The sybil attack. In: Pro- ceedings of 1st International Workshop on Peer-to-Peer Systems (IPTPS) Dziembowski S, Faust S, Kolmogorov V , Pietrzak K (2015) Proofs of space. In: Ad- vances in Cryptology – CRYPTO 2015, Springer Berlin Heidelberg, pp 585–605 Garay J, Kiayias A, Leonardos N (2015) The Bitcoin Backbone Protocol: Analysis and Applications, Springer Berlin Heidelberg, Berlin, Heidelberg, pp 281–310 Golan Gueta G, Abraham I, Grossman S, Malkhi D, Pinkas B, Reiter M, Seredin- schi D, Tamir O, Tomescu A (2019) Sbft: 20 Suyash Gupta, Mohammad Sadoghi A scalable and decentralized trust infras- tructure. In: 49th Annual IEEE/IFIP Interna- tional Conference on Dependable Systems and Networks (DSN), pp 568–580 Graves A, Mohamed A, Hinton GE (2013) Speech Recognition with Deep Recurrent Neural Networks. CoRR abs/1303.5778, URL http: //arxiv.org/abs/1303.5778 , 1303.5778 Gray J (1978) Notes on Data Base Operating Systems. In: Operating Systems, An Ad- vanced Course, Springer-Verlag, pp 393– 481 Grumberg O, Long DE (1994) Model Checking and Modular Verification. ACM Trans Pro- gram Lang Syst 16(3):843–871 Gupta S, Sadoghi M (2018) EasyCommit: A Non-blocking Two-phase Commit Protocol. In: Proceedings of the 21st International Conference on Extending Database Tech- nology, Open Proceedings, EDBT Gupta S, Sadoghi M (2020) Efficient and non- blocking agreement protocols. Distributed Parallel Databases 38(2):287–333, DOI 10. 1007/s10619-019-07267-w Gupta S, Hellings J, Rahnama S, Sadoghi M (2019a) An in-depth look of BFT consen- sus in blockchain: Challenges and oppor- tunities. In: Proceedings of the 20th In- ternational Middleware Conference Tutori- als, ACM, pp 6–10, DOI 10.1145/3366625. 3369437 Gupta S, Hellings J, Sadoghi M (2019b) Brief announcement: Revisiting consensus protocols through wait-free parallelization. In: 33rd International Symposium on Dis- tributed Computing (DISC 2019), vol 146, pp 44:1–44:3, DOI 10.4230/LIPIcs.DISC. 2019.44 Gupta S, Hellings J, Rahnama S, Sadoghi M (2020a) Building high throughput permis- sioned blockchain fabrics: Challenges and opportunities. Proc VLDB Endow 13(12) Gupta S, Rahnama S, Hellings J, Sadoghi M (2020b) Resilientdb: Global scale resilient blockchain fabric. PVLDB 13(6):868–883 Gupta S, Rahnama S, Sadoghi M (2020c) Permissioned blockchain through the look- ing glass: Architectural and implementation lessons learned. To appear in the Proceed- ings of 40th International Conference on Distributed Computing Systems (ICDCS)Gupta S, Hellings J, Rahnama S, Sadoghi M (2021a) Proof-of-Execution: Reaching con- sensus through fault-tolerant speculation. In: Proceedings of the 24th International Conference on Extending Database Tech- nology Gupta S, Hellings J, Sadoghi M (2021b) RCC: Resilient Concurrent Consensus for High- Throughput Secure Transaction Processing. In: 37th IEEE International Conference on Data Engineering (ICDE), URL http: //arxiv.org/abs/1911.00837 , 1911.00837 Jakobsson M, Juels A (1999) Proofs of Work and Bread Pudding Protocols. In: Proceed- ings of the IFIP TC6/TC11 Joint Work- ing Conference on Secure Information Net- works: Communications and Multimedia Security, Kluwer, B.V ., CMS ’99, pp 258– 272 Katz J, Lindell Y (2007) Introduction to Mod- ern Cryptography. Chapman & Hall/CRC Keller RM (1976) Formal verification of par- allel programs. Commun ACM 19(7):371– 384 King S, Nadal S (2012) PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake Kotla R, Alvisi L, Dahlin M, Clement A, Wong E (2007) Zyzzyva: Speculative Byzantine Fault Tolerance. In: Proceedings of Twenty- first ACM SIGOPS Symposium on Operat- ing Systems Principles, ACM, New York, NY , USA, SOSP ’07, pp 45–58, DOI 10. 1145/1294261.1294267 Krizhevsky A, Sutskever I, Hinton GE (2012) Imagenet classification with deep convolu- tional neural networks. In: Proceedings of the 25th International Conference on Neural Information Processing Systems - V olume 1, Curran Associates Inc., NIPS’12, pp 1097– 1105 Kumar R, Myreen MO, Norrish M, Owens S (2014) CakeML: A Verified Implementation of ML. In: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Prin- ciples of Programming Languages, ACM, New York, NY , USA, POPL ’14, pp 179– 191 Lamport L (1998) The Part-time Parliament. ACM Trans Comput Syst 16(2):133–169 Leroy X (2009) A Formally Verified Compiler Back-end. J Autom Reason 43(4):363–446 Libra (2019) An introduction to libra. Libra As- sociation Members Blockchain Transaction Processing 21 Menezes AJ, Vanstone SA, Oorschot PCV (1996) Handbook of Applied Cryptography, 1st edn. CRC Press, Inc. Nawab F (2018) Geo-Scale Transaction Pro- cessing, Springer International Publishing, pp 1–7. DOI 10.1007/978-3-319-63962-8 180-1, URL https://doi.org/10. 1007/978-3-319-63962-8_180-1 Oki BM, Liskov BH (1988) Viewstamped Replication: A New Primary Copy Method to Support Highly-Available Distributed Systems. In: Proceedings of the Seventh An- nual ACM Symposium on Principles of Dis- tributed Computing, ACM, New York, NY , USA, PODC ’88, pp 8–17 Parity Technologies (2018) Parity Ethereum Blockchain. URL https: //www.parity.io/ Park S, Kwon A, Fuchsbauer G, Ga ˇzi P, Alwen J, Pietrzak K (2015) SpaceMint: A Cryptocurrency Based on Proofs of Space. https://eprint.iacr.org/ 2015/528 Pilkington M (2015) Blockchain Technol- ogy: Principles and Applications. In: Re- search Handbook on Digital Transforma- tions, SSRN Qadah T, Gupta S, Sadoghi M (2020) Q-store: Distributed, multi-partition transactions via queue-oriented execution and communica- tion. In: Proceedings of the 23nd Interna- tional Conference on Extending Database Technology, EDBT, 2020, OpenProceed- ings.org, pp 73–84, DOI 10.5441/002/edbt. 2020.08 Qadah TM, Sadoghi M (2018) QueCC: A queue-oriented, control-free concurrency ar- chitecture. In: Proceedings of the 19th In- ternational Middleware Conference, ACM, Middleware, pp 13–25, DOI 10.1145/ 3274808.3274810 Rahnama S, Gupta S, Qadah TM, Hellings J, Sadoghi M (2020) Scalable, resilient, and configurable permissioned blockchain fab- ric. Proc VLDB Endow 13(12) Rosenfeld M (2014) Analysis of hashrate-based double spending. CoRR abs/1402.2009, URL http://arxiv.org/abs/ 1402.2009 ,1402.2009 Sadoghi M (2017) Expodb: An exploratory data science platform. In: Proceedings of the Eighth Biennial Conference on Innovative Data Systems Research, CIDRSadoghi M, Blanas S (2019) Transaction Processing on Modern Hardware. Syn- thesis Lectures on Data Management, Morgan & Claypool, DOI 10.2200/ S00896ED1V01Y201901DTM058 Satoshi N (2008) Bitcoin: A peer-to-peer electronic cash system. URL http:// bitcoin.org/bitcoin.pdf Schwartz D, Youngs N, Britto A (2014) The Ripple Protocol Consensus Algorithm. URL https://www.ripple.com/ Singh A, Das T, Maniatis P, Druschel P, Roscoe T (2008) BFT Protocols under Fire. In: NSDI Skeen D (1982) A Quorum-Based Commit Pro- tocol. Tech. rep. Steen Mv, Tanenbaum AS (2017) Distributed Systems TPP Council (2010) TPC Benchmark C (Revi- sion 5.11) Wilcox JR, Woos D, Panchekha P, Tatlock Z, Wang X, Ernst MD, Anderson T (2015) Verdi: A Framework for Implementing and Formally Verifying Distributed Systems. In: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language De- sign and Implementation, ACM, New York, NY , USA, PLDI ’15, pp 357–368 Wood G (2015) Ethereum: A secure decen- tralised generalised transaction ledger. URL http://gavwood.com/paper.pdf Yin M, Malkhi D, Reiter MK, Gueta GG, Abraham I (2019) HotStuff: BFT consensus with linearity and responsiveness. In: Pro- ceedings of the 2019 ACM Symposium on Principles of Distributed Computing, ACM, PODC, pp 347–356, DOI 10.1145/3293611. 3331591 Zhao W, Chellappa R, Phillips PJ, Rosenfeld A (2003) Face Recognition: A Literature Survey. ACM Comput Surv 35(4):399–458, DOI 10.1145/954339.954342
{ "id": "2107.11592" }
1806.06738
The Evolution of Embedding Metadata in Blockchain Transactions
The use of blockchains is growing every day, and their utility has greatly expanded from sending and receiving crypto-coins to smart-contracts and decentralized autonomous organizations. Modern blockchains underpin a variety of applications: from designing a global identity to improving satellite connectivity. In our research we look at the ability of blockchains to store metadata in an increasing volume of transactions and with evolving focus of utilization. We further show that basic approaches to improving blockchain privacy also rely on embedding metadata. This paper identifies and classifies real-life blockchain transactions embedding metadata of a number of major protocols running essentially over the bitcoin blockchain. The empirical analysis here presents the evolution of metadata utilization in the recent years, and the discussion suggests steps towards preventing criminal use. Metadata are relevant to any blockchain, and our analysis considers primarily bitcoin as a case study. The paper concludes that simultaneously with both expanding legitimate utilization of embedded metadata and expanding blockchain functionality, the applied research on improving anonymity and security must also attempt to protect against blockchain abuse.
http://arxiv.org/pdf/1806.06738v1
Tooba Faisal, Nicolas Courtois, Antoaneta Serguieva
cs.CR
cs.CR
The Evolution of Embedding Metadata in Blockchain Transactions Tooba Faisal University College London London, UK tooba.hashmi@gmail.comNicolas Courtois University College London London, UK n.courtois@ucl.ac.ukAntoaneta Serguieva nChain, and LSE Systemic Risk London, UK antoaneta@ncrypt.com Abstract —The use of blockchains is growing every day, and their utility has greatly expanded from sending and receiving crypto-coins to smart-contracts and decentralized autonomous organizations. Modern blockchains underpin a variety of appli- cations: from designing a global identity to improving satellite connectivity. In our research we look at the ability of blockchains to store metadata in an increasing volume of transactions and with evolving focus of utilization. We further show that basic ap- proaches to improving blockchain privacy also rely on embedding metadata. This paper identifies and classifies real-life blockchain transactions embedding metadata of a number of major protocols running essentially over the bitcoin blockchain. The empirical analysis here presents the evolution of metadata utilization in the recent years, and the discussion suggests steps towards preventing criminal use. Metadata are relevant to any blockchain, and our analysis considers primarily bitcoin as a case study. The paper concludes that simultaneously with both expanding legitimate utilization of embedded metadata and expanding blockchain functionality, the applied research on improving anonymity and security must also attempt to protect against blockchain abuse. Index Terms —bitcoin, bitcoin cash, blockchain, cryptographic key management, embedded metadata, anonymity, privacy, ran- somware, multisig. I. I NTRODUCTION The use of blockchains is expanding from transferring crypto-coins to implementing smart-contracts that service a variety of domains. IBM and Sovrin are designing and imple- menting a global digital identity layer enabled by blockchain: decentralized, point-to-point exchange of information about people, organizations, or things. [1] EtherSat is developing a protocol for satellite connectivity utilizing blockchain: a decentralized global area network that maximizes efficiency of existing ground-station infrastructure. [2] nChain is creating a blockchain tokenization layer to enable interactivity and inter- operability among smart contracts underlying various services [3] [4]. These are only few examples of how the technology is expanding. Throughout the initial and the expansion stages, the ability of a blockchain to store metadata has been exploited in an increasing volume of transactions and with evolving focus of utilization. A. Embedding Metadata Reviewing historically, and based on the bitcoin blockchain primarily, this ability at first involved creating an Unspent Transaction Output (UTXO) that could never be spent. That was used with a focus on permanently and securely storinginformation (such as notary data) not directly related to the current transaction. The destination bitcoin address in the lock- ing script of such unspendable UTXO in a Pay-To-Public-Key (P2PK) and Pay-To-Public-Key-Hash (P2PKH) transactions was used as a freeform 20-byte field to store metadata, and the the transaction was recorded on the blockchain. [5] Then, concerns were raised that the unspendable outputs could never be removed from the UTXO database, causing the database to increase forever. In response, Bitcoin Core version 0.9 introduced the RETURN operator, explicitly creating such outputs as provably unspendable and excluded from the UTXO set. [6] Simultaneously, the allowance for metadata increased from 20 to 80 bytes. Thus, legitimate non-payment data could be stored on the blockchain without increasing the UTXO database. However, concerns were raised that non- payment data stored in OP RETURN outputs could allow meta-protocols to run permission-free with criminal intent. That led to a large proportion of miners not processing OPRETURN transactions, and a corresponding proportion of metadata not being recorded on the blockchain. The more recent trend is storing information in the redeem script of pay- to-script-hash (P2SH) transactions. P2SH were standardized with Bitcoin Improvement Proposal (BIP): 16, as a powerful new type of transactions that simplifies the use of complex script. [7] The hash of the redeem script is restricted to 20 bytes, but the script itself and the size of metadata are not restricted. These transactions are spendable, and the full script must be revealed when spending a P2SH UTXO. At this stage, the utilization of embedded metadata is focused on variety of applications such as tokenization, blockchain-enforced smart contracts, and related access to secure databases. Some con- cerns about ransomware remain. Among the innovative uses of P2SH-embedded metadata are the tokenization of assets (tangible, intangible, divisible, and non-divisible), the blockchain-enforcement of smart contracts, the blockchain-recorded progress through the complex condi- tionality structure of a smart contract, the efficient blockchain- registered exchange of various tokenized entities underlying smart contracts, and the blockchain-recorded access links and access privileges to off-chain databases. [8] Such databases can be Distributed Hash Table (DHT) databases that store smart-contract templates, or conditions for the exchange of and the characteristics of entities underlying smart contracts,arXiv:1806.06738v1 [cs.CR] 18 Jun 2018 or software programs implementing intelligent agents capable of controlling various types of smart contracts. The described utilization of embedded-metadata serves as middleware that supports the development and execution of any specific smart contract. In this paper, we identify millions of recorded blockchain transactions embedding metadata and classify them according to meta-protocols they support. That allowed us to observe, from one of its many perspectives, the broader and impor- tant question about technology adoption. We further analyze empirically the evolution of embedding metadata, and suggest security steps towards preventing criminal use. Metadata are relevant to any blockchain, and our analysis is based on bitcoin primarily. Bitcoin has long historical data and the largest market-share, but is considered inert to innovation in more recent years.1Our conclusion is that simultaneously with both expanding legitimate utilization of embedded metadata and expanding blockchain functionality, the applied research on improving anonymity and security must continue with protecting against blockchain abuse. B. Ecosystems Bitcoin is the first and has long been the most popular cryp- tocurrency and blockchain. All B-transactions are recorded in the immutable, append only, blockchain data-structure, where the key features and elements include: blocks, transactions stored in the blocks, and inputs, outputs, lock-time included in each transaction according to the transactions’ format. The unspent outputs UTXO are monitored by the miners in validating transactions, and each input and output contain scripts – locking, unlocking, redeem scripts. [9] Depending on the type of transaction – P2PK, P2PKH, multisig, P2SH – the scripts may contain public keys, hashed public keys, multiple public keys, signatures based on private keys, multiple signatures, metadata, hashed metadata, and OP codes. The entire transaction is hashed using SHA-256 and this hash typically serves as a globally unique Transaction ID (TXID). [10] The bitcoin script language Script is a Forth-like stack-based execution language. Each transaction is processed by every bitcoin validating node and the node’s validation software executes, independently for each of the transaction’s inputs, the unlocking script in the input alongside a corresponding UTXO’s locking script. A transaction is valid if the cryp- tographic puzzles in all UTXO referenced by its inputs are solved by the inputs’ scripts, i.e. all spending conditions are satisfied. Then these UTXO are removed from the UTXO database but remain permanently recorded on the blockchain. [5]Script is a stateless and predictable language, and Bitcoin Core currently includes 174 active Script opcodes (and 15 disabled) including 14 reserved opcodes, of the following types: push-value, flow-control, stack-ops, splice-ops, bit- logic, arithmetic, crypto, locktime, template-matching, and reserved-words. [11] [12] 1Bitcoin has however broken grounds for crypto-currencies, and new currencies, such as bitcoin cash BCH, are actively pursuing innovation.The Script in the more actively innovating bitcoin-cash BCH-blockchain is introducing further opcodes, by re- designing and re-testing functionalities previously intended (to an extent) by now disabled bitcoin-script opcodes, as well as by introducing new functionalities. [13] The bitcoin- cash network is undergoing a protocol upgrade in May 2018, supporting on-chain scalability, new transaction signatures, and a new difficulty adjustment algorithm. [14] The blocksize limit is adaptable, with an increased default of 8MB, and quite larger sizes are being tested on the bitcoin-cash testnet. [15] A new SigHash reusable signing mechanism ensures replay protection under a chain split, an improved hardware-wallet security, and elimination of the quadratic hashing problem. It provides for users creating transactions with a fork-specific ID, which are invalid on forks lacking support for the mechanism. [16] A new difficulty adjustment algorithm allows miners to migrate from the bitcoin chain as desired and provides protec- tion against hashrate fluctuations. [17] Multiple independent teams develop bitcoin-cash software, assisted by peer-review workgroups, in contrast to the single-group development of Bitcoin Core. The development of bitcoin cash is decentralized and the ecosystem is dynamic. The focus is on protocol developments and on building Software Development Kits (SDK) that provide for the implementation and support of smart contracts and applications. [18] II. I MPROVING PRIVACY AND SECURITY Extending blockchain functionality and legitimate utiliza- tion of embedded metadata demands effective protection against blockchain abuse. The effective protection is supported by active applied research on anonymity and security. A. Privacy Privacy is a key desirable feature of all public and some private blockchains. Adoption and usage of bitcoin demon- strates early developments in distributed P2P payment systems anonymity engineering, and the privacy levels offered by current bitcoin psuedo-anonymous ledger is not very strong [19] [20]. Improving this is a major and difficult problem. It is not obvious how to reconcile ledger transparency and the desire for better privacy, and there is no easy quick-fix solution. Some early solutions involve using one public key only once. Using many different keys per user immediately raises the question of key management. In order to avoid the necessity for regular backups of fresh private keys generated at random, deterministic key derivation functions have been introduced. Hierarchical Deterministic (HD) wallets [21] use Elliptic Curve mathematics in order to calculate the public keys without revealing the private keys. HD wallets also allow users to derive various keys in a deterministic way from a single human readable seed. Using several keys there at the same time, however, like joining payments made to several keys belonging to the same user, compromises privacy. [22] In addition to HD wallets, there exist several other methods improving bitcoin anonymity. Mixes : Mixing services or tumblers can be used to improve the anonymity of users by taking their coins and exchanging them with coins of other users, while hiding their identities. These services charge commissions between 1-3 %, and also need to be trusted not to steal users’ coins. [19]. CoinSwap : This is a similar concept to Mixing. If Alice wants to pay Charlie, she can send her coins to Bob instead of Charlie, and then Charlie can send a fresh unrelated coin to Bob. In order to resolve the theft problem, a central authority can manage these swaps. If any of the three misbehaves, the swap may be resolved by using hash-locked transactions that are linkable in the public-ledger. [20] Fair Exchange : This method allows the users to hide their identities by exchanging coins. Ideally, the fair exchange requires that either both parties involved in the transition receive each others items or none do. [23] CoinJoin : In CoinJoin users collaborate and create trans- actions where inputs of several users are mixed together. The transaction is not valid and will not be accepted by the network until all the signatures are provided [24]. Further methods that require attention include stealth ad- dresses and dark wallets: a) Stealth Address: One way to break the linkability in blockchain is to ask a recipient for two destination addresses, and then make two transactions and broadcast them into the network few seconds apart [22]. This concept has been further improved leading towards Stealth Address (SA) techniques, which are forms of non-interactive key exchange protecting privacy of users receiving payments. The origins of these tech- niques could be tracked to [25] [26]. Instead of a public key, the payee advertises a long unique static identifier, which is used by the payer to generate one time address to send money. A stealth address do not appear in the B-blockchain; instead, random ephemeral public keys are generated and used. SA addresses use the Diffie-Hellman key-exchange mechanism, which allows the sender and receiver to exchange information and jointly generate some ephemeral public keys. Only lower- level derived keys will appear on the blockchain. Fig. 1: DH key exchange in Stealth Address technique For example, Bob advertises his (multiple-use) public key on his web page. There exist several variants of SA addressees. A basic method that uses permanent public/private identities of two participants, Alice and Bob, is adapted from [27] next. Weconsider a basic Diffie-Hellman key exchange, as presented in Fig. 1. Let G be the generator point on Elliptic curve, and let ’a’ and ’b’ be the private keys of the sender (Alice) and the receiver (Bob), correspondingly. Alice and Bob use here their permanent identities that will typically appear on the blockchain (this will change in more advanced SA methods). Alice and Bob publish a:G andb:G, correspondingly, and keep their private keys confidential. Alice computes a:(b:G), and Bob equivalently computes b:(a:G). Their shared secret isS=a:(b:G) =b:(a:G) =a:b:G , which no one else can compute. Next, Alice sends money to the transfer address E, and Bob detects the transaction and spends its UTXO. For example: E=H(S):G looks like a random B-addres. However, Bob knows the corresponding private key as he knows the common secret S, and can scan the bitcoin blockchain for Eto appear. This solution is still not quite secure, as Alice also knows the private key and may spend the UTXO before Bob. An improved asymmetric stealth address uses a stronger spending keye. [8] For example, E=H(S):G+b:G and e=H(S) +b Then, the sender Alice can no longer spend the transaction output, and can only compute the public key E. This method is still not ideal, as it is static and deterministic. In order to mitigate this, the sender can replace her permanent identity a by a random number r, and publish r:G by typically using OPRETURN in the very next output. In this case, one- time destination key and address are generated. This is not yet the best SA technique, and can be improved further by using 2 public keys, b:Gandv:G, where v:G is a view key2. Knowledge of the private part of the view key allows to build read-only wallets that can see transactions (undo anonymity) but cannot spend. Even a more robust stealth address has been proposed that protects against private key compromise, due to thefts, bad random attacks or Spectre/Meltdown type vulner- abilities [27]. Potential further development can use metadata based on processing various combinations of different partial biometric features, when generating signatures and keys. [28] Improved approaches to generating hierarchical asymmetric ephemeral keys and addresses have also been proposed and implemented in Nakasendo, an SDK supporting bitcoin cash applications, as well as applications for any blockchain based on elliptic-curve cryptography [18]. b) Dark Wallet: In order to enhance anonymity further, light-weight wallets that use both stealth-address and CoinJoin techniques have been created and termed Dark Wallets (DW). [29] Stealth addresses are discussed in detail in the previous section. A brief reminder on CoinJoin tells that a transaction of one user is combined with that of a random other user, who is making a payment at around the same time. Dark wallet is currently in its alpha testing state [30], as a Chrome 2View keys are also used in Monero and other CryptoNote-based currencies, and and were first described in [25]. extension enabled in developer mode. During this study, it has been working on and off for brief periods of time. B. Security Innovative technologies are subject to abuse, as a series of incidents have demonstrated, including the recent Facebook data abuse by Cambridge Analitica affecting 87 million users. [31] Blockchain has also been abused, as the ransomware attack on UK NHS showed last year, affecting many people. [32] The adoption of bitcoin in ransomware crime is a major event of recent years [33]. Very recently, the first incident has been reported, as well, of a ransomware accepting bitcoin- cash payments. [34] In order to protect blockchain expansion into services benefiting the society, it is necessary to address the issue of its abuse. Innovation in terms of security and prevention from ransomware must be an integral part in the development of smart contracts and blockchain-based services. Next, we briefly introduce the key ransomware types and existing defenses. In later sections of this paper, we review them in relation to bitcoin and bitcoin cash, and suggest some solutions. a) Overall Rise of Ransomware: Ransomware is a class of malware aiming to force users to pay a ransom in order to regain full access to their system [35]. This terminology covers a wide range of malicious software programs, including CryptoLocker, Locky, Cryptowall, KeyRanger, SamSam, Tel- saCrypt, TorrentLocker and others [36] [19] The history of ran- somware goes back to 2004, and the early software included screen lockers that were easy to remove or circumvent. Their level of sophistication, however, has been improving since then. Since 2013, a more harmful type of software has been developed. Though the programs are still called ”lockers”, they are not just lockers but quietly search for specific files and encrypt them, and then ask for ransom in order to decrypt. Only in the last few years, since bitcoin raised in popularity, ransomware has been combined with B-payments. [33] [32] CryptoLocker : This is a well-known ransomware, since Sep. 2013. CryptoLocker v3 uses Advanced Encryption Standard (AES)-128 in Cipher Block Chaining (CBC) mode [36] and RivestShamirAdleman (RSA)-2048 for encryption of a header [37]. AES-128 is a symmetric key algorithm with 128-bit keys, and RSA-2048 is an asymmetric encryption algorithm using 2048-bit keys. This combination makes it most likely impossible to decrypt, without paying the ransom. TorrentLocker Etc. These are different strains of ran- somware that have used AES differently: particularly in Counter (CTR) and CBC modes. [38] TeslaCrypt : This type of malware has been active since 2015, and provides customer support for the victims. It uses Elliptic Curve cryptography (ECC), an advanced key-derivation scheme, and has an ECC master private key that is later made public. Locky : Locky is a more recent and more sophisticated ransomware, since 2016. It uses Domain Generation Al- gorithm (DGA) to prevent blacklisting of domain names,as well as custom encrypted communications. Locky also uses strong (RSA-2048 + AES-128) file encryption, and targets and encrypts over 160 different file types, including virtual disks, source codes and databases [39]. Locky has spread in two countries in particular, the United States and France, and uses The-Onion-Router (TOR) hidden servers. [36] Further advanced ransomware techniques are discussed in Section IV-B. A recent study by IBM reports 6,000% of overall increase in ransomware in 2016 compared to 2015, and finds that 70% of business victim paid the hackers. [40] b) Ransomware Defenses: There exist a number of OS- level countermeasures to avoid infection. Such measures in- clude white-listing executables in user data directories [41], avoiding mapping backup drives [38], and disrupting the malware when using the Microsoft Crypto API [36]. Data Backups – False Good Solution : It may seem that all ransomware is harmless if the data is backed-up on a regular basis and the back-up drives are encrypted. However, the problems go far beyond, and just restoring files or partitions from backups is not the best strategy. This destroys forensic evidence about how the malware propagates and how it operates, and makes the fight again malicious software more difficult. This also leaves our systems wide open and in the same state as before in- fection: they can be later re-infected by malware through the same channels. For example, a main infection channel for Crypto-Locker was the Gameover Zeus botnet, which had existed earlier. [41] Propagation of Ransomware : Computer security experts must be able to monitor and analyze the infections. It is very useful to know how the ransom gets here in the first place. The problem is that there exist extensive and offensive expertise and experience, which have emerged over years of contrived action against the anti-virus industry. Different types of malware infection propagation and social engineering techniques are exploited to help criminals diffuse their unsolicited encryption payloads. III. U SE AND ABUSE OF BLOCKCHAIN TRANSACTIONS : EMPIRICAL ANALYSIS A. Methodology and Results The length of OP RETURN script is currently 80 bytes, where the first two bytes always are hex 6a, followed by two bytes indicating the length in hex of the metadata-record that starts from byte number 5. With its protocol upgrade from version 1.0 to 1.1, on May 15, 2018, the OP RETURN relay size will increase to 223 bytes, only on the bitcoin-cash blockchain. [14] Information about the two blockchains has been updated, corrected and analyzed in this study, by the contributing authors, based primarily on the OpReturnTool from [42]. The APIs of blockchain.info and coinsecrets.org are queried by this software. Blockchain.info is used only to get the latest block number. Then coinsecrets.org, a dedicated API for OP RETURN transactions, is queried to extract their Time stamp, Transaction ID, hash and ASCII code. The incoming data are recorded into a text file and exported to Excel [43]. Several methods were used, in order to identify the evolution of stealth-address techniques. We have performed experimental transactions, and further analysis on the observed patterns, to identify potential DW transactions and patterns. Among those that could not be related to a known protocol, there are transactions potentially related to criminal activities. To identify the transactions from another wallet implement- ing stealth address, such as SX [44], its documentation has been consulted and observed patterns inside transactions are matched with our dataset. Overall, 22 protocols are identified and the rest of the OP RETURN transactions are marked as unattributed. The prefix and ASCII for all the protocols are analyzed, and based on the analysis further three protocols have been identified: YEJ, BITCC, and Counterparty. How- ever, their share inside the dataset is quite slim ( 0%), and only Counterparty has been included for further analysis. Fig. 2: Time evolution of OP RETURN transactions The first OP RETURN transaction, identified in our study, appears on Mar. 29, 2013. This corrects [20], where the first such transaction is identified as appearing a year later. Thus, our dataset consists of data since Mar. 29, 2013 (block #228596) to Jul. 6, 2017 (block #474451). In 2013, only 430 OPRETURN transactions are found, and all of them are in the unattributed category. From 2014 to 2017, we observe a significant increase in the volume of such transactions, reaching over 2 million per year in 2017. (see Fig. 2) A detailed examination shows that 51% of these transactions correspond to the 22 known protocols, explained briefly in Table I. About 49% of the transactions remain unattributed. The experimental dark-wallet transactions are identified in the unattributed section of the dataset, and have the prefix 6a- 26-06, where 6a is the opcode for OP RETURN, 26 is hex of the length of metadata that follows, and 06 distinguishes dark- wallet transactions from other protocols. The whole dataset is scanned and 2762 transactions are found with this pre-fix. The time evolution of transactions is illustrated with Fig. 3. B. Analysis and Discussion Linkability of transactions affects their anonymity, and sev- eral techniques have been adapted in the B-systems to address that issue. Approaches such as CoinJoin, Fair Exchange andTABLE I: Protocols Using op return Opcode Protocol Contribution(%) Usage Unattributed 49% Not identified Blockstore 8.5% Key value store Factom 4.14% Notary/Doc Omni Layer 10.3% Assets Blocksign 0.06% Notary/Doc Colu 10.11% Assets Stampery 2.60% Notary/Doc Eternity wall 0.16% Any Messages Bitproof 0.03% Notary/Doc Open Assets 8.09% Assets Ascribe 2% Digital Arts Monegraph 2.7% Digital Arts Coinspark 1.1% Assets Proof of Existence 0.22% Notary/Doc Original My <0.01% Notary/Doc Open Provenance <0.01% Proof of ownership Remembr <0.01% Notary/Doc Crypto copyright <0.01% Notary/Doc LaPreuve <0.01% Notary/Doc ProveBit <0.01% Notary/Doc Blockchain Notary <0.01% Notary/Doc Counterparty <0.01% Assets Stampd <0.01% Notary/Doc Fig. 3: Time evolution of potential DW transactions CoinSwap, typically need a third-party involvement to achieve anonymity, and the honesty of the third party is not guaranteed. The latest stealth-address techniques seem currently effective. There, the receiver advertises its static, unique identifier and the sender generates a one-time key. There is no apparent way that a blockchain observer can relate transactions to the same payee. Stealth-address approaches are introduced to bitcoin and bitcoin cash, and have been used in monero and vertcoin. Stealth-address, dark-wallet and SX transactions appear as unable-to-decode by block explorers. We have identified some DW and SX transactions among transactions unattributed to known protocols, in the OP RETURN database we have extracted from the blockchain. It is noted that a smaller number of SX-related transactions are identified, as that protocol is less user-friendly than DW. A large number of transactions remain unattributed, and part of the issue is that meta-protocols are not required to coordinate and register unique identifiers. Therefore, many legitimate protocols don’t use distinctive pre-fixes [45] that help decode/classify OP RETURN transactions they produce, Fig. 4: The share of unattributed protocols is increasing. and those transactions remain unattributed. This reason is even more valid now and in foreseeable future, as the anticipated proliferation of blockchain technology is through smart con- tracts that benefit users rather than ransomware them, and brings positive rather than destructive effect on society. Smart contracts are implemented and executed through embedding metadata in OP RETURN and P2SH transactions, and there- fore the number of transaction with embedded metadata will continue to rise. It is also valid to anticipate that criminals will exploit the new functionalities. We address both these issues in Section IV next. IV. R ANSOMWARE , KEYMANAGEMENT AND METADATA A. Ransom Payments Ransomware has always existed, but it has been associated with substantial risks to receive ransom payments without detection. With the increased popularity of Bitcoin in the last few years, criminals have started abusing the technology, in order to avoid detection. [46]. Receiving one or multiple ransom payments in Ballows very good initial anonymity. [33]. A new unique B-address is created to receive payment from each victim. As long as the coins are not yet spent, there is no way to track who has received the ransom, and it can be spent in the future. [35] Once spending starts, the linkability of transactions is weakening anonymity and some transactions could be traced. [47] However, criminals can use various proxies, and carefully move and mix money in arbitrary ways for a long time, in order to diminish their chances of being traced. Many companies and individuals will and do pay ran- somware to get their data back, though advised the contrary by the authorities. Some individuals bought Bfor the first time when became victims of ransomware, and some companies buy Bin advance to be able to pay in case of an attack.[46] This affects the image of the technology, as illustrated by Google Trends during the attack on NHS last May. Fig. 5 presents the online interest in bitcoin and ransomware for the first two quarters of last year, and identifies they both spiked in May. [48] The image affects the development and adoption of innovative and legitimate blockchain-based services. The Fig. 5: Google search interests: Ransomware vs Bitcoin January–December 2017 technology is still moving forward, however, as Fig. 5, because the positive potential has been recognized. The target now is decoupling and disassociation from ransomware. B. Public Key Generation and Diversification A variant of the Curve-Tor-Bitcoin (CTB)-Locker, targeting web servers, generates a unique B-address for every infection. Once the ransom is received, hackers produce a transaction using OP RETURN and embedding a decryption key inside. [49] Other ransomware, such as the Locky payment system, rely on the anonymity features of TOR. It uses TOR hid- den servers that remain operational years after the infection. The server software, presumably operating without human intervention, has automatically adjusted to B-price over the years: initially asking for B2, and recently for much smaller amounts. A Locky decryptor tool, made available to the victims on the same TOR website when they connect again after paying, is received on the blockchain [39]. One of the onion servers used with Locky is twbers4hmi6dx65f.onion, and we have observed that after payment they contain mal- ware such as Variant.Zusy.185950. The Locky payments also seem to be automatically aggregated into larger pots of B50 or 100. An address associated with Locky ransom is 1Cjqt4C17sXYrWkrRyPr73RjrjZu1fuHMV, though it is not clear if the address belongs to an exchange, a mixing service, or is still criminally controlled. If we look from this address backwards, the blockchain allows identifying victims of Locky who have paid ransom in standardized amounts of B1 or 0.25. C. Future Risks and Mitigation The combination of all topics we study above present a major risk: using stealth addresses, CoinJoin, TOR, and possibly smart contracts, in order to further automate and streamline the process of ransom threat and payment. We are not there yet but in future, criminals can hide their identity behind the increasing number of active blockchain participants, while shuffling money around. Dark wallet has Fig. 6: Share of unattributed protocols. been a prominent B-wallet [30] focusing on anonymity. It implements stealth-address with CoinJoin techniques. Yet DW deployment has raised concerns about its potential abuse. [29] This study has analyzed DW transactions and found that they cannot be associated with known protocols. The number of DW transactions is still low: the wallet is in its alpha state and has not recently been operating properly. [30] It can be expected, however, that a more dangerous DW-successor will be inevitably created. [26] We propose that companies using blockchain to implement complex protocols, should provide means of audit capable of distinguishing legitimate traffic they produce from potentially criminal activity. Though bitcoin and bitcoin cash are studied here, all blockchains are imminently subject to abuse, and fall within the wider range of FinTech and SocTech technology targeted with criminal intent. Bitcoin has existed longer and had the largest market-share among blockchains. On the one hand, it has traversed through challenges to bring visibility to the technology and recognition of its potential, and opportunities to and drive for emerging competition. On the other hand, this position has made bitcoin most targeted by criminal activity: the wider and more active is a blockchain network, the better it can be both used and abused. Empirical history has also shown that the more a cryptocurrency is used, the more valuable it is. Further blockchains are getting momentum and raising their market-share, and are imminently attracting criminal intent. The other case-study in this paper, bitcoin cash, is representa- tive of recently set up but high-momentum blockchains, and has risen to 4th market-share. Only one ransomware has been reported using bitcoin cash, seven months after its launch. This contributes to the observation that relative maturity is a precondition for targeted abuse of a blockchain. With this paper, we raise the requirement that security and robustness against ransomware and other abuse must be of equal priority in innovation as are functionalities directly impacting market-share. Another factor is the rate of inno- vation itself. For example, blockchain cash is supported by several rather than one development team, and releasing a new protocol this May that introduces new op-codes, increasesblocksize, and provides a new algorithm stepping towards blockchains’ interoperability. The need for innovation has been a main reason for the bitcoin cash fork. The development teams have started releasing SDKs to support the blockchain community in implementing higher-level apps, as well. Mul- tiple teams and continuous innovation contribute to resistance to abuse. We have to note that a large part of identified transactions without attributed protocols are associated with legitimate meta-protocols, but there is no registry of meta- protocols to serve as a reference for identification. The use of P2SH transactions and the development of smart contracts are trends for a foreseeable future, and will expand significantly the range of meta-protocols. Therefore, we suggest that an off-chain DHT registry of meta-protocols is set up, and a corresponding unique indicator/identifier for each type of pro- tocol is embedded in transactions that use/implement it. The DHT repository will have secure selective access, so that the meta-protocols are not compromised but allow corresponding level of audit. We anticipate that with the proliferation of smart contracts, the legitimate types of meta-protocols will greatly outnumber malicious ones. However, the system will still be vulnerable to large-scale outlier cyber-attacks, if deci- sive, expert, priority solutions are not developed, maintained and updated. If anticipation is that criminals will use smart contracts, then monitoring smart contracts can be developed to identify, protect against, and prevent their activity. V. C ONCLUSION This paper addresses blockchain adoption from the per- spective of the evolution and utilization of metadata, and therefore, from the perspective of the evolution of proto- cols that are implemented and executed through embedding additional information in blockchains. We identify, analyze and discuss reasons for the role of metadata, including em- pirical analysis; and suggest approaches towards protecting the expanding blockchain functionality against criminal abuse and ransomware. Challenges, in terms of exploiting/improving anonymity and prioritizing/raising security, are clearly stated, and intended and unintended consequences are addressed. We review key characteristics of ransomware and of expert approaches protecting against it. The paper suggests that blockchains should provide some level of transparency of what they are used for. We need to improve the auditability of blockchain transactions and smart-contract protocols. This can be facilitated for example by DHT databases of protocols, with secure and selective authorization or audit access. An- other major lesson learned from our research on blockchain technology adoption and on metadata usage in blockchains, is to see that new technology must innovate and change all the time in order to near its full potential and that protocols and usage of blockchains must evolve with time. We need to continue to improve privacy of blockchains, while mitigating and monitoring their problematic or maybe criminal usage. REFERENCES [1] Sovrin Foundation, ”SovrinTM: A protocol and token for self sovereign identity and decentralized trust,” Jan. 2018, Sovrin Founda- tion White Papers, [Online]. Available: https://sovrin.org/wp-content/ uploads/Sovrin-Protocol-and-Token-White-Paper.pdf [Accessed: Apr. 15, 2018]. [2] A. Cohen, L. Duncan and A. Edwards, ”EtherSat protocol: A blockchain approach to efficient satellite connectivity,” Proceedings of 2017 Inter- national Joint Conference on Neural Networks, Jul. 2018, forthcoming, IEEE Press. [3] nChain Holdings (C.S. Wright and S. Savanah), ”A Method and system for the Efficient Transfer of Entities on a Blockchain”. Patent PCT/IB2017/050859, Feb. 23, 2016, [Online]. Available: http: //patentscope.wipo.int/search/en/result.jsf [Accessed: Apr. 15, 2018]. [4] nChain Holdings (C.S. Wright and S. Savanah), ”Registry and Auto- mated Management Method for Blockchain-Enforced Smart Contracts”. Patent PCT/IB2017/050865, Feb. 23, 2016, [Online] Available: http: //patentscope.wipo.int/search/en/result.jsf [Accessed: Apr. 15, 2018]. [5] A.M. Antonopoulos, ”Mastering Bitcoin: Programming the Open Blockchain,” 2ndEdition, 3rdRelease, Mar. 23, 2018, O’Reilly Media. [6] Bitcoin Projecte, ”Bitcoin Core version 0.9.0 released,” Bitcoin Core, Mar. 19, 2014, [Online]. Available: http://bitcoin.org/en/release/v0.9.0 [Accessed: Apr. 15, 2018]. [7] G. Andresen, ”Pay to script hash,” Bitcoin Improvement Proposals, BIP: 16, Jan. 3, 2012, [Online]. Available: http://github.com/bitcoin/bips/blob/ master/bip-0016.mediawiki [Accessed: Apr. 15, 2018]. [8] C.S. Wright and A. Serguieva, ”Sustainable blockchain-enabled services: Smart contracts,” Proceedings of the 2017 IEEE International Confer- ence on Big Data, pp 4255–4264, Dec. 2017, IEEE Press. [9] Bitcoin Wiki, [Online]. Available: http://en.bitcoin.it/wiki [Accessed: April. 15, 2018]. [10] S. Ammous, The Bitcoin Standard: The Decentralized Alternative to Central Banking, Mar. 23, 2018, Wiley. [11] Bitcoin Project, ”script.h,” Github Bitcoin, [Online]. Available: http://github.com/bitcoin/bitcoin/blob/master/src/script/script.h [Accessed: Apr. 15, 2018]. [12] Bitcoin Wiki, ”Opcodes,” Bitcoin Wiki Script, [Online]. Available: http: //en.bitcoin.it/wiki/Script#Opcodes [Accessed: Apr. 15, 2018]. [13] BitcoinCashOrg, ”Restore disabled script opcodes,” Github Bit- conCashOrg, [Online]. Available: http://github.com/bitcoincashorg/ spec/blob/master/may-2018-reenabled-opcodes.md [Accessed: Apr. 15, 2018]. [14] BitcoinCashOrg, ”New features,” Bitcoin Cash Features, [Online]. Avail- able: http://www.bitcoincash.org [Accessed: Apr. 15, 2018]. [15] BitcoinCashOrg, ”Upgrade Testing,” [Online]. Available: http://docs. google.com/spreadsheets/d/1 uJryqNnMEHogUdCY6WhCMoyuyoZsy MtVm2R4xAsIeI/edit˜ #gid=299033565 [Accessed: Apr. 15, 2018]. [16] BitcoinCashOrg, ”BUIP-HF: Digest for replay protected signa- ture verification across hard forks,” Github BitconCashOrg Spec, [Online]. Available: http://github.com/bitcoincashorg/spec/blob/master/ replay-protected-sighash.md [Accessed: Apr. 15, 2018]. [17] BitcoinCashOrg, ”Bitcoin cash hardfork technical details, version 1.3,” Github BitconCashOrg Spec, Nov. 7, 2017 [Online]. Available: http: //github.com/bitcoincashorg/spec/blob/master/nov-13-hardfork-spec.md [Accessed: Apr. 15, 2018]. [18] nChain Media, ”NakasendoTMSoftware Development Kit,” Apr. 16, 2018, [Online]. Available: http://nchain.com/en/media/nchain-releases- nakasendo-software-development-kit [Accessed: Apr. 20, 2018]. [19] J. Bonneau, A. Narayanan, A. Miller, J. Clark, J. A. Kroll and E. W.Felten, ”Mixcoin: Anonymity for Bitcoin with accountable mixes,” Proceedings of the 18th International Conference on Financial Cryptog- raphy and Data Security, pp 486–504, Mar. 2014, Springer. [20] M. Moser and R. Bohme, ”Anonymous Alone? Measuring Bitcoin’s Second-Generation Anonymization Techniques,” Proceedings of the 2017 IEEE European Symposium on Security and Privacy Workshops, pp 32–41, Apr. 2017, IEEE Press. [21] P. Wuille, ”Hierarchical deterministic wallets,” Bitcoin Improvement Proposals, BIP: 32, Feb. 11, 2012, [Online]. Available: http://github.com/ bitcoin/bips/blob/master/bip-0032.mediawiki [Accessed: Apr. 15, 2018]. [22] Anonymous, ”Reclaiming financial privacy with HD wallets,” Bitcoin- ism, Jul. 5, 2013, [Online]. Available: http://bitcoinism.blogspot.co.uk/ 2013/07/reclaiming-financial-privacy-with-hd.html [Accessed: Apr. 15, 2018]. [23] I. Ray and I. Ray, ”An anonymous fair exchange protocol,” Proceedings of the 15th International Parallel and Distributed Processing Symposium, pp 1790–1797, IEEE Press, 2001.[24] gmaxwell, ”CoinJoin: Bitcoin privacy for the real world,” Bitcoin Forum, Aug. 22, 2013, [Online]. Available: http://bitcointalk.org/index.php? topic=279249.0 [Accessed: Apr. 15, 2018]. [25] N. van Saberhagen, ”CryptoNote v 2.0,” CryptoNote Technology White Paper, Oct. 17, 2013, [Online]. Available: http://cryptonote.org/ whitepaper.pdf [Accessed: Apr. 15, 2018]. [26] Anonymous, ”Untraceable transactions which can contain a secure mes- sage are inevitable,” Bitcoin Forum, Apr. 17, 2011, [Online]. Available: http://bitcointalk.org/index.php?topic=5965.0 [Accessed: Apr. 15, 2018]. [27] N.T. Courtois and R. Mercer, ”Stealth address and key management techniques in blockchain systems,” Proceedings of the 3rd International Conference on Information Systems Security and Privacy, pp 559–566, SciTePress, 2017. [28] Y . Kaga, M. Fujio, K. Naganuma, K. Takahashi, T. Murakami, T. Ohki and M. Nishigaki, ”A secure and practical signature scheme for blockchain based on biometrics,” in: J. Liu and P. Samarati (eds), Information Security Practice and Experience ISPEC 2017, pp 877–891. Lecture Notes in Computer Science book series, vol 10701. Springer, 2017. [29] A. Greenberg, ”'Dark Wallet' is about to make Bitcoin money laundering easier than ever,” Wired Business, Apr. 29, 2014, [Online]. Available: http://www.wired.com/2014/04/dark-wallet [Accessed: Apr. 15, 2018]. [30] Darkwallet Team, ”Darkwallet build status,” Github DarkWallet, [On- line]. Available: http://github.com/darkwallet/darkwallet [Accessed: Apr. 15, 2017]. [31] N. Lomas, ”How Facebook has reacted since the data misuse scandal broke,” Techcrunch, Apr. 10, 2018, [Online]. Available: http://techcrunch.com/2018/04/10/how-facebook-has-reacted-since-the- data-misuse-scandal-broke [Accessed: Apr, 15, 2018]. [32] K. Collins, ”Crime in RealTime,” May 12, 2017, [Online]. Available: http:qz.com/982993/watch-as-these-bitcoin-wallets-receive-ransomw are-payments-from-the-ongoing-cyberattack [Accessed: Apr. 15, 2018]. [33] R. Brewer, ”Ransomware attacks: detection, prevention and cure,” Net- work Security, vol 2016, no 9, pp 5-9, 2016. [34] L. Abrams, ”Thanatos ransomware is first to Use Bitcoin Cash: Messes Up encryption,” Bleeping Computer: security News, Feb. 26, 2018, [Online]. Available: http://www.bleepingcomputer.com/news/security/ thanatos-ransomware-is-first-to-use-bitcoin-cash-messes-up-encryption [Accessed: Apr. 15, 2018]. [35] D. Sgandurra, L. Munoz-Gonzalez, R. Mohsen and E.C. Lupu, ”Auto- mated dynamic analysis of ransomware: Benefits, limitations and use for detection,” arXiv preprint, arXiv:1609.03020, 2016. [36] A. Palisse, H. Le Bouder, J.L. Lanet, C. Le Guernic, A. Legay, ”Ransomware and the legacy Crypto API,” Proceedings of in 11th International Conference on Risks and Security of Internet and Systems, pp.11-28, Springer, 2017. [37] J. Doevan, ”CryptoLocker: How to remove? (Uninstall guide),” Jul. 18, 2017, [Online]. Available: /urlhttp://www.2-spyware.com/remove- cryptolocker.html [Accessed: Apr. 15, 2018]. [38] C. Puodzius, ”How encryption molded crypto-ransomware,” WeLiveSe- curity, Sep. 13, 2016, [Online]. Available: http://www.welivesecurity. com/2016/09/13/how-encryption-molded-crypto-ransomware [Accessed: Apr. 15, 2018]. [39] Threat Intelligence Team, ”A Deep and Technical Look into the Ransomware called Locky,” Avast blog, Mar. 10, 2016. [Online]. Available: http://blog.avast.com/a-closer-look-at-the-locky-ransomware [Accessed: Apr. 15, 2018]. [40] H. Taylor, ”Ransomware spiked 6000% in 2016 and most victims paid the hackers, IBM finds,” CNBC: Tech News, Dec. 14, 2016, [Online]. Available: http://www.cnbc.com/2016/12/13/ransomware-spiked-6000- in-2016-and-most-victims-paid-the-hackers-ibm-finds.html [Accessed: Apr. 15, 2018]. [41] B. Krebs, ”How To Avoid CryptoLocker Ransomware,”Krebs on Security: In-depth Security News and Investigation, Nov. 2013, [Online] Available: https://krebsonsecurity.com/2013/11/how-to-avoid- cryptolocker-ransomware [Accessed: Apr. 15, 2018]. [42] M. Bartoletti and L. Pompianu, ”An analysis of Bitcoin OP RETURN metadata,” arXiv preprint, arXiv:1702.01024v2, Mar. 1, 2017. (OpReturnTool, [Online], Available: http://github.com/BitcoinOpReturn/ OpReturnTool [Accessed: Apr. 15, 2018].) [43] T. Faisal, OP ReturnToCSV and OP RETURN-protocols, GitHub, [On- line]. Available: www.GitHub.com/tabz11 [Accessed: Apr. 15, 2018]. [44] A. Taaki, S. Mendez and V . Buterin, ”The SX tutorial,” 2013, [Online]. Available: http://sx.dyne.org/stealth.html [Accessed: Aug. 8, 2017]. [45] Bitcoin Wiki, ”OP RETURN,” May 7, 2017, [Online]. Available: http: //en.bitcoin.it/wiki/OP$ $RETURN [Accessed: Aug. 5, 2017]. [46] P. Mccausland, ”Companies stockpiling Bitcoin in anticipation of ransomware attacks,” NBC: U.S. News, May 18., 2017, [Online]. Available: http://www.nbcnews.com/storyline/hacking-of-america/ companies-stockpiling-bitcoin-anticipation-ransomware-attacks-n761316 [Accessed: Apr. 15, 2018]. [47] S. Meiklejohn, M. Pomarole, G. Jordan, K. Levchenko, D. McCoy, G. M. V oelker and S. Savage, ”A Fistful of Bitcoins: Characterizing Payments Among Men with No Names,” iInternet Measurement Conference, pp. 127-140, 2013. [48] Google, ”Google Trends”, [Online]. Available: http://trends.google.com/ trends/explore?q=%2Fm%2F05p0rrx,%2Fm%2F0657nv [Accessed: Apr. 15, 2017]. [49] L. Constantin, ”Ransomware authors use the bitcoin blockchain to deliver encryption keys,” PCWorld: Security, Apr. 14, 2016, [On- line]. Available: http://www.pcworld.com/article/3056607/ransomware- authors-use-the-bitcoin-blockchain-to-deliver-encryption-keys.html [Ac- cessed: Aug. 15, 2018]. [50] S. Nakamoto, ”Bitcoin: A peer-to-peer electronic cash system,” 2008. [Online].
{ "id": "1806.06738" }
2209.12809
Evolutionary Dynamics of Sustainable Blockchains
The energy sustainability of blockchains, whose consensus protocol rests on the Proof-of-Work, nourishes a heated debate. The underlying issue lies in a highly energy-consuming process, defined as mining, required to validate crypto-asset transactions. Mining is the process of solving a cryptographic puzzle, incentivised by the possibility of gaining a reward. The higher the number of users performing mining, i.e. miners, the higher the overall electricity consumption of a blockchain. For that reason, mining constitutes a negative environmental externality. Here, we study whether miners' interests can meet the collective need to curb energy consumption. To this end, we introduce the Crypto-Asset Game, namely a model based on the framework of Evolutionary Game Theory devised for studying the dynamics of a population whose agents can play as crypto-asset users or as miners. The energy consumption of mining impacts the payoff of both strategies, representing a direct cost for miners and an environmental factor for crypto-asset users. The proposed model, studied via numerical simulations, shows that, in some conditions, the agent population can reach a strategy profile that optimises global energy consumption, i.e. composed of a low density of miners. To conclude, can a Proof-of-Work-based blockchain become energetically sustainable? Our results suggest that blockchain protocol parameters could have a relevant role in the global energy consumption of this technology.
http://arxiv.org/pdf/2209.12809v1
Marco Alberto Javarone, Gabriele Di Antonio, Gianni Valerio Vinci, Luciano Pietronero, Carlo Gola
physics.soc-ph, nlin.AO
physics.soc-ph
Evolutionary Dynamics of Sustainable Blockchains Marco Alberto Javarone,1, 2,Gabriele Di Antonio,1, 3, 4Gianni Valerio Vinci,3, 5Luciano Pietronero,1and Carlo Gola6,y 1Centro Ricerche Enrico Fermi, Rome, Italy 2University College London - Centre for Blockchain Technologies, London, UK 3Istituto Superiore di Sanit a, Rome, Italy 4Universit a degli Studi Roma Tre, Rome, Italy 5Universit a Roma Tor Vergata, Rome, Italy 6Banca d'Italia, Rome, Italy (Dated: September 27, 2022) The energy sustainability of blockchains, whose consensus protocol rests on the Proof-of-Work, nourishes a heated debate. The underlying issue lies in a highly energy-consuming process, de ned as mining, required to validate crypto-asset transactions. Mining is the process of solving a crypto- graphic puzzle, incentivised by the possibility of gaining a reward. The higher the number of users performing mining, i.e. miners, the higher the overall electricity consumption of a blockchain. For that reason, mining constitutes a negative environmental externality. Here, we study whether min- ers' interests can meet the collective need to curb energy consumption. To this end, we introduce the Crypto-Asset Game, namely a model based on the framework of Evolutionary Game Theory devised for studying the dynamics of a population whose agents can play as crypto-asset users or as miners. The energy consumption of mining impacts the payo of both strategies, representing a direct cost for miners and an environmental factor for crypto-asset users. The proposed model, studied via numerical simulations, shows that, in some conditions, the agent population can reach a strategy pro le that optimises global energy consumption, i.e. composed of a low density of min- ers. To conclude, can a Proof-of-Work-based blockchain become energetically sustainable? Our results suggest that blockchain protocol parameters could have a relevant role in the global energy consumption of this technology. I. INTRODUCTION The Blockchain [1, 2] is a distributed ledger able to manage transactions of digital tokens, constituting a form of digital money, without relying on nancial in- stitutions serving as trusted third parties. The underly- ing mechanisms of this technology exploit cryptographic protocols, so we refer to digital tokens as crypto-assets. Although all implemented protocols have a role in the functioning of a blockchain, the fundamental one is the Nakamoto consensus protocol. The latter uses the Proof- of-Work (PoW), i.e. a cryptographic proof that relies on solving a crypto-puzzle for validating transactions and o ering solid protection from attacks, such as double- spending [3]. More in detail, particular users de ned as miners collect crypto-asset transactions not yet recorded in the Blockchain in data structures called blocks. The miners' goal is to attach their blocks to the head of the Blockchain. To this end, miners have to show a PoW that can be obtained by performing a process called mining. The rst miner to complete the PoW receives a reward, in the form of crypto-asset, which constitutes an economic incentive. Mining is a competition based on nding a random number (called nonce) whose value depends on the block at the head of the Blockchain and transactions contained in the newly generated block. Also, mining marcojavarone@gmail.com yThe usual disclaimer appliesresembles a lottery, requiring miners to use substantial computational resources to succeed. Then, getting high success probabilities equal high energy consumption in a mining competition, as winning depends on the num- ber of used resources. The whole mechanism entails that each new block attached to the chain forms a 'compu- tational shield' preserving transactions recorded in the previously mined blocks. In summary, miners are funda- mental for blockchains based on the PoW. On the other hand, the energy consumption of PoW blockchains con- stitutes a non-trivial issue [4]. The latter directly im- pacts the miners' electricity bill and, indirectly, the whole society since a fraction of energy gets wasted for vali- dating transactions. Even if there are other consensus mechanisms, for instance, the Proof-of-Stake [5, 6] and the Proof-of-Authority [7, 8], the PoW is currently the most used [9]. Therefore, energy consumption is at the core of a heated debate around the societal impact of blockchains |see for instance [10{12]. The relevance of the debate motivates this investigation. On one side, we observe miners that compete to get high pro ts and allow Blockchain to work. On the other, we see a waste of elec- tric energy. Can the need to curb energy consumption meet the individual interest of miners? Stimulated by this question, we study the above-described scenario as a social dilemma. To this end, using the framework of Evo- lutionary Game Theory [13{23] we propose a stochastic evolutionary game named Crypto-Asset Game (CAG). The proposed game has two strategies, i.e. mining and using crypto-assets. On varying the game conditions,arXiv:2209.12809v1 [physics.soc-ph] 26 Sep 2022 2 e.g. the miners' reward, we analyse the evolution of the strategy distribution occurring in an agent population playing CAG. In particular, the evolutionary dynamics of CAG entail agents can change their strategy depend- ing on the accumulated payo via a stochastic process, usually de ned strategy revision phase. Hence, a crypto- asset user (or just user hereinafter) can become a miner and vice versa at no cost. Rational agents take decisions (i.e. select a strategy) to maximise a pro t. We aim to study whether a population of rational agents can reach a strategy pro le that minimises global energy consump- tion. Finally, let us report that game-based approaches, devised for studying various aspects of blockchains, have been previously proposed, as in [24{29]. The remainder of the paper is organised as follows: Section II introduces the Crypto-Asset Game. Section III presents results of numerical simulations. Then, Section IV highlights the main nding and, eventually, Section V discusses future developments. II. THE CRYPTO-ASSET GAME The Crypto-Asset Game represents the essential dy- namics of a simpli ed economic system composed of two kinds of agents, i.e. miners and crypto-asset owners that produce and consume crypto-assets, respectively. More in detail, miners produce crypto-assets through their mining activity, while crypto-asset owners consume crypto-assets by executing transactions [30]. For the sake of brevity, from now on, we refer to crypto-asset owners as users. Accordingly, CAG is a two-strategy game whose agents can choose between mining ( m) and using crypto- assets (u). Both strategies are associated with a payo . The miner payo includes a reward and an energy cost, while the user payo includes a gain and a contribution they have to pay. The users' gain represents bene ts related to using a blockchain, while their contribution represents various costs associated with this technology, as later described. In addition, the overall energy con- sumption of the blockchain a ects the users' payo as their gain gets multiplied by the miners' density. Follow- ing the above prescriptions, the payo structure of CAG reads ( u=1 mNu 5cu m=hRiC(1) whose parameters have the following meaning. Namely, mis the density of miners, Nuis the number of users locally involved in a game iteration (later detailed), cu is the contribution paid by users for participating in the Blockchain system, Ris the miners' reward and, even- tually,Cis the electricity cost of mining. The miners' reward is taken as hRi=R Nm, withNmtotal number of miners in the population. This choice is motivated con- sidering that an equal amount of resources in a lottery- like competition (i.e. the mining competition) entailsthat, on average, a miner gets a reward Rdivided by the total amount of miners. Even if the number of miners is related to the amount of energy wasted in a lottery-like competition, PoW-based blockchains cannot work with- out them. Hence, the presence of miners is mandatory for our economic system, which gets investigated con- sidering a list of assumptions. Firstly, we assume min- ers cannot take any pro t if there are no crypto-asset transactions (i.e. if there are no users), although real blockchains allow mining also empty blocks. That as- sumption, combined with the need to have at least one miner in the population, leads to constraining agents' payo to zero when m= 0 andu= 0 (i.e. density of users). Then, we assume miners have the same com- putational resources, and users can switch to the mining strategy at no cost. Lastly, Candcuare considered constants albeit, in real scenarios, costs and contribu- tions could vary depending on various internal and ex- ternal factors. Let us now brie y clarify the meaning of the contribution cu. To this end, we may refer to the Public Goods Game [31] (PGG), whose payo structure is similar to that of CAG. In the PGG, there are two strategies, namely cooperation and defection. Coopera- tors make a contribution typically of unitary value, while defectors contribute nothing. CAG does not include co- operators or defectors, yet the contribution curesembles the coin paid by cooperators in the PGG, although it might have a fractional value (see also [32]). In this con- text,curepresents the adoption costs of new technology and the consequences of using it, e.g. waiting for the validation of transactions. Now, observing that the ratio between costs and bene ts of new technology a ects the related di usion in a population [33], we highlight the rel- evance ofcufor studying blockchain dynamics. Finally, for the sake of simplicity, we assume the electrical cost C is denominated using the crypto asset of the game, whose market value is constant. Once clari ed the meaning of parameters and values constituting the game payo , we describe how the agent population evolves. The evolu- tion process is the same as that usually considered in other evolutionary games, such as the PGG. In partic- ular, a population arranged over a networked structure at the beginning is equally divided between users and miners. A networked structure entails that agents have a limited number of neighbours and, among them, the number of users corresponds to Nu. After each game it- eration, agents undergo a strategy revision phase de ned by an updating rule. The latter, in this work, is realised via a Fermi-like distribution [31] and de ned as P(sx sy) =1 1e1 K(yx)(2) so that the probability the y-th agent imposes its strat- egy, i.e.sy, on thex-th agent hinges on the di erence in their payo , namely yandx, and a parameter K representing the temperature (or noise) of the system. In real scenarios, some human factors can be represented by the parameter temperature (or noise). For instance, 3 the temperature can represent the degree of rationality in individuals, or the uncertainty in economic agents, when they take decisions. More in detail, the higher the tem- perature, the higher the probability a strategy revision occurs randomly. Likewise, the lower the temperature, the higher the strategy revision results from a rational choice. At high temperatures, i.e. with a lot of noise, the strategy revision phase becomes a coin ip. The strategy revision phase occurs at each game iteration once agents have played CAG in all groups of belonging. For clarity, considering a population arranged over a bi-dimensional square lattice with continuous boundary conditions, each agent belongs to 5 di erent groups identi ed as follows. Then, considering the x-th agent, its rst group is iden- ti ed considering that agent with its four direct neigh- bours. The other four groups are de ned considering the x-th agent being part of a group whose central agent is one of its neighbours, so the x-th agent occupies a side position. In doing so, agents play the game in ve dif- ferent groups collecting the related payo , whose total amount is compared with that received by miners via equation 2. Finally, there are three possible outcomes, two representing full-order (i.e. full of users and full of miners) and one representing co-existence of strategies. Assuming a payo equal to zero when m= 0 oru= 0 leads to oscillatory dynamics, e.g. in the case of no min- ers (i.e.m= 0), the strategy revision phase becomes a coin ip and, on average, half of the population turns the strategy to mining at the next iteration. Hence, the two full-order con gurations cannot constitute equilibria of the strategy distribution. Therefore, our analysis focuses on the emergence of oscillatory behaviours and assessing the phases of strategy co-existence resulting from game dynamics under di erent conditions. III. RESULTS In this section, we study the Crypto-Asset Game con- sidering populations of di erent size N, from 102to 104 agents, distributed over a regular square lattice with con- tinuous boundary conditions. Results are averaged over 100Nattempts, and performed considering a user con- tribution equal to cu= 0:1 andK= 0:5 if not stated oth- erwise. The rst analysis relates the value of the reward Rwith the density of miners. Figure 1 presents outcomes for a population of size 100 obtained at di erent reward valuesR. Interestingly, we nd that rewards smaller than R= 3100 in a population with 104agents, lead to steady- states characterised by an oscillatory behaviour. More in detail, as shown in Figure 1, a low reward entails that al- most half of the population changes continuously strat- egy over time, albeit the average behaviour suggests a con guration more stable with only few miners. Then, increasing the reward Rup to 3150 for the same pop- ulation, after an initial phase characterised by several oscillations like in the previous case, the agents reach a steady state with a very low density of miners. Highervalues ofRlead to higher densities of miners till reach- ing a unitary miners density for R= 48000. As soon as R> 50000 an oscillatory behaviour, conceptually similar to the one observed at very low Rvalues, emerges. In the last case, almost the whole population oscillates between a miners density equal to 1 and about 0 :6. Such analysis is then repeated on varying the size of the population and allows us to identify threshold values in range of the rewardRfor each speci c case. In gure 2 we show the threshold values of reward, we name critical rewards, on varying the population size. According to the model, CAG has several parameters that can be investigated to assess their e ect on the agent population, with particular interest for the density of miners. Starting with the temperature K, we consider a population with 2500 agents, to analyse the outcomes at di erent degrees of rationality. Such analysis is per- formed with special attention to two ranges, the rst one forK2[0;1] and the second range for K2[1;50]. Pre- vious investigations on dilemma games, as the Prisoners' dilemma and the Public Goods Game, reported that for the range of low temperatures the density of cooperators increases as the temperature increases from 0 to 0 :5 and then the bene cial e ect of the temperature on support- ing cooperation reduces [34]. Then, as reported in [31], increasing the temperature the dynamics of an evolution- ary game resembles that of the voter model [35]. Namely, too high temperatures entail agents change strategies by a process equivalent to a coin ip. In this case, we cannot map cooperation to the use of a token and defection to mining, because as described before, proof-of-work-based blockchains need miners, while populations are perfectly healthy without defectors. The result of this analysis is shown in gure 3. We nd that for temperatures between 0 and 1 the behaviour is similar to the one we observe in social dilemma games. Notably, increasing the tem- perature in that range, the density of miners reaches a small peak with around T= 0:75. Then, as the tem- perature goes towards high values, the density of miners increases till 0 :5, i.e. as expected, as soon as agents re- duce their rationality, the game resembles a voter model, and both strategies survive in the population almost with the same density (i.e. 0 :5). The agents' payo is a rele- vant component of a game. Then, as shown in Figure 4, we study the average payo of both strategies by varying the reward in a population with N= 104agents. Results indicate that miners can reach the highest payo , on av- erage, as the reward is slightly higher than the critical value for that population size |see the second plot from the left-hand side in Figure 4. Then, increasing the re- ward, the emerging con gurations lead both strategies to become poorly convenient. That justi es the behaviour we observed analysing the density of miners on varying the reward R. When only very few miners survive, min- ers and users receive the highest possible payo they can reach, and the population bene ts from a virtuous (in terms of energy consumption) steady state. We conclude the section studying how the user contribution cua ects 4 FIG. 1. Density of miners over time on varying the miners reward Ras indicated on the top of each plot. Each simulation trial lastsN100 time steps. Red line indicates the average density value, while a few single trials are reported by black lines. From left to right, results obtained with the following rewards: R= 1600,R= 3150,R= 48000,R= 60000 FIG. 2. Scaling of the critical reward ^Ron varying the pop- ulation size. The Lindicates the size of a (lattice) square side. Thus, for instance, L= 50 refers to a population with L2= 2500 agents. the miners density |see Figure 5. As reported, a too low user contribution entails the density of miners is not optimal as too many miners survive in the population. That result is neither trivial nor expected, and it resem- bles the behaviour we observe for too small rewards R, i.e. smaller than a critical value ^R(for each population size). Finally, as the cugets close to 1, the density of miners slightly increases. In summary, a user contribu- tion ranging from 0 :1 to 0:75 supports optimised strategy distributions. IV. DISCUSSION Energy sustainability is a critical issue of Proof-of- Work-based blockchains and feeds a heated debate. This class of blockchains requires computational resources for FIG. 3. Density of miners at the steady-state (i.e. after 100N) on varying the temperature Tin a population com- posed ofN= 2500 agents, playing with a reward R= 900. The standard error of the mean is very small on all samples, remaining hidden inside the circles on the curve. verifying transactions, which might lead to high energy consumption. In an economic system composed of ratio- nal agents, the energy sustainability of a PoW blockchain can be treated as a social dilemma. In the proposed model, miners and crypto-asset users interact by playing a game and getting a payo , depending on their strat- egy. The miners' payo includes a reward whose market value [36{38] can make mining highly pro table. Thus, the resulting dilemma on one end of the scale has the individual interest of miners and, on the other, the col- lective interest in curbing electricity consumption. The global energy consumption of a blockchain is linked to the nature of the mining competition. Namely, the higher the number of resources used for mining, the higher the average reward miners get over time. Increasing the com- putational power entails paying higher electricity costs. 5 FIG. 4. Average payo hiover time, obtained by users (blue) and miners (purple line) on varying the reward Rin a population withN= 104agents. FIG. 5. Miners density on varying the user contribution cu in a population with N= 2500 agents. Error bars report the standard error of the mean for each sample. Yet, as in lotteries, whose chances of success increase by buying more tickets, chances of success in the min- ing competition increase by using more computational resources. Sadly, albeit miners pay their electricity bills, such a competition entails society wastes a fraction of energy. The overall scenario, characterised by the above- described dilemma, can be studied by the framework of Evolutionary Game Theory. Therefore, motivated by all these observations, we propose a two-strategy game called the Crypto-Asset Game. The complexity of an economic system leads us to make several assumptions in the proposed model. For instance, miners and users can change strategy at no cost, all miners have the same computational resources, the price of electricity is con- stant, and the value of the crypto-asset in the market does not change. In summary, CAG simpli es real sce- narios. Notwithstanding, we deem CAG captures the essential dilemmatic aspects a ecting rational individu- als using blockchains. The results of our model, obtainedvia numerical simulations, show a rich spectrum of pos- sible steady states that the agent population can reach. More speci cally, depending on the game parameters, the agent population can converge toward steady-states char- acterised by a small number of miners or toward oscil- latory behaviours characterised by a fraction of agents continuously switching between the two strategies. Such an oscillatory behaviour agrees with previous studies re- lated to energy aspects of PoW blockchains [39]. We recall that the parameters of CAG represent the proto- col parameters of PoW blockchains. Finding steady-state con gurations corresponding to optimal strategy distri- butions, i.e. with a limited number of miners in the pop- ulation, suggests that the protocol parameters may have a relevant role in blockchain sustainability. Among such parameters, the miners' reward is probably the most im- portant. More speci cally, results indicate that rewards too low and too high are detrimental to blockchain en- ergy sustainability, as the density of miners is relatively high in both cases. Remarkably, we identify a range of values that rewards can take to ensure the evolution of a population towards a virtuous strategy distribution. Such a range of values depends on the population size. The smaller the population size, the smaller the value a reward can take for being bene cial (for the society it- self). In real blockchains, the miners' reward reduces over time [2], so the mining activity gets preserved by other mechanisms, such as the transaction fees that users can add (voluntarily) to their transactions. To conclude, we observe that the de nition of a range of bene cial re- wards appears, in terms of sustainability, in agreement with real-world blockchain dynamics. Notably, as more users adopt and use a crypto-asset, the miners' reward gets adapted according to various factors, such as those mentioned before. That does not entail rewards change to comply with environmental needs however, the min- ers' reward and the community size in a real blockchain do not seem uncorrelated parameters. 6 V. CONCLUSIONS In summary, we deem that the proposed model cap- tures fundamental aspects of PoW blockchains. Notwith- standing, several model features constitute relevant ele- ments for future research. Just to cite a few, elements deserving further attention relate to the introduction of switching costs for representing the e orts required for mining [40], the volatility of the crypto-asset value in the market [41], and other mechanisms, such as the halving of the miners' reward. In addition, in light of the structure of transaction networks [30, 42{44] we observe in vari-ous cryptocurrencies, the interaction topology of the pro- posed model deserves additional investigations. For in- stance, to study whether network structures [45], such as scale-free networks and small-world networks, can a ect the strategy pro le of a population playing the Crypto- Asset Game, as observed in social dilemmas [46{49]. Let us conclude by remarking that the optimal steady states reached by agents in some game conditions suggest that protocol designers may have a relevant role in the ener- getic impact of PoW-based blockchains. In particular, the miners' rewards could get designed to promote virtu- ous user behaviours, making, in the long run, this tech- nology sustainable and environmentally-friendly. [1] Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash system. https://bitcoin.org/bitcoin.pdf , 2008 [2] Antonopoulos, A. M.: Mastering Bitcoin: unlocking dig- ital cryptocurrencies. O'Reilly Media, Inc. , 2014. [3] Javarone, M. A., Wright, C. S.: Modeling a double- spending detection system for the bitcoin network. arXiv:1809.07678 , 2018 [4] Gola, C., Sedlmeir, J.: Addressing the Sustainability of Distributed Ledger Technology. Bank of Italy Occasional Paper ,670, 2022 [5] Saleh, F.: Blockchain without waste: Proof-of-stake. The Review of nancial studies ,34(3) , 1156{1190, 2021 [6] Thin, W. Y. M. M., Dong, N., Bai, G., Dong, J. S.: Formal analysis of a proof-of-stake blockchain. In 2018 23rd International Conference on Engineering of Com- plex Computer Systems (ICECCS) IEEE , 197{200, 2018 [7] Xiao, Y., Zhang, N., Lou, W., Hou, Y. T.: A sur- vey of distributed consensus protocols for blockchain networks. IEEE Communications Surveys & Tutorials , 22(2) , 1432{1465, 2020 [8] Zhang, S., Lee, J. H.: Analysis of the main consensus protocols of blockchain. ICT express ,6(2), 93{97, 2020 [9] Aggarwal, S., Kumar, N.: Cryptographic consensus mechanisms. In Advances in Computers, Elsevier ,121, 211{226, 2021 [10] Sedlmeir, J., Buhl, H. U., Fridgen, G., Keller, R.: The energy consumption of blockchain technology: Be- yond myth. Business & Information Systems Engineer- ing,62(6) , 599{608, 2020 [11] Teufel, B., Sentic, A., Barmet, M.: Blockchain energy: Blockchain in future energy systems. Journal of Elec- tronic Science and Technology ,17(4) , 100011, 2019 [12] Vranken, H.: Sustainability of bitcoin and blockchains. Current opinion in environmental sustainability , 28, 1{9, 2017 [13] Nowak, M.A.: Five rules for the evolution of cooperation. Science ,314(5805) , 1560{1563, 2006 [14] G omez-Garde~ nes, J., Campillo, M., Flor a, L. M., Moreno, Y.: Dynamical organization of cooperation in complex topologies. Physical Review Letters ,98(10) , 108103, 2007 [15] Perc, M., Grigolini, P.: Collective behavior and evolu- tionary games{An introduction. Chaos, Solitons & Frac- tals,56, 1{5, 2013[16] Perc, M., G omez-Gardenes, J., Szolnoki, A., Floria, L. M., Moreno, Y.: Evolutionary dynamics of group inter- actions on structured populations: a review. Journal of the royal society interface ,10(80) , 20120997, 2013 [17] Szolnoki, A., Perc, M.: Reward and cooperation in the spatial public goods game. EPL,92(3) , 38003, 2010 [18] Szolnoki, A., Perc, M.: Seasonal payo variations and the evolution of cooperation in social dilemmas. Scienti c reports ,9(1), 1{9, 2019 [19] Szolnoki, A., Chen, X.: Cooperation and competition be- tween pair and multi-player social games in spatial pop- ulations. Scienti c reports ,11(1) , 1{9, 2021 [20] Szolnoki, A., Perc, M.: The self-organizing impact of av- eraged payo s on the evolution of cooperation. New Jour- nal of Physics ,23(6) , 063068, 2021 [21] Szolnoki, A., Perc, M.: Antisocial pool rewarding does not deter public cooperation. Proceedings of the Royal So- ciety B: Biological Sciences ,282(1816) , 20151975, 2015 [22] Javarone, M.A.: Statistical physics and computational methods for evolutionary game theory. Springer , 2018 [23] Javarone, M. A.: Statistical physics of the spatial prisoner's dilemma with memory-aware agents. EPJ-B , 89(2) , 1{6, 2016 [24] Zhang, J., Wu, M.: Cooperation Mechanism in Blockchain by Evolutionary Game Theory. Complexity , 2021 , 1258730, 2021. [25] Li, W., Cao, M., Wang, Y., Tang, C., Lin, F.: Min- ing pool game model and nash equilibrium analysis for pow-based blockchain networks. IEEE Access ,8, 101049{ 101060, 2020 [26] Liu, Z., Luong, N. C., Wang, W., Niyato, D., Wang, P., Liang, Y. C., Kim, D.I.: A survey on blockchain: A game theoretical perspective. IEEE Access ,7, 47615{ 47643, 2019 [27] Kim, S.K.: Blockchain governance game. Computers & Industrial Engineering ,136, 373{380, 2019 [28] Wang,T., Bai, X., Wang, H., Liew, S.C. Zhang, S.: Game-Theoretical Analysis of Mining Strategy for Bitcoin-NG Blockchain Protocol. IEEE Systems Journal , 15(2) , 2708{2719, 2021 [29] Kraner, B., Li, S.-N., Teixeira, A.S., Tessone, C.J.: Agent-based Modelling of Bitcoin Consensus with- out Block Rewards IEEE International Conference on Blockchain (Blockchain) ,2022 , 29{36, 2022 7 [30] Vallarano, N., Tessone, C. J., Squartini, T.: Bitcoin Transaction Networks: an overview of recent results. Frontiers in Physics ,8286, 2020 [31] Javarone, M.A., Battiston, F.: The role of noise in the spatial public goods game. JSTAT ,2016(7) , 073404, 2016 [32] Javarone, M. A.: The host-pathogen game: an evolu- tionary approach to biological competitions. Frontiers in Physics ,6, 94, 2018 [33] Hall, B. H., Khan, B.: Adoption of new technology. NBER Working Paper ,w9730 , 2003 [34] Amaral, M.A., Javarone, M.A.: Strategy equilibrium in dilemma games with o -diagonal payo perturbations. Physical Review E ,101(6) , 062309, 2020 [35] Liggett, T. M.: Stochastic interacting systems: contact, voter and exclusion processes. Springer science & Busi- ness Media ,324, 1999 [36] Kristoufek, L.: What are the main drivers of the Bitcoin price? Evidence from wavelet coherence analysis. PloS one,10(4) , e0123923, 2015 [37] Blau, B. M. : Price dynamics and speculative trading in bitcoin. Research in International Business and Finance , 41, 493-499,2017 [38] Javarone, M.A., Di Antonio G., Vinci, G.V., Cristodaro, R., Tessone, J.C., Pietronero, L.: Disorder Unleashes Panic in Bitcoin Dynamics. https://arxiv.org/abs/2209.09832 , 2022 [39] Fiat, A., Karlin, A., Koutsoupias, E., Papadimitriou, C.: Energy equilibria in proof-of-work mining. In Proceedings of the 2019 ACM Conference on Economics and Compu- tation , 489{502, 2019[40] Thum, M.,: The Economic Cost of Bitcoin Mining. CE- Sifo Forum, ISSN 2190-717X, M unchen ,19(1) , 43{4, 2018 [41] Aalborg, H. A., Moln ar, P., de Vries, J. E.: What can ex- plain the price, volatility and trading volume of Bitcoin? Finance Research Letters ,29, 255-265, 2019 [42] Kondor, D., Csabai, I., Sz ule, J., P osfai, M., Vattay, G.: Inferring the interplay between network structure and market e ects in Bitcoin. New Journal of Physics , 16(12) , 125003, 2014 [43] Lin, J. H., Primicerio, K., Squartini, T., Decker, C., Tes- sone, C. J.: Lightning Network: a second path towards centralisation of the Bitcoin economy. New Journal of Physics ,22(8) , 083022, 2020 [44] Lin, J. H., Marchese, E., Tessone, C. J., Squartini, T.: The weighted Bitcoin Lightning Network. Chaos, Soli- tons & Fractals ,164, 2022 [45] Estrada, E.: The structure of complex networks: theory and applications. Oxford University Press , 2012 [46] Santos, F. C., Pacheco, J. M.: Scale-free networks pro- vide a unifying framework for the emergence of coopera- tion. Physical review letters ,95(9) , 098104, 2005 [47] Santos, F. C., Santos, M. D., Pacheco, J. M.: Social diversity promotes the emergence of cooperation in public goods games. Nature ,454(7201) , 213{216, 2008 [48] Cardillo, A., G omez-Garde~ nes, J., Vilone, D., S anchez, A.: Co-evolution of strategies and update rules in the prisoner's dilemma game on complex networks. New Journal of Physics ,12(10) , 103034, 2010 [49] Amaral, M.A., Wardil, L., Perc, M., da Silva, J. K.: Evo- lutionary mixed games in structured populations: Coop- eration and the bene ts of heterogeneity. Physical Review E,93(4) , 042304, 2016
{ "id": "2209.12809" }
2108.08656
Max-min Fairness Based Faucet Design for Blockchains
In order to have transactions executed and recorded on blockchains such as the Ethereum Mainnet, fees expressed in crypto-currency units of the blockchain must be paid. One can buy crypto-currency called Ether of the Ethereum blockchain from exchanges and pay for the transaction fees. In the case of test networks (such as Rinkeby) or scientific research blockchains (such as Bloxberg), free crypto-currency, Ether, is distributed to users via faucets. Since transaction slots on the blocks, storage and smart contract executions are consuming blockchain resources, Ethers are distributed by fixed small amounts to users. Users may have different amount of Ether requirements; some small amounts and some large amounts during different times. As a result, rather than allowing the user to get a fixed small amount of Ether, a more general distribution mechanism that allows a user to demand and claim arbitrary amounts of Ether, while satisfying fairness among users, is needed. For this end, Max-min Fairness based schemes have been used in centralized settings. Our work contributes a Max-min Fairness based algorithm and its Solidity smart contract implementation that requires low transaction costs independent of the number of users. This is important on the Ethereum blockchain, since a smart contract execution with transaction costs depending on the number of users would mean block gas limit exhaustion problem will eventually be met, making the smart contract ineffective. We report tests which confirm that the low transaction cost aims have been achieved by our algorithm.
http://arxiv.org/pdf/2108.08656v1
Serdar Metin, Can Özturan
cs.DC, cs.CR
cs.DC
Max-min Fairness Based Faucet Design for Blockchains Serdar Metin1,, Can ¨Ozturan1 Bo˘gazic ¸i University, Bebek, ˙Istanbul, Turkey Abstract In order to have transactions executed and recorded on blockchains such as the Ethereum Mainnet, fees expressed in crypto-currency units of the blockchain must be paid. One can buy crypto-currency called Ether of the Ethereum blockchain from exchanges and pay for the transaction fees. In the case of test networks (such as Rinkeby) or scientific research blockchains (such as Bloxberg), free crypto-currency, Ether, is distributed to users via faucets. Since transaction slots on the blocks, storage and smart contract executions are consuming blockchain resources, Ethers are distributed by fixed small amounts to users. Users may have different amount of Ether requirements; some small amounts and some large amounts during different times. As a result, rather than allowing the user to get a fixed small amount of Ether, a more general distribution mechanism that allows a user to demand and claim arbitrary amounts of Ether, while satisfying fairness among users, is needed. For this end, Max-min Fairness based schemes have been used in centralized settings. Our work contributes a Max-min Fairness based algo- rithm and its Solidity smart contract implementation that requires low transaction costs independent of the number of users. This is important on the Ethereum blockchain, since a smart contract execution with transaction costs depending on the number of users would mean block gas limit exhaustion problem will eventu- ally be met, making the smart contract ineffective. We report tests which confirm that the low transaction cost aims have been achieved by our algorithm. Keywords: Blockhain, Faucet, Max-min Fairness, Resource Allocation Corresponding author Email addresses: serdar.metin@boun.edu.tr (Serdar Metin), ozturaca@boun.edu.tr (Can ¨Ozturan) Preprint submitted to arXiv.org August 20, 2021arXiv:2108.08656v1 [cs.DC] 19 Aug 2021 1. Introduction Since its conception in 2008 with Bitcoin [1], blockchain technologies have been the focus of much attention. Although successful at achieving its initially proposed purpose of providing a peer-to-peer electronic cash system, Bitcoin was conceived as an autonomous global currency with guaranteed scarcity, and as such, offered limited programmability and functionality. The designers of the following generation of blockchain systems mainly problematised this point and endeavoured on expanding blockchain capabilities. With the introduction of smart contracts by the Ethereum [2], the blockchain technology met Turing-complete programming functionalities. Our work aims to address a recurrent question in computer science, within the blockchain context: the fair allocation of shared resources. We focus on the fair allocation of intrinsic resources of blockchains. Since a blockchain is a distributed ledger, operated in a distributed manner, the ability to operate on the blockchain (e.g. executing a transaction or a smart contract function, or deploying a smart contract) is a shared, limited resource. We look at the fair allocation of this re- source. In the Ethereum blockchain ecosystem that offers smart contract functionality, the resource usage mentioned above are quoted in terms of gas, which refers to the cost necessary to perform a transaction on the blockchain. The gas is priced using the blockchain’s intrinsic crypto-currency, called Ether in the case of Ethereum. Hence, just like a number of litres of petrol (priced as USD per litre) is needed in order to have a car travel a number of kilometers, a number of gas units (priced as Ether per gas unit) is needed to execute a number of instructions in a blockchain transaction. Thus, the problem collapses down to the distribution of the system’s intrinsic crypto-currency. In commercial public networks like Ethereum Mainnet, the distribution process relies on the competition to create new Ether units of the blockchain currency, and the trading of the already generated Ethers. However, on test networks such as Rinkeby or scientific research blockchains such as Bloxberg [3] alternative Ether distribution mechanisms are used. Afaucet is one such mechanism, which offers free currency to users accord- ing to some predefined policy. In general, faucets offer a fixed amount of currency for a given time period or block span. For example, Bloxberg blockchain provides 0.2 Ethers via its web based faucet [4]. However, this mechanism can be exploited simply by making recurrent requests and accumulating the obtained currency. For this reason, it cannot be accounted for as a fair distribution scheme. Max-min Fair- ness [5, 6] is a distribution scheme that is widely employed in different contexts 2 where fairness is a system requirement (e.g. cpu scheduling, bandwidth allocation etc.), and it can also be considered for the fair distribution of currency in faucet systems. On the Ethereum blockchain, the size of each block is bound by a maximum amount of gas that can be spent per block. This upper bound on the gas amount is known as the block gas limit . A contract function will not be able to execute if its gas cost exceeds the block gas limit. We refer to this problem as the block gas limit exhaustion problem. Hence, smart contract functions should be designed and implemented in such a way that their execution does not consume too much gas which may lead to block gas limit exhaustion problem. If gas limit is reached, it will simply mean the contract function cannot be executed which in turn may mean the smart contract can no longer operate properly. In this work, we first implement Max-min Fairness algorithm in the blockchain context as a smart contract, as it is originally implemented in centralized systems. After demonstrating the shortcomings of this implementation in the blockchain context (i.e. block gas limit exhaustion problem), we contribute an algorithm that actuates the Max-min Fairness scheme in the blockchain context without run- ning into the original implementation’s shortcomings. We name our algorithm Autonomous Max-min Fairness (AMF), since it is operated autonomously by the users in the system, as opposed to the original algorithm, in which the distribution operation is done centrally by an authority. Figure 1 illustrates the operations of centralised and authority driven faucet smart contract implementation in (a) and autonomous and decentralised implementation driven by crowds of users in (b). In the former scenario, the distribution is done with a single call to the distribute function by the authority node in the beginning of the epoch, whereas in the latter the users make multiple calls to the claim function throughout the epoch in order to obtain their own share. We further extend the study to a weighted version of Max-min Fairness scheme, in which case the users are assigned weights for their respective shares, according to some prioritisation policy. In the tests we run, the weight of each user’s share is defined to be the reciprocal of the total demand volume of the user, up to and including the then present demand. By discouraging unnecessary demands, this policy leads to higher sharing incentives among users. Moreover, it secures fair- ness of distribution in the long run, since latter allocations are mediated with the former demands of a given user. We name this algorithm Weighted Autonomous Max-min Fairness (WAMF). The remainder of the article is organised as follows: In the next section, we re- view the literature on related work. Having laid out the background on blockchain 3 Figure 1: The call sequences of the (a) Authority driven faucet, and (b) Autonomous faucet (driven by crowds of users), in a distribution cycle. Blue arrows indicate low-cost transactions (demand and claim), and red arrow indicates a high-cost transaction (distribute). studies, in Section 3 we state our problem in the light of the observations from Section 2. We continue with a section where we justify our design decisions concerning the experimentation environment. Following that, in Section 5 the Max-min Fairness scheme and its adaptation to the present context is explained. In Section 6, the implementation details are laid out. Once the implementation is explained, the results of the experiments are given in Section 7. We discuss the results in Section 8, and conclude the article in Section 9 with the prospects of possible follow-up studies. 2. Related Work Blockchain technologies have been proposed for a number of user applications (e.g. [7, 8, 9]), and also for background services (e.g. [10, 11]). By the introduction of tokenised economies, blockchain systems are rendered 4 capable of governing allocation and trade of resources [12]. A token is a data structure with certain attributes and operations defined on them, serving for rep- resenting items or value. The first two standards that are developed for token economies are ERC 20and ERC 721, which define divisible and non-divisible, or as they are so called, fungible andnon-fungible tokens, respectively. Although compatible with our setting, for reasons of simplicity we did not use token stan- dards in our implementation. In many areas in computer science where the problem of distributing shared re- sources is encountered, Max-min Fairness [5, 6] has been considered a fair method [13, 14]. It is also the main method employed in the present study. The question of fair sharing first arose in the context of operating systems, where scheduling the resources of a single computer (e.g. processor time) among processes was the main problem [15]; followed by the problem of distributing the same resources among users [16], typically at the computer centres of universi- ties. Similar problems are addressed in the computer networks literature over the allocation of link bandwidth [17, 13]. Fair scheduling algorithms have also been the focus of attention in grids [18]. With the advancements in distributed systems, and new paradigms in cluster and high-performance computing, the problem of fairness evolved yet to larger scales, and new questions arose. In this context, typically, service providers charge users for the common resource that is demanded by, and allocated to them. The same question is now expressed in terms of charging fairness: how much should each demand cost, for it to be fair among clients [19] ? Should each type of resource cost the same, and if not how are they traded [20] ? 3. Problem Statement As indicated in Section 2, the criteria for fair allocation is intimately related with the context the problem is situated in. A number of observations that stand out to be relevant are as follows: 3.1. Abstraction for Demands: The level at which distribution is done As observed in Section 2, the allocation may be done at process-level [15], user-level [16], or group-level [21]. The faucet system that we contribute is de- signed so as to provide fair distribution of internal currency among users, with the assumption that the users are identified and registered for making demands. Therefore, the abstraction for the demands are at the user level . 5 3.2. Abstraction for Resources: The number of resource types and their relation- ship with each other If the resources are abstracted to be homogeneous, the main problem is pricing a unit resource [19]. On the other hand, if more than one type of resources ab- stracted, the problem should be extended as to address how they are traded among each other [20]. A key factor for determining the price of a cryptocurrency is its by then present and ultimate total supply [22]. In the system we developed, the growth of the total supply is predefined by an immutable policy, securing the ground for a calculable and predictable pricing mechanism. Since the domain we restricted the present study into is non-commercial blockchain systems, pricing here does not refer to monetary pricing, but rather the cost of operations in terms of intrinsic cryptocur- rency. For simplicity, abstraction for the resource is kept at single resource type, which is the intrinsic currency of the blockchain ecosystem, which in our case is the Ether cryptocurrency. With Ether, a user can pay for storage as well as exe- cution cost of smart contract functions on the Ethereum blockchain, providing the basis for a unified resource type. 3.3. Temporal Granularity: The frequency at which the allocation procedure takes place For addressing this issue, the blockchain is divided into epochs, which we define as a constant number of successive blocks. According to the original Max- min Fairness algorithm, the distribution should be done at the beginning of each epoch, which we implemented as such. In the algorithms we develop, we also expand the allocation procedure over the whole span of the epoch, to be decen- trally carried out by users, in the so called claim rounds . The temporal setting will further be described in Sections 6 and 7. 4. Design Decisions on the Experimentation Environment Although there are a number of design decisions for setting up a blockchain system to carry out experiments on, one key factor is the proof scheme employed in the consensus protocol. In the present study, the experiments are carried out on the Parity implementation of a permissioned Ethereum blockchain [23]. The main concern for this choice is to decouple two independent, yet intertwined questions specific to the blockchain environments. Blockchains are a means both for decen- tralisation, and for securing digital trust. By decoupling these two questions and 6 allowing to concentrate on decentralisation premise, permissioned blockchains are ideal experimentation environments for blockchain operation analysis. Let us elaborate on that. Various proof schemes, employed in blockchains’ consensus protocols, neces- sitate different trust assumptions, and equivalently, offer different levels of digital trust to the ecosystems they are embedded in. If one imagines proof schemes on a scale for their provision of trust, Proof-of-Work (PoW) blockchains reside on one extreme, since they assume no preliminary digital trust, and provide all the digital trust needed via their operation. For this reason they are referred to as trustless computation environments, in the sense that no prior trust is needed among the users to be involved in the operation of the ecosystem. Initial blockchains such as Bitcoin [1] and Ethereum [2] employ PoW based consensus protocols. Although they can operate stand-alone trust-wise, PoW blockchains expend enormous physical resources (e.g. electricity, processing power) and their oper- ation is costly. Other proof schemes were proposed to replace PoW in order to eliminate these costs. These schemes provided different levels of trust, compen- sated by extra-digital measures to different extents, inversely proportional with the former. Among these are: Proof-of-Space [24], Proof-of-Stake [25, 26], Proof-of- Prestige [27], Proof-of-Activity [28], Proof-of-Useful-Work [29], with different utilities and limitations they bear. Proof-of-Authority (PoA) blockchains, residing on the other extreme, provide no trust via their operation, and rely solely on extra-digital measures (e.g. reserve the right to operate on the blockchain only to trusted parties) to secure trust. The trust structure described above for PoA is equivalent to the trust structure of the conventional computation environments, which is referred to as Pretty Good Privacy (PGP) trust chain [30]. The PGP scheme secures trust with the assumption of the presence of a trust anchor , a party that can be unconditionally trusted, and from that point, other parties are trusted either by the direct reference of, or by a chain of references rooted at the trust anchor. In the PoA setting, authority nodes act as trust anchors. We implemented our algorithms in Solidity programming language and run on an Ethereum Virtual Machine (EVM) environment [31], and more specifically, its Parity implementation, as mentioned above. The main reason for selecting this framework is its wide use among blockchain ecosystems. Many blockchain ecosystems and blockchain based systems utilise either EVM or virtual machines similar to EVM, and support Solidity programming language for smart contracts (e.g. [32, 33, 34, 35] etc.), and for this reason there are also studies available on the performance [36], security [37], and inspection [38] of the programming 7 language. Not only is it a widespread programming language, Solidity is also Turing complete [2], which makes it well suited for general purpose computations. It is a high-level, easy to read, object oriented script language. A number of smaller design decisions are taken concerning the parameters of Parity Ethereum Virtual Machine and the procedure of the experiments, which is left to be discussed in Section 7, since their explanation relies occasionally on the implementation of the algorithms we present. 5. Max-min Fairness Model The main objective of the Max-min Fairness scheme is to maximise the mini- mum share given to a user, and its mechanism is based on a trivial fairness scheme, where resources are uniformly distributed among the demanders, each one of the ndemanders obtaining1 nof the resource. Max-min Fairness improves the trivial scheme on the premise that not every demander would demand as much as the share that is reserved for them. Accordingly, the Max-min Fairness allocation al- gorithm takes recursive iterations over the list of demanders, reallocating unused shares of the underdemanders among the overdemanders. In the first iteration, starting with the smallest demand and proceeding in the ascending order, the algorithm allocates the demanders the minimum of1 nof the capacity ( c) and their demands (i.e. minfc n; dug). At the end of the first iteration, some demanders are fully supplied, and some capacity is left over. The algorithm, in turn, proceeds with updated n0andc0, until either all demands are fully supplied, or the capacity is depleted. The operation of the scheme can be seen in Figure 2, and its pseudo-code in Algorithm 1. In the pseudo-code the demand heaps are denoted by D0and D1, and individual demands in these heaps are represented by lower case letters, subscripted with u, for user id number (i.e. du). The balances of users are kept in a vector, and the balance of user uis repre- sented with bu. At each iteration, the maximum available amount to be allocated to each user is recalculated by dividing the remaining capacity by the number of remaining demands, and denoted by s, representing the unit share . To illustrate the operation of the algorithm we may consider the following ex- ample: Suppose that a resource of 30units will be shared among three users, with the demands expressed as <4;11;15>. The algorithm distributes the resource in 3 iterations. The rounds and the shares assigned in each round can be seen in Table 1. 8 Demand Heap 0Demand Heap 1 SuppliedLeftover Demand Leftover DemandUser Demands Leftover Capacity Figure 2: The operation of Max-min Fairness Algorithm User 1User 2User 3Share Capacity Demands 4 11 15 30 Iteration 1 4 10 10 10 6 Iteration 2 0 1 3 3 2 Iteration 3 0 0 2 2 0 Total 4 11 15 Table 1: An exemplary distribution according to Max-min Fairness scheme 9 How the unsatisfied demand, or the leftover capacity will be treated after a distribution period is a decision of policy. In our current work, we implement a policy that discards all the unsatisfied demands, in the case of capacity depletion, and transfers the leftover capacity to the next distribution period, in the case of satisfying all the demands. The amount that is reserved for each epoch is denoted by C. We call this amount the epoch capacity , and in the present study, we took it to be constant. The actual amount that is distributed in an epoch is denoted by c, and it is at least as much as C, since it is added to cat the beginning of each epoch (i.e. Algorithm 1 line 2). In Algorithm 1, the lines 420constitute the main, or outer loop of the algorithm, which is responsible for repeating the inner loop (lines 1018) until either the demands or the capacity is depleted. It starts with calculating the share (lines 59), and then starts the inner loop. Once the proceeding of the inner loop is completed, the demand heaps exchange their functions (line 19) and the outer loop takes another iteration. The inner loop accounts for iterating on and processing the demands in the active heap. In line 11the demand volume and the user id at the root of the heap is read into a variable and deleted from the heap. After that the minimum of user demand and unit share (i.e. minfc n; dug) is assigned to the user in lines 1214. The control structure in lines 1517checks whether the demand is fully satisfied. If not, the leftover demand is inserted to the heap with the user’s id (line 16) to be processed in further iterations. Another version of Max-min Fairness is weighted Max-min Fairness , in which case the users are weighted over some predefined policy, and the shares are calcu- lated with the weights assigned to each user, individually. In this version, instead of the number of demands, the total capacity is divided by the total weight in order to calculate the unit share ( s). In turn, the user share (sufor user u) is calcu- lated for each user by multiplying the unit share with the user’s weight. The users are allocated the minimum of their demands, and their individually assigned user shares. 10 Symbol Meaning C Amount of resource that is added to the existing capacity at every epoch, C2Z+ Di Set of demand heaps, i2f0;1g U Set of users u2fu1; : : : ; u ng c The existing capacity, initialised at0, incremented by Cat every epoch s Unit share u Useru,u2U dui Demand of user ustored on heap Di bu Resource balance of user u,bu2 Z0; u2U Table 2: Symbols used in CMF (Algorithm 1) and their meanings Algorithm 1: Max-min Fairness (CMF) 1FU N C T I O N : DI S T R I B U T E (D; U; c ) 2c c+C; 3i 0; 4while Di:size()>0andc >0do 5 ifc < D i:size then 6 s 1; 7 else 8 s j c Di:sizek ; 9 end 10 while Di:size > 0andc >0do 11 (dui; u) Di:delMin (); 12 a min (s; dui); 13 bu bu+a; 14 c ca; 15 ifdui> sthen 16 D1i:insert (duis; u); 17 end 18 end 19 i 1i; 20end 21return ; Accordingly, the formula for calculating the unit share sis: 11 s=cPn j=1wj and the user share suis given by: su=wus=wucPn j=1wj We develop autonomous algorithms called AMF (unweighted version) and WAMF (weighted version) for actuating the Max-min Fairness scheme. In WAMF, the weights are defined to be the reciprocals of the total amount of demands users have made up to the distribution time. This aims at incentivizing users to make minimal demands suitable to their needs, in order not to be disadvantageous in the long run. The implementation details of WAMF algorithm, as well as its pseudo- code is presented in Section 6. 6. Implementation The conventional setting to utilise Max-min Fairness typically includes a cen- tral unit (either an individual process running on a central processor or a dedicated administrative host in a computer network) calculating the shares and carrying out the iterative assignments. This is applicable to the blockchain context, but not without potential drawbacks. The main bottleneck in such an adaptation is the block gas limit, which imposes an absolute upper bound for the number of opera- tions that may take place within the processing of a single block. For this reason, we implemented two algorithms and compared them. The implementations are available at [39] The first algorithm is the Conventional Max-min Fairness (CMF) . This algo- rithm is implemented as if it operates in the conventional computational setting. The demands are collected for a given time period or block span, which is re- ferred to as an epoch in this study. At the beginning of the following epoch these demands are supplied resources in the Max-min Fairness order by a single node (typically an authority node) in one step with the distribute function. In the second algorithm, the demands are collected in a given epoch, and the demanders claim their reserved share by calling a claim function in the claim rounds of the following epoch. We call this approach Autonomous Max-min Fair- ness (AMF) , since there is no need for a central node to carry out the execution, and the system is operated autonomously by its users. The operation of AMF emulates the original algorithm identically, except for the last iteration where the 12 distribution is in the first come first served order among overdemanders. Origi- nally, the last iteration is in the ascending order of demand volumes, as are all the preceding iterations. We implemented both unweighted as well as the weighted versions of Max- min Fairness for the AMF. The reason for not implementing a weighted version of CMF is due to its gas cost structure (elaborated on in Section 7.1). In the following subsections we give the implementation details of the algorithms. 6.1. Conventional Max-min Fairness As it is in the conventional setting, CMF utilizes two min-heaps, exchanging the demands among each other in each iteration. The operation scheme and the pseudo-code is the same as it is described in Section 5 (i.e. Figure 2 and Algorithm 1). Since Solidity does not offer a built-in data structure for min-heaps, we im- plemented it during the development of CMF. We kept the implementation of the min-heap minimal in order to keep the gas cost at minimal. Only the amount of demand, and the id (i.e. unique user number given to each user) of the demanding user is stored and operated on. The remainder of the user attributes are fetched from other data structures when needed (e.g. while writing to user balance), by using the user id as the key. We used an array implementation of heap, a complete binary tree, where the values are kept in a node array and the insert anddelete minimum functions are implemented so that they index and move the nodes according to the min-heap or- ganisation. This is also immune to degeneration attacks, in which case an attacker feeds the tree with selective input to make one branch grow disproportionately, forcing heap functions run in O(n)instead ofO(log(n))time. We present the performance of CMF, as well as the min-heap, in Section 7.1. 6.2. Autonomous Max-min Fairness In AMF, the epochs are divided into claim rounds. At the end of each round, the remaining number of demands, the remaining capacity, and the resulting share is recalculated. The rounds proceed in this manner until either the capacity is de- pleted, or all demands are supplied. The rounds are used to emulate the iterations of the outer loop (lines 420of Algorithm 1) of the distribute function. In order to avoid repetition, we give the pseudo-code only for the weighted version (WAMF), since it is more general as compared to the unweighted version (AMF), the latter being the same algorithm with fewer steps. The pseudo-code of WAMF is presented in Algorithm 2. The symbols for the additional variables, 13 and their meanings are given in Table 4. The calculation of weights is obscured from the pseudo-code for the ease of review, and the weights are simply shown as constant variables. The calculation of weights is described in detail in the next subsection. In AMF, instead of a single-handedly operating distribute function, there is a claim function, which after necessary checks, allows the user assign her allocated share to herself. Each user is expected to execute the function individually, to have carried out the iterations of the inner loop of the distribute function (lines 1018 of Algorithm 1), in a decentralized manner. Any share unclaimed in its due round/epoch is lost. It is included in the fol- lowing round/epoch as part of the leftover capacity. In a given epoch, users may make new demands for the next epoch, while claiming their share for the previ- ous. The time frame can be traced in Table 3 over the demands and corresponding claims, and can be seen more explicitly in Figure 3. User 1 User 2 User 3 Share Capacity Demand 1 4 11 15 Round 1 Epoch 1 Claim 0 Round 2 Round 3 Demand 2 11 3 8 30 Round 1 4 10 10 10 6 Epoch 2 Claim 1 Round 2 1 3 3 2 Round 3 2 2 0 Demand 3 7 8 12 10 30 Round 1 10 3 8 10 9 Epoch 3 Claim 2 Round 2 1 9 8 Round 3 Demand 4 17 13 5 38 Round 1 7 8 12 12 11 Epoch 4 Claim 3 Round 2 Round 3 Demand 5 .. .. .. .. 41 Round 1 13 13 5 13 10 Epoch 5 Claim 4 Round 2 4 10 6 Round 3 Table 3: An exemplary distribution carried out with AMF In AMF the demands are kept in a map, rather than a min-heap, since it is nec- essary for each user to be able to access their own demand entry, while claiming it. In the present implementation, the demands are kept for one epoch, and claimed in the following. For this reason, a circular buffer of size two is kept for each 14 Epoch-3- Demand-1 Demand-2Claim-1Epoch-1 Epoch-2 ...Claim-3 Demand-4Epoch-4 ...Claim-4Epoch-5 Claim-2 Demand-3Time Figure 3: Time frame for the matching demand andclaim function calls user, in order to prevent an incoming demand in a given epoch to overwrite the previous epoch’s demand, before it is claimed. This leads to a two dimensional (2xn) demand vector, where the demands for even and odd epochs are kept sep- arately. Additionally, the variable for keeping the epoch in which the demand was made (for preventing an obsolete demand to interfere with later demands) is im- plemented; likewise as a circular buffer of size two, in order to separate between the even and the odd epochs. In addition to the restructured demand , and the newly introduced claim func- tions, AMF includes a state update function, which is called at the beginning of both. The state update function checks the block number, and calculates the epoch and the round in which the called function will be executed (lines 3and10, re- spectively). The number of blocks for the duration of an epoch and a round, is also a parameter of the system, which we experimented on in the present study, and commented on in the results section. The pseudo-code in Algorithm 2 is organised in three functions, namely, up- date state (lines 115),demand (lines 1624), and claim (lines 2545). At the beginning of each function (in lines 2,18, and 27) a local selector variable (i) for the circular buffers is declared and defined. When called in a given epoch, the state update and the claim functions assume the same selector values, and de- mand function assumes its binary complement. That is to say ivalues proceed as <0;1;0;1; ::: > for the state update andclaim functions, and as <1;0;1;0; ::: > for the demand function. In line 3, the epoch number ( E) is checked for. If the value of Eis found to be obsolete, it is updated. Once the epoch number is updated, the round number, 15 Symbol Meaning C Amount of resource that is added to the existing capacity at every epoch, C2Z+ B Current block number O The block number at which the contract was deployed, offset E Epoch number R Round number RE Reset epoch, the epoch at which the total weight was last reset ES Number of blocks in an epoch, epoch span RS Number of blocks in a round, round span U Set of users u2fu1; : : : ; u ng Wi Total weight for even and odd epochs, i2f0;1g a Demand volume, amount u Useru,u2U dui Demand of user uin list i,i2f0;1g deui The last epoch user umade a demand, i2f0;1g ceu The last epoch user umade a claim cru The last round user umade a claim bu Resource balance of user u,bu2Z+ wu Weight of user u c The existing capacity, initialised at 0, incremented by Cat every epoch Table 4: Symbols used in Algorithm 2 and their meanings the capacity, and the unit share are also updated (lines 57), and the function returns. If epoch number is found to be up-to-date, a similar check is done for the round number in line 10. This check, when it returns positive, leads to the update of the round number and the unit share (lines 1112), and the function returns. If no update is required, the function returns without making any changes in the state. After updating the state and setting the selector variable, in line 19the demand function checks whether the user has made a demand in the then present epoch. If the user has made a demand, the function returns without registering the newly arrived demand. If not, the demand amount ( a) is written to the corresponding slot in the circular demand buffer of the user, and the demand epoch of the user is updated to be the then current epoch (lines 2021). In the following line the function checks whether any demands have been made by other users in the then current epoch. If not, the total weight is set to the user’s weight (line 23), which resets the total weight variable for the next epoch. The variable for keeping the last epoch in which the total weight is reset ( RE) is updated in line 24. If demands have been made by other users prior to the then current call (i.e. RE=E) the 16 weight of the user is added to the total weight, to be accounted for in the next epoch (line 26). The claim function, similar to the demand function, starts with updating the state and initiating the selector variable. It continues with a number of checks (line 33). Unless the demand has been done in the previous epoch and is greater than 0, or if the capacity is depleted, the function returns without taking any further action. Following that in line 36the function checks whether the user has made any claims in the then current epoch. If so, the last round the user made a claim is checked (line 37). If that also turns positive, which means the user has claimed her fair share for the round, the function returns without making any assignments. If the check in line 36turns out negative, meaning this is the user’s first claim in the then present epoch, the variable for the last epoch the user made a claim (ceu) is updated (line 41). After that, a similar variable for the round ( cru) is up- dated in line 41. Next, the assignment operations similar to the ones in Algorithm 1 is done in lines 4446. Note that this algorithm differs from the CMF algorithm in that the leftover demands are not inserted into another heap; they remain in the map. Instead, the fully satisfied demands are removed from the cumulative weight variable in lines 4244, having the same effect as deleting the minimum in CMF algorithm. This way, as long as there is an unsatisfied demand, the user’s weight is included in the total weight, and the unit share is calculated accordingly. At the end of the epoch, all demands are obsoleted. 17 Algorithm 2: Weighted Autonomous Max-min Fairness (WAMF) 1FU N C T I O N : UP D A T E ST A T E (O; B; E; ES; RS ) 2i E mod 2; 3ifE <BO ES then 4 E BO ES ; 5 R j (BO)%ES RSk ; 6 c c+C; 7 s bc=W ic; 8 return 9end 10ifR <j (BO)%ES RSk then 11 R j (BO)%ES RSk ; 12 s c=W i; 13 return ; 14end 15return ; 16FU N C T I O N : DE M A N D (u;a) 17UP D A T E ST A T E (O; B; E; ES; RS ); 18i (E+ 1) mod 2; 19ifdeui6=Ethen 20 dui a; 21 deui E; 22 ifRE < E then 23 Wi wu; 24 RE E; 25 else 26 Wi Wi+wu; 27 end 28end 29return ; 30FU N C T I O N : CL A I M (u) 31UP D A T E ST A T E (O; B; E; ES; RS ); 32i E mod 2; 33ifdeui6=E1orc= 0 ordui= 0then 34 return ; 35end 36ifceu=Ethen 37 ifcru=Rthen 38 return ; 39 end 40else 41 ceu E; 42end 43cru R; 44bu bu+ min ( dui; swu); 45dui duimin (dui; swu); 46c cmin (dui; swu); 47ifdui= 0then 48 Wi Wiwu; 49end 50return ; 18 6.3. Weighted Autonomous Max-min Fairness As the operation of the algorithm is described in Section 6.2, the only part that is left to be explained in this subsection is the calculation of weights. We defined weights to be the multiplicative inverses of the total demand vol- ume, up to and including the then present demand. This poses a problem in the smart contract context, since Solidity does not offer floating point data types. In other words, since the demand volumes are defined to be positive integers, it is not possible to keep weights as they are, since the value needs floating point data type to be stored. Instead, we keep the total demand volume for each user ( dtufor useru), introduce an intermediary variable p(standing for precision ) and take the weight equal to: wu=p dtu We get rid of this intermediary variable while calculating the unit share. There- fore, instead of s=cPn u=1wu we use: s=cpPn u=1wu since s=$ cpPn u=1p dtu% =$ cPn u=11 dtu% Similarly, while calculating the user share we use the intermediary variable p: su=6664sj p dtuk p7775 As long as the value of pis larger than the total demand volume of the user, we obtain non-zero weights fromj p dtuk . For p= 10k; k2 Z+is the number of decimal places stored for weights. 19 7. Results In this section, we present the results over the gas costs used as the main performance metric. The tests are run on Parity Ethereum 2:7:2, and the contracts are implemented using Solidity 0:5:13, thus the gas costs are according to the definitions given thereby. In our tests, we run Parity in development mode and used its instant seal con- sensus algorithm, in which each transaction is placed in an individual block and inserted instantly to the blockchain. A convenient metric for measuring time is the block number. In the deployment of the system, this metric can be used with the block latency to come up with rough temporal estimations. Since block latency is a policy parameter for each blockchain ecosystem, tak- ing block number as the main temporal performance metric is convenient also in terms of generalizability of the results. As it is presented here, our results are independent of consensus algorithm, and block latency parameters. The results for each algorithm are presented in the subsections below. The data are available at [39] 7.1. CMF Results As indicated in Section 6.1, in the CMF, the demand vector is implemented as an array of two min-heaps, exchanging the demands among each other at each iteration. The demands arriving from the users are collected in D0for the span of an epoch. At the end of the epoch, the distribute function is called by the authority node, and the distribution is done. The first iteration is done over D0, taking all demands from the smallest to the largest, granting the available share to the user, and finally either deleting the minimum demand, if it is completely supplied, or deleting it from D0and inserting it to D1, otherwise, to be supplied in the next iterations if possible. The heaps exchange functions, and the process is repeated until either all the demands are supplied, or the capacity for the epoch is exhausted (see Algorithm 1) Gas usage averages for n= 100 entry sets are shown in Table 5. For com- parison, the gas performance of a general case heap implementation [40], called Eth-heap, is provided next to our results: Considering the 8:000:000block gas limit, the heap operations impose an up- per bound of 60entries to be processed per block, on average, as seen with the cost of operations in Table 5. This number is to be further lowered with the additional cost of assignment operations, needed to record the fair share of each user to her balance. 20 Function Present Study Eth-heap Insert 95.459 101.261 Delete Minimum 133.272 170.448 Table 5: Average gas costs for Insert andDelete Minimum functions The finding immediately implies that an algorithm implemented as a smart contract and relying on a central node to carry out the distribute function, cannot support more than10users, assuming that 3iterations are necessary on average for a distribution process to complete. The exact number is a function of how dis- perse the demands are, since the number of delete/insert operations is dependent on the number of iterations necessary to answer all the demands, which in turn is dependent on how disperse the demands are. This is also the reason why a weighted version of CMF has not been imple- mented in the present study. The extra cost of calculating and storing weights will make the weighted version perform even worse than the unweighted version. 7.2. AMF and WAMF Results The first advantage to be pointed out for AMF is that it virtually has no limit for the number of users that the system can support. The average gas costs of demand andclaim functions for a system with 10;50;100and500users can be seen in Table 6. The tests have been carried over in a setting where users have made demands, and claimed their demands in the succeeding epoch. The results indicate that several demand andclaim function calls can be included within a block, without running into the block gas limit exhaustion problem. Function No. of Users AMF WAMF Demand10 70:245 79 :732 50 67:351 77 :135 100 66:989 76 :835 500 66:700 71 :365 10 46:800=140:401 46 ;643=145:931 Claim 50 42:240=126:720 44 :852=134:558 (Avg./Total) 100 42:114=126:344 44 :763=134:289 500 42:047=126:143 45 :319=135:959 Table 6: Average and total gas costs of AMF/WAMF demand andclaim functions for various numbers of users. 21 The results also indicate that the cost of demand andclaim functions do not grow with the growing number of users. On the contrary, there is a slight decrease in the average costs, with the growing number of users. The reason for this is the fact that in each epoch the first call to both functions are costlier, since state variables are updated in these calls. With large sample sizes, this difference tends to even out better as compared to the relatively smaller sample sizes. It should also be noted that the epochs and rounds should last enough for each user to be able to make claims and demands. Since the instant seal engine de- ployed in the tests place each transaction in an individual block, the epoch and round spans are so chosen as to allow each user be able to make claims and de- mands within an epoch. The parameters of the system that the tests have been carried on have been shown in Table 7. According to this, in a setting with nusers, in the first epoch, nblocks are used for user registration function calls and 2nblocks are filled with empty trans- actions in order to synchronise the process. The following demand function calls occupied nmore blocks, concluding the first epoch. From the second epoch on, the sequence is 3rounds of claim in 3nblocks, followed by nblocks of demand for the next epoch. Three sets are run (adding up to 4epochs), and the averages are collected. Parameter Value Definition Number of Users nThe number of users in the system Epoch Capacity 20nThe amount to be distributed for each epoch Epoch Span 4nThe duration of an epoch in number of blocks Round Span nThe duration of a round in number of blocks Demand Interval [10;30) The interval from which the demands are drawn Table 7: The values used in the tests for AMF and WAMF. One thing that should be accounted for is that the average cost of demand 22 function declines throughout the rounds. The reason for this is, some demands have been fully supplied in the previous epoch, thus, fewer calls to claim function lead to the full execution of the function (i.e. calls from users whose demands have already been satisfied return without making any assignments). The average claim costs of rounds for Max-min and Weighted Max-min Fairness schemes can be seen in Table 8. Round AMF WAMF 1 64 :677 67 :211 2 32 :717 36 :158 3 28 :749 32 :589 Average 42:047 45 :319 Total 126:143 135 :959 Table 8: The costs of the claim functions over rounds, in a setting with n= 500 users. The number of rounds, as indicated in Section 7.1 is a function of the initial distribution of the demands. In our tests, we drew random demands from an ap- proximately uniform distribution offered by Javascript Math.random() function, in the range [10;30), and the epoch capacity is set to 20n, so that on average the overdemands and underdemands could balance each other out. In all the simulations with a Python script, the distribution is completed in 3 iterations. Therefore, in the tests presented here, we run the system for 3rounds of claims. The results are cross-checked with the Python simulations and proved identical. We suspect that with the parameters used in this study, 3iterations might be an upper bound, but we do not have a proof. Further investigation needs to be carried out to in order to come up with a theoretical bound. Another variable that can be parameterized according to the policy and that would effect gas costs is the size of the variables used to represent amounts. The size of the variables can be chosen smaller to save from the extra cost of unused space. The necessary sizes for the variables is dependent on the total amount that is planned to be distributed in the long run, maximum available allocation in an epoch and the maximum number of epochs to distribute all the resource etc. In the present study, all the variables are implemented as their 256bit defaults, in order not to lose generality. 23 8. Discussion The main bottleneck, and the main performance metric of the present study is the gas consumption, and this is arguably a natural approach for studies on blockchain systems. However, the results presented in this study are not to be taken for their absolute values. Low level improvements may be introduced in coding or compilation, leading to lower transaction costs. The aim of this ap- proach is to demonstrate the availability, and the cost structure of the Max-min Fairness algorithm, and its different implementations. Accordingly, the present study demonstrates, over the failure of CMF to sup- port more than 10 users, that it is not feasible for Max-min Fairness scheme to be implemented in the blockchain context as it is implemented in the con- ventional computational settings. In principle, because of the block gas limit, blockchain systems are not well suited for algorithms, which cannot be efficiently distributed to be processed by multiple computing parties, with partial data, and asynchronously. A single transaction to carry out a function with heavy computa- tional burden is not a working strategy while developing software for blockchain systems. This is in accordance with the distributed nature and the philosophy of the blockchain systems. In contrast with the centralized systems, blockchains aim to distribute both the work and the control among its users. For this reason, they are incentive driven , as opposed to centralized systems, which are authority driven . That is to say, centralized systems rely on an authorized component (e.g. operating system kernels, load balancers, web servers etc.) to carry out the computation; whereas blockchain systems rely on incentivising its users to operate the system in a way that the outcome will turn out to be the desired computation. Both AMF and WAMF are designed taking those points into consideration. Consequently, they offer scalable solutions for blockchain systems. Another possibility to consider is changing the capacity replenishment policy. In the present study, the capacity is replenished by a constant quantity Cat the beginning of each epoch. Instead, the tests can be run with varying quantities of replenishment over time, possibly according to some function of epoch number (i.e.C=f(E)). This may serve as a distribution mechanism for systems that run on donations, like election rallies or other types of fund raising projects, where public transparency, responsibility, incentivisation, and participation are matters of consideration. This kind of a distribution mechanism lends these projects the opportunity to be publicly transparent, and make commitments (e.g. declaring the weights for the expenditure items) prior to raising funds, since the system assures 24 the enforcement of declared commitments, by the virtue of its immutability. 9. Conclusion In the present study we addressed the problem of fair distribution of shared resources within the blockchain systems context. We worked on the intrinsic re- sources of blockchains, and developed faucets as smart contracts, running dif- ferent implementations of Max-min Fairness Algorithm, which is traditionally accepted realizing fairness in the literature. It has been demonstrated that the Max-min Fairness algorithm, as it is imple- mented in the conventional programming contexts, cannot support a public system because of the scaling of its gas cost structure. Two autonomous implementations of the algorithm are offered as a solution, and the tests have shown that these implementations can support wide public use of the system without running into block gas limit exhaustion problem. Although, in the present, the faucets are mainly utilised as tools for distributing the native currency of the test networks, the operation of faucet systems need not be limited to this use case. These systems have the ability to represent any resource type, and accordingly, to fairly allocate them, as briefly discussed in the preceding section. The faucet algorithms presented in this study are designed for single resource planning. For the prospective studies we might propose focusing on multi-resource planning problems. One way would be keeping each resource type separate and distribute them in parallel, with the algorithms developed in the present study. This will assume an independence of the supply and the value of the resources. If the resources are dependent on each other, alternative solutions must be proposed and evaluated. References [1] S. Nakamoto, et al., Bitcoin: A peer-to-peer electronic cash system, 2008. [2] G. Wood, et al., Ethereum: A secure decentralised generalised transaction ledger, Ethereum project yellow paper 151 (2014) 1–32. [3] J. L. Friederike Kleinfercher, Sandra Vengadasalam, Bloxberg whitepaper, the trusted research infrastructure, v1.1, https: //bloxberg.org/wp-content/uploads/2020/02/bl\ 25 oxberg$_$whitepaper$_$1.1.pdf , 2020. [Online; accessed 1-March-2020]. [4] Bloxberg, Bloxberg Faucet, https://faucet.bloxberg.org/ , 2020. [Online; accessed 17-September-2020]. [5] D. P. Bertsekas, R. G. Gallager, P. Humblet, Data networks, volume 2, Prentice-Hall International New Jersey, 1992. [6] S. Keshav, S. Kesahv, An engineering approach to computer network- ing: ATM networks, the Internet, and the telephone network, volume 116, Addison-Wesley Reading, 1997. [7] M. Crosby, P. Pattanayak, S. Verma, V . Kalyanaraman, et al., Blockchain technology: Beyond bitcoin, Applied Innovation 2 (2016) 71. [8] G. Foroglou, A.-L. Tsilidou, Further applications of the blockchain, in: 12th student conference on managerial science and technology, 2015, pp. 1–8. [9] T.-T. Kuo, H.-E. Kim, L. Ohno-Machado, Blockchain distributed ledger technologies for biomedical and health care applications, Journal of the American Medical Informatics Association 24 (2017) 1211–1220. [10] D. D. F. Maesa, P. Mori, L. Ricci, Blockchain based access control, in: IFIP international conference on distributed applications and interoperable systems, Springer, 2017, pp. 206–220. [11] M. Samaniego, R. Deters, Virtual resources & blockchain for configuration management in iot., J. Ubiquitous Syst. Pervasive Networks 9 (2018) 1–13. [12] M. Shirole, M. Darisi, S. Bhirud, Cryptocurrency token: An overview, in: IC-BCT 2019: Proceedings of the International Conference on Blockchain Technology, Springer Nature, 2020, p. 133. [13] E. L. Hahne, Round-robin scheduling for max-min fairness in data networks, IEEE Journal on Selected Areas in communications 9 (1991) 1024–1039. [14] R. Gogulan, A. Kavitha, U. K. Kumar, Max min fair scheduling algorithm using in grid scheduling with load balancing, International Journal of Re- search in Computer Science 2 (2012) 41. 26 [15] C. A. Waldspurger, Lottery and stride scheduling: Flexible proportional- share resource management, Ph.D. thesis, Massachusetts Institute of Tech- nology, 1995. [16] J. Kay, P. Lauder, A fair share scheduler, Communications of the ACM 31 (1988) 44–55. [17] D. Nace, M. Pi ´oro, Max-min fairness and its applications to routing and load-balancing in communication networks: a tutorial, IEEE Communica- tions Surveys & Tutorials 10 (2008) 5–17. [18] N. D. Doulamis, A. D. Doulamis, E. A. Varvarigos, T. A. Varvarigou, Fair scheduling algorithms in grids, IEEE Transactions on Parallel and Dis- tributed Systems 18 (2007) 1630–1648. [19] P. Marbach, Priority service and max-min fairness, in: Proceedings. Twenty- First Annual Joint Conference of the IEEE Computer and Communications Societies, volume 1, IEEE, 2002, pp. 266–275. [20] A. Ghodsi, M. Zaharia, B. Hindman, A. Konwinski, S. Shenker, I. Stoica, Dominant resource fairness: Fair allocation of multiple resource types., in: Nsdi, volume 11, 2011, pp. 24–24. [21] S. Mohanty, S. C. Moharana, H. Das, S. C. Satpathy, Qos aware group- based workload scheduling in cloud environment, in: Data Engineering and Communication Technology, Springer, 2020, pp. 953–960. [22] A. Hayes, What factors give cryptocurrencies their value: An empirical analysis, Available at SSRN 2579445 (2015). [23] Paritytech, parity ethereum, https://github.com/paritytech/ pa-rity-ethereum , 2019. [Online; accessed 19-November-2019]. [24] L. Ren, S. Devadas, Proof of space from stacked expanders, in: Theory of Cryptography Conference, Springer, 2016, pp. 262–285. [25] A. Kiayias, A. Russell, B. David, R. Oliynykov, Ouroboros: A provably secure proof-of-stake blockchain protocol, in: Annual International Cryp- tology Conference, Springer, 2017, pp. 357–388. [26] S. King, S. Nadal, Ppcoin: Peer-to-peer crypto-currency with proof-of-stake, self-published paper, August 19 (2012) 1. 27 [27] M. Kr ´ol, A. Sonnino, M. Al-Bassam, A. Tasiopoulos, I. Psaras, Proof-of- prestige: A useful work reward system for unverifiable tasks, in: 2019 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), IEEE, 2019, pp. 293–301. [28] I. Bentov, C. Lee, A. Mizrahi, M. Rosenfeld, Proof of activity: Extend- ing bitcoin’s proof of work via proof of stake [extended abstract] y, ACM SIGMETRICS Performance Evaluation Review 42 (2014) 34–37. [29] M. Ball, A. Rosen, M. Sabin, P. N. Vasudevan, Proofs of useful work., IACR Cryptol. ePrint Arch. 2017 (2017) 203. [30] A. Abdul-Rahman, The pgp trust model, in: EDI-Forum: the Journal of Electronic Commerce, volume 10, 1997, pp. 27–31. [31] C. Dannen, Introducing Ethereum and Solidity, Springer, 2017. [32] L. Baird, M. Harmon, P. Madsen, Hedera: A governing council & public hashgraph network, The trust layer of the internet, whitepaper 1 (2018) 1– 97. [33] T. Foundation, Tron: Advanced decentralized blockchain platform, 2018. [34] R. Cheng, F. Zhang, J. Kos, W. He, N. Hynes, N. Johnson, A. Juels, A. Miller, D. Song, Ekiden: A platform for confidentiality-preserving, trust- worthy, and performant smart contracts, in: 2019 IEEE European Sympo- sium on Security and Privacy (EuroS&P), IEEE, 2019, pp. 185–200. [35] F. A. Niloy, M. A. Nayeem, M. M. Rahman, M. N. U. Dowla, Blockchain- based peer-to-peer sustainable energy trading in microgrid using smart con- tracts, in: 2021 2nd International Conference on Robotics, Electrical and Signal Processing Techniques (ICREST), IEEE, 2021, pp. 61–66. [36] M. W ¨ohrer, U. Zdun, Design patterns for smart contracts in the ethereum ecosystem, in: 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), IEEE, 2018, pp. 1513–1520. [37] M. Wohrer, U. Zdun, Smart contracts: security patterns in the ethereum ecosystem and solidity, in: 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE), IEEE, 2018, pp. 2–8. 28 [38] S. Bragagnolo, H. Rocha, M. Denker, S. Ducasse, Smartinspect: solidity smart contract inspector, in: 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE), IEEE, 2018, pp. 9–18. [39] S. Metin, blockchainfaucet, 2020. URL: https://github.com/ serdarmetin/blockchainFaucet . [40] Z. Mitton, Priority Queue on Ethereum: eth-heap, 2018. URL: https: //github.com/zmitton/eth-heap . 29
{ "id": "2108.08656" }
1906.04421
The merits of using Ethereum MainNet as a Coordination Blockchain for Ethereum Private Sidechains
A Coordination Blockchain is a blockchain with the task of coordinating activities of multiple private blockchains. This paper discusses the pros and cons of using Ethereum MainNet, the public Ethereum blockchain, as a Coordination Blockchain. The requirements Ethereum MainNet needs to fulfil to perform this role are discussed within the context of Ethereum Private Sidechains, a private blockchain technology which allows many blockchains to be operated in parallel, and allows atomic crosschain transactions to execute across blockchains. Ethereum MainNet is a permissionless network which aims to offer strong authenticity, integrity, and non-repudiation properties, that incentivises good behaviour using crypto economics. This paper demonstrates that Ethereum MainNet does deliver these properties. It then provides a comprehensive review of the features of Ethereum Private Sidechains, with a focus on the potential usage of Coordination Blockchains for these features. Finally, the merits of using Ethereum MainNet as a Coordination Blockchain are assessed. For Ethereum Private Sidechains, we found that Ethereum MainNet is best suited to storing long term static data that needs to be widely available, such as the Ethereum Registration Authority information. However, due to Ethereum MainNet's probabilistic finality, it is not well suited to information that needs to be available and acted upon immediately, such as the Sidechain Public Keys and Atomic Crosschain Transaction state information that need to be accessible prior to the first atomic crosschain transaction being issued on a sidechain. Although this paper examined the use of Ethereum MainNet as a Coordination Blockchain within reference to Ethereum Private Sidechains, the discussions and observations of the typical tasks a Coordination blockchain may be expected to perform are applicable more widely to any multi-blockchain system.
http://arxiv.org/pdf/1906.04421v2
Peter Robinson
cs.CR
cs.CR
The merits of using Ethereum MainNet as a Coordination Blockchain for Ethereum Private Sidechains Peter Robinson Protocol Engineering Group and Systems (PegaSys), ConsenSys peter.robinson@consensys.net School of Information Technology and Electrical Engineering, University of Queensland, Australia peter.robinson@uqconnect.edu.au Abstract —A Coordination Blockchain is a blockchain with the task of coordinating activities of multiple private blockchains. This paper discusses the pros and cons of using Ethereum MainNet, the public Ethereum blockchain, as a Coordination Blockchain. The requirements Ethereum MainNet needs to fulfil to perform this role are discussed within the context of Ethereum Private Sidechains, a private blockchain technology which allows many blockchains to be operated in parallel, and allows atomic crosschain transactions to execute across blockchains. Ethereum MainNet is a permissionless network which aims to offer strong authenticity, integrity, and non-repudiation properties, that incentivises good behaviour using crypto economics. This paper demonstrates that Ethereum MainNet does deliver these properties. It then provides a comprehensive review of the features of Ethereum Private Sidechains, with a focus on the potential usage of Coordination Blockchains for these features. Finally, the merits of using Ethereum MainNet as a Coordination Blockchain are assessed. For Ethereum Private Sidechains, we found that Ethereum MainNet is best suited to storing long term static data that needs to be widely available, such as the Ethereum Registration Authority information. However, due to Ethereum MainNet’s probabilistic finality, it is not well suited to information that needs to be available and acted upon immediately, such as the Sidechain Public Keys and Atomic Crosschain Transaction state information that need to be accessible prior to the first atomic crosschain transaction being issued on a sidechain. Although this paper examined the use of Ethereum MainNet as a Coordination Blockchain within reference to Ethereum Private Sidechains, the discussions and observations of the typical tasks a Coordination blockchain may be expected to perform are applicable more widely to any multi-blockchain system. Index Terms —blockchain, mainnet, private, ethereum, sidechain, coordination I. I NTRODUCTION This paper analyses the advantages and disadvantages of using Ethereum MainNet as a Coordination Blockchain , by demonstrating the ways in which a Coordination Blockchain may be leveraged in a blockchain network that runs several parallel blockchains. We conduct an in-depth review of the features of Ethereum Private Sidechains, which is an exam- ple of such a blockchain system, to explore their potential usage of Coordination Blockchains as an exposition of using Coordination Blockchains more generally. The analysis builds on the Symposium on Distributed Ledger Technology paperFuture of Blockchain [1], and other work on Ethereum Pri- vate Sidechains including: Requirements for Ethereum Private Sidechains [2],Ethereum Registration Authorities [3],Anony- mous Pinning [4], and Atomic Crosschain Transactions [5]. Ethereum MainNet is the largest public deployment of the Ethereum platform. It is a permissionless network, allowing any node to join the network. It is said to offer good authen- ticity, integrity, and non-repudiation properties, along with an economic system to discourage transaction spamming [6], [7]. To date there has been no work that has analysed all of these assertions. This paper remedies this deficiency by carefully analysing whether these properties are successfully delivered. Sidechains are blockchains that rely on a separate blockchain, a Coordination Blockchain, for their overall utility. This could be to enhance security by pinning the state of the sidechain to the Coordination Blockchain [4], for addressing information [3], or for storing data that is used across all sidechains. We analyse the appropriateness of using Ethereum MainNet as a Coordination Blockchain for the various fea- tures of sidechains, using as a reference Ethereum Private Sidechains. This paper is organised as follows: the Background sec- tion briefly introduces Ethereum MainNet, the platform that forms the basis for this paper. We describe the concept of private blockchains and the enterprise version of Ethereum, and introduce the concept of block ‘finality’. Next crypt- analysis of message digest and asymmetric algorithms is reviewed given classical and quantum cryptanalytical tech- niques. The Ethereum MainNet Features section analyses whether Ethereum MainNet delivers authenticity, integrity, non-repudiation, and crypto-economic anti-spam properties. The Ethereum Private Sidechains section describes the fea- tures of Ethereum Private Sidechains and their usage of Coor- dination Blockchains. The Pros and Cons of using Ethereum MainNet as a Coordination Blockchain section analyses the advantages and disadvantages of using Ethereum MainNet as the Coordination Blockchain for each of the Ethereum Private Sidechain features. 1arXiv:1906.04421v2 [cs.CR] 13 Jun 2019 II. B ACKGROUND A. Ethereum 1) Ethereum MainNet: Ethereum [8] is a blockchain plat- form that allows users to upload and execute computer pro- grams known as Smart Contracts. Ethereum Smart Contracts can be written in a variety of Turing Complete languages, the most popular being Solidity [9]. Source code is compiled into a bytecode representation. The bytecode can then be deployed using a contract creation transaction. Contracts have a special constructor function that only runs when the contract creation transaction is being processed. This function is used to initialize memory and call other contract code. Miners execute the bytecode inside the Ethereum Virtual Machine (EVM). At present, each miner must execute all transactions for all contracts and hold the current value of all the memory associated with all of the contracts. The Ethereum community is actively working on methodologies to scale the Ethereum network by sharding the blockchain [10]. Ethereum transactions update the state of the distributed ledger but do not return values. They fall into three categories: Ether transfer, contract creation, and calling a function on a contract. Ether transfer transactions move Ether from the user’s account to another account. Contract creation transactions put code into the distributed ledger and call the constructor of the contract code, setting the contract data’s initial state. Function call transactions call a function on a contract and result in updated state. Contract creation and function call transactions also allow Ether to be transferred. All types of transactions must be signed by a private key corresponding to an account and include a nonce value that prevents replay attacks. In addition to Ethereum transactions, “View” function calls can be executed on the Smart Contract code. These View function calls return a value and do not update the state of the Smart Contract. Executing code and accessing resources, such as memory, costs certain amounts of “Gas”. The “Gas Cost” of executing code is closely tied to the real world cost of executing each type of instruction. Miners preferentially mine transactions that are prepared to pay a higher “Gas Price”. Accounts instigating transactions specify the “Gas Price” they are prepared to pay for their transaction and specify the maximum amount of gas a transaction can use known as “Start Gas”. This commits an account holder to paying up to a certain amount of Ether for the transaction. Any unused gas is returned to the account holder at the end of the transaction. Transactions that run out of gas prior to completion are aborted, with all of the gas being expended. In the Ethereum public network, “MainNet”, all contract code and data are readable by any user of any node that connects to the network. Smart Contracts on Ethereum Main- Net can only perform permissioning in contract code, limiting which accounts can update the state of a contract. However, there is no mechanism to limit which users can read contract code and data.2) Private Blockchains and Enterprise Ethereum: Private blockchains are blockchain networks that are established be- tween nodes operated by enterprises [2]. Only permissioned nodes belonging to participating enterprises are allowed to join the private blockchain’s peer-to-peer network and only per- missioned accounts belonging to participating enterprises are allowed to submit transactions to the nodes. These blockchains provide the privacy and permissioning required by enterprises [11]. The need for security and permissioning features over and above what is available in standard Ethereum [11] has led to a range of platforms being developed. J.P. Morgan developed Quorum [12], a fork of the Golang Ethereum implementation called Geth [13]. ConsenSys’s Protocol Engineering Group, PegaSys created Pantheon [14], an Ethereum MainNet com- patible client that aims to meet the permissioning and privacy requirements of the Enterprise Ethereum Client Specification [11]. Hyperledger Fabric [15] is a distributed ledger platform originally created by IBM and now hosted by The Linux Foundation. Similar to Quorum and Pantheon, the platform offers privacy and permissioning features. Whereas Quorum offers Ethereum based private transactions, Pantheon offers private smart contracts that are private to a set of participants. Hyperledger Fabric offers the ability to host one or more smart contracts on a private blockchain called a “channel”. Hyperledger Fabric allows multiple channels to be operated on the one network, thus allowing for multiple sets of private con- tracts between different sets of participants to operate on the one network. An analysis of the merits of Hyperledger Fabric and Quorum has been analysed elsewhere (see Requirements for Ethereum Private Sidechains [2]). 3) Finality: A block is deemed final when it can no longer be changed. All transactions contained within a finalised block are also deemed final. Ethereum transactions are included in blocks. An Ethereum MainNet miner that solves the Proof of Work cryptographic puzzle can add a block to the end of the blockchain. If two or more miners solve the puzzle simultaneously, then two or more chains are created with common ancestors, and this is known as a fork [16]. In Bitcoin the longest chain of blocks is deemed to be the valid blockchain [17], [18]. In Ethereum, the fork choice is solved by means of a modified Greediest Heaviest Observed Subtree (GHOST) protocol [16] that takes into account the mining power in creating blocks that have links to the main chain, but have become stale [19]. These blocks are commonly referred to as uncle blocks. The weight of a block relates to the number of previous blocks in the chain and uncle blocks. The heaviest chain of blocks is deemed to be the valid blockchain. If an Ethereum MainNet miner becomes aware of a heavier chain than it knew about, it should then only attempt to add blocks to the new chain. Blocks on the old heaviest chain that are not in common with the new longest chain are deemed reordered . If none of the transactions in a reordered block have been included in the blocks of the new longest chain, then the block can be included as an uncle block. Otherwise, the transactions that are not included in the 2 Fig. 1. Pinning reordered chain need to be included in a new block. There is no certainty that these transactions will be included in a new block, or that transactions in a proposed uncle block will be included in the blockchain. As more blocks are added to the end of Ethereum Main- Net’s blockchain, the probability of a miner finding a longer blockchain and reordering the blockchain is reduced [16]. This is because a miner would need to repeatedly solve the Proof of Work cryptographic puzzle for each block faster than all other miners. As the probability of a block being reordered is reduced, the probability of the transactions included in a block being final increases. Hence, Ethereum MainNet is said to have, probabilistic finality [18]. Consensus algorithms such as Istanbul Fault Byzantine Tolerant (IBFT) [20] and Istanbul Fault Byzantine Tolerant version 2 (IBFT2) [21] used in consortium blockchains give instant finality, where once a transaction has been included in a block minted by a validator, it can no longer be changed. 4) Pinning: The state of a blockchain or sidechain can be represented by the Block Hash of a block. The Block Hash of a final block could be submitted to a contract on a Coordination Blockchain at regular intervals [4], as shown in Figure 1. This process is know as pinning . Regularly pinning sidechain state helps to protect minority sidechain participants from state reversion due to collusion by the majority of sidechain participants [4]. B. Cryptanalysis This section provides background material on cryptanalysis that is needed to understand the analysis of the security properties of Ethereum MainNet. 1) Message Digest Algorithm Cryptanalysis: Message di- gest algorithms have three main security properties: Preim- age Resistance, Second Preimage Resistance, and Collision Resistance. Message digest algorithms are commonly called Cryptographic Hash algorithms, or simply Hash algorithms. Given a Hash algorithm h, the three security properties can be stated as: Preimage Resistance : Given y, it is difficult to determine xsuch that y=h(x).Second Preimage Resistance : Given yandx1, it is difficult to determine x2such that y=h(x1) =h(x2) andx16=x2. Collision Resistance : It is difficult to determine x1and x2such that h(x1) =h(x2)andx16=x2. 2) Classical Computing Cryptanalysis: Gordon Moore, co- founder of Intel, stated in his ”Moore’s Law” that the number of transistors on an integrated circuit doubles approximately every two years [22]. With the increased number of transistors has come a decrease in transistor size, which has resulted in decreased power consumption per transistor. This has resulted in an increase in computation power, while keeping the power consumption relative static over a fifty year period. This rate of increase of computation power and decrease of transistor size though slowing, is still continuing [23]. Additionally, new alternative approaches are being developed to deliver increased computational power [24]. Classical computational power can be used to break algo- rithms such as message digest algorithms by trying all possible combinations using a “Brute Force” attack. Complexity theory predicts how many attempts are likely to be needed to break an algorithm. For message digest algorithms, using classical computing power, the complexity of breaking an algorithm’s Preimage Resistance or Second Preimage Resistance property isO(N), where Nis the number of combinations of the digest output, whereas the complexity of breaking an algorithms Collision Resistance is O(p N). The USA’s National Institute of Standards and Technology (NIST) defines Security Strength [25] as, “A number associated with the amount of work (that is, the number of operations) that is required to break a cryptographic algorithm or system.” Security Strength and complexity are related. The Security Strength of a message digest algorithm’s Preimage and Second Preimage Resistance properties is log2Nand the Collision Resistance Security Strength is log2p N. Recall that log2N corresponds to the message digest output length in bits. As such, the algorithm SHA-256 ’s Preimage and Second Preim- age Security Strength is 256-bits and its Collision Resistance Security Strength is 128 bits, assuming classical computers [25]. In some instances, a message digest output is truncated. For example in Ethereum, Keccak-256 is used to generate account numbers with the output truncated from 256-bits to 160-bits. In this usage, the analysis of Security Strength re- mains unchanged: the complexity and hence Security Strength relates to the number of possible values of the digest output. If a message digest output is truncated then the Security Strength of the overall algorithm is proportionally reduced. NIST defines algorithms with Security Strengths of 80, 112, 128, 192, and 256 bits [26]. NIST have mandated the phasing out of 80-bit Security Strength algorithms in 2010 and, based on Moore’s Law, had indicated the phasing out of 112-bit Security Strength algorithms by 2030. 3) Quantum Computing Cryptanalysis: Quantum comput- ers are expected to allow all currently used popular asymmetric cryptographic algorithms to be defeated and are expected to 3 reduce the Security Strength of message digest and symmetric cipher cryptographic algorithms [27]. Aggarwal et al. [28] estimate that ECC 256-bit schemes will be able to be compro- mised with a Quantum computer using the Shor algorithm [29] in less than ten minutes sometime between 2027 and 2040. Grover’s algorithm [30] provides a speedup for database search style algorithms, such as searching for a message digest preimage or second preimage. Using Grover’s algorithm the complexity of message digest algorithm’s Preimage or Second Preimage Resistance properties are reduced from O(N)to O(p N). This means that the Security Strength assuming a sufficiently powerful quantum computer is half that when compared to the Security Strength due to classical computing power. Brassard and Tapp [31] claimed to have developed an algorithm for use with quantum computers that reduces the complexity of finding message digest collisions to O(3p N). Bernstein [32] has refuted this claim, stating that there is no real advantage provided by Brassard and Tapp’s algorithm given the cost - performance analysis over classical computing power. However, Aaronson and Shi [33] have determined a tight lower bound for the complexity of the collision problem asO(3p N). As such, despite Bernstein’s refutation of Brassard and Tapp’s algorithm, it can be conjectured that another algorithm may be found that meets the theoretical bound, that has a better cost - performance metric. Despite the reduced Security Strength offered by message digest algorithms, assuming a quantum computer, they are unlikely to be a point of weakness in the near term. Developing a complex quantum computer that can defeat message digest algorithms is expected to be significantly more complex than developing one to defeat ECC 256-bit [34]. As such, it is likely that a quantum computer that can be used to attack message digest algorithms will not be available until at least the 2030s. 4) Algorithmic Weaknesses: Researchers search for weak- nesses in algorithms. These weaknesses when found can reduce the effective Security Strength offered by the algorithm. For example various weakness have been found in the MD-5 message digest algorithm [35] [36]. It is impossible to predict if a weakness in an algorithm such as Keccak-256 will be found, and the degree to which the algorithm would be weak- ened with such a compromise. Algorithmic weaknesses will not be considered in the analysis of Ethereum MainNet given the uncertainty as to whether such weakness will be found, when they will be found, and the impact such weaknesses might have. III. E THEREUM MAINNETFEATURES This section discusses in detail the features of Ethereum MainNet that are important to its usage as a Coordination Blockchain. A. Authentication The International Telecommunications Union (ITU) define authentication in X.805 [37] as:...serves to confirm the identities of communicat- ing entities. Authentication ensures the validity of the claimed identities of the entities participating in communication (e.g., person, device, service or application) and provides assurance that an entity is not attempting a masquerade or unauthorized replay of a previous communication. In the context of Ethereum, this means ensuring Ethereum transactions are directly attributable to participants who oper- ate Ethereum Accounts. Ethereum transactions are signed using the private key belonging to a participant [8]. The public key associated with the private key can be derived from the transaction signature of any transaction signed by the private key. The account number is the twenty-byte truncated Keccak-256 message digest of the public key. In Ethereum, each transaction includes a nonce [8]. The initial nonce value for each account is zero. The nonce is incremented for each successfully mined transaction. Miners reject transactions with out of order or repeated nonces. Doing this protects Ethereum from transaction replay attacks. The nonce value is represented as a 64-bit signed number in Geth [13] and Pantheon [14]. Adding one to the maximum representable number would result in the largest negative number. If this situation was not guarded against in the code, it would lead to unexpected results, and possibly an authen- tication failure. However, 63-bits is large enough such that even if a single account issued every transaction on Ethereum MainNet, and could craft sufficiently small transactions and could have the gas limit increased such that they could execute 1000 transactions per second, the nonce value would not wrap around for 584 million years. Ethereum private keys are 256-bits long. The signature algorithm ECDSA / Keccak-256 using the secp256k1 curve is used for signing transactions. The secp256k1 curve has been analysed and found to not have any weaknesses [38]. This signature algorithm provides 128-bits of Security Strength [26] assuming Classical Cryptanalysis. The conver- sion of the public key to an account number using a twenty- byte truncated Keccak-256 message digest offers 160-bits of Security Strength assuming Classical Cryptanalysis, as an attacker would need to exploit the Second Preimage Resistance property of the message digest function to determine another public key which could hash to the same value as the authentic public key. As such, overall the Ethereum signing mechanism provides 128-bits of Security Strength assuming Classical Cryptanalysis. NIST has issued guidance that usage of algorithms offer- ing 112-bit Security Strength assuming Classical Cryptanal- ysis should be phased out by 2030 [25]. This means that Ethereum’s transaction signing technique should be secure well beyond 2030, assuming Classical Cryptanalysis, given its 128-bit Security Strength. If an attacker had access to a sufficiently powerful Quantum Computer, they could determine private keys associated with the public keys. The attacker could observe transactions that 4 have been submitted and determine the public keys associ- ated with each transaction using the standard ecrecover technique [8]. Once an attacker had access to a private key, they could issue arbitrary transactions using that private key. Aggarwal’s [28] analysis indicates that the authenticity of transactions may be able to be compromised in this way some time after 2027. The Ethereum community have recognised the threat that Quantum Cryptanalysis poses to Ethereum transaction signing. There are plans to roll-out “Account Security Abstraction” changes that will authenticate transactions programmatically using user supplied code [39] [40] [41]. This would allow for users to choose to use Quantum Cryptanalysis resistant algorithms. In summary, the existing transaction authentication tech- niques are likely to be secure until at least 2027. Prior to 2027, Ethereum is likely to be upgraded to mitigate the threat of quantum computers, thus ensuring the authenticity of transactions into the future. B. Integrity ITU defines data integrity [37] as: ... ensures the correctness or accuracy of data. The data is protected against unauthorized modification, deletion, creation, and replication and provides an indication of these unauthorized activities. In the context of Ethereum, this means ensuring that authenti- cated transactions and data in the distributed ledger are stored such that they can not be modified. Ethereum transactions are combined into blocks using Merkle Patricia trees [8]. Similarly, data in the distributed ledger is protected using Merkle Patricia trees. Compromising values in the Merkle Particia trees would require breaking the Second Preimage Resistance property of Keccak-256 . This is unlikely to occur in foreseeable future using either Quan- tum or Classical Cryptanalysis techniques. However, there is always the possibility that a weakness in Keccak-256 will be found. C. Non-Repudiation ITU defines non-repudiation [37] as: ...provides means for preventing an individual or entity from denying having performed a particular action related to data by making available proof of various network-related actions (such as proof of obligation, intent, or commitment; proof of data origin, proof of ownership, proof of resource use). It ensures the availability of evidence that can be presented to a third party and used to prove that some kind of event or action has taken place. In the context of Ethereum, this means ensuring that authenti- cated transactions are stored such that they can not be revoked. Ethereum blocks are linked together using Keccak-256 message digests. Compromising this linkage would require breaking the Preimage Resistance property of Keccak-256 , which is unlikely to occur in foreseeable future.As discussed in Section II-A3, Finality, Ethereum Main- Net has probabilistic finality . When blocks are added to the blockchain after a block containing a transaction, the probability of a miner proposing a heavier chain that does not include the block decreases. The number of blocks added after a block is known as the number of block confirmations . Nakamoto [17] showed the probability of a Bitcoin block being removed after six blocks, assuming an attacker has 10% of the mining power was 0.00024 . A greater number of block confirmations should be observed if an attacker were assumed to have a greater percentage of the total mining power available to them, or if the user wished to have greater certainty that the block was not going to be removed. In 2016, Gervais [42] determined that 37 Ethereum MainNet block confirmations were needed to offer the same level of se- curity as six Bitcoin block confirmations, assuming Ethereum was being attacked with 30% of mining power. Since 2016, the mining power devoted to Ethereum has increased considerably such that a 30% attack now seems inconceivable. Major miners are unlikely to attack their own network as this would risk devaluing the cryptocurrency they are mining [43], [44]. The maximum hash power which can be rented in a straightforward way is 5% [45]. Purchasing hardware to generate 30% hash power (174TH/s [46]) would cost in excess of US$400 million [47]. Scaling the results of Gervais’s work [42] based on the changed mining rewards of Bitcoin and Ethereum, the changed valuations, and allowing for a 10% mining power attack, indicates that eight Ethereum block confirmations corresponds to six Bitcoin confirmations. Using a different methodology, Buterin [48] determined that six to twelve confirmations where required to deem a transaction final, depending on the level of risk a user was prepared to assume. Based on a fourteen second target block time and assuming twelve confirmations, a block on Ethereum MainNet could be deemed final in approximately three minutes. The finality time is not a precise number as the block time is randomly distributed with an average of fourteen seconds. When Ethereum MainNet client vendors and miners agree to changes in the Ethereum protocol, the system is updated via changes known as Hard Forks . A Hard Fork requires all Ethereum MainNet client vendors to release updated software which will activate new functionality at a certain Ethereum MainNet block number. For the Spurious Dragon Hard Fork in November 2016 [49] the changes were implemented slightly differently. This resulted in the Ethereum MainNet blockchain forking for some hours [50]. The fork is resolved once the vendors software has been corrected. However, it is possible that a transaction which was part of a block accepted into the fork which was discarded was reverted and not resubmitted to the blockchain. This type of forking and state reversion due to mismatched feature implementation is much less likely to occur now and in the future than it did in 2016 as Ethereum MainNet clients undergo significantly more review and testing than they did in 2016 [51], [52]. If an attacker could dedicate 51% of the total mining power 5 to attacking the network, they would be able to mount a 51% Attack [53]. This would allow the attacker to rewrite the history of the blockchain. The three largest Ethereum MainNet miners could collude to mount such as attack. However, these miners are disincentivized to do such an attack as this would adversely affect confidence in Ethereum MainNet. This would lead to a dramatic drop in the value of Ether [43], [44], substantially decreasing the value of their Ether and their Ethereum infrastructure investments. Though the Ethereum MainNet system typically can not be modified, after a re-entrancy bug was exploited in the DAO attack [54], the system was modified to reverse the results of the attack. Doing this caused some to question trust in blockchain systems and Ethereum MainNet in particular [55]. However, this type of irregular state change [56] to reverse the results of such an attack appear unlikely to occur again in Ethereum MainNet. Despite a bug in the Parity Wallet contract that resulted in hundreds of millions of dollars of funds becoming inaccessible, proposals to alter history to restore the funds have been refused [57] [58]. D. Crypto Economic Anti-Spam As described in Section II-A1, each transaction on Ethereum MainNet costs Gas to execute, which participants pay for with Ether. Ethereum MainNet currently aims to produce new blocks each 14 seconds with eight million Gas available for each block [46]. Each transaction has as a minimum cost, the transaction fee, that is currently 21,000 Gas. Simple balance transfers between accounts just cost the transaction fee, whereas complex function calls can cost more than a million gas. As the block gas limit is eight million, it means that no transaction can use more than eight million gas. This translates to Ethereum MainNet supporting between four transactions per minute and twenty-seven transactions per second. A typical simple transaction, adding a Pin to a pinning contract , costs 64972 Gas [4]. Given the eight million Gas limit, 8.8 of these transactions could execute per second. Participants are disincentivized from flooding the network with transactions as each transaction has an economic cost. The cost of Gas depends on the block utilisation [59]. His- torically, the Gas price has spiked high when block utilisation has been high [60]. If many entities attempted to issue adding a Pin to a pinning contract transactions regularly, such that the block utilisation was high, then the cost of issuing the adding a Pin to a pinning contract transactions would increase. This would incentivise the entities to find alternatives, such as reducing the frequency of submitting the transactions. E. Summary Based on the analysis in this section, it can be said that Ethereum MainNet contains transactions for which the authen- ticity and integrity is certain. Once twelve blocks have been appended to the block containing a transaction, the probability of the blockchain being reorganised such that the transaction is reverted is small. As such, Ethereum MainNet offers strongnon-repudiation properties. Ethereum’s Gas mechanism oper- ates as an effective anti-spam tool. IV. E THEREUM PRIVATE SIDECHAINS Ethereum Private Sidechains are Ephemeral, On-demand, Permissioned, Private, Confidential, blockchains that allow for Atomic Crosschain Transactions. They are Ephemeral in that they are created, they operate, and then they can be archived when they are no longer needed. Their On-demand nature allows them to be created when needed between parties that have no prior relationship. Permissioning ensures that only authorised nodes are able to join a sidechain. Their design is such that to the greatest extent possible, their membership and their transactions are kept Private. Confidentiality is ensured by encrypting the sidechain data when being communicated between nodes and stored on nodes. Atomic Crosschain Trans- actions enable transactions that update state across sidechains atomically. Ethereum Private Sidechains have been described in terms of their requirements [2], and aspects of their technology [3], [4], [5]. This paper is the first to present this technology holis- tically. Additionally, this paper introduces the idea of pinning the final state of a sidechain prior to archiving, thus allowing the sidechain to be reinstated if needed, and introduces the idea of using Ethereum MainNet gas pricing as a mechanism for rate control of Atomic Crosschain Transactions. A. Ephemeral Ethereum Private Sidechains are Ephemeral : they are cre- ated, they are used for a period, and then archived when they are no longer required. This limited lifespan matches many real world requirements, such as Letters of Credit and other business deals, which have a limited lifespan. The ability to archive the blockchain data in a sidechain is in contrast to existing blockchain technologies that are designed to be operational indefinitely. The life span of a sidechain could vary widely. For us- ages in which sidechains are used to deploy a contract and automatically negotiate a deal, it might only be needed for some minutes, hours or days. Other usages, such as an Oracle , require a long or indefinite lifespan. Indefinite lifespans can be accommodated by never archiving the sidechain. While a sidechain is operational, the sidechain could be pinned to a Coordination Blockchain at regular intervals [4]. Regularly pinning sidechain state helps to protect minority sidechain participants from state reversion due to collusion by the majority of sidechain participants [4]. A key aspect of Ephemeral sidechains is the requirement to be able to restart the sidechain after archiving. This can be achieved by pinning the last block of the sidechain to a Coordination Blockchain. Now that the Block Hash of the last block has been securely stored in the Coordination Blockchain, the state of the sidechain can then be stored offline. To restart the sidechain, the stored data is compared against the final Block Hash to confirm the correct state is being used to restart the sidechain. 6 B. On-demand Between Parties with No Prior Relationship Ethereum Private Sidechains need to be able to be deployed between parties that have no prior relationship. That is, the parties need to be able to establish a sidechain without knowing each others’ node IP addresses, cryptographic keys, or other information required to set-up a secure connection. Establishing sidechains in this dynamic way is in contrast to existing permissioned blockchains that are largely static systems that require complex set-up. For example, set-up of a Quorum [12] network requires enode addresses (IP addresses and Ethereum account numbers) for each node to be shared out of band with all other nodes. Adding new nodes to the network requires this sharing and manual intervention on each node. The on-demand sidechain establishment is analogous to a user of a web browser establishing a secure connection with a web server by simply entering in a URL such as https://example.com/. The user does not know the IP address of the computer corresponding to example.com or the public key that can be used to verify the communications emanating from example.com . However, using the domain name, some initial trust, and the Domain Name Service (DNS) and Transport Layer Security (TLS) protocols, they are able to establish a secure connection. Similarly, Ethereum Private Sidechains need to be able to establish a secure sidechain using just domain names. The Ethereum Registration Authorities system is a set of smart contracts that can be used to provide discoverable information to enable establishment of sidechains between organisations with no prior relationship [3]. A Coordination Blockchain could be used to locate the information using domain names that can be grouped according to differ- ent trust levels and different trust relationships. Moreover, a Coordination Blockchain that provides organisations with a secure, decentralized, censorship-resistant mechanism for storing information that can be located using domain names and grouped according to different trust levels and different trust relationships would overcome the limitations of previous technologies that did not provide the security and censorship resistance properties that users of blockchain technologies expect. C. Permissioned Ethereum Private Sidechains need to be operated by au- thorised nodes using authorised Ethereum accounts. These requirements match those of the Enterprise Ethereum Client Specification [11]. The implementation of these requirements do not use a Coordination Blockchain. D. Private Ethereum Private Sidechains should, to the greatest extent possible, keep their membership private from other sidechains they interact with and from any Coordination Blockchains they use to facilitate their actions.E. Confidential Ethereum Private Sidechains should encrypt their blockchain and state data such that the transaction information is kept confidential, both when it is communicated between nodes on a sidechain and when it is stored in a node’s local data store. The implementation of this feature does not use a Coordination Blockchain. F . Atomic Crosschain Transactions Ethereum Private Sidechains technology needs to enable transactions that update state across sidechains atomically [5]. That is, if an Atomic Crosschain Transaction is across sidechains A, B, and C, then the state updates related to the transaction are either applied on all sidechains or ignored on all sidechains. A Coordination Blockchain holds a Cross- chain Coordination Contract. This contract is used to indicate that an Atomic Crosschain Transaction has commenced, has been committed, or should be ignored. The contract acts as a common time-out reference for all sidechains and helps prevent denial of service attacks. The data in the Crosschain Coordination Contract needs to be available until the last sidechain using it has been archived. The Atomic Crosschain Transaction system uses threshold signatures to prove values across sidechains. The public key that corresponds to the private key shares held by each of the sidechain validators is known as a Sidechain Public Key. This key needs to be available to all sidechains that need to verify values coming from a sidechain. As such, this value should be stored on a Coordination Blockchain. The Sidechain Public Key needs to be re-generated and uploaded to the Coordination Blockchain each time a validator is added or removed from the sidechain. Assuming that sidechain membership is largely static, this regeneration and upload is likely to be a rare event. V. P ROS AND CONS OF USING ETHEREUM MAINNET AS A COORDINATION BLOCKCHAIN The subsections below analyse the advantages and dis- advantages of using Ethereum MainNet as the Coordina- tion Blockchain for the operations of an Ethereum Private Sidechain. The findings of the subsections are summarised in Table I. A. Private Node Discovery - Ethereum Registration Authori- ties The Ethereum Registration Authorities system [3] uses smart contracts on a Coordination Blockchain to enable discovery of sidechain node address and cryptographic key information, as described in Section IV-B. As the information is used to bootstrap a sidechain, it is fundamental to the entire Ethereum Private Sidechain system that this information is authentic. The data in the Ethereum Registration Authority smart contracts is largely static. That is, the IP address and crypto- graphic key information, once set, changes rarely. Given this largely static data, the economic cost of storing information on Ethereum MainNet would only be incurred rarely. It is likely to 7 Ethereum Private Sidechain Ethereum MainNet as Coordination Blockchain Operation Advantages Disadvantages Discover using Ethereum Good authenticity, integrity, and Registration Authorities non-repudiation properties. Permissionless, public network, enables discovery. State Pinning & Good authenticity, integrity, and Economic cost. Final State Pinning non-repudiation properties. Increased congestion on Ethereum MainNet. Pinning and disputes are public. State Pinning & Leverage Ethereum MainNet Pins take more time to become Final State Pinning security properties while final on Ethereum MainNet via an intermediate minimising cost and congestion. than if pinned directly. private blockchain Pinning and disputes are not Sidechain participants must public. observe all levels of pinning. Sidechain Public Key Public keys widely available. Significantly delays when first Atomic Crosschain Transactions can be issued. Atomic Crosschain Leverages Ethereum MainNet Significantly delays when first Transaction State anti-spam capabilities. Atomic Crosschain Transactions can be issued. Economic gas cost. Increased congestion on Ethereum MainNet. TABLE I ADVANTAGES AND DISADVANTAGES OF USING ETHEREUM MAINNET AT COORDINATION BLOCKCHAIN FOR ETHEREUM PRIVATE SIDECHAINS cost less that US$1.00 to set-up an enterprise in the Ethereum Registration Authority system on Ethereum MainNet, based on current prices [3]. Sidechain users who wish to establish a sidechain need to be able to access the bootstrap information stored in Ethereum Registration Authority smart contracts for the system to be useful. The information needs to be stored on a permissionless network or a permissioned network that has a black list of banned nodes. Doing this allows users who have no prior relationship with the operators of the Coordination Blockchain to access the information. B. State Pinning A private blockchain state pinning approach should be used to prevent state reversion as described in Section IV-B. Posting Pins to Ethereum MainNet leverages the authenticity, integrity and non-repudiation properties of Ethereum MainNet. However, submitting transactions costs money. Pinning once per hour for a year would cost US$508 [4]. Additionally, if many sidechains pinned to Ethereum MainNet simultaneously, it would cause transaction congestion. Another issue with pinning directly to Ethereum MainNet is that any disputes that occur would need to occur on Ethereum MainNet, thus making the participant list of the sidechain public. Pins could be posted directly to a smart contract on Ethereum MainNet, or could be posted via a smart contract on an intermediate blockchain using a hierarchical pinning approach [4]. Using a hierarchical pinning approach, many private blockchains could treat another private blockchain as a Coordination Blockchain posting Pins to it. This pri- vate blockchain could in turn post Pins to another private blockchain or to Ethereum MainNet. This is shown diagram- matically in Figure 2. Pinning to a hierarchy of Coordination Fig. 2. Hierarchical Pinning Blockchains in this way means that only a small number of Pins on Ethereum MainNet could be used to secure a large number of private blockchains. The cost of submitting Pins to the private blockchain could be either free or significantly less than Ethereum MainNet. A benefit of pinning directly to Ethereum MainNet, rather than via an intermediate blockchain, is that the pinned state becomes final faster. That is, if a Pin is posted to a pri- vate blockchain, whose state is in turn pinned to Ethereum MainNet, then the sidechain Pin could be deemed to become final only once the private blockchain in pinned to Ethereum MainNet. Posting Pins via a private blockchain significantly reduces the cost of pinning, as only one blockchain needs to sub- mit transactions to pin its state to Ethereum MainNet, and sidechains can pin to that private blockchain. Doing this reduces the number of transactions on Ethereum MainNet, thus reducing congestion, and means that the cost of submitting transactions is only incurred once for the private blockchain, 8 rather than once for each sidechain. A disadvantage of posting Pins via a private blockchain is that participants of the sidechain need to observe and be ready to challenge Pins being posted at each level of the hierarchy. If sidechain state Pins are posted directly to Ethereum MainNet, then the sidechain participants only need to observe the pinning contract on Ethereum MainNet. An additional benefit of pinning to a private blockchain is that the chain’s permissioning could be set such that only certain nodes could view the blockchain and only certain accounts could submit transactions to the blockchain. Pinning directly to Ethereum MainNet means that the organisation pinning to the contract is public. If there is a dispute, then masked participants will need to unmask themselves, and thus link themselves to the sidechain and the other organisations on the sidechain. If an intermediate blockchain was used, then the pinning and any disputes could happen in a more private setting. C. Final State Pinning for Archiving Final State Pinning is the same as State Pinning, with the exception that rather than the pinning being on an ongoing basis, it is just to pin the final state of a sidechain prior to archiving, as described in Section IV-B. As such, the advantages and disadvantages are similar to those described in the previous section. As only one pin is posted, the concerns over having to observe pins on a private blockchain in addition to Ethereum MainNet are not significant as the observation is for a single event. Similarly, concerns over cost of posting pins to Ethereum MainNet and congestion are reduced. As such, the advantages are reduced to the pin becoming final sooner and the disadvantages are reduced to any dispute over the value of the pin being public. D. Sidechain Public Keys As described in Section IV-F, the Atomic Crosschain Trans- actions feature needs Sidechain Public Keys to be stored on a Coordination Blockchain. The Sidechain Public Keys need to be stored in a contract [5] that allows voting on new public keys, and allows masked and unmasked participants. Given the participants are the same as those for the pinning scheme, it makes sense for these to be stored in the same contract as the pinning information. Keeping the logic in the same contract for pinning and holding the Sidechain Public Keys is useful as it means that membership changes need to only occur in one contract. However, the Sidechain Public Keys need to be visible by all sidechains that wish to verify information coming from the sidechain, whereas the pinning information need only be visible by sidechain participants and government regulators who would be appealed to in case of dispute. Given the Sidechain Public Key is likely to be set once only, the economic cost of storing the key is likely to only be incurred once. No analysis of the gas cost of setting a Sidechain Public Key has been undertaken yet. However, given the small size of the public keys, 48bytes, the incremental gas cost of storing the public key is likely to be in the order of60,000 Gas, assuming the voting infrastructure has already been set-up. However, if the voting infrastructure did need to be set-up, the gas cost could be much larger. If a sidechain was short lived, then incurring the cost of setting up the voting infrastructure and posting the Sidechain Public Key to Ethereum MainNet could be deemed consid- erable. However, if the sidechain was long lived, then this relative cost might not be deemed as significant. A disadvantage of using Ethereum MainNet to hold Sidechain Public Keys is transactions take at least 12blocks before they should be deemed final (see Section III-C). This means that, given a target block time of fourteen seconds, users could not use the Sidechain Public Keys for Atomic Crosschain Transactions for three minutes after the transaction that posts the Sidechain Public Key is included in a block on Etheurum MainNet. E. Atomic Crosschain Transaction State The Atomic Crosschain Transactions capability described in Section IV-F uses a Crosschain Coordination Contract to control when a crosschain transaction has started, been committed, or should be ignored. This information need to be available to all validators on all sidechains involved in the crosschain transaction. The information in the contract needs to be available until the last sidechain using the contract is archived. Storing the Atomic Crosschain State on Ethereum MainNet means that each Atomic Crosschain Transaction costs money to execute. This economic cost could be seen as an advantage, as it provides an anti-spam control external to the sidechain system. However, forcing enterprises to incur a cost for each crosschain transaction is likely to be viewed as an unnecessary cost. Additional issues with storing the Atomic Crosschain State on Ethereum MainNet is that this would leak the participants of a sidechain, as a transaction would need to be submitted linking the sidechain and the participant. Furthermore, this would leak the rate that the participant was issuing crosschain transactions. In a similar way that storing Sidechain Public Keys on Ethereum MainNet delays when the first Atomic Crosschain Transaction can be issued, as discussed in Section V-D, storing Atomic Crosschain Transaction State could delay the effective start of each transaction. This is because sidechain participants might want to wait for blocks that contain transactions that indicate the Atomic Crosschain Transaction start to be final prior to acting on the start indication. VI. C ONCLUSION Coordination Blockchains perform various coordination tasks in private blockchain systems. We used Ethereum Private Sidechains as an exposition of such a system, highlighting the features of Ethereum Private Sidechains and discussing each feature’s need to leverage a Coordination Blockchain. Based on the unique requirements of each feature and coordination 9 activity, we examine whether public Ethereum MainNet would be a suitable platform for each of those tasks. We found that Ethereum Registration Authority smart con- tracts of Ethereum Private Sidechains need to store long term data that have to be available in a permissionless blockchain. Ethereum MainNet would therefore be well suited to this task, as it is a permissionless blockchain that incentivises good behaviour using crypto economics, and provides good au- thenticity, integrity, and non-repudiation properties. Ethereum MainNet’s strong security properties are also useful for State Pinning and in particular Final State Pinning, where the data needs to be stored securely for long periods of time. However, pinning directly to Ethereum MainNet could lead to congestion on Ethereum MainNet, would incur high costs, and would lead to the membership of a sidechain becoming public in the case of a dispute over the value of a Pin. These issues are significantly reduced by pinning via an intermediate private blockchain. However, doing this introduces other issues, such as participants having to observe pinned values at multiple levels in the pinning hierarchy and the pinned values taking longer to become final. Ethereum MainNet is not an appro- priate location for Coordination Blockchain information that needs to be final quickly, such as Sidechain Public Keys and Atomic Crosschain Transaction State. ACKNOWLEDGMENTS This research has been undertaken whilst I have been employed full-time at ConsenSys and have been completing my PhD part-time at University of Queensland. I acknowledge the support of my PhD supervisor Dr Marius Portmann. I thank Dr Catherine Jones, Horacio Mijail Anton Quiles, David Hyland-Wood, and Sandra Johnson for reviewing this paper and providing astute feedback. REFERENCES [1] P. Robinson, “Future of Blockchain - An Ethereum Perspective,” in Proceedings of the 3rd Symposium on Distributed Ledger Technology , 2018. [Online]. Available: https://symposium-dlt.org/sdlt2018.zip [2] ——, “Requirements for Ethereum Private Sidechains,” 2018. [Online]. Available: http://adsabs.harvard.edu/abs/2018arXiv180609834R [3] ——, “Using Ethereum Registration Authorities to Establish Trust for Ethereum Private Sidechains,” The Journal of the British Blockchain Association , 2018. [Online]. Available: https://doi.org/10. 31585/jbba-1-2-(6)2018 [4] P. Robinson and J. Brainard, “Anonymous State Pinning for Private Blockchains,” 2019. [Online]. Available: https://arxiv.org/abs/1903. 02752 [5] P. Robinson, D. Hyland-Wood, R. Saltini, S. Johnson, and J. Brainard, “Atomic Crosschain Transactions for Ethereum Private Sidechains,” 2019. [Online]. Available: https://arxiv.org/abs/1904.12079 [6] X. Xu, I. Weber, M. Staples, L. Zhu, J. Bosch, L. Bass, C. Pautasso, and P. Rimba, “A Taxonomy of Blockchain-Based Systems for Architecture Design,” Gothenburg, 2017. [Online]. Available: https://ieeexplore.ieee.org/document/7930224 [7] A. Griffith, “Ethereum Meta Transactions - Kauri,” 2018. [Online]. Available: https://kauri.io/article/8b1e4a4cdbb240c892925cd4779e34ca/ ethereum-meta-transactions [8] G. Wood, “Ethereum: a secure decentralized generalised transaction ledger,” Github, p. Github site to create pdf, 2016. [Online]. Available: https://github.com/ethereum/yellowpaper [9] “Solidity,” 2017. [Online]. Available: http://solidity.readthedocs.io/en/ latest/[10] “Sharding FAQ: On sharding blockchains,” 2018. [Online]. Available: https://github.com/ethereum/wiki/wiki/Sharding-FAQ [11] E. E. Alliance, “Enterprise Ethereum Alliance - Enter- prise Ethereum Client Specification V2,” 2018. [Online]. Available: http://entethalliance.org/wp-content/uploads/2018/10/EEA Enterprise Ethereum Client Specification V2.pdf [12] J. P. Morgan, “Quorum Source Code,” 2018. [Online]. Available: https://github.com/jpmorganchase/quorum [13] “Ethereum Foundation, Go Ethereum github repository,” 2018. [Online]. Available: https://github.com/ethereum/go-ethereum [14] “Pantheon Ethereum Client Github Repository,” 2018. [Online]. Available: https://github.com/PegaSysEng/pantheon [15] E. Androulaki, A. Barger, V . Bortnikov, C. Cachin, and K. Christidis, “Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains,” EuroSys ’18: Thirteenth EuroSys Conference, 2018, 2018. [Online]. Available: http://vukolic.com/fabric.pdf [16] S. De Angelis, “Assessing Security and Performances of Consensus algorithms for Permissioned Blockchains,” may 2018. [Online]. Available: http://arxiv.org/abs/1805.03490 [17] S. Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System,” 2008. [Online]. Available: https://bitcoin.org/bitcoin.pdf [18] N. T. Courtois, “On The Longest Chain Rule and Programmed Self-Destruction of Crypto Currencies,” may 2014. [Online]. Available: http://arxiv.org/abs/1405.0534 [19] A. E. Gencer, S. Basu, I. Eyal, R. van Renesse, and E. G. Sirer, “Decentralization in Bitcoin and Ethereum Networks,” jan 2018. [Online]. Available: http://arxiv.org/abs/1801.03998 [20] Y .-T. Lin, “EIP 650: Istanbul Byzantine Fault Tolerance,” 2017. [Online]. Available: https://github.com/ethereum/EIPs/issues/650 [21] R. Saltini, “IBFT 2.0 Gray Paper version 0.2,” 2019. [Online]. Available: https://github.com/PegaSysEng/ibft2.x/raw/master/ gray paper/ibft2 gray paper.pdf [22] G. Moore, “Lithography and the Future of Moore’s Law,” 1995. [Online]. Available: http://www.lithoguru.com/scientist/CHE323/ Moore1995.pdf [23] A. Cunningham, “Intel unveils Kaby Lake, its first post-”tick-tock” CPU architecture,” 2016. [Online]. Available: https://arstechnica.com/gadgets/2016/08/ intel-unveils-kaby-lake-its-first-post-tick-tock-cpu-architecture/ [24] T. Simonite, “Moore’s Law Is Dead. Now What?” MIT Technology Review, 2016. [Online]. Available: https://www.technologyreview.com/ s/601441/moores-law-is-dead-now-what/ [25] E. Barker, “NIST Special Publication 800-57 Part 1, Revision 4, Recommendation for Key Management, Part 1: General,” 2016. [Online]. Available: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/ NIST.SP.800-57pt1r4.pdf [26] E. Barker and A. Roginsky, “NIST Special Publication 800-131A, Revision 1, Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths,” 2015. [Online]. Available: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP. 800-131Ar1.pdf [27] L. Chen, S. Jordan, Y .-K. Liu, D. Moody, R. Peralta, R. Perlner, and D. Smith-Tone, “NISTIR 8105 DRAFT, Report on Post- Quantum Cryptography,” 2016. [Online]. Available: http://csrc.nist.gov/ publications/drafts/nistir-8105/nistir 8105 draft.pdf [28] D. Aggarwal, G. Brennen, T. Lee, M. Santha, and M. Tomamichel, “Quantum Attacks on Bitcoin, and How to Protect Against Them,” Ledger , vol. 3, no. 0, 2018. [Online]. Available: https://www. ledgerjournal.org/ojs/index.php/ledger/article/view/127 [29] P. W. Shor, “Algorithms for quantum computation: discrete logarithms and factoring,” in Proceedings 35th Annual Symposium on Foundations of Computer Science , 1994, pp. 124–134. [30] L. K. Grover, “A fast quantum mechanical algorithm for database search,” Philadelphia, Pennsylvania, USA, pp. 212–219, 1996. [31] G. Brassard, P. Hoyer, and A. Tapp, “Quantum cryptanalysis of hash and claw-free functions,” SIGACT News , vol. 28, no. 2, pp. 14–19, 1997. [32] D. J. Bernstein, “Cost analysis of hash collisions : will quantum computers make SHARCS obsolete?” Lausanne, Switserland, pp. 105– 116, 2009. [33] S. Aaronson and Y . Shi, “Quantum lower bounds for the collision and the element distinctness problems,” J. ACM , vol. 51, no. 4, pp. 595–605, 2004. [34] M. Mosca, “Cybersecurity in an era with quantum computers: will we be ready?” 2015. [Online]. Available: https://eprint.iacr.org/2015/1075.pdf 10 [35] X. Wang and H. Yu, “How to Break MD5 and Other Hash Functions,” in Advances in Cryptology - EUROCRYPT 2005: 24th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Aarhus, Denmark, May 22-26, 2005. Proceedings , R. Cramer, Ed. Berlin, Heidelberg: Springer Berlin Heidelberg, 2005, pp. 19–35. [Online]. Available: http://dx.doi.org/10.1007/11426639 2 [36] Y . Sasaki and K. Aoki, “Finding Preimages in Full MD5 Faster Than Exhaustive Search,” in Advances in Cryptology - EUROCRYPT 2009: 28th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Cologne, Germany, April 26-30, 2009. Proceedings , A. Joux, Ed. Berlin, Heidelberg: Springer Berlin Heidelberg, 2009, pp. 134–152. [Online]. Available: http: //dx.doi.org/10.1007/978-3-642-01001-9 8 [37] “International Telecommunications Union, X.805 Security architecture for systems providing end-to-end communications,” 2003. [Online]. Available: https://www.itu.int/rec/T-REC-X.805-200310-I/en [38] H. Mayer, “ECDSA Security in Bitcoin and Ethereum: a Research Survey,” 2016. [Online]. Available: https://blog.coinfabrik.com/wp-content/uploads/2016/06/ ECDSA-Security-in-Bitcoin-and-Ethereum-a-Research-Survey.pdf [39] V . Buterin, “Understanding Serenity, Part I: Abstraction,” Ethereum Blog, 2015. [Online]. Available: https://blog.ethereum.org/2015/12/24/ understanding-serenity-part-i-abstraction/ [40] ——, “Proposed initial abstraction changes for Metropolis #86,” github.com, 2016. [Online]. Available: https://github.com/ethereum/ EIPs/issues/86 [41] ——, “Tradeoffs in Account Abstraction Proposals - Architecture - Ethereum Research,” 2017. [Online]. Available: https://ethresear.ch/t/ tradeoffs-in-account-abstraction-proposals/263 [42] A. Gervais, G. O. Karame, K. W ¨ust, V . Glykantzis, H. Ritzdorf, and S. Capkun, “On the Security and Performance of Proof of Work Blockchains,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security , ser. CCS ’16. New York, NY , USA: ACM, 2016, pp. 3–16. [Online]. Available: http://doi.acm.org/10.1145/2976749.2978341 [43] “Bitcoin Magazine — Binance Hacked for $40M, CEO Backpedals on Recoup Via Block Reorganiza- tion.” [Online]. Available: https://bitcoinmagazine.com/articles/ binance-hacked-40m-ceo-backpedals-recoup-block-reorganization/ [44] J. Niu and C. Feng, “Selfish Mining in Ethereum,” 2019. [Online]. Available: https://arxiv.org/pdf/1901.04620.pdf [45] “Cost of a 51% Attack for Different Cryptocurrencies — Crypto51.” [Online]. Available: https://www.crypto51.app/ [46] “EthStats: Network Statistics - Instant Ethereum Blockchain Monitoring,” 2019. [Online]. Available: https://ethstats.io/ [47] “GPU MINING HASHRATES.” [Online]. Available: https://www. buriedone.com/gpu-hashrates [48] V . Buterin, “On Settlement Finality.” [Online]. Available: https: //blog.ethereum.org/2016/05/09/on-settlement-finality/ [49] O. Ogundeji, “Ethereum Hard Fork No. 4 Has Arrived as DOS Attacks Intensify.” [Online]. Available: https://cointelegraph.com/news/ ethereum-hard-fork-no-4-has-arrived-as-dos-attacks-intensify [50] “Ethereum’s Blockchain Accidentally Splits.” [Online]. Available: https://www.ccn.com/ethereums-blockchain-accidentally-splits [51] N. De, “Ethereum Developers Delay Mining Algorithm Change for Code Audit - CoinDesk.” [Online]. Available: https://www.coindesk.com/ ethereum-developers-delay-mining-algorithm-change-for-code-audit [52] “Ethereum Developers Start Search for New Hard Fork Coordinator - CoinDesk.” [Online]. Available: https://www.coindesk. com/ethereum-developers-start-search-for-new-hard-fork-coordinator [53] A. Hertig, “Blockchain’s Once-Feared 51% Attack Is Now Becoming Regular,” 2018. [Online]. Available: https://www.coindesk. com/blockchains-feared-51-attack-now-becoming-regular/ [54] N. Atzei, M. Bartoletti, T. Cimoli, M. Maffei, and M. Ryan, “A Survey of Attacks on Ethereum Smart Contracts (SoK).” Berlin, Heidelberg: Springer Berlin Heidelberg, 2017, pp. 164–186. [55] E. Spode, “The great cryptocurrency heist,” 2017. [Online]. Available: https://aeon.co/essays/ trust-the-inside-story-of-the-rise-and-fall-of-ethereum [56] B. Khoo, “the dao - Give a summary of the fork state changes in block 1920000 - Ethereum Stack Exchange,” 2016. [Online]. Available: https://ethereum.stackexchange.com/questions/ 7832/give-a-summary-of-the-fork-state-changes-in-block-1920000[57] N. Johnson, “On Parity’s proposed changes to SELFDESTRUCT behaviour,” 2018. [Online]. Available: https://medium.com/@weka/ on-paritys-proposed-changes-to-selfdestruct-behaviour-c3f0e5bc0f49 [58] A. Schoedon, “EIP 999,” 2018. [Online]. Available: https://github.com/ ethereum/EIPs/blob/master/EIPS/eip-999.md [59] “Ethereum Gas Station,” 2018. [Online]. Available: https://ethgasstation. info/ [60] J. Polites, “What CryptoKitties Reveals About Ethereum Scalability Issues,” 2017. [Online]. Available: https://www.ccn.com/ cryptokitties-reveals-ethereum-scalability-issues/ 11
{ "id": "1906.04421" }
1902.10865
A Survey on Applications of Game Theory in Blockchain
In the past decades, the blockchain technology has attracted tremendous attention from both academia and industry. The popularity of blockchain networks was originated from a crypto-currency to serve as a decentralized and tamperproof transaction data ledger. Nowadays, blockchain as the key framework in the decentralized public data-ledger, has been applied to a wide range of scenarios far beyond crypto-currencies, such as Internet of Things (IoT), healthcare, and insurance. This survey aims to fill the gap between the large number of studies on blockchain network, where game theory emerges as an analytical tool, and the lack of a comprehensive survey on the game theoretical approaches applied in blockchain related issues. In this paper, we review game models proposed to address common issues in the blockchain network. The issues include security issues, e.g., selfish mining, majority attack and Denial of Service (DoS) attack, issues regard mining management, e.g., computational power allocation, reward allocation, and pool selection, as well as issues regarding blockchain economic and energy trading. Additionally, we discuss advantages and disadvantages of these selected game models and solutions. Finally, we highlight important challenges and future research directions of applying game theoretical approaches to incentive mechanism design, and the combination of blockchain with other technologies.
http://arxiv.org/pdf/1902.10865v2
Ziyao Liu, Nguyen Cong Luong, Wenbo Wang, Dusit Niyato, Ping Wang, Ying-Chang Liang, Dong In Kim
cs.GT
cs.GT
1 A Survey on Applications of Game Theory in Blockchain Ziyao Liu, Nguyen Cong Luong, Wenbo Wang, Member, IEEE, Dusit Niyato, Fellow, IEEE, Ping Wang, Senior Member, IEEE, Ying-Chang Liang, Fellow, IEEE, and Dong In Kim, Fellow, IEEE Abstract —In the past decades, the blockchain technology has attracted tremendous attention from both academia and industry. The popularity of blockchain networks was originated from a crypto-currency to serve as a decentralized and tamperproof transaction data ledger. Nowadays, blockchain as the key frame- work in the decentralized public data-ledger, has been applied to a wide range of scenarios far beyond crypto-currencies, such as Internet of Things (IoT), healthcare, and insurance. This survey aims to fill the gap between the large number of studies on blockchain network, where game theory emerges as an analytical tool, and the lack of a comprehensive survey on the game theoreti- cal approaches applied in blockchain related issues. In this paper, we review game models proposed to address common issues in the blockchain network. The issues include security issues, e.g., selfish mining, majority attack and Denial of Service (DoS) attack, issues regard mining management, e.g., computational power allocation, reward allocation, and pool selection, as well as issues regarding blockchain economic and energy trading. Additionally, we discuss advantages and disadvantages of these selected game models and solutions. Finally, we highlight important challenges and future research directions of applying game theoretical approaches to incentive mechanism design, and the combination of blockchain with other technologies. Index Terms —Blockchain, game theory, security, mining man- agement. I. I NTRODUCTION In the past decade, with the popularity of digital crypto- currencies, e.g., Bitcoin [1], blockchain technology has at- tracted tremendous attention from both academia and industry [2]. The blockchain was first proposed in [1] to serve as a crypto-currency transaction ledger, and is currently widely adopted for a large number of crypto-currencies, such as Ethereum [3], Ripple [4], and EOS [5]. The blockchain technology guarantees the tamperproof ledger, transparent transactions, and trustless but secure tradings in a decentralized network. Thus, the blockchain network is recently applied in a wide range of scenarios far beyond crypto-currencies, such as Internet of Things (IoT) [6], healthcare [7], and insurance [8]. In general, blockchain is a distributed public data-ledger maintained by achieving the consensus among a number of Ziyao Liu, Nguyen Cong Luong, Wenbo Wang, and Dusit Niyato are with the School of Computer Science and Engineering, Nanyang Technological University, Singapore 639798 (email: ziyao002@ntu.edu.sg, clnguyen@ntu.edu.sg, wbwang@ntu.edu.sg, dniyato@ntu.edu.sg). Ping Wang is with the Department of Electrical Engineering & Computer Science, Lassonde School of Engineering, York University, 4700 Keele St., LAS 2016 Toronto, ON M3J 1P3, Canada (email: pingw@yorku.ca). Y .-C. Liang is with Center for Intelligent Networking and Communications (CINC), University of Electronic Science and Technology of China, Chengdu, China. (email: liangyc@ieee.org). D. I. Kim is with Department of Electrical and Computer Engineering, Sungkyunkwan University, 2066 Seobu-ro, Jangan-gu, Suwon 16419, Korea (email: dikim@skku.ac.kr).nodes in a Peer-to-Peer (P2P) network. More specifically, the verified transaction data is stored in a chain of blocks, i.e., a basic data structure of blockchain, and the chain grows in an append-only manner with all new verified blocks to it. This process involves several operations such as verifying transactions, disseminating blocks, and attaching blocks to the blockchain. As such, the blockchain requires a number of consensus nodes to participate in the network. The rational nodes per- form actions or strategies that aim to maximize their own utility. Moreover, the malicious nodes may launch attacks that damage the blockchain networks. To address these secu- rity challenges, consensus protocols such as Byzantine Fault Tolerance (BFT) protocol [9] can be adopted. However, the consensus protocols require a centralized permission controller and only achieve the consensus among a very small group of nodes. Such a consensus protocol is thus not applicable to the blockchain network that is a decentralized and large- scale system. Different optimization approaches and solutions, e.g., a Markov Decision Process (MDP) [10], are used to analyze and optimize strategies of the blockchain nodes to prevent their misbehaviors. However, the optimization ap- proaches do not take into account the interactions among the nodes. Recently, game theory [11] has been applied as an alternative solution in the blockchain network. Game theory is a study of mathematical models of strategic interaction between rational decision-makers [12]. Thus, game theory can be used to analyze the strategies of the consensus nodes as well as the interactions among them. Through the game theoretical analysis, the nodes can learn and predict mining behaviors1of each other, then having optimal reaction strategies based on equilibrium analysis. Moreover, game theory can be utilized to develop incentive mechanisms that discourage the nodes from executing misbehaviors or launching attacks. As such, game theory is natural in the decision making of all the consensus nodes in the blockchain networks. Currently, there are some surveys related to the blockchain. However, the existing surveys do not discuss the applications of the game theory in the blockchain. In particular, the survey in [13] provides a comprehensive introduction of bitcoin net- work, the surveys in [14], [15], [16] present security and pri- vacy issues in the bitcoin network, the survey in [17] presents the blockchain applications on Internet of Things (IoT), the survey in [18] discusses the integrations of blockchain and edge computing. To the best of our knowledge, there is no survey specifically discussing the use of game theory, as an 1In blockchain systems which incentive nodes to participate in the con- sensus process of data record with digital tokens, the consensus nodes are frequently referred as block miners and their operations are referred as mining. Copyright c 2019 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.arXiv:1902.10865v2 [cs.GT] 15 Mar 2019 2 efficient analysis tool, in blockchain networks. This motivates us to deliver the survey with the comprehensive literature review on the game models in the blockchain network. For convenience, the related works in this survey are classified based on issues in the blockchain network. The major issues consist of (i) security issues such as selfish mining attacks and Denial-of-Service (DoS) attacks, (ii) mining management issues such as computational power allocation, fork chain selection, pool selection, and reward allocation, and (iii) applications atop the blockchain such as energy trading. The rest of this paper is organized as follows. Section II briefly describes the general architecture of blockchain. Section III presents the fundamentals of game theory and game models that are commonly used in blockchain. Section IV discusses applications of game theory for security issues in blockchain. Section V presents applications of game theory for the mining management in blockchain. Section VI discusses applications of game theory atop blockchain platforms. Section VII outlines challenges and future research directions. Section VIII summarizes and concludes the paper. II. O VERVIEW AND FUNDAMENTALS OF BLOCKCHAIN In this section, we give an overview of blockchain on its concepts, data organization, working mechamism, and incentive compatibility. A. Overview of Blockchain The blockchain was first proposed as a decentralized tam- perproof ledger which records a set of transactions. These transactions are verified through a decentralized consensus process among the trustless agents before attaching to the chain. Here, we summarize the key advantages that blockchain networks can offer as follows. Decentralized network: Due to the distributed network which allows every computing unit to utilize its compu- tational power to take part in the blockchain, and that each transaction in the blockchain must achieve the agreement among all the nodes through the consensus protocol, the monopoly in centralized network can be removed in the blockchain. Tamperproof ledger: The cryptographic techniques used in blockchain ensure that any change on the transaction data in blockchain can be observed by all the nodes in the network. This means that the transaction recorded in the blockchain cannot be altered and tampered, unless the majority of nodes are compromised. Transparent transaction: All the transactions in the blockchain can be traced back for verification, and these transactions are transparent to all the nodes in the blockchain network. Trustless but secure trading: By using the digital asym- metric key signature, the blockchain network guarantees that only the sender and receiver which possess the pair of asymmetric key can execute the transaction, without intervention of any trust third-party.B. Data Organization and Workflow of Blockchain Cryptographic data organization plays an extremely impor- tant role in the blockchain structure. We first introduce some basic components supporting the data organization within blockchain networks. Transaction: Transaction is the most basic component of blockchain. A transaction is proposed by the blockchain user and is composed of the transaction data which specifies the value in concern, e.g., the digital tokens in a crypto-currency, the addresses of the sender and the receiver, as well as the corresponding transaction fee [1]. Block: A block is composed of a block header and a certain amount of transactions. The block header specifies the hash pointer and merkle tree data structure. Hash pointer [13]: The hash pointer of the current block contains the hash value associated with the previous block, which also contains the hash pointer to the block before that one. Thereby, the hash pointers can be used to build a link of records, i.e., blockchain. Merkle Tree [19]: A merkle tree or hash tree is a tree in which each leaf node is marked by the hash value of the transaction data of a block, and those non-leaf nodes are marked by the hash value of the concatenation of its child nodes. This structure makes it impossible to tamper the data in blockchain privately. Block 1 Header Prev Hash NounceBlock 0 (Genesis) Header Nounce Transaction Data... Hash 01 Hash 0 Hash 1 Tx0Merkle Root Hash 23 Hash 2 Hash 3Transaction DataBlock 2 Header Prev Hash Nounce Transaction DataBlock 3 Header Prev Hash Nounce Transaction Data Tx1 Tx2 Tx3 Fig. 1: An illustrative example of blockchain data structure where the transactions are included in the block and the block is represented by a merkle root. As shown in Fig. 1, a typical blockchain is an appending- only, ever-growing list of blocks, which are linked sequentially using the hash pointers as a linear linked list. More specifically, the block header includes a hash pointer which is associated with the previous block, and transaction data is represented as merkle trees. Atop the basic cryptographic data organization, maintaining the blockchain network needs blockchain nodes to dissem- inate the transaction, store the data into blocks, verify the transaction, and eventually reach a consensus. The blockchain working mechanism works as follows (see Fig. 2). An initiated transaction is broadcast to the distributed network through a node. The nodes in the blockchain verify the transaction as well as the node which broadcasts the transaction. More than one node may bundle different subset of newly verified transactions into their candidate blocks and broadcast them the to the entire network. 3 Consensus Nodes Blockchain Network Blockchain Users Hash of k Transaction Data BlockHash of k-1 ...Block 0 Block k-1... Block k Local ReplicaInitiating TransactionsBroadcasting and Verfying TransactionsMining for Block ValidationUpdating BlockchainBuilding Blocks Fig. 2: An overview of the blockchain workflow. All or part of the nodes in the blockchain network participate in the block validation by executing some certain functions defined by the consensus protocol. The verified block is attached to the blockchain, and every node updates its local replica, i.e., the local views of whole ledger-data, of the blockchain. In general, not all the nodes can be authenticated to join the blockchain network to execute the consensus protocol. According to the access control scheme [20] that determines which node can join the network, the blockchain platforms are classified into permissionless schemes, i.e., public blockchains, and permissioned schemes including private and consortium blockchains. When choosing the permissioned access control scheme, e.g., Hyperledger fabric [21], the consensus needs to be reached among only a small group of authenticated nodes, and thus the permissioned blockchain network usually adopts BFT protocols, e.g., Byzantine Paxos [22]. On the contrary, in permissionless blockchain, e.g., Ethereum [3], any node can participate in the network, and some other consensus protocols are applied, such as Proof of Work (PoW) and Proof of Stake (PoS). Here we list some widely-used blockchain platforms and their consensus protocols in Table I. TABLE I: Some Widely-used Blockchain Platforms Platform Name Ledger type Consensus Protocol Bitcoin [1] Public Proof of Work (PoW) Ethereum [3] Public PoW & Proof of Stake Hyperledger Fabric [21] Consortium Pluggable algorithm EOS [5] Private Delegated Proof of Stake Stellar [23] Public & Private Stellar consensus protocol Quorum [24] Private Majority voting Ripple [4] Private Probabilistic voting C. Incentive Compatibility within Blockchain In blockchain network, the consensus protocol guarantees achieving the agreement among the nodes. A reliable consen- sus protocol needs to satisfy properties [25]. (i) Correctness: each node adopts the content and the order of transactions in the confirmed blockchain structure. (ii) Consistency: each node updates its local blockchain structure if a new block header is confirmed. (iii) Traceability: all transactions can be traced back for confirmation. However, in some case, disagreements may exist among the nodes. For example, the local blockchain replica of all the nodes are unable to be synchronized simultaneously due to the distributed network. Under this case, the nodes might maintain different blockchain ledgers, and thereby the fork chains appear. This means that the nodes may deviate from the protocol of maintaining thelongest chain2. Therefore, the blockchain consensus protocol is expected to be incentive compatible [25]. This means that any node will suffer from financial loss, e.g., waste of investment in mining machine, whenever the node deviates from the protocol. Currently, the most popular blockchain consensus protocol is the PoW-based Nakamoto consensus protocol [1]. The Nakamoto protocol achieves the consensus by solving a math- ematical puzzle, i.e., by finding a hash value which satisfies a certain condition. The first node that solves the puzzle can broadcast the verified block to the blockchain network, and obtains the reward and the transaction fee. This process of solving puzzle and obtaining the reward is called mining. The design of the mining mechanism relies on both cryptography [26] and game theory [12]. Although the PoW protocol is widely used among the blockchain platforms, the incentive compatibility of the proto- col has been openly questioned from game theoretical per- spectives [27]. The reason is that achieving the Nakamoto consensus involves nodes joining the network, executing the protocol, and maintaining the ledger. The nodes may deviate from the protocol to increase their own utilities. For example, the node may not broadcast its newly discovered blocks but choose to withhold the block to increase its utility [25]. The node trades off between the cost of withholding the block which is associated with the other nodes’ strategies, and the mining reward and then chooses its strategy. To analyze the interactions among these consensus nodes, the game theoret- ical models (see Section III) are developed and applied [28]. In addition to the security issues, nodes’ mining management in blockchain, e.g., computational power allocation [29] and reward allocation [30], adopt game models for the analysis as well. Apart from the Nakamoto protocol, game models are also widely used for analyzing the incentive compatibility with other consensus protocols, e.g., Proof of Stake (PoS) protocol [31]. Therefore, to easily understand the applications of game theory in blockchain, the next section presents an overview and fundamentals of game models used in this survey. III. O VERVIEW AND FUNDAMENTALS OF GAME THEORY Game theory provides a set of mathematical tools for analyzing the interaction among rational decision-makers. In a game, each decision-maker as a player chooses its strategy to maximize its utility, given the other players’ strategies. The following briefly presents the game theoretic approaches which have been widely applied to analyze the interactions within the blockchain network. To interpret the definition of the game, some important terminologies are given below. Player: A player is a decision-maker in the game. In the blockchain, players can be miners, mining pools, or the blockchain users. Utility: A utility, i.e., a payoff, an interest, or a revenue reflects the player’s expected outcome. 2Due to the different strategies that nodes make to maximize their own utilities, the nodes may attach new verified blocks to the different blocks in blockchain, and thereby fork chains appear. The consensus protocols regulate the nodes to apply their work on the longest chain. 4 Strategy: A player’s strategy is a set of actions, choices or decisions that the player can perform to achieve its expected outcome. In general, the player’s utility is determined based on not only the player’s own strategy, but also the other players’ strategies. Rationality: A player is rational, i.e., self-interested, if the player always maximizes its own payoff. A. Non-cooperative Game In a non-cooperative game, the players do not cooperate by forming coalitions or by reaching agreements. In general, the term non-cooperative does not imply that the players do not cooperate with each other, but it means that any cooperation which might arise must be with no communication of strategies among the players. In other words, the strategy that the player takes must be spontaneous, and each player is rational. Consider a blockchain network in which miners as the players invest strategically in computational power to com- pete for a reward from mining successfully. The miners are rational and the non-cooperative game can be used to model the interaction among the miners. Assume that there are N miners, i.e., players, and Piis a set of strategies of miner i, whereP=P1PNis the Cartesian product of the sets of individual strategies. Let pi2Pibe the strategy of miner i. A vector of strategies of Nminer is p= (p1;:::;p N), and a vector of corresponding payoffs is = (1(p);:::; N(p))2RN, wherei(p)is the utility of playeri, e.g., mining rewards or the transaction fees, given the miner’s chosen strategy and strategies of the others. Each miner chooses its best strategy p ito maximize its utility. A set of strategies p= (p 1;:::;p N)2Pis the Nash equilibrium if no miner can gain higher utility by changing its own strategy when the strategies of the other miners remain unchanged, i.e., 8i;pi2Pi:i(p i;p i)i(pi;p i); (1) where pi= (p1;:::;p i1;pi+1;:::;p N)is a vector of strat- egy of all miners except miner i. The inequality in (1) demonstrates the equilibrium state of the game. At the Nash equilibrium, the players have no incentive to deviate from their current strategies. However, there is no Nash equilibrium in some cases, or multiple equilibria exist. Thus, it is important to check the existence and uniqueness of the Nash equilibrium to analyze a non- cooperative game. The existence and uniqueness of equilib- rium theory [32] demonstrates that the strictly concave game can achieve the unique equilibrium asymptotically. Here, the concave game means that the utility functions of players are concave, and this can be proved by computing the second- order derivative of the utility function [12]. The non-cooperative theory can be applied to a broad range of blockchain based scenarios. For example, it can be used for computational power allocation [29] or fork chain selection [33]. Also, it can be used for pool selection regarding the mining rewards allocation [30]. Atop the blockchain based platform, the non-cooperative game theory is applied to ana- lyze the interaction between blockchain users and miners, e.g.,cheating among the buyers and sellers in blockchain network [34]. Moreover, it is widely adopted in analysis of security issues within the blockchain, e.g., pool block withholding attacks [35]. B. Extensive-form Game The aforementioned non-cooperative game can be used to analyze both the static game, i.e., the game that has no notion of time and no player has any knowledge of other players’ actions in advance, and the dynamic game, i.e., the game in which the players’ strategies are made following a certain predefined order. The dynamic game can be represented in an extensive form to illustrate the sequencing of players’ possible moves, their choices at every decision point, information that each player has about the other players’ moves, and their payoffs for all possible game outcomes. In game theory, the extensive-form game describes the interaction among the players using a game tree illustrating decisions made at different points with their payoffs represented at the end of each branch. Consider the scenario of fork chain selection, the miner chooses a certain chain to mine on at the beginning of every round of mining competition, given the actions taken by the other players in previous mining rounds. At some points, the blockchain forks and leads to the structure similar to a branching tree. Thus, the tree-like extensive-form game can be efficiently applied for the analysis as shown in Fig. 3 in which the players can choose between two chains to mine. 2 21(0,0) (2,1) (1,2) (3,1)C1C1 C1 C2C2C2 Miner 1 Miner 2 Fig. 3: The game has two players, i.e., miner 1 and miner 2. The initial node belongs to miner 1 meaning that the miner 1 makes its strategy first. The miner 1 chooses between Chain 1, i.e., C1, and Chain 2, i.e., C2. The miner 2 chooses between C1 and C2 after its observation of the action of miner 1. There are four payoffs represented by the four terminal nodes of the game tree: (C1,C1), (C1,C2), (C2,C1) and (C2,C2). Assume that an extensive-form game is composed of many smaller games, i.e., subgames. Each subgame can be ex- pressed as a static non-cooperative game. A set of strategies p= (p 1;:::;p N)2Pis a subgame perfect equilibrium if it represents a Nash equilibrium of every subgame. A common method for obtaining the subgame perfect equilibrium in an extensive-form game is backward induction. The backward induction first considers the decision that might be made in the last move and then reasons back from the end of the problem to the previous one until the induction reaches the first move of the game. In the game as presented in Fig. 3, if miner 1 5 chooses C2, miner 2 will choose C1 to maximize its utility and miner 1 receives 1. If miner 1 chooses C1, miner 2 will choose C2 and miner 1 receives 2. Therefore, miner 1 prefers choosing C1 and miner 2 choosing C2. The strategies of miners are the Nash equilibrium of each subgame and thus achieve the subgame perfect equilibrium. In blockchain based platform, the extensive-form game is applied for selection of entering the blockchain market or not [36], selection of transactions to be included in the block [37], and optimization of pool’s mining rewards allocation [38]. The extensive-form game has been also adopted for analyzing the security issues within the blockchain. It was used to analyze the selection of fork chain [39], determination of forming the collusion [40], and cheating among the blockchain users [41]. C. Stackelberg Game Similar to the extensive-form game, another game that involves in a certain predefined ordered strategies taken by players is Stackelberg game [12]. In the Stakelberg game, the players include leaders and followers . The followers decide their strategies after observing the strategies of the leaders. Both the leaders and the followers are typically rational that aim to maximize their own utilities. To understand how the Stackelberg game works, we con- sider a blockchain based edge computing network which involves two players, i.e., the service provider and the miner [42]. The service provider possesses the computational power which can be offered to the miner as service, and the provider can set the service price to charge the fee for profit. The miner optimizes its demand of computational power to the provider to maximize its utility, taking its cost into account. As such, the service provider sets the price first, and then the miner decides its demand. Thus, the Stackelberg game can be used to model the interaction between the service provider and the miner. Assume P1andP2are the sets of strategies of the service provider and the miner, respectively. The service provider chooses its strategy p1from setP1to maximize its utility1(p1;p2), and the miner chooses its strategy p2from setP2to maximize its utility 2(p1;p2). The optimization problems of the leader and the follower together form the Stackelberg game. The objective of such a game is to find a Stackelberg equilibrium. Definition 1. LetBR 2(p1)define the best response mapping of the follower. Then, the point (p 1;p 2)is called the Stackel- berg equilibrium of the game if the following conditions hold: p 22BR2(p 1), and p 12arg max p1max p22BR2(p1)(p1;p2). To find the Stackelberg equilibrium, the backward induction method is typically used. Since the leader first takes its strategy and then the follower chooses its strategy, the Stackelberg strategy guarantees the service provider to achieve its payoff at least as much as the corresponding Nash equilibrium. The reason is that when choosing the Stackelberg strategy, the service provider actually optimizes its decision which will maximize its utility. This feature makes the Stackelberg game suitable for many scenarios in blockchain based applications. For example, the Stackelberg game is adopted for settingtransaction fees and selection of miners for verification [43], determination of cyber-insurance price [44], and analyzing the supply-demand relationship in the blockchain based edge computing platform [45]. D. Stochastic Game A stochastic game can be seen as several static non- cooperative games that are repeated over time. Each static non- cooperative game is called state of the game. The stochastic game executes stochastic transitions among the states of the game. In the stochastic game, the players can change their strategies based on the past actions and transitions behaviors of the other players [46]. The stochastic game can be applied efficiently to analyze the miners’ selection of chains to mine (see Section II) regarding the transitions of blockchain structure. The stochastic game typically is composed of (i) a finite set Iof players , e.g., the miners, (ii) a space Mof states, e.g., blockchain structures, (iii) a strategy set S, and (iv) a transition probability Pfrom MS. Each miner has a payoff function gnwhich is often taken to be the discounted sum of the stage payoffs. The game starts at an initial state m1, and at stage t, each miner observes the blockchain structure mtand then chooses its strategy si t, i.e., selects a chain to mine. Every miner receives an immediate payoffgi nassociated with the current state and the miners’ strategies. Then, the game moves to a new state mt+1. The game process is repeated until it reaches a common solution called Markov Perfect Equilibrium (MPE) [47] that is the refinement of the subgame perfect equilibrium (see Section III- B). The Markov perfect equilibrium is a set of strategies that achieve the Nash equilibrium of every state of the stochastic game [12]. In the case of fork chain selection, following the Nakamoto protocol, i.e., mining on the longest chain, is the Markov equilibrium. Apart from the chain selection, the stochastic game can be used for mining management. For example, the selection between investing in computational power or leaving the mining [48], and the selection of chain to mine [49]. Moreover, stochastic game has also been widely applied to security issues. It was used to analyze the selection between honest mining and selfish mining [50], the decision of the proper time to release the mined block [28], and the selection of adding a block to the chain [51]. IV. A PPLICATIONS OF GAME THEORY FOR SECURITY A. Selfish Mining Attack Selfish mining is a type of subversive strategies in PoW based blockchain systems [52] that attackers, i.e., malicious miners or mining pools, may not broadcast the newly mined blocks but choose to (i) withhold the block or (ii) hold and then release the block at a proper time. Under this case, honest miners waste their computational power in finding the block discovered already, and malicious miners can therby increase their probability of finding the next block. The pool block withholding (PBWH) attack is one common selfish mining attack [53]. In the PBWH attack, the attacking pool infiltrates the attacked pool, and the infiltrating miners perform the block 6 withholding (BWH) attack, i.e., withhold all the blocks newly discovered in the attacked pool. To prevent such an attack, it is crucial to analyze strategies of the miners and pools as well as the interaction among them. A Markov Decision Process (MDP) [54] can be used to analyze the strategy and utility of the individual player, i.e., the miner or the pool. However, the MDP does not take into account the interaction among multiple players. Alternatively, game theory can be effectively applied. The authors in [35] adopt a non-cooperative game to analyze the interaction among the pools. This scenario is illustrated in Fig. 4 with two selfish pools as players. The strategy of each player is to determine its infiltration rate, i.e., the fraction of its computational power for performing the infiltration. In the case of attack, the attacking pool obtains its utility not only from its honest miners, but also from the infiltrating miners that perform the BWH attack within the attacked pool. The objective of the player is to optimize its infiltration rate thereby maximizing its utility. In particular, the player’s utility is a function of the computational power and the infiltration rate. By using the second-order derivative with respect to the infiltration rate, the utility function is proved to be concave. Thus, there exists a unique Nash equilibrium in which neither players can improve its own utility by changing its strategy, i.e., the infiltrate rate. At the equilibrium, the infiltrate rate is always greater than zero. This means that launching the PBWH attack is always the best response of each player. Simulation results illustrate that the pool can improve its utility by launching the PBWH attack only when the pool controls a strict majority of the total computational power. However, in the case that two pools attack with each other, the utility of each pool is less than that if neither pool attacks. MinersPool 1Bitcoin Network InfiltrationPool 2 Miners Miners Fig. 4: Two pools case that both pools launch the PBWH attack, i.e., infiltrates each other with its miners that perform the BWH attack [35]. The case in [35] is similar to the famous Prisoners’ Dilemma in game theory [12] that results in the utility loss of the miners. To avoid the miners’ dilemma, the miners can choose one of the solutions as follows. The first solution is that the miners would intend to join private pools that will not involve the PWH attack. As a result, big mining pools may be divided into many small pools spontaneously, and eventually this may lead to a better environment for the Bitcoin system as a whole. The second solution is that the miners perform so-called Zero Determinant (ZD) strategies [68]. This solution is presented in [50] that the authors model a two-miner mining case as a stochastic iterative game. Different from a typical strategy that aims to improve players’ own profits, the ZD strategy is used to control an outcome of the opponents in a certain range so as to avoid alow social welfare, i.e., the whole pool’s profit [69]. In this game, the two players are an altruistic miner, i.e., a miner which attempts to maximize the social welfare, and a selfish miner, i.e., a miner which only aims to improve its own profit. Their strategies include cooperation, i.e., mining honestly, and launching the BWH attack to the other miner. Note that the altruistic miner and selfish miner choose their strategies probabilistically based on each other’s strategy selected in the last iteration. The analysis shows that so long as the altruistic miner applies strategies according to the determinant function, i.e., a linear function which is associated with players’ profit factor, the profit of the selfish miner is in a range from mutual cooperation to mutual attack regardless of strategies adopted by the selfish miner. Thus, the altruistic miner can indeed motivate the selfish miner to mine cooperatively by performing ZD strategies so as to restrict the selfish miner’s profit to achieve the highest social welfare. The simulation results show that the proposed game can achieve a higher social welfare than that of the pool game proposed in [35]. However, the proposed game does not consider the profit of the altruistic miner. This means that the altruistic miner may not have an incentive to perform the ZD strategy. The two-pool-attacker scenario in [50] can also be found in [56]. However, in addition to the PBWH attack, the authors in [56] consider the miners’ migration among the pools. In particular, the miners of a pool can be migrated to another pool and launch the PBWH attack to increase the profit. To analyze the average payoff of the miner and the miners’ stochastic mi- gration process, the Concurrent Mean-payoff Game (CMPG) is adopted as presented in [56]. CMPG (see Section III) is a two-player game with a finite state space where at each state, both players choose their strategies simultaneously [46]. Here, the players are pool 1and pool 2, and the state of the game includes the number of migrated miners of pool 1and that of pool 2. The strategy of a pool is to determine (i) the number of its miners to be migrated to the other pool and (ii) the miners which perform the PBWH attack. The number of migrated miners is determined depending on the attractiveness levels of the other pool, i.e., the ratio of the pool’s total mining reward to the total computational power of its miners. If a pool is infiltrated by miners of the other pool, the attractiveness level of the pool decreases. This decrease can be observed by the whole blockchain network, and thus the other pool can adjust its migration strategy based on the observations. In general, the pool’s profit depends not only on the state, i.e., the allocation of miners for migration, but also on its chosen strategy. The experimental results show that if the miners in pool 1 stochastically migrate to pool 2 according to the pool 2’s attractiveness level, then the mean-payoff objective, i.e., the average profit, of pool 2can be guaranteed against any strategy of pool 1. However, the mean-payoff objective may not be guaranteed in multi-player scenarios. Such a scenario can be investigated in the future work. The aforementioned approaches, i.e., [35], [50] and [56], are constrained to the interaction among only two pools. Considering a multi-pool scenario, the authors in [55] adopt the Computational Power Splitting (CPS) game [70] to model the PBWH attack. To improve their expected payoffs, the 7 TABLE II: A Summary of Game Theoretical Applications for Security. REF.GAME MODEL PLAYER ACTION STRATEGY PAYOFF SOLUTIONSelfish Mining Attack[35]Non-cooperative gameMining poolsInfiltrate other pools to launch BWH attackDetermination of the infiltration rateMining rewards minus costNash equilibrium [55]Splitting gameOne miner and poolsDistribute mining power for selfish miningDetermination of the power distributionMining rewards minus costMixed strategy Nash equilibrium [56]Mean-payoff gameMining poolsMigrate to other pools to launch PBWH attackDetermination of the migration rateMean-payoffMean-payoff objective [50]Stochastic game MinersBlock withholding (BWH) attackSelection between honest mining and selfish miningSocial welfareZero- Determinant strategy [57]Non-cooperative gameMinersSelfish propagation attackSelection of identity duplication and transactions relayingMining rewards Nash equilibrium [33]Non-cooperative gameMiners Fork chain Selection of fork to mine Transaction fees Nash equilibrium [58]Non-cooperative gameMinersDelay submitting sharesDecision of the proper time to submit sharesMining rewards Nash equilibrium [28]Non-cooperative gameMinersSelect or create a chain to mineSelection of the chain to mine Mining rewards Nash equilibriummajority Attack[28]Stochastic game Miners BWH attackDecision of the proper time to release the blockMining rewards Nash equilibrium [59]Non-cooperative gameMinersPost smart contract transaction of mining on private chainSelection between working on smart contract transaction and honestly miningTransaction fees and mining rewardsNash equilibrium [51]Stochastic game MinersCompete to fork chainSelection of adding the block to the chainMining rewards minus costNash equilibrium [60]Non-cooperative gameAttacking and defending minersIssue whale transaction to attract miners mine on the private chainDetermination of the threshold of attack cost and block selectionMining reward minus costNash equilibrium [61]Sequential gameAttacking and defending minersBuy stake to launch majority attackDetermine the cost of attack and selling selectionFunction of profit and interestNash equilibrium [28]Non-cooperative gameAttacking and defending minersGoldfinger attackDecision of forming cartel and determination of the tax paid to the attackerProfits minus cost Nash equilibrium [43]Stackelberg gameBlockchain users and minersForm cartel to launch majority attackSetting transaction fee and selection of recruiting minersProfits minus costStackelberg equilibriumDoS Attack[62]Non-cooperative gameMining pools DDoS attackSelection of launching attack or notProfits minus cost Nash equilibrium [63]Sequential game Mining pools DDoS attack Chosen of the attack level Profits minus cost Nash equilibrium [64]Repeated game Mining poolsDDoS attack under a reputation-based schemeSelection of launching attack or notProfits associate with the loss of reputationNash equilibrium [65]Non-cooperative gameOne server and devicesDDoS attack in edge networkSelection between executing or sending request and launching attackProfits minus cost Nash equilibriumOther security issues[66]Non-cooperative gameGroups of information sharing networkForm group and infiltrate other groups to withhold dataDetermination of infiltration rateProfits minus cost Nash equilibrium [40]Extensive-form gameClouds of cloud computing networkCollude to output the same wrong dataSelection of collusion or notFunction of payment and depositSequential equilibrium [41]Extensive-form gameBuyer and seller of the blockchain trading systemCheats of buyer or sellerSelection of cheating or notProfits associated with depositsSubgame perfect Nash equilibrium [34]Non-cooperative gameBuyer and seller of the blockchain trading systemCheats of buyer or sellerSelection of cheating or notProfits associated with depositsNash equilibrium [67]Coordination gameV oter and verifiersManipulate data of data verification systemStatement of the correctness of dataProfits associated with depositsNash equilibrium [44]Stackelberg gameBlockchain users, one provider, and one insurerPurchase insurance to compensate for the attackDetermination of the service price, service demand, and insurance priceProfits minus costStackelberg equilibrium 8 players, i.e., the miners or the pools which own positive computational power, can choose to (i) attack other pools, i.e., distribute their computational power to other pools and launch the BWH attack, and (ii) honestly follow or arbitrarily deviate from the pool’s protocol. In the case that the player chooses to attack, the strategy of the player is to determine (i) the distribution of its computational power, and (ii) the portion of its mining power holding attack as presented in Fig. 5. The objective is to maximize the player’s profit, which is defined as the sum of mining rewards received from all the pools. For any given strategies of the other miners, there always exists a computational power allocation for a miner to increase its profit and cause the other pool a loss. In other words, honestly mining is not the best response of the players and the game thus has no pure Nash Equilibrium strategy. Nonetheless, the game has a unique mixed strategy equilibrium at which each player has an incentive to launch the PBWH attack probabilistically rather than mining honestly. Simulation result shows that the best strategy of the players is to comply with the following rules. First, the players launch the PBWH attack which improves their profits. Second, the attackers spend the computational power less than a specific fraction on the PBWH attack to gain more profit than mining honestly. Finally, the attackers should attack big pools rather than small pools. Both work in [35] and [55] arrive at some consistent findings from different perspective. Bitcoin Network Pool 1 Player α 𝛽1 Pool 2Pool n-1Pool n ... 𝛽2 𝛽𝑖 𝛽𝑛−1 𝛽𝑛 Fig. 5: The player distributes its computational power to several pools and launchs the BWH attack, where is the computational power owned by the player, and irepresents the fraction of mining power that the player allocates to the pooli[55]. The approaches discussed above, i.e., [35] and [55], con- sider only the mining reward. In practice, the Bitcoin systems also provide the transaction fee [1]. When the block creation reward dominates the mining reward, the miners may not broadcast transactions to the others immediately so as to increase their expected profits [71]. This is called selfish propa- gation attack . To address the attack, the authors in [57] propose an incentive mechanism for the miners to propagate the trans- actions. The proposed mechanism is designed such that each miner receives a propagation reward from the blockchain sys- tem according to its behaviors in the propagation process (see Section II-B). To maximize the gained propagation reward, each miner strategically chooses to duplicate itself, i.e., add fake identities before relaying the transaction, or to relay the transaction immediately, given the strategy profile of the other miners. The interaction among the miners can be modeled as a non-cooperative game as presented in [57]. In the game,the players are miners which are aware of the transaction. Each player not only strategically relays the transaction but also works on PoW. The authorizing player, i.e., the player which solves the PoW, and the players which are in the same relay chain with the authorizing player gain a certain reward. Other players gain nothing. This scenario is illustrated in Fig. 6. By using the iterative removal of dominated strategies [12], the game is proved to admit a unique Nash equilibrium. At the Nash equilibrium, only transaction propagating and no-duplication strategies, i.e., the Nash equilibrium strategy, survive after dominated strategy removal. However, if there are not sufficient players which are connected with each other, the selfish propagation attack cannot be guaranteed to be prevented. 𝑇1 𝑇2 𝑇3 𝑇3′ 𝑇4 𝑇5 𝑇3′′ Transaction relay chain Propagation reward α α α α α α 3α total Duplications of 𝑇3 β 𝑇𝑖 𝑇𝑗 … … Fig. 6: An example of the transaction relay process that the transaction flows from T1toT5.T1toT4relay the transaction thus gain reward .T5solves the PoW thus gains reward . T3adds two fake identities, i.e., T0 3andT00 3, before relaying the transaction thereby gains 3 in total [57]. Other works on understanding the vulnerability of propa- gation mechanism without mining rewards can also be found in [28], [72], [73]. The authors in [33] demonstrate that with only block creation rewards, it is attractive enough for miners to extend the blocks that have the most available transaction fees rather than to follow the longest chain. Each miner intends to fork the head of the chain actively and leaves transactions unclaimed selectively to maximize its profit. Such an attack is called undercutting attack , and the miner that performs the undercutting attack is called undercutter . The scenario is illustrated as in Fig. 7 where “Option Two” corresponds to the undercutting attack. If the miner performs the undercutting strategy, it may gain nothing if its block is not in the longest chain eventually. The undercutter strategically performs un- dercutting strategy so as to attract the other miners to mine on the forked chain. Meanwhile, the other miners consider whether to mine on the forked chain or not to maximize their profits. Thus, the interaction among the miners can be modeled as a repeated game that in every stage of mining, each miner chooses to perform honest mining or undercutting. The game theoretical analysis shows that if a miner’s undercutting strategy follows a certain function to maximize the size of the block, then the strategy is also the best response for all miners. This is under the constraint that if the miners fork, they must perform undercutting. Thus, the Nash equilibrium exists as all miners adopt the same undercutting strategy. The simulation results show that when each miner applies a no- regret learning algorithm, even with 66% of miners mining 9 honestly, undercutting is profitable than mining honestly. As a result, there could be many unclaimed transactions left which is detrimental to the whole blockchain network. The same conclusion is reached in [74] through a non-game theoretical method. However, if the simulation takes network latency into account, the undercutters may have sufficient time to include all the transactions into the block, and thus the undercutters have no incentive to leave any transaction to the next miner. Possible Scenario: Head of the longest chain contains 500 units of transaction fees. 20 units remain. 500 20Option One: Extend the longest chain. Claim 20 units for self, leave 0 for next miner. 500 20 Option Two: Fork the longest chain. Claim 270 units for self, leave 250 for next miner. 500 250 0 270 Fig. 7: An example of undercutting attack. Option one corre- sponds to honest mining that the miner mines on the longest chain. The miner in Option Two performs undercutting attack that forks the longest chain and claims more reward compared with that of option one [33]. Different from attacks among the pools, another variation of selfish mining attack inside the mining pool which performs on the pay per last N shares (PPLNS) [75] is introduced in [58]. PPLNS is a popular pool mining reward mechanism. Instead of distributing a block reward among miners in the pool in the current round, PPLNS distributes the reward among miners that have submitted shares3already in the latest PPLNS window. The PPLNS window includes the number of shares submitted continuously that the latest share is the full solution of PoW. Specifically, shares in the PPLNS window are regarded as the effective shares. The miner that submits effective shares obtains the reward according to its proportion of all effective shares. Under this mechanism, the miner may launch the delay attack. In the delay attack, the miner first delays submitting the shares, i.e., by holding the discovered shares, if the miner finds the solution of PoW, the miner releases all delayed shares and then submits the solution immediately. Thus, more reward can be obtained because of the higher fraction of shares in the latest PPLNS window. This scenario is illustrated in Fig 8. For each miner in the same pool, there are two phases during mining. In the first phase, the miner only collects shares for delay. In the second phase, the miner submits every share immediately, i.e., through honest mining. To maximize the expected profit of launching the delay attack, each miner needs to choose proper time to transit its phase according to the strategies of the other miner. Otherwise, the miner may lose the reward of all its delayed shares. Thus, the authors in [58] model the interaction between miners in the same pool as a non-cooperative game. It is proved that the Nash equilibrium exists if the computational power of the most powerful miner 3A share is a hash value which is easier to be found, compared with the valid hash of the block. This means that shares can be used to measure the computational power that miner possesses. 212112$ 1212$112222$ ... ...N NN 1 Miner 1Share2 Miner 2Share$-- Solution of Pow, N=7Miner 2 launches a delay attackPool with PPLNSFig. 8: An example of delay attack in a pool with PPLNS. The pool includes two miners, i.e., miner 1 and miner 2. The size of PPLNS window in this case is 7. Miner 2launches a delay attack [58]. meets a certain condition. This condition is associated with the PPLNS window size, and complexity of finding the solution of PoW. At the Nash equilibrium, each miner of the pool is at the turning point between two phases. This means that the miner has no incentive to deviate from honest mining, and thus the miner would not delay its shares. Such a pool is called the incentive compatible pool. Simulation results show that if the pool is not incentive compatible, although the fraction of delaying miners decreases with a parameter related to the window size and the complexity of solving PoW, regardless of power distribution, the game cannot reach the Nash equilibrium. B. Majority Attack The security of blockchain is achieved through the dis- tributed consensus of miners. This consensus is only reliable with the assumption that no single miner can hold more than 50% of the network’s computational power [1]. Theoretically, to gain its profit, the miner invests more in the computational power, and it may possess more than 50% of the network’s computational power [30]. In this case, the miner would be able to halt payments, reverse transactions, prevent new transactions from confirmation, and double-spend coins [2], [27], [76]–[81]. The attack is called 51% attack. As such, the assumption of the distributed consensus may not be valid any longer, and the security of blockchain is not guaranteed. More specifically, theoretical analyses [54], [59], [82] show that the miner which possesses only a relatively large part computational power can also achieve the similar goal. In general, we label this type of attack associated with a large group of miners as the majority attack. When the majority attack is performed, mining on the fork chain may happen. The condition under which a miner has an incentive to mine on the fork is investigated in [28]. Although the miners follow the longest chain rule under the Nakamoto protocol, at some points, the chain can fork that leads to a structure similar to a branching tree [83]. To maximize the profit, i.e., the reward of creation of a new block, each miner aims to extend selectively any of the existing branches or to create a new branch, given the strategy of the other miners. A non-cooperative game can thus be applied. Since if more than 50% of the network’s total computational power are extending the longest chain, deviating from honest mining only leads 10 to the waste of the miner’s computational power of mining. The reason is that the mined block would not achieve the Nakamoto consensus with the majority of miners and thereby be orphaned. This lowers the miner’s profit, and thus following the longest chain would be the best response of the rest of other miners. Therefore, the game has a Nash equilibrium in which all miners extend the longest chain. If a cartel of miners which possesses more than 50% of the network’s computational power forks a chain, following the rule of longest chain would not be the best response for the other non-cartel miners, and thus the Nash equilibrium will be shifted to another one that every miner mines on the fork. Similar conclusion is reached in [82]. If the fraction of computational power deviating from extending the longest chain is more than a value around 1=4, each miner has an incentive to mine on the fork. Compared with [28], a more general majority attack where the miner can not only choose which branches to mine but also determine whether or not to release the mined block is investigated in [84]. The miner can probabilistically hide newly mined blocks and mine on the fork. Since this is similar to that the miners play a game with incomplete information of blockchain state among each other [85], a stochastic game can be applied as presented in [84]. The miner’s expected utility is a function of the miner’s action, i.e., the allocation of the miner’s computational power, and the current state of the game, i.e., the structure of the block tree at present. In the case that the miner’s computational power is equal to a profit threshold, the expected utility of mining on a fork is equal to that of mining on the longest chain regardless of the current state. Thereby, when the miner’s computational power is less than the profit threshold, the miner has no incentive to deviate from mining on the longest chain which is the best response of the miner and the Nash equilibrium can be obtained. As shown in the simulation results, when the obtained profit threshold is approximately 0.42, the miner with at most 36% of the total computational power cannot gain more than 36% of the total rewards. Meanwhile, the miner with computational power more than 46% always has an incentive to deviate from the longest chain rule. These results are more accurate than that obtained by MDP-based scheme [54]. Furthermore, by using the smart contract [86], the authors in [59] illustrate that the miner or the pool which controls only 38.2% of the network’s total computational power can gain more reward by deviating from the protocol. The attacking miner uses its full computational power to mine on its private chain while posting a smart contract transaction. This contract transaction includes a hashing puzzle, i.e., the solution of PoW, of its private chain. Any miner that solves the puzzle can receive the reward from the puzzle’s giver, i.e., the attacker, in exchange for the solution. Thereby, the attacker may gain more profit when its private chain is longer than the public one. For each time that the attacker posts a hashing puzzle through the smart contract, the other miners have two strategies: (i) work on the puzzle in the contract, and (ii) mine on the public chain. Each miner tries to maximize its expected utility, given the set of strategies of the other miners. The interaction among the miners except the attacker can thus be modeled as a non-cooperative game. When the attacker controls more than38.2% of the network’s total computational power, the miner’s utility of working on the puzzle with probability is greater than that of the mining the longest chain, and the attack is thus launched successfully. This means that each miner will work on the puzzle with probability and mine on the public chain with probability 1 . Thus, the game is proved to admit a mixed strategy Nash equilibrium. The game in [59] is under the assumption that miners always mine on the longest chain. However, if some miners perform the selfish mining strategy, the reward of solving the hashing puzzle on a private chain provided by the attacker may not be attractive enough to the other miners. Thus, the attack may fail. In addition to posting the smart contract as presented in [59], majority attack can also be launched by the attackers offering monetary bribes [87]. To prolong the fork chain thereby increasing its successful attack probability, the attacker can attract other rational miners to mine on the fork by issuing awhale transaction , i.e., a transaction with a high transaction fee. Since issuing the whale transaction is similar to bribing the other miners, such an attack is also called bribery attack [88]. The attacker’s problem is to determine the cost of the attack, i.e., the transaction fee, to maximize its profit. Also, the other miners’ problem is to trade off the profit of mining on the fork against the reward of mining on the public chain. A non- cooperative game can be thus used to model the interaction between the attacker and the other miners as presented in [60]. Both theoretical analysis and simulation results show that if the attacker’s mining power is greater than a profit threshold, the cost of the attack decreases, i.e., the attacker’s profit increases, as the attacker’s mining power increases. Here, the profit threshold is a function of the computational power used to mine on the fork, and the number of blocks by which the fork chain is ahead of the public chain. Meanwhile, any miner that possesses as much mining power as the attacker’s has an incentive to mine on the fork chain. However, the Nash equilibrium of the game is not discussed. To avoid such majority attack, the existing miners can act as a defender actively adding honest nodes to the blockchain network. This case is investigated in [51]. The system model consists of one attacker, i.e., the miner which intends to fork a private chain, and one defender, i.e., the miner which honestly mines on the public chain. To obtain the mining rewards, the attacker and the defender compete to build the blocks for the private and public chains in a sequence of stages, respectively. The historical strategies and the probabilistic stage transitions can be observed by both the attacker and the defender. Thus, the interaction between the attacker and the defender can be modeled as a stochastic game. In the game, the strategies of the defender are (i) defending , i.e., actively adding the honest nodes to avoid the majority attack, and (ii) doing nothing , i.e., letting the blockchain network run as usual. If the winning probability of the attacker to fork successfully is greater than a certain value, the defender’s utility of defending is greater than that of doing nothing. This means that the defending strategy is the best response of the defender and the game reaches the Nash equilibrium. Here, the value is a determined based on the cost of adding honest nodes, the number of nodes added actively to the blockchain network, and the total mining 11 power that the attacker has. Otherwise, the defender has no incentive to avoid the attack. However, the simulation results should use actual data gathered from real blockchain networks, e.g., Blockr.io [89] and Blockchain.info [90], to verify the practicability of the game model. The aforementioned approaches, i.e., [51], [59], [60], [84], consider the motivation of the attack within the system. However, the attacker’s motivation can be also based on the incentive outside the system and this type of attack is called Goldfinger attack [91]. The attacker, i.e., miners, can receive some utility from devaluing the cryptocurrency (a.k.a. currency measured in digital tokens in the blockchain network), by forming a cartel to impair the consensus among miners, i.e., launch the majority attack. The defenders, i.e., the other miners, intend to preserve the value of the currency. To prevent the currency from being devalued, the defender makes a bid, i.e., similar to a tax to keep the currency alive, to the attacker. Meanwhile, the defender trades off the cost of making the bid and the profit of preserving the currency. Therefore, a non-cooperative game can be used to model the interaction between the attacker and the defender as presented in [28]. The utility of the miner is a function of the value of the currency, the bid, and the possibility of the currency being attacked. The analysis shows that the defender can maximize its utility by using the first-order optimality condition in which the bid satisfies a certain constraint associated with the computational power distribution. If such a bid exists, the game is at the Nash equilibrium point where the attacker has no incentive to attack. Otherwise, the currency will have a zero value. However, in a real case, the defender does not know the attacker’s expected utility. If the attacker makes a strong claim about the imminent attack, the defender has no incentive to preserve the currency because of the possible high cost and thus no equilibrium exists. Apart from the PoW system, the majority attack happens in Proof-of-Stake (PoS) systems [31]. In a PoS system, each agent, i.e., a stake-holder, can earn interest by holding crypto- currency (CC) units (see Section III). To improve the interest, the agent can make a price offer to buy CC units from other agents [92]. As an agent possesses more than 50% of CC units of the system, this agent can halt and reverse any payments or transactions. Thus, the consensus of the system is broken and CC loses its value. Only the agent that intends to devaluate the CC obtains the profit, e.g., law enforcement, outside the system. The attack is typically launched in multiple stages [61], and thus each agent, i.e., the attacker or one of other agents, can observe the historical strategies of each other and then optimize its own strategy. Therefore, a sequential game can be used to model the interaction between the attacker and other agents as proposed in [61]. In the game, the players include one attacker and other agents. The attacker trades off the profit of devaluating the CC against the cost of making offers and the loss of interest. In the case that the profit of devaluating the CC is greater than the interest of holding the CC, by using the backward induction method, the game is proved to admit a unique Nash equilibrium. At the equilibrium, the attacker has an incentive to buy more than 50% of CC units, and other agents are willing to sell the CC to the attackersince they know that the CC has no value. However, the attacker can succeed in its attack at no cost by announcing to other agents about launching the majority attack before making the price offer. The reason is that if the agents believe that the attack succeeds, they will sell the CC to the attacker regardless of the price that attacker offers. The Nash equilibrium may not exist in this case. Blockchain User Miner iUnverified Transaction...Transaction feeMining pool Unverified block Verifiers Unverified block Verifier 1 Unverified blockUnverified blockMiner 1... Verifier ni Fig. 9: An example that demonstrates the relationship among blockchain user, miners and verifiers in consortium blockchain. The miners recruit some other miners, i.e., ver- ifiers, to verify the transaction [43]. The majority attack also exists in the PoS based consortium blockchain [93]. In the system, the blockchain user produces transactions for verification and pays the transaction fee. Due to the limited number of miners, some miners can launch the majority attack, i.e., halt or reverse transactions by forming a cartel. Thus, in addition to competing to solve the crypto- puzzle, the pre-selected miners recruit some other miners, i.e., verifiers, to verify the transaction. This results in recruitment cost and propagation delay that reduce the utility of the pre- selected miners [94]. In this case, the blockchain user acting as the leader sets the transaction fee for relative secure verifica- tion. The pre-selected miners acting as the followers, given the other miners’ strategies, trade off the transaction propagation delay and recruitment cost against the transaction fee offered by the blockchain user. This scenario is illustrated in Fig 9. Therefore, the interaction between the blockchain user and the pre-selected miners can be modeled as a Stackelberg game as presented in [43]. By using the second-order derivation, the blockchain user and pre-selected miners’ utility functions are proved to be concave. Thereby, they can jointly maximize their utility through backward induction. The simulation results show the bigger variation range of propagation delay brings lower utility of the blockchain user. However, the game model is under the assumption of complete information of the all miners’ strategy. The Bayesian game model [95] can be used to analyze the incomplete information case. C. Denial of Service (DoS) Attack Due to the distributed structure of peer-to-peer (P2P) net- work in blockchain with the Nakamoto consensus protocol, each miner can observe the PoW done by their peer miners [1]. However, if the P2P network is interfered or disrupted by some attackers, the attacked miners’ resources available for transaction propagation and verification may be exhausted. Thus, the attacked miners would not complete the mining 12 process to gain the mining rewards and their expected profit. Such an attack is called Denial-of-Service (DoS) [96]. The mining pools can perform the DoS attack as presented in [62]. More specifically, to maximize the mining reward, the mining pools can choose (i) to trigger the distributed DoS (DDoS) attack that lowers the other mining pools’ expected payoff, or (ii) to invest in additional computational power, e.g., by buying more mining machines, to increase its possibility of solving the next PoW. Each mining pool trades off the cost of the investment and attack associated with the other pools’ strategies, as well as the uncertainty of launching the attack successfully. Therefore, a non-cooperative game can be adopted to analyze the interaction among the pools with different sizes. In the game, there are two players, i.e., a big pool and a small pool. The other pools own the rest of computational power. The payoff of different strategies of the two players can be expressed in a matrix in terms of the computational power distribution, the increasing rate of network’s computational power over time, and the probability of launching the DDoS attack successfully. This matrix is presented in Table III where PsandPbare the payoffs of the small pool and the big pool, respectively. TABLE III: Payoff matrix with launching DDoS attack Investment(I) Attack(A) Investment(I) Ps(I;I ),Pb(I;I )Ps(I;A ),Pb(I;A ) Attack(A) Ps(A;I ),Pb(A;I )Ps(A;A ),Pb(A;A ) Since investing in computational power is the only best response of both big and small pools when computational power distribution satisfies an inequality and vice versa for launching the DDoS attack, the unique Nash equilibrium can be obtained under different computational power distribution. Simulation results show that mining pools have different in- centive to perform DDoS attack under different computational power distribution. Due to the higher expected payoff, each pool has a greater incentive to attack larger pools than smaller ones and the larger mining pools have a greater incentive to perform the DDoS attack than smaller ones. These results are consistent with the empirical evidence on the prevalence of DDoS attacks in the Bitcoin system as presented in [96]. The authors in [62] also consider the incentive of mining pools as a whole. However, in a real case, the individual miners have an incentive to hop among the pools and then the computational power distribution changes. Thus, the Nash equilibrium may be shifted. Apart from only focusing on the short-term impact of DDoS attacks on mining pools as presented in [62], the authors in [63] study the long-term impact. An ongoing DDoS attack causes some long-term impacts that individual miners may migrate, i.e., leave the attacked pool and participate in other pools. The model consists of two pools. At every stage of mining competition, each pool chooses an attack level, i.e., the fraction of its computational power to launch the attack to the other pool. Choosing the attack level affects both the short- term utility consequences (as studied in [62]) and the long- term consequences. In particular, the long-term consequences affect the computational power distribution of mining poolsin the next stage. Therefore, the interaction between the two pools can be modeled as a sequential game. By using the second-order derivative, the utility function of the mining pool, i.e., the player, is proved to be concave under the condition that the attack cost is greater than a certain value. This value is associated with the level of attracting miners to participate in the pool, and the migration rate of miners that are not affected by the attack. Thus, the game can reach a unique Nash equilibrium at which both the mining pools have no incentive to launch the DDoS attack. However, if the condition is not satisfied, the game reaches another Nash equilibrium at which one of the players attacks while the other remains not attacking. For the future work, a general case of multiple mining pools can be investigated. To avoid such DDoS attack, the authors in [64] propose a reputation-based scheme in which each miner is assigned a reputation value that evaluates the miner’s performance of mining honestly against launching DDoS attack. The pool managers send invitation probabilistically only to a subset of miners according to the miners’ reputation values. Only miners that receive invitations from pool managers can mine for the pool. Otherwise, the miner has to mine for itself, and this is not preferable for the miner with small computational power. To maximize the profit, each miner chooses to attack or mine honestly while optimizing the profit of launching attack and minimizing the probability to be excluded from pool managers’ invitation because of the decrease of its reputation value from the attack. Since the reputation value is updated periodically, and each miner determines its strategy based on the future utility associated with the other miners’ reputation value and strategy, a repeated game is used to model the interaction among miners. By removing the strictly dominated strategies of the game according to the miner’s utility function, the unique Nash equilibrium can be obtained such that the best response of each miner is not to launch the attack. Similar to the analysis presented in [63], the reason is that even the miner can gain some utilities in the current stage of mining competition by launching the attack, the miner will lose many future mining opportunities due to its lower probability of being invited to mine for the pool. However, implementing this reputation-based scheme through the simulation-based approach is not discussed in the paper. Similar to [64], a punishment scheme based on the action record in blockchain to suppress the attack motivation is proposed in [65]. Nevertheless, the scheme is applied to an edge network instead of the blockchain system. The network model consists of mobile devices and one server located in the edge network. The mobile devices can (i) send service requests to the server, or (ii) launch the DoS attacks to gain their illegal profits. The server can choose (i) to execute the service requests, or (ii) to launch the attack on the devices. Each device or the server can decide its strategy according to the other’s historical strategy recorded in the blockchain. Therefore, the interaction between the mobile device and the server can be modeled as a non-cooperative game. The utility of both the players, i.e., the mobile device and the server, is a function of the cost and profit of launching the attack and executing the request, and a punishment factor related to their historical 13 strategies. Since the players can maximize their utility by not attacking under a certain constraint associated with the punishment factor, not attacking is the best response of the players, and thus the game can reach the Nash equilibrium. Simulation results also show that both mobile device and edge server tend to not attack if the punishment factor is large and the attack rate of the server decreases compared with that of the non-punishment scheme. However, the existence of the Nash equilibrium may not be guaranteed in a multi-player scenario. D. Other Security Issues The underlying blockchain technology of bitcoin is now being applied to many new scenarios such as edge networks, cloud computing, e-business and information sharing [13], [97], [98]. In particular, a series of security problems regarding false data sharing [40], [66], [67], distrustful goods trading [34], [41] and cyber-insurance [44], can be resolved by using a blockchain-based scheme. 1) False Data sharing: Blockchain-based scheme is applied to the false data sharing scenario. In most of the traditional data sharing application scenarios, the users transfer data either to other users or to a centralized authority for verification. However, the users are reluctant to share the cyber-security information due to the concern about the distrust, the possible false information, the privacy vulnerabilities, and the lack of incentive [99]. To address these problems, the authors in [66] propose a blockchain-based information sharing (iShare) framework. In the iShare framework, organizations, i.e., users participating in sharing cyber-attack information, receive a reward after the information transaction is proved authentic in the blockchain. The organizations can form a group to share information and gain the reward together similarly to forming the mining pool in bitcoin systems [75]. However, some group members can form a sub-group and infiltrating in another group to gain more profit by not releasing the information in the infiltrated group. This is similar to launching the PBWH attack (see Section IV-A) as presented in [35]. In the two- group case, each group determines the number of organizations to infiltrate to the other group to maximize its profit. Thus, the non-cooperative game can be used to analyze the interaction between the two groups. Each group’s utility is determined based on the size and number of infiltrating organizations of the two groups. Since the utility function of the group is concave, each group can maximize its profit when the number of infiltrating organizations satisfies the first-order optimality condition. The unique Nash equilibrium can be obtained at this point in which not launching the attack can be the best response for each group. The Nash equilibrium shifts when the number of infiltrating organizations satisfies the different constraint and thus launching attack can also be the best response for the group. However, a general case of multi- groups can be investigated for the future work. False information risk among the users and the lack of incentive can also be found in the traditional cloud computing scenario. The cloud users may not entirely trust the computing results returned from the cloud provider. Thus, the verifiabilitybecomes a critical requirement by the cloud users. The existing techniques, e.g., [100], for verifying correctness of the result cannot be done at a reasonable cost. A blockchain-based scheme with smart contract can be used to address the issue as proposed in [40]. In the scheme, the cloud user pays two clouds, using smart contract, for computing the same task and then collects and crosschecks the results from the two clouds to verify the correctness. However, the two clouds can collude with each other, i.e., output the same wrong result, to gain an extra profit. To maximize the utility, each cloud chooses to compute honestly or to collude to trade off the profit obtained from the cloud user’s payment and the loss of the deposit, i.e., a sum of money that guarantees the security for the delivery of the correct result. The cloud’s expected utility function is determined based on not only its present strategy but also the imperfect information of the other clouds’ historical strategies over time. Thus, the extensive- form game can be used to analyze the interaction between the two clouds. By using the backward induction, each cloud is proved to obtain the strictly dominant strategy that maximizes its utility function at every information set in every sub- game, and thus the game can reach the unique sequential equilibrium. At the sequential equilibrium, both clouds have no incentive to deviate from computing honestly, i.e., not to collude. Simulation results show that the proposed scheme can achieve a low cost compared with the techniques from [100]. The reason is that the cloud users only need to pay the cost of employing two clouds for computing the same task. Nevertheless, although the smart contract has the advantages as presented in [40], a major limitation exists that only data in the blockchain is processed, and trusted entities are required to verify the correctness of the external data that will be brought into the blockchain. The trusted entities can launch an attack by manipulating the data to gain an extra profit [101]. The authors in [67] propose a decentralized entity scheme to prevent the attack. The model consists of the voters and the verifiers. The voter can vote, i.e., state the data as either true or false, for random data once the voter submits a small deposit to the system. The verifier can vote for the chosen data after submitting a large deposit. Each participant, i.e., the voter or the verifier, can receive a reward if its correctness statement is the same as that of the other participants. Thus, a coordination game can be used to analyze the interaction between the voter and the verifier. According to the definition of the coordination game [12], it can be easily proved that the game has two Nash equilibria in which the participants state the same correctness. At the Nash equilibrium, rational participants have no incentive to deviate from voting honestly if the majority participants give the honest statement. The simulation results show that the proposed game can achieve a zero probability of data manipulation. 2) Distrustful Goods Trading: The distrust of goods trading can also be mitigated by applying blockchain based smart contract as presented in [41]. The proposed smart contract involves two participants, i.e., one seller and one buyer. The participants are required to place a sufficiently large deposit for the reliable transaction which will be returned only after the transaction is completed. The participants can choose to 14 cooperate, i.e., execute the transaction honestly, or to attack, i.e., cheat another participant, e.g., by double spending. To maximize the utility, each participant has to take into account the tradoff between the cost, i.e., the loss of the deposit, and the profit of launching the attack given the other participant’s strategy. The seller takes its strategy before the buyer does, and thus an extensive-form game can be formulated. The utility of the player, i.e., the seller or the buyer, is determined based on the deposit, the value of the goods and the price set in the smart contract agreement. By using the backward induction, the game is proved to admit a unique subgame perfect Nash equilibrium at which both players perform the transaction honestly. However, how to implement the proposed smart contract is not discussed. Using a deposit for buying and selling goods can also be found in [34]. The transaction is insured by the deposit of both participants, i.e., the buyer and the seller. The buyer’s strategy profile includes (i) PC: pay and confirm the transaction, (ii) PD: pay and leave the system with denying the transaction, and (iii)Lb: leave the system without paying. The seller’s strategy profile includes (i) SC: ship the goods and confirm the transaction, (ii) SD: ship the goods and leave the system with denying the transaction, and (iii) Ls: leave the system without shipping. Each participant’s payoff is determined based on the value of the goods and its deposit given the other participant’s strategy. The interaction between the two participants can be modeled as a normal-form game. By using the iterative removal of dominated strategies [12], the game is proved to have a unique Nash equilibrium if both the participants’ deposits are greater than the goods’ value. At the Nash equilibrium, the PC and SC strategies are the best response of the buyer and the seller, respectively. Simulation results show that if the deposits of both participants are greater than the value of the goods, the sum of buyer’s money and the value of the seller’s goods remain unchanged for the whole system. This means that the buyer’s money is exchanged into the goods successfully, and the seller’s goods is exchanged into the money with no loss. However, in practice, the participant may not be perfectly knowledgeable of the other participant’s strategy. More sophisticated game models and tools can be considered. 3) Cyber-Insurance: Different from suppressing the attack motivation as presented in [34], [40], [41], [66], [67], the authors in [44] propose a cyber-insurance scheme [102] to compensate for the losses of the attacked blockchain partic- ipants. The model includes multiple blockchain users, one blockchain provider, and one cyber insurer. Each user needs to choose a service offered by the provider and maximize its utility given the other users’ service demands. Given the users’ demand, the provider’s problem is to invest in the computing resource to increase its profit. To alleviate losses of being attacked, the blockchain provider also purchases insurance from the cyber-insurer. The cyber-insurer sets the price of the insurance based on the perceived risk level of the provider. Typically, the provider and the insurer offer the service first, and the user then chooses the service. Thus, the interaction among the users, the provider, and the insurer can be modeled as a Stackelberg game. By exploiting the characteristics ofthe Jacobian matrix [32] to analyze the utility functions of the players, the game is proved to admit a unique Stackelberg equilibrium. The simulation results show that the provider can maximize its utility at a unique point which is in accordance with the uniqueness analysis. However, in practice, the insurer cannot completely know the risk level of the provider, and the Bayesian game can be adopted. V. A PPLICATIONS OF GAME THEORY FOR MINING MANAGEMENT Under the Nakamoto protocol, anyone within the blockchain network is allowed to play the role of the mining competition, transaction dissemination and verification in order to obtain the profit [1]. Each miner or mining pool involved manages what strategy it will perform to maximize its payoff given the others’ strategies, and game theory can thus be effectively applied. In this section, we will survey the applications of game theory in the mining management including computa- tional power allocation, fork chain selection, block size setting, pool selection and reward allocation. A. Individual Mining 1) Computational Power Allocation: Bitcoin mining is a competition that miners contend with each other by investing in computational power to win mining rewards. To maximize the utility, each miner determines the allocation of its computa- tional power, i.e., whether or not to invest in the computational power, given the other miners’ strategies. Therefore, a non- cooperative game is applied to analyze the interaction among the miners in [29]. The miner’s utility is a function of its computational power, the mining rewards and the marginal cost, i.e., the average cost for the miner to invest in a unit of computational power. By using the second-order derivative, the miner’s utility function is proved to be concave. Thus, a unique Nash equilibrium exists at which investing is the best response of each miner as long as the miner’s computational power satisfies a condition. Here, the condition is determined based on the computational power and the marginal cost of the miner and the entire bitcoin network. At the equilibrium, it is found that the decision on the investment is not affected by the value of the mining rewards. Moreover, every miner can have a positive utility for any level of other miners’ strategies which consequently can prevent a monopoly. Different from [29] in which the miners choose whether or not to participate and then keep their chosen strategies, the authors in [48] consider a case in which the miners can choose “arrival”, i.e., investing in the computational power, and “departure”, i.e., leaving the mining, at any time. In general, the strategy of each miner depends on the state of the blockchain network, i.e., the number of miners participating in the mining, given other miners’ strategies. A stochastic game can be applied to analyze the miners’ strategies as presented in [48]. The miner’s utility is a function of the number of the miners in the system, the arrival and departure rates of the miners, the rate of PoW getting solved, the cost and the reward of the mining. By transforming the utility function to the Bellman equation [121] and then calculating 15 TABLE IV: A Summary of Game Theoretical Applications for Mining Management. REF.GAME MODEL PLAYER ACTION STRATEGY PAYOFF SOLUTIONIndividual mining[29]Non-cooperative gameMinersComputational power allocationSelection of investment in computational power or notMining rewards minus costNash equilibrium [48]Stochastic game MinersComputational power allocationSelection between investing and leavingMining rewards minus costSubgame perfect equilibrium [103]Cournot game MinersComputational power allocationDetermination of the amount of investment in computational powerMining rewards minus costNash equilibrium [104]Non-cooperative gameMinersComputational power allocationSelection of proper time to start using the mining machinesMining rewards minus costNash equilibrium [45]Stackelberg gameService provider and minersComputational power allocationDetermination of service price and service demandProfit minus costStackelberg equilibrium [105]AuctionService provider and minersComputational power allocationDetermination of the bid for serviceProfit minus cost Individual utility [106]AuctionService provider and minersComputational power allocationDetermination of the bid for serviceProfit minus cost Social welfare [107]Sequential game Miners Fork chain selectionSelection of reporting mined block and mining on the longest chain or notMining rewardsSequential equilibrium [49]Stochastic game Miners Fork chain selection Selection of branch to mine Mining rewardsSubgame perfect equilibrium [39]Extensive-form gameMiners Fork chain selectionSelection of mining on the fork or notMining rewards minus costNash equilibrium [108]Extensive-form gameMiners Fork chain selectionSelection between strategically or stubbornly deviating the protocol and following the protocolMining rewards minus cost and punishment-robust equilibrium [109]Coordination gameMiners Fork chain selectionDetermination of updating blockchain version or notMining rewards Nash equilibrium [110]Coordination gameBlockchain users and minersFork chain selectionChosen between two fork chainsMining rewards Nash equilibrium [111]Repeated game Miners Fork chain selectionSelection of forming the coalition or notMining rewards minus costSocial welfare [112]Non-cooperative gameMiners Fork chain selectionSelection of forming the coalition or notProfit minus cost-coalition-safe 3Nash equilibrium [31]Non-cooperative gameMiners Fork chain selectionSelection of forming the coalition or notMining rewards Nash equilibrium [113]Non-cooperative gameMiners Block size settingDetermination of the block sizeTransaction fees and mining rewardsNash equilibrium [72]Non-cooperative gameMiners Block size settingChosen transaction to be included in the blockTransaction fees and mining rewardsNash equilibrium [114]Non-cooperative gameMiners Block size settingChosen of upper bound of block sizeTransaction fees Nash equilibrium [37]Extensive-form gameMiners Block size settingChosen transaction to be included in the blockTransaction feesSequential equilibrium [115]Non-cooperative gameBlockchain users Block size settingSelection of paying the transaction fee or notProfit minus transaction feeNash equilibrium [116]Non-cooperative gameMiners Block size settingSelection to be included in the committeeMining rewards Nash equilibriumPool mining[117]Coalitional gameMiners and pools Pool selection Chosen of the pool to join Mining rewardsCooperative equilibrium [118]Evolutionary gameMiners and pools Pool selection Chosen of the pool to switchMining rewards minus costNash equilibrium [119]Coalitional gameMiners and pools Pool selectionSelection between forming the pool and joining the poolMining rewardsNon-myopic Nash equilibrium [30]Non-cooperative gameMiners and pool managerReward allocationSelection of reporting shares and allocating rewardsMining rewards Nash equilibrium [120]Repeated gameMiners and pool managerReward allocationSelection of reporting shares and allocating rewardsMining rewards Nash equilibrium [38]Extensive-form gameMiners and pool managerReward allocationDetermination of the computational power allocation and optimizing the reward allocationMining rewards minus cost and charged feeSubgame perfect equilibrium 16 the first-order derivative, the utility function is proved to be monotonic increasing if the cost of mining is greater than a threshold. Thus, investing the maximum power is the dominant strategy of each miner regardless of the state of the blockchain network, and the game has a subgame perfect equilibrium. The simulation results show that the utilities of the miner under different arrival rates gradually converge to the same curve, i.e., the game reaches the equilibrium. In addition to the case in [29] and [48] that the miner can only choose to invest in the computational power or not, the authors in [103] investigate the amount of computational power that the miner determines to invest to win the mining rewards, given the other miners strategies. The probability that the miner solves the PoW in a given time can be assumed to follow an exponential distribution [1]. As such, the Nakamoto protocol essentially formalizes an exponential race. A Cournot game [122] can be thus used to analyze the interaction among the miners as presented in [103]. The miner’s utility is a function of the mining rewards, the computational power, and the marginal cost of the investment. The game is then proved to admit a symmetric Nash equilibrium by simply showing that the marginal revenue, i.e., the average revenue for the miner to invest in a unit of computational power, is equal to the marginal cost. At the equilibrium, each miner can optimize its investment and has no incentive to deviate from honest mining. The aforementioned approaches, i.e., [29], [48] and [103], consider the case that the mining reward dominates the trans- action fee. Nevertheless, when the transaction fee dominates the mining reward4, the miner will adjust its allocation of computational power by choosing strategically the proper time to start using its mining machines, i.e., the machines used for mining process which require electricity for their operation, to mine given the other miners’ strategies. The reason is that miners have no incentive to mine unless the accumulated transaction fees sufficiently exceed a certain threshold. Thus, the non-cooperative game can be used to analyze the inter- action among the miners as presented in [104]. Each miner’s utility is a function of the starting time, the operation time, the proportion of the miner’s machines, and the probability distribution function of the block finding time. The numerical analysis is thus used to find the Nash equilibrium of the game. The simulation results show that the miners that own the same number of mining machines eventually converge to the same starting time, meaning that the game reaches the Nash equilibrium. However, how to prove the uniqueness of the Nash equilibrium is not discussed. Although blockchain has been widely deployed in many scenarios as presented in [29], [48], [103], [104], deploy- ing blockchain applications in mobile environments is still challenging because the mining process consumes high com- putational power from mobile devices. An edge comput- ing paradigm has been recently introduced in the mobile blockchain networks for offloading the mining tasks of mobile devices, i.e., the miners [42]. The system model is illustrated 4Take the bitcoin as example, the bitcoin code includes a statement which declares that the mining reward will drop by half after about four years (210,000 blocks). Thereby, the mining reward will eventually be dominated by the transaction fee.in Fig 10. However, an important issue is how to allocate efficiently the limited edge computing resources of service providers to the miners. The authors in [45] model the in- teraction among the service provider and the miner as a two- stage Stackelberg game. The service provider acts as the leader setting the price of the service, and then the miner acts as the follower choosing its computational service demand, given the service price and the other miners’ strategies. The utility of service provider is a function of the profit obtained from charging the miners, the miners’ service demand, the time that the miner takes to mine a block, and the cost of electricity. The utility of the miner is a function of the computational service demand, the service price, the cost and the rewards of the mining. By using the backward induction, the game is proved to admit a unique Stackelberg equilibrium which is supported by the simulation results. However, in practice, the players cannot know the perfect information of each other, and the Bayesian game can be adopted. Traditional sealed-bid auctions, e.g., the Vickrey auction [123], can also be used to guarantee that the edge computing resources are allocated to the miners which value the resources most. However, designing the optimal auction is challenging. The authors in [105] propose to apply deep learning techniques to achieve the optimal auction for the computing resource allocation in the blockchain network. The model consists of one service provider, i.e., the seller or auctioneer, and multiple mobile users as miners, i.e., bidders. The miners compete a computing resource unit of the service provider by submitting bids, i.e., the prices that the miners are willing to pay. Upon receiving the bids, the service provider determines the allocation rule, i.e., winning probabilities of the miners, and the conditional payment rule to the miners. The allocation and payment rules are implemented by using neural networks. The neural networks are constructed based on an analytical solution of the optimal auction, i.e., the Myerson theory [124]. As such, the auction mechanism learned by the neural networks is optimal in terms of maximizing the revenue of the service provider while ensuring the economic properties, i.e., incentive compatibility and individual rationality. The simulation results show that the proposed scheme outperforms the traditional sealed-bid auction [123] in terms of revenue. However, the proposed scheme is constrained to a single computing resource unit that may not meet the needs of the miners. Different from the auction in [105] that the service provider, i.e., the auctioneer, maximizes its individual utility, the authors in [106] investigate the case of maximizing the social welfare of the entire blockchain network. Under the same model as that in [105], the utility of the mobile user and service provider is a function of the mining rewards, the computational power, the service price, the demand of the miner, and the robustness of the network associated with the distribution of the computa- tional power. By transforming the social welfare maximization auction problem to a problem of non-monotone submodular maximization with knapsack constraints [125], the algorithm of achieving the social optimum can be developed. The simulation results show that the algorithm not only achieves the good performance in maximizing the social welfare, but also guarantees the truthfulness, individual rationality and 17 Mobile device (bidder)Service Provider (Auctioneer) Mobile device (bidder)Data synchronization Mobile device (bidder)Bid BidBid Fig. 10: An example of the system model of edge computing in mobile blockchain network. The mobile devices compete for the computational power by submitting the bid, and the service provider determines the allocation rule of its service. computational efficiency. However, the algorithm is designed for the offline auction which is not applicable for real-time trading scenarios. 2) Fork Chain Selection: Under the Nakamoto protocol, there are sequential PoW puzzles that the next puzzle depends on the solution of the previous one. Since each miner needs to choose to (i) report its found puzzle to mine on the longest chain, or (ii) not to report the found puzzle and to the next puzzle secretly, given the publicity of previous puzzles, fork chain may appear. To maximize the utility, the miner trades off reporting the puzzle to gain the mining rewards and not reporting the puzzle to mine on fork. Meanwhile, the miner is uncertain whether it is the first one to find the solution of the puzzle. Thus, a sequential game with imperfect information can be applied to model the interaction among the miners as presented in [107]. The miner’s utility is a function of the distribution of the computational power, the probability of winning to solve the PoW, and the other miners’ belief of the upcoming publicity of the puzzles. By using the backward induction, the game is proved to admit a multiplicity of sequential equilibrium. This means that both reporting and not reporting can be the best response of each miner depending on the computational power that the miner uses to solve the puzzle. However, the authors only consider a three-miner case, and a general case with any number of miners can be investigated. After finding the solution of the PoW as discussed in [107], the miner probabilistically chooses which branch to mine, i.e., to choose a certain chain to attach its block to, among the tree- like branches of the blockchain network structure. If the miner chooses the branch which will not be the longest chain, the miner’s effort to solve PoW is wasted. A stochastic game can be used to analyze the strategies of the miners as presented in [49]. The miner’s utility is determined based on the miner’s computational power, the number of blocks solved by the miner, the mining rewards, and the difficulty of solving the PoW. By using the backward induction, the game is proved that mining the longest chain is a subgame perfect equilibrium. However, the current longest chain may not be the longest one after several rounds of mining competition. Portions of the historical transactions may be abandoned. Similar to [49], the authors in [39] demonstrate that fol-lowing the protocol, i.e., mining on the longest chain, is the Nash equilibrium. However, the model in [39] is based on the PoS system in which the fork chain randomly selects the coin from the set of coins owned by miners at each time step (see Section III). Thus, an extensive-form game can be applied. The miner chooses whether or not to mine on the fork, given the other miners’ strategies. The miner’s utility is a function of the stake, the mining rewards, the coins of miners selected by the fork, and a discounted factor. Since the cost of mining on the fork increases with the miner’s stake, for a sufficiently large stake of the miner, the cost overweighs the profit gained from the mining rewards. By restricting access to the miners with the large stake, the rest of miners have no incentive to deviate from mining on the longest chain, and the game thus reaches the Nash equilibrium. Empirical data obtained from Blockchain.info [90] supports the theoretical analysis. Extended from [39], the authors in [108] investigate the case of miners choosing the fork chain in an upgraded PoS system. In the upgraded system, the latest block is called the parent block, and concurrent blocks attached to the parent block are called the leaf blocks. Instead of following the longest chain protocol, miners can choose the leaf blocks to be attached to the parent block. To model the interaction among the miners in the tree-like structure of the system, an extensive-form game can be applied. The miners’ strategies include deviating from the protocol stubbornly, following the protocol, and strategically choosing whether or not to deviate from the protocol to maximize their utility. Since there is only one leaf block that can reach the consensus to win the reward, the utility of the miner is a function of the reward, the cost of losing the block, and the punishment of deviating from the protocol, given the other miners’ strategies. The punishment is implemented by taking away the deposit of the miner that is deposited in advance. When the fraction of the stubborn miners is less than 1=3, each miner cannot increase its utility more thanor decrease its utility more than 1=by deviating from the protocol. Thus, the game has a unique -robust equilibrium [116]. The simulation results show that only when the fraction of the deviated miners is greater than a quarter, the utilities of the miners that follow the protocol decrease, as the number of the deviated miners increases. This is consistent with the theoretical analysis. Furthermore, when the fork chain appears, the miners need to decide whether to update the blockchain version, i.e., to acknowledge the fork as a hard fork or not. The hard fork is a permanent divergence from the previous version of the blockchain which requires the miners to upgrade the blockchain software. Since having more miners participating in a particular chain version increases the value of the version, the miner’s strategy depends on not only its individual profit, but also the other miners’ profits. Thus, a coordination game can be used as presented in [109]. In the game, the miner gains a zero-profit if the miner’s strategy is not consistent with those of the majority of miners, and thus the game is admitted a unique Nash equilibrium. At the equilibrium, every miner chooses to stay on the current version or to upgrade the version. However, organizing the voting of upgrading the blockchain version remains a topic for further research. 18 Similar to [109], the authors in [110] propose to use the coordination game approach for choosing the fork chain. However, the players in the game in [110] include blockchain users and miners. To maximize the utility, both types of players need to choose between two fork chains to participate. Here, the utility of a blockchain user is a function of the users’ distribution of choosing certain chain, the transaction fees, and the strategies of the miners. The miner’s utility is a function of the distribution of the users between two fork chains, the computational power, the mining rewards, and the other miners’ choice of the chain. If the number of the blockchain users choosing a certain chain is greater than a threshold, the utility of the players can be proved to be monotonous. Thus, the game has a unique Nash equilibrium that all of the players choose the same chain. Otherwise, a mixed strategy Nash equilibrium exists such that players choose the chain randomly. The simulation results show that the user will choose to remain on a certain chain when the number of the users on this chain is greater than a certain value which is in accordance with the theoretical analysis. However, the case which involves multiple fork chains can also be investigated. The aforementioned approaches, i.e., [109] and [110], show that the miners can coordinate, i.e., through forming a coali- tion, to increase their utilities by deviating from the honest mining. To address this issue, the authors in [111] propose an upgrade scheme for the blockchain protocol. In the upgrade scheme, the mining reward is delayed to allocate to the miner that finds the solution of the PoW. Also, the miner can receive variable discounted rewards during several rounds of mining after the miner finds the solution. Extended from the coordination game model in [110] to its infinite form, a repeated game is then adopted in [111] where each miner chooses whether to form the coalition or not in every round of mining. The utility of each miner is a function of its computational power, the mining rewards, the difficulty of solving the PoW, the cost of mining, the number of rounds for allocating the discounted rewards, and the discounted factor of the rewards. It is approved that if the discounted factor meets an inequality, the miner’s utility of honest mining is greater than that of forming the coalition. This means that the game has a unique subgame perfect equilibrium at which the inequality is satisfied, and all the miners perform honest mining. Similar to [111], the authors in [112] propose a scheme to prevent the miners from forming the coalition. In the scheme, the transactions are first included in a buffer block, and the miner mines on the buffer block by solving the PoW. Only after the buffer block is broadcast and verified, this buffer block becomes the real block and will be attached to the blockchain. The miner can choose whether or not to form the coalition, i.e., deviating from the honest mining, given the other miners’ strategies. Thus, the interaction among the miners can be modeled as a non-cooperative game. The miner’s utility is a function of the computational power, the number of the blocks in a round of mining, the difficulty of solving the PoW, the distance between the buffer block and the blockchain, the cost and the rewards of mining, and the transaction fees. By calculating the ratio of the upper boundto the lower bound of the coalition’s profit, the multiplicative increase in utility is proved to be less than (1 + 3). Here, the coalition controls less than a  < 1=2fraction of the computational power, and the constant satisfies  <0:3. This means that no coalition that controls less than a fraction of the computational power can gain more than a factor (1 + 3) of the mining rewards and transaction fees by deviating from the protocol. Therefore, the game has a -coalition-safe 3  Nash equilibrium. Different from the PoW based coalition as discussed in [109]–[111], the coalition in the PoS based system is inves- tigated in [31]. In PoS, the miner’s stake, i.e., a parameter associated with the amount of the miner’s cryptocurrency and the time that miner has been holding the cryptocurrency, is updated at the end of each round of mining and the stake will be reset to zero after the miner discovers the block (see Section III). The higher stake means less difficulty in mining the block. Thereby, the miner chooses whether or not to form the coalition for holding more stakes to lower the mining difficulty, given the other miners’ strategy. Thus, a non-cooperative game can be applied. The miner’s utility is a function of the stake, the mining rewards, the number of times that the miner discovers the block and transactions to be included in the block. Since the miners of the coalition, even deviating from the protocol, cannot obtain the utility which exceeds that of the non-coalition, the game is thus proved to have a unique Nash equilibrium at which every miner follows the protocol. However, forming the coalition is not the only way to increase the miner’s stake. To increase the holding time and thereby increase the stake, the miner has an incentive to hold its cryptocurrency without mining. As a result, there is no mining miner, and the entire blockchain network crashes. 3) Block Size Setting: When mining the bitcoin, the miner can earn more transaction fees by including more transactions in its block. However, it also decreases the miner’s probability of gaining the mining reward [73] for a number of reasons, e.g., resulting in a longer propagation time for reaching a consensus. Each miner needs to determine strategically the block size, i.e., the number of transactions to be included in a block, to maximize its utility, given the other miners’ strategies. Thus, the authors in [113] model a two-miner case as a non-cooperative game. The miner’s utility is a function of its computational power, block size, and the time to reach the consensus. Since the first-order derivative of the miner’s utility function with respect to the block size is always less than zero when the unit transaction fee and the mining reward meet a certain condition, the strategy that all of the miners include no transaction in their block is a unique Nash equilibrium. However, if the transaction fee or the mining reward change, the Nash equilibrium shifts to the strategy that all of the miners include transactions in their block. To avoid the case that all miners include no transaction in their block as presented in [113], the authors in [72] demonstrate the necessity of setting the maximum block size. Same as the game approach as presented in [113], the miner chooses the transactions to be included in a block at every round of the mining competition. The miner’s utility is a function of its computational power and the transaction fees 19 associated with the block size and the bitcoin mining reward. The transactions that one miner does not include in its block will be included by another miner before the next round of the mining competition. Thus, when the block size is unlimited, the strategy of including all transactions by all the miners regardless of the fee is the unique Nash equilibrium. It is also found that unbounded transaction fee leads to the same Nash equilibrium. However, inflations of the computational power distribution may have an impact on the existence of the Nash equilibrium of the game. An analysis of setting a proper block size can also be found in [114]. The authors propose a Bitcoin-unlimited scheme to increase the throughput of the bitcoin system. In the scheme, each miner chooses its own upper bound of the block size, and invalidates and discards the excessive block, i.e., the block with the size larger than its upper bound. To maximize the util- ity, the miner trades off the transaction fees and the probability of its block being orphaned based on its mining power, given the other miners’ strategies. Thus, a non-cooperative game can be used to model the interaction among the miners. Since any miner that chooses different upper bound gains zero utility, the game is proved to admit a unique Nash equilibrium at which all miners choose the same upper bound. Since only the blocks with appropriate sizes would be added to the blockchain, the block size under the proposed scheme gradually increases to the maximum limit associated with the network capacity. This means that the divergence on the block size is always bounded and the throughput of the system increases. The simulation results show that if all miners have different bounds, the miners that possess large computational power intend to form a coalition to gain extra profit. However, this is harmful to maintaining the bitcoin’s decentralized structure. However, the unlimited block size [114] may not lead to a higher throughput of the bitcoin system. The reason is that any two blocks may have collisions, i.e., the miners simultaneously choose the same subset of transactions to be included in the blocks. This situation wastes the computational power for ver- ification and lowers the throughput of the system. To address this issue, the authors in [37] propose an alternative bitcoin protocol. In the protocol, the system selectively incorporates transactions of off-chain blocks into the main chain and awards creators, i.e., miners, of the accepted transactions even if the creators’ blocks are not part of the main chain. Each miner chooses the transactions to be included in its block and trades off the transaction fees and probability of the collision. The miners are partially aware of other miners’ strategies and take their strategies sequentially. Thus, an extensive-form game can be used to model the interaction among the miners. The utility of the miner is a function of the position of its block in the main chain, the discount factor, and the fees of the chosen transactions. By using the backward induction, the game is proved to admit a sequential equilibrium at which the miners probabilistically choose the transaction to minimize the collision. As a result, the proposed protocol achieves a higher throughput which is consistent with the simulation analysis. However, the game has several other Nash equilibria at which the miners’ utilities are much less than that of the sequential equilibrium.Moreover, even with the unlimited block size as presented in [114], there is still a limitation on transactions to be included in the block. The limitation is imposed by the waiting time, i.e., the time that a transaction of the blockchain user waits in a queue to be included in the block. The blockchain user can choose (i) to pay a transaction fee to the miner to reduce the waiting time, or (ii) not to pay any fee and may experience a longer waiting time. The miner can decide to stay on or to leave the mining according to the expected profit of the transaction fees and the cost. Thus, the interaction between the miners and the users can be modeled as a non-cooperative game as presented in [115]. The miner’s utility is a function of the number of miners in the network, the rate of solving the PoW, the exchange rate between the bitcoin value and the dollar, the transaction fees, the rewards and the cost of the mining. The user’s utility is a function of the exchange rate, the transaction fee, the waiting time, the profit of the included transaction, and the fraction of users that pay the fee. The constraint between the number of miners and the rate of solving the PoW can be obtained, when the miner’s and the user’s utility are both greater than zero. This means that if the constraint is satisfied, the game has a unique Nash equilibrium. At the equilibrium, the miner chooses to stay on the mining and the user chooses to pay the transaction fee. Empirical evidence from blockchain.info [90] is implemented to validate the theoretical analysis. However, multiple Nash equilibria can exist if the constraint is not satisfied. As presented in [115] that the waiting time limits the throughput of the blockchain network, the authors in [116] propose a novel protocol that greatly reduces the waiting time of the transaction to reach the Nakamoto consensus. In the protocol, there is a committee including a certain number of members, i.e., miners. The block found by any miner is verified only when the majority of members reach the consensus. This miner is then selected as a member in the committee and ranked based on its computational power. The utility of the member is a function of the computational power, the mining rewards and the other members’ strategy. Thus, a non-cooperative game can be applied. Since the member gains the positive profit only when the member follows the protocol, i.e., chooses the block with higher rank, the game is proved to admit a unique Nash equilibrium. At the equilibrium, the chain is never forked and the confirmation time for preventing from the double spending is unnecessary. As a result, the throughput of entire the blockchain network increases. B. Pool Mining 1) Pool Selection: To reduce the volatility of the mining rewards and to maximize the utility, miners can form a coali- tion, i.e., mining pool [75], and cooperate with the members, i.e., miners in the pool, by following the reward allocation of the pool. Thus, a coalitional game [11] can be used to analyze the interaction among the miners and the pools as presented in [117]. Since the communication delay of the bitcoin network leads to the non-linearity of the pool’s mining rewards, the rewards cannot be distributed stably among the members. This means that there are always some miners having an incentive 20 to leave their pools and join other pools to increase their utility. As a result, no cooperative equilibrium exists in the game. Additionally, as more transactions are processed in the bitcoin system, the non-linearity effect on the mining rewards increases, and thus miners are more likely to switch pools, i.e., select and join the pool which benefits them most. During pool selection, each miner first randomly selects a mining pool to start mining with and then switches to another pool after a time period according to its expected utility. The distribution of the miners in mining pools of the whole blockchain network evolves over time based on the miners’ strategies. Thus, the framework of evolutionary game [126] can be used to analyze the dynamic process of the miners’ pool selection as proposed in [118]. If the replicator dynamics [127], i.e., the growth rate of the size of the pools, is equal to zero, the distribution of the miners reaches evolutionary stability [128]. Here, the utility of the miner is a function of its computational power, propagation delay, the mining reward and the mining cost. By exploiting the characteristics of the Jacobian matrix of the replicator dynamics in a two-mining- pool network, the game is proved to admit conditionally a unique Nash equilibrium, i.e., the evolutionary stability. The miners in a PoS system can also form coalitions, i.e., pools, to increase their utilities. The miners need to trade off the cost and the expected profit of forming the pool. For this, each miner chooses (i) to form a pool as a leader, or (ii) to allocate its stake to pools that are already created by the other miners given the reward scheme of the system. In particular, the miner first determines the amount of stake to be allocated to be the leader and then calculates the best possible allocation of mining rewards. Thus, a coalitional game can be applied to analyze the respective aspect of interactions among the miners and the pools as presented in [119]. The results of backward induction illustrate that both the games have a unique non-myopic Nash equilibrium [129]. At the equilibrium, the certain number of pools are formed with the same size. The rewards are distributed evenly among all miners, except for pool leaders that get an additional gain. The simulation results show that starting from no pool, the game quickly converges to multiple pools of an equal size which is consistent with the theoretical analysis. 2) Reward Allocation: Admittedly, the mining pool’s re- ward allocation, i.e., the algorithm used to share mining rewards among miners, has a significant impact on the utilities of the miners [75]. The miner can choose to report shares, i.e., preimage solutions for a block that meets the requirement set by the pool manager [25], immediately or to delay the report- ing given the reward allocation of the pool. The pool manager needs to select the reward allocation algorithm according to the miners’ expected utility. Thus, a non-cooperative game can be used to analyze the interactions between the miners and the pool manager as presented in [30]. If a certain condition is satisfied, the strategy that each miner reports the shares immediately is the Nash equilibrium. Here, the condition is associated with the miner’s computational power, the probability of finding the full solution of the PoW, the number of reported shares, and the number of the completed rounds of the mining competition.However, the approach proposed in [30] considers only the single share. Namely, each miner reports the share only one time during mining. In practice, the miners can report the shares repeatedly, and the pool manager can optimize its reward allocation to maximize its utility. Thus, a repeated game can be applied as presented in [120]. The game is proved that the pool manager can use the geometric-pay, i.e., a certain reward function, to achieve the social optimum. The simulation results show that the expected utility of the geometric-pay pool, i.e., the pool that allocates its mining rewards following geometric distribution, is greater than those of both the proportional pay pool, i.e., the pool that shares mining rewards evenly among the shares, and the PPLNS pool which is in accordance with the theoretical analysis. As the miners participate in mining pools to reduce the volatility of the mining rewards, a large pool may become even larger. It may lead to a centralization against to the funda- mental decentralized structure of the blockchain. However, the authors in [38] demonstrate that this situation will not happen. During each round of mining, the miner chooses to allocate its computational power to a certain pool according to the state of the blockchain, i.e., the distribution of computational power among the pools. The pool manager adjusts the fees charged to the participated miners to maximize its profit, given the state of the blockchain. Thus, an extensive-form game can be applied to analyze the interaction between the miners and the pool managers as presented in [38]. The miner’s utility is a function of the computational power, fee charged by the pool, the distribution of miners among the pools, the cost and the rewards of the mining. If the fee charged by the pool manager satisfies a condition, the game reaches a subgame perfect equilibrium. Here, the condition is associated with the number of the remaining miners in the same pool. At the equilibrium, the large pools charge a higher fee than the small pools. The miners thus choose the small pools to participate to maximize their utility. As a result, the centralization will not happen. Empirical evidence from Bitcoinity and Bitcoin Wiki supports the theoretical analysis. VI. A PPLICATIONS OF GAME THEORY ATOP BLOCKCHAIN PLATFORM A. Crypto-currency Economic 1) Transaction Transparency: Under the Nakamoto proto- col, the entire history records linked to the transaction are transparent to all the blockchain miners and users. This may cause a series of problems. For example, blockchain miners intend to include the transaction in high quality, i.e., most of the history of the transaction is legalized and reliable, into the block rather than the transaction in low quality. The reason is that the transactions that can be traced back to the darknet markets or ransomware payment may be added to the blacklist of the government. The large transaction in not high quality may thus be orphaned by the miners regarding the possible huge loss. To mitigate the risk of transaction in not high quality being orphaned, the user mixes strategically its payment, i.e., splits its payment of transaction into several small ones in different qualities. This scenario is illustrated as in Fig. 11. 21 Since the miner’s possible loss decreases due to the smaller size of the transaction, the transaction that is not in high quality may be included into the block. The user checks the quality of the other user’s transaction sequentially and a sequential game can thus be used to analyze the interaction among the users as presented in [130]. The user’s utility is a function of the quality of the transaction, the value of the post-transaction and the cost of mixing the payment. By using the backward induction, the game is proved to admit multiple subgame perfect Nash equilibria. At the equilibrium, each user mixes their payment in a single transaction instead of sending multiple individual transactions. However, the transaction size, the cost and the rewards of mining can be taken into account in a more general case. Input1 Input2Output1 Output2Transaction A Input1 Input2Output1 Output2Transaction C Input1 Input2Output1 Output2Transaction B5BTC 2BTC 3BTC 1BTC3BTC 3BTC4 13BTC 2BTC Fig. 11: An example of the mixing payment: the transaction A is discovered to be a ransom payment and all of its outputs are added to the blacklist. The transaction B is in high quality. To avoid transaction C to be orphaned by the miners, the user mixes the payment of the transaction C by the payment of transaction A and transaction B. Under the scenario in [130], the user that mixes the payment of transaction makes money flows more difficult to trace. This is harmful for the entire blockchain system. To address this issue, the authors in [131] investigate the optimal level of transaction transparency and propose a reliable trading system. Since each blockchain user has a unique public key, the user can use the crypto-currency to trade goods with another user directly. To avoid the transaction information, e.g., the ownership of a certain sum of money, being exploited for crime, the proposed system restricts the user’s ability to view the complete transaction information attached to the public keys. Thereby, before delivering the goods for trading to other users, the user trades off the expected profit and possible loss in terms of the incomplete transaction information to choose whether or not to perform the trading. The trading can thus be organized as an infinitely repeated game in discrete time as presented in [131]. The user’s utility is a function of the trading quantity, trading price, the probability of the trade being performed, the allocation of the goods for trading, and the cost of trading. By defining the inequality that the user’s utility of offering a positive trading price is greater than that of the offering a zero trading price, i.e., the transaction failure, the constraint between the trading price and the allocation can be obtained. This means that if the constraint is satisfied, the game has multiple Nash equilibria. In any equilibrium of the game, the user has an incentive to split large transaction into small ones and trades with several other users.Although the transparency of transaction information causes a series of problems, e.g., malicious uses of information, as presented in [130] and [131], it enables the entrant, i.e., the new blockchain user, to possess an endogenous high reputation, i.e., the ability of performing the reliable trading. Thereby, potential users have more incentive to enter the trad- ing system compared with the traditional real-world trading system where only the user that has high reputation can attract customers to trade with. Although the blockchain-based trad- ing system facilitates the entry for potential entrant, the trading competition in the system increases and collusion among the users arises due to the information transparency. Thus, each potential entrant chooses whether or not to enter the system regarding the trade-off between the expected utility after the entry and the enhanced competition as well as collusion, given the other entrants’ strategies. Since the potential entrant makes its choice repeatedly in discrete time period, a repeated game can be applied as presented in [132]. The entrant’s utility is a function of the probability that one customer joins the trading in a time period, the probabilistic distribution of the reputation, the profit that can be obtained by the trading and the cost of entry. Since both the utility of the entrant and the social welfare of the system are higher than those of the traditional trading system, each potential entrant entering the system is proved to be the Nash equilibrium. However, the balance between transparency and privacy of the blockchain trading system still remains a topic for further research. 2) Crypto-currency Value: In the last decade, hundreds of crypto-currencies are adopted in the worldwide financial market. Each crypto-currency has its value which depends on its transaction rate, transaction fees, mining rewards and its fiat exchange rate. The miners need to choose a certain currency to mine according to the value of the crypto-currency and the competition from the other miners. Given the other miners’ strategies, the miner can choose to keep mining on the same crypto-currency or change its strategy to mine on another one. Since the incentive of all miners, i.e., players, to change their strategy can be expressed using a single global function, i.e., the potential function [135], the potential game can be applied as presented in [133]. The potential function is of the distribution of the miners on mining different crypto- currencies, the computational power, the value and the reward allocation of the crypto-currencies. By using the induction of the better-response learning algorithm [135], the game is proved to admit more than one Nash equilibrium. However, how to achieve a desired equilibrium is not discussed. The authors in [36] further investigate the relationship between the value of the crypto-currencies and the population size of the users. Given a certain blockchain-based crypto- currency, the user can choose whether or not to participate in the blockchain platform with a cost and to hold a cer- tain amount of the crypto-currency, given the other users’ strategies. Since the user makes its strategy based on the productivity of the blockchain platform, i.e., the state which represents the quality or the usefulness of the blockchain platform, an extensive-form game can be adopted to analyze the interaction among the users as presented in [36]. The user’s utility is a function of the transaction supply and demand, the 22 TABLE V: A Summary of Game Theoretical Applications for Crypto-currency Economic. REF.GAME MODEL PLAYER ACTION STRATEGY PAYOFF SOLUTIONCrypto-currency Economic[130]Sequencial gameBlockchain usersSetting transaction transparencySelection of mixing payments Profits minus costSubgame perfect Nash equilibrium [131]Repeated game Blockchain usersSetting transaction transparencySelection of performing trading or notFunction of expected profits and possible lossNash equilibrium [132]Repeated game Blockchain usersSetting transaction transparencyChosen of entering the system or notProfits minus cost Nash equilibrium [133]Potential game MinersDetermination of the crypto-currency valueSelection between keeping mining and switching to mine on another coinCrypto-currency value and mining rewardsNash equilibrium [36]Extensive-form gameBlockchain usersDetermination of the crypto-currency valueChosen of entering the system or notProfits minus costMarkov equilibrium [134]Non-cooperative gameBlockchain usersDetermination of the crypto-currency valueDetermination of the allocation of real money and investment in computational powerFunction of computational power and population size of usersNash equilibrium size of the blockchain users, the participation cost and the profit of holding the crypto-currency. By exploiting the char- acteristics of the Hamilton-Jacobi-Bellman (HJB) equation [136] transformed from the user’s utility, the game is proved to admit a unique Markov equilibrium. At the equilibrium, the high crypto-currency value attracts more potential users to participate which reflects the future growth of the user population size, and the expectation of future growth leads reciprocally to a higher crypto-currency value. Similar to [36], the authors in [134] demonstrate that the value of the crypto-currency is derived by the computational power of the blockchain network and the population size of the users. The user determines the amount of real money to be allocated in the transaction in the blockchain, and the miner determines the investment in the computational power in exchange for the mining profit according to the strategies of both the other users and miners. A non-cooperative game can thus be applied as presented in [134]. The larger number of users attract more investment in computational power, and more computational power means the stronger consen- sus within the blockchain network and the higher crypto- currency value, and thereby leads to more users to participate in the blockchain network. Thus, the reciprocal interaction between the computational power and the user population size captures the equilibrium value of the crypto-currency. This equilibrium value of crypto-currency depends on the users’ preferences, e.g., the risk aversion and the censorship aversion, and the usefulness of the network. The empirical data from Blockchain.info [90] supports the theoretical analysis. B. Energy Trading Increasing distributed renewable energy users, e.g., solar rooftops and energy storage units, gradually changes the centralized structure of conventional power system. The rea- son is that the distributed energy users produce the energy and thereby users can trade their energy with each other directly. Therefore, by utilizing the decentralized structure of the blockchain network for trading information exchange, the blockchain-based energy trading systems are proposed. Each energy user in the system can decide the amount of energy to(i) buy from the conventional power system, (ii) buy renewable energy from other users, (iii) store its harvest energy, and (iv) sell its energy to the other users. When the energy exchange price is set by the users, the interactions among the users can be modeled as games. For example, in [137], a potential game [135] is applied to achieve the social optimum. Considering the energy demand variation, a non-cooperative game is adopted in [138]. The authors in [94] propose a credit-based energy trading system and model the interaction between the users and the credit bank as a Stackelberg game. Otherwise, when the energy exchange price is set by the system where the users bid for the exchange price, the auction models can be applied to achieve the social optimum as presented in [139] and [140]. VII. C HALLENGES AND FUTURE DIRECTIONS In Sections IV , V , and VI, we provide an in-depth survey on applications of game theory to address a wide range of issues in the blockchain networks and related systems. However, with the fast evolution of the blockchain technologies and their applications, a plethora of emerging problems remain open for further studies, many of which can be solved using game theory. In this section, we expand our discussion to some challenges as well as research directions with blockchain, where the mathematical tools of game theory may exert further potential for system analysis and mechanism design. A. Challenges from Game Theory Perspective 1) Existence of Nash Equilibria: Most references reviewed in this survey discuss the existence of the unique Nash equi- librium. At the Nash equilibrium, the players, e.g., the miners or the pools, have no incentive to deviate from their current strategies. However, in practice, multiple Nash equilibra can exist, and thus it is challenging for the players to choose the optimal strategy or solution. For example, for the mining management [115], with the existence of Nash equilibra, the miners can choose between staying and leaving, and the blockchain users choose between paying or not paying the transaction fee. In this case, finding the solution among the 23 Nash equilibria to achieve a social optimum for the whole network is a challenge. Similarly, for the crypto-currency economic [133], how to achieve a social optimal equilibrium in the crypto-currency market is very challenging. 2) Implementation of Game Models: The applied game models proposed in aforementioned reviews have its limi- tation. For example, due to the first-mover advantage, the Stackelberg game is widely used to solve many issues in blockchain network. However, the blockchain network is a type of decentralized system with a number of distributed nodes, i.e., players. Therefore, how leader nodes observe the strategy of each follower node, make optimal decisions, and find the equilibrium is one big challenge. To address the challenge, the meanfield games [141] can be applied for analyzing the performance of the whole blockchain network with large number of miners where individual miners have relatively negligible impact upon the network. In addition, evolutionary games can be adopted for analyzing mining pools’ formation and evolution. Stochastic games can be used for analyzing more complex scenarios, such as miners’ probabilistic selection of transactions to be included, blocks to be verified and broadcast, and chains to be attached and mine. B. Open Issues and Research Directions for Applications of Game Theory in Blockchain 1) Throughput Improvement: Blockchain technologies have been adopted in a number of scenarios. However, the through- put, i.e., capacity of processing requested transactions, of blockchain networks limits the scope of blockchain applica- tions. The major reasons for this issue are the long block creation time and limited block size [113]. However, block creation time and the block size cannot be easily changed for improving the throughput. The analyses in [114] show that miners intend to form a coalition if the block size is unlimited. This is harmful to maintaining the decentralized structure of the blockchain network. Also, the authors in [115] demonstrate that even with the unlimited block size, there is still a limitation on throughput imposed by the waiting time for transactions to be included in blocks. Thus, to improve the throughput, blockchain protocols in terms of the efficient block creation and the proper block size need to be further developed, and game theory can be a useful tool. 2) Alternative Consensus Mechanisms: In blockchain net- works, e.g., PoW networks, every node performs several certain tasks to maintain the consensus across the blockchain. However, reaching the consensus needs nodes to repeat tasks consuming a large amount of electricity [29]. Thus, an al- ternative consensus mechanism to PoW such as Proof of Useful Work or Resources (PoUWR) [142] may be used. For example, computing hash value in PoW network can be replaced with performing stochastic gradient descent for neural network training [142]. Due to the difference between the tasks in terms of data volume, expected accuracy and variable dimension, the strategies of nodes to obtain a puzzle solution are different from those in the PoW network. Therefore, it is necessary to apply game approaches to analyze the interaction among nodes in the process of PoUWR competition, e.g., thecomputational power allocation between PoUWR and PoW, the tradeoff between the payoff and the cost, and security issues regarding the deviation from the PoUWR protocol. 3) Permissioned Ledger Types: Public blockchain has been adopted in many applications. Public blockchain allows any- one to participate to be a node, and it has no control by regu- latory agencies, industries, or governments. In addition to the public blockchain, permissioned blockchain ledger types such as consortium blockchain, become another interesting appli- cation of Nakamoto’s blockchain implementation. Consortium blockchains can be considered to be semi-decentralization. The reason is that not everyone can participate in the network, and the consortium blockchain is maintained by a group of pre-selected nodes, allowing for a greater degree of con- trol over the network by regulators. As such, the consor- tium blockchains involve multiple entities and stake-holders, i.e., the pre-selected nodes, the verification nodes, and the blockchain users. To model and analyze complex interactions among the entities and stake-holders, game theory can be adopted as a useful tool. For example, the non-cooperative games can be used to analyze the pre-selected node selection, Stakeleberg games can be applied to analyze the interaction between the pre-selected nodes, i.e., the leaders, and the verification nodes, i.e., the followers. Also, evolutionary games can be used to analyze the formation of mining pools in permissioned blockchain networks. 4) Incorporating Blockchain Technologies into Other Sce- narios: As blockchain is a versatile technology, it is also possible to incorporate blockchain into other emerging net- work and application scenarios. For example, the authors in [45] introduce a blockchain-based edge computing paradigm in which mobile users offload their computing tasks to com- puting service providers and pay the corresponding fees. This paradigm addresses the implementation issue of blockchain applications on resource-limited mobile services. However, the blockchain-based edge computing paradigm raises resource management issues. For example, how to motivate the service providers to contribute their computing resources. Game the- ory can be efficiently used to design incentive mechanisms. For example, auction schemes can be adopted to improve the utility or revenue of the service providers. Also, the Stackelberg game can be applied to improve both the utility of the computing service providers and the mobile users. Predictably, by taking advantage of game theory to analyze and design incentive mechanisms, blockchain technologies can be widely incorporated into multi-agent scenarios beyond the crypto-currencies, e.g., mobile blockchain networks, informa- tion sharing scenarios, and energy trading markets. VIII. C ONCLUSIONS This paper has presented a comprehensive survey of the applications of game theory in blockchain. Firstly, we have given an overview of blockchain with its structure, workflow, and incentive compatibility. Then, we have introduced the basic knowledge of game theory and several game models with the objective to understand the motivations of using game theory to analyze interactions among different compo- nents in blockchain. Afterwards, we have provided reviews 24 and analyses using game theory in detail to deal with a variety of problems regarding security, mining management and blockchain applications. Finally, we have outlined existing challenges as well as future research directions. REFERENCES [1] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” Self- published Paper, May 2008, [Online]. https://bitcoin.org/bitcoin.pdf. [2] Z. Zheng, S. Xie, H.-N. Dai, and H. Wang, “Blockchain challenges and opportunities: A survey,” Work Pap.–2016 , 2016. [3] G. Wood, “Ethereum: A secure decentralised generalised transaction ledger,” Ethereum project yellow paper , vol. 151, pp. 1–32, 2014. [4] D. Schwartz, N. Youngs, A. Britto et al. , “The ripple protocol consen- sus algorithm,” Ripple Labs Inc White Paper , vol. 5, 2014. [5] T. Cox, “Eos. io technical white paper,” GitHub repository , 2017. [6] S. Popov., “The tangle,” 2018, [Online]. http://iotatoken.com/ IOTAWhitepaper.pdf. [7] X. Yue, H. Wang, D. Jin, M. Li, and W. Jiang, “Healthcare data gateways: found healthcare intelligence on blockchain with novel privacy risk control,” Journal of medical systems , vol. 40, no. 10, p. 218, 2016. [8] M. Raikwar, S. Mazumdar, S. Ruj, S. S. Gupta, A. Chattopadhyay, and K.-Y . Lam, “A blockchain framework for insurance processes,” inNew Technologies, Mobility and Security (NTMS), 2018 9th IFIP International Conference on . IEEE, 2018, pp. 1–4. [9] M. Castro and B. Liskov, “Practical byzantine fault tolerance and proactive recovery,” ACM Transactions on Computer Systems (TOCS) , vol. 20, no. 4, pp. 398–461, 2002. [10] E. Altman, Constrained Markov decision processes . CRC Press, 1999, vol. 7. [11] R. B. Myerson, Game theory . Harvard university press, 2013. [12] Z. Han, D. Niyato, W. Saad, T. Bas ¸ar, and A. Hjørungnes, Game theory in wireless and communication networks: theory, models, and applications . Cambridge University Press, 2012. [13] F. Tschorsch and B. Scheuermann, “Bitcoin and beyond: A technical survey on decentralized digital currencies,” IEEE Communications Surveys & Tutorials , vol. 18, no. 3, pp. 2084–2123, 2016. [14] M. Conti, S. Kumar, C. Lal, and S. Ruj, “A survey on security and privacy issues of bitcoin,” IEEE Communications Surveys & Tutorials , 2018. [15] M. C. K. Khalilov and A. Levi, “A survey on anonymity and privacy in bitcoin-like digital cash systems,” IEEE Communications Surveys & Tutorials , 2018. [16] T. Salman, M. Zolanvari, A. Erbad, R. Jain, and M. Samaka, “Security services using blockchains: A state of the art survey,” IEEE Commu- nications Surveys & Tutorials , 2018. [17] M. S. Ali, M. Vecchio, M. Pincheira, K. Dolui, F. Antonelli, and M. H. Rehmani, “Applications of blockchains in the internet of things: A comprehensive survey,” IEEE Communications Surveys & Tutorials , 2018. [18] R. Yang, F. R. Yu, P. Si, Z. Yang, and Y . Zhang, “Integrated blockchain and edge computing systems: A survey, some research issues and challenges,” IEEE Communications Surveys & Tutorials , 2019. [19] R. C. Merkle, “A digital signature based on a conventional encryption function,” in Conference on the theory and application of cryptographic techniques . Springer, 1987, pp. 369–378. [20] V . Buterin, “On public and private blockchains,” Ethereum blog , vol. 7, 2015. [21] C. Cachin, “Architecture of the hyperledger blockchain fabric,” in Workshop on Distributed Cryptocurrencies and Consensus Ledgers , vol. 310, 2016. [22] C. Christian, “Yet another visit to paxos,” IBM Research, Zurich, Switzerland, Tech. Rep. RZ3754 , 2009. [23] D. Mazieres, “The stellar consensus protocol: A federated model for internet-level consensus,” Stellar Development Foundation , 2015. [24] J. Mogan, “Quorum. advancing blockchain technology,” En l ´ınia]. Available: https://www. jpmorgan. com/country/US/EN/Quorum . [25] W. Wang, D. T. Hoang, P. Hu, Z. Xiong, D. Niyato, P. Wang, and Y . Wen, “A survey on consensus mechanisms and mining management in blockchain networks,” arXiv preprint arXiv:1805.02707v3 , 2018. [26] J. Katz, A. J. Menezes, P. C. Van Oorschot, and S. A. Vanstone, Handbook of applied cryptography . CRC press, 1996. [27] X. Li, P. Jiang, T. Chen, X. Luo, and Q. Wen, “A survey on the security of blockchain systems,” Future Generation Computer Systems , 2017.[28] J. A. Kroll, I. C. Davey, and E. W. Felten, “The economics of bitcoin mining, or bitcoin in the presence of adversaries,” in Proceedings of WEIS , vol. 2013, 2013, p. 11. [29] N. Dimitri, “Bitcoin mining as a contest,” Ledger , vol. 2, pp. 31–37, 2017. [30] O. Schrijvers, J. Bonneau, D. Boneh, and T. Roughgarden, “Incentive compatibility of bitcoin mining pool reward functions,” in International Conference on Financial Cryptography and Data Security . Springer, 2016, pp. 477–498. [31] A. Kiayias, A. Russell, B. David, and R. Oliynykov, “Ouroboros: A provably secure proof-of-stake blockchain protocol,” in Annual International Cryptology Conference . Springer, 2017, pp. 357–388. [32] J. B. Rosen, “Existence and uniqueness of equilibrium points for concave n-person games,” Econometrica: Journal of the Econometric Society , pp. 520–534, 1965. [33] M. Carlsten, H. Kalodner, S. M. Weinberg, and A. Narayanan, “On the instability of bitcoin without the block reward,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security . ACM, 2016, pp. 154–167. [34] G. Bigi, A. Bracciali, G. Meacci, and E. Tuosto, “Validation of de- centralised smart contracts through game theory and formal methods,” inProgramming Languages with Applications to Biology and Security . Springer, 2015, pp. 142–161. [35] I. Eyal, “The miner’s dilemma,” in Security and Privacy (SP), 2015 IEEE Symposium on . IEEE, 2015, pp. 89–103. [36] L. W. Cong, Y . Li, and N. Wang, “Tokenomics: Dynamic adoption and valuation,” 2018. [37] Y . Lewenberg, Y . Sompolinsky, and A. Zohar, “Inclusive block chain protocols,” in International Conference on Financial Cryptography and Data Security . Springer, 2015, pp. 528–547. [38] L. W. Cong, Z. He, and J. Li, “Decentralized mining in centralized pools,” 2018. [39] F. Saleh, “Blockchain without waste: Proof-of-stake,” 2018. [40] C. Dong, Y . Wang, A. Aldweesh, P. McCorry, and A. van Moorsel, “Be- trayal, distrust, and rationality: Smart counter-collusion contracts for verifiable cloud computing,” in Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security . ACM, 2017, pp. 211–227. [41] A. Asgaonkar and B. Krishnamachari, “Solving the buyer and seller’s dilemma: A dual-deposit escrow smart contract for provably cheat- proof delivery and payment for a digital good without a trusted mediator,” arXiv preprint arXiv:1806.08379 , 2018. [42] Z. Xiong, Y . Zhang, D. Niyato, P. Wang, and Z. Han, “When mobile blockchain meets edge computing,” IEEE Communications Magazine , vol. 56, no. 8, pp. 33–39, 2018. [43] J. Kang, Z. Xiong, D. Niyato, P. Wang, D. Ye, and D. I. Kim, “In- centivizing consensus propagation in proof-of-stake based consortium blockchain networks,” IEEE Wireless Communications Letters , to be published. [Online]. Available: rl fhttps://ieeexplore.ieee.org/document/ 8432083/g./. [44] S. Feng, W. Wang, Z. Xiong, D. Niyato, P. Wang, and S. S. Wang, “On cyber risk management of blockchain networks: A game theoretic approach,” arXiv preprint arXiv:1804.10412 , 2018. [45] Z. Xiong, S. Feng, D. Niyato, P. Wang, and Z. Han, “Optimal pricing- based edge computing resource management in mobile blockchain,” in2018 IEEE International Conference on Communications (ICC) . IEEE, 2018, pp. 1–6. [46] L. S. Shapley, “Stochastic games,” Proceedings of the national academy of sciences , vol. 39, no. 10, pp. 1095–1100, 1953. [47] E. Maskin and J. Tirole, “Markov perfect equilibrium: I. observable actions,” Journal of Economic Theory , vol. 100, no. 2, pp. 191–219, 2001. [48] S. Dhamal, T. Chahed, W. Ben-Ameur, E. Altman, A. Sunny, and S. Poojary, “A stochastic game framework for analyzing computational investment strategies in distributed computing with application to blockchain mining,” arXiv preprint arXiv:1809.03143 , 2018. [49] B. Biais, C. Bisiere, M. Bouvard, and C. Casamatta, “The blockchain folk theorem,” 2018. [50] Y . Zhen, M. Yue, C. Zhong-yu, T. Chang-bing, and C. Xin, “Zero- determinant strategy for the algorithm optimize of blockchain pow consensus,” in Control Conference (CCC), 2017 36th Chinese . IEEE, 2017, pp. 1441–1446. [51] S.-K. Kim, “The trailer of blockchain governance game,” arXiv preprint arXiv:1807.05581 , 2018. [52] I. Eyal and E. G. Sirer, “Majority is not enough: Bitcoin mining is vulnerable,” Communications of the ACM , vol. 61, no. 7, pp. 95–102, 2018. 25 [53] N. T. Courtois and L. Bahack, “On subversive miner strategies and block withholding attack in bitcoin digital currency,” arXiv preprint arXiv:1402.1718 , 2014. [54] A. Sapirshtein, Y . Sompolinsky, and A. Zohar, “Optimal selfish mining strategies in bitcoin,” in International Conference on Financial Cryp- tography and Data Security . Springer, 2016, pp. 515–532. [55] L. Luu, R. Saha, I. Parameshwaran, P. Saxena, and A. Hobor, “On power splitting games in distributed computation: The case of bitcoin pooled mining,” in Computer Security Foundations Symposium (CSF), 2015 IEEE 28th . IEEE, 2015, pp. 397–411. [56] K. Chatterjee, A. K. Goharshady, R. Ibsen-Jensen, and Y . Velner, “Ergodic mean-payoff games for the analysis of attacks in crypto- currencies,” arXiv preprint arXiv:1806.03108 , 2018. [57] M. Babaioff, S. Dobzinski, S. Oren, and A. Zohar, “On bitcoin and red balloons,” in Proceedings of the 13th ACM conference on electronic commerce . ACM, 2012, pp. 56–73. [58] Y . Zolotavkin, J. Garc ´ıa, and C. Rudolph, “Incentive compatibility of pay per last n shares in bitcoin mining pools,” in International Conference on Decision and Game Theory for Security . Springer, 2017, pp. 21–39. [59] J. Teutsch, S. Jain, and P. Saxena, “When cryptocurrencies mine their own business,” in International Conference on Financial Cryptography and Data Security . Springer, 2016, pp. 499–514. [60] K. Liao and J. Katz, “Incentivizing blockchain forks via whale trans- actions,” in International Conference on Financial Cryptography and Data Security . Springer, 2017, pp. 264–279. [61] N. Houy, “It will cost you nothing to’kill’a proof-of-stake crypto- currency,” 2014. [62] B. Johnson, A. Laszka, J. Grossklags, M. Vasek, and T. Moore, “Game-theoretic analysis of ddos attacks against bitcoin mining pools,” inInternational Conference on Financial Cryptography and Data Security . Springer, 2014, pp. 72–86. [63] A. Laszka, B. Johnson, and J. Grossklags, “When bitcoin mining pools run dry,” in International Conference on Financial Cryptography and Data Security . Springer, 2015, pp. 63–77. [64] M. Nojoumian, A. Golchubian, L. Njilla, K. Kwiat, and C. Kamhoua, “Incentivizing blockchain miners to avoid dishonest mining strategies by a reputation-based paradigm,” in IEEE Computing Conference (CC). London, UK: IEEE , 2018. [65] D. Xu, L. Xiao, L. Sun, and M. Lei, “Game theoretic study on blockchain based secure edge networks.” [66] D. B. Rawat, L. Njilla, K. Kwiat, and C. Kamhoua, “ishare: Blockchain-based privacy-aware multi-agent information sharing games for cybersecurity,” in 2018 International Conference on Com- puting, Networking and Communications (ICNC) . IEEE, 2018, pp. 425–431. [67] J. Adler, R. Berryhill, A. Veneris, Z. Poulos, N. Veira, and A. Kas- tania, “Astraea: A decentralized blockchain oracle,” arXiv preprint arXiv:1808.00528 , 2018. [68] X. He, H. Dai, P. Ning, and R. Dutta, “Zero-determinant strategies for multi-player multi-action iterated games,” IEEE Signal Processing Letters , vol. 23, no. 3, pp. 311–315, 2016. [69] H. Zhang, D. Niyato, L. Song, T. Jiang, and Z. Han, “Zero-determinant strategy for resource sharing in wireless cooperations,” IEEE Transac- tions on wireless Communications , vol. 15, no. 3, pp. 2179–2192, 2016. [70] R. Laraki, “The splitting game and applications,” International Journal of Game Theory , vol. 30, no. 3, pp. 359–376, 2002. [71] C. Decker and R. Wattenhofer, “Information propagation in the bitcoin network,” in Peer-to-Peer Computing (P2P), 2013 IEEE Thirteenth International Conference on . IEEE, 2013, pp. 1–10. [72] N. Houy, “The economics of bitcoin transaction fees,” 2014. [73] P. R. Rizun, “A transaction fee market exists without a block size limit,” Block Size Limit Debate Working Paper , 2015. [74] M. M ¨oser and R. B ¨ohme, “Trends, tips, tolls: A longitudinal study of bitcoin transaction fees,” in International Conference on Financial Cryptography and Data Security . Springer, 2015, pp. 19–33. [75] M. Rosenfeld, “Analysis of bitcoin pooled mining reward systems,” arXiv preprint arXiv:1112.4980 , 2011. [76] D. Bradbury, “The problem with bitcoin,” Computer Fraud & Security , vol. 2013, no. 11, pp. 5–8, 2013. [77] S. Barber, X. Boyen, E. Shi, and E. Uzun, “Bitter to betterhow to make bitcoin a better currency,” in International Conference on Financial Cryptography and Data Security . Springer, 2012, pp. 399–414. [78] C. G. Akcora, Y . R. Gel, and M. Kantarcioglu, “Blockchain: A graph primer,” arXiv preprint arXiv:1708.08749 , 2017.[79] I. Bentov, A. Gabizon, and A. Mizrahi, “Cryptocurrencies without proof of work,” in International Conference on Financial Cryptography and Data Security . Springer, 2016, pp. 142–157. [80] M. Rosenfeld, “Analysis of hashrate-based double spending,” arXiv preprint arXiv:1402.2009 , 2014. [81] A. Shomer, “On the phase space of block-hiding strategies.” IACR Cryptology ePrint Archive , vol. 2014, p. 139, 2014. [82] L. Bahack, “Theoretical bitcoin attacks with less than half of the computational power (draft),” arXiv preprint arXiv:1312.7013 , 2013. [83] N. T. Courtois, “On the longest chain rule and programmed self- destruction of crypto currencies,” arXiv preprint arXiv:1405.0534 , 2014. [84] A. Kiayias, E. Koutsoupias, M. Kyropoulou, and Y . Tselekounis, “Blockchain mining games,” in Proceedings of the 2016 ACM Con- ference on Economics and Computation . ACM, 2016, pp. 365–382. [85] E. Anceaume, R. Ludinard, M. Potop-Butucaru, and F. Tronel, “Bitcoin a distributed shared register,” in International Symposium on Stabiliza- tion, Safety, and Security of Distributed Systems . Springer, 2017, pp. 456–468. [86] V . Buterin et al. , “A next-generation smart contract and decentralized application platform,” 2014, [Online]. https://github.com/ethereum/ wiki/wiki/White-Paper. [87] J. Bonneau, E. W. Felten, S. Goldfeder, J. A. Kroll, and A. Narayanan, “Why buy when you can rent? bribery attacks on bitcoin consensus,” 2016. [88] J. Becker, D. Breuker, T. Heide, J. Holler, H. P. Rauer, and R. B ¨ohme, “Can we afford integrity by proof-of-work? scenarios inspired by the bitcoin currency,” in The Economics of Information Security and Privacy . Springer, 2013, pp. 135–156. [89] “Blockr.io,” https://www.coinbase.com//, accessed September 5, 2018. [90] “Blockchain.info,” https://www.blockchain.com/explorer/, accessed September 5, 2018. [91] P. McCorry, A. Hicks, and S. Meiklejohn, “Smart contracts for bribing miners.” IACR Cryptology ePrint Archive , vol. 2018, p. 581, 2018. [92] S. King and S. Nadal, “Ppcoin: peer-to-peer crypto- currency with proof-of-stake (2012),” URL https://peercoin. net/assets/paper/peercoin-paper. pdf.[Online , 2017. [93] Z. Zheng, S. Xie, H. Dai, X. Chen, and H. Wang, “An overview of blockchain technology: Architecture, consensus, and future trends,” in Big Data (BigData Congress), 2017 IEEE International Congress on . IEEE, 2017, pp. 557–564. [94] Z. Li, J. Kang, R. Yu, D. Ye, Q. Deng, and Y . Zhang, “Consortium blockchain for secure energy trading in industrial internet of things,” IEEE Transactions on Industrial Informatics , 2017. [95] W. Armbruster and W. B ¨oge, “Bayesian game theory,” Game theory and related topics , vol. 17, p. 28, 1979. [96] M. Vasek, M. Thornton, and T. Moore, “Empirical analysis of denial- of-service attacks in the bitcoin ecosystem,” in International Confer- ence on Financial Cryptography and Data Security . Springer, 2014, pp. 57–71. [97] S. Underwood, “Blockchain beyond bitcoin,” Communications of the ACM , vol. 59, no. 11, pp. 15–17, 2016. [98] M. Crosby, P. Pattanayak, S. Verma, and V . Kalyanaraman, “Blockchain technology: Beyond bitcoin,” Applied Innovation , vol. 2, pp. 6–10, 2016. [99] A. Rutkowski, Y . Kadobayashi, I. Furey, D. Rajnovic, R. Martin, T. Takahashi, C. Schultz, G. Reid, G. Schudel, M. Hird et al. , “Cybex: The cybersecurity information exchange framework (x. 1500),” ACM SIGCOMM Computer Communication Review , vol. 40, no. 5, pp. 59– 64, 2010. [100] M. Walfish and A. J. Blumberg, “Verifying computations without reexecuting them,” Communications of the ACM , vol. 58, no. 2, pp. 74–84, 2015. [101] J. Peterson, J. Krug, M. Zoltu, A. K. Williams, and S. Alexander, “Augur: a decentralized oracle and prediction market platform,” 2018. [102] R. Pal, L. Golubchik, K. Psounis, and P. Hui, “Will cyber-insurance improve network security? a market analysis,” in INFOCOM, 2014 Proceedings IEEE . IEEE, 2014, pp. 235–243. [103] J. Chiu, T. Koeppl et al. , “Incentive compatibility on the blockchain,” Bank of Canada, Tech. Rep., 2018. [104] I. Tsabary and I. Eyal, “The gap game,” arXiv preprint arXiv:1805.05288 , 2018. [105] N. C. Luong, Z. Xiong, P. Wang, and D. Niyato, “Optimal auction for edge computing resource management in mobile blockchain networks: A deep learning approach,” in 2018 IEEE International Conference on Communications (ICC) . IEEE, 2018, pp. 1–6. 26 [106] Y . Jiao, P. Wang, D. Niyato, and K. Suankaewmanee, “Auction mecha- nisms in cloud/fog computing resource allocation for public blockchain networks,” arXiv preprint arXiv:1804.09961 , 2018. [107] J. Beccuti, C. Jaag et al. , “The bitcoin mining game: On the optimality of honesty in proof-of-work consensus mechanism,” Tech. Rep., 2017. [108] S. Azouvi, P. McCorry, and S. Meiklejohn, “Betting on blockchain consensus with fantomette,” arXiv preprint arXiv:1805.06786 , 2018. [109] C. Barrera and S. Hurder, “Blockchain upgrade as a coordination game,” 2018. [110] J. Abadi and M. Brunnermeier, “Blockchain economics,” mimeo Princeton University, Tech. Rep., 2018. [111] D. Stone, “Delayed blockchain protocols,” arXiv preprint arXiv:1804.06836 , 2018. [112] R. Pass and E. Shi, “Fruitchains: A fair blockchain,” in Proceedings of the ACM Symposium on Principles of Distributed Computing . ACM, 2017, pp. 315–324. [113] N. Houy, “The bitcoin mining game,” 2014. [114] R. Zhang and B. Preneel, “On the necessity of a prescribed block validity consensus: Analyzing bitcoin unlimited mining protocol,” inProceedings of the 13th International Conference on emerging Networking EXperiments and Technologies . ACM, 2017, pp. 108– 119. [115] D. Easley, M. O’Hara, and S. Basu, “From mining to markets: The evolution of bitcoin transaction fees,” 2017. [116] I. Abraham, D. Malkhi, K. Nayak, L. Ren, and A. Spiegelman, “Solidus: An incentive-compatible cryptocurrency based on permis- sionless byzantine consensus,” CoRR, abs/1612.02916 , 2016. [117] Y . Lewenberg, Y . Bachrach, Y . Sompolinsky, A. Zohar, and J. S. Rosenschein, “Bitcoin mining pools: A cooperative game theoretic analysis,” in Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems . International Foundation for Autonomous Agents and Multiagent Systems, 2015, pp. 919–927. [118] X. Liu, W. Wang, D. Niyato, N. Zhao, and P. Wang, “Evolutionary game for mining pool selection in blockchain networks,” IEEE Wireless Communications Letters , 2018. [119] L. Br ¨unjes, A. Kiayias, E. Koutsoupias, and A.-P. Stouka, “Reward sharing schemes for stake pools,” arXiv preprint arXiv:1807.11218 , 2018. [120] B. Fisch, R. Pass, and A. Shelat, “Socially optimal mining pools,” in International Conference on Web and Internet Economics . Springer, 2017, pp. 205–218. [121] R. Bellman, “On the theory of dynamic programming,” Proceedings of the National Academy of Sciences , vol. 38, no. 8, pp. 716–719, 1952. [122] B. Allaz and J.-L. Vila, “Cournot competition, forward markets and efficiency,” Journal of Economic theory , vol. 59, no. 1, pp. 1–16, 1993. [123] W. Vickrey, “Counterspeculation, auctions, and competitive sealed tenders,” The Journal of finance , vol. 16, no. 1, pp. 8–37, 1961. [124] R. B. Myerson, “Optimal auction design,” Mathematics of operations research , vol. 6, no. 1, pp. 58–73, 1981. [125] J. Lee, V . S. Mirrokni, V . Nagarajan, and M. Sviridenko, “Non- monotone submodular maximization under matroid and knapsack con- straints,” in Proceedings of the forty-first annual ACM symposium on Theory of computing . ACM, 2009, pp. 323–332. [126] J. W. Weibull, Evolutionary game theory . MIT press, 1997. [127] J. Hofbauer and K. Sigmund, “Evolutionary game dynamics,” Bulletin of the American Mathematical Society , vol. 40, no. 4, pp. 479–519, 2003. [128] J. Hofbauer, W. H. Sandholm et al. , “Stable games and their dynamics,” Journal of Economic theory , vol. 144, no. 4, p. 1665, 2009. [129] S. J. Brams and D. Wittman, “Nonmyopic equilibria in 2 2 games,” Conflict Management and Peace Science , vol. 6, no. 1, pp. 39–62, 1981. [130] S. Abramova, P. Sch ¨ottle, and R. B ¨ohme, “Mixing coins of different quality: A game-theoretic approach,” in International Conference on Financial Cryptography and Data Security . Springer, 2017, pp. 280– 297. [131] K. Malinova and A. Park, “Market design with blockchain technology,” 2017. [132] L. W. Cong and Z. He, “Blockchain disruption and smart contracts,” National Bureau of Economic Research, Tech. Rep., 2018. [133] A. Spiegelman, I. Keidar, and M. Tennenholtz, “Game of coins,” arXiv preprint arXiv:1805.08979 , 2018. [134] E. Pagnotta and A. Buraschi, “An equilibrium valuation of bitcoin and decentralized network assets,” 2018. [135] D. Monderer and L. S. Shapley, “Potential games,” Games and eco- nomic behavior , vol. 14, no. 1, pp. 124–143, 1996.[136] M. Bardi and I. Capuzzo-Dolcetta, Optimal control and viscosity solutions of Hamilton-Jacobi-Bellman equations . Springer Science & Business Media, 2008. [137] A. Ghosh, V . Aggarwal, and H. Wan, “Exchange of renewable energy among prosumers using blockchain with dynamic pricing,” arXiv preprint arXiv:1804.08184 , 2018. [138] S. Noor, W. Yang, M. Guo, K. H. van Dam, and X. Wang, “Energy demand side management within micro-grid networks enhanced by blockchain,” Applied Energy , vol. 228, pp. 1385–1398, 2018. [139] E. Mengelkamp, B. Notheisen, C. Beer, D. Dauer, and C. Weinhardt, “A blockchain-based smart grid: towards sustainable local energy markets,” Computer Science-Research and Development , vol. 33, no. 1-2, pp. 207–214, 2018. [140] J. Kang, R. Yu, X. Huang, S. Maharjan, Y . Zhang, and E. Hossain, “En- abling localized peer-to-peer electricity trading among plug-in hybrid electric vehicles using consortium blockchains,” IEEE Transactions on Industrial Informatics , vol. 13, no. 6, pp. 3154–3164, 2017. [141] J.-M. Lasry and P.-L. Lions, “Mean field games,” Japanese journal of mathematics , vol. 2, no. 1, pp. 229–260, 2007. [142] L. Bottou, “Stochastic gradient learning in neural networks,” Proceed- ings of Neuro-Nımes , vol. 91, no. 8, p. 12, 1991.
{ "id": "1902.10865" }
2104.05849
Reward Mechanism for Blockchains Using Evolutionary Game Theory
Blockchains have witnessed widespread adoption in the past decade in various fields. The growing demand makes their scalability and sustainability challenges more evident than ever. As a result, more and more blockchains have begun to adopt proof-of-stake (PoS) consensus protocols to address those challenges. One of the fundamental characteristics of any blockchain technology is its crypto-economics and incentives. Lately, each PoS blockchain has designed a unique reward mechanism, yet, many of them are prone to free-rider and nothing-at-stake problems. To better understand the ad-hoc design of reward mechanisms, in this paper, we develop a reward mechanism framework that could apply to many PoS blockchains. We formulate the block validation game wherein the rewards are distributed for validating the blocks correctly. Using evolutionary game theory, we analyze how the participants' behaviour could potentially evolve with the reward mechanism. Also, penalties are found to play a central role in maintaining the integrity of blockchains.
http://arxiv.org/pdf/2104.05849v2
Shashank Motepalli, Hans-Arno Jacobsen
cs.GT, cs.CE, cs.MA
cs.GT
Reward Mechanism for Blockchains Using Evolutionary Game Theory Shashank Motepalli, Hans-Arno Jacobsen Department of Electrical and Computer Engineering, University of Toronto shashank.motepalli@mail.utoronto.ca, jacobsen@eecg.toronto.edu Abstract —Blockchains have witnessed widespread adoption in the past decade in various fields. The growing demand makes their scalability and sustainability challenges more evident than ever. As a result, more and more blockchains have begun to adopt proof-of-stake (PoS) consensus protocols to address those chal- lenges. One of the fundamental characteristics of any blockchain technology is its crypto-economics and incentives. Lately, each PoS blockchain has designed a unique reward mechanism, yet, many of them are prone to free-rider and nothing-at-stake problems. To better understand the ad-hoc design of reward mechanisms, in this paper, we develop a reward mechanism framework that could apply to many PoS blockchains. We formulate the block validation game wherein the rewards are distributed for validating the blocks correctly. Using evolutionary game theory, we analyze how the participants’ behaviour could potentially evolve with the reward mechanism. Also, penalties are found to play a central role in maintaining the integrity of blockchains. Index Terms —Evolutionary game theory, blockchain, PoS, BFT, incentive mechanism I. I NTRODUCTION Bitcoin began the blockchain revolution by enabling a peer- to-peer version of electronic cash [1]. Over the past decade, Bitcoin grew as a digital reserve worth more than a trillion dollars [2]. Ethereum further extended these concepts to create programmable money using smart contracts [3]. This idea led to numerous applications [4], [5]. However, the increasing popularity has exposed the drawbacks of such systems, that is proof-of-work-based (PoW) systems do not scale [6], [7]. Furthermore, PoW raises concerns about its high carbon footprint [8]. Lately, more and more blockchains are migrating to proof-of-stake (PoS) protocols for state-replication while addressing scalability and sustainability challenges [9]–[11]. PoS systems employ validators for processing the transactions, similar to the miners in PoW systems. In the PoS system, the participants often lock their tokens to become validators. These validators participate in the consensus process to decide on the next state of the ledger. With each new block added, i.e., with every state transition, tokens are minted to reward the validators for processing the transactions. A validator can also increase their stake by buying the tokens traded in the secondary markets. Since the entire security in PoS systems relies on stake, the economics of tokens are more critical than ever.Each PoS blockchain tends to approach its reward mech- anism design in a unique way (see Table I). We designedly establish it as reward mechanism and not an incentive mech- anism because we define a reward as both, the sum of incentive andpenalty . Some PoS blockchains such as Polkadot and Cardano reward every registered validator irrespective of whether they contributed to the consensus process [15], [19]. Algorand goes even further to reward everyone who owns its tokens [12], [13]. Whereas, Avalanche, Cosmos, and Ethereum 2.0 only reward validators who participate in the consensus process [14], [16], [17]. In case everyone is rewarded equally, a validator can become a free rider enjoying the rewards without doing the work. Furthermore, blockchains differ a lot in terms of the reward they give. Most blockchains provide rewards proportional to the stake validators’ pledge. On the other hand, Ethereum 2.0 and Polkadot reward equally irrespective of the validators’ stake [17], [19]. As there is nothing at stake to lose in some designs, validators can act in ways that might affect the integrity of the ledger. Few blockchains introduced penalties to address the nothing at stake problem. However, there are stark differences among PoS systems regarding penalties. Ethereum 2.0 and Cosmos penalize (i.e., slash) even if the validator is not participating in the consensus protocol [16], [17]. Polkadot penalizes if and only if the validator signs conflicting transactions [19]. Whereas, Algorand, Avalance, and Cardano foresee no notions of penalty in their design. The problem this paper addresses is understanding the reward mechanism in PoS blockchains by proposing a unified framework. This problem is interesting because there are a plethora of contradicting approaches adopted by current blockchains. Since the reward mechanism is crucial to the integrity of PoS systems, it is critical to understand the impli- cations of reward mechanisms. The central idea we analyze is how to design rewards (i.e., payoffs) such that rational behaviour would promote honesty. To abstract, there are three questions to consider towards reward mechanism design in a PoS system. Firstly, should all validators be rewarded equally, even if they don’t contribute to consensus? Secondly, should penalities be imposed for integrity in blockchains? Thirdly, would honesty emerge as a stable state? In this paper, we use game theory to formulate block valida- tion as a game. Block validation is a necessary action for pro- gressing the blockchain. The validators reach a consensus by validating and voting on each proposed block and get rewarded This research has in part been funded by NSERC. 978-1-6654-3924-4/21/$31.00 ©2021 IEEEarXiv:2104.05849v2 [cs.GT] 8 Jul 2021 TABLE I: Reward mechanism in prominent PoS blockchains Reward every validator Proportional to stake Penalize not voting Penalize conflicting transactions References Algorand 3 3 7 7 [11]–[13] Avalance 7 7 7 7 [14] Cardano 3 7 7 7 [9], [15] Cosmos 7 7 3 3 [10], [16] Ethereum 2.0 7 3 3 3 [17], [18] Polkadot 3 3 7 3 [19] for their goodwill. It is a multiplayer game. The rewards for validators are not just dependent on individual strategy but also on what the majority votes. Assuming validators are rational, i.e., selfish, and want to maximize their payoff, our goal is to design rewards for the game such that voting on the honest strategy always remains rational. We begin with a simple reward matrix, adjust it to address free-riding and nothing- at-stake problems. Finally, we use evolutionary game theory to analyze long term impact of whether the honest strategy is a stable state. We ran simulations to confirm the same. The contributions of this paper are three-fold. (1) To the best of our knowledge, we are among the first to formulate the block validation game that can be applied on any PoS blockchain. (2) We are also among the first to analyze how validators change strategies in blockchains using evolutionary game theory. (3) We establish the need for penalties for the integrity of PoS blockchains. This paper is organized as follows. In Section II, we dis- cuss necessary background about PoS and evolutionary game theory. We review related work in Section III. In Section IV, we formalize the block validation game addressing the free- rider and nothing-at-stake problems. We derive the evolution- arily stable strategies (ESS) in Section V and experimentally confirm ESS in Section VI. Finally, we conclude with future directions in Section VII. II. B ACKGROUND A. Proof of Stake Proof of Stake is a state-replication mechanism designed for public blockchains wherein parties that might not trust the other need to reach consensus. The core of PoS relies on the simple idea that one would not devalue the assets one owns. Hence, the stakeholders accept the responsibility of maintaining the security of the PoS blockchain. In a PoS system, the stakeholders can stake their tokens to become validators on the network. The validators in PoS assume the role of miners in PoW systems by verifying the transactions and creating new blocks. PoS systems are still nascent and evolving. However, there are two broad categories of PoS concerning participation from validators: Probabilistic PoS: This is similar to Bitcoin’s Nakamoto consensus. Instead of deciding the block proposer propor- tional to computational power in Nakamoto consensus, a block proposer is selected based on its stake in the PoS system. The higher its stake, the higher is its probability of being selected in the random block comit process. After being selected, the block proposer proposes thenext block to be added on top of the previous block. Cardano [15] adopts this approach. BFT-based PoS: This is a weighted Byzantine fault- tolerant (BFT) consensus protocol wherein weights are proportional to the stake validators own. Each block requires a byzantine agreement for it to be appended on the blockchain. When the majority of validators vote, we reach finality on the given block. In BFT-based PoS systems, more validators need to participate in the con- sensus process. Examples of this implementation include Algorand [11], Cosmos [10]. There are many variants of PoS systems, and the above is not an exhaustive list. For instance, Ethereum 2.0 is adopting a hybrid of both probabilistic PoS and BFT-based PoS [18]. In this paper, we concentrate on BFT-based PoS protocols. Let us walk through a lifecycle of a generic transaction on a BFT-based PoS blockchain. A client generates a transaction and sends it to a validator who gossips the transaction to other validators. The validators verify and store valid transactions in their memory pool. When a validator is selected to become block proposer, it goes through its memory pool of valid transactions and accumulates a few of them to generate a block to broadcast to all other validators. The validators simulate the transactions in a block, verify their correctness, and sign their approval or disapproval for that block [20]. The block proposer collects signatures from all the validators. If a quorum confirms the validity of a block, we reach finality on the block. Since most BFT protocols tolerate up to one-third of its nodes to fail, the quorum size is set to two-thirds [10], [21]. B. Evolutionary Game Theory The origin of evolutionary game theory dates back to 1973 when John Maynard Smith and George R. Price formalized it to study the evolving populations for lifeforms in biology in their work, ”The logic of animal conflict” [22]. Though it started as a concept in evolutionary biology to explain the Darwinian evolution of species proving the survival of the fittest [23], the theories of evolutionary game theory were adopted by economists [24]–[26], psychologists [27]– [29], among others. In classical game theory, the success of a strategy depends on the strategy itself. In contrast, in evolutionary game theory, the game is played multiple times among numerous players. The success of an individual strategy depends not only on the strategy itself but also on the frequency distribution of alternative strategies and their successes. The fitness of a strategy in a population is the payoff received for choosing a strategy, given the population state, i.e., the frequency of each strategy [30]. In terms of the usual conventions of a game, the higher the payoff, the higher the fitness. Analogous to the Nash equilibrium in classical game theory, there is the evolutionarily stable state (ESS) in evolu- tionary game theory. A strategy is in ESS if it is unaffected by a small fraction of invading mutants that choose a different strategy [31], [32]. In other words, if for a sufficiently small mutant population, the fitness of the incumbent strategy is still higher than that of any of the strategies by mutants, the players stick to the incumbent strategy, making it an ESS. We use ESS to prove that our reward design for the blockchain network is stable. III. R ELATED WORK This work is closely related to two categories of related work. Firstly, the economics of PoS blockchains. Secondly, the applications of game theory and evolutionary game theory in blockchains. We reviewed the economics of existing PoS blockchains in Table I. A comprehensive survey summarizing numerous applica- tions of game theory to blockchains is provided by Liu et al. [33]. There is large interest in the game-theoretic anal- ysis of attacks such as selfish mining attacks [34], block withholding attacks [35], among others. Few recent works formalize evolutionary games for selection of mining pools and shards in PoW-based blockchains [36]–[38]. However, these works focus on PoW consensus protocols and have limited applicability to PoS systems. Our work also relates to reward design using game theory, studied for example in [39]–[41]. However, their focus re- mained on PoW single-shot games and not evolutionary ones. A data-sharing incentive model for smart contracts based on evolutionary game theory is proposed in [42]. Nevertheless, the reward design at the protocol layer is not analyzed. We are among the first to study reward mechanism in blockchains using evolutionary game theory. IV. T HEBLOCK VALIDATION GAME We employ game theory to model the strategic interactions among the validators in a blockchain network. A normal form gameG(N,Mi,Ui) has three key components: i) the players N, ii) the strategies, denoted by M, iii) the payoffs for all the potential strategies, denoted by U. We use payoff and reward interchangeably in this work. In our game, the validators v, in the validator set, verifying the blocks are the players, stated below asN. N=fvijvi2ValidatorSetg (1) These validators contribute to the consensus protocol by approving or disapproving the blocks proposed to be appended to the ledger. Each block Bicontains a set of transactions txk as follows. Bi=ftx0;tx1;tx2;:::tx ng (2) Every validator owns a local copy of the blockchain state generated from listening to blocks on the network. The valida- tors simulate the transactions on their local blockchain stateto verify their correctness. The correctness of a transaction depends on several factors including, but not limited to, the authentication of the sender’s signature, the balance on the sender’s account, verifying the sequence number of the accounts of the sender, and the logic of the smart contract. We define a valid block as follows. Definition 1. Valid Block. The block Biis valid if and only if every transaction in the block is correct. Ifcorrect (tx)provides the correctness of a transaction, a valid block is represented as follows. valid (Bi) =correct (tx0):::^correct (txn);8txk9Bi(3) The validators have two potential strategies. They can either act honestly or maliciously. An honest validator approves valid blocks and disapproves invalid blocks. Any actions that deviate from honest behaviour are considered malicious, including disapproving a valid block or approving a block that is not valid. If a validator does not participate in the consensus process, it is considered malicious behaviour. Malicious be- haviour accounts for all types of failures in the system, such as crash failures, network failures, and Byzantine failures. The validators’ strategies, where M, the set of strategies, is defined as follows. Here, handmrepresent honest and malicious strategies, respectively. M=fh;mg (4) By signing with their private key, validators respond to the proposer, stating whether they approve or reject the proposed block. A validator can at the most influence but cannot control the decisions of others. The validators could only pursue pure strategies, i.e., a validator can either act honestly or maliciously on a single block but not a combination of both. An individual validator has little or no influence on the final decision, as the final decision depends on the population state. The population state Xfor blockBiis the distribution of the strategies of the validator set in that block; it is given below. XBi=xh xm (5) wherexh0,xm0 andxh+xm= 1. In the following, we look into the reward matrix for this game. A. Universal Reward: The Basic Reward Matrix The rewards play a crucial role in directing validators’ strategies. We assume all the validators are rational, i.e., they are selfish and play to maximize their rewards. Our goal is to design rewards such that the best response for a rational validator would be acting honestly. A validator’s reward is not just dependent on its strategy. The rewards also depends on how other validators act, i.e., the population state. Each validator decides individually, knowing very little about the others’ strategies. BFT consensus protocols require a quorum Q, at least two-thirds of the validator set N, to reach a consensus. The quorum is a subset of the validator set as follows. QBmN;jQBmj2 3jNj (6) We assume that every round terminates with a decision on a block, either by reaching an honest quorum or a malicious quorum. In other words, we assume to reach a two-thirds quorum for each block. If x0:67, thenXBkandX0 Bkare the population states, for honest and malicious quora, respectively. XBk=x 1x ;X0 Bk=1x x x0:67 (7) In case we do not achieve a consensus, the system proposes a nil block after a timeout. A nil block is an empty block, leading to no approved transactions and no rewards to anyone in that consensus round. Though BFT protocols assume an honest majority, we do not want to rule out the possibility of a malicious majority, given the high stakes involved. Malicious behaviour could be subtle to be labelled by the system.For instance, if a few validators form a cartel and choose to censor transactions by certain entities; this behaviour is not malicious according to BFT consensus. Even in the cases of hard forks to adopt new rules is subjective and does not constitute malicious behaviour. In this paper, we limit our discussion about what constitutes a Byzantine transaction in the specified network and assume an altruistic quorum as a basis for designing rewards in the system. In other words, we reward anyone who adheres with a two-thirds majority, and we consider anyone who digresses from it as Byzantine. Every block provides rewards to all the validators for contributing to the consensus. The security and integrity of the blockchain network de- pends on the liveness of validators and the availability of data. The validators incur an expense ein terms of net- work, computation, and storage resources for verifying blocks. The blockchain system provides incentives to reward honest behaviour and meet desired security. The incentive iis an aggregate sum of transaction fees on each transaction txof that block and the block rewards R. The users pay transaction fees for processing their transactions. The blockchain system provides the block rewards for generating new blocks. The effective reward rfor reaching a consensus on the next block Bmfor a validator viis the difference between incentive iand costc. Here,Nis the size of the validator set. Since PoS and BFT protocols are not computationally expensive operations, we assume the costs eto be lower, when compared to PoW mining. The incentive iis given as follows. iBm=NX 0fees(txi) +R Bm(8) The reward is the difference between incentive and expense for running the node, it is stated below. rBm(vi) =i N Bme (9) Theorem 1. The reward has to be positive for the network to be secured.TABLE II: Universal Reward Case: The Reward Matrix Quorum Validatorhonest malicious honest r r malicious r+e’ r+b Proof. If the expense incurred is negative, it means that running the validator incurs an expense without any incentive. Since validators are rational, they would choose to maximize their reward by not participating in the consensus process. If the majority of honest validators act rational, the security of the system is compromised. For the system to be secured, the incentive should be greater than the expense. In other words, rewards should be positive, rBm0. Some validators might exhibit malicious behaviour such as double-spending to gain benefits, often much higher than the rewards. Let the benefit gained by the malicious cartel of validators be B. It is fair to assume that some malicious validators might be more beneficial than others. Let the reward for Byzantine behaviour be represented by b, where 0bB. Each validator selects their strategy for every block. The reward for the validator is dependent on the strategy chosen by the quorum (see Table II). The reward matrix Uis stated in Equation 10. If the validator acts honest in an honest quorum, it earns an effective reward of r. If the validator acts malicious in an honest quorum, it reaps a reward of r+e’, where 0 e’ecould be the cost saved by not running the validator. In the case of a malicious quorum, an honest and malicious validator would be making randr+b, respectively. In case of malicious behaviour in the malicious quorum, the reward could ber+b+e’. Because we assume the Byzantine reward to be generally higher than the cost, be’, we considered it asr+bin the reward matrix. U=r r r+e’r+b (10) Analysis. A validator receives a maximum reward when it leads a malicious cartel. Acting maliciously always has better incentives than acting honestly, so a rational validator would choose the no-regret strategy to act maliciously. This could lead to a malicious quorum, hence, a security concern. A rational validator chooses the sure-win case of maximizing their reward by eby not participating in consensus, as they do not incur computational expenses. B. Reward For Work: Addressing Free-Riding As seen in the previous section, malicious behaviour is an optimal strategy for a rational validator. This behaviour results in cartels or worse, never leads to reaching a quorum. The validators would be rewarded more ( r+e) even without validating as long as they are in the validator set. This behaviour is a classical case of the free-rider problem wherein the validators earn ”something for nothing” [43]. If more honest validators act rationally, the security of the blockchain network is compromised. To overcome this challenge, only the TABLE III: Reward For Work Case: The Reward Matrix addressing Free Rider Problem Quorum Validatorhonest malicious honest r -e malicious -e‘ r+b validators who participate in consensus should earn incentives. In other words, the validators who do not participate in the consensus process should not earn incentives. The reward function is updated to incentivize only those who are in the quorum as follows. rBm(vi) =( (i N`)Bme ifvi2Q 0 ifvi=2Q(11) Here,N`is the size of the quorum. It ranges from two- thirds to cardinality of the validator set. Let e`be the cost for malicious behaviour, which is equal to eif it participates and 0, otherwise. The reward matrix is updated to reward only those who worked (see Table III). With an honest quorum, a validator choosing an honest strategy would earn an effective reward r, whereas a validator choosing a malicious strategy would result in a maximum of zero payoffs if it saves on computational resources. However, if you act honestly in the malicious quorum, you incur an expense ewithout any reward. A malicious validator that forms the malicious quorum earns the reward ofr+b. The updated reward matrix is given below. U=re e`r+b (12) Analysis. The updated reward matrix ensures that a ra- tional validator would participate in the consensus process. They continue to act honestly, assuming an honest quorum. However, if the malicious majority takes over the quorum, an honest validator would not earn incentives while incurring operational expenses. The best response for a rational validator would be signing all the blocks irrespective of whether they are valid or not. C. Penalty Case: Addressing Nothing at Stake Rational validators being selfish agents to maximize their reward, approve all the blocks irrespective of whether the blocks are valid or not. This behaviour guarantees to reward them for every block that gets appended onto the blockchain. Though this is not a serious threat if only a few validators do it. However, if malicious players build a quorum, this would be a security threat to the system. It affects the social welfare of the system. It could easily lead to a situation wherein we might have conflicting forks of the ledger, leading to multiple ledger states. Consider a scenario where a malicious validator double spends to create multiple versions of the truth. If the malicious validator is selected as a block proposer, as shown in Fig. 1, it could propose two different blocks from the same parent block. The malicious validator could double-spend by broadcasting blocks that have conflicting transactions. As discussed, therational validators would approve both the blocks to be in the quorum to increase their reward. If we reach a quorum of rational validators, we would have both blocks reaching quorum. Both these chains could grow indefinitely in parallel. The fork resolution strategies such as the longest chain rule [1] or GHOST protocol [44] cannot resolve which fork is the valid fork, leading to multiple sources of truth. Since the equilibrium for a validator is to act rationally, this is a security threat. We need to re-design the reward mechanism to avoid this practice. Fig. 1: Forked chains, where attacker double spends after Block 1 Our goal is to ensure that rational behaviour is acting honestly. We need to punish the validators that deviate from the honest strategy. One option could be not paying the future incentives for validators that diverge from acting honestly for the nextnblocks, where nis a fixed number. It could also be jailing the validator from the validator set. Another option is imposing a penalty for diverging from the honest quorum. We borrow from Behavioural Economics to improve the integrity of the system. Kahneman and Tversky concluded that ”losses loom larger than gains” while explaining the concepts of Loss aversion in Prospect Theory [45], [46]. They conducted numerous experiments to prove that people when presented with alternatives, go for choices that either lead to sure wins or avoid losses. Theory of Loss Aversion concluded that the pain of losing has a much stronger psychological impact than the pleasure of gaining the same amount. Few studies have further proved that participants are also willing to behave dishonestly to avoid a loss than to make a gain [47]. The loss aversion experiments explain why penalties are more effective than incentives in motivating people to behave in a certain way [48]. We use the same principles to motivate validators to participate honestly instead of being malicious validators in the network. To address nothing at stake, we penalize validators that deviate from the honest quorum. Let pbe the penalty for deviating from the quorum, where p >0. The stake lost in penalty is designed to be much greater than the incentive received for being in the quorum. The loss to the stake also reduces the chances of becoming a validator in the future. The TABLE IV: Penalty Case: The Reward Matrix addressing Nothing at Stake Quorum Validatorhonest malicious honest r -p malicious - p r+b updated reward function for a validator viis given below. rBm(vi) =( (i N`)Bme ifvi2Q p if vi=2Q(13) The updated matrix is given below (see Table IV). Acting honestly in an honest quorum gives reward rwhile acting maliciously in a honest quorum leads to a penalty of e` +p, sincep >> e, we ignore e. In the rare event of malicious majority, acting honestly would result in penalty p. If a validator is acting maliciously in a malicious majority, it earns a rewardr+bdepending on its role in the malicious cartel. U= rp pr+b (14) Analysis. Given the reward matrix, the validators are better off by acting honestly in an honest quorum than acting maliciously in a malicious quorum. However, under the core assumption of any blockchain network of the majortity of the network being honest, the best response for a rational validator is to act honestly. V. E VOLUTIONARILY STABLE STRATEGY In the previous section, we designed the payoffs using classical game theory that studies one-shot games where the players make rational choices evaluating probable outcomes. Their outcomes were not just dependent on their strategy but also on the population state of the network. Under the assumption of an honest quorum in the penalty case, we proved that a rational validator’s best response would be to act honestly under the no-regret strategy. Unlike classical one- shot games , the same set of validators play the game multiple times, once for each block consensus round, heading towards a potential shift in their strategy in the following rounds. Malicious validators could form cartels to persuade the rational validators, who are acting honestly, to alter their strategy over the next few blocks. To study how the population state is evolving as the blockchain progresses and confirm if acting honestly is a stable state, we apply evolutionary game theory to our setting. We study evolutionarily stable strategies (ESS), a strategy that cannot be invaded by other strategies. We can determine ESS by a simple experiment. Assume all the validators choose a particular strategy. In other words, the whole population of validators is either honest or malicious. If a small number of mutants deviate from the incumbent strategy, we analyze whether these minority mutants have a better or worse payoff than that of the incumbent strategy. If they do have a better payoff, the incumbent validators would eventually shift to a mutant strategy. If the mutant strategy performs worse, no mutants would invade the incumbent strategy making the incumbent strategy is an ESS [49].1) Everyone is honest: Consider the case where all valida- tors are honest ( h), then the incumbent strategy is given as follows: XBh=1 0 (15) Let us now examine whether validators being honest is an ESS. When all the validators are honest, if a small percentage of a mutant population invade the network, the incumbent validators continue remaining honest, we consider the honest strategy as ESS. We can tolerate up to one-third of the total validators as being mutants, acting maliciously. The population state with mutants is X0 Bh. X0 Bh=1  0:33 (16) The fitnessFis the payoff for choosing a particular strategy, given the population state X0 Bh. The fitness of the incumbent strategy, honest , isF(h), and the fitness of the mutant strategy, malicious , isF(m). We analyze the fitness for the three cases: Universal reward case: F(h) =randF(m) =r,F(h) = F(m)andF(m)>0. Reward for work case: F(h) =randF(m) =e, F(h)>F(m)andF(m) = 0 Penalty case :F(h) =randF(m) =p,F(h)>F(m) andF(m)<0 If the fitness of the incumbent’s strategy is greater than that of the mutant’s strategy, the incumbents won’t alter their strategy. This makes the incumbent’s strategy an ESS. In the universal reward case, we have a mixed ESS since both the strategies have equal fitness; this situation could lead to a potential shift over time. In the other cases, being honest is ESS. Though the incumbent’s honest strategy is ESS in both cases. Here, the penalty case has a strong ESS, because according to the theory of loss aversion, penalizing is more powerful in influencing the decision than not gaining incentives. 2) Everyone is malicious: We consider the case where all the validators choose being malicious as their incumbent strat- egy. Similar to the previous situation of an honest population, we can prove that everyone being malicious would remain malicious and the malicious strategy is an ESS. In the universal reward case, we have no pure ESS. Both the strategies of being honest and malicious can be invaded by others. For the rest of the cases, we have two ESS, either honest or malicious populations, subject to the relative values of the incentives, benefits and penalties. Theorem 2. The security of a PoS blockchain system depends on the population state during the genesis. Proof. Let us consider the penalty case. With decent penalties, both honest and malicious strategies are ESSs in this game because neither can be invaded by the other. The strategy that dominates over time is the one that starts in the majority. If honest validators start the network, the honest strategy would be incumbent and the system will remain in ESS. (a) Universal reward case, the malicious minority takes over (b) Without penalties, honest strategy can tolerate 10% malicious (c) Without penalties, the malicious minor- ity takes over, starting with one-third (d) If penalty is 50% of their total stake (e) If penalty is 100% of their total stake (f) 51% honest and 49% malicious would lead to malicous ESS Fig. 2: Experiments to study evolutionarily stable states Similarly, if malicious validators start the network, the network is malicious. The malicious strategy would be the incumbent strategy and will remain in ESS. Hence, the population state of the genesis of the network plays a crucial role for PoS blockchains. VI. E XPERIMENTAL EVALUATION We performed experimental evaluation to confirm whether penalties are important and what percentage of malicious population can PoS system tolerate. Our methodology was to learn how the population state proportions evolve over the gen- erations, the block rounds, using the GameBug software [50]. The defaults for the relation between variables and the baseline value of the validator, used in our experimental simulations, are given in Table V. If the expense is x, the reward is taken as10x. The default Byzantine benefit and penalty are choosen as100xfor a validator with a baseline balance of 1000x. TABLE V: Simulation variables and relative values Variable Symbol Value expense e x reward r 10x Bynzantine benefit b 100x penalty p 100x We ran experiments for the reward matrix of the universal reward case (Table II) and the reward for work case (Table III) with the assumption of more than 90% of the validators are honest. We observe that the malicious strategy takes over when everyone on the network is rewarded (see Fig. 2a). Blue and red signify the proportions of validators with honest and mali- cious strategies, respectively. The X-axis tracks the population proportions, and the Y-axis tracks the generations, i.e., block rounds. In the no-penalty case, the honest strategy is an ESS, unaffected by invading mutants (see Fig. 2b). However, we do not have honest ESS with malicious population above 10%. We also ran simulations by relaxing the initial proportions at the quorum size of consensus. In other words, the initial proportions of honest and malicious validators are two-thirds and one-third, respectively. For the reward matrix in the reward Fig. 3: With penalties, honest strategy is ESS, can tolerate one-third malicious for work case (Table III), the proportion of honest drops significantly over the generations, within 75 block rounds (see Fig. 2c). Though the honest strategy is ESS, it takes longer to reach ESS with a high initial proportion of malicious valida- tors. Over generations, the validators would favor a malicious strategy because of high Byzantine benefit if the network starts with a one-third proportion of malicious validators. For the reward matrix in the penalty case (Table IV), the honest strategy is an ESS since validators do not shift from the incumbent strategy (see Fig. 3). High penalties play a crucial role in this behaviour, we run a few experiments to verify the same. We observe that the higher the penalties, the sooner the entire network becomes honest. We increased the penalties to be 50% and 100% of the the baseline to plot Fig. 2d and Fig. 2e, respectively. We observe that with higher penalties, we reach the state of only honest population quickly. For the penalty case, we tried a 51% honest majority with default values, we do not observe an honest ESS. The network cannot tolerate 51% malicious behaviour (see Fig. 2f). VII. C ONCLUSIONS We formulated the block validation game and designed rewards to address free riders and nothing at stake challenges. Using evolutionary game theory, we proved the importance of penalties in maintaining the integrity of the ledger. In the future, we intend to extend this work to asynchronous environments and also analyze how the game adapts when the delegation of stake is allowed. REFERENCES [1] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” Manubot, Tech. Rep., 2019. [2] J. Pound, “Bitcoin hits $1 trillion in market value as cryptocurrency surge continues,” CNBC , Feb 2021. [Online]. Available: https://www.cnbc.com/2021/02/19/bitcoin-hits-1-trillion-in- market-value-as-cryptocurrency-surge-continues.html [3] G. Wood et al. , “Ethereum: A secure decentralised generalised trans- action ledger,” Ethereum project yellow paper , vol. 151, no. 2014, pp. 1–32, 2014. [4] H. Adams, N. Zinsmeister, M. Salem, R. Keefer, and D. Robinson, “Uniswap v3 core,” 2021. [5] J. Mejeris, E. Au, Y . Cai, H.-A. Jacobsen, S. Motepalli, R. Sun, A. Veneris, G. Zhang, and S. Zhang, “Blockchain for v2x: A taxonomy ofdesign use cases and system requirements,” in 2021 3rd Conf. on Blockchain Research and Applicat. for Innovative Networks and Services (BRAINS) , 2021. [6] K. Mentzer and M. Gough, “The impact of cryptokitties on the ethereum blockchain,” in 2018 Annual Conf. (47th) , 2018, p. 191. [7] E. Kokoris-Kogias, P. Jovanovic, L. Gasser, N. Gailly, E. Syta, and B. Ford, “Omniledger: A secure, scale-out, decentralized ledger via sharding,” in 2018 IEEE Symposium on Security and Privacy (SP) . IEEE, 2018, pp. 583–598. [8] C. Stoll, L. Klaaßen, and U. Gallersd ¨orfer, “The carbon footprint of bitcoin,” Joule , vol. 3, no. 7, pp. 1647–1661, 2019. [9] A. Kiayias, A. Russell, B. David, and R. Oliynykov, “Ouroboros: A provably secure proof-of-stake blockchain protocol,” in Annual Int. Cryptology Conf. Springer, 2017, pp. 357–388. [10] J. Kwon, “Tendermint: Consensus without mining,” Draft v. 0.6, fall , vol. 1, no. 11, 2014. [11] Y . Gilad, R. Hemo, S. Micali, G. Vlachos, and N. Zeldovich, “Algorand: Scaling byzantine agreements for cryptocurrencies,” in Proceedings of the 26th Symposium on Operating Systems Principles , 2017, pp. 51–68. [12] Algorand FAQ. Algorand Foundation. Accessed: 2021-03-18. [Online]. Available: https://algorand.foundation/faq [13] M. Fooladgar, M. H. Manshaei, M. Jadliwala, and M. A. Rahman, “On incentive compatible role-based reward distribution in algorand,” in 2020 50th Annual IEEE/IFIP Int. Conf. on Dependable Systems and Networks (DSN) . IEEE, 2020, pp. 452–463. [14] S. Buttolph, A. Moin, K. Sekniqi, and E. G. Sirer. (2020) Avalanche Native Token ($A V AX) Dynamics. Ava Labs. Accessed: 2021-03-18. [Online]. Available: https://files.avalabs.org/papers/token.pdf [15] B. David, P. Ga ˇzi, A. Kiayias, and A. Russell, “Ouroboros praos: An adaptively-secure, semi-synchronous proof-of-stake blockchain,” in Annual Int. Conf. on the Theory and Applications of Cryptographic Techniques . Springer, 2018, pp. 66–98. [16] C. Unchained. (2018) Cosmos Validator Economics — Bridging the Economic System of Old into the New Age of Blockchains. Cosmos Blog. Accessed: 2021-03-18. [Online]. Available: ”https://blog.cosmos.network/economics-of-proof-of- stake-bridging-the-economic-system-of-old-into-the-new-age-of- blockchains-3f17824e91db” [17] J. Beck. (2020) Rewards and Penalties on Ethereum 2.0 [Phase 0]. ConsenSys. Accessed: 2021-03-18. [Online]. Available: https://consensys.net/blog/codefi/rewards-and-penalties-on- ethereum-20-phase-0/ [18] Proof of Stake FAQs. Ethereum Wiki. Accessed: 2021-03-18. [Online]. Available: https://eth.wiki/en/concepts/proof-of-stake-faqs [19] Staking. Polkadot wiki. Accessed: 2021-03-18. [Online]. Available: https://wiki.polkadot.network/docs/en/learn-staking [20] J. A. Chacko, R. Mayer, and H.-A. Jacobsen, “Why do my blockchain transactions fail? a study of hyperledger fabric,” in Proceedings of the 2021 Int. Conf. on Management of Data , 2021, pp. 221–234. [21] G. Zhang and H.-A. Jacobsen, “Prosecutor: An Efficient BFT Con- sensus Algorithm with Behavior-aware Penalization Against Byzantine Attacks,” in Middleware ’21: 22st ACM/IFIP Int. Middleware Conf. , 2021. [22] J. M. Smith and G. R. Price, “The logic of animal conflict,” Nature , vol. 246, no. 5427, pp. 15–18, 1973. [23] T. L. Vincent and J. S. Brown, Evolutionary game theory, natural selection, and Darwinian dynamics . Cambridge University Press, 2005. [24] D. Friedman, “On economic applications of evolutionary game theory,” Journal of evolutionary economics , vol. 8, no. 1, pp. 15–43, 1998.[25] U. Witt, “What is specific about evolutionary economics?” in Rethinking Economic Evolution . Edward Elgar Publishing, 2016. [26] G. J. Mailath, “Do people play nash equilibrium? lessons from evolu- tionary game theory,” Journal of Economic Literature , vol. 36, no. 3, pp. 1347–1374, 1998. [27] D. Buss, Evolutionary psychology: The new science of the mind . Psychology Press, 2015. [28] K. N. Laland, G. Brown, and G. R. Brown, Sense and nonsense: Evolutionary perspectives on human behaviour . Oxford University Press, 2011. [29] J. Tooby and L. Cosmides, “Conceptual foundations of evolutionary psychology.” 2005. [30] D. Easley, J. Kleinberg et al. ,Networks, crowds, and markets . Cam- bridge university press Cambridge, 2010, vol. 8. [31] J. M. Smith et al. , “Evolution and the theory of games,” American scientist , vol. 64, no. 1, pp. 41–45, 1976. [32] C. Cowden, “Game theory, evolutionary stable strategies and the evo- lution of biological interactions,” Nature Education Knowledge , vol. 3, no. 6, 2012. [33] Z. Liu, N. C. Luong, W. Wang, D. Niyato, P. Wang, Y .-C. Liang, and D. I. Kim, “A survey on applications of game theory in blockchain,” arXiv preprint arXiv:1902.10865 , 2019. [34] S. Zhang, K. Zhang, and B. Kemme, “Analysing the benefit of selfish mining with multiple players,” in 2020 IEEE Int. Conf. on Blockchain (Blockchain) . IEEE, 2020, pp. 36–44. [35] J. A. Kroll, I. C. Davey, and E. W. Felten, “The economics of bitcoin mining, or bitcoin in the presence of adversaries,” in Proceedings of WEIS , vol. 2013, 2013, p. 11. [36] X. Liu, W. Wang, D. Niyato, N. Zhao, and P. Wang, “Evolutionary game for mining pool selection in blockchain networks,” IEEE Wireless Communications Letters , vol. 7, no. 5, pp. 760–763, 2018. [37] Z. Ni, W. Wang, D. I. Kim, P. Wang, and D. Niyato, “Evolutionary game for consensus provision in permissionless blockchain networks with shards,” in ICC 2019-2019 IEEE Int. Conf. on Communications (ICC) . IEEE, 2019, pp. 1–6. [38] S. Kim and S.-G. Hahn, “Mining pool manipulation in blockchain network over evolutionary block withholding attack,” IEEE Access , vol. 7, pp. 144 230–144 244, 2019. [39] K. Iyer and C. Dannen, “Crypto-economics and game theory,” in Building Games with Ethereum Smart Contracts . Springer, 2018, pp. 129–141. [40] Z. Chang, W. Guo, X. Guo, Z. Zhou, and T. Ristaniemi, “Incentive mechanism for edge-computing-based blockchain,” IEEE Transactions on Industrial Informatics , vol. 16, no. 11, pp. 7105–7114, 2020. [41] J. Chiu and T. Koeppl, “Incentive compatibility on the blockchain,” in Social Design . Springer, 2019, pp. 323–335. [42] S. Xuan, L. Zheng, I. Chung, W. Wang, D. Man, X. Du, W. Yang, and M. Guizani, “An incentive mechanism for data sharing based on blockchain with smart contracts,” Computers & Electrical Engineering , vol. 83, p. 106587, 2020. [43] J. Li, G. Liang, and T. Liu, “A novel multi-link integrated factor algorithm considering node trust degree for blockchain-based communi- cation.” KSII Transactions on Internet & Inform. Systems , vol. 11, no. 8, 2017. [44] Y . Sompolinsky and A. Zohar, “Secure high-rate transaction processing in bitcoin,” in Int. Conf. on Financial Cryptography and Data Security . Springer, 2015, pp. 507–527. [45] A. Tversky and D. Kahneman, “Prospect theory: An analysis of decision under risk,” Econometrica , vol. 47, no. 2, pp. 263–291, 1979. [46] ——, “Loss aversion in riskless choice: A reference-dependent model,” The quarterly journal of economics , vol. 106, no. 4, pp. 1039–1061, 1991. [47] S. Pfattheicher and S. Schindler, “Misperceiving bullshit as profound is associated with favorable views of cruz, rubio, trump and conservatism,” PloS one , vol. 11, no. 4, p. e0153419, 2016. [48] S. G ¨achter, H. Orzen, E. Renner, and C. Starmer, “Are experimental economists prone to framing effects? a natural field experiment,” Journal of Economic Behavior & Organization , vol. 70, no. 3, pp. 443–446, 2009. [49] J. M. Smith, Evolution and the Theory of Games . Cambridge university press, 1982. [50] R. Wyttenbach, “Gamebug software,” 2011. [Online]. Available: http://hoylab.cornell.edu/download.html
{ "id": "2104.05849" }
2106.11446
Bitcoin's Crypto Flow Network
How crypto flows among Bitcoin users is an important question for understanding the structure and dynamics of the cryptoasset at a global scale. We compiled all the blockchain data of Bitcoin from its genesis to the year 2020, identified users from anonymous addresses of wallets, and constructed monthly snapshots of networks by focusing on regular users as big players. We apply the methods of bow-tie structure and Hodge decomposition in order to locate the users in the upstream, downstream, and core of the entire crypto flow. Additionally, we reveal principal components hidden in the flow by using non-negative matrix factorization, which we interpret as a probabilistic model. We show that the model is equivalent to a probabilistic latent semantic analysis in natural language processing, enabling us to estimate the number of such hidden components. Moreover, we find that the bow-tie structure and the principal components are quite stable among those big players. This study can be a solid basis on which one can further investigate the temporal change of crypto flow, entry and exit of big players, and so forth.
http://arxiv.org/pdf/2106.11446v2
Yoshi Fujiwara, Rubaiyat Islam
q-fin.GN, cs.CR
q-fin.GN
arXiv:2106.11446v2 [q-fin.GN] 6 Jul 2021Bitcoin’s Crypto Flow Network Yoshi Fujiwara1and Rubaiyat Islam1 1Graduate School of Information Science, University of Hyog o, Kobe 650-0047, Japan E-mail: yoshi.fujiwara@gmail.com (Received May 31, 2021) How crypto flows among Bitcoin users is an important question for understanding the structure and dynamics of the cryptoasset at a global scale. We compiled al l the blockchain data of Bitcoin from its genesis to the year 2020, identified users from anonymous addresses of wallets, and constructed monthly snapshots of networks by focusing on regular users a s big players. We apply the methods of bow-tie structure and Hodge decomposition in order to locat e the users in the upstream, downstream, and core of the entire crypto flow. Additionally, we reveal pr incipal components hidden in the flow by using non-negative matrix factorization, which we inter prete as a probabilistic model. We show that the model is equivalent to a probabilistic latent seman tic analysis in natural language processing, enabling us to estimate the number of such hidden components . Moreover, we find that the bow-tie structure and the principal components are quite stable amo ng those big players. This study can be a solid basis on which one can further investigate the tempora l change of crypto flow, entry and exit of big players, and so forth. Presented at the conference “Blockchain in Kyoto 2021”, and forthcoming in the JPS Conference Proceedings. KEYWORDS: Bitcoin, cryptoasset, bow-tie structure, Hodge decomposi tion, non-negative matrix factorization, latent Dirichet allocation, comple x network 1. Introduction Cryptoasset or cryptocurrency is essentially a digital led ger to record transactions between cred- itors and debtors, just like money. The digital system is bas ed on a collection of non-centralized ledgers, called blockchain, which contains all the histori cal record of transactions among anonymous users. Today there are many cryptoassets being exchanged in markets with fiat currencies and also with each other. The market capitalization is so huge in tota l ranging from one to a few trillion USD, and highly volatile potentially having a big impact even on a sset markets and prices of non-crypto at a global scale. In this paper, we study Bitcoin, the largest one dominating n early half of the market capitalization at the time of writing. We attempt to understand the flow of cry pto as a complex network comprising of the users as nodes and the crypto flow as links. There are a nu mber of studies from such a viewpoint of complex network on cryptoassets. See [1–16] for example, and references therein. Specifically, in this paper, we focus on “big players” who are defined as persistently appearing users, likely to be involved in transactions of high frequen cies and large amounts, and address the following questions. First, it is important to identify the users in the upstream, downstream, or core in the entire crypto flow. We shall examine the so-called “bow-t ie” structure of the network of those big players to classify the location of the crypto flow based on th e binary relationship of links. Second, we measure the location in a more quantitative way by using the i nformation of flow along the links in the combinatorial method of Hodge decomposition. Third questi on is to extract “principal components” hidden in the entire crypto flow so as to uncover a certain numb er of latent factors or components. 1 Fourth, because the network is changing in time, what can one say about the stability of the crypto flow? In Section 2, we describe our dataset of Bitcoin to identify t he anonymous addresses representing wallets into users. Then we define regular users as big player s and construct networks. In Section 3.1, we perform the bow-tie analysis to locate users in the stream of crypto flow. In Section 3.2, we use the method of Hodge decomposition to quantify the location of us ers. In Section 3.3, we introduce non- negative matrix factorization as a method of matrix decompo sition to reveal principal components hidden in the flow. We shall show in Section 3.4 that the method can be interpreted as a probabilistic model, from which one can estimate the number of components. In Section 3.5, we find about a dozen of principal components among several hundred big players, and show that the temporal change of the network is quite stable. In Section 4, we discuss about se veral aspects, being worth further investi- gation, and conclude in Section 5. We add Appendix A for the id entities (actual names, business, and so forth) of selected users. Appendix B illustrates the netw orks in adjacency matrices. Appendix C briefly summarizes the above mentioned probabilistic model in relation to latent Dirichlet allocation, from which the estimation on the number of components is done in Appendix D. 2. Data We employ the dataset of all transactions recorded in the Bit coin blockchain from the genesis block (first block issued on January 9, 2009) until the block o f height 63,299 (inclusive; issued on June 4, 2020). Each transaction is a transfer of a certain amo unt of BTC (monetary unit of Bitcoin) from one or more addresses to others as we will see shortly. We call such a transfer of BTC as crypto flow. An address is something like a wallet possessed by a user who can be an individual or, more frequently today, an agent in the business of exchanges, ser vices, gambling, and so forth. In the dataset, total number of transactions was 1.38 billio n, while the number of di fferent ad- dresses was about 657 million. To study crypto flow of Bitcoin , one needs to know users, rather than the addresses. However, it is not straightforward to identi fy users from addresses because of the very nature of anonymity inherent in the core technology of block chain. See [17] for technical details. Let us employ a simple but useful method to identify users fro m addresses to construct a giant graph comprising of nodes as users and edges as crypto flow. We shall see that more than 60% of the addresses can be identified with users. Additionally we will see that a number of users can be revealed with their actual names, types of business, and sometimes ge ographical location at a global scale. Then we define regular users as big players in order to focus on a subgraph comprising of frequently appearing users who are involved in crypto flow with huge amou nts of BTC. The subgraph will be studied in the subsequent sections. 2.1 Identification of Users from Addresses Consider an example of such a transaction (TX) that one day Al ice transferred 1 BTC to Bob: TX1:{a1,a2}→{ a123,a1}, (1) where the addresses a1anda2belong to Alice, while a123belongs to Bob. Alice needs more than one address as input of TX 1, because a single one was not su fficient to fulfill the amount of 1 BTC. Output of TX 1includes a1representing the change. Another day, Alice did another tra nsaction: TX2:{a1,a3}→{ a45,a3}, (2) where the address a3also belongs to Alice. Obviously, multiple addresses, if an d only if they appear in an input of a transaction, belong to the same user, namely h er wallets. As a consequence from both of (1) and (2), it follows that a1,a2,a3can be identified to belong to the same user. Note that a2and 2 Fig. 1. Rank-size plot for the number of addresses identified with us ers. Size (horizontal) is the number of addresses identified with users of type A (a group of addresse s appearing in multiple inputs of transactions, so identified as user; see main text). Rank (vertical) is the des cending order of the size. Maximum size is nearly 20 million, while minimum is 2 and average is 6.7. a3did not appear in any record of transactions, TX 1and TX 2. By looking at all the transaction in the history, one can identify many addresses with users. This simple but useful method to identify users from address es was proposed by [1] and has been extensively used in the literature (see [4, 5] and the data of [18, 19], for example). We implemented an efficient algorithm of this method to process the above mentione d 657 million addresses in the 1.375 billion transactions. We found that 402 million addre sses (more than 60%) can be identified to obtain 60 million di fferent users (denoted as type A ). The rest of 255 million addresses, which never appeared as multiple inputs in any transactions, are r egarded as different users ( type B ). This procedure results in 315 million users all together. Fig. 1 shows a rank-size plot, in which the size is the number o f addresses identified with users of type A, and the rank is its descending order. The minimum si ze is 2 by construction, while the average is 6.7. It is interesting to observe that the rank-si ze plot is highly skewed with the maxi- mum size being nearly 20 million! We labeled all the users of t ype A in a sequential user ID cor- responding to the rank (e.g. 0000012345 ), while users of type B is labeled with its address (e.g. 3CjqmbuRA1LEWmLHiWoSWHcWuTEVPfU24P ). A bunch of transactions is packed into a block in the blockcha in. Each block has a timestamp of its birth, which is UTC (Coordinated Universal Time) when the block was mined or born as an empty ledger to be filled with transactions. We associate the time with the transactions contained in the block. Each block is mined in a mean time of 20 minutes or lo nger, as is well known, so it should be understood that by time we mean a rough estimate on when the transaction was made within an accuracy of an hour or so. One can use this information of the t imestamp to obtain the intra-day activities of users. Fig. 2 is a schematic diagram for typica l three users, presumably located in Asia, Europe including Africa, and USA. Moreover, with the help of laborious investigation by [19], it is possible to unravel the identity of users of type A with actual names, types of business, and so metimes geographical location for many users. Appendix A is the summary of the unraveled identi ty. Table A·1 gives the classification of business into exchanges, gambling, pools, services and o thers. Nearly one third in the list are exchanges. Table A·2 is the list of countries of those exchan ges, where China, UK, and USA are 3 Fig. 2. Schematic diagram for the intra-day activities of users. To p is a world map with UTC (Coordinated Universal Time). The bottom three plots depict the number of transactions involving three users. Each plot shows the numbers of transactions of out-flow (green), in-flo w (blue), self-loop (magenta), and their total (bold red), where each number is accumulated during the year 2019. Out-flow, in-flow, and self-loop are respectively the transaction in which the user is its source, destination , and both of them simultaneously. A peak of the red line shows the most active time, corresponding to the daytim e of USA, Europe, and Asia (left to right). Arrows indicate noon of specific locations. dominant, followed by Canada, Australia, Brazil, Singapor e, and Russia. In fact, as found in the top of Table A·3, the user ID 0000000000 corresponding to the maximum size in Fig. 1 is actually Bit-x.com andXapo.com , the former of which is an agent of exchange in South Africa. Exchanges are a typical category of “big players” in the sens e that they actually hold a huge number of individuals and agents as customers resulting in a large number of transfers. As a matter of fact, the daily number of transfers has an interesting wee kly pattern. There is significantly less activity in weekends than in weekdays as found in recent data of Bitcoin1(see our previous study [21,22]). Such a weekly pattern implies that those institut ional agents are dominant in the entire flow of crypto. 2.2 Crypto Flow Network Now all the transactions among addresses are converted into transfers from users to users, each of which has the following information: •user of source s, •user of destination d, •amount of Bitcoin transferred from stod, i.e. s→d, •UTC time of transfer (from the block containing the transact ion). During a certain period of time T, for a pair of users, there can be more than one transfer as depicted in Fig. 3 (see the left-hand side). In this example, there are three transfer of crypto for i→j, one for j→i, and also two for i→i. The last case of self-loop is possible, because one can rece ive a change in a transaction, and also because di fferent addresses are possibly identified with a user, like 1Cryptoasset of XRP has a similar weekly pattern according to [20]. In the early history of Bitcoin, the weekly pattern was quite the opposite; more active in weekends, presumably because individuals were big players at that time. 4 i j0.1 0.2 0.4 0.11 2i jfij= 0.7 gij= 3 fji= 0.1 gji= 1 fii= 3 gii= 2Aggregated Fig. 3. Aggregation of transactions to construct crypto flow networ k.Left: During a given period of time, for a pair of users iand j, three transfers for i→jwith 0.1, 0.2, 0.4 in BTC, one of j→iwith 0.1, and two fori→iwith 1 and 2. Right : After aggregation, one has i→jwith frequency fi j=3 and amount of flow gi j=0.7. Similarly, j→iwith fji=1 and amount of flow gji=0.1, and i→iwith fii=2 and gii=3. an exchange. Given a time-scale T, it would be reasonable to aggregate these transactions as s hown in the right-hand side of Fig. 3. After the aggregation, one has a network comprising of nodes as users and edges with direction given by the transfer of crypto, frequency and amount of tran sfer occurred during the period of time. Let us denote the following variables which represent the st rength or weight of each edge by frequency fi j≡frequency of transfers for i→j, amount of flow gi j≡amount of total transfers for i→j. Regarding the time-scale Tfor aggregating the transactions and the epoch to select in t he histor- ical data, we choose one month and the calendar year of 2019. B y examining the time-series for the daily number and amount of transactions, we assumed that the period of one month is adequate to study the stability and temporal change of the crypto flow. Sh orter period may lead to a trivial result for the stability and could be insu fficient to detect the temporal change, if any change is present . Also longer period would be misleading due to non-equilibrium na ture of the system. The year 2019 was chosen as the epoch, in which one does not see violent bubble o r crush in the price. The number of all the users is huge, 315 million users in total . Fortunately, however, it is not necessary to include all of them, because most of them do not a ppear frequently. In the next section, we shall extract only a tiny part of the network by focusing on the “regular users” who appeared everyday during the specified period. 2.3 Regular Users as Big Players For our purpose in this paper, it is su fficient to focus on the crypto flow with high frequency and big amount of Bitcoin, because infrequent and /or small amount of flows is obviously unimportant for the understanding the entire flow. In other words, it su ffices to focus on “big players” who are playing some dominant role in the game of crypto flow. It would be possible to define such a big player in different ways. In this study, we define it by looking at how persis tently the user appears in transactions during our specified period of time. Fig. 4 depicts examples of users who appear in di fferent numbers of transactions on daily basis. The user of the top case is persistent in committing transact ions with other users, which can be labeled as a “regular user”. The middle case changes the persistency from being inactive with no transaction with anyone else to being active in an abrupt way. The bottom c ase has little activity, just a few transactions on particular days having a strong intermitte ncy. We define regular users as those appearing everyday during the period of one year in 2 019, and use them as big players. The number of regular users was 479. T hen we construct a subgraph in each month, which is comprised of the regular users as nodes and th e crypto flow as links, the latter of which are aggregated as described in Fig. 3. Thus we have 12 sn apshots of such subgraphs, each 5 Fig. 4. Illustrative examples for the activities of users. Each plo t depicts the daily number of transactions, in each of which the user is either source or destination of th e transaction for the period of year 2019. Self- loops (case of the same source and destination) are excluded . Top is a “regular” user appearing every day. The middle user became active from being inactive, while the bot tom one has intermittency in its activity. We focus on regular users in this paper. Fig. 5. Activities of regular users, defined by each user’s peak of tr ansactions, in UTC. Shaded region corre- sponds to the daytime of Asia, Europe, and USA (left to right) . corresponding to each month in the year, from January to Dece mber. Summarizing the processing of the whole dataset, we constructed the snapshots of networks denoted by Gt=(Vt,Et), where tis the month, Vtis the set of regular users, Etis the set of links among them, each having the frequency and amount as depicted in Fig. 3. We add Fig. 5 showing the histogram for the UTC time of highest activities of all the regular 6 users in the year of 2019. This information gives geographic al locations of those regular users. 3. Analysis of Crypto Flow Network 3.1 Basic Properties of Network For each month t, we constructed a network denoted by Gt=(Vt,Et) as described in the preceding section. Table I is the summary of basic properties of the net works in the year 2019. Vtcorresponds to the regular users in each month, the number of which is show n by the column|Vt|. The column |Et|is the number of edges, namely the number of di fferent crypto flow from one user to another or to itself (self-loops as shown in parentheses). Most of the u sers have self-loops. Temporal change of the network causes the changes of VtandEt. The column of|Vt∩Vt+1|is the number of users that are common to successive months in their appearance. One can see that most of the users are appearing successively. The same is true for the edges as shown in the co lumn of|Et∩Et+1|. In other words, the network is not changing drastically in terms of the entry and exit of nodes and edges during the time-scale of months. Table I. Summary of basic properties of the networks in the year 2019, January to December. t|Vt| | Et| | Vt∩Vt+1| |Et∩Et+1|GWCC GSCC/IN/OUT/TE 01 470 17,215(408) 468 13,313 468(3) 327 /24/113/4 02 470 16,658(407) 468 13,357 468(3) 322 /20/120/6 03 473 17,618(408) 471 13,942 470(4) 327 /25/113/5 04 473 17,691(415) 470 13,960 469(5) 336 /16/115/2 05 472 17,903(416) 471 14,012 468(5) 330 /23/112/3 06 471 17,787(412) 469 13,705 467(5) 318 /23/124/2 07 472 17,292(410) 468 13,108 470(3) 333 /21/110/6 08 468 16,534(402) 467 12,628 466(3) 321 /18/123/4 09 470 16,288(407) 468 12,652 466(5) 325 /23/113/5 10 469 16,317(402) 468 12,476 467(3) 322 /21/119/5 11 470 15,859(409) 466 12,080 468(3) 324 /23/116/5 12 466 15,584(390) — — 466(1) 323 /18/120/5 Each column represents the following. t=month of the year 2019 |Vt|=number of nodes |Et|=number of edges (number of self-loops in parentheses) |Vt∩Vt+1|=number of nodes common to successive months |Et∩Et+1|=number of edges common to successive months GWCC=number of nodes in giant weakly connected component (number of components in parentheses) GSCC/IN/OUT/TE=number of nodes in giant strongly connected component /IN/OUT/tendrills We found that most of the users have self-loops, as shown in th e parentheses of column |Et|, with the frequencies fiiand the amounts giibeing highly correlated with the number of addresses identified in the preceding Section 2.1 as naturally expecte d. Because our main interest in this paper is the crypto flow from one user to another, we remove all the se lf-loops in what follows. Adjacent matrices with the strength of links given by the fre quencies fi jofGtfor all t’s are illustrated in Appendix B. One can see that the overall pictu re does not change in time, but the illustration does not help to uncover the nature of connecti vity and flow. To see the connectivity of network, namely how those regular users are linked among them and also how they are located in the stream of cypto flow, let us exa mine the property of connected com- 7 Fig. 6. Temporal change of bow-tie structure in an alluvial diagram . Monthly data of networks in the year 2019, January to December (from left to right). Vertical bla ck segments in each month show the nodes of corresponding network grouped into GSCC (giant strongly co nnected component), IN, OUT, and TE (tendrills) in the bow-tie structure. Horizontal bands represent trans itions among such groups from one month to its successive one. ponents. First, decompose Gtinto weakly connected components (WCC), i.e. connected com ponents when regarded as an undirected graph. We found that there exi sts a giant WCC (GWCC) containing most of the users. See the column GWCC of Table I. There was onl y a small number of disconnected components as shown in the same column. Then, in order to identify the location of users contained in the GWCC, we employed the well- known analysis of “bow-tie” structure [23]. In general, GWC C can be decomposed into the following parts: GSCC Giant strongly connected component: the largest connected component when viewed as a directed graph. One or more directed paths exist for an arbit rary pair of firms in the component. INThe nodes from which the GSCC is reached via at least one direc ted path. OUT The nodes that are reachable from the GSCC via at least one dir ected path. TE“Tendrils”; the rest of the GWCC. It follows that GWCC=GSCC+IN+OUT+TE (3) GSCC is the core of the crypto flow’s circulation. The IN and OU T parts are upstream and down- stream of the flow respectively. The users in the part of IN are playing a role of suppliers of crypto, while the OUT users are considered to be consumers of crypto. Table I shows the bow-tie structure in the column of GSCC /IN/OUT/TE. For example, in Septem- ber, 470 users are located into GSCC (325 users), IN (23), OUT (113), and TE (5). One can observe that a large fraction of the users in the GWCC is located in the GSCC, as one can easily interpret this fact in the way that those regular users are circulating cryp to globally. There are a less fraction of the users in IN and OUT with asymmetry in the numbers. It would be interesting to see how the individual users are lo cated in the temporal change of the network. Fig. 6 depicts such a diagram of temporal change fro m one month to its successive one in the whole year. One can see that the groups of GSCC, IN, and OUT are very stable in each membership of users. This fact means that those users appearing in succe ssive months are playing stable roles in the crypto flow’s circulation and the location of upstream an d downstream. We remark that analysis 8 of bow-tie structure is based on the binary links, namely eit her presence or absence among the nodes, but not on the strength of links such as frequency and amount o f crypto flow. In the next section, we shall see how to quantify the location of users by using the so -called Hodge decomposition. 3.2 Hodge Decomposition Helmholtz-Hodge-Kodaira decomposition, or simply Hodge d ecomposition, is a combinatorial method to decompose flow on a network into circulation and gra dient flow. Original idea dates back to the Helmholtz theorem in vector analysis, which states th at under appropriate conditions any vector field can be uniquely represented by the sum of an irrotationa l or rotation-free (curl-free) vector field and a divergence-free (solenoidal) vector field. The theore m can be generalized from Euclidean space to graph and other entity as shown by Hodge, Kodaira and other s. See [24–26] for readable exposition. The method has a wide range of applications in the studies suc h as neural network [27], economic networks [28, 29], and also our previous work on Bitcoin and [ 30]. We recapitulate the method briefly for the present manuscrip t to be self-contained. Let Ai jdenote the adjacency matrix: Ai j=1 if there is a link of transfer from user itoj, 0 otherwise.(4) We excluded all the self-loops, implying that Aii=0. Each link has a flow, denoted by ˜Fi j, either of the frequency, fi j, or the amount, gi j, of the transfer from itoj(see Fig. 3). Define ˜Fi j=fi jorgi jifAi j=1, 0 otherwise .(5) Note that there can be a pair of users such that Ai j=Aji=1 and ˜Fi j,˜Fji>0. Let us define a “net flow” Fi jby Fi j=˜Fi j−˜Fji (6) and a “net weight” wi jby wi j=Ai j+Aji. (7) Note that wi jis symmetric, i.e., wi j=wji, and non-negative, i.e., wi j≥0 for any pair of iandj2. Hodge decomposition is given by Fi j=F(c) i j+F(g) i j, (8) where the circular flow F(c) i jsatisfies/summationdisplay jF(c) i j=0, (9) which implies that the circular flow is divergence-free. The gradient flow F(g) i jcan be expressed as F(g) i j=wi j(φi−φj). (10) Thus the weight wi jserves to make the gradient flow possible only where a link exi sts. We refer to the quantityφias the Hodge potential . Large value ofφiimplies that the user iis in the upstream of the entire network, while small values implies iis in the downstream. 2It is remarked that (7) is simply a convention to consider the effect of mutual links between iandj. One could multiply (7) by 0.5 or an arbitrary positive number, which does not cha nge the result significantly for a large network. 9 0 5 10 15 20 25 -2 -1 0 1 2Frequency Hodge potentialGSCC IN OUT Fig. 7. Distributions for Hodge potentials of the users in GSCC (bla ck), IN (blue), and OUT (red). The average of all the potential values is set to be zero (vertica l dotted line). Data: 2019-09. Combine (8), (9), and (10), one can derive the following equa tion to determineφi. /summationdisplay jLi jφj=/summationdisplay jFi j, (11) fori=1,..., N. Here, Li jis the so-called graph Laplacian and defined by Li j=δi j/summationdisplay kwik−wi j, (12) whereδi jis the Kronecker delta. It is easy to show that the matrix L=(Li j) has only one zero mode (eigenvector with zero eigenvalue). The presence of this zero mode simply correspo nds to the arbitrariness in the origin of φ. All the other eigenvalues are positive (see, e.g., [30]). Th erefore, (11) can be solved for the potentials by fixing the potentials’ origin. We assume that the average v alue ofφis zero. Fig. 7 depicts the distributions for Hodge potentials of the users in GSCC, IN, and OUT. One can see that the entire set of distributions is bimodal having tw o peaks at positive and negative values, while there are a number of values around zero. Obviously, th ey correspond to IN, OUT, and GSCC, each being located in the upstream, downstream, and core of t he entire crypto flow. Moreover, there exists a correlation between the value of the Hodge potentia l and the net amount of demand or supply of crypto by each user. See [30] for details, where we studied a daily snapshot of the network including all the users, not only big players. We claim that the same pro perty holds also for the monthly data restricted to big players of regular users. 3.3 Non-negative Matrix Factorization It would be a natural question whether there are distinctive ingredients of flows in the crypto flow or not. The analysis of bow-tie structure is based merely on t he binary relationship of links, so does not give such information, because the crypto flows from upst ream to downstream with circulation in the giant strongly connected component that occupies a larg e fraction of the entire network. In other 10 words, are there any “principal components” that constitut e the entire flow in a decomposition? In order to find such principal components or latent factors in t he transfer of crypto among big players, we shall apply non-negative matrix factorization (NMF) to the strength of links, namely the matrix of the frequencies and amounts of transfer. We recapitulate th e method here. See [31–33] and references therein for introduction. LetXbe an N×Mnon-negative matrix, in general, to start with; that is, its elements are all non-negative, denoted as X≥0. NMF gives an approximation of Xby a product of two matrices: X≈S D, (13) where S,DareN×KandK×Mnon-negative matrices, S,D≥0, respectively3. In practice, one expects that Kis much smaller than NandMso that the factorization gives a compact representation ofX. We shall assume that N=Mfor our application of crypto flow among Nusers in what follows. Explicitly in components, (13) reads Xsd≈K/summationdisplay k=1SskDkd, (14) where the indices sanddrepresent source and destination ( s,d=1,..., N) respectively, and Xsdis the strength of crypto flow, quantified by frequency fsd, amount gsd, or similar variables, from stod in a certain period of time. We choose Xsd=fsd, (15) in this paper. See Fig. B·1 in Appendix B for the illustration ofXsd. We would expect that K≪N, because of the sparsity of X. How to determine Kis discussed later. The approximation in (13) is actually given by the following optimization: min S,D≥0F(X,S D), (16) where the function F(·,·) is the so-called Kullback-Leibler (KL) divergence defined by F(A,B)=KL(A/bardblB)≡/summationdisplay i,j/parenleftigg Ai jlogAi j Bi j−Ai j+Bi j/parenrightigg . (17) Note that F(A,B)=0 if and only if A=B. The reason why we choose the particular function of (17) will be clarified later4. Technically, one can solve (16) iteratively with the initi alization of S,D using non-negative double singular value decomposition (s ee the review [32] and references therein). Although the iterative algorithm yields local minima, our n umerical solutions under di fferent random seeds gave essentially the same decomposition. To understand the meaning of the decomposition, let us consi der how a source distributes flow to different destinations. For an arbitrary source s, (14) can be written as Xs≈K/summationdisplay k=1SskDk, (18) whereXsis the vector of s-th row of X, andDkis the vector of k-th row of D. Equation (18) means that the flow from the source scan be expanded in terms of “basis” vectors, Dk(k=1,..., K). The 3The decomposition is not unique due to trivial degrees of fre edom. One is permutation, S D=Sππ−1D, whereπis a permutation matrix simply exchanging indices. Another is scale transformation, S D=Sσσ−1D, whereσis a diagonal matrix with all elements positive. We shall see that these de grees are fixed after appropriate normalization and orderin g. 4See Section 3.4 for a probabilistic interpretation of choos ing the KL divergence. Another functional form, often used, is the so-called Frobenius norm: F(A,B)=(1/2)/summationtext i,j(Ai j−Bi j)2, which leads to a di fferent probabilistic model. 11 components (Dk)d=Dkdrepresent how destinations are distributed among users in the k-th NMF component. It is convenient to normalize Dkby L1-norm, that is, by defining /tildewideDkd≡Dkd Dkwhere Dk≡/summationdisplay dDkd, (19) so that one has /summationdisplay d/tildewideDkd=1, (20) for all k. With respect to this normalized basis vectors, the expansi on in (18) is rewritten as Xs≈K/summationdisplay k=1(SskDk)/tildewideDkwhere ( /tildewideDk)d=/tildewideDkd, (21) Thus the outgoing flow from the source sis approximately expressed by a linear combination of K normalized basis vectors /tildewideDkwith coefficients given by SskDk. Similarly, consider how a destination dcollects flow from di fferent sources. For an arbitrary destination d, (14) reads Xd≈K/summationdisplay k=1DkdSk, (22) whereXdis the vector of d-th column of X, andSkis the vector of k-th column of S. The components of (Sk)s=Sskrepresent how sources are distributed among users in this k-th NMF component. Define /tildewideSsk≡Ssk Skwhere Sk≡/summationdisplay sSsk, (23) and one has /summationdisplay s/tildewideSsk=1, (24) for all k. Then (22) is rewritten as Xd≈K/summationdisplay k=1(DkdSk)/tildewideSkwhere ( /tildewideSk)s=/tildewideSsk. (25) Thus the incoming flow to the destination dis approximately expressed by a linear combination of K normalized basis vectors /tildewideSkwith coefficients given by DkdSk. How can one determine K? Obviously, the larger Kis, the better the approximation (13) is, but with less parsimonious representation of the data. In the ne xt section, let us make a detour to examine this issue from a di fferent perspective. 3.4 NMF as a probabilistic model We can interpret the NMF as a probabilistic model. Denote the right-hand of (14) by ξsd≡/summationdisplay kSskDkd, (26) which are regarded as parameters to be estimated from the dat aXsuch that Xsdis assumed to be a random number chosen from a Poisson distribution with the pa rameterξsdas P(x|ξ)=e−ξξx x!. (27) 12 It is easy to see that the log likelihood function L(ξsd)≡logP(Xsd|ξsd) takes the maximum value at ξsd=Xsd. Then one can introduce a quantity to measure how much the est imation of the parameters is good, that is/summationdisplay s,d(L(Xsd)−L(ξsd))=/summationdisplay s,d/parenleftigg XsdlogXsd ξsd−Xsd+ξsd/parenrightigg , (28) to be minimized . One can see that this quantity is equivalent to the KL diverg ence in (17)5. To express the entire framework in probabilistic terms more explicitly, let us normalize the data Xin (15) by /tildewideXsd=Xsd/summationtext s′,d′Xs′d′. (29) Then let us rewrite (14) as /tildewideXsd≈/summationdisplay krk/tildewideSsk/tildewideDkd, (30) where/tildewideDkdand/tildewideSskwere given by (19) and (23) respectively, and rk≡SkDk/summationtext k′Sk′Dk′, (31) which satisfies that/summationtext krk=1. Let us denote the right-hand side of (30) by psd≡/summationdisplay krk/tildewideSsk/tildewideDkd, (32) which satisfies that/summationtext s,dpsd=1. We remark that the normalized weight rkdefined by (31) gives the information of relative importance of the k-th NMF component in the expansion with normalized basis vectors in (32). One can determine the ordering of NMF c omponents uniquely according to the magnitudes of rk. Suppose that there are Nftransfers in total during a period of time. For each pair of so urce and destination, sandd, generate a transfer s→dwith the probability given by psd, being independently of other pairs. Under the assumption of a small probability o fpsdand a large number of Nf,Xsd follows a Poisson distribution with the parameter, ξsd=Nfpsd. It turns out that the decomposition in (26), or equivalently (32), has an interesting connection with machine learning. In natural language processing, it i s often necessary to extract topics among documents comprising of words or terms. In a situation of uns upervised learning, the task is to infer topics as hidden or latent variables, which can explain a col lection of documents, each being an unordered set of terms. Probabilistic latent semantic anal ysis (PLSA) is a probabilistic model for doing such a task [36]. Suppose that there are Ndocuments and Mterms. Then the occurrence of terms can be expressed by a document-term matrix Xwith size N×M, each element of which is the frequency of occurrence of a term in a document. Topics are la tent variables to explain the data X. A topic is actually a probability distribution for the occurr ence of terms with di fferent probabilities. A document can have a mixture of topics. An example is a documen t on “influence of hosting Olympics to economy” with a mixture of topics on sports and economy. One of the widely used model of PLSA is latent Dirichlet alloc ation (LDA). See Appendix C and references therein. For our purpose, it su ffices to understand how terms are generated at locations of documents in a probabilistic way. The probability that a ter m is chosen at a location in a document is given by the sum of Kfactors, each of which is the product of two probabilities; t he probability that 5We became aware that this argument is known in the literature . If one assumes Gaussian instead of Poisson, one would have Frobenius norm for KL divergence in (17). See [34]. One o f the present authors (YF) learned a hint on the argument from Itsuki Noda in his application of NMF to transportation data [35]. 13 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50Measure (to be minimized) #ComponentsCaoJuan (2009) Arun (2010) Deveaud (2014) (a) Comparison of three methods [38–40] 0 5 10 15 20 25 30 35 40 45 0 10 20 30 40 50LDA score (in arbitray units) #Components99% interval avgerage (20 simulations) (b) Monte Carlo simulations by the method [39] Fig. 8. Determining K, the number of NMF components, by using the concept of cohere nce in LDA. (a) Dif- ferent methods [38–40] are compared. Each measure of cohere nce is drawn in the vertical axis so that it is to be minimized to find the optimal number of components. Maximu m and minimum values in the region of K are scaled to 1 and 0 respectively to make the comparison easi er. One can see that K=11∼13 are optimal. (b) Monte Carlo simulations by the method [39] with 20 runs fo r each K. Averages (points) and 99% level (gray band, narrow) calculated from standard errors are dra wn. We conclude that K=13 is optimal from this result (b). a topic is selected in the document and the one that the term is chosen under the selected topic. See the equation of (C·11) in Appendix C. One can immediately see that (C·11) is essentially the same as (26), or equivalently (32). Thus the matrix decomposition of NMF can be put in the framewo rk of probabilistic model of PLSA and LDA. As a bonus, one can adopt the method of estimatin g the number of topics to our problem of determining the number of NMF components, denote d by Kin both cases. Interested readers are guided to look at the literature [37–40] and othe rs given at the end of Appendix C. Let us take a look at our results in the next section finishing the det our of this section. 3.5 Result of NMF for Crypto Flow We first show a few results for a snapshot of September in the ye ar 2019 (denoted as 2019- 09), in order to verify if the idea in the preceding section wo rks to determine the number of NMF components. Fig. 8 shows the measures of coherence by employ ing three different methods of LDA [38–40]. The methods give mostly the same optimal values of K, namely K=11∼13, consistently as shown in Fig. 8 (a). We found that the measure given in [39] i s relatively stable and potentially useful to determine a specific value of K. So we performed Monte Carlo simulations in Fig. 8 (b), and were able to determine the optimal value as K=13. For this data, Xhas the dimension of N=470, so we conclude that one can have a small number of NMF componen ts that can explain the entire flow among those regular users. In Appendix D, we summarize the same result for the data in all the other months of the year 2019. We found that the optimal number Kis quite small in the range more than 10 and less than 20, much smaller than the number of users, N∼500 (see Table I). Additionally, Kis relatively stable irrespectively of the temporal change. See Table D·1 and Fig . D·1. Let us examine each NMF components obtained with the optimal value of K. Fig. 9 and Fig. 10 show the NMF components in terms of the basis vectors, /tildewideDkand/tildewideSk, respectively for k=1,..., K. In Fig. 9, each plot shows the vector components of ( /tildewideDk)d=Dkdmeaning how destinations are distributed among users din the k-th NMF component. Similarly in Fig. 10, each plot shows the 14 vector components of ( /tildewideSk)s=Sskmeaning how sources are distributed among users sin the k- th NMF component. See (19) and (23), and also note the normali zation therein. Note that in each of Fig. 9 and Fig. 10, the plots are ordered (from top to bottom) i n the descending order of the probability rkgiven in (31). One can immediately notice from the figures that the componen ts of these basis vectors are con- centrated on a limited number of users, but are not distribut ed among many users. To quantify the effective number of the concentration, let us use the inverse He rfindahl-Hirschman index, abbrevi- ated as IHH, which is defined as follows. Consider “shares” xi≥0 among i=1,..., Nthings with the sum equal to 1, i.e./summationtext ixi=1. The IHH is defined by IHH≡N/summationdisplay i=1x2 i−1 . (33) When the shares are equal, xi=1/Nfor all i, then IHH=N. On the other hand, when there is the strongest concentration, namely, xi=1 for a particular iandxi=0 otherwise, then IHH =1. So IHH can give an estimate of the e ffective number of large shares6. The idea can be applied to the basis vectors, because the vectors are normalized in the sam e way as shares. In Fig. 9 and Fig. 10, we displayed all the calculated IHH’s. One can see that the IHH’ s are quite small ranging from a few to a dozen or so, compared with the total number of users N=470 for the data 2019-09 (see Table I). How can we use the NMF components to understand the crypto flow ? Choose a particular user s as a source s. The flow from swas approximately expressed by a linear combination of Knormalized basis vectors /tildewideDk, each depicted in Fig. 9, with the coe fficients given in (21), i.e. SskDk. The coeffi- cients represent the strength of the decomposed flow from the source s. A similar argument holds by choosing a particular user das a destination. The flow to dwas expressed by a linear combination in (25) with the coefficients, DkdSk. For example, consider the user with ID 0000000000 that is located in the GSCC, as a source s. Fig. 11 shows the coe fficients corresponding to Kcomponents; see (a). One can see that the coe ffi- cients are non-zero at only four components. Such a sparsene ss tells that the flow from this user can be expressed with a few components. And the corresponding co mponents have non-zero values at a small number (recall the IHH’s) of the vector components, Dkd, as shown in Fig. 9, implying that the users corresponding to these non-zero components constitu te a cluster for the outgoing flow from the source s. The same user0000000000 can be regarded as a destination din the GSCC. Fig. 11 (b) shows the coefficients, again non-zeros at only one or two components. Toget her with Fig. 10, one can find another cluster composed of a small number of users for th e incoming flow to the d. Similar arguments hold for the users 0000006178 and0000000012 , respectively located in the IN and OUT. See Fig. 11 (c) and (d). In this way, one can find clusters for ei ther of or both of the outgoing and incoming flows of each user. Each NMF component can be represented by a matrix, because th e non-negative matrix of Xsd or its probabilistic counter part psdcan be expressed by (18) or (32). It is possible to depict each component kby the matrix of /tildewideSsk/tildewideDkdin the normalized way. Fig. 12 and Fig. 13 illustrate such matrices for the data of 2019-09. This should be compared wit hXsdin Appendix B. One can see that the NMF components provide sparse matrices. Finally, we find that the NMF components are relatively stabl e in the temporal change of network. Fig. 14 (a) shows the result for cosine similarities of the NM F basis vectors Dkfor the two successive months of 2019-09 and 2019-10. Fig. 14 (b) shows the result fo rSkfor the same data. In either of these results, one can see that the NMF components are quite s imilar except only a few permutation of indices. 6It is remarked that the paper [20] in this volume also applied but modifies Herfindahl-Hirschman index in an interesting way to characterize the frequencies of transactions in XRP. 15 0 0.25 0 100 200 300 400Destination (user index) k= 1: Prob=27.3%, IHH= 5 0k= 2: Prob=13.8%, IHH=35 0 0.25 k= 3: Prob= 9.3%, IHH=10 0 0.25k= 4: Prob= 8.9%, IHH= 9 0 0.25k= 5: Prob= 7.6%, IHH= 8 0k= 6: Prob= 6.7%, IHH=16 0k= 7: Prob= 6.2%, IHH=15 0 0.25 0.5 0.75 k= 8: Prob= 5.2%, IHH= 2 0 0.25k= 9: Prob= 4.4%, IHH= 3 0 0.25k=10: Prob= 3.6%, IHH= 5 0k=11: Prob= 3.1%, IHH=12 0 0.25 k=12: Prob= 2.8%, IHH= 6 0 0.25 0.5 0.75 1 0 100 200 300 400k=13: Prob= 1.2%, IHH= 2 Fig. 9. NMF components /tildewideDk(k=1,..., 13) from top to bottom. Each plot ( /tildewideDk)d=Dkdshows how desti- nations are distributed among users din the k-th NMF component. Note that /tildewideDkis normalized, i.e./summationtext dDkd=1 for all k. See (19) and (20) in the main text. Also shown in each plot are the probability of the component, denoted by “Prob”, and the inverse Herfindahl-Hirschman ind ex “IHH” representing the e ffective number of dominant users in the component. Data: 2019-09. 16 0 0.25 0.5 0 100 200 300 400Source (user index) k= 1: Prob=27.3%, IHH= 4 0 0.25 k= 2: Prob=13.8%, IHH= 9 0 0.25 0.5k= 3: Prob= 9.3%, IHH= 3 0 0.25k= 4: Prob= 8.9%, IHH= 8 0 0.25 0.5k= 5: Prob= 7.6%, IHH= 3 0 0.25k= 6: Prob= 6.7%, IHH= 5 0 0.25k= 7: Prob= 6.2%, IHH= 5 0 0.25 0.5 k= 8: Prob= 5.2%, IHH= 4 0 0.25 0.5 0.75 1 k= 9: Prob= 4.4%, IHH= 2 0 0.25 0.5k=10: Prob= 3.6%, IHH= 4 0 0.25k=11: Prob= 3.1%, IHH= 6 0 0.25k=12: Prob= 2.8%, IHH= 5 0 0.25 0.5 0.75 1 0 100 200 300 400k=13: Prob= 1.2%, IHH= 2 Fig. 10. NMF components /tildewideSk(k=1,..., 13) from top to bottom. Each plot ( /tildewideSk)s=Sskshows how sources are distributed among users sin the k-th NMF component. Note that /tildewideSkis normalized, i.e./summationtext sSsk=1 for all k. See (23) and (24) in the main text. See the caption of Fig. 9 for “Prob” and “IHH” in each plot. Data: 2019-09. 17 0.51Coe/c01.(a) For a souce in GSCC 0.51Coe/c01.(b) For a destination in GSCC 0.51Coe/c01.(c) For a souce in IN 0.51 1 2 3 4 5 6 7 8 9 10 11 12 13Coe/c01. Component k(d) For a destination in OUT Fig. 11. Coefficients, with which crypto flow from or to a selected user is exp anded with respect to the NMF components. The selected users are 0000000000 (a,b) included in the GSCC of bow-tie structure, 0000006178 (c) in the IN, and0000000012 (d) in the OUT. The user 0000000000 can be source (a) and destination (b). The user of (c) is a source, and the user of (d) is a destination . The expansion is given by (21) for the selected source s, and by (25) for the selected destination d. Data: 2019-09. 18 Fig. 12. NMF components k=1,..., 8 as matrices defined by /tildewideSsk/tildewideDkdin (32). Data: 2019-09. 19 Fig. 13. (Continued) NMF components k=9,..., 13 as matrices defined by /tildewideSsk/tildewideDkdin (32). Data: 2019-09. 20 (a) Cosine similarity of NMF basis vectors Dk (b) Cosine similarity of NMF basis vectors Sk Fig. 14. Temporal change of the NMF components from one month tto its successive month t+1. (a) Cosine similarities calculated for all the pairs of Dk(k=1,..., 13) between t(vertical) and t+1. (b) The same for all the pairs of Sk. For the vertical and horizontal axes in (a) and (b), the orde r of indices along vertical and horizontal axes corresponds to the descending order of the p robability rkin (31). Data: 2019-09 and 2019-10. 21 4. Discussions Let us briefly discuss about several aspects that would be wor th further investigation. First, while we succeeded to extract the NMF components and f ound that the components have non-zero values only at a relatively small number of users, w e still did not identify those users by exploiting the fact. It is quite likely the case that the extr acted users must play important roles in each of the NMF components, either of key destinations or key sour ces. We attempted to identify a tiny fraction of such users by matching the list of such users with the identity given in Appendix A, but the identification was not su fficient in order to interpret the meaning of corresponding NMF components. Instead, such intra-day activities as shown in Fig. 2 of Sect ion 2.1 could give us the geographical locations of those key users, possibly uncovering the crypt o flow in each NMF component at a global scale. This issue remains to be investigated. Second, even if the temporal change of the network in terms of the NMF components has such a stable structure as found in Fig. 14, we noticed that there ex ists interesting change of a few compo- nents in the same figure. A keen reader may have noticed that th e components k=3,4,5,6 at time tare changed into among themselves at time t+1, while the cosine similarities are close to 1. This means that the probabilities rkfor those components were changed from one month to the next. Also one can notice that the optimal number of NMF components show ed a slow variation during the pe- riod (recall Table D·1 of Appendix D). These facts might give us a hint for how to treat the temporal change of network by paying attention to those slowing varyi ng aspects. Additionally, while we fo- cused only on regular users appearing everyday during the pe riod under study, it would be necessary to include the process of entry and exit of big players. Third, technically, we regarded the method of NMF as a probab ilistic model that shares the same stochastic process as in the probabilistic latent semantic analysis (PLSA). As a bonus, we were able to employ the latent Dirichlet allocation (LDA) and its know n methods to estimate the number of topics in the context of topic model, or the number of NMF comp onents in out context. In principle, one could start with the full-fledged Bayesian framework in t he LDA and its extension and variations. It would be worth pursuing in this direction, which is also re lated to the second point above, because there are several studies on how to treat temporally changin g topics of documents in a long time-span. Fourth, our methods in this paper can be easily applied to di fferent cryptoassets including Ethereum and XRP. We are aware of the paper [20] in this volume, which is in a similar line of study. It would be interesting to apply our methods to the data of XRP. Finally, it would be an extremely interesting problem how th e crypto flow among big players is related to the prices in the exchange markets with fiat currencies and also with oth er cryptoassets. It is quite likely that the bubble /crash and their precursors might force the big players to rea ct during such turmoils in a di fferent way from tranquil periods. For example, exchanges nee d to reallocate cryptoassets in the necessity of making a reservoir or doing a release of cryptoassets under the risk. 5. Summary Our purpose in this study on the cryptoasset of Bitcoin is to u nderstand the structure and tem- poral change of crypto flow among big players. We compiled all the transactions contained in the blockchain of Bitcoin cryptoasset from its genesis to the ye ar 2020, identified users from anonymous addresses, and constructed snapshots of networks comprisi ng of users as nodes and links as crypto flow among the users. While the whole network is huge, we extra cted sub-networks by focusing on regular users who appeared persistently during a certain pe riod. Specifically, we extracted monthly snapshots during the year of 2019, and selected roughly 500 r egular users. We first analyzed the bow-tie structure from the binary relat ionship of flow, and then performed the Hodge decomposition based on the strength of flow defined b y frequencies and amounts, in order 22 to locate users in the upstream, downstream, and core of the e ntire crypto flow. We found that the bow-tie structure is stable during the period, implying tha t those regular users have di fferent roles in the crypto flow. Then, to reveal important ingredients hidden in the flow, we e mploy the method of non-negative matrix factorization (NMF) to extract a set of principal com ponents. We discussed that the NMF method can be regarded as a probabilistic model, which is equ ivalent to a probabilistic latent semantic analysis and its typical model of latent Dirichlet allocati on. This observation brought us a method to estimate an optimal number of NMF components, which turned o ut to be a dozen or so. We found that the NMF components have non-zero values corresponding to a limited number of users, telling us their roles of destinations or sources of the crypto flow. A dditionally, we found that the NMF components are quite stable in the temporal change for the ti me-scale of months. There remain several points including the further investig ation on the users contained in those NMF components, a treatment of temporally changing network , and technically interesting issues to be pursued in the future. Acknowledgment We would like to thank Hideaki Aoyama, Yuichi Ikeda, and Hiwo n Yoon for discussions, Hiroshi Iyetomi for solving a technical issue of Hodge decompositio n, Itsuki Noda for clarifying his applica- tion of NMF on transportation data, Takeaki Uno for an e fficient algorithm to identify users, Shinya Kawata and Wajun Kawai for technical assistance. This work i s supported by JSPS KAKENHI Grant Numbers, 19K22032 and 20H02391, by the Nomura Foundation (G rants for Social Science), and also by Kyoto University and Ripple’s collaboration scheme . References [1] F. Reid and M. Harrigan. An analysis of anonymity in the bi tcoin system. In Y . Altshuler, Y . Elovici, A. Cremers, N. Aharony, and A. Pentland, editors, Security and Privacy in Social Networks , pages 197–223. Springer, New York, 2013. [2] M. Ober, S. Katzenbeisser, and K. Hamacher. Structure an d anonymity of the bitcoin transaction graph. Future Internet ,5(2):237–250, 2013. [3] D. Ron and A. Shamir. Quantitative analysis of the full bi tcoin transaction graph. In Financial Cryptog- raphy and Data Security , 2013. [4] D. Kondor, M. P´ osfai, I. Csabai, and G. Vattay. Do the ric h get richer? an empirical analysis of the bitcoin transaction network. PLoS ONE ,9(2):e86197, 2014. [5] D. Kondor, I. Csabai, S. J., M. P´ osfai, and G. Vattay. Inf erring the interplay between network structure and market effects in bitcoin. New Journal of Physics ,16(12):125003, 2014. [6] B. Alvarez-Pereira, M. A. Ayres, A. M. G. L´ opez, S. Gorsk y, S. W. Hayes, Z. Qiao, and J. Santana. Network and conversation analyses of bitcoin. In 2014 Complex Systems Summer School Proceedings , 2014. [7] A. Baumann, B. Fabian, and M. Lischke. Exploring the bitc oin network. In Proceedings of the 10th International Conference on Web Information Systems and Te chnologies – Volume 2: WEBIST , 2014. [8] M. Fleder, M. S. Kester, and S. Pillai. Bitcoin transacti on graph analysis. http://arxiv.org/abs/ 1502.01657 , 2015. [9] D. Maesa, A. Marino, and L. Ricci. Uncovering the bitcoin blockchain: An analysis of the full users graph. In Conference: 2016 IEEE International Conference on Data Sci ence and Advanced Analytics (DSAA) , 2016. [10] M. Lischke and B. Fabian. Analyzing the bitcoin network : The first four years. Future Internet ,8(1):7, 2016. [11] C. G. Akcora, Y . R. Gel, and M. Kantarcioglu. Blockchain : A graph primer.http://arxiv.org/abs/ 1708.08749 , 2017. [12] M. Bartoletti, A. Bracciali, S. Lande, and L. Pompianu. A general framework for bitcoin analytics. http: //arxiv.org/abs/1707.01021 , 2017. 23 [13] C. Cachin, A. D. Caro, P. Moreno-Sanchez, B. Tackmann, a nd M. Vukoli´ c. The transaction graph for modeling blockchain semantics. https://eprint.iacr.org/2017/1070 , 2017. [14] R. Cazabet, B. Rym, and M. Latapy. Tracking bitcoin user s activity using community detection on a network of weak signals. http://arxiv.org/abs/1710.08158 , 2017. [15] D. Maesa, A. Marino, and L. Ricci. Data-driven analysis of bitcoin properties: exploiting the users graph. International Journal of Data Science and Analytics , 2017. [16] S. Ranshous, C. Joslyn, S. Kreyling, K. Nowak, N. F. Sama tova, C. L. West, and S. Winters. Exchange pattern mining in the bitcoin transaction directed hypergr aph. In Financial Cryptography Workshops , 2017. [17] A. M. Antonopoulos. Mastering Bitcoin: Programming the Open Blockchain . O’Reilly Media, 2 edition, 2017. [18] Hungary research group: Elte bitcoin project. http://www.vo.elte.hu/bitcoin/ ;https:// senseable2015-6.mit.edu/bitcoin/ . Accessed: 2020-01-03. [19] Bitcoin block explorer with address grouping and walle t labeling.https://www.walletexplorer. com. Accessed: 2021-03-18. [20] H. Aoyama. Xrp network and proposal of flow index; see it i n this volume., 2021. [21] R. Islam, Y . Fujiwara, S. Kawata, and H. Yoon. Analyzing outliers activity from the time-series transaction pattern of bitcoin blockchain. Evolutionary and Institutional Economics Review ,16(1):239–257, 2019. [22] R. Islam, Y . Fujiwara, S. Kawata, and H. Yoon. Unfolding identity of financial institutions in bitcoin blockchain by weekly pattern of network flows. in preparatio n, 2020. [23] A. Broder, R. Kumar, F. Maghoul, P. Raghavan, S. Rajagop alan, R. Stata, A. Tomkins, and J. Wiener. Graph structure in the Web. Computer Networks ,33(1-6):309–320, 2000. [24] X. Jiang, L.-H. Lim, Y . Yao, and Y . Ye. Learning to rank wi th combinatorial hodge theory. available online, 2008. accessed in January, 2020. [25] X. Jiang, L.-H. Lim, Y . Yao, and Y . Ye. Statistical ranki ng and combinatorial hodge theory. Mathematical Programming ,127(1):203–244, 2011. [26] J. L. Johnson. Discrete hodge theory on graphs: a tutori al.Computing in Science &Engineering ,15(5):42– 55, 2013. [27] K. Miura and T. Aoki. Scaling of hodge-kodaira decompos ition distinguishes learning rules of neural networks. IFAC-PapersOnLine ,48(18):175–180, 2015. [28] Y . Kichikawa, H. Iyetomi, T. Iino, and H. Inoue. Hierarc hical and circular flow structure of interfirm transaction networks in japan. https://ssrn.com/abstract=3173955 , 2018. May 4, 2018. [29] Y . Fujiwara, H. Inoue, T. Yamaguchi, H. Aoyama, T. Tanak a, and K. Kikuchi. Money flow network among firms’ accounts in a regional bank of japan. EPJ Data Science ,10:19, 2021. [30] F. Y . and I. R. Advanced Studies of Financial Technologies and Cryptocurr ency Markets , chapter Hodge Decomposition of Bitcoin Money Flow. Springer, Singapore, 2020. [31] D. D. Lee and H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature , 401(6755):788–791, 1999. [32] M. W. Berry, M. Browne, A. N. Langville, V . P. Pauca, and R . J. Plemmons. Algorithms and applications for approximate nonnegative matrix factorization. Computational Statistics &Data Analysis ,52(1):155– 173, 2007. [33] R. Gaujoux and C. Seoighe. A flexible r package for nonneg ative matrix factorization. BMC Bioinfor- matics ,11:367, 2010. [34] H. Kameoka. Non-negative matrix factorization and its variants with applications to audio signal pro- cessing. Journal of the Japan Statistical Society ,44(2):383–407, 2015. Japanese. [35] I. Noda and J. Ochiai. Analysis of od data of ondemand tra nsportation by non-negative matrix factoriza- tion. 2019. Technical report in the workshop of SIG-DOCMAS, Japanese. [36] T. Hofmann. Unsupervised learning by probabilistic la tent semantic analysis. Machine Learning ,42:177– 196, 2001. [37] T. L. Griffiths and M. Steyvers. Finding scientific topics. Proceedings of the National Academy of Sci- ences ,101:5228–5235, 2004. [38] J. Cao, T. Xia, J. Li, Y . Zhang, and S. Tang. A density-bas ed method for adaptive lda model selection. Neurocomputing ,72(7):1775–1781, 2009. 24 [39] R. Arun, V . Suresh, C. E. Veni Madhavan, and M. N. Narasim ha Murthy. On finding the natural number of topics with latent dirichlet allocation: Some observati ons. In M. J. Zaki, J. X. Yu, B. Ravindran, and V . Pudi, editors, Advances in Knowledge Discovery and Data Mining , pages 391–402. Springer Berlin Heidelberg, 2010. [40] R. Deveaud, E. SanJuan, and P. Bellot. Accurate and e ffective latent concept modeling for ad hoc infor- mation retrieval. Document Num´ erique ,17(1):61–84, 2014. [41] D. M. Blei, A. Y . Ng, and M. I. Jordan. Latent dirichlet al location. Journal of Machine Learning Research , 3:993–1022, 2003. [42] D. M. Blei and J. D. La fferty. Text Mining: Classification, Clustering, and Applications , chapter Topic Models, pages 71–94. CRC Press, 2009. [43] Gr¨ un, Bettina and Hornik, Kurt. topicmodels : An R Package for Fitting Topic Models. Journal of Statistical Software ,40(13):1–30, 2011. [44] Y . W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarc hical dirichlet processes. Journal of the American Statistical Association ,101(476):1–30, 2006. 25 Appendix A: Identity of Users of Type A WalletExplorer.com [19] is a web site providing information about identity of ad dresses in Bitcoin blockchain. The site merges addresses together, if they are part of the same wallet, and also identifies wallets with actual names. According to the site, the method to merge addresses is: Just a basic algorithm is used to determine wallet addresses . Addresses are merged to- gether, if they are co-spent in one transaction. So if addres ses A and B are co-spent in transaction T1, and addresses B and C are co-spent in transac tion T2, all addresses A, B and C will be part of one wallet. Sometimes, an address belongs to some service but it was neve r co-spent with others. Then that address stays unnamed. It is typically more often at add resses with higher amount (as there is no need to co-spending). This method is precisely the same as [1], which is the one we em ployed in Section 2.1. In addition, the identification of actual names is done by WalletExplorer.com as follows: In most of the cases, I registered to service, made transacti on(s) and saw which wallet bitcoins were merged with, or from which wallet it was withdr awn. There is probably no easier way how to discover names other th an this. Please note that the name database is not updated, so it does n ot contain newer exchanges (or newer wallets of existing exchanges). We matched our data with the one in [19] to obtain the identity and additional attributes of users of type A (see Section 2.1 for the type). Table A·1 is the class ification into exchanges, services, gambling, historic, and mining pools. Table A·2 shows the li st of countries that exchanges belong to. Table A·3 is the complete list of this matching. Table A·1. Classification of identified users (compiled from [19]) Classification #Users Examples Exchanges 84 Bittrex.com ,Huobi.com ,Bit-x.com ,HitBtc.com Old/Historic 83 AgoraMarket ,EvolutionMarket ,SilkRoadMarketplace Services/Others 45 Xapo.com ,ePay.info ,Cubits.com Gambling 41 999Dice.com ,CoinGaming.io ,SatoshiMines.com Pools 11 BTCCPool ,SlushPool.com ,BitMinter.com Total 264 — Table A·2. Countries of identified exchanges (compiled from [19]) Country #Users China 14 UK 13 USA 13 Canada 4 Australia 3 Brazil 3 Singapore 3 Russia 3 Denmark 2 Finland 2Country #Users Mexico 2 Netherlands 2 Poland 2 Portugal 2 South Africa 2 Austria 1 Belize 1 Croatia 1 Czech 1 Germany 1Country #Users Iran 1 Korea 1 Luxembourg 1 Malta 1 Panama 1 Taiwan 1 Thailand 1 Vanuatu 1 Vietnam 1 Total 84 26 Table A·3. : Identity of Users (compiled from [19]) Definitions No: sequential number User ID: an arbitrarily but uniquely assigned IDs to each use r in our data #Addr. (1): number of addresses identified to each User ID in o ur data (rows are sorted by this column) #Addr. (2): the same as (1) but provided by WalletExplorer.com (at the timing of writing) No. User ID #Addr. (1) #Addr. (2) Name Category Country 10000000000 18,913,420 1 Bit-x.com Exchanges South Africa 20000000000 18,913,420 1 Xapo.com Services/Others — 30000000001 13,110,033 12,469,250 ePay.info Services/Others — 40000000002 5,302,867 1 Cryptopay.me Services/Others — 50000000002 5,302,867 1 Cubits.com Services/Others — 60000000002 5,302,867 1 Luno.com Exchanges South Africa 70000000002 5,302,867 1 VirWoX.com Exchanges Austria 80000000002 5,302,867 1 Xapo.com Services/Others — 90000000002 5,302,867 487,776 CoinPayments.net Services/Others — 100000000006 2,180,236 1,488,034 Xapo.com Services/Others — 110000000010 1,630,483 1 Huobi.com Exchanges China 120000000010 1,630,483 957,652 Cubits.com Services/Others — 130000000011 1,538,476 1,377,461 Bittrex.com Exchanges USA 140000000012 1,413,904 1 Bitstamp.net Exchanges Luxembourg 150000000014 1,043,379 279,697 Huobi.com Exchanges China 160000000017 992,726 1 VirWoX.com Exchanges Austria 170000000017 992,726 1 Xapo.com Services/Others — 180000000018 988,300 940,605 Poloniex.com Exchanges USA 190000000022 912,950 133,020 AnxPro.com Exchanges China 200000000022 912,950 770,486 CoinTrader.net Exchanges Canada 210000000025 845,559 1 Cubits.com Services/Others — 220000000028 811,809 2 Cubits.com Services/Others — 230000000030 778,990 651,547 999Dice.com Gambling — 240000000035 682,176 1 MoonBit.co.in Services/Others — 250000000037 659,820 656,699 CoinGaming.io Gambling — 260000000038 631,985 1 Luno.com Exchanges South Africa 270000000041 581,525 1 Cubits.com Services/Others — 280000000042 546,515 291,443 Luno.com Exchanges South Africa 290000000043 523,330 522,056 LocalBitcoins.com Exchanges Finland 300000000045 498,001 498,001 AgoraMarket Old/Historic — 310000000049 478,476 343,039 Bitstamp.net Exchanges Luxembourg 320000000054 420,632 420,632 EvolutionMarket Old/Historic — 330000000055 412,338 249,883 Cryptonator.com Services/Others — 340000000057 398,349 1 Xapo.com Services/Others — 350000000060 377,140 305,518 Cryptopay.me Services/Others — 360000000061 372,753 372,753 SilkRoadMarketplace Old/Historic — 370000000063 350,036 350,036 SilkRoad2Market Old/Historic — 380000000069 341,160 61,103 MercadoBitcoin.com.br Exchanges Brazil 390000000071 325,365 1 Xapo.com Services/Others — 400000000075 307,489 307,451 BTC-e.com Exchanges Russia 410000000077 294,238 1 Xapo.com Services/Others — 420000000079 278,973 2 Cubits.com Services/Others — 430000000082 266,695 254,601 SatoshiMines.com Gambling — 440000000083 263,074 262,940 YoBit.net Exchanges Russia 450000000086 250,920 191,689 Bitcoin.de Exchanges Germany 460000000090 241,250 223,781 BitcoinFog Services/Others — 470000000093 238,480 238,476 Cex.io Exchanges UK 480000000101 206,542 156,203 CoinJar.com Services/Others — 490000000107 197,164 197,155 NitrogenSports.eu Gambling — 500000000114 189,776 189,776 AlphaBayMarket Services/Others — 510000000116 187,189 187,086 HitBtc.com Exchanges UK 520000000120 186,000 186,000 BitPay.com Services/Others — 530000000135 168,885 1 Luno.com Exchanges South Africa 540000000158 146,381 146,381 NucleusMarket Services/Others — 550000000159 145,978 1 Cryptonator.com Services/Others — 560000000159 145,978 1 Cubits.com Services/Others — 570000000169 140,594 1 Bitcoin.de Exchanges Germany Continue to next page 27 Table A·3 continued from previous page No. User ID #Addr. (1) #Addr. (2) Name Category Country 580000000169 140,594 1 Cubits.com Services/Others — 590000000169 140,594 1 Poloniex.com Exchanges USA 600000000176 134,559 134,559 Cryptsy.com Exchanges USA 610000000182 131,979 1 Poloniex.com Exchanges USA 620000000190 125,004 125,004 PocketDice.io Gambling — 630000000195 122,249 1 Bitstamp.net Exchanges Luxembourg 640000000199 120,548 120,491 FortuneJack.com Gambling — 650000000201 119,119 119,065 AbraxasMarket Old/Historic — 660000000208 115,775 115,775 CoinKite.com Services/Others — 670000000210 114,458 114,458 Kraken.com Exchanges USA 680000000216 109,798 1 Luno.com Exchanges South Africa 690000000217 109,151 109,151 Instawallet.org Old/Historic — 700000000219 107,479 85,122 Bleutrade.com Exchanges Brazil 710000000234 96,890 96,890 SecondsTrade.com Gambling — 720000000239 92,226 72,581 HolyTransaction.com Services/Others — 730000000244 90,473 44,416 CoinSpot.com.au Exchanges Australia 740000000252 85,637 85,626 MintPal.com Old/Historic — 750000000253 85,566 84,679 Hashnest.com Exchanges China 760000000259 83,723 83,517 BtcTrade.com Exchanges China 770000000263 82,695 27,343 BTCJam.com Services/Others — 780000000267 80,987 73,965 OKCoin.com Exchanges China 790000000269 80,086 1 Poloniex.com Exchanges USA 800000000270 79,712 79,712 Bter.com Exchanges China 810000000274 78,849 78,849 BitZino.com Gambling — 820000000278 78,119 78,048 OKCoin.com Exchanges China 830000000282 76,997 1 Cubits.com Services/Others — 840000000282 76,997 52,925 BitoEX.com Services/Others — 850000000286 74,602 74,602 Rollin.io Gambling — 860000000300 68,956 67,795 CloudBet.com Gambling — 870000000302 68,658 55,098 VirWoX.com Exchanges Austria 880000000307 67,114 1 Cubits.com Services/Others — 890000000312 66,748 1 Luno.com Exchanges South Africa 900000000318 65,367 1 VirWoX.com Exchanges Austria 910000000325 64,803 64,803 BTCC.com Exchanges China 920000000347 57,770 57,753 MaiCoin.com Exchanges Taiwan 930000000350 56,952 56,952 BTCCPool Pools — 940000000358 55,757 55,757 PandoraOpenMarket Old/Historic — 950000000359 55,703 1 MercadoBitcoin.com.br Exchanges Brazil 960000000362 55,167 55,167 Paxful.com Exchanges USA 970000000366 54,640 54,640 PrimeDice.com Gambling — 980000000370 53,639 53,639 SheepMarketplace Old/Historic — 990000000374 53,102 53,102 Cavirtex.com Exchanges Canada 1000000000387 50,878 50,878 BlackBankMarket Old/Historic — 1010000000402 48,602 48,518 BX.in.th Exchanges Thailand 1020000000403 48,525 19,434 MoonBit.co.in Services/Others — 1030000000407 48,178 33,372 HaoBTC.com Services/Others — 1040000000412 47,295 47,281 Matbea.com Exchanges UK 1050000000444 42,750 41,150 SatoshiDice.com Gambling — 1060000000447 42,327 41,866 BitcoinWallet.com Services/Others — 1070000000468 40,270 1 Cubits.com Services/Others — 1080000000480 39,013 1 VirWoX.com Exchanges Austria 1090000000482 38,880 1 Huobi.com Exchanges China 1100000000501 36,999 36,999 Justcoin.com Old/Historic — 1110000000508 35,537 1 Bitcoin.de Exchanges Germany 1120000000508 35,537 28,567 SafeDice.com Gambling — 1130000000511 35,453 35,453 McxNOW.com Old/Historic — 1140000000512 35,433 35,433 C-Cex.com Exchanges UK 1150000000527 34,149 34,149 MiddleEarthMarketplace Old/Historic — 1160000000533 33,436 33,389 Vircurex.com Exchanges China 1170000000537 32,823 32,823 Purse.io Services/Others — 1180000000539 32,701 32,701 SatoshiBet.com Gambling — 1190000000542 32,017 27,693 SwCPoker.eu Gambling — 1200000000545 31,940 30,755 BitBargain.co.uk Exchanges UK 1210000000556 30,965 30,965 SealsWithClubs.eu Old/Historic — Continue to next page 28 Table A·3 continued from previous page No. User ID #Addr. (1) #Addr. (2) Name Category Country 1220000000559 30,624 22,599 BlockTrades.us Exchanges USA 1230000000562 30,251 16,052 CoinMotion.com Exchanges Finland 1240000000563 30,187 30,183 OkLink.com Services/Others — 1250000000571 29,256 29,256 Huobi.com Exchanges China 1260000000591 27,653 23,515 Bit-x.com Exchanges South Africa 1270000000605 26,622 26,622 BtcDice.com Old/Historic — 1280000000614 26,013 24,204 BitBay.net Exchanges Poland 1290000000615 25,960 25,960 Betcoin.ag Gambling — 1300000000626 25,257 1 Cubits.com Services/Others — 1310000000649 23,841 20,866 Paymium.com Services/Others — 1320000000672 22,597 22,597 Loanbase.com Services/Others — 1330000000676 22,304 22,304 Coinroll.com Gambling — 1340000000687 21,693 21,693 FaucetBOX.com Services/Others — 1350000000690 21,640 10,439 CoinHako.com Exchanges Singapore 1360000000717 20,484 18,001 FYBSG.com Exchanges Singapore 1370000000747 19,810 19,605 TheRockTrading.com Exchanges Malta 1380000000762 18,997 18,997 BlueSkyMarketplace Old/Historic — 1390000000774 18,489 18,489 Crypto-Games.net Gambling — 1400000000794 17,705 17,705 Coin-Swap.net Old/Historic — 1410000000804 17,531 1 Luno.com Exchanges South Africa 1420000000869 15,965 15,965 AnoniBet.com Gambling — 1430000000874 15,905 15,905 ChangeTip.com Services/Others — 1440000000881 15,757 15,757 Bitmit.net Old/Historic — 1450000000891 15,495 15,495 CoinApult.com Services/Others — 1460000000902 15,260 15,260 BtcMarkets.net Exchanges Australia 1470000000926 14,566 14,566 Inputs.io Old/Historic — 1480000000934 14,394 1 Huobi.com Exchanges China 1490000000959 13,713 11,210 Vaultoro.com Exchanges UK 1500000001006 12,486 12,486 CryptoStocks.com Services/Others — 1510000001007 12,456 12,456 BitAces.me Old/Historic — 1520000001071 11,221 11,221 Coins-e.com Exchanges Canada 1530000001072 11,220 11,220 Igot.com Exchanges Belize 1540000001093 10,901 10,900 SatoshiRoulette.com Gambling — 1550000001177 9,667 1 Bittrex.com Exchanges USA 1560000001199 9,512 9,512 Crypto-Trade.com Old/Historic — 1570000001235 9,165 9,165 Cryptorush.in Old/Historic — 1580000001240 9,122 9,122 BTCOracle.com Gambling — 1590000001255 8,967 8,967 Genesis-Mining.com Services/Others — 1600000001313 8,430 8,430 Exmo.com Exchanges UK 1610000001325 8,371 4,343 SlushPool.com Pools — 1620000001355 8,120 8,120 VaultOfSatoshi.com Old/Historic — 1630000001368 8,032 8,032 BitcoinVideoCasino.com Gambling — 1640000001393 7,865 7,865 BTCGuild.com Old/Historic — 1650000001395 7,857 7,766 Peerbet.org Gambling — 1660000001397 7,848 7,848 796.com Exchanges Vanuatu 1670000001421 7,585 7,585 Btc38.com Exchanges UK 1680000001438 7,479 7,479 Betcoins.net Old/Historic — 1690000001497 7,109 7,109 LiteBit.eu Exchanges Netherlands 1700000001568 6,788 6,207 Bitbond.com Services/Others — 1710000001588 6,669 5,369 HappyCoins.com Exchanges Netherlands 1720000001631 6,477 6,477 Bitcoin-Roulette.com Old/Historic — 1730000001666 6,309 6,309 AllCoin.com Old/Historic — 1740000001685 6,242 6,242 Coin.mx Old/Historic — 1750000001739 6,009 4,726 LakeBTC.com Exchanges China 1760000001750 5,966 5,966 777Coin.com Gambling — 1770000001760 5,934 5,934 GHash.io Pools — 1780000001796 5,762 5,762 DoctorDMarket Services/Others — 1790000001862 5,481 5,481 Coinomat.com Exchanges UK 1800000001916 5,297 5,295 Coinmate.io Exchanges UK 1810000002012 5,024 5,024 BitVC.com Exchanges China 1820000002024 4,996 4,875 SatoshiCircle.com Gambling — 1830000002039 4,953 1 Luno.com Exchanges South Africa 1840000002055 4,896 4,896 MyBitcoin.com Old/Historic — 1850000002098 4,775 4,775 AllCrypt.com Old/Historic — Continue to next page 29 Table A·3 continued from previous page No. User ID #Addr. (1) #Addr. (2) Name Category Country 1860000002155 4,629 4,629 GermanPlazaMarket Services/Others — 1870000002169 4,605 4,605 MasterXchange.com Old/Historic — 1880000002183 4,551 4,272 CoinCafe.com Exchanges USA 1890000002192 4,530 4,242 BitKonan.com Exchanges Croatia 1900000002197 4,516 4,516 QuadrigaCX.com Exchanges Canada 1910000002216 4,451 4,451 BitElfin.com Old/Historic — 1920000002243 4,377 4,377 OrderBook.net Exchanges USA 1930000002251 4,363 3,800 SpectroCoin.com Exchanges UK 1940000002259 4,354 4,354 Bitcurex.com Exchanges Poland 1950000002265 4,338 4,338 Coinichiwa.com Gambling — 1960000002281 4,292 4,277 Betcoin.tm Gambling — 1970000002305 4,232 4,227 MeXBT.com Exchanges Mexico 1980000002403 3,999 3,999 Bitfinex.com Exchanges China 1990000002424 3,947 1,571 CoinVault Old/Historic — 2000000002464 3,861 3,861 BetsOfBitco.in Old/Historic — 2010000002471 3,840 3,840 JetWin.com Gambling — 2020000002587 3,607 3,607 BitZillions.com Gambling — 2030000002617 3,545 3,543 Korbit.co.kr Exchanges Korea 2040000002661 3,485 3,485 BTCPop.co Services/Others — 2050000002849 3,216 2,181 YABTCL.com Gambling — 2060000002922 3,121 3,121 BIToomBa.com Old/Historic — 2070000002952 3,086 3,086 BitYes.com Old/Historic — 2080000002965 3,075 2,640 BetMoose.com Gambling — 2090000003031 2,979 2,978 CoinURL.com Services/Others — 2100000003139 2,829 2,829 CannabisRoadMarket Old/Historic — 2110000003195 2,760 2,760 Ice-Dice.com Old/Historic — 2120000003211 2,744 2,744 ChBtc.com Exchanges China 2130000003249 2,713 2,713 CoinArch.com Exchanges Singapore 2140000003310 2,645 2,645 Comkort.com Old/Historic — 2150000003340 2,618 2,618 BitNZ.com Services/Others — 2160000003348 2,614 2,614 CleverCoin.com Exchanges USA 2170000003388 2,575 2,575 CoinMkt.com Old/Historic — 2180000003637 2,355 2,355 DiceBitco.in Old/Historic — 2190000003756 2,276 2,276 BitcoinVietnam.com.vn Exchanges Vietnam 2200000003840 2,221 2,221 Indacoin.com Exchanges UK 2210000004134 2,023 2,023 BitClix.com Services/Others — 2220000004187 1,992 1,992 Coin-Sweeper.com Old/Historic — 2230000004271 1,948 1,948 GoCelery.com Services/Others — 2240000004570 1,812 1,812 Playt.in Old/Historic — 2250000004580 1,804 1,796 Bitcash.cz Old/Historic — 2260000004586 1,802 1,802 CampBX.com Exchanges USA 2270000004817 1,713 1,713 BTCLend.org Services/Others — 2280000004840 1,704 1,704 CoinChimp.com Exchanges Russia 2290000004863 1,699 1,699 BtcExchange.ro Old/Historic — 2300000004882 1,690 1,690 AdmiralCoin.com Old/Historic — 2310000005002 1,643 1,643 Bitcoinica.com Old/Historic — 2320000005121 1,594 1,594 Gatecoin.com Exchanges China 2330000005399 1,508 1,508 BetChain.com-old Gambling — 2340000005547 1,471 1,471 BabylonMarket Old/Historic — 2350000005637 1,443 1,443 HelixMixer Services/Others — 2360000006104 1,314 1,314 Bylls.com Services/Others — 2370000006381 1,246 1,246 Btcst.com-pirateat40 Old/Historic — 2380000006688 1,189 1,189 PocketRocketsCasino.eu Old/Historic — 2390000006697 1,188 1,188 Bitso.com Exchanges Mexico 2400000006747 1,178 1,178 BTCt.com Old/Historic — 2410000006753 1,176 1,176 DaDice.com Old/Historic — 2420000007201 1,095 1,095 Cryptonit.net Exchanges UK 2430000007312 1,076 1,076 BitStarz.com Gambling — 2440000007547 1,040 1,040 Ccedk.com Exchanges Denmark 2450000007673 1,020 1,020 Satoshi-Karoshi.com Gambling — 2460000007783 1,005 1 VirWoX.com Exchanges Austria 2470000008133 978 978 Just-Dice.com Old/Historic — 2480000008213 968 968 CryptoLocker Old/Historic — 2490000008232 965 965 GreenRoadMarket Services/Others — Continue to next page 30 Table A·3 continued from previous page No. User ID #Addr. (1) #Addr. (2) Name Category Country 2500000008325 953 953 CoinRoyale.com Gambling — 2510000008352 950 950 CryptoBounty.com Old/Historic — 2520000009025 876 876 1Coin.com Exchanges China 2530000009100 869 679 Coingi.com Exchanges Panama 2540000010744 746 746 BitcoinWeBank.com Old/Historic — 2550000010833 741 741 EmpoEX.com Exchanges USA 2560000011035 729 729 FairProof.com Gambling — 2570000011546 700 700 UseCryptos.com Exchanges Portugal 2580000011749 686 1 Cubits.com Services/Others — 2590000011857 681 1 VirWoX.com Exchanges Austria 2600000012513 670 669 AntPool.com Pools — 2610000012569 668 668 Coinbroker.io Exchanges USA 2620000012639 665 665 UpDown.BT Old/Historic — 2630000013022 648 648 DiceNow.com Gambling — 2640000013139 643 643 Dagensia.eu Old/Historic — 2650000013870 614 614 WatchMyBit.com Services/Others — 2660000014175 604 604 MPEx.co Old/Historic — 2670000014703 593 593 Banx.io Exchanges USA 2680000015353 572 572 CloudHashing.com Old/Historic — 2690000015549 565 565 Eligius.st Pools — 2700000016775 527 527 Europex.eu Old/Historic — 2710000017189 515 515 EveryDice.com Old/Historic — 2720000018179 499 499 Brawker.com Old/Historic — 2730000019489 473 471 10xBitco.in Old/Historic — 2740000021056 440 1 Cubits.com Services/Others — 2750000021084 440 439 BitMinter.com Pools — 2760000021286 436 436 ExchangeMyCoins.com Exchanges Denmark 2770000023185 402 402 BW.com Pools — 2780000023304 400 400 Chainroll.com Old/Historic — 2790000024708 390 390 DiceCoin.io Gambling — 2800000025249 382 382 FoxBit.com.br Exchanges Brazil 2810000025389 380 380 PonziCoin.co Old/Historic — 2820000025554 377 377 Birwo.com-old Old/Historic — 2830000027509 351 338 Zyado.com Exchanges Portugal 2840000028306 341 341 SuzukiDice.com Old/Historic — 2850000028897 334 1 Cubits.com Services/Others — 2860000032828 297 297 KnCMiner.com Pools — 2870000033285 293 293 BitcoinPokerTables.com Gambling — 2880000034753 280 280 Polmine.pl Old/Historic — 2890000034912 279 279 MineField.BitcoinLab.org Gambling — 2900000045961 234 234 SmenarnaBitcoin.cz Old/Historic — 2910000062902 195 195 Dgex.com Old/Historic — 2920000064830 190 190 BitLaunder.com Services/Others — 2930000072390 170 170 BitMillions.com Old/Historic — 2940000074148 166 1 Cubits.com Services/Others — 2950000078381 157 1 Cubits.com Services/Others — 2960000100904 125 125 Vic-Socks.to Services/Others — 2970000108438 117 117 Gatecoin.com Exchanges China 2980000109665 116 1 VirWoX.com Exchanges Austria 2990000114095 112 112 Bitcoin-24.com Old/Historic — 3000000157019 96 1 Cubits.com Services/Others — 3010000180141 85 1 Poloniex.com Exchanges USA 3020000200218 77 77 BetcoinDice.tm Old/Historic — 3030000206094 75 75 Bitfury.org Pools — 3040000265341 59 1 Cubits.com Services/Others — 3050000296609 53 53 50BTC.com Old/Historic — 3060000302266 52 1 Cubits.com Services/Others — 3070000302626 52 1 Cubits.com Services/Others — 3080000332619 49 49 BtcEur.eu Old/Historic — 3090000417570 40 1 VirWoX.com Exchanges Austria 3100000434094 38 1 Luno.com Exchanges South Africa 3110000482184 35 35 SecureVPN.to Services/Others — 3120000489034 34 1 Xapo.com Services/Others — 3130000539744 32 32 MinersCenter.com Old/Historic — Continue to next page 31 Table A·3 continued from previous page No. User ID #Addr. (1) #Addr. (2) Name Category Country 3140000661573 28 28 DiceOnCrack.com Old/Historic — 3150000727720 26 1 Cubits.com Services/Others — 3160000881383 23 1 Bittrex.com Exchanges USA 3170001047894 20 20 ActionCrypto.com Old/Historic — 3180001068642 20 1 Cubits.com Services/Others — 3190001453639 15 1 CoinMotion.com Exchanges Finland 3200001482058 15 15 ASICMiner Old/Historic — 3210001615111 14 14 Telco214 Pools — 3220001849904 12 12 BTradeAustralia.com Exchanges Australia 3230001949672 12 12 PinballCoin.com Old/Historic — 3240002236961 11 1 MoonBit.co.in Services/Others — 3250002437346 10 1 Cubits.com Services/Others — 3260002652760 9 1 Xapo.com Services/Others — 3270002867200 9 1 Cubits.com Services/Others — 3280003042379 8 1 Xapo.com Services/Others — 3290003656659 7 1 Cubits.com Services/Others — 3300003733569 7 1 Luno.com Exchanges South Africa 3310004053833 7 7 SimpleCoin.cz Exchanges Czech 3320004615543 6 6 LuckyB.it Gambling — 3330004719731 6 1 Cubits.com Services/Others — 3340005083698 6 1 Cubits.com Services/Others — 3350005134566 6 1 Cubits.com Services/Others — 3360005316858 6 1 LakeBTC.com Exchanges China 3370006291300 5 1 Cryptopay.me Services/Others — 3380006553479 5 1 Xapo.com Services/Others — 3390006787887 5 1 Cubits.com Services/Others — 3400006884235 5 5 Exchanging.ir Exchanges Iran 3410007872688 4 1 Cubits.com Services/Others — 3420008064964 4 4 FoxBit.com.br Exchanges Brazil 3430008251183 4 1 Cubits.com Services/Others — 3440009938959 4 1 Cubits.com Services/Others — 3450010541278 4 1 Bitcoin.de Exchanges Germany 3460010933272 4 4 ePay.info Services/Others — 3470011084834 4 1 Cubits.com Services/Others — 3480011993584 3 1 Cubits.com Services/Others — 3490013456456 3 3 EclipseMC.com Pools — 3500014115232 3 1 Xapo.com Services/Others — 3510014366385 3 1 Cubits.com Services/Others — 3520014572029 3 1 StrongCoin.com-fee Services/Others — 3530015020521 3 1 Poloniex.com Exchanges USA 3540015254424 3 1 Cubits.com Services/Others — 3550017326362 3 1 Cubits.com Services/Others — 3560018289896 3 1 Huobi.com Exchanges China 3570018738066 3 1 Cubits.com Services/Others — 3580020356858 3 1 Poloniex.com Exchanges USA 3590021062591 3 1 Cubits.com Services/Others — 3600021163228 3 3 ePay.info Services/Others — 3610021447975 2 1 Cubits.com Services/Others — 3620022923752 2 1 Cubits.com Services/Others — 3630023037394 2 1 Cubits.com Services/Others — 3640024428379 2 1 Cubits.com Services/Others — 3650026028525 2 1 Cubits.com Services/Others — 3660033718608 2 1 Xapo.com Services/Others — 3670034424835 2 1 VirWoX.com Exchanges Austria 3680034774492 2 1 Cubits.com Services/Others — 3690035023024 2 1 MercadoBitcoin.com.br Exchanges Brazil 3700035093871 2 1 Huobi.com Exchanges China 3710036244970 2 1 Cubits.com Services/Others — 3720036353675 2 1 Cubits.com Services/Others — 3730036389109 2 2 Dispenser.tf Old/Historic — 3740039716556 2 1 Poloniex.com Exchanges USA 3750040013060 2 1 Cubits.com Services/Others — 3760045999467 2 2 DeepBit.net Old/Historic — 3770046840841 2 1 Cubits.com Services/Others — Continue to next page 32 Table A·3 continued from previous page No. User ID #Addr. (1) #Addr. (2) Name Category Country 3780047562289 2 1 Cubits.com Services/Others — 3790049075064 2 1 Cubits.com Services/Others — 3800050709449 2 1 Poloniex.com Exchanges USA 3810051958689 2 2 CoinWorker.com Services/Others — 3820052140982 2 1 Cubits.com Services/Others — 3830053961615 2 1 Cubits.com Services/Others — 3840055586746 2 1 Cubits.com Services/Others — 3850056053704 2 1 Luno.com Exchanges South Africa 3860058665155 2 1 Xapo.com Services/Others — 3870058696998 2 1 Cubits.com Services/Others — 3880058767317 2 1 Cubits.com Services/Others — 3890059011161 2 1 Bittrex.com Exchanges USA End of Table A·3 33 Appendix B: Illustrating Adjacent Matrices of GtorXsd Fig. B·1 illustrates the adjacency matrices for all the netw orks Gtin Table I, or equivalently the non-negative matrix Xsdgiven by (15). Fig. B·1. Adjacent matrices for all the networks Gtin Table I, or equivalently Xsdgiven by (15). Colors show the strength of links, expressed by the frequencies. 34 Appendix C: Topic Model of Latent Dirichlet Allocation (LDA ) Topic models in natural language processing and machine lea rning are probablistic models for how terms appear in documents in a given corpus. Assumed is th e term frequency, irrespective of the sequential order of term occurences; such an assumption is o ften called “bag-of-words”. A topic is a latent variable in the model for explaining term frequency occurrences. Latent Dirichelt allocation (LDA) [41] is such a model widely used in a variety of applicat ions. See [37, 42, 43] and references therein for introduction and applications. In this appendi x, we briefly summarize the topic model only for the purpose of explicitly relating it with non-negative matrix factorization (NMF). Ddocuments in a corpus (a collection of documents) are given w ith a vocaburary of Vterms (different words). Document d(d=1,..., D) comprises Ndwords, possibly with duplication, each denoted by wdn(n=1,..., Nd).Ktopics are assumed to be present for the given corpus. A topic is a latent or hidden variable giving a probability distributi on for term occurrences. If a document is an article on sports, terms like “swimming” and “gymnastics” a re likely to occur, while “market” and “employee” will be unlikely. Consider the example of an article on “influence of hosting Ol ylmics to economy” in a corpus of newspaper. It would be natural to consider that the article b elongs to two topics of sports and economy. In topic models, documents are not assumed to belong to a sing le topic, but to simultaneously belong to multiple topics, and the topics vary among documents. Top ic models aim at modeling such mixed membership. Document dhas a topic distribution , which is a multinomial distribution with the parameters: θd=(θd1,...,θ dK), (C·1) whereθdk=p(k|θd) is the probability that a topic kis assigned to the document d, satisfying θdk≥0 andK/summationdisplay k=1θdk=1. (C·2) Then a topic zdn∈{1,..., K}is assigned to each word wdnforn=1,..., Nd. Each topic kis aterm distribution , which is also a multinomial distribution with the paramete rs: φk=(φk1,...,φ kV), (C·3) whereφkv=p(v|φk) is the probability that a term voccurs, satisfying φkv≥0 andV/summationdisplay v=1φkv=1. (C·4) The topic model of LDA can be most readily understood by looki ng at how it generates words in documents as follows. 1. For each topic k=1,..., K, generate the parameters φkfor the term distribution by φk∼Dir(β), (C·5) where∼reads that a variable is realized as a sample from the distrib ution on the right-hand side, and Dir(·) is the Dirichlet distribution7.β=(β1,...,β V) is a set of hyper-parameters with βi>0. 7Dirichlet distribution is defined by Dir(x|ξ)=Γ/parenleftig/summationtextI i′=1ξi′/parenrightig /producttextI i′′=1Γ(ξi′′)×I/productdisplay i=1xξi−1 i, where Iis the number of variables and it is assumed that xi≥0 for all iand/summationtextI i=1xi=1.Γ(·) is the gamma function defined byΓ(u)=/integraltext∞ 0tu−1e−tdtforu>0. Dirichlet distribution is a generalization of Beta distr ibution (the case I=2). 35 2. Now for each document d=1,..., D, (a) generate the parameters θdfor the topic distribution by θd∼Dir(α), (C·6) whereα=(α1,...,α K) is a set of hyper-parameters with αk>0. (b) For each word wdn(n=1,..., Nd) (i) genrate a topic by zdn∼Cat(θd), (C·7) where Cat(·) is the categorical distribution8, and then (ii) genrate a word from the vocaburary by wdn∼Cat(φk=zdn). (C·8) Note that a topic is assigned to each occurence of word wdnat the location nof the document d, depending on how the document dhas a mixture of topics, but is not associated with each term vin the vocaburary of Vterms. In the previous example, the term “swimming” occurs w ith a relatively high probability if the topic of sports is assigned at the loc ation of occurence, but the term will not be likely to occur if the topic of economy is assigned at the same location. Given the number of topics, K, and the hyper-parameters, βandα, the modelMcan be specified by the parameters {θd}d=1,...,Dand{φk}k=1,...,K, while the dataDcomprises Ddocuments, each of which is a set of words {wdn}n=1,...,Ndford=1,..., D. In the Bayesian framework of p(M|D )=p(D|M )·p(M) p(D). (C·9) the prior distribution p(M) is given by the Dirichlet distributions of (C·5) and (C·6). It is easy to show that the likelihood p(D|M ) can be written by logp(D|M )=D/summationdisplay d=1Nd/summationdisplay n=1logK/summationdisplay k=1θdk·φkwdn, (C·10) which follows from the assumption of bag-of-words and the in dependence of documents. Estima- tion of parameters by maximum likelihood or Bayesian framew orks has a difficulty due to the log of sum in (C·10), so there are a variety of technical methods suc h as EM (expectation and maximiza- tion), variational Bayes, and MCMC (Markov chain Monte Carl o) algorithms (see [37, 42, 43] and references therein). For our purpose, let us turn out attention to how a word is chos en from the Vterms in the vocabu- rary in the Ddocuments, given the model parameters. Looking at (C·7) and (C·8), one can see that the probability that a term vis chosen as a word in the document d, denoted byλdv, is given by λdv=K/summationdisplay k=1θdk·φkv, (C·11) where it is assumed that λdv≥0 andV/summationdisplay v=1λdv=1. (C·12) 8Categorical distribution is a multinomial distribution fo r a single trial (a roll of a dice), i.e. Cat(v|φ)=φv, where v∈{1,..., V}andφ=(φ1,...,φ V) withφv≥0 for all vand/summationtext vφv=1. 36 (Note that (C·11) is the factor in the likelihood (C·10)). In terms of matrices, the D×Vmatrix, denoted by Λ, with elementsλdvis represented by a product of two matrices; the D×Kmatrix Θwith elementsθdktimes the K×VmatrixΦwith elementsφkv. Note that it is usually the case thatK≪VandK≪D. One can immediately see that (C·11) is actually a non-negat ive matrix factorization (NMF) of Λby two generally much smaller matrices: Λ=Θ·Φ (C·13) under the conditions of (C·2) and (C·4), from which (C·12) fo llows. A document-term matrix is the D×Vmatrix, the rows and columns of which correspond to the documents and terms respectively, and each element is th e frequency (or any other measure that represents some intensity) for the term occurences. One can regard the document-term matrix as a realization in the sense that each element at column vand row drepresents how the term vwas realized in the document daccording to the categorical (multinomial) distribution w ith the parameter λdv. See the main text in Section 3.4. How to determine the number of topics, K, is important. There have been a number of works on this issue. A class of studies [38–40] is based on some measur e to compute similarities of extracted topics, called coherence. The idea is that an optimal value o fKis the point where the overall dissim- ilarity among topics achieves a maximum, because extracted topics should be di fferent to a certain degree. Other approaches include the idea of perplexity [37 ], hierarchical Dirichlet process [44], and so forth. It is beyond the present paper to review these appro ches. Interested readers are guided to look at them and reviews [42, 43] with references therein. In the m ain text, we use the idea of coherence [38–40], which we find to work well for our purpose. 37 Appendix D: Optimal Number of NMF Components In Section 3.4, we showed that the matrix decomposition of NM F can be regarded as a probablis- tic model, which is equivalent to a model of probabilistic la tent semantic analysis (PLSA) in natural language processing, in particular, latent Dirichlet allo cation (LDA). The number of NMF compo- nents is such an analogous parameter as the number of topics i n the latter. Then, as a bonus, one can employ the method of estimating the number of topics to our pr oblem of detemining the number of NMF components, K. We found that three di fferent methods in the literature [38–40] give a consis- tent result for the optimal value of K, and also that one of them [39] is relatively stable in giving the optimal (see Fig. 8). In Fig. D·1, we summarize the same result for the data in all th e other months in the same year. We found that the optimal number Kis not volatile in its variation among di fferent months, and also small in its value ranging around 11–18. Table D·1 shows the o ptimal values for all the months of the year 2019. Table D·1. Optimal values for the number of NMF components, K, estimated from Fig. D·1 Month Optimal K 01 14 02 16 03 18 04 16 05 16 06 18 07 15 08 12 09 13 10 11 11 13 12 13 38 Fig. D·1. Determining K, the number of NMF components, by minimizing the measure of c oherence [39]. We performed Monte Carlo simulations with 20 runs for each nu mber of components. Averages (points) and 99% level (gray band, narrow) calculated from standard erro rs are drawn. Data: all months in the year 2019. 39
{ "id": "2106.11446" }
2403.00018
Crypto Technology -- Impact on Global Economy
The last decade has been marked by the evolution of cryptocurrencies, which have captured the interest of the public through the offered opportunities and the feeling of freedom, resulting from decentralization and lack of authority to oversee how cryptocurrency transactions are conducted. The innovation in crypto space is often compared to the impact internet had on human life. There is a new term called Web 3.0 for denoting all new computing innovations arising due to the blockchain technologies. Blockchain has emerged as one of the most important inventions of the last decade with crypto currencies or financial use case as one of the domains which progressed most in the last 10 years. It is very important to research about Web 3 technologies, how it is connected to crypto economy and what to expect in this field for the next several decades.
http://arxiv.org/pdf/2403.00018v1
Arunkumar Velayudhan Pillai
cs.CR, cs.CY
cs.CR
Volume 3 | Issue 1 | 1Crypto Technology - Impact on Global Economy Short Article *Corresponding Author Arunkumar Pillai, Central Washington University, United States. Submitted: 2024, Jan 16; Accepted: 2024, Feb 09; Published: 2024, Feb 14Arunkumar Pillai* Citation: Pillai, A. (2024). Crypto Technology - Impact on Global Economy. J Curr Trends Comp Sci Res, 3(1), 01-05.Central Washington University, United States J Curr Trends Comp Sci Res, 20241. Introduction and Background The last decade has been marked by the evolution of cryptocurrencies, which have captured the interest of the public through the offered opportunities and the feeling of freedom, resulting from decentralization and lack of authority to oversee how cryptocurrency transactions are conducted. The innovation in crypto space is often compared to the impact internet had on human life. There is a new term called Web 3.0 for denoting all new computing innovations arising due to the blockchain technologies. Blockchain has emerged as one of the most important inventions of the last decade with crypto currencies or financial use case as one of the domains which progressed most in the last 10 years. It is very important to research about Web 3 technologies, how it is connected to crypto economy and what to expect in this field for the next several decades. Economics research so far has provided little insight into the economic relevance of cryptocurrencies. Most existing models of cryptocurrencies are built by computer scientists who mainly focus on the feasibility and security of these systems. Crucial issues such as the incentives of participants to cheat and the endogenous nature of some key variables such as the real value of a cryptocurrency in exchange have been largely ignored. Such considerations, however, are pivotal for understanding the optimal design and, hence, the economic value of cryptocurrency as a means of payment. Crypto currency uses an underlying Blockchain technology which solves an important double spend problem for financial industry. The original Bitcoin blockchain solved the double spend problem using a costly distributed computing transaction validation process also known as mining. Blockchain technologies have evolved to handle many complex problems and one of the most popular blockchain Ethereum can be looked at as a powerful computer that can solve several day-to-day problems. This paper analyses crypto industry’s overall contribution to economy thus far and what areas it will continue to contribute and make significant economical contributions. The analysis will include the potential newer innovations that are still in early stages and role of regulators to help accelerate the industry. What is the Impact of Cryptocurrencies on Global Economy? The growth of the digital assets industry, particularly in the last 12 years with the rise of Bitcoin, has been unprecedented. It has not only become larger than many countries in a short period of time, but it has also created numerous job and economic opportunities. The majority of these jobs were created in the aftermath of the industry's boom in 2017. From 2015 to 2019, the percentage of crypto-related jobs in the mainstream economy increased by nearly 1,500%. There are currently over 17,000 different cryptocurrencies being traded on 459 exchanges, with a total value of about $1.7 trillion. Consider that the applications of blockchain technology have greatly expanded in recent years. Non-fungible tokens (NFTs) for digital art sales, decentralized autonomous organizations (DAOs) for fundraising, and play-to-earn games with blockchain features are all recent innovations. These new applications further complicate the sector and increase the demand for new talent [1]. Technology jobs in crypto industry grew 395% in the U.S. from 2020 to 2021, outpacing the wider tech industry, which saw a 98% increase [2]. There is also a surge in the influx of funding in the industry. Investors worldwide poured $30 billion into crypto and blockchain startups in 2021, according to Pitchbook data. At the same time, public interest in crypto exploded as high profile evangelists like Elon Musk praised the technology—and crypto companies entered the mainstream, as evidenced by the newly- christened Crypto.com Arena in Los Angeles. Institutional economics understands the economy as made of rules. Rules (like laws, languages, property rights, regulations, social norms, and ideologies) allow dispersed and opportunistic people to coordinate their activity together. Rules facilitate exchange — economic exchange but also social and political exchange as well. What has come to be called crypto economics focuses on the economic principles and theory underpinning the blockchain and alternative blockchain implementations. It looks at game theory and incentive design as they relate to blockchain mechanism Journal of Current Trends in Computer Science Research ISSN: 2836-8495 Volume 3 | Issue 1 | 2 J Curr Trends Comp Sci Res, 2024design. Institutional crypto economics is interested in the rules that govern ledgers, the social, political, and economic institutions that have developed to service those ledgers, and how the invention of the blockchain changes the patterns of ledgers throughout society. Institutional crypto economics gives us the tools to understand what is happening in the blockchain revolution — and what we can’t predict. Blockchains are an experimental technology. Where the blockchain can be used is an entrepreneurial question. Some ledgers will move onto the blockchain. Some entrepreneurs will try to move ledgers onto the blockchain and fail. Not everything is a blockchain use case. We probably haven’t yet seen the blockchain killer app yet. Nor can we predict what the combination of ledgers, cryptography, peer to peer networking will throw up in the future. This process is going to be extremely disruptive. The global economy faces (what we expect will be) a lengthy period of uncertainty about how the facts that underpin it will be restructured, dismantled, and reorganized. The best uses of the blockchain must be ‘discovered’. Then they have to be implemented in a real world political and economic system that has deep, established institutions that already service ledgers. That second part will not be cost free. Best Analogy would be that of how TikTok a social media application using short videos revolutionized the entire social media land scape using their inventive approach. Blockchain technology brings a significant paradigm shift to internet. It now elevates the internet community to not only interact, share, comment on original content, but provides a fool proof model for original content ownership. This model can be a huge once an application developer solves an interesting real-life use case using this technology. The blockchain and associated technological changes will massively disrupt current economic conditions. The industrial revolution ushered in a world where business models were predicated on hierarchy and financial capitalism. The blockchain revolution will see an economy dominated by human capitalism and greater individual autonomy. How that unfolds is unclear at present. Entrepreneurs and innovators will resolve uncertainty, as always, through a process of trial and error. No doubt great fortunes will be made and lost before we know exactly how this disruption will unfold. What will be the Major Innovations Using Blockchain Technology? From financial services to retail and e-commerce, media and entertainment, healthcare, IT, government, and energy: Almost every sector is expected to adopt Web3.0 blockchain. Because Web3.0 relies heavily on blockchain, many wrongly believe that its fate is inevitably linked to the volatile cryptocurrency market. However, cryptos are just one part of the new sector [3]. Gartner explains that while cryptocurrencies crashed in the first half of 2022, decisionmakers should not assume that the value of Web3.0 technology is affected. According to the research and consulting firm, Web3.0 tech will soon reach its adoption tipping point and industries from aircraft maintenance to food safety will tokenize their applications. Web3 blockchain will completely transform the existing conventional processes of the different sectors. In 2023, the Web3.0 blockchain technology sector will be worth more than six trillion dollars, and Web3.0 will continue to grow at a CAGR of 44.6% from 2023 to 2030 [4]. The concept of Web3.0 implies data ownership and decentralized control. The first version of the internet, Web1.0, was built solely on content produced by governments, organizations, and businesses. This web was mainly oriented to information and slowly but gradually shifted to a consumer-driven space [5]. DAOs are a type of organizational structure that have been built through the power of blockchain. DAOs are a group of like- minded individuals who work together for the long-term success of the project or creator that they are backing. DAOs offer “a say” with voting rights usually offered if you are a token holder of the project that you’re a member of [6]. 2. Growth of Crypto Economy Research using existing data available in another research. We use the market capitalization of crypto currencies and coins operating in the Web 3 technologies. The following diagram will help to understand the market cap growth of Crypto economy in last decade. Market cap is a good indicator for measuring the product value of an industry. Volume 3 | Issue 1 | 3 Figure 1: Crypto currency market cap comparison The digital assets industry has experienced rapid growth in the past several years, reaching a market capitalization of $3 trillion in November 2021. However, the past year has been difficult for the industry, with a 70% drop in market cap to around $790 billion in December 2022. While this decline may appear concerning, it is important to consider the industry's performance within the larger context of the global economy. It is possible that the market is behaving similarly to the high-tech industry and may be preparing for the next phase of growth. Overall, the data suggests that there is still significant potential for growth in the digital assets industry. Using the secondary data analysis, one can investigate a successful business use case solved by block chain technologies by Ripple Labs, US based block chain company. Native use case of cross border payments using Web 3 technology. Ripple which owns a coin in the symbol of XRP is a very successful crypto protocol which has established a unique business use case of cross border payments using blockchain. Their open source, permission less and decentralized technology is carbon neutral and can settle a cross border transaction in 3-5 seconds compared to the conventional Swift transaction protocol which can take up to 3-4 business days. XRP transaction fees cost $0.0002 per transaction on average. The global cross-border payments will reach US $156 trillion in 2022. Thus, confirming it as a trillion-dollar market. According to Juniper research, solely the B2B cross-border payments will be a $35 trillion economy in 2022 [7]. Key advantages of block- chain operated cross border payments are (a) Faster settlement – A block chain enabled cross border payment takes minutes or sec-onds compared to up to 5 business days for the conventional cross border payments, (b) Cost effective – transaction fees is limited to the blockchain operator, (c) Enhanced security – Blockchain cross border payments leverage the same crypto technology that is used for crypto currencies. A private key or digital signature becomes invalid in case of any hacking event, (d) Improved transparency – every transaction and holdings are easy to view on an explorer. The participants can view the transactions and entries in the sys- tem is validated. Another secondary data to look for signals about the Web 3 indus- try growth would be about the private equity investments in this sector. In 2020 in average $4.8 billion were invested across web 3 and crypto related startups. In 2021 this average raised up to $31.7 billion (7 times bigger), a quick reminder that 2020-2021 were the peak of the corona crisis. In the first 2 quarters of 2022 despite the global economic crisis and war in the middle of Europe, the crypto sector Fundraised additional $15 billion which is even more than in the same quarter last year. Though all the factors that should have negatively influenced the Web 3 sector, and the mood of investors, the industry keeps show- ing an exceptional growth through the last 3 years. At this time a lot of people might feel themselves unready to commit anything and develop their product with such market conditions which shows the general strength and future potential of this sector. Web3 future application land scape can be understood from the follow- ing diagram [8]. J Curr Trends Comp Sci Res, 2024 Volume 3 | Issue 1 | 4 Figure 2: Web 3 Future Web3 native companies are companies that utilize decentralized technologies such as blockchain and operate on the Web3 platform. These companies have the potential to disrupt a wide range of industries and create new opportunities for both themselves and incumbent companies. There are three levels at which this disruption is likely to occur: assets, infrastructure, and services. In the asset realm, new and unexplored assets such as stablecoins, non-fungible tokens (NFTs), and tokenized real estate may continue to be created and gain popularity. This presents opportunities for incumbent companies to facilitate access to these assets or tokenize their own existing assets. In terms of infrastructure, there is a need for the development of core infrastructure to support the new Web3 assets. Incumbent companies may have the opportunity to partner with Web3 native companies to innovate their offerings and support the growth of the necessary infrastructure. Finally, new Web3 native services such as marketplaces, payment networks, and deposit and loan platforms may emerge and potentially replicate the functionality of traditional services. Incumbent companies may choose to partner with these Web3 disruptors to tap into new services and bring enhanced value propositions to their user bases while retaining traditional protections and economics. 3. Conclusion This paper looked at research topic of crypto technologies and how it will impact the overall global economy. It considered three potential research method to conduct the analysis and determined the secondary research method as the most effective mechanisms for conducting this research. The research looked at crypto economy market cap, the job generation in last decade in this industry and innovation landscape within Web 3 to determine that Web3 and crypto technologies are powerful disruptors in the digital industry. It has proved its value in very real business problems such as cross border payments. While it needs to be expanded to a lot more use cases, we can already see that industry is making huge progress towards the next wave of growth in decentralized finance and decentralized organizations. There is still a big gap in the regulatory frameworks that exist for this industry to strive. This paper analyzed potential measures such as registering as a state trust or national trust charter, undergoing annual audits, establishing reasonable controls and board governance, meeting basic cybersecurity standards, implementing KYC and AML policies, establishing a licensing and registration regime, requiring strong consumer protection rules, and prohibiting market manipulation [9-12]. This paper analyzed broader crypto technology industry and its impact on global economy using the past 10 years of business data. It concluded that crypto technologies have opened a new paradigm shift in digital technology using block chain powered decentralization framework. This is truly an innovation that can be compared to some of the original foundational technologies that power internet or even as basic innovation as electricity. There is a big role in this industry for improving regulatory framework which can help to make it free from fraud and bad actors trying J Curr Trends Comp Sci Res, 2024 Volume 3 | Issue 1 | 5to spoil the trust of the industry and in turn slowing the down the speed of innovation. References 1. GDA Capital. (2021). June 1. How cryptocurrency is changing the gaming industry. https://gda.capital/2021/06/01/how- cryptocurrency-is-changing-the-gaming-industry/ 2. Crypto Reporter. (2021). Month Day. Crypto-related jobs postings 2021. https://www.crypto-reporter.com/news/crypto- related-jobs-postings-2021-24060/ 3. Litan, A. (2022). Gartner Hype Cycle for Blockchain and Web3. https://blogs.gartner.com/avivah-litan/2022/07/22/ gartner-hype-cycle-for-blockchain-and-web3-2022/ 4. Market Research Future. (2022). March. Web 3.0 blockchain market. https://www.marketresearchfuture.com/reports/web- 3-0-blockchain-market-10746 5. Ray Fernandez (2022). August 29. Web blockchain technology market. https://www.techrepublic.com/article/ web-blockchain-technology-market/ 6. Cointelegraph (n.d). What is a DAO? https://cointelegraph. com/daos-for-beginners/what-is-a-dao 7. Bayram, O. (2020). Importance of Blockchain use in cross-border payments and evaluation of the progress in this area. Doğuş Üniversitesi Dergisi, 21(1), 171-189. https://doiorg. ezp.lib.cwu.edu/10.31671/dogus.2020.444 8. McKinsey & Company. (2022). Web3: Beyond the Hype. McKinsey & Company. https://www.mckinsey.com/ industries/financial-services/our-insights/web3-beyond-the- hype 9. Brian A. (2022). Dec. Regulating crypto: How we move forward as an industry from here. https://www.coinbase. com/blog/regulating-crypto-how-we-move-forward-as-an- industry-fromhere 10. Levis, D., Fontana, F., & Ughetto, E. (2021). A look into the future of blockchain technology. Plos one, 16(11), e0258995. https://doi-org.ezp.lib.cwu.edu/10.1371/journal. pone.0258995 11. GDA Capital. (2022). How Many Jobs Has the Crypto Industry Created? GDA Capital. https://gda.capital/2022/03/30/how- many-jobs-has-the-crypto-industry-created/ 12. LinkedIn News. (2022, Dec). The work shift economy [Post]. https://www.linkedin.com/posts/linkedin-news_theworkshift- economy-labormarket-activity-6887062336839016450-67iT/ Copyright: ©2024 Arunkumar Pillai. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. https://opastpublishers.com/ J Curr Trends Comp Sci Res, 2024
{ "id": "2403.00018" }
2104.01764
A Big Data Analysis of the Ethereum Network: from Blockchain to Google Trends
First, a big data analysis of the transactions and smart contracts made on the Ethereum blockchain is performed, revealing interesting trends in motion. Next, these trends are compared with the public's interest in Ether and Bitcoin, measured by the volume of online searches. An analysis of the crypto prices and search trends suggests the existence of big players (and not the regular users), manipulating the market after a drop in prices. Lastly, a cross-correlation study of crypto prices and search trends reveals the pairs providing more accurate and timely predictions of Ether prices.
http://arxiv.org/pdf/2104.01764v1
Dorsa Mohammadi Arezooji
q-fin.TR
q-fin.TR
A Big Data Analysis of the Ethereum Network: from Blockchain to Google Trends Dorsa Mohammadi Arezooji Center for Complex Networks and Social DataScience (CCNSD) Department of Physics, Shahid Beheshti University Tehran, Iran d.mohammadiarezooji@se19.qmul.ac.uk Abstract : First, a big data analysis of the transactions and smart contracts made on the Ethereum blockchain is performed, revealing interesting trends in motion. Next, these trends are compared with the public's interest in Ether and Bitcoin, measured by the volume of online searches. An analysis of the crypto prices and search trends suggests the existence of big players (and not the regular users), manipulating the market after a drop in prices. Lastly , a cross-correlation study of crypto prices and search trends reveals the pairs providing more accurate and timely predictions of Ether prices. Keywords: Big Data, Ethereum, Bitcoin, Hadoop, Spark, Cross-correlation, Complexity 1. Introduction Blockchains technology and cryptocurrencies such as Ethereum and Bitcoin have attracted the rapidly increasing attention of many industries and researchers from various fields. Part of the Blockchain’s appeal to physicists and data scientists stems from its complexity and underlying interdependencies that affect and take influence from other complex systems namely financial and social networks. The intuition behind bringing social networks into consideration while analyzing blockchains, lies within their decentralized structure. At its core, decentralization was introduced to remove heterogeneity from systems. In the case of cryptocurrencies, this would cause governments and central banks to lose their monopoly in financial markets. This would also mean that the network itself (active users) now controls the changes in the blockchain. Needless to say, the power of decentralization depends on how decentralized the network really is. In other words, in the case of disproportionately weighted “central” nodes, the network would be prone to severe heterogeneity threats [1]. Several studies have explored the degree of centrality in decentralized financial networks, revealing that they may not be as decentralized as one would expect [2]. 2. Background The initial idea that led to the birth of blockchain was first proposed in 1990 by S. Haber and W. S. Stornetta. They introduced a novel, computationally feasible set of procedures to timestamp digital data, which would make it impractical to alter the timestamp after its creation [3]. One of the most important implications of this approach is that there would be no need for a third-party service to keep record of the timestamps. Since then, blockchain technology has revolutionized many fields including healthcare [4,5], transportation [6,7], digital forensics [8], and cybersecurity [9,10] due to its reliability, immutability, and transparency. These characteristics are the direct results of the blockchain structure: data is divided into a collection of blocks that are all linked together by means of cryptography. This structure prevents tampering with any arbitrary block without changing all others; hence, achieving immutability. Furthermore, the data stored in any node across the network is visible to all users, thus, transparency is maintained. The decentralized data handling also prevents the two parties in a transaction to retroactively manipulate data stored in the network. In a nutshell, the blockchain establishes a general agreement that verifies the details of a transaction without the need to trust the parties involved [11]. 2.1. The Ethereum Blockchain The Ethereum blockchain is a type of distributed ledger technology (DLT), a general term used for databases that store and share information in a decentralized network of independent nodes. Even though most terms used in the context of Ethereum are not exclusive to this particular blockchain, there are a few terms that are. This section provides a brief introduction to the technical terms related to the Ethereum blockchain that are used in this paper. A comprehensive explanation of terms and concepts can be found in the Ethereum whitepaper (ethereum.org). 2.1.1. Gas On the Ethereum blockchain, the cost of performing transactions or processing smart contracts is measured by gas. The price of gas itself is not constant, but is reported by miners based on the complexity and computational resources required for the execution of each block. Gas fees are calculated in ether (ETH), which is Ethereum’s native currency. The smallest denomination of ether is named wei (1e-18 ETH). Gas price is usually reported in Gwei (1e-9 ETH). 2.1.2. Smart Contract The concept of smart contracts was introduced by N. Szabo in 1994 in an unpublished manuscript and then formally in 1997 [12]. Smart contracts are essentially blockchain-based applications, concisely, self-executing programs which contain the terms and agreements between the parties involved. The feature that sets smart contracts apart is that they automatically verify whether the terms of the agreement have been fulfilled or not. Additionally, to ensure reliability, fault tolerance, and transparency, the codes (smart contracts) are replicated on many nodes in the blockchain. Interestingly, the Ethereum blockchain has hosted roughly 1.5 million smart contracts in the last few years [13]. 2.2. Big Data Processing Big data is a term used to describe data that is too large to be processed with conventional methods, and keeps growing exponentially with time. Big data processing tools and frameworks such as Apache Hadoop enable distributed processing of large-scale data, a task made possible by a network of heterogeneous computation units. In essence, a Hadoop cluster can be a cluster of commodity PCs (or virtual machines) that are connected and communicate with a master node. The philosophy of Hadoop is “moving the computation to the data”. This entails each node serving as both a storage unit and a processing unit. These two components, HDFS (Hadoop Distributed File System - storage) and YARN (Yet Another Resource Negotiator - computation), have been designed to work together in a single cluster [14,15]. By distributing the data and performing the computation in parallel, Hadoop is able to achieve scalability from a single node to thousands of nodes. Hadoop uses MapReduce to distribute the data among worker nodes. Similarly to the blockchain, the data is split into a number of blocks, each assigned to a node across the cluster. Apache Spark is another big data framework which is built on top of HDFS. By reducing disk read and write operations, Spark provides fast in-memory processing [16]. It is also suitable for both batch and streaming data, making it a versatile tool for a vast range of big data processing tasks. These tasks include machine learning, graph processing, and interactive queries on big data. Finally, Spark is written in Scala but has APIs in Java, R, and Python. 2.3. The Social Factor As it was previously mentioned, the interaction between complex networks such as the Ethereum blockchain and social networks can be quite fascinating. Analyzing social factors may offer an opportunity to gain insight into the events that induce changes in the market. With this in mind, Google Trends is chosen as a data source for assessing public interest in cryptocurrencies such as Ether and Bitcoin. The data shows the public interest measured by the aggregated sum of online searches. Google Trends data is publicly available with a few restrictions on data frequency. 3. Data and Tools The Ethereum dataset used for this analysis was originally collected from the dumps uploaded to a repository on Google’s BigQuery, now available as a public dataset. The dataset was uploaded to a Hadoop cluster and stored in HDFS. Due to its high speed and performance, Spark (in this study, specifically its python API, PySpark) was used to process the dataset (in order of TBs). The monthly total number of transactions, average gas, and gas price were aggregated and extracted from the dataset. 4. Analyses and Results An initial analysis of the data is visualized in fig 1, revealing a surge in the number of transactions, including smart contracts, in early 2018. Interestingly, this event coincides with the sudden surge in Ether and Bitcoin prices. The possible links between Ether and Bitcoin prices will be discussed in more depth. Another observation points to a rather steady decrease in gas price, with a slight increase in the beginning or at the end of each year. In addition, the average gas used for transactions seem to have reached a steady state as of late 2017. Finally, since with more complex contracts, more gas would be needed, the strong correlation (pearson correlation coefficient of 0.94) between smart contract’s difficulty and required gas can be explained. Fig. 1. Ethereum contracts and transactions over time Moving forward, Google Trends’ data is incorporated into the analysis as an exogenous feature. The first logical notion could be that with more people searching Ethereum online, more of them might invest and make transactions on the network. Hence, the number of transactions and the public interest in Ethereum are depicted in fig 2. It should be noted that the y axis is indicative of only the number of transactions and not the volume of online searches. Daily Google Trends data have been collected in 180-day intervals, then scaled and concatenated and finally normalized on the scale of 100. For a better visualization, they have been scaled once more to fit the y axis of the plot. The final results show that following the first abrupt increase in Google Trends’ data in mid 2017, the number of transactions didn’t experience the same dramatic change, possibly pointing to a lack of trust in the cryptocurrency and the blockchain. In any case, in early 2018 the number of transactions on the platform reached its highest as the volume of online searches also hit an all-time high. A rudimentary conclusion could be that an increase in the public’s interest in a cryptocurrency corresponds with an increase in the number of transactions made. Nevertheless, perhaps a more enticing objective is utilizing this information to predict how these factors affect the price of ETH. Fig. 2. Number of transactions vs. online search trends In line with the same analogy as above, the price of ETH and Bitcoin (BTC) are plotted in fig 3, along with their respective search volumes. It is speculated that the surge in ETH/USD in 2018 was correlated with the rise in BTC/USD, which itself was triggered by Tether (USDT). A study of the Bitcoin blockchain by Griffin and Shams showed that Tether-based transactions on the Bitcoin blockchain were timed following the drop in BTC/USD, setting in motion the soaring of Bitcoin prices [17]. Fig. 3. Cryptocurrency prices vs. online search trends At first glance, a side by side analysis of the crypto pair shows a similar trend. Both ETH/USD and BTC/USD skyrocketed in early 2018, following a rise in the public’s interest in the crypto market. However, after the similarly sharp fall in search volumes during 2018, crypto prices (especially ETH) did not drop as expected according to the public’s interest. This could be indicative of the existence of another entity other than the ordinary users entering the market: whales (large and powerful entities) holding on until after the drop to invest heavily. This assumption is in accordance with the conclusions made by Griffin and Shams, stating that crypto prices are not solely influenced by supply and demand [17]. Their analysis suggests that the distortion in Bitcoin prices was caused by a large player on Bitfinex using Tether to invest in large sums of Bitcoin. Considering the mechanisms responsible for the change in crypto prices, a statistical analysis of their returns can prove to be beneficial in deciding which assets to invest in. To obtain a stationary time series representing the changes in crypto prices, logarithmic returns of ETH/USD and BTC/USD are computed and plotted against time in fig 4. Fig. 4. Cryptocurrency log returns over time Comparing the probability density function (PDF) of Ether and Bitcoin’s log returns (fig 5), it can be deduced that both seem to follow a gaussian distribution. However, Bitcoin’s log returns’ PDF appears to be narrower and more peaked than Ether, hence, it would be a more suitable choice for risk-averse investments. Fig. 5. Cryptocurrency log returns histogram A more descriptive and quantifiable summary of the log returns are available in table 1. Interestingly, Ether’s log returns hit a maximum of 80%, almost 3 times higher than that of Bitcoin. Nonetheless, Ether’s minimum log return had dropped to -81%, about 1.5 times lower than that of Bitcoin. Table 1. Statistical summary of prices and log returns ETH/USD BTC/USD %R ETH %R BTC Mean 247.30 6355.57 3.38 0.25 std 284.43 6588.89 6.90 4.02 Min. 0.43 203.18 -81.26 -31.59 1 st Qu. 12.83 821.19 -2.27 -1.15 2 nd Qu 182.87 6148.42 0.12 0.23 3 rd Qu 323.72 9177.89 2.87 1.86 Max. 1845.82 47884.18 80.40 21.45 Finally, to understand how long it takes for changes to be reflected in crypto prices, the cross-correlation between the 4 time series are calculated. The time lag which corresponds to the maximum cross-correlation, denoted as “lag max”, shows the number of days until the second time series is maximally correlated with the first. Figure 6 illustrates a heatmap of the maximum cross-correlation between each pair of the four time series. The highest cross-correlation scores belong to the (ETH/USD, BTC/USD), (GoogleETH, GoogleBTC), and (ETH/USD, GoogleBTC) pairs respectively, suggesting that these pairs could serve well as predictors. Fig 6. Max cross-correlations heatmap The changes in cross-correlations are visualized against time lag in fig 6. It can be observed that the longest time lag belongs to the (ETH/USD, GoogleBTC) pair. In simple terms, this indicates that an increase in the volume of online searches for Bitcoin correlates with an increase in the ETH/USD approximately a month later. Based on time lags, the (ETH/USD, GoogleBTC), (ETH/USD, BTC/USD), and (ETH/USD, GoogleETH) pairs are the strongest contenders for timely predictions. It should be noted that in order to use this information for future analyses and prediction purposes, the strength of cross-correlations should be taken into consideration as well. Thus, the (ETH/USD, BTC/USD) and (ETH/USD, GoogleBTC) pairs provide both strong and timely predictions compared to other pairs. Finally, it is crucial to bear in mind that while the above statements are centered around cross-correlation, this concept should not be confused with causation. Studying the possible causal links requires utilizing other methods such as Bayesian structural learning and a deep understanding of economics and Blockchain. Fig. 7. Cross-correlations vs. time lag 5. Discussion and Conclusions The analyses in this study suggest that considering the couplings between social and financial complex systems helps making better predictions about asset prices. Although here the links between only two assets were explored, it would be beneficial to extend this analysis to a wider range of components. Furthermore, this approach helps identify market manipulations and crypto price bubbles caused by entities other than the public. Future analyses may incorporate other sources of social data such as twitter to gain more insight. 6. References 1. Grilli R, Tedeschi G, Gallegati M. Business fluctuations in a behavioral switching model: Gridlock effects and credit crunch phenomena in financial networks. Journal of Economic Dynamics and Control. 2020. p. 103863. doi: 10.1016/j.jedc.2020.103863 2. Demythifying the belief in cryptocurrencies decentralized aspects. A study of cryptocurrencies time cross-correlations with common currencies, commodities and financial indices. Physica A: Statistical Mechanics and its Applications. 2020;556: 124759. 3. DIMACS (GROUP), Haber S, Scott Stornetta W. How to Time-stamp a Digital Document. 1990. 4. Angraal S, Krumholz HM, Schulz WL. Blockchain Technology: Applications in Health Care. Circ Cardiovasc Qual Outcomes. 2017;10. doi:10.1161/CIRCOUTCOMES.117.003800 5. Du X, Chen B, Ma M, Zhang Y. Research on the Application of Blockchain in Smart Healthcare: Constructing a Hierarchical Framework. J Healthc Eng. 2021;2021: 6698122. 6. Subramanian N, Chaudhuri A, Kayıkcı Y. Blockchain Applications and Future Opportunities in Transportation. Blockchain and Supply Chain Logistics. 2020. pp. 39–48. doi: 10.1007/978-3-030-47531-4_5 7. Niu B, Mu Z, Cao B, Gao J. Should multinational firms implement blockchain to provide quality verification? Transportation Research Part E: Logistics and Transportation Review. 2021. p. 102121. doi: 10.1016/j.tre.2020.102121 8. Kumar M. Applications of Blockchain in Digital Forensics and Forensics Readiness. Blockchain for Cybersecurity and Privacy. 2020. pp. 339–364. doi: 10.1201/9780429324932-20 9. Adebayo A, Rawat DB, Njilla L, Kamhoua CA. Blockchain ‐ enabled Information Sharing Framework for Cybersecurity. Blockchain for Distributed Systems Security. 2019. pp. 143–158. doi: 10.1002/9781119519621.ch7 10. Sukhija N, Sample J-G, Bautista E. Advancing the Cybersecurity of Electronic Voting Machines Using Blockchain Technology. Essentials of Blockchain Technology. 2019. pp. 235–256. doi: 10.1201/9780429674457-11 11. Werbach K. The Blockchain and the New Architecture of Trust. MIT Press; 2018. 12. Szabo N. Formalizing and securing relationships on public networks. First monday. 1997. 13. Giuseppe Antonio Pierro, Roberto Tonelli, Michele Marchesi. An Organized Repository of Ethereum Smart Contracts’ Source Codes and Metrics. Future Internet. 2020;12: 197. 14. Vavilapalli VK, Murthy AC, Douglas C, Agarwal S, Konar M, Evans R, Graves T, Lowe J, Shah H, Seth S, Saha B. Apache hadoop yarn: Yet another resource negotiator. Proceedings of the 4th annual Symposium on Cloud Computing. 2013. pp. 1–16. 15. Borthakur, D. The hadoop distributed file system: Architecture and design. In: Hadoop Project Website. 2007. 16. Zaharia M, Xin RS, Wendell P, Das T, Armbrust M, Dave A, Meng X, Rosen J, Venkataraman S, Franklin MJ, Ghodsi A. Apache spark: a unified engine for big data processing. Commun ACM. 2016;28: 56–65. 17. Griffin JM, Shams A. Is Bitcoin Really Untethered? The Journal of Finance. 2020;75: 1913–1964.
{ "id": "2104.01764" }
2312.04173
Contract Wallet Using Emails
We proposed a new construction for contract wallets, smart contract applications that allow users to control their crypto assets. Users can manipulate their crypto assets by simply sending emails with no need to manage keys. These emails are verified using zero-knowledge proof (ZKP) along with their attached digital signatures that the sender domain server (SDS) generates according to DomainKeys Identified Mail. Unless the SDS forges the emails, the crypto assets remain secure in the proposed system. Moreover, the existing SDSs can be used as is by outsourcing additional work to a third party that is not necessarily trusted. The system supports various functions to manipulate crypto assets. We produced a tool for variable-regex mapping (VRM) that enables developers to build a new function without ZKP skills. For example, using the tool, we built a demo application where users can exchange crypto assets via Uniswap only with emails. The published version of this paper is available at https://doi.org/10.1109/ICBC56567.2023.10174932.
http://arxiv.org/pdf/2312.04173v1
Sora Suegami, Kyohei Shibano
cs.CR
cs.CR
Contract Wallet Using Emails Sora Suegami Dept. of Information and Communication Engineering The University of Tokyo Tokyo, Japan suegamisora@g.ecc.u-tokyo.ac.jpKyohei Shibano Dept. of Technology Management for Innovation The University of Tokyo Tokyo, Japan shibano@tmi.t.u-tokyo.ac.jp Abstract —We proposed a new construction for contract wal- lets, smart contract applications that allow users to control their crypto assets. Users can manipulate their crypto assets by simply sending emails with no need to manage keys. These emails are verified using zero-knowledge proof (ZKP) along with their attached digital signatures that the sender domain server (SDS) generates according to DomainKeys Identified Mail. Unless the SDS forges the emails, the crypto assets remain secure in the proposed system. Moreover, the existing SDSs can be used as is by outsourcing additional work to a third party that is not necessarily trusted. The system supports various functions to manipulate crypto assets. We produced a tool for variable-regex mapping (VRM) that enables developers to build a new function without ZKP skills. For example, using the tool, we built a demo application where users can exchange crypto assets via Uniswap only with emails. The published version of this paper is available at https://doi.org/10.1109/ICBC56567.2023.10174932. Index Terms —contract wallet, account abstraction, zero- knowledge proof I. I NTRODUCTION In Ethereum blockchain, contract wallets hold users’ crypto assets and provide more functional management of these assets than standard wallet services such as MetaMask. For example, some contract wallets require multiple digital signatures to transfer crypto assets [1]. However, most of them require users to install new software or access new web pages. In other words, users cannot manipulate their crypto assets with existing familiar tools, e.g., email. To solve this problem, we proposed Email Wallet , a con- tract wallet that enables users to manage their crypto assets by simply sending emails. Our system is based on a technique in [2] and [3] that verifies the sender domain of emails with zero- knowledge proof (ZKP). The crypto assets stored in our system are secure unless the SDS forges the user’s email, and the user needs to manage no private keys. Additional work for our system can be outsourced to a third party called an aggregator, which is neither a user nor an SDS, and not necessarily trusted. Our new technique, variable-regex mapping (VRM), allows a developer to build a new function to manipulate assets without ZKP skills. II. S YSTEM OVERVIEW Our system is one of the contract wallets operated by users, aggregators, and the Ethereum blockchain. Users are identifiedby their email addresses. They deposit their crypto assets in a smart contract, called a wallet contract, by specifying their email addresses and transferring the assets to the contract address. The deposited assets are manipulated according to functions defined as manipulation rules. Each manipulation rule consists of an ID, a regular expression (regex), and another smart contract called a manipulation contract that implements the manipulation method. The regex (e.g., “Transfer \d{1,20 } wei Ether.”) is decomposed into fixed parts (e.g., “Transfer”) and variable parts (e.g., “ \d{1,20 }”), and the manipulation contract has access to the latter values. The user specifies the ID of the manipulation rule in the email title and writes the email body to match the corresponding regex. The user’s email is processed by the SDS that supports DomainKeys Identified Mail (DKIM) and an aggregator (Fig- ure 1). Herein, we assume that a public key of the SDS is published in the domain name system and is previously registered in the wallet contract. We suppose the SDS follows pkcs1-v1 5 defined as RFC 3447 [4]: it computes a hash value of the email with SHA256 and generates an RSA digital signature for that value. It is also assumed that the SDS does not change the public key or forge the user’s email and the aggregator publishes its own email address. 1) The user sends an email to the aggregator’s email address. 2) The SDS attaches a digital signature to the email ac- cording to the DKIM protocol. 3) The aggregator uses the ID in the email title to search for a manipulation rule and checks that the email content satisfies the corresponding regex. 4) The aggregator generates a proof with the received email. Then, it creates a transaction including the proof, sender’s email address, RSA public key, ID, and values of the variable parts of the regex and submits it to the wallet contract. The wallet contract verifies the proof with the other submitted data and checks that the SDS’s public key matches the one reg- istered in the contract. If the verification succeeds, the wallet contract invokes the manipulation contract corresponding to the ID to manipulate the crypto assets of that user. A. Implementation Our implementation consists of a ZKP circuit, smart con- tracts, and the tool for the VRM. The circuit was built with 978-8-3503-1019-1/23/$31.00 ©2023 IEEEarXiv:2312.04173v1 [cs.CR] 7 Dec 2023 Fig. 1. Email Wallet architecture the halo2 library developed by Privacy & Scaling Explorations team [5]. The circuit takes the email header/body and the RSA digital signature as a witness (or private input) and the sender’s email address, RSA public key, ID, and values of the variable parts of the regex as an instance (or public input). It computes the hash value of the email using a SHA256 chip that supports variable-length input and a base64 conversion chip. Then, it verifies the signature using an RSA verification chip for the hash value and the public key. It also uses a regex verification chip to verify that a string that combines the fixed parts with the values of the variable parts satisfies the regex. The last chip is implemented according to the idea proposed in [3]. It transforms a regex into an equivalent finite automaton and verifies that the initial state is transitioned to an accepted state by a given string. Notably, the maximum string length is fixed because the circuit size must be fixed. Our smart contracts, i.e., the wallet contract and the manip- ulation contracts, are implemented with Solidity. The wallet contract stores each user’s email address and balance per currency unit as user information. It also maintains an ID and address of the manipulation contract for each manipulation rule. The tool for the VRM is used to automatically generate a new regex verification chip. Specifically, for each manipulation rule, a developer defines a regex and implements a manip- ulation contract with Solidity. The tool outputs a bytecode of a verifier contract that verifies a proof for the circuit corresponding to the regex. The developer only has to call that contract before manipulating the crypto assets, with no prior knowledge of ZKP. III. D EMO APPLICATION We developed a demo application according to the descrip- tion in Section II. There are two manipulation rules: •Rule 1: If a user with Xsends an email with the message “Transfer A T toY,” the balance of TforXandYwill be decreased and increased by A, respectively. •Rule 2: If a user with Xsends an email with the message “Swap A T 1toT2via Uniswap,” the amount AofT1in the balance of Xis exchanged for T2with Uniswap, and the balance of T2is increased. Herein, XandYdenote email addresses; AandTrepresent a remittance amount and its currency unit, respectively. Using Rule 1, the user can transfer crypto assets deposited in thewallet contract by specifying the balance/currency unit and the recipient’s email address. Furthermore, Rule 2 allows the user to exchange those assets for another currency using Uniswap. The wallet contract address is used to send and receive assets to and from Uniswap. Using the tool for the VRM, we obtained the regex verifi- cation chips and bytecodes of the verifier contracts necessary for Rules 1 and 2. A. Tests We tested our implementation using the following scenario. There are two users, Alice and Bob. Aditionally, there is a SDS and an aggregator. First, Alice deposited 0.01 ETH in the wallet contract. Alice then transferred 0.005 ETH to Bob’s email address using Rule 1. Bob converted 0.005 ETH to DAI with Uniswap using Rule 2. We confirmed that Alice’s final balance is 0.005 ETH and Bob holds only some DAI, which amounts to 0.005 ETH when exchanged on Uniswap. We also tested invalid cases. In cases where the attached digital signature was invalid or the email did not match any valid regexs, the submitted proof did not pass the verification and the users’ balances were not modified. These results show the tool for the VRM exports correct regex verification chips and the bytecodes for Rules 1 and 2. IV. C ONCLUSION In this study, we proposed a contract wallet that enables users to operate their crypto assets by simply sending emails. The user only needs to trust existing SDSs without managing any private keys. The user’s crypto assets are manipulated according to various rules, and the VRM technique allows developers to build new rules without writing any ZKP cir- cuits. We developed a demo application and proved that the user can transfer crypto assets and exchange them for different currencies just by sending an email to an aggregator. ACKNOWLEDGMENT This work has been supported by Endowed Chair for Blockchain Innovation and the Mohammed bin Salman Center for Future Science and Technology for Saudi-Japan Vision 2030 (MbSC2030) at The University of Tokyo. We appreciate the generous technical advice and implementation help from Mr. Aayush Gupta. REFERENCES [1] P. Praitheeshan, L. Pan, and R. Doss, “Security evaluation of smart contract-based on-chain ethereum wallets,” in International Conference on Network and System Security . Springer, 2020, pp. 22–41. [2] S. Suegami, “Rsa verification circuit in halo2 and its applications - privacy and scaling explorations,” 2022. [Online]. Avail- able: https://mirror.xyz/privacy-scaling-explorations.eth/mmkG4uB2PR peGucULAa7zHag-jz1Y5biZH8W6K2LYM [3] A. Gupta, “An ecdsa nullifier scheme and a proof of identity application,” Master’s thesis, Massachusetts Institute of Technology, September 2022. [4] I. N. W. Group, “Rfc 3447: Public-key cryptography standards (pkcs) #1: Rsa cryptography specifications version 2.1,” https://www.rfc-editor.org/ rfc/rfc3447, February 2003, (Accessed on 01/01/2023). [5] P. . S. Explorations, “privacy-scaling-explorations/halo2,” https://github. com/privacy-scaling-explorations/halo2, (Accessed on 01/01/2023).
{ "id": "2312.04173" }
2207.07490
The Effect of Crypto Rewards in Fundraising: From a Quasi-Experiment to a Dictator Game
Conditional thank-you gifts are one of the most widely used incentives for charitable giving. Past studies explored non-monetary thank-you gifts (e.g., mugs and shirts) and monetary thank-you gifts (e.g., rebates that return some of the donations to the giver). Following the rapid growth of blockchain technology, a novel form of thank-you gifts emerged: the crypto rewards. Through two studies, we analyze crypto thank-you gifts to shed light on fundraising designs in the digital world. In Study I, we examine the Ukrainian government's crypto fundraising plea that accepts donations in both Ethereum and Bitcoin. We find that Ethereum is substantially more effective in enticing giving than Bitcoin, as the hourly donation count increased 706.07% more for Ethereum than for Bitcoin when crypto rewards are present. This is likely because the crypto rewards are more likely to be issued on Ethereum than Bitcoin. However, the decrease in contribution sizes is also more substantial in Ethereum than in Bitcoin in response to the crypto rewards. In Study II, we conducted a laboratory experiment following a dictator game design to investigate the impact of crypto rewards in a more general scenario, with the crypto rewards specified as non-fungible tokens (NFTs). The crypto rewards in Study II carry no monetary value but only serve to recognize donors symbolically. As such, the NFT thank-you gifts did not effectively induce people to donate; a traditional 1:1 donation matching strictly outperforms both the condition without thank-you gifts and the condition with NFT thank-you gifts. Nevertheless, the NFT thank-you gifts effectively increased the contribution sizes, conditional on the choice to give, when the NFT's graphic design primes donor identity and encompasses the charity recipient.
http://arxiv.org/pdf/2207.07490v3
Jane, Tan, Yong Tan
cs.CY, econ.GN, q-fin.EC
cs.CY
THEEFFECT OF CRYPTO REWARDS IN FUNDRAISING : FROM A QUASI -EXPERIMENT TO A DICTATOR GAME Xue (Jane) Tan Information Technology & Operations Management Southern Methodist University Dallas, TX 75275 janetan@smu.eduYong Tan Foster School of Business University of Washington Seattle, WA 98195 ytan@uw.edu ABSTRACT Conditional thank-you gifts are one of the most widely used incentives for charitable giving. Past studies explored non-monetary thank-you gifts (e.g., mugs and shirts) and monetary thank-you gifts (e.g., rebates that return some of the donations to the giver). Following the rapid growth of blockchain technology, a novel form of thank-you gifts emerged: the crypto rewards. Through two studies, we analyze crypto thank-you gifts to shed light on fundraising designs in the digital world. In Study I, we examine the Ukrainian government’s crypto fundraising plea that accepts donations in both Ethereum and Bitcoin. We find that Ethereum is substantially more effective in enticing giving than Bitcoin, as the hourly donation count increased 706.07% more for Ethereum than for Bitcoin when crypto rewards are present. This is likely because the crypto rewards are more likely to be issued on Ethereum than Bitcoin. However, the decrease in contribution sizes is also more substantial in Ethereum than in Bitcoin in response to the crypto rewards. In Study II, we conducted a laboratory experiment following a dictator game design to investigate the impact of crypto rewards in a more general scenario, with the crypto rewards specified as non-fungible tokens (NFTs). The crypto rewards in Study II carry no monetary value but only serve to recognize donors symbolically. As such, the NFT thank-you gifts did not effectively induce people to donate; a traditional 1:1 donation matching strictly outperforms both the condition without thank-you gifts and the condition with NFT thank-you gifts. Nevertheless, the NFT thank-you gifts effectively increased the contribution sizes, conditional on the choice to give, when the NFT’s graphic design primes donor identity and encompasses the charity recipient.arXiv:2207.07490v3 [cs.CY] 10 Sep 2024 Crypto Rewards in Fundraising Keywords Charitable Giving ·Cryptocurrency ·Monetary Incentive ·Ethereum ·Bitcoin ·Difference-in-Difference 1 Introduction Thank-you gifts are conditional gifts, also named donor appreciation gifts in practice or donor premiums in economics, offered by fundraisers to donors. These gifts are a prevalent feature in fundraising activities, with 1%-2% of the fundraising revenue allocated to thank-you gifts [Recognition Art, 2023]. Previous research has predominantly examined non-monetary thank-you gifts, such as mugs, tote bags, and shirts [Newman and Shen, 2012], as well as monetary gifts, such as rebates [List, 2008]. This study investigates a novel form of thank-you gift: crypto rewards, which are represented by immutable fungible and non-fungible tokens (NFTs) to crypto donors. Crypto rewards deserve scholarly attention due to their unique position as hybrids of non-monetary and monetary thank- you gifts. Like non-monetary thank-you gifts, they enable individuals to signal their prosociality both to themselves and to others, leveraging the immutable nature of blockchain technology. Particularly when crypto rewards are in the form of NFTs, they serve to publicly showcase the achievements, milestones, and social standing of their owners within the digital realm. Meanwhile, crypto rewards possess monetary or investment value. Although they are usually valueless when they are initially minted, their value could increase when they are exchanged if the associated causes gain widespread support. This investment characteristic distinguishes crypto rewards from traditional monetary thank-you gifts like rebates. Crypto donors are becoming increasingly significant in the realm of fundraising. With 420 million cryptocurrency users in 2023, and projections indicating a rise to 1 billion users by 2030 [The Giving Block, 2023], crypto donors represent a burgeoning and vital demographic for charitable giving. The Giving Block, which provides solutions for cryptocurrency donations within the nonprofit sector, reports that more than 150 nonprofits are able to raise over $100 million of annual revenue from crypto donors, as crypto fundraising allows nonprofits to access a distinct demographic – younger, wealthier, and more dominated by male – that traditional fundraising channels often fail to reach [The Giving Block, 2023]. The following examples demonstrate the surging prevalence of crypto rewards. The first example is Giveth (https://giveth.io), a blockchain-based crowdfunding platform that has raised $2,239,120 for 2,875 projects from 6,646 givers at the time of writing. Giveth differs from traditional crowdfunding in that it rewards givers with GIV tokens when they support verified projects. The GIV tokens can be used by token holders to influence the roadmap and mission of the Giveth ecosystem through a voting mechanism. Moreover, Giveth offers NFTs as thank-you gifts for every contribution of $100 or more to the Givth platform.1The second example is UkraineDAO, a decentralized autonomous organization (DAO) that raises funds to help Ukraine defend itself. UkraineDAO offers the LOVE tokens to its crypto donors as thank-you gifts. These love tokens could translate into the collective ownership of a Ukraine flag 1https://giveth.io/nft/mint 2 Crypto Rewards in Fundraising NFT. The Ukrainian flag NFT was sold for 2,258 ETH (about $6.75 million as of then),2and donors could profit from the sales. This study aims to explore the potential of blockchain technology for social good by examining the impact of crypto rewards on fundraising performance with the following questions: • RQ1: Are crypto rewards effective in improving fundraising performance? •RQ2: Would crypto rewards be more effective than donation matching (i.e., adding extra donations to the giver’s contributions)? •RQ3: When crypto rewards are in the format of NFTs, what graphic designing factors of the NFTs would impact the fundraising performance? The concept of providing donors with crypto rewards draws inspiration from the “airdrop” in the initial coin offering (ICO) model, which serves as a promotional strategy to increase awareness for blockchain-based projects [Li et al., 2021]. In ICOs, rewards are distributed to community members who engage in activities such as following a Twitter account or joining a Telegram group. These reward tokens are typically valueless at inception but can be utilized within blockchain-based projects to access services and goods upon their launch. In this study, we examine crypto rewards within a broader context, where crypto donations are directed towards social causes rather than exclusively supporting blockchain-based projects. The value of these crypto rewards is not tied to the success of a specific blockchain project but rather to the societal reception of the associated social cause. This application of blockchain technology warrants promising potential for social good, expanding the impact of blockchain technology beyond the confines of the blockchain industry. We use a mixed-method approach with two studies to examine the impact of crypto rewards as this approach is most appropriate for studying new technologies [Velichety et al., 2019]. Study I is based on the Ukrainian government’s crypto fundraising plea, which accepts donations from both Ethereum and Bitcoin. Donors who contribute via Ethereum are more likely to receive the airdrop than those who contribute via Bitcoin due to Ethereum’s stronger programmability to support smart contracts. Indeed, while donation trends of these two cryptocurrencies were similar prior to the announcement of the airdrop, the donation trends diverged drastically after the announcement of the airdrop. We performed both blockchain-level and transaction-level analyses to understand the impact of this airdrop, following a difference-in-differences approach [Fricke, 2017]. At a blockchain level, We find that hourly donation counts increased 706.07% more for Ethereum than for Bitcoin in response to the airdrop. Further, the average contribution size for Ethereum dropped 57% more than that for Bitcoin following the airdrop. At a transaction level, we performed Coarsened Exact Matching to identify comparable wallets from Ethereum and Bitcoin based on time since the first transaction and historical transaction volumes. We continue to find that the contribution size dropped more aggressively for Ethereum than for Bitcoin in response to the airdrop. We further performed moderation analyses on Ethereum transactions to 2https://www.coindesk.com/tech/2022/03/02/ukrainian-flag-nft-raises-675m-for-countrys-war-efforts/ 3 Crypto Rewards in Fundraising show that the negative link between crypto rewards and contribution size is lessened when the wallet is registered with Ethereum Name Service (ENS) and when the donation is transacted on intermediary platforms. While Study I highlights the significant potential of using airdrops to promote social causes in crypto fundraising, replicating this success may be challenging due to the uniquely high visibility of the event. In Study II, we assess the impact of crypto rewards in a more general scenario by conducting a dictator game, “a celebrated workhorse of experimental economics and social psychology” to understand charitable giving [Cartwright and Thompson, 2023]. We recruited 268 subjects from Prolific, and the screening requirement was that the subjects must be owners or ex-owners of NFTs. Following the protocol of dictator games [Engel, 2011], subjects first work on two copyediting tasks to earn a flat-rate income of $2 on top of their participation fee ($1). They are then asked to allocate the $2 between themselves and an international charity, Doctors without Borders. We use a between-subject design and assign these subjects into five groups: a baseline group without a thank-you gift, a donation matching group that receives a 1:1 matching offer to further support Doctors without Borders, and three NFT reward groups with different NFT designs. Unlike the airdrops in Study I, the NFT rewards in Study II were created by the experimenters and likely offered only symbolic recognition but not monetary value. Consequently, we found no significant effect of these NFT rewards on the decision to donate. Consistent with previous research demonstrating the stronger impact of donation matching compared to rebates [Eckel and Grossman, 2003, 2006], the matching group was the most effective in encouraging donations. However, the design of NFTs significantly influenced the amount donated among those who chose to give. Specifically, donors who perceived donor identity as relevant to themselves (as discussed in Kessler and Milkman [2018]) were likely to donate more when the reward NFT both highlighted the donor’s identity and included the recipient’s identity. This suggests that the alignment of the NFT design with donor identity can enhance the effectiveness of crypto rewards. This study makes unique contributions to the literature on charitable fundraising. On the one hand, regarding whether to donate, the differential findings of Studies I and II highlight the critical requirement for a crypto reward to be effective – crypto rewards could successfully entice the choice to give when they are monetarily appealing to prospective donors. This is in contrast to the detrimental effects of extrinsic motives for charitable giving suggested by past studies [Frey and Jegen, 2001, Frey and Oberholzer-Gee, 1997]. Our findings underscore the crypto community’s strong investment mindset, as the monetary value of crypto rewards varies with the public reception of the cause and the stake of the entity that initiated the fundraising campaign. On the other hand, we show in Study II that the design of NFTs could serve the role of donor identity prime to increase the gift size conditional on giving, uncovering the multi-faceted roles of NFT rewards and contributing to the studies that examined the choices and framing of thank-you gifts [Zlatev and Miller, 2016]. We also directly contribute to Chao [2017] and Chao and Fisher [2022], who discovered that visually salient thank-you gifts would reduce giving by shifting people’s attention to focus on self-interest rather than their intrinsic motives. In great contrast, the visual display of NFTs offers a novel avenue to incentivize giving. Last but not least, we contribute to the large stream of literature on charitable giving based on dictator games. Ever since Daniel Kahneman performed the first dictator game over three decades ago, hundreds of papers have been published based on dictator games to understand various factors that affect individuals’ decisions regarding giving (e.g., incentives, social 4 Crypto Rewards in Fundraising factors, distributive concerns, framing, social distance, and demographics) [Engel, 2011]. This study contributes to this literature with the inclusion of unique features of crypto rewards used in crypto fundraising campaigns. 2 Theoretical Development 2.1 Self-interest and Charitable Giving The nature of crypto rewards is a “thank-you” gift for making a crypto donation. Conditional thank-you gifts are ubiquitous extrinsic incentives used in charitable fundraising, where donors get a non-monetary gift (e.g., mugs, tote bags, and shirts) or a monetary gift (e.g., rebate) conditional on their charitable contribution [Newman and Shen, 2012, Eckel and Grossman, 2006]. The effect of extrinsic incentives on prosocial behavior has been widely studied in the literature of economics, psychology, and information systems [Newman and Shen, 2012, Gneezy and Rustichini, 2000, Liu and Feng, 2021, Eckel and Grossman, 2006, List and Lucking-Reiley, 2002]. Prior works identify the facilitating role of extrinsic motivations in giving because humans are primarily motivated by self-interest [Kohn, 2008]. Self-interest has become a social norm to the extent that people would be hesitant to donate to a charitable cause even when they have strong feelings of compassion for it [Miller and Prentice, 1994, Miller, 1999]. In such cases, extrinsic incentives could work as an “excuse” to rationalize people’s prosocial behavior by concealing their prosocial motivations [Holmes et al., 2002]. Extrinsic motives could also manifest through reciprocity, where the thank-you gifts activate donors’ feelings of reciprocity such that they give more [Briers et al., 2007]. As evidence, Falk [2007] finds that the frequency of donations increased by 17% when a small gift was given to donors and by 75% when a large gift was given. On the contrary, people could reduce giving when extrinsic incentives are provided because extrinsic motivations would crowd out intrinsic motivations [Frey and Oberholzer-Gee, 1997, Frey and Jegen, 2001, Gneezy and Rustichini, 2000, Bénabou and Tirole, 2006, Chao and Fisher, 2022]. Differing from extrinsic motivations, which are activated by monetary rewards, praise, or fame, intrinsic motivations are related to activities that people undertake because they derive satisfaction from them. As Frey and Oberholzer-Gee [1997, p.746] stated, “If a person derives intrinsic benefits simply by behaving in an altruistic manner or by living up to her civic duty, paying her for this service reduces her option of indulging in altruistic feelings.” Many studies discover evidence in support of the motivation crowding-out theory. Newman and Shen [2012] find that among the donors who are willing to contribute, those who were offered a thank-you gift donated a significantly lower amount than those who were not offered a thank-you gift. Chao [2017] further find that the negative effect of extrinsic motivation from a thank-you gift is only present when the gift is visually salient to occupy the prospective donor’s attention. Despite the opposing predictions, we propose that self-interest dominates the decision of crypto donations because investment is key to blockchain users [Kim et al., 2020]. Hypothesis 1: Crypto rewards positively impact charitable giving, especially when the crypto rewards could offer potential returns. 5 Crypto Rewards in Fundraising 2.2 Donation Matching The next hypothesis is designed to enhance the understanding of crypto rewards by drawing a comparison with the fundraising strategy of donation matching. Donation matching has been identified as one of the most effective means of fundraising. It refers to the practice that a large donor (e.g., an employer or a charitable foundation) matches individuals’ contributions to a specific cause to increase the gift. Eckel and Grossman showed in both within-subject and between-subject lab experiments that a donation match is significantly more effective than a rebate (returning a portion of the donation to the giver) in fundraising performance [Eckel and Grossman, 2006, 2003]. Gandullia and Lezzi [2018] performed online experiments to show similar findings that donation matching is more effective than rebates. Kamas and Preston [2010] showed that donation matching is effective even for self-interested donors (as compared to social surplus maximizers and inequity averters). The studies that compared donation match with rebates controlled for the value of the money added to the gift or returned to the donor. In our context, the value of crypto rewards is ambiguous and key to the relative advantage of these two fundraising strategies. As discussed, the nature of crypto thank-you gifts is multifaceted. On the one hand, crypto rewards resemble monetary thank-you gifts, such as rebates, by stimulating giving through self-interest. On the other hand, they function similarly to non-monetary thank-you gifts, like mugs, tote bags, and shirts, by reinforcing acts of giving through symbolic recognition. When crypto rewards offer high monetary returns or strong symbolic recognition, they can be more appealing than donation matching. Conversely, when the monetary return of the crypto rewards and the symbolic recognition are low, they may not be as effective as donation matching. Hypothesis 2: Crypto rewards are less effective than a donation match in fundraising when the crypto rewards offer low monetary returns or symbolic recognition and are more effective otherwise. 2.3 Donor Identity Prime As we mentioned, crypto rewards not only carry monetary value but also could reinforce one’s self-identity and public identity as an altruist. Identity refers to a person’s sense of self that is “associated with different social categories and how people in these categories should behave [Akerlof and Kranton, 2000, p. 715].” Kessler and Milkman [2018] find from field experiments run by the American Red Cross that appeal that prime individuals’ identity as previous givers results in more donations. This is because people tend to adjust their behaviors such that their behaviors will match the norms or prescriptions associated with their identity [Akerlof and Kranton, 2000]. As discussed in Kessler and Milkman [2018], a large stream of works has demonstrated the power of priming – even remarkably small environmental cues could change which facet of individual identity is salient at a certain point [Steele, 1997]. Other than priming donor’s identity, it is generally believed that disclosing the recipient’s identity (through logos) could enhance the value of the thank-you gifts. As evidence, Jung et al. [2014] considered the value of the Cal logo/UCB affiliation in the thank-you gift of mugs, where UCB stands for University of California, Berkeley. 6 Crypto Rewards in Fundraising We propose that the graphic design of NFT gifts plays a role in the decision to give. The design that primes donor identity and the recipient’s identity, as reflected in logos, would increase giving because the former signals prosociality, and the latter demonstrates one’s commitment to the corresponding endeavor. Since the crypto community values decentralization, freedom, and democracy, cryptocurrency holders likely desire to hold the crypto reward tokens that showcase their support for causes that align with their group identity [Ramaswamy, 2022]. Hypothesis 3: The graphic design of NFT thank-you gifts that primes donor identity and the identity of the recipient positively influences crypto donations. 3 Study I - A Quasi-experimental Study Study I is designed to test the hypothesis of H1 based on a Ukrainian crypto fundraising campaign. 3.1 Context and Data Collection The Ukrainian government posted pleas for cryptocurrency donations on Feb. 26 at 10:29 AM, 2022 (UTC). Since Ukraine’s banking system was at risk of a Russian attack, crypto offered an alternative financial structure to support Ukraine because it uses cryptography to secure transactions. This fundraising channel is different from other fundraising efforts made by nonprofit organizations because all the funds would be directly received by the Ukrainian government, avoiding overheads. In a tweet, the Ukrainian government announced their Ethereum and Bitcoin wallet addresses. Ether (ETH) is the native currency traded on the Ethereum blockchain, and Bitcoin (BTC) is the currency traded on the Bitcoin blockchain; both ETH and BTC are digital currencies based on the distributed ledger technology of blockchain. On March 1 at 1:43 AM, Ukraine announced that an “airdrop" has not been confirmed, but formally announced on March 2 at 1:43 AM that they would reward donors who supported Ukraine with an airdrop. The planned snapshot of the list of donor wallet addresses would be taken the next day. While the initial announcement that “An airdrop has not been confirmed yet" does not officially start the airdrop, people may react to this potential airdrop even before the official announcement is posted. One day later, on March 3 at 6:37 AM, the vice prime minister of Ukraine and the Minister of Digital Transformation of Ukraine announced the cancellation of this airdrop soon before the scheduled snapshot. The timeline is summarized in Figure 1.3 We collected donation transactions between 1:00 AM on Feb. 26, 2022 and 6:00 PM on Mar.3, 2022, from the public wallets of Ukraine to focus on the airdrop. We calculated the USD value of donation contributions using the historical prices of Bitcoin and Ethereum based on the daily opening prices. There were 14,903 donation transactions on the Bitcoin blockchain and 69,709 donation transactions on the Ethereum blockchain during this observation window. In total, $9,874,757 was raised from the Bitcoin blockchain, and $16,043,036 was raised from the Ethereum blockchain. We excluded extreme donations above the 99.9th percentile ($7727.13). We sum up donations from the same wallet if they are transacted within the same minute. We further removed transactions between 2:00 AM on Mar. 1, 2022 3From the Ethereum wallet data we collected, the Ukrainian government issued NFT rewards to some Ethereum donors post campaigns despite of this cancellation. 7 Crypto Rewards in Fundraising Figure 1: Timeline and 2:00 AM on Mar. 2 because this period is associated with a potential airdrop. We are left with 67,615 donation transactions. 3.2 Identification The introduction of an airdrop as a reward to crypto donors offers a quasi-experiment for us to understand the impacts of the crypto rewards on donation counts and amounts. While the publicity of the fundraising event increased sharply after the announcement of the crypto rewards due to substantial media coverage, this temporal effect equivalently applies to both ETH and BTC because the wallet addresses for both ETH and BTC were included in the same tweet. However, the impact of the crypto rewards is likely much stronger on ETH than BTC because only ETH supports smart contracts, and most airdrops were issued through ETH. We perform a modified DiD analysis to exploit the difference between the impacts of the airdrop on Bitcoin and Ethereum in order to explore the causal impacts of crypto rewards [Wing et al., 2018]. This method has the same functional form as classic DiD but offers different interpretations based on the differential impacts of treatment with varying intensities [Fricke, 2017]. Duflo [2001] used this method to understand the effect of school construction on schooling and labor market outcomes by comparing regions with low and high levels of newly constructed schools. Felfe et al. [2015] leveraged the regional variation in childcare expansion rates to understand the effect of formal childcare on maternal employment as well as child development. This extension of DiD requires not only the common trend assumption but also an equal effect size assumption, which posits that users in ETH and BTC would respond similarly when high-intensity treatment (a higher likelihood of winning the crypto rewards) was imposed on the corresponding blockchain. In Section 1 of the Appendix, we discuss the identification strategy and assumptions in greater detail. 8 Crypto Rewards in Fundraising We perform both an aggregated analysis (Section 3.2.1) and a transactional analysis (Section 3.2.2) to estimate the ordered treatment effect of the airdrop. The aggregated analysis provides causal inference for the hourly donation count; the transactional analysis offers insights into contribution sizes after accounting for the potential selection process. 3.2.1 Aggregated Analysis at a Blockchain Level. At a blockchain level, the econometric model we estimate is specified as below ( cdenotes the blockchain and tdenotes the hours): Outcome c,t=β0+β1Ether c×Airdrop t+β2Ether c+β3Airdrop t+β4FeeRate c,t+ηt+ϵc,t, (1) where the dependent variable Outcome c,tcan be operationalized as two aggregated measures: the logarithm of the number of hourly donations ( DonationCount c,t) and the logarithm of the average contribution sizes (AvgDonationSize c,t). These outcomes are both log-transformed after adding one because they are highly skewed. Our key independent variable, Airdrop t, is a binary variable that takes the value of one if the airdrop has been announced but the snapshot has not been taken and zero otherwise. Ether cis a binary variable that takes the value of one if the currency is Ether and zero if it is Bitcoin. To identify the ordered treatment effect, we also include two-way fixed effects [Fricke, 2017]. We use ηtto represent the hourly time dummy variables that account for the time-level fixed effects. The time effects could come from the dynamic situations in Ukraine, the increasing awareness of the crypto fundraising event, or simply donors’ varying availability of time. Such temporal trends affect the Bitcoin and Ethereum blockchains in the same way. The systematic difference between BTC and ETH is represented by the group-level fixed effects, denoted as Ether c. In addition, we account for the transaction fee rate ( FeeRate c,t) for both ETH and BTC using the transaction data on the Ethereum and Bitcoin blockchains from Google Big Query. For ETH, we calculate the average gas price at every point in time; for BTC, we calculate the ratio between fee and output value at every point in time. The coefficient of our interest is β1as it indicates the differential impacts of the airdrop on the blockchains of Bitcoin and Ethereum. For the aggregated data, we have 134 discrete observation points for both Ethereum and Bitcoin. 3.2.2 Transactional Analysis at a Wallet Level. The aggregated analysis sheds light on the difference in donation behavior between the two blockchains when crypto rewards become available. However, it does not account for the selection process that individual donors go through when deciding whether to give via ETH or BTC. Specifically, people with a strong investment mindset may choose to donate via ETH to increase the likelihood of receiving crypto rewards in the first place. To mitigate the selection issue, we perform matching at a wallet level before examining the outcome of donation sizes ( DonSize w,t), where we use wto denote the index for a wallet and tfor time. We no longer examine AvgDonSize orDonCount , which are aggregated measures. The matching process proceeds as follows. First, for every donation made on BTC and ETH, we collected wallet information from BlockChair by using the paid APIs (https://blockchair.com/). Second, we removed all wallets that have exactly one receiving transaction and one sending transaction. These wallets were only 9 Crypto Rewards in Fundraising used for this fundraising plea, and their owners are more likely to be driven by an opportunistic motive. Blockchair keeps the latest 100 transactions for every wallet, and we removed wallets whose latest 100 transactions did not include their donation to Ukraine. This allows us to exclude extremely active users, who are likely organizations rather than individuals; it also allows us to accurately construct the number of historical transactions for every wallet. Third, we removed ETH wallets that registered to use the Ethereum Name Service (ENS) because these accounts are less likely to be comparable with BTC wallets. ENS is a paid decentralized naming system that allows users to use human-readable names instead of hexadecimal characters to find Ethereum addresses. Then, we performed a wallet-level matching using Coarsened Exact Matching (CEM) based on (1) years since the first spending transaction ( TimeSinceFirstSend w,t), (2) years since the first receiving transaction ( TimeSinceFirstRec w,t), and (3) the logarithm of past transaction counts ( Log(PastTrans w+1)). After matching, we are left with 4,498 BTC transactions and 26,577 ETH transactions in 157 stratums and the corresponding weights were calculated to guarantee comparability. We achieved a good balance between treatment and control, as the standardized mean difference (SMD) for TimeSinceFirstSend w,tis 0.034, the SMD for TimeSinceFirstRec w,tis -0.0004, and the SMD for Log(PastTrans w+ 1) is -0.003. These SMDs are well below the threshold of 0.1. We then estimate the weighted linear regression model and incorporate the subclass to generate average treatment effects. Similar to the aggregated analysis, we included Airdorp tto represent whether the crypto rewards were available and Ether wto indicate whether the corresponding wallet is from Ethereum. We also included FeeRate w,t, which is calculated at a minute granularity, hourly time dummies, and other variables we have used for the matching process to account for the time-varying features that could affect the contribution sizes. Based on the resulting matched samples, we estimate the following model: DonSize w,t=β0+β1Ether w×Airdrop t +β2Ether w+β3Airdrop t+β4FeeRate w,t+β5TimeSinceFirstSend w,t +β6TimeSinceFirstRec w,t+β7Log(PastTrans w+ 1) + ηt+ϵw,t.(2) 3.3 Data In Table 1, we summarize the aggregated data regarding DonCount andAvgDonSize in Panel A for Bitcoin and in Panel C for Ethereum. We summarize the transactional data in terms of PastTransaction in Panel B for Bitcoin and in Panel D for Ethereum. We performed Welch’s t-test to compare the conditions with and without the airdrop because the samples in different groups have different variances. From Table 1, we learn that the donation counts were not significantly different for Bitcoin before and after the crypto rewards were available (t=-1.60). However, the donation counts were significantly higher for Ethereum when the crypto rewards became available (t=8.46). The average donation size dropped significantly for both Bitcoin and Ethereum (t=-2.60 for Bitcoin and t=-9.98 for Ethereum), and this drop is more substantial for Ethereum. Further, the past transaction number for the donated wallets with and without the airdrop did not drop 10 Crypto Rewards in Fundraising Table 1: Summary Statistics by Groups Airdrop t=0 Airdrop t=1 Welch’s t-test Mean Median S.E. Mean Median S.E. t-stats Panel A. Aggregated Contributions on Bitcoin ( Ether c=0) DonCount c,t 106.75 71 104.92 86.83 84 37.82 -1.60 AvgDonSize c,t 180.65 161.85 72.90 152.32 141.35 49.62 -2.60** Panel B. Transactional Contributions on Bitcoin ( Ether c=0) PastTransaction c,i 147.52 11 2389.07 60.16 8 624.24 -1.24 Panel C. Aggregated Contributions on Ethereum ( Ether c=1) DonCount c,t 95.55 56 93.56 1215.73 1451 845.36 8.46*** AvgDonSize c,t 267.16 261.96 109.32 132.70 129.53 46.51 -9.98*** Panel D. Transactional Contributions on Ethereum ( Ether c=0) PastTransaction c,i 101.52 30 629.82 77.66 20 538.06 -3.26*** Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 Figure 2: Donation Counts significantly for BTC but significantly for ETH (t=-3.26), indicating selection. The data trends are presented in Figures 2 and 3. These figures show parallel trends before the introduction of crypto rewards. From Figure 2, the hourly counts of donations followed similar trends prior to the announcement of a potential airdrop; the hourly donation counts on Ethereum increased after the announcement of a potential airdrop and peaked after the airdrop was confirmed. From Figure 3, the average contribution size is higher for Ethereum before the introduction of the crypto rewards. After the crypto rewards were introduced, the average contribution size became similar between Bitcoin and Ethereum. Figure 3: Average Donation Size 11 Crypto Rewards in Fundraising Table 2: Results of Study I Aggregate (Hourly) Transactions Matched Transactions DV: DonCount AvgDonSize DonSize DonSize DonSize DonSize (1) (2) (3) (4) (5) (6) Airdrop ×Ether 2.087∗∗∗−0.451∗∗∗−0.737∗∗∗−0.510∗∗∗−0.884∗∗∗−0.946∗∗∗ (0.164) (0.119) (0.038) (0.038) (0.093) (0.091) Airdrop 3.736∗∗∗−0.138 0 .249 −0.118 0 .194 −0.075 (0.625) (0.557) (1.082) (1.058) (1.078) (1.056) Ether 0.361 0 .073 −0.163∗∗∗−0.405∗∗∗−0.267∗∗−0.229∗∗ (0.236) (0.172) (0.036) (0.036) (0.113) (0.111) FeeRate −0.007∗0.006∗∗0.005∗∗∗0.006∗∗∗0.008∗∗∗0.007∗∗∗ (0.004) (0.003) (0.001) (0.0005) (0.002) (0.002) TimeSinceFirstSend – – – −0.058∗∗∗– −0.181∗∗∗ – – – (0.015) – (0.025) TimeSinceFirstRec – – – 0.139∗∗∗– 0.079∗∗∗ – – – (0.014) – (0.021) Log(PastTrans + 1) – – – 0.092∗∗∗– 0.290∗∗∗ – – – (0.002) – (0.007) Intercept 0.624 5 .082∗∗∗3.676∗∗∗3.525∗∗∗3.736∗∗∗3.407∗∗∗ (0.443) (0.458) (1.080) (1.056) (0.964) (0.944) Time Dummy Yes Yes Yes Yes Yes Yes Observations 268 267 67,615 67,615 31,075 31,075 R20.887 0.686 0.158 0.195 0.128 0.163 Adjusted R20.769 0.357 0.143 0.181 0.124 0.159 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 3.4 Results We summarize the regression results for the aggregated analysis and transactional analysis in Table 2. Models 1 and 2 are the results of the aggregated analyses. Models 3 and 4 are the results of the transactional analysis without matching. Models 5 and 6 are the results of the transactional analysis with matched wallets. As can be seen from the coefficient of Airdrop ×Ether of Models 1 and 2 in Table 2, the hourly donation count (DonCount ) of the Ethereum blockchain (plus one) has increased 706.07% more than the Bitcoin blockchain by the airdrop. We also learn from Model 2 of Table 2 that the decrease in the average contribution sizes ( AvgDonSize ) is about 57% more aggressive for Ethereum than for Bitcoin in response to the airdrop. This blockchain-level analysis does not account for the potential selection issue – users who chose to donate via Ethereum may have a higher investment mindset and thus differ from those who donated via Bitcoin. As such, the blockchain-level analysis is appropriate for the outcome of DonCount but not so much for the outcome of AvgDonSize . We account for the selection issue and shed light on the outcome of donation sizes ( DonSize ) by performing matching at a wallet level and conducting transactional analyses. For the outcome of DonSize , we find consistent evidence from the negative and significant coefficient of Airdrop ×Ether in Models 3, 4, 5, 6 that the crypto rewards likely led to a decrease in contribution sizes. 12 Crypto Rewards in Fundraising 3.5 Donor Heterogeneity Analyses The negative link between crypto rewards and contribution size could vary by donor characteristics, and we perform moderation analyses to deepen our understanding of donor heterogeneity based on novel blockchain-based moderators on Ethereum. 3.5.1 Ethereum Name Service. Cryptocurrency addresses represent long strings of numbers and letters, making it hard for one to send funds to another using Ethereum’s networks. Ethereum Name Service is a distributed, open, and expandable naming system that maps human-readable Ethereum addresses to hexadecimal characters. For example, the machine-readable address of “0x00d936ef12a4Fde33Ab0FcF08F18d6A9BAbB6b97” would be translated into “john.eth” via ENS. ENS comes with an expiration date, and users need to pay for the continuous service at the annual rate of $5 - $30. ENS adopters use ENS IDs in various platforms as their identity - about 10% of ENS adopters in our dataset use their ENS IDs as their Twitter handles. We examined the moderating role of ENS adoption on the relationship between crypto rewards and donation amounts by performing a transaction-level analysis within Ethereum. We identified a significantly positive moderating effect of ENS adoption. The details of the analysis are documented in Section 2 of the Appendix and discussed in a later section. 3.5.2 Intermediary Platform Usage. People could donate to the Ukraine fundraising plea by directly sending funds to the Ethereum address of the Ukraine government (e.g., using MetaMask); they can also make donations using intermediary platforms such as Coinbase and Binance, which are both online platforms for buying, selling, transferring, and storing cryptocurrency. From the transactional data recorded in Etherscan, a direct donation’s sender corresponds to an individual Ethereum address, while an indirect donation transaction’s sender would be the intermediary platform of “Coinbase” or “Binance.” It is believed that direct transfers of funds would more likely make donors eligible for winning the crypto rewards, and the indirect transfers of funds via intermediary platforms would disqualify users from receiving the crypto rewards.4. As reported in Section 2 of the Appendix, we identify a positive moderation effect of intermediary platform usage. 3.6 Robustness Checks To validate the results of our main analyses, we perform a battery of robustness checks. First, we removed extremely small-sized donations (i.e., donations less than $5 or $1) for both Bitcoin and Ethereum, and our findings remain unchanged (Appendix 3.1). Second, we altered the definition of treatment and allowed the treatment to end not on the scheduled snapshot but when it was cancelled. Our results remain unchanged (Appendix 3.2). Third, we change the observation window to include the time window of the potential airdrop, which we have removed in the main analysis, 4As anecdotal evidence, a Youtuber recommends not to use intermediary platforms for a higher chance of receiving the crypto rewards 13 Crypto Rewards in Fundraising and our findings remain unchanged (Appendix 3.3). Last but not least, we keep only the first donation transaction of every wallet, and find our results unchanged (Appendix 3.4). 4 Study II – A Dictator Game in the Laboratory Setting Study I underscores the potential of crypto rewards to stimulate giving. However, it was based on an unprecedented fundraising event initiated by the Ukrainian government. The Ukrainian government also did not specify whether the crypto rewards would be fungible or non-fungible, while crypto rewards used in crypto donations are oftentimes NFTs [Liang et al., 2024]. To assess the generalizability of the findings of Study I and to test our hypotheses H2 and H3, we perform a laboratory experiment following a dictator game. Dictator games are considered a workhorse to understand charitable giving in both the economics and social psychology literature [Cartwright and Thompson, 2023, Engel, 2011, Frey and Jegen, 2001]. In a dictator game, the dictator determines how to split an endowment between the self and the recipient. The dictator’s action space is complete, ranging from giving nothing to giving everything, and the recipient has no influence on the endowment allocation. A dictator game has been used to examine various factors that influence giving behavior, such as rebate and donation matching, fairness considerations, social norms, and intrinsic motivations [Engel, 2011, List, 2007]. List [2007] underscored the importance of designing treatments to shed light on relevant field applications. We follow this direction to design a dictator game that invokes the most realistic responses for a set of highly relevant treatments concerning crypto rewards. 4.1 Experimental Design We designed a between-subject experiment; it is preferred over a within-subject design, where subjects may be unable to distinguish different scenarios fully [Eckel and Grossman, 2006]. We recruited 286 subjects who have NFT experience (self-disclosed as “I own one or more NFTs, I have created one or more NFTs") from Prolific, a platform that allows researchers to recruit and manage participants for their online research. These subjects are randomly assigned to five groups: Control ,Matching ,NFT1 ,NFT2 , and NFT3 (Figure 4). Past studies of dictator games reveal that dictators are more generous when the endowment is manna from heaven rather than earned by the dictators [Engel, 2011]. To invoke realistic responses, subjects of our study are recruited to complete two copyediting tasks (Figure 5). Specifically, subjects need to identify spelling, punctuation, and capitalization mistakes in two paragraphs of text to receive a flat-rate payment of $2, on top of the payment of $1 for completing the survey. The tasks are standard none-depletion tasks, and past literature has suggested a similar impact between a flat rate payment and a performance-based payment [Achtziger et al., 2015]. After subjects are informed about their extra income for the copyediting tasks ($2), the subjects are asked to choose among three options (the control message ): (A) keep all the bonus ($2) to themselves, (B) donate half of the bonus ($1) to a charity (Doctors Without Borders) and keep the reminder, or (C) donate all the bonus ($2) to the charity (Doctors Without Borders). This message is the control message available in all conditions. Doctors Without 14 Crypto Rewards in Fundraising Figure 4: Experimental Design Borders works in over 70 countries to provide urgently needed humanitarian aid in moments of crisis. At the time of the experiment, multiple conflicts were taking place in the world, and Doctors Without Borders is a well-deserving charity. The fund allocation choices are semi-continuous, allowing us to assess whether to give (whether Option A is chosen) and how much to give (whether Option B or Option C is chosen) [Engel, 2011]. If subjects are assigned to the Matching group, they receive an additional message that if they donate either $1 or $2 to the charity, their contribution will be matched. If they are assigned to any of the three NFT groups, they will receive an additional message with the visual design of the NFT reward that if they donate either $1 or $2 to the charity, they will receive the NFT reward. The NFT rewards have been minted on the Ethereum blockchain, and OpenSea links have been provided. However, these NFT rewards likely have no resell value as they were created by the experimenters. If subjects choose to donate, they also enter their wallet address so the NFT can be airdropped. We included one attention check question – participants were asked to indicate which charity was mentioned as a donation recipient; subjects were dropped if their answers were wrong. Out of the 286 subjects, 221 of them are male, 63 of them are female, one of them has a non-binary gender, and one prefers not to say. Regarding age, 39 of the subjects are between 18 and 24; 116 are between 25 and 34; 83 are between 35 and 44; 36 are between 45 and 54; Nine are between 55 and 64; Two of them are between 65 and 74, and one of them is above 74. In addition, we collected their birth country, enthusiasm about blockchain, optimism about NFT, and knowledge about cryptocurrency using a five-point Likert scale to control for their heterogeneity. 4.2 Results Following the literature, we use a hurdle model to analyze subjects’ responses [Engel, 2011, Breitmoser, 2013]. A hurdle model assumes that the decision to make a positive contribution and the decision of how much to give, conditional on the decision to give, are two separate processes. It is composed of a binary decision (whether to give) using a 15 Crypto Rewards in Fundraising Figure 5: Study II - Tasks Before Income Allocation Table 3: Results of Study II (1) (2) DV:Donate Matching 0.615∗∗(0.240) 0.667∗∗∗(0.253) NFT 1 0.157 (0.235) 0.112 (0.245) NFT 2 -0.124 (0.257) -0.153 (0.276) NFT 3 -0.305 (0.262) -0.237 (0.269) Constant −0.663∗∗∗(0.166) -0.415 (1.011) DV:Amount Matching 0.024 (0.135) 0.026 (0.130) NFT 1 0.035 (0.144) 0.133 (0.156) NFT 2 0.190 (0.166) 0.272∗(0.165) NFT 3 0 .383∗∗(0.176) 0.426∗∗(0.168) Constant 1.173∗∗∗(0.105) 1.151∗∗(0.516) ln(σ) −0.855∗∗∗(0.082) −0.962∗∗∗(0.081) Age/Optimism/Literacy No No Yes Yes Gender/Country/Enthusiasm No No Yes Yes Pseudo R2 0.048 0.149 N 286 286 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 logistic model and a continuous decision (how much to give) using OLS estimation for positive contributions, after adjusting for the truncation. It suits the dictator games well, where the majority of subjects choose to keep all the funds. We report the results in Table 3. Model 1 did not include subject characteristics, and Model 2 included subjects’ age, perceived optimism about NFT, blockchain literacy, gender, country, and enthusiasm about blockchain. From the first stage estimation (DV: Donate ), we find from both Models 1 and 2 that only the matching treatment significantly improved the subjects’ willingness to give. From the second stage estimation (DV: Amount ), we find that conditional on the decision to give, NFT2 marginally improves the contribution size in Model 2, and NFT3 significantly improves the contribution size both in Models 1 and 2. In Model 2, the estimated βfor NFT2 is βNFT 2= 0.272, and that for NFT3 is βNFT 3= 0.426, indicating that NFT3 has a more salient impact on the decision of how much to give. Finally, we observe a significant estimation for ln(σ), where σis the standard deviation parameter for the truncated normal distribution in the second stage (DV: Amount ). From Study II, we find that the crypto rewards are no longer effective in stimulating the decision to give. This is in great contrast to Study I, and we discuss this difference in the next section. Further, matching treatment outperforms the NFT treatments only for the outcome of whether to donate but not for the outcome of how much to give. When subjects choose not to donate, donor identity is not self-relevant; only when they choose to donate does the donor’s identity 16 Crypto Rewards in Fundraising Table 4: Hypothesis Testing Hypotheses Results Studies H1 Partially supported: effective in Study I but not in Study II Studies I and II H2 Supported for the outcome of whether to donate Study II H3 Supported Study II become relevant and have a positive impact on the decision of how much to give. Last but not least, Study II reveals that donor identity alone is not sufficient; the NFT treatment would only be significant when both donor identity and recipient identity are included in the graphic design. 5 Conclusions 5.1 Summary of Findings We performed two studies to examine the impact of crypto rewards in fundraising campaigns. Study I leverages a quasi-experimental design to estimate the impact of crypto rewards issued by the Ukrainian government. Study II is a laboratory experiment following a dictator game, where the crypto rewards were NFTs issued by the experimenters. Combining the results from Studies I and II, we conclude that H1 is partially supported. As we present in Table 4, crypto rewards are effective in enticing giving when they offer sufficient monetary return or strongly present symbolic recognition, as in Study I but not in Study II. We went on to show that a traditional donation matching strategy strictly dominates the NFT crypto rewards created by the experimenters and could effectively stimulate the decision of whether to give, supporting H2. Finally, leveraging the different graphic designs of the NFT thank-you gifts, we show that for subjects who decided to give and thus were relevant to donor identity, NFT rewards that highlight both donor identity and the recipient organization would effectively increase contribution sizes, conditional on giving. This result is in support of H3. 5.2 Reconciling the Results of Studies I and II Crypto rewards effectively motivate people to give in Study I but not in Study II. We provide two major reasons for these seemingly conflicting results. First, the crypto rewards in Study I likely offered higher returns. The blockchain community has been a strong supporter of Ukraine, with numerous crypto initiatives aimed at providing aid. For example, the Ukraine flag NFT associated with LOVE tokens from UkraineDAO was sold for 2173.6 ETH.5Similarly, the Avatar for Ukraine campaign, endorsed by the Minister of Digital Transformation of Ukraine, raised 12,656 ETH for medical aid for Ukrainian defenders.6Given these examples, it is reasonable to expect that the crypto rewards for the Ukrainian government’s fundraising plea in Study I would have higher monetary value than the crypto rewards created by the experimenters in Study II. To support this mechanism, our moderation analysis in Study I shows that 5https://www.coindesk.com/tech/2022/03/02/ukrainian-flag-nft-raises-675m-for-countrys-war-efforts/ 6https://www.avatarsforukraine.com/ 17 Crypto Rewards in Fundraising when donors contribute through intermediary platforms, where they are less influenced by direct monetary incentives, the reduction in contribution sizes was mitigated. Second, the crypto rewards in Study I offer stronger symbolic recognition than those in Study II. The fundraiser in Study I was the Ukrainian government, whereas in Study II, it was the experimenters. Crypto rewards granted by the Ukrainian government function as immutable badges, allowing donors to publicly display their generosity and social standing. These rewards are likely to invoke a heightened sense of doing good, enhanced reputation, and pride [Samek and Sheremeta, 2017]. In contrast, the crypto rewards in Study II merely served as receipts for contributions of $1 or $2 to Doctors Without Borders, using bonuses earned from a copyediting task. Given the critical role of recognition in fundraising, the crypto rewards from Study I are more effective in encouraging giving than those from Study II [Recognition Art, 2023]. Moreover, our moderation analysis showed that Ethereum users who adopted ENS were less likely to reduce their contribution sizes. This finding supports the symbolic recognition mechanism, as ENS adopters are likely more attuned to the value of recognition. Consequently, the more pronounced symbolic power of crypto rewards of Study I made it more effective than those in Study II. Crypto rewards likely led to a contribution size reduction in Study I but could potentially increase the contribution size in Study II. Past studies show that people could reduce charitable contributions due to extrinsic incentives because they shift donors’ attention away from their compassion to help and strengthen a cost-benefit mindset. Chao [2017] find that such extrinsic incentives need to be visually salient to take effect. In Study I, the crypto rewards received extensive media coverage and represented an unprecedented event for the crypto community. While they are not visually salient, they are socially salient and could occupy the prospective donors’ attention. As such, this “motivational crowding-out” mechanism manifested in Study I but not in Study II. Further, the crypto rewards of Study I were not specified when the airdrop was announced. In contrast, the graphic design of NFT thank-you gifts was presented to the subjects in Study II. Donor identity prime is an effective device to stimulate giving [Kessler and Milkman, 2018], and this effect is more salient in Study II due to the presentation of the NFT designs. 5.3 Theoretical and Practical Implications Our study began with a unique fundraising event and concluded with a general assessment of crypto rewards through a carefully designed dictator game, yielding several important implications. First, while the Ukrainian government’s crypto fundraising plea was highly successful, it was largely unknown whether this success was reproducible and whether this novel thank-you gift could replace a donation matching strategy. Our study provides a nuanced understanding of the conditions under which crypto rewards can be a powerful tool in fundraising. The success of crypto rewards is contingent upon their ability to offer tangible value and symbolic significance. When these elements are present, crypto rewards could potentially surpass traditional donation-matching strategies, particularly in contexts where the fundraising cause resonates with the values of the blockchain community. However, in situations where the expected returns and symbolic power of crypto rewards are limited, donation matching remains a more reliable and effective 18 Crypto Rewards in Fundraising strategy. Understanding these dynamics can help optimize the use of crypto rewards in future fundraising efforts, ensuring they are deployed in contexts where they can achieve the greatest impact. Crypto rewards, as reflected in airdrops, have been widely used as a promotional strategy by blockchain-based projects [Li et al., 2021]; its effectiveness in supporting social causes that are not blockchain-based is unseen and barely understood. Our study suggests that ICO has a great potential to stimulate donations to support social causes that are not blockchain-based. To increase the societal impact of blockchain technology and accelerate the adoption of blockchain, the founders and designers of blockchain should consider applying crypto rewards to various social movements and activities. Our finding also indicates the necessity for blockchains to support airdrops to effectively improve fundraising performance when crypto rewards are present. Blockchain designers should also improve the design of blockchain-related platforms to better support airdrops. For example, currently, some airdrops can only be issued if a donor makes a direct transfer of funds to the recipient’s wallet. Donors who use intermediary platforms (e.g., Coinbase) will not receive the airdrop due to technology limitations. Blockchain designers can work with intermediary platforms to better design and streamline the airdrop process. Last but not least, our study sheds light on the design of NFT thank-you gifts and offers two prescriptive suggestions. First, fundraisers should showcase the NFT thank-you gifts before the commencement of fundraising efforts. This is because the graphic design of the NFT thank-you gifts could play a role in the giving decision. Second, the thank-you gifts could be designed to focus on both the donor’s identity and the prospective recipient’s identity to reinforce the acts of giving. 19 Crypto Rewards in Fundraising Appendix I – Ordered Treatment Effect Identification In both the blockchain-level and the transaction-level analyses, we leverage a modified DiD analysis to identify the ordered treatment effect, or the average treatment effect on the treated (Ethereum donors), represented by ATET (EB|E) =E[OutcomeE 1−OutcomeB 1|E], where E[Outcomed t]represents the expected outcome, with d∈[B, E, 0]andt∈[0,1]. We use d=Bto illustrate the treatment to get the crypto reward with a low probability, as in the Bitcoin blockchain; we use d=Eto illustrate the treatment to get crypto rewards with a high probability, as in the Ethereum blockchain; we use d= 0to illustrate the condition when the treatment of an airdrop has not been announced or has stopped. We use t= 1to denote the time when the airdrop was available and t= 0to denote the time when it is not available. This is equivalent to the local treatment effects discussed in Angrist and Imbens [1995]. We can re-write this equation such that: ATET (EB|E) =E[OutcomeE 1−OutcomeB 1|E] =E[OutcomeE 1|E]−E[OutcomeB 1|E]. (A1) We observe E[OutcomeE 1|E]but not E[OutcomeB 1|E], and draw inferences from the Bitcoin blockchain by leveraging the strong parallel assumption that E[OutcomeB 1|E]−E[Outcome0 0|E] =E[OutcomeB 1|B]−E[Outcome0 0|B]. This assumption is an equal effect size assumption that likely holds in our context if ETH holders and BTC holders are equivalently sensitive to external rewards. Specifically, it is equivalent to saying that the spike we observe from ETH in response to the airdrop would also occur in BTC if the airdrop is more likely to be issued in BTC rather than ETH. We believe that this assumption holds because, from a blockchain standpoint, ETH and BTC are interchangeable. While BTC and ETH holders may hold different beliefs (e.g., about intervention and decentralization), the value of the airdrop to ETH holders and BTC holders should be similar both in terms of monetary incentive and symbolic recognition. Thus, we can re-write ATET (EB|E)such that: ATET (EB|E) =E[OutcomeE 1−OutcomeB 1|E] =E[OutcomeE 1|E]−E[Outcome0 0|E]−E[OutcomeB 1|B] +E[Outcome0 0|B],(A2) where every component of the right side of Equation (2) is observed. Even if we believe that this assumption does not hold (e.g., ETH holders may react more aggressively to the airdrop), we can partially identify the ordered treatment effects as long as E[OutcomeB 0|E]−E[Outcome0 0|E] =E[OutcomeB 0|B]−E[Outcome0 0|B]. This common trend assumption is widely used in classic DiD designs and is highly likely to hold given the common pre-intervention trends we illustrated in the manuscript. Fricke [2017] proves that with partial identification, we can interpret the estimates as the lower bound in the magnitude for the treatment effect. The detailed econometric models for the blockchain-level and transaction-level analyses are presented in Equations (1) and (2) of the manuscript. 20 Crypto Rewards in Fundraising Appendix II – Ethereum Moderation Analyses As reported in Section 3.5 of the manuscript, we explore the mechanism behind the reduction of contribution sizes following the announcement of crypto rewards in Study I. This is done by performing two moderation analyses using only donation transactions in Ethereum. The two moderators of our choice are Ethereum Name Service (ENS) adoption ( ENS ) and intermediary platform usage ( Intermediaries ). We only use Ethereum transactions for this analysis because these two moderators only exist on the Ethereum blockchain. Since the moderation analyses only used Ethereum transactions, we did not include hourly effects. It is possible that users who adopted ENS and used intermediary platforms have varying wealth levels. As such, we include a control variable, NFTV alue , to account for the wealth effect. We report the results in Table A1. Table A1: Moderation -ENS and Intermediaries DV: Log( DonSize ) Log( DonSize ) Airdrop −0.530∗∗∗(0.016) −0.493∗∗∗(0.015) ENS 0.644∗∗∗(0.025) – Intermediaries – 1.077∗∗∗(0.036) Airdrop ×ENS 0.088∗∗∗(0.032) – Airdrop ×Intermediaries – 0.330∗∗∗(0.057) NFTV alue 0.024∗∗∗(0.0005) 0 .033∗∗∗(0.0005) Intercept 3.417∗∗∗(0.015) 4 .293∗∗∗(0.913) Hour FE Yes Yes Observations 55,746 55,746 R20.109 0.178 Adjusted R20.109 0.176 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 Appendix III – Robustness Checks for Study I Remove Minuscule Donations In this robustness check, we remove minuscule donations, which are usually small in size. The 5th percentile of contribution size is $1.01 for ETH and $4.94 for BTC. We perform two analyses, with one removing donations below $5 and the other removing donations below $1. The results are reported in Tables A2 and A3, where we find consistent findings. 21 Crypto Rewards in Fundraising Table A2: Robustness - Remove Minuscule Donations <= $5 Aggregate (Hourly) Matched Transactions DV: DonCount AvgDonSize DonSize DonSize Airdrop ×Ether 2.059*** -0.398*** -0.885*** -0.941*** (0.134) (0.087) (0.096) (0.094) Airdrop 1.933*** 0.245 0.194 0.261 (0.512) (0.406) (0.895) (0.890) Ether 0.225 0.305*** 0.062 0.069 (0.146) (0.095) (0.096) (0.096) TimeSinceFirstSend – – – -0.237*** – – – (0.039) TimeSinceFirstRec – – – 0.247*** – – – (0.037) Log(PastTrans + 1) – – – 0.098*** – – – (0.008) FeeRate -0.007*** 0.002 0.004*** 0.004** (0.002) (0.001) (0.002) (0.002) Intercept 0.682* 4.987*** 3.526*** 3.129*** (0.362) (0.333) (0.790) (0.787) Time Dummy Yes Yes Yes Yes Observations 268 267 22,687 22,687 R20.912 0.692 0.079 0.089 Adjusted R20.820 0.370 0.073 0.083 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 Table A3: Robustness - Remove Minuscule Donations <= $1 Aggregate (Hourly) Matched Transactions DV: DonCount AvgDonSize DonSize DonSize Airdrop ×Ether 2.162*** -0.496*** -0.773*** -0.835*** (0.144) (0.093) (0.088) (0.086) Airdrop 1.914*** 0.240 0.117 -0.124 (0.546) (0.434) (1.009) (0.992) Ether 0.293* 0.236** -0.179* -0.143 (0.156) (0.101) (0.107) (0.105) TimeSinceFirstSend – – – -0.115*** – – – (0.023) TimeSinceFirstRec – – – 0.044** – – – (0.020) Log(PastTrans + 1) – – – 0.241*** – – – (0.008) FeeRate -0.007*** 0.003* 0.007*** 0.007*** (0.002) (0.002) (0.002) (0.002) Intercept 0.661* 5.030*** 3.668*** 3.368*** (0.386) (0.355) (0.901) (0.886) Time Dummy Yes Yes Yes Yes Observations 268 267 29,423 29,423 R20.907 0.698 0.129 0.159 Adjusted R20.810 0.382 0.125 0.155 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 22 Crypto Rewards in Fundraising Alternative Treatment Definition In our main analysis, we consider the observation window from Feb. 26, 2022 to March 4, 2022, with the treatment lasting from the official announcement of the airdrop till the planned snapshot. In this robustness check, we changed the ending point to the cancellation of the airdrop on March 3 at 6:00 AM, 2022. The exclusion of the post-cancellation period allows a conservative estimation of the treatment effect. As can be seen from the results in Table A4 of this appendix, our findings stay robust. Table A4: Robustness - Alternative Treatment Definition Aggregate (Hourly) Matched Transactions DV: DonCount AvgDonSize DonSize DonSize Airdrop ×Ether 2.777*** -0.576*** -0.885*** -0.941*** (0.111) (0.105) (0.096) (0.094) Airdrop 3.533*** -0.237 0.023 -0.095 (0.383) (0.446) (0.972) (0.952) Ether 0.320*** 0.182* -0.290** -0.255** (0.107) (0.102) (0.113) (0.110) TimeSinceFirstSend – – – -0.181*** – – – (0.025) TimeSinceFirstRec – – – 0.079*** – – – (0.021) Log(PastTrans + 1) – – – 0.281*** – – – (0.008) FeeRate -0.007*** 0.003* 0.008*** 0.007*** (0.002) (0.002) (0.002) (0.002) Intercept 0.638** 5.081*** 3.766*** 3.441*** (0.269) (0.363) (0.964) (0.945) Time Dummy Yes Yes Yes Yes Observations 268 267 31,075 31,075 R20.956 0.693 0.127 0.163 Adjusted R20.910 0.372 0.124 0.159 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 23 Crypto Rewards in Fundraising Alternative Time Window In our main analysis, we removed transactions that happened after the initial announcement of “no airdrop" and the subsequent announcement of an airdrop from the Ukrainian government because this period is associated with a possible airdrop. In this robustness check, we included transactions that occurred during this time window and considered this period as no airdrop. As we show in Table A5 of this appendix, our results remained unchanged. Table A5: Robustness - Alternative Time Window Aggregate (Hourly) Matched Transactions DV: DonCount AvgDonSize DonSize DonSize Airdrop ×Ether 2.029*** -0.479*** -0.751*** -0.804*** (0.160) (0.096) (0.090) (0.089) Airdrop 1.991*** 0.194 0.069 -0.178 (0.629) (0.463) (1.082) (1.061) Ether 0.561*** 0.156 -0.371*** -0.337*** (0.172) (0.104) (0.108) (0.106) TimeSinceFirstSend – – – -0.200*** – – – (0.023) TimeSinceFirstRec – – – 0.113*** – – – (0.020) Log(PastTrans + 1) – – – 0.281*** – – – (0.008) FeeRate -0.009*** 0.003* 0.008*** 0.007*** (0.003) (0.002) (0.002) (0.002) Intercept 0.551 5.102*** 3.856*** 3.480*** (0.444) (0.379) (0.967) (0.948) Time Dummy Yes Yes Yes Yes Observations 314 313 36,425 36,425 R20.876 0.657 0.118 0.153 Adjusted R20.748 0.301 0.114 0.149 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 24 Crypto Rewards in Fundraising Multiple Donations of the Same Wallet It is possible for one wallet to be associated with multiple donation transactions. In our main analysis, we sum up donations from the same wallet if they were transacted in the same minute. In this robustness check, we only keep the first donation transaction for each wallet, and our results remain unchanged. It is notable that the observation for the transactional analysis has reduced due to the way we process the data. As we show in Table A6 of this appendix, our results stay unchanged. Table A6: Robustness - Multiple Transactions from the Same Wallet Aggregate (Hourly) Matched Transactions DV: DonCount AvgDonSize DonSize DonSize Airdrop ×Ether 2.231*** -0.525*** -0.843*** -0.911*** (0.151) (0.099) (0.094) (0.092) Airdrop 1.704*** 0.304 0.347 0.114 (0.577) (0.465) (1.086) (1.064) Ether 0.236 0.176 -0.263** -0.226** (0.165) (0.109) (0.114) (0.112) TimeSinceFirstSend – – – -0.184*** – – – (0.025) TimeSinceFirstRec – – – 0.080*** – – – (0.021) Log(PastTrans + 1) – – – 0.285*** – – – (0.008) FeeRate -0.008** 0.004* 0.008*** 0.007*** (0.002) (0.001) (0.002) (0.002) Intercept 0.693* 5.068*** 3.740*** 3.415*** (0.408) (0.381) (0.961) (0.942) Time Dummy Yes Yes Yes Yes Observations 268 267 30,802 30,802 R20.901 0.680 0.129 0.164 Adjusted R20.799 0.345 0.125 0.160 Note:∗p<0.1;∗∗p<0.05;∗∗∗p<0.01 References Anja Achtziger, Carlos Alós-Ferrer, and Alexander K Wagner. Money, depletion, and prosociality in the dictator game. Journal of Neuroscience, Psychology, and Economics , 8(1):1, 2015. George A Akerlof and Rachel E Kranton. Economics and identity. The quarterly journal of economics , 115(3):715–753, 2000. Joshua Angrist and Guido Imbens. Identification and estimation of local average treatment effects, 1995. Roland Bénabou and Jean Tirole. Incentives and prosocial behavior. American economic review , 96(5):1652–1678, 2006. Yves Breitmoser. Estimation of social preferences in generalized dictator games. Economics Letters , 121(2):192–197, 2013. 25 Crypto Rewards in Fundraising Barbara Briers, Mario Pandelaere, and Luk Warlop. Adding exchange to charity: a reference price explanation. Journal of Economic Psychology , 28(1):15–30, 2007. Edward Cartwright and Adam Thompson. Using dictator game experiments to learn about charitable giving. VOLUNTAS: International Journal of Voluntary and Nonprofit Organizations , 34(1):185–191, 2023. Matthew Chao. Demotivating incentives and motivation crowding out in charitable giving. Proceedings of the National Academy of Sciences , 114(28):7301–7306, 2017. Matthew Chao and Geoffrey Fisher. Self-interested giving: The relationship between conditional gifts, charitable donations, and donor self-interestedness. Management Science , 68(6):4537–4567, 2022. Esther Duflo. Schooling and labor market consequences of school construction in indonesia: Evidence from an unusual policy experiment. American economic review , 91(4):795–813, 2001. Catherine C Eckel and Philip J Grossman. Rebate versus matching: does how we subsidize charitable contributions matter? Journal of Public Economics , 87(3-4):681–701, 2003. Catherine C Eckel and Philip J Grossman. Subsidizing charitable giving with rebates or matching: Further laboratory evidence. Southern Economic Journal , 72(4):794–807, 2006. Christoph Engel. Dictator games: A meta study. Experimental economics , 14:583–610, 2011. Armin Falk. Gift exchange in the field. Econometrica , 75(5):1501–1511, 2007. Christina Felfe, Natalia Nollenberger, and Núria Rodríguez-Planas. Can’t buy mommy’s love? universal childcare and children’s long-term cognitive development. Journal of population economics , 28(2):393–422, 2015. Bruno S Frey and Reto Jegen. Motivation crowding theory. Journal of economic surveys , 15(5):589–611, 2001. Bruno S Frey and Felix Oberholzer-Gee. The cost of price incentives: An empirical analysis of motivation crowding-out. The American economic review , 87(4):746–755, 1997. Hans Fricke. Identification based on difference-in-differences approaches with multiple treatments. Oxford Bulletin of Economics and Statistics , 79(3):426–433, 2017. Luca Gandullia and Emanuela Lezzi. The price elasticity of charitable giving: New experimental evidence. Economics Letters , 173:88–91, 2018. Uri Gneezy and Aldo Rustichini. A fine is a price. The journal of legal studies , 29(1):1–17, 2000. John G Holmes, Dale T Miller, and Melvin J Lerner. Committing altruism under the cloak of self-interest: The exchange fiction. Journal of experimental social psychology , 38(2):144–151, 2002. Minah H Jung, Leif D Nelson, Ayelet Gneezy, and Uri Gneezy. Paying more when paying for others. Journal of personality and social psychology , 107(3):414, 2014. Linda Kamas and Anne Preston. What can social preferences tell us about charitable giving? evidence on responses to price of giving, matching, and rebates. In Charity with Choice , pages 165–199. Emerald Group Publishing Limited, 2010. 26 Crypto Rewards in Fundraising Judd B Kessler and Katherine L Milkman. Identity in charitable giving. Management Science , 64(2):845–859, 2018. Hee Jin Kim, Ji Sun Hong, Hyun Chan Hwang, Sun Mi Kim, and Doug Hyun Han. Comparison of psychological status and investment style between bitcoin investors and share investors. Frontiers in Psychology , 11:502295, 2020. Alfie Kohn. The brighter side of human nature: Altruism and empathy in everyday life . Basic Books, 2008. Jian Li, Xiang Shawn Wan, Hsing Kenneth Cheng, and Xi Zhao. Operation dumbo drop: To airdrop or not to airdrop for initial coin offering success? Hsing Kenneth and Zhao, Xi, Operation Dumbo Drop: To Airdrop or Not to Airdrop for Initial Coin Offering Success , 2021. Chen Liang, Murat Tunc, and Gordon Burtch. Market responses to genuine versus strategic generosity: An empirical examination of nft charity fundraisers. arXiv preprint arXiv:2401.12064 , 2024. John A List. On the interpretation of giving in dictator games. Journal of Political economy , 115(3):482–493, 2007. John A List. Introduction to field experiments in economics with applications to the economics of charity. Experimental Economics , 11:203–212, 2008. John A List and David Lucking-Reiley. The effects of seed money and refunds on charitable giving: Experimental evidence from a university capital campaign. Journal of political Economy , 110(1):215–233, 2002. Yuewen Liu and Juan Feng. Does money talk? the impact of monetary incentives on user-generated content contributions. Information Systems Research , 32(2):394–409, 2021. Dale T Miller. The norm of self-interest. American Psychologist , 54(12):1053, 1999. Dale T Miller and Deborah A Prentice. Collective errors and errors about the collective. Personality and Social Psychology Bulletin , 20(5):541–550, 1994. George E Newman and Y Jeremy Shen. The counterintuitive effects of thank-you gifts on charitable giving. Journal of economic psychology , 33(5):973–983, 2012. Anita Ramaswamy. Why web3’s wealthy are donating crypto instead of cash, Mar 2022. URL https://techcrunch. com/2022/03/20/web3-charity-donate-crypto-cryptocurrency-nonprofit-cash/ . Recognition Art. Establishing a Budget for Your Donor Appreciation Project — recognitionart.com. https: //recognitionart.com/ideas/establishing-a-budget-for-your-donor-appreciation-project/ , 2023. [Accessed 07-02-2024]. Anya Samek and Roman M Sheremeta. Selective recognition: How to recognize donors to increase charitable giving. Economic Inquiry , 55(3):1489–1496, 2017. Claude M Steele. A threat in the air: How stereotypes shape intellectual identity and performance. American psychologist , 52(6):613, 1997. The Giving Block. The 2023 Annual Report on Crypto Philanthropy. https://thegivingblock.com/ annual-report/ , 2023. [Accessed 07-02-2024]. 27 Crypto Rewards in Fundraising Srikar Velichety, Sudha Ram, and Jesse Bockstedt. Quality assessment of peer-produced content in knowledge repositories using development and coordination activities. Journal of Management Information Systems , 36(2): 478–512, 2019. Coady Wing, Kosali Simon, and Ricardo A Bello-Gomez. Designing difference in difference studies: best practices for public health policy research. Annu Rev Public Health , 39(1):453–469, 2018. Julian J Zlatev and Dale T Miller. Selfishly benevolent or benevolently selfish: When self-interest undermines versus promotes prosocial behavior. Organizational Behavior and Human Decision Processes , 137:112–122, 2016. 28
{ "id": "2207.07490" }
2405.02547
Crypto Market Analysis & Real-Estate Business Protocol Proposal | Application of Ethereum Blockchain
This paper examines the dynamics of the cryptocurrency market and proposes a novel blockchain-based protocol for real estate transactions. Our analysis includes a detailed review of price trends, volatility, and correlations within the cryptocurrency market, focusing on major assets like Bitcoin, Ethereum, and Tether. We provide a critical assessment of the impact of significant market events, such as the FTX bankruptcy, highlighting the vulnerabilities and resilience of the crypto market. The study also explores the potential of blockchain technology to innovate real estate transactions by enabling the secure and transparent handling of property deeds without traditional intermediaries. We introduce a blockchain protocol that reduces transaction costs, enhances security, and increases transparency, making real estate transactions more accessible and efficient. Our proposal aims to leverage the inherent benefits of blockchain to address real-world challenges in real estate transactions, providing a scalable and secure platform for property sales in a global market.
http://arxiv.org/pdf/2405.02547v1
Sid Bhatia, Samuel Gedal, Himaya Jeyakumar Grace Lee, Ravinder Chopra, Daniel Roman, Shrijani Chakroborty
econ.GN, q-fin.EC
econ.GN
Stevens Institute of Technology Crypto Market Analysis & Real-Estate Business Protocol Proposal Application of Ethereum Blockchain Sid Bhatia, Samuel Gedal, Himaya Jeyakumar Grace Lee, Ravinder Chopra, Daniel Roman, Shrijani Chakroborty 26 April 2024arXiv:2405.02547v1 [econ.GN] 4 May 2024 Contents 1 Introduction 2 2 Part I: Crypto Market Analysis 2 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Detailed Overview and Crypto Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2.1 Bitcoin (BTC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2.2 Ethereum (ETH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2.3 XRP (Ripple) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2.4 Dogecoin (DOGE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2.5 Tether (USDT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.3 Crypto Selection Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.4 Market Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4.1 Price Trend Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4.2 Volatility Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4.3 Correlation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.5 FTX Delta Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5.1 Event Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5.2 FTX Impact on 11/11/22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5.3 Immediate Impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5.4 FTX Impact in November 2022 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.5.5 Long-Term Impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.5.6 Benchmark and Market Performance Comparison . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.5.7 FTX Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.6 Crypto Market Analysis Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6.1 Volatility and Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6.2 Market Correlations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6.3 FTX Crisis Impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6.4 Long-Run Market Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.7 Part I Key Takeaways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.8 Future Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 Part II: Real-Estate Business Protocol Proposal 10 3.1 Business Proposal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.1 Overview of the Blockchain Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.2 Transactional Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.3 Advantages of Blockchain in Real Estate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 Target Customers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.1 Market Strategy and Consumer Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.2 Integration of Market Sides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 Competitive Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.1 Propy: A Comparative Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4 Competitive Advantage Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.5 Implementation Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.6 Economic Viability for Ethereum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.7 Comparative Analysis of Blockchain Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.8 Synthesis of the Blockchain Real-Estate Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4 Conclusion 17 4.1 Synthesis of Findings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2 Prospects and Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 Summary and Forward Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1 1 Introduction In the dynamic realm of financial technology, blockchain and cryptocurrencies represent two of the most significant innovations that have reshaped how transactions are conducted and assets are managed globally ( futurecryptocurrencies2022 ). This paper delves into a dual-focused analysis and proposal. Firstly, we conduct a thorough market analysis of a select group of cryptocurrencies, each chosen for its unique role and impact within the broader digital currency landscape. The cryptocurrencies under review include Bitcoin, often regarded as the progenitor of all digital currencies; Ethereum, notable for its robust smart contract capabilities; XRP, designed primarily for rapid finan- cial transactions; Dogecoin, which began as a meme but has since gained substantial practical application; and Tether, a stablecoin tied to the US dollar, offering a less volatile refuge within the highly fluctuant crypto market (evolutioncryptomarket2017 ). This study not only examines the price trends, volatilities, and inter-cryptocurrency correlations but also assesses the impact of significant market events, such as the FTX bankruptcy, on these digital assets ( ftxresponse2023 ). The insights garnered from this analysis aim to provide a granular understanding of how various cryptocurrencies react to internal and external pressures, influencing investor sentiment and market dynamics. Following the market analysis, the second focus of this paper introduces an innovative business proposal lever- aging blockchain technology. This proposal outlines a new protocol for real estate transactions, allowing property deeds to be securely managed and transferred without the need for traditional intermediaries such as lawyers and brokers. By employing blockchain technology, this protocol seeks to revolutionize the real estate market by enhanc- ing transparency, reducing transaction costs, and simplifying the transaction process for buyers and sellers across the globe ( blockchainrealestate2021 ). Through comprehensive analysis and forward-thinking proposals, this paper contributes to the ongoing discus- sions surrounding the application of blockchain technology in traditional sectors, proposing not only a new way to understand cryptocurrencies in relation to the traditional financial markets but also offering a practical application that addresses real-world challenges in real estate transactions. 2 Part I: Crypto Market Analysis 2.1 Overview This analysis encompasses a selection of five distinct cryptocurrencies, each representing a unique facet of the current digital currency ecosystem. Our selected cryptocurrencies include: Bitcoin (BTC) , recognized as the original and most well-known cryptocurrency; Ethereum (ETH) , noted for its advanced smart contract capabilities; XRP , developed by Ripple Labs with a focus on rapid digital payments; Dogecoin (DOGE) , which has evolved from a meme into a cryptocurrency with practical uses in tipping and donations; and Tether (USDT) , a stablecoin that introduces a measure of stability in the otherwise volatile cryptocurrency market. This diverse selection aims to cover a broad spectrum of functionalities, market positions, and technological innovations within the crypto space, providing a comprehensive overview of its varied applications and implications. 2.2 Detailed Overview and Crypto Protocol 2.2.1 Bitcoin (BTC) Overview: Introduced in 2009 by an entity under the pseudonym Satoshi Nakamoto, Bitcoin stands as the inaugural cryptocurrency, designed to operate as a decentralized digital currency without the oversight of a central authority. Transactions are conducted directly between users through the peer-to-peer Bitcoin network. Protocol: Bitcoin’s network is underpinned by a proof-of-work (PoW) protocol, wherein miners employ signif- icant computational resources to solve intricate mathematical problems, thus validating transactions and securing the network, with new bitcoins awarded as a mining reward. For more details see nakamoto2009bitcoin . 2.2.2 Ethereum (ETH) Overview: Launched in 2015, Ethereum transcends the conventional definition of a cryptocurrency. It serves as a platform for the development of decentralized applications (DApps) through smart contracts, aiming to democratize access to a decentralized financial system. 2 Protocol: Initially based on a proof-of-work mechanism similar to that of Bitcoin, Ethereum is transitioning to a proof-of-stake (PoS) model with its Ethereum 2.0 update, which promises enhanced scalability and reduced energy consumption. Refer to buterin2015ethereum for additional insights. 2.2.3 XRP (Ripple) Overview: Created by Ripple Labs in 2012, XRP is central to a digital payment protocol that surpasses its identity as a mere cryptocurrency. It facilitates rapid payment settlements across the network. Protocol: The XRP Ledger utilizes a consensus protocol that does not rely on the traditional blockchain mining process; instead, it achieves consensus through a network of independent validating servers that constantly compare transaction records. Seeripple2012xrp for further information. 2.2.4 Dogecoin (DOGE) Overview: Originating as a humorous take on the cryptocurrency phenomenon in 2013, Dogecoin was inspired by the ”Doge” meme featuring a Shiba Inu. It has since cultivated a community focused on using the cryptocurrency for charitable contributions and tipping online content creators. Protocol: Dogecoin operates on a less energy-intensive proof-of-work algorithm derived from Litecoin, known as Scrypt, facilitating faster transaction processing. Detailed information available at dogecoin2013meme . 2.2.5 Tether (USDT) Overview: Introduced in 2014, Tether represents a stablecoin that is tethered to the US dollar, aiming to meld the flexibility of cryptocurrencies with the stability of fiat currency. Protocol: Tether supports a hybrid use of protocols, operating on the Omni Layer of the Bitcoin blockchain and as an ERC-20 token on the Ethereum blockchain, among other blockchain platforms. Further details can be found in tether2014usdt . These cryptocurrencies were chosen to provide a diverse perspective on the various applications, market us- age, and technological advancements within the broader cryptocurrency environment. From January 1, 2022, to December 31, 2022, our study observed no missing data, ensuring the completeness and reliability of the analysis conducted during this period. 2.3 Crypto Selection Rationale The selection of cryptocurrencies for this study was informed by a multifaceted rationale emphasizing diversity, technological innovation, community engagement, and market stability. Each cryptocurrency was chosen not only for its unique position within the market but also for its contribution to advancing the blockchain technology landscape. Diversity and Relevance: Bitcoin and Ethereum are selected as foundational pillars within the cryptocur- rency domain, illustrating the broad spectrum of blockchain applications. Bitcoin, often hailed as the original cryptocurrency, has pioneered the concept of a decentralized digital currency and enjoys widespread adoption and recognition. Ethereum, on the other hand, extends the utility of blockchain beyond mere financial transactions through its support for smart contracts, thereby catalyzing a plethora of decentralized applications (DApps). This diversity underscores the significant role these currencies play in the ongoing development and maturation of the cryptocurrency market. Technological Diversity: XRP and Tether were chosen to highlight the technological diversity within blockchain implementations. XRP, developed by Ripple, is notable for its rapid transaction capabilities and minimal energy consumption, diverging from the traditional mining-based consensus used by currencies like Bitcoin. Similarly, Tether introduces a model of stability in the highly volatile cryptocurrency market by being pegged to the US dollar, showcasing a unique application of blockchain technology in creating stablecoins that mitigate the price volatility typically associated with cryptocurrencies. Community and Innovation: Dogecoin exemplifies the impact of community on the value and adoption of a cryptocurrency. Originating as a meme, Dogecoin has transcended its initial novelty to foster a robust community 3 that actively engages in tipping and charitable activities through the currency. This aspect highlights the role of societal and cultural dynamics in shaping the cryptocurrency landscape, emphasizing the importance of community- driven development and innovation. Market Stability and Innovations: Finally, the inclusion of Tether also addresses the critical challenge of market stability. By anchoring its value to a stable fiat currency, Tether offers a pragmatic solution to the issue of volatility, which is a pervasive concern for investors in cryptocurrencies like Bitcoin and Ethereum. This approach not only facilitates greater market stability but also enhances the practicality of cryptocurrencies for everyday transactions and financial applications. Collectively, these selections provide a comprehensive overview of the current state and potential future direc- tions of blockchain technology, illustrating a spectrum of use cases from foundational cryptocurrencies to innovative adaptations addressing specific market needs. 2.4 Market Analysis Figure 1: Standardized Daily Prices of Cryptocurrencies for 2022 2.4.1 Price Trend Analysis The analysis of standardized price trends of Bitcoin (BTC), Ethereum (ETH), XRP, Dogecoin (DOGE), and Tether (USDT) throughout 2022 reveals several key insights into the dynamics of the cryptocurrency market: Correlated Movements: The data illustrates that most cryptocurrencies exhibited closely correlated movements over the course of the year. Such correlation is indicative of the substantial influence exerted by broader market forces and global economic events on the cryptocurrency market as a whole, driving collective swings in investor sentiment—whether bullish or bearish. 4 Volatility Across Assets: The degree of volatility varied significantly among the analyzed cryptocurrencies. Bitcoin and Ethereum experienced relatively moderate fluctuations, maintaining tighter price bands, while Dogecoin displayed higher volatility, characterized by more pronounced peaks and troughs. This disparity in volatility underscores the differential market perceptions and investor bases of these assets. Stablecoin Anomaly: An unexpected anomaly was observed in the price trend of Tether (USDT), particularly in May 2022, where it deviated markedly from its expected stable trajectory. Such a divergence, given the design of stablecoins to maintain parity with a peg (e.g., USD), suggests potential extraordinary events, data reporting inaccuracies, or underlying issues with the stability mechanisms during that period. Market Recovery Ability: Following significant market dips, the cryptocurrencies demonstrated varying de- grees of recovery. Bitcoin and Ethereum showed robust resilience and recovery capabilities compared to Dogecoin. This variation could reflect differing levels of market confidence and inherent stability within these digital assets. Stablecoin’s Peculiar Trend: Assuming the accuracy of the observed sharp decline in USDT’s value, this could represent a period of intense market stress or a temporary disruption in the stablecoin’s dollar peg. However, such incidents are generally ephemeral, as corrective mechanisms typically restore stability swiftly, aligning with the observed rapid return to normalcy. From the analysis of these price trends, it is evident that while cryptocurrencies are interconnected and re- spond collectively to market shifts, individual assets exhibit distinct behaviors influenced by their specific market dynamics, investor sentiment, and technological foundations. The peculiar movement observed in Tether’s price trend during the analyzed period merits further investigation to ascertain the causes and implications of such an anomaly. 2.4.2 Volatility Analysis The study of volatility in cryptocurrency markets provides crucial insights into the risks and stability of digital assets. By calculating daily returns and examining their standard deviations, we can gauge the unpredictability associated with each cryptocurrency and identify the factors contributing to these dynamics. Dogecoin (DOGE-USD): Dogecoin exhibits the highest volatility among the cryptocurrencies analyzed, with a standard deviation of approximately 5.64% . This elevated volatility can primarily be attributed to its relatively low price per unit, which renders it more susceptible to significant percentage changes on a per-unit basis. Moreover, Dogecoin’s price is notably influenced by social media trends and possesses comparatively less market liquidity than more established cryptocurrencies. These elements combine to increase its price volatility, reflecting the substantial impact of retail investor sentiment and speculative trading on its market behavior. Tether (USDT-USD): In stark contrast, Tether shows the lowest volatility, with a standard deviation near 0.03% . As a stablecoin, Tether is explicitly designed to be pegged to a fiat currency, specifically the US dollar, and maintains a stable value through various regulatory and technological mechanisms. This stability is critical for its role in providing a safe haven during market turbulence and for facilitating transactions where volatility can be a deterrent. Bitcoin (BTC-USD) and Ethereum (ETH-USD): Both Bitcoin and Ethereum exhibit moderate levels of volatility, reflecting their established presence in the market and larger capitalizations. These factors typically confer higher liquidity and result in less drastic percentage changes in daily prices. Benchmark Volatility Analysis: Comparing the volatility of cryptocurrencies with traditional financial mar- kets, such as the S&P 500, highlights the unique risk profiles inherent to digital assets. The S&P 500, with a volatility of 1.00% , offers a contrast to the higher volatility levels seen in cryptocurrencies, underscoring the potential for greater price stability in traditional equity markets. 5 Market Implications: This variability in volatility, especially when benchmarked against traditional indices like the S&P 500, illustrates the diverse nature of cryptocurrency markets. While stablecoins like Tether aim to minimize price fluctuations, other cryptocurrencies such as Dogecoin and Bitcoin exhibit a range of volatilities, heavily influenced by investor sentiment, liquidity, and their roles within the digital economy. The higher volatility of cryptocurrencies compared to traditional markets like the S&P 500 underscores their speculative nature and the heightened risks they pose, which investors must navigate carefully. This analysis em- phasizes the importance of strategic risk assessment and portfolio diversification to mitigate the inherent volatility of cryptocurrencies. 2.4.3 Correlation Analysis Figure 2: Correlation Matrix Heatmap of Cryptocurrencies for 2022 A comprehensive examination of the correlation matrix for daily returns of Bitcoin ( BTC ), Ethereum ( ETH ), XRP, Dogecoin ( DOGE ), and Tether ( USDT ) in tandem with the S&P benchmark ( GSPC ) elucidates the interrelationships among these prominent cryptocurrencies: High Correlations: 6 •Bitcoin and Ethereum: Exhibiting a correlation coefficient of 0.90, BTC and ETH demonstrate a very strong positive correlation, indicating that these cryptocurrencies often move in tandem. This strong linkage is primarily due to their predominant positions in the market, where both are frequently influenced by similar economic factors, investor sentiments, and regulatory developments. •Ethereum and XRP: With a correlation of 0.75, movements in Ethereum frequently correlate closely with those in XRP, suggesting overlapping functionalities and investor bases that react similarly to market stimuli in these two platforms. Moderate Correlations: •XRP with Bitcoin and Dogecoin: XRP displays moderate correlations of 0.74 with BTC and 0.61 with DOGE. These correlations suggest a level of synchronicity, albeit influenced by distinct market dynamics and external factors specific to each cryptocurrency. •Dogecoin with Ethereum and Bitcoin: Correlation coefficients of 0.67 with ETH and 0.65 with BTC for Dogecoin indicate a moderate degree of correlation, influenced by broader market trends that impact all cryptocurrencies, though each responds according to its unique market niche and investor behavior. Lower Correlations with Tether: •All Cryptocurrencies with Tether: Tether, being a stablecoin tied closely to the US dollar, shows significantly lower correlation coefficients with BTC ( 0.26), ETH ( 0.25), XRP ( 0.28), and DOGE ( 0.27). This fundamental difference in design and purpose—aimed at providing stability—results in less synchronized movements with the more speculative cryptocurrency assets. Benchmark Correlation Comparison: Comparison with traditional financial markets, specifically through a correlation study with the S&P 500, reveals additional insights. While cryptocurrencies such as BTC and ETH show the highest correlation with each other, they exhibit only moderate correlation levels with the S&P 500, with BTC showing the highest correlation at 0.52. This suggests that while cryptocurrencies do move somewhat in sync with traditional financial markets, they retain distinct market dynamics that set them apart. Market Implications: These findings highlight the diverse correlation landscapes within the cryptocurrency markets, where strong intra-crypto correlations contrast with more moderate interactions with traditional financial indices. This divergence underscores the necessity for investors to consider the unique correlation patterns when diversifying portfolios or implementing hedging strategies. The mixed correlation profiles suggest both opportunities and risks, as cryptocurrencies can offer portfolio diversification benefits due to their partial independence from traditional market movements. 2.5 FTX Delta Analysis 2.5.1 Event Overview In mid-November 2022, the cryptocurrency exchange FTX filed for bankruptcy, triggering significant disturbances across the cryptocurrency markets. This event was exacerbated by the resignation of its CEO, Sam Bankman-Fried, further destabilizing the market’s confidence. 2.5.2 FTX Impact on 11/11/22 2.5.3 Immediate Impact The immediate repercussions of the bankruptcy announcement on November 11, 2022, were starkly evident across various cryptocurrencies: •Bitcoin (BTC) andRipple (XRP) each faced notable declines, with Bitcoin falling by -3.14% and XRP by-2.92% . •Ethereum (ETH) exhibited relative resilience, with a modest decline of -0.94% , reflecting its robust market presence and investor confidence. 7 Ticker Impact on Nov 11 BTC-USD -3.14% DOGE-USD -5.46% ETH-USD -0.94% USDT-USD 0.04% XRP-USD -2.92% GSPC 1.00% Table 1: FTX Impact on Cryptocurrency Prices on November 11, 2022 •Dogecoin (DOGE) experienced the most significant drop of -5.46% , illustrating its susceptibility to market shocks. •Tether (USDT) , maintaining its stability, changed insignificantly by +0.04% , underscoring its role as a stabilizing force within the volatile cryptocurrency environment. 2.5.4 FTX Impact in November 2022 Ticker Change in Nov 2022 BTC-USD -16.19% DOGE-USD -25.05% ETH-USD -17.98% USDT-USD 0.01% XRP-USD -12.02% GSPC 5.81% Table 2: Monthly Impact of FTX Bankruptcy on Cryptocurrency Prices in November 2022 2.5.5 Long-Term Impact The extended impact throughout November painted a grim picture of recovery challenges: •Major cryptocurrencies like BTC ,ETH , and XRP recorded substantial declines of -16.19% ,-17.98% , and -12.02% respectively. •DOGE was particularly hard hit, plummeting by -25.05% , marking the highest vulnerability among the group. •Conversely, USDT showed remarkable stability with only a 0.01% change, reinforcing its value proposition as a hedge against volatility. 2.5.6 Benchmark and Market Performance Comparison The correlation and impact studies reveal that while the cryptocurrency market suffered significant losses in response to the FTX crisis, the traditional financial markets, as represented by the S&P 500, exhibited contrasting behavior: •On November 11, 2022, while cryptocurrencies faced sharp declines, the S&P 500 (GSPC) experienced a rise of 1.00% , demonstrating a decoupling from cryptocurrency market dynamics. •Over the entire month of November, the S&P 500 gained 5.81% , further highlighting the resilience and differing risk profiles of traditional equity markets compared to the high-risk cryptocurrency sector. 2.5.7 FTX Conclusion The FTX bankruptcy served as a critical stress test, revealing the inherent volatility and risk exposure of speculative cryptocurrencies compared to the stability offered by stablecoins like Tether and traditional financial indices like the S&P 500. This event underscores the need for robust risk management strategies and diversified investment approaches to navigate the complexities of cryptocurrency investments effectively. 8 2.6 Crypto Market Analysis Synthesis Part I of this project delved into a comprehensive analysis of the cryptocurrency ecosystem, with an emphasis on five key cryptocurrencies (Bitcoin, Ethereum, Ripple, Dogecoin, and Tether) and comparisons against the S&P 500 index. Our study covered daily price behavior, volatility, correlations, and market responses to major events like the FTX bankruptcy. Let’s synthesize our key findings: 2.6.1 Volatility and Stability •Cryptocurrencies demonstrate substantially higher volatility than traditional markets like the S&P 500. Do- gecoin exhibited the highest volatility due to its smaller size and speculative nature. •Tether’s negligible volatility confirms its role as a stablecoin, offering refuge within the cryptocurrency market. 2.6.2 Market Correlations •Bitcoin, Ethereum, and other major cryptocurrencies are highly correlated, driven by similar market forces. •Cryptocurrencies show low-to-moderate correlation with the S&P 500, suggesting some independence and potential diversification benefits. 2.6.3 FTX Crisis Impact •The FTX bankruptcy severely impacted cryptocurrency prices, while the S&P 500 remained largely unaf- fected, highlighting sector-specific risks within crypto. •November 2022’s broader market picture reinforced this divergence. Cryptocurrencies declined significantly (excluding Tether), while the S&P 500 grew, emphasizing a decoupling during cryptocurrency-specific crises. 2.6.4 Long-Run Market Behavior •2022 data illustrates that while offering potential for growth, cryptocurrencies also carry substantial risks of sharp declines. •The S&P 500’s lower volatility and positive November performance underscore the importance of traditional equity investments for risk mitigation in diversified portfolios. 2.7 Part I Key Takeaways Diversification: Cryptocurrencies offer diversification potential, but investors must carefully manage their high- risk profile. Investment Strategy: Balancing crypto holdings with safer assets like the S&P 500 can mitigate losses during downturns. Regulatory and Market Sensitivity: Staying informed about regulatory developments and sector-specific events is crucial for navigating the dynamic cryptocurrency market. 2.8 Future Implications These insights are vital for developing robust investment strategies maximizing the potential of cryptocurrencies while safeguarding against their risks. Monitoring evolving correlations between cryptocurrencies and traditional markets will aid in understanding market dynamics and adapting investment strategies accordingly. 9 3 Part II: Real-Estate Business Protocol Proposal 3.1 Business Proposal 3.1.1 Overview of the Blockchain Protocol Our business proposal introduces an innovative blockchain protocol designed to revolutionize the real estate sector. This protocol allows homeowners to store the deeds of their houses on the blockchain and facilitates the sale of properties without traditional intermediaries such as lawyers, brokers, or other third parties. This system not only simplifies transactions but also enhances security, reduces costs, and increases transparency. 3.1.2 Transactional Process The transactional process under this protocol is streamlined to ensure efficiency and security: 1.Initiation of Sale: Homeowners list their properties on the blockchain platform directly, bypassing the need for intermediaries. This step significantly reduces the complexity and duration of property transactions. 2.Proof of Ownership: The blockchain technology inherently provides a clear, immutable record of ownership. This proof is publicly accessible and verifiable, ensuring that the current owner has indisputable ownership of the property before proceeding with the sale. 3.Payment and Transfer: The buyer pays the seller in cryptocurrency, such as Bitcoin. Following payment confirmation, the property deed is automatically transferred to the buyer’s blockchain address via a smart contract, which also handles the transaction fee, typically associated with platforms like Ethereum. 4.Final Ownership: The new owner receives the property deed securely stored on the blockchain, ensuring both safety and accessibility. This digital deed is resistant to tampering, loss, or theft, providing a permanent record of ownership. 3.1.3 Advantages of Blockchain in Real Estate The integration of blockchain into real estate transactions offers several improvements over traditional methods: Transparency: The blockchain’s immutable ledger ensures that all transactions, including historical ownership data and property details (e.g., square footage, number of bedrooms, date of last renovation), are permanently recorded and openly verifiable. This level of transparency significantly reduces the potential for fraud and disputes. Cost Efficiency: By eliminating the need for various intermediaries and reducing paperwork and manual verifi- cation processes, the blockchain protocol cuts down on significant transactional costs. These savings make real estate transactions more economical for both buyers and sellers. Global Accessibility: The blockchain protocol enables international transactions without the complexities of cross-border legalities and financial transactions, opening up the property market to global participants and investors. Market Liquidity: The use of blockchain can enhance market liquidity. Buyers who may not have immediate access to traditional financing options can leverage decentralized finance (DeFi) solutions, such as Aave , for quicker funding solutions, thereby accelerating the buying process. 3.2 Target Customers 3.2.1 Market Strategy and Consumer Segmentation Our blockchain protocol adopts a dual-sided market strategy designed to address distinct needs within the real estate transaction process. This approach targets two main customer segments: property sellers (and deed holders) and property buyers, along with a third, indirect segment involving financial lenders. 10 Property Sellers and Deed Holders: The primary market segment consists of current property owners who stand to benefit substantially from blockchain integration. Traditional methods of deed storage involve physical documentation, which not only increases the risk of loss and damage but also complicates the verification and transfer processes. Our protocol offers a secure and immutable storage solution on the blockchain, eliminating the need for physical safekeeping. In tandem with disproportionately high the current real estate market structure necessitates multiple interme- diaries, including real estate agents, brokers, and legal advisors, each adding significant transaction costs in the form of commissions and fees. Historical data indicates that commission rates have remained relatively stable over the past three decades, despite substantial increases in property values, leading to disproportionately high costs for sellers ( refer to Figure 3 ,commratetrends2013 ). Moreover, median housing prices have soared, as vividly depicted in the provided data from the Federal Reserve Economic Data (FRED, fredmspus2024 ) (see Figure 4). Our protocol simplifies this process, allowing sellers to initiate and complete sales directly on the blockchain, thereby reducing or eliminating traditional commission fees. Figure 3: Historical Analysis of Average Commission Rates in Real Estate Transactions Property Buyers: The second primary target segment includes potential property buyers who benefit from the streamlined purchase process. Through our protocol, buyers can directly engage with sellers, conduct swift and secure transactions, and gain immediate access to verified property deeds, significantly speeding up the acquisition process. The use of smart contracts ensures that all conditions of the sale are met before the transaction is finalized, offering additional security and efficiency. Financial Lenders: An emerging market segment within our protocol includes financial lenders, particularly those operating in the decentralized finance (DeFi) space. With the rise of blockchain technology, platforms like Aave have demonstrated significant demand for more dynamic lending solutions that offer higher yields compared to traditional financial products. Our protocol can connect these lenders directly with real estate buyers, providing a new avenue for secured lending at competitive interest rates, reflective of the increased risk profiles associated with cryptocurrency-based transactions ( refer to Figure 5 ). 11 Figure 4: Federal Reserve Economic Data (FRED) on Median House Sale Prices Figure 5: Top Total Value Locked (TVL) in DeFi; Growth in DeFi Loan Market Size 3.2.2 Integration of Market Sides By effectively integrating these two sides of the market—sellers and buyers with the financial backing of lenders—our blockchain protocol facilitates a comprehensive ecosystem that enhances liquidity, reduces transaction latency, and improves overall market efficiency. This integrated approach not only serves the immediate participants but also introduces a scalable model for future expansions in global real estate markets. 12 3.3 Competitive Analysis 3.3.1 Propy: A Comparative Study Propy emerges as a significant player within the blockchain-based real estate marketplace, providing a global platform that aligns closely with the decentralized ethos of the blockchain revolution. As a competitor, Propy’s operational model is built upon eliminating traditional intermediaries from the property transaction process. By leveraging smart contracts on the blockchain, Propy ensures secure and efficient property transactions. Operational Model: The core of Propy’s proposition is its decentralized marketplace, which facilitates the buying and selling of properties. This innovative approach circumvents the need for brokers and agents, potentially reducing transactional friction and cost. Furthermore, Propy offers digital deeds alongside automated escrow services, thus simplifying real estate transactions and enhancing user experience. Economic Structure: Propy’s economic framework incorporates the use of its native cryptocurrency, PRO, alongside a designated fee for smart contract execution, termed PGas. The integration of PRO within their platform ecosystem not only facilitates transactional activities but also extends utility to users engaging with Propy’s services. The current market valuation of PRO stands at $2.99, which plays a pivotal role in the cost structure of property sales on Propy’s platform. Figure 6: Analysis of Propy’s Transactional Fees for Property Sales This competitive analysis provides a deeper understanding of Propy’s strategic positioning within the blockchain- based real estate sector. By dissecting their transactional fee structure and operational model, we can assess the potential impact on our blockchain protocol’s market penetration and user adoption. 3.4 Competitive Advantage Analysis Our protocol presents a unique value proposition in the blockchain real estate marketplace, offering comprehensive solutions that address various stages of the real estate transaction process. It capitalizes on the inherent advantages of blockchain technology to deliver an end-to-end service that simplifies the complexities traditionally associated with real estate transactions. Comprehensive Transactional Solutions: At the heart of our protocol is the capability to facilitate complete real estate transactions on the blockchain. This ranges from secure deed storage to the actual execution of property sales via cryptocurrency. By providing a single, unified platform, we significantly reduce the dependency on multiple services, thereby streamlining the transaction process for all stakeholders involved. 13 Transparency and Security: The blockchain’s immutable ledger is a cornerstone feature that enhances our protocol’s appeal. It serves as an unalterable record of transactions, ensuring complete transparency and security for the transaction history. This transparency is a critical factor for buyers and sellers who prioritize trust and verifiable transparency in their transactions, eliminating the traditional concerns of fraud and ambiguity in property ownership and history. Cost Efficiency: By obviating the need for intermediaries such as agents, brokers, and legal consultants, our protocol minimizes the associated transaction costs. The conventional commission-based model, which signifi- cantly increases transaction expenses, is replaced by a more cost-effective structure that aligns with the economic preferences of a market leaning towards efficiency and reduced overhead. Global Market Accessibility: Our protocol removes the barriers to entry for international buyers and sellers, thereby facilitating global transactions. Without the constraints imposed by legal and regulatory compliance typical of centralized systems, our platform paves the way for a more inclusive and expansive real estate market, appealing to a broader investor base and contributing to the diversity of real estate offerings. In summary, our competitive advantage stems from a holistic approach that not only provides practical trans- actional capabilities but also fosters trust, reduces costs, and embraces global inclusivity. This strategic positioning is poised to disrupt the traditional real estate market, leveraging blockchain technology to its fullest potential. 3.5 Implementation Strategy The implementation of our business model onto the blockchain comprises a systematic approach, focused on smart contract formulation, asset tokenization, oracle integration, privacy considerations, and user interface development. Defining Smart Contracts: The foundation of our blockchain protocol is the design of smart contracts, which are digital representations of real estate assets, mortgages, and deed transfers. The contracts will encapsulate the logic for buying, selling, transferring ownership, and managing mortgage payments. This will involve: 1. Structuring smart contracts to encapsulate real estate transaction requirements. 2. Integrating functions for various transaction processes within these contracts. Tokenizing Real Estate Assets: We will transform real estate properties into digital tokens on the Ethereum blockchain, where each token signifies property ownership. This process will: 1. Utilize established token standards, such as ERC-20, for the representation of real assets in the digital domain. 2. Deploy contracts to issue and regulate these tokens, assigning unique identifiers to each property ( erc20whitepaper ). Integration of Oracles: Oracles will be employed to incorporate off-chain data, like property specifications and legal documents, into the blockchain. These oracles will: 1. Source trusted data essential for executing real estate transactions. 2. Update on-chain records to reflect accurate off-chain information, ensuring the veracity and reliability of data (blockchainoracle2020 ). Privacy Enhancements: Our protocol will incorporate privacy measures to safeguard sensitive transaction data, allowing for public verification while maintaining confidentiality. We will: 1. Develop smart contracts with robust privacy controls. 2. Implement encryption techniques to restrict data access to authorized entities only. 14 User Interface Development: To facilitate user interaction with our blockchain platform, we will develop accessible and intuitive interfaces. These interfaces will: 1. Offer a seamless user experience for property searches, transaction initiation, mortgage tracking, and deed management. 2. Provide tools that are comprehensible and efficient for users, irrespective of their familiarity with blockchain technology. The strategic deployment of these elements will result in a robust blockchain protocol for real estate, streamlining the transaction process and enhancing the overall experience for users in the real estate market. The careful orchestration of smart contracts, tokenization, oracles, privacy considerations, and user interfaces are essential components of our strategy to integrate real estate transactions with blockchain technology effectively. 3.6 Economic Viability for Ethereum Evaluating the economic feasibility of our business proposal on the Ethereum platform involves careful consideration of various factors, including scalability, transaction fees, and the complexity of smart contracts. Scalability Concerns: Ethereum’s scalability is a pivotal concern, particularly as transaction volumes escalate. As the leading blockchain platform, Ethereum faces challenges in maintaining performance amid rising demand. The introduction of Ethereum 2.0 promises to alleviate these issues through sharding and a proof-of-stake consensus mechanism, potentially enhancing throughput and lowering transaction costs ( blockchaingasfees2021 ). Transaction Fees: Gas fees on Ethereum are known for their volatility and can constitute a significant portion of transaction costs. These fees tend to surge during periods of network congestion, impacting the cost-benefit analysis for users engaging in real estate transactions. Monitoring the historical trends of Ethereum’s average gas fee is crucial in forecasting and managing the financial viability of transactions ( ethereumgasprices2024 ). Figure 7: Average Ethereum Gas Fees Over the Last Five Years Smart Contract Complexity: The smart contracts at the core of our real estate protocol, which will enable property transfers, loan repayments, and the enforcement of covenants, are inherently complex. The intricacy of these contracts is directly proportional to the computational resources required, thus influencing the overall gas fees incurred. This complexity must be carefully managed to ensure that the benefits of using the Ethereum platform outweigh the costs for all parties involved. The prospective enhancements with Ethereum 2.0 alongside strategic management of smart contract complexity and monitoring of gas fees are essential for ensuring the economic viability of deploying our real estate transaction protocol on the Ethereum blockchain. As we progress, it will be imperative to remain adaptable to the evolving blockchain landscape to maintain a competitive and cost-effective platform for real estate transactions. 3.7 Comparative Analysis of Blockchain Platforms In exploring the economic viability and technical suitability of our real estate transaction protocol, we extend our analysis beyond Ethereum to other leading blockchain platforms, each with distinct attributes and potential advantages. 15 Figure 8: Comparative Analysis of Ethereum Versus Alternative Blockchain Platforms Binance Smart Chain: Binance Smart Chain (BSC) emerges as a viable alternative, promising higher through- put and lower latency compared to Ethereum, which is advantageous for high-demand scenarios. Despite these benefits, BSC’s more centralized nature may raise concerns among stakeholders seeking a fully decentralized solu- tion. Solana: Solana presents a compelling case for applications necessitating rapid transaction processing, offering su- perior transaction speeds and scalability ( solana2022 ). While Solana provides an efficient alternative to Ethereum, its developer ecosystem and tooling are less mature, potentially imposing limitations on development and integra- tion efforts. Polkadot: The multi-chain framework of Polkadot facilitates cross-chain interoperability, which can significantly enhance the scope and flexibility of our protocol. Polkadot’s design allows for seamless integration with a variety of blockchain networks, potentially expanding the protocol’s reach. Nevertheless, Polkadot’s infrastructure and tooling are still evolving, which may introduce challenges during early adoption phases. This comparative analysis underscores the importance of selecting a blockchain platform that aligns with our protocol’s requirements for security, decentralization, transaction speed, and scalability. As we proceed with our implementation strategy, ongoing evaluation of these platforms’ evolving capabilities will be imperative to maintain an innovative and user-centric service in the dynamic real estate market. 3.8 Synthesis of the Blockchain Real-Estate Protocol The business protocol presented in Part II encapsulates an innovative, blockchain-based approach to real estate transactions. The proposed system introduces a transformative model that empowers homeowners to engage directly in the sale and purchase of properties, effectively circumventing the traditional, intermediary-reliant processes that are often cumbersome and less secure. Overview and Efficacy of Protocol Application The cornerstone of the proposed protocol lies in its uti- lization of blockchain’s inherent properties such as immutability, transparency, and distributed consensus. These properties facilitate a seamless transition of deeds and payments, providing a robust proof of ownership and stream- lining transactions. By leveraging smart contract technology, the protocol ensures that all prerequisites of a property transaction are automatically met, heralding a new era of efficiency in property dealings. 16 Enhancing Real Estate Transaction Dynamics The protocol offers multiple benefits over conventional meth- ods. It provides a public, transparent ledger for ownership and transaction history, reduces the costs associated with property transactions by eliminating intermediary fees, and enables global participation in the real estate market. Additionally, the protocol introduces greater liquidity to the market by integrating with decentralized financial platforms, allowing prospective buyers to secure funding rapidly. Consumer-Centric Market Strategy This protocol advocates a dual-sided market strategy that aims to reform the real estate transaction paradigm. Property sellers are afforded the ability to secure deed storage on the blockchain while benefiting from direct market access for sales, effectively bypassing intermediary overheads. For property buyers, the protocol simplifies the purchase process, offering immediate access to property details and streamlining the transfer of ownership. Moreover, financial lenders find a new marketplace in which to offer secured loans, augmented by blockchain’s security features. Competitive Landscape and Advantages In the competitive landscape, the proposed protocol differentiates itself by presenting a comprehensive and integrated solution that extends beyond mere transaction facilitation. It anticipates the current and future needs of the real estate market, focusing on user experience, transactional integrity, and market inclusivity. Against competitors like Propy, RealT, and Deedcoin, the protocol asserts its edge through its amalgamation of transactional efficiency, cost savings, and market reach. Strategic Implementation and Economic Considerations The practical implementation of the protocol on the Ethereum blockchain, and the considerations for its economic viability, are outlined with a foresight into potential scalability issues and transaction costs. Alternative blockchains such as Binance Smart Chain, Solana, and Polkadot are appraised for their suitability, with an emphasis on their comparative advantages in terms of transaction speed, costs, and infrastructural development. Implications and Future Prospects In conclusion, the blockchain real-estate protocol promises to not only revolutionize the manner in which real estate transactions are conducted but also to serve as a blueprint for future applications of blockchain technology in other domains. The synthesis of the protocol’s operational model, strategic implementation, and competitive positioning underscores its potential to offer a superior alternative to the established real estate transaction processes, setting a new benchmark in efficiency, security, and global accessibility. 4 Conclusion This paper has presented an in-depth examination of the cryptocurrency market, followed by a pioneering proposal for a blockchain-based real estate transaction protocol. Through meticulous analysis, it has provided evidence of the intricate dynamics governing cryptocurrency price movements, volatility, and correlations, particularly in the context of the FTX bankruptcy event, thereby illuminating the vulnerabilities and resilience inherent in the digital currency landscape. In tandem, it has offered a visionary blueprint for the utilization of blockchain technology in streamlining real estate transactions, proposing a model that is poised to redefine the sector. 4.1 Synthesis of Findings The market analysis revealed that cryptocurrencies are not only highly volatile but are also subject to correlated movements, which can lead to systemic risks within the digital asset class. Yet, this volatility and interconnectivity also underscore the potential of cryptocurrencies to diversify investment portfolios when judiciously balanced with traditional assets. The FTX bankruptcy served as a litmus test for the market, delineating the stability offered by stablecoins and the S&P 500 in contrast to the pronounced volatility of cryptocurrencies like Bitcoin and Dogecoin. On the frontier of innovation, the blockchain real estate proposal detailed in Part II of this paper is set to disrupt a long-established industry. By removing intermediaries, reducing transaction costs, and enhancing trans- parency, the protocol demonstrates a tangible application of blockchain beyond speculative trading, embodying the technology’s transformative potential in real-world asset management and exchange. 4.2 Prospects and Implications The synthesis of the paper’s findings paints a nuanced picture of the cryptocurrency market’s complexities and introduces a sophisticated approach to real estate transactions that capitalizes on blockchain technology’s strengths. 17 As the cryptocurrency market continues to mature, it is anticipated that investor strategies will adapt to encompass both traditional and digital assets, ensuring balanced portfolios that mitigate risk while capitalizing on growth opportunities. The real estate blockchain protocol, while nascent, holds promise for a radical shift in property ownership transfer, marking a significant leap towards a more interconnected, efficient, and accessible global market. Its implications extend beyond the real estate sector, signaling the advent of a broader adoption of blockchain in various facets of commerce and governance, ushering in a new era of decentralized digital solutions. 4.3 Summary and Forward Outlook In summary, the research presented in this paper contributes meaningfully to the understanding of cryptocurrencies and offers a progressive application of blockchain technology. As we witness the convergence of traditional financial methodologies with groundbreaking digital solutions, the potential for innovation in both markets and technology is boundless. Future research and development will undoubtedly continue to expand on these foundations, further integrating the burgeoning possibilities of blockchain technology into the fabric of societal and economic structures. In moving forward, continuous monitoring of market trends, regulatory developments, and technological ad- vancements will be crucial in optimizing the strategies and applications discussed herein. The cryptocurrency market’s evolution and the blockchain real estate protocol’s maturation will undoubtedly serve as critical barom- eters for the future trajectory of digital finance and property transactions. The journey ahead promises to be as challenging as it is exciting, with the potential to redefine the very essence of investment, ownership, and exchange in an increasingly digital world. 18
{ "id": "2405.02547" }
2408.11961
Decoding SEC Actions: Enforcement Trends through Analyzing Blockchain litigation using LLM-based Thematic Factor Mapping
The proliferation of blockchain entities (persons or enterprises) exposes them to potential regulatory actions (e.g., being litigated) by regulatory authorities. Regulatory frameworks for crypto assets are actively being developed and refined, increasing the likelihood of such actions. The lack of systematic analysis of the factors driving litigation against blockchain entities leaves companies in need of clarity to navigate compliance risks. This absence of insight also deprives investors of the information for informed decision-making. This study focuses on U.S. litigation against blockchain entities, particularly by the U.S. Securities and Exchange Commission (SEC) given its influence on global crypto regulation. Utilizing frontier pretrained language models and large language models, we systematically map all SEC complaints against blockchain companies from 2012 to 2024 to thematic factors conceptualized by our study to delineate the factors driving SEC actions. We quantify the thematic factors and assess their influence on specific legal Acts cited within the complaints on an annual basis, allowing us to discern the regulatory emphasis, patterns and conduct trend analysis.
http://arxiv.org/pdf/2408.11961v1
Junliang Luo, Xihan Xiong, William Knottenbelt, Xue Liu
cs.CL
cs.CL
Decoding SEC Actions: Enforcement Trends through Analyzing Blockchain litigation using LLM-based Thematic Factor Mapping Junliang Luo McGill University Montréal, Québec, CanadaXihan Xiong Imperial College London London, United KingdomWilliam Knottenbelt Imperial College London London, United KingdomXue Steve Liu McGill University Montréal, Québec, Canada ABSTRACT The proliferation of blockchain entities (persons or enterprises) ex- poses them to potential regulatory actions (e.g., being litigated) by regulatory authorities. Regulatory frameworks for crypto assets are actively being developed and refined, increasing the likelihood of such actions. The lack of systematic analysis of the factors driving litigation against blockchain entities leaves companies in need of clarity to navigate compliance risks. This absence of insight also deprives investors of the information for informed decision-making. This study focuses on U.S. litigation against blockchain entities, particularly by the U.S. Securities and Exchange Commission (SEC) given its influence on global crypto regulation. Utilizing frontier pretrained language models and large language models, we sys- tematically map all SEC complaints against blockchain companies from 2012 to 2024 to thematic factors conceptualized by our study to delineate the factors driving SEC actions. We quantify the the- matic factors and assess their influence on specific legal Acts cited within the complaints on an annual basis, allowing us to discern the regulatory emphasis, patterns and conduct trend analysis. CCS CONCEPTS •Applied computing →Law. 1 INTRODUCTION Current laws in jurisdictions such as the U.S., Canada and EU, are incorporating the concepts introduced by the blockchain economy into traditional financial regulations [ 9,21,32]. The integration of concepts concerns the recognition and regulation of crypto service providers (CASPs), with a focus on compliance, consumer protec- tion, and market integrity[ 32] within established or new legal frame- works [ 42]. The enforcement of AML standards [ 8] and applicable financial regulations is central to the regulation of cryptocurrency tokens across various jurisdictions. These regulations are being developed to mitigate the risks associated with the pseudonymity and borderlessness of blockchain transactions, while leveraging their potential to reduce inefficiencies in securities settlement [ 7,9]. Globally, regulation frameworks are being developed to address the regulation of digital assets, such as the Regulation on the Markets in Crypto-Assets (MiCA) [45] created by the European Commission, the SEC’s Framework for “Investment Contract” Analysis of Digital Assets [39] in the U.S. These frameworks target establishing guide- lines for the definition, classification and trading of digital assets (including crypto, the blockchain-based digital asset), maintaining financial stability and protecting investors. Focusing on the present, these developing regulations have inevitably led to an increase in litigation in recent years as crypto assets challenge existing finan- cial legal norms [ 24]. Crypto asset disputes often involve technical issues, asymmetric information, and impacts on investors and thebroader socio-economic [ 10,19,30]. The disputes also intercon- nected with the market volatility triggered by blockchain activities and the ethical considerations of technology deployment that may influence public trust and participation in blockchain systems [ 23]. Given the significant influence of U.S. financial regulations on global crypto assets regulation, this study focuses on U.S. litigation. In the U.S., the SEC is actively pursuing lawsuit cases to ensure regulatory compliance and the protection of investors under the existing security laws. The Commodity Futures Trading Commis- sion (CFTC) also engages in litigation, regulating the crypto assets classified as commodities to ensure compliance with the Commod- ity Exchange Act . Given the distinct regulatory roles of the SEC and CFTC, this study focuses exclusively on SEC lawsuit cases, leaving CFTC-related litigation for potential future research. The SEC published Crypto Assets and Cyber Enforcement Actions [40], a comprehensive collection of SEC lawsuits against crypto en- tities from 2012 to 2024. Given the collection, we obtained the com- plaints for all the cases. The complaints enumerate a constrained set of Acts (legal statutes enacted by legislative bodies that establish regulatory requirements and prohibitions) in a few sentences, yet the comprehensive content of complaints contains extensive infor- mation. For instance, the high-profile case of SEC v. Ripple Labs, Inc. [ 36] cites 5(a) and 5(c) of the Securities Act [37], prohibiting the sale of unregistered securities, but the complaint itself spans over four hundred segments containing considerable details (detailed in Section 4). The absence of analysis translating complaint details into clear, interpretable insights complicates understanding. This leaves enterprises, even those with legal awareness, struggling to navigate compliance risks due to the complexity of legal documents, obscuring the full regulatory picture. Additionally, investors lack the insights needed to understand regulatory trends, potentially obstructing the growth of the crypto market. To address this, we tackle explaining the underlying litigation drivers by employing quantitative analytics and modeling to systematically extract and interpret the latent factors triggering the litigation. The research questions comprise three focused inquiries: How can we conceptualize a reasonable categorization for limited types of factors within the complaints, termed thematic factors, to delin- eate the factors driving SEC enforcement actions? How can these critical factors be extracted and quantified using existing machine learning language models, transforming legal text into measurable factors? How do these quantified thematic factors map to specific regulatory Acts, and what does this reveal about enforcement trends and regulatory priorities over time, enabling us to infer the form of activities most likely to precipitate SEC litigation. We initiated the study by conceptualizing a set of thematic fac- tors inspired by multiple sources (detailed in section 4.1). To extract and quantify the thematic factors in complaints, we proposed aarXiv:2408.11961v1 [cs.CL] 21 Aug 2024 Anonymous Author(s) Figure 1: Association between the legal Acts and their corresponding lawsuit case groups. Larger circles in size indicate larger number of cases mentioning the same legal Act. Instances of lawsuit cases of some large groups are also given. method to assign each indexed segment (e.g. in Figure 2) a corre- sponding thematic factor. The method leveraged recent advances in pretrained language models (PLMs) and large language models (LLMs). The PLM transformed each segment of the SEC complaints into a vector, embedding their contextual representations within a semantic space. Each of these vectors was mapped to the thematic factor by its similarity to the embedding vectors of LLM-generated seed sentences, each anchored to a specific thematic factor, and produced using the same PLM making the same semantic space. Subsequently, we employed a Generalized Linear Model (GLM) to estimate the coefficients of these thematic factors with respect to specific legal Acts cited within the complaints on an annual ba- sis. We conducted a detailed examination of these coefficients and identified the trends of regulatory emphases. To the best of our knowledge, we are the first to systematically analyze SEC complaints for blockchain entities from a data-driven perspective. Our contribution provides CASPs and investors with a language model-based approach to systematically analyze SEC law- suit complaints to extract and interpret regulatory trends, assisting their compliance strategies and decision-making. By uncovering and quantifying the driving factors behind SEC enforcement ac- tions, we provide valuable insights into past enforcement patterns and potential future regulatory priorities. This work serves as a resource for the blockchain community and the broader crypto in- dustry, helping to clarify regulation and supporting the responsible development of the sector. The conclusions extrapolated include: •Practices detrimental to investors, such as fraud offering and misappropriation of consumer funds, remain a consistent and primary trigger for SEC enforcement actions across all years regardless of market conditions. It can be reasonably inferred that any entity engaging in such misconduct will continue to be subject to SEC litigation in the future. •During market surges (e.g., crypto surges in 2017-18 & 2021), the SEC’s focus sharpened on the financial scale of companies’ op- erations. Enterprises handling high market valuations of crypto asset, particularly those involved in unregistered securities offer- ings, are more likely to be scrutinized for non-compliance with registration mandates under the Securities Act. Entities offering assets during market surges involving large amounts of money face elevated risks of SEC litigation for unregistered offerings.•The SEC’s enforcement has expanded to cover a broader range of areas post 2020 such as tender offers, mandatory disclosures, and annual or quarterly reporting. Misuse of funds by key indi- viduals was notably more prevalent before 2018, and celebrity promotions occurred in separate years, but it is reasonable to infer that the SEC continues to monitor such activities closely. 2 PRELIMINARY This section provides an overview of the crypto regulatory context, the SEC crypto assets litigation and the complaint data sources. 2.1 Crypto Regulatory Context The global regulation for cryptocurrencies varies across jurisdic- tions [ 3,42], with regions implementing specialized frameworks such as the EU’s Markets in Crypto-Assets (MiCA) regulation to oversee activities related to Crypto-Asset Service Providers (CASPs) Other jurisdictions integrate cryptocurrency regulation within their existing legal frameworks. For example, in the U.S., the regulation of cryptocurrencies is incorporated into the existing securities and commodities regulatory frameworks. This divergence in regulatory approaches presents the challenges in achieving a unified global stance on cryptocurrency. In the U.S., the SEC and the CFTC are the primary agencies responsible for overseeing cryptocurrencies. If a crypto asset qualifies as a security under the Howey Test [ 15,17], the asset falls under the jurisdiction of the SEC and must comply with the Securities Act of 1933 [ 37] and the Securities Exchange Act of 1934 [ 35]. Typically if a crypto asset does not fit the legal definition of a security under the Howey Test, the asset is classified as a commodity and regulated by the CFTC and must adhere to the Commodity Exchange Act of 1936 [2]. 2.2 SEC Crypto Assets Lawsuit Cases The SEC has actively pursued legal actions against various crypto entities in recent years due to violations of securities laws. One frequent violation is the failure to register with the SEC, which can manifest in several forms, such as unregistered brokers, traders, and clearing agencies operating without proper authorization. The legal actions were against companies with cryptocurrency coin (token) offerings such as Ripple (XRP), Telegram (TON), Bi- nance (BNB), etc., alleging violations of federal securities laws regarding unregistered securities offerings [ 34]. Also, exchanges Decoding SEC Actions: Enforcement Trends through Analyzing Blockchain litigation using LLM-based Thematic Factor Mapping like Binance, Coinbase, Kraken, and Gemini have faced lawsuits for operating as unregistered brokers, traders, and clearing agen- cies offering unregistered securities [ 6]. For instance, Binance and Coinbase have been accused of several violations, such as operating without proper registrations, mismanaging customer funds, and lacking adequate trading controls [ 33]. Fraudulent activities are an- other common violation that the SEC targets. A notable case is the SEC’s lawsuit against BitConnect, which alleged a two billion USD fraud involving a crypto investment scheme. Market manipulation cases, such as the SEC’s litigation against The Hydrogen Technol- ogy Corporation, et al., for manipulating the trading volume and price of the ‘Hydro’ crypto asset. Lawsuit cases are documented and accessible through Public Access to Court Electronic Records (PACER)1, which provides access to case and docket information including all documents filed with the court, case-related transcripts, and orders from the court, culminating in a final judgment which resolves the legal issues in question and may include remedies such as penalties or directives to cease certain activities. In our study, we focus on complaints of all these cases from SEC Crypto Assets and Cyber Enforcement Actions [40] as the complaints are publicly available irrespective of the ongoing judicial status, and they provide a window into the obscured litigation elements and the SEC’s adaptive regulatory measures regarding blockchain assets. 3 DATASET The dataset Crypto Assets and Cyber Enforcement Actions [40] con- sists of 226 distinct lawsuit cases filed against companies and or individuals from January, 2012, to July, 2024. The fields detail the action name, description, and date filed, and the link to the full com- plaint. These cases involve accusations of unregistered securities offerings, account intrusions, insider trading, market manipulation, regulated entities, public company disclosure, and trading suspen- sions (official categories). We obtained the complaints of all these cases. In each complaint, the text is organized using segment in- dices. The indices number specific paragraphs within the complaint document to organize the content logically. The logical organiza- tion typically presents an introduction, background details, factual allegations, legal charges, and the relief sought. We processed the complaint of each case by segmenting each complaint into distinct segments by the indices. Statistically, the derived SEC complaints dataset consists of a vocabulary size of 39,441 and an average word count of 6,042 per case. Each case is structured into averagely 79 segments, with an average segment length of 106 words. 4 THEMATIC SEMANTIC MAPPING We extracted all legal Acts and associated group of lawcuit cases mention the same Acts presented in Figure 1. For instance, the complaint of the case: SEC v. Ripple Labs, Inc. mentioned Sections 5(a) and 5(c) of the Securities Act (of 1933) , which prohibits the sale and delivery of unregistered securities (In this case, XRP) unless a registration statement is in effect; Section 20(b) of the Securities Act , which holds individuals who control others liable for violations of the Securities Act. The complaint mentions also the other Acts that 1https://pacer.uscourts.gov/ Figure 2: Workflow of thematic factor mapping and Act- factor trends modeling. Models are input with multiple com- plaints, SEC v. Ripple Labs shown as an illustrative example. allow the SEC to investigate violations of the securities laws, and provide the SEC with the power to enforce its provisions. However, the SEC v. Ripple Labs exampled a complaint that en- compasses extensive details, subdivided into over four hundred in- dexed segments. Since the Acts provide only limited information on legal requisites, comprehending complaints through a method that can extract segment-level factors from complaints to gain a com- prehensive understanding of the overall progression of blockchain assets is needed. We demonstrate the whole workflow in Figure 2. 4.1 Thematic Factors We initiate our workflow by operationalizing the litigation drivers using thematic factors as quantifiable proxies for potential regu- latory triggers. These thematic factors are drawn from publicly available complaints involving litigation by the SEC against various blockchain companies and entities, ranging from financial discrep- ancies to compliance breaches—and are hypothesized to directly correlate with litigative risks that precipitate SEC interventions. Drawing on insights from multiple publications and articles includ- ing Carmona et al. (2023) [ 4], Goforth (2021) [ 12], and Hennelly (2022) [ 16], we hypothesized the thematic factors as the following: Financial Misconduct & Investor Impact : Focuses on the financial integrity and the direct impact on investors. Regulatory Compliance : Examines the adherence of compa- nies to essential securities laws and regulatory mandates. Promotion & Misrepresentation : Concentrates on the pro- motion and representation of information to investors. Scope & Scale of Operations : Considers the extent and scale, specifically monetary values, of the company’s operations. Anonymous Author(s) Technological Risks : Represents the vulnerabilities within the technological deployments of the application. Key Individuals : Probes the roles and responsibilities of core company figures in legal compliance and possible misbehaviours. 4.2 Mapping Method Some pretrained language models (PLM) can produce embedding vectors given the sentences that capture the contextual and seman- tic meanings within the text [ 26]. In our case, we apply the PLMs on each segment of all lawsuit cases of the dataset. The segment-level embedding vectors present specific positions within the semantic space, situating the segment texts in a high-dimensional context representing their semantic meanings. The segment-level embed- ding vectors will be input to a model. In such a model we employ a large language model (LLM) to map the embedding vector to a the- matic semantic factor by synthesizing embedding vectors produced using LLM as a generative synthesizer to generate seed sentences targeting specific thematic factors. The functions are defined as follows: L𝜇is an LLM generative synthesizer to map N(factors in 4.1) prompts to text outputs. P𝜆 is an PLM to convert the input text into a 𝑛-dimension semantic embedding space. 𝜇and𝜆indicate a particular kind of models. P𝜆:Text→R𝑛,L𝜇:Prompts×N→Text L𝜇generates a sentence seed_s𝑖of length limit ℓfrom prompt p𝑖. seed_s𝑖=L𝜇(p𝑖,ℓ),v𝑖=P𝜆(seed_s𝑖) P𝜆(t)converts text tinto an n-dimension embedding vector v. v𝑗=P𝜆(s𝑗),∀s𝑗∈Segments S The seed sentences generated are assuredly aligned with designated thematic factors, and will be subsequently mapped into the identical embedding space produced by the same PLM as the segments. Then each segment embedding v𝑗will be aligned with the thematic semantic factorFof its most similar seed sentence embedding v𝑖 using the distance function 𝛿. F(𝑠𝑗)←F( seed_s𝑖)where𝑖=argmin 𝑖𝛿(v𝑖,v𝑗) The aforementioned process is the mapping method performing the alignment of text segments to their thematic factors by leveraging the generated seed sentences and their embeddings. 4.3 Experiment To assess the functioning of the proposed semantic embedding map- ping, it is essential to develop a proper evaluation metric to assess the aligned thematic factors of segments, given that the task di- verges from conventional downstream classification. Subsequently, we conduct empirical evaluations applying a customized perfor- mance metric across a range of LLMs and PLMs. This is to test LLMs’ varying generalization capabilities in generating contextually ap- propriate thematic seed sentences, and the differing capacities of PLMs to capture semantic meaning, particularly within the special- ized vocabulary and sentence characteristic of the complaints.4.3.1 PLM and LLM Models. We selected the PLM models from the MiniLM, MPNet, Sentence-T5, and Generalizable T5 Retriever (GTR) families because they are compatible with Sentence Transformers 2and are known for their efficiency and performance in semantic search tasks [ 28,29,38,41]. We utilized the LLMs models ChatGPT- 4 [31], Meta Llama 3 (70B) [ 1], and Gemini [ 13] due to their advances attributed to their extensive parameter numbers. The prompts used to generate the seed sentences are detailed in Table 1 beneath. 4.3.2 Evaluation Metric. Given the lack of the ground truth labels for each segment, we adopt an automated scoring metric using anchored lexical assessment without reliance on extensive labels. The anchored lexical assessment is implemented via employing NER GLiNER model [ 44] to extract and score specialized terms that are anchored to each thematic semantic factor. We compare the relevance of terms linked to the defined factor against terms from other factors within the segments. Considering each thematic semantic factor 𝑖, the model extracts entities𝐸𝑠𝑖from all segments 𝑆𝑖aligned with that factor. 𝑠𝑐(𝑗) 𝑖=1 N∑︁ 𝑠∈𝑆𝑖∑︁ 𝑒∈𝐸𝑠𝑖𝑤𝑒·𝛿𝑓𝑖(𝑒) The score for each factor 𝑖is computed as above, where Nis the total number of factors, 𝑤𝑒is the confidence score output from the GLiNER model as the weight of entity 𝑒, and𝛿𝑓𝑖(𝑒)= 1if entity𝑒aligns with factor else 0. For each factor 𝑖, we obtain a list of scores[𝑠𝑐(0) 𝑖,𝑠𝑐(1) 𝑖,...,𝑠𝑐(N) 𝑖], where each score is the average weighted count of the relevant anchored terms by GLiNER model. Given this list of scores, we define a normalized score 𝑅𝑖for the factor𝑖: 𝑅𝑖=Í 𝑗≠𝑖Δ(𝑠𝑐(𝑖) 𝑖,𝑠𝑐(𝑗) 𝑖) ÍN 𝑘=1Í 𝑗≠𝑘Δ(𝑠𝑐(𝑘) 𝑖,𝑠𝑐(𝑗) 𝑖) The difference between two two scores 𝑠𝑐(𝑖) 𝑖and𝑠𝑐(𝑗) 𝑖is given by: Δ(𝑠𝑐(𝑖) 𝑖,𝑠𝑐(𝑗) 𝑖)=max(0,𝑠𝑐(𝑖) 𝑖−𝑠𝑐(𝑗) 𝑖) The rationale is that for segments aligned with the factor 𝑖, a higher number of extracted anchored terms for factor 𝑖compared to other factors indicates a good alignment, whereas high counts for both 𝑖 and other factors suggest inferior alignment. Therefore we focus on calculating the positive difference as defined in the above difference function Δ. The normalized score calculates the normalized posi- tive differential contributions of segments aligned with one factor, for anchored terms of that factor compared to others, ascending positively from no to maximal dominance in the 0-1 range. 4.3.3 Results. We conducted experiments using a segment length ℓ equivalent to the average length of segments (in section 3), and a set of one hundred sentences (testings of additional sentence volumes may be considered in future studies) using various GLMs and LLMs. The experiment results are presented in Table 3. The experimental results indicate that the ChatGPT-4 model obtained overall average scores compared to other LLMs. The MiniLM-based models report a stable metric distribution with minimal variance. In contrast, the gtr-t5 variants display the highest mean performance (as the top mean scores shown in bold), for example, with mean scores of 0.515 2https://www.sbert.net/ Decoding SEC Actions: Enforcement Trends through Analyzing Blockchain litigation using LLM-based Thematic Factor Mapping Table 1: Thematic Factor IDs, names, and corresponding prompts Factor ID Factor Name Prompt 0 Financial Misconduct & Investor Impact (FM) Focus on mentions of how the complaints describe the impact on investors, such as specific harms or financial losses. This includes improper accounting practices and bribery, highlighting the importance of compliance with internal controls and transparency in financial dealings. 1 Regulatory Compliance (RC) Focus on mentions of companies failing to comply with regulations, such as not properly registering securities or failing to disclose critical information, and how these shortcomings subject them to lawsuits, emphasizing the importance of adherence to established securities laws. 2 Promotion & Misrepresentation (PM) Focus on mentions of any misrepresentations, particularly on instances of asymmetric information and over-promotion. Detail how information was misleading, exaggerated, or deceptively presented, offering insights into subtle forms of fraud. 3 Scope and Scale of Operations (SO) Focus on mentions of how the scope and scale of the company’s operations are described. Pay attention to numeric facts such as the amount of money involved, the number of investors, and the geographic reach of operations. 4 Technological Risks (TR) Focus on mentions of specific technological vulnerabilities or failures, such as inadequacies in the blockchain technology itself, security breaches, or technical misrepresentations. 5 Key Individuals (KI) Focus on mentions of key individuals within the company. Observe how their actions, statements, and roles might reveal individual culpability or highlight leadership issues that contribute to legal violations. Table 2: Comparison of normalized evaluation scores 𝑅𝑖, where𝑖corresponds to a factor ID. Results are presented with the score of each factor (under its abbreviation factor name as listed above) across various PLMs and LLMs. PLMsGPT-4 Meta Llama 3 (70B) Gemini FM RC PM SO TR KI M.V FM RC PM SO TR KI M.V FM RC PM SO TR KI M.V all-MiniLM-L6-v2 .414 .650 .451 .372 .580 .459 .488 ±.106 .396 .446 .525 .331 .523 .454 .446 ±.075 .311 .565 .464 .332 .524 .448 .441 ±.102 all-MiniLM-L12-v2 .310 .639 .436 .388 .557 .446 .463 ±.118 .337 .463 .452 .399 .505 .491 .441 ±.063 .268 .440 .411 .317 .518 .434 .398 ±.091 all-mpnet-base-v1 .348 .684 .446 .319 .609 .398 .467 ±.147 .348 .533 .478 .380 .529 .471 .457 ±.077 .215 .548 .412 .257 .530 .429 .399 ±.137 all-mpnet-base-v2 .355 .655 .503 .308 .578 .423 .470 ±.133 .324 .507 .436 .380 .571 .504 .454 ±.091 .297 .571 .433 .310 .571 .492 .446 ±.122 sentence-t5-base .405 .620 .420 .305 .588 .434 .462 ±.119 .347 .437 .405 .348 .601 .501 .440 ±.098 .319 .617 .433 .310 .561 .488 .455 ±.125 sentence-t5-large .378 .712 .490 .289 .619 .477 .494 ±.154 .392 .601 .508 .378 .570 .463 .485 ±.091 .321 .691 .436 .332 .623 .440 .474 ±.152 gtr-t5-base .383 .694 .437 .502 .649 .425 .515 ±.128 .361 .504 .478 .436 .577 .387 .457 ±.080 .338 .679 .376 .353 .561 .457 .461 ±.135 gtr-t5-large .358 .660 .445 .348 .629 .452 .482 ±.133 .399 .585 .516 .352 .545 .493 .482 ±.089 .318 .676 .404 .315 .593 .510 .469 ±.149 for the base model. The sentence-t5-large demonstrates a mean score of 0.494 but a higher variance among factors. The evaluation result indicates that segments consistently show a relatively positive contribution in the non-marginal order to- ward their aligned thematic factors. This suggests that extracted terms associated with the segment’s aligned factor are markedly more prevalent compared to terms from other factors, indicating a functioning thematic distinction for the alignments. 5 ANALYSIS This section analyzes the coefficient modeling between thematic factors and specific Acts, focusing on analyze the trend in the results and the alignment of these trends across various categories. 5.1 Modeling Trends in Thematic Factor and Act Correlations The segment-level thematic factors were obtained and presented their efficacy. To further uncover the research question of SEC priorities and regulatory trends over time, we conduct analysis to discern which thematic factors are most predictive of certain types of SEC legal Acts during a specific year. We use the thematic factors produced by the PLM gtr-T5-base and LLM GPT-4 , as they demon- strated comparatively better performance than all other models evaluated in our experiments. We employed a Generalized Linear Model (GLM) with a logit link function to quantitatively assess the influence of thematic factors on the probability of SEC enforcement actions over successive years by the interpretable coefficients the GLM produced. Denoteour dataset{𝑋𝑖,𝑦𝑖,𝑡𝑖}𝑛 𝑖=1, where𝑋𝑖represents the thematic factors associated with the segments of the 𝑖-th complaint, 𝑦𝑖denotes the presence of specific enforcement Acts, and 𝑡𝑖indicates the year of the filing date. 𝑋𝑖=(𝑥𝑖1,𝑥𝑖2,...,𝑥𝑖𝑝)⊤is a vector of thematic factor proportions for the 𝑖-th complaint, 𝑥𝑖𝑗is the proportion of factor 𝑗in complaint 𝑖,𝑦𝑖∈{0,1}is a binary indicator for the presence of a specific Act. The GLM for binary response with a logit link function is formulated as: logit(𝑃(𝑦𝑖=1|𝑋𝑖))=𝛽0+𝑝∑︁ 𝑗=1𝛽𝑗𝑥𝑖𝑗=ln𝑃(𝑦𝑖=1|𝑋𝑖) 1−𝑃(𝑦𝑖=1|𝑋𝑖) , where𝛽=(𝛽0,𝛽1,...,𝛽𝑝)⊤is the vector of coefficients for the GLM model,𝜂𝑖=𝛽0+Í𝑝 𝑗=1𝛽𝑗𝑥𝑖𝑗as the linear predictor, and 𝜇𝑖=1 1+𝑒−𝜂𝑖 as the expected value of 𝑦𝑖using the logistic function. The vector of coefficients 𝛽is estimated to maximize the like- lihood of observing the given data. 𝛽0is the intercept term. The model output denoted as ˆ𝛽, is the estimated value of the coefficient vector𝛽, indicating the strength and direction of the influence of each factor on the probability of a legal Act. The vectors of coeffi- cients are Gaussian standardized, enabling categorizing the impact levels into three categories across different acts and time periods. These coefficients demonstrate the alignment between thematic factors and specific regulatory Acts, confirming the relevance of these factors in existing legal Act in a certain year. The coefficients also offer an interpretable view of enforcement trends. The results are summarized in Table 3. Considering the overall results, multiple thematic factors exhibit high coefficients with sections such as Section 20 of the Securities Act, Anonymous Author(s) Table 3: Coefficients output from the GLM for the thematic factor and legal Act pairs. The table lists the maximum coefficient, the year of its occurrence, and categorizes the coefficient as high •, moderate◦, or low·on an annual basis. 2012-2016 are merged due to few cases; 2024 into 2023 for being incomplete. The top three Act-factor pairs based on the frequency of high coefficients are demonstrated. These metrics reflect trends in SEC enforcement actions over the analyzed period. Act Thematic Factor Max Coef Max Coef YrAnnual Coef 2012-2016 2017 2018 2019 2020 2021 2022 2023+ Section 10(b) of the Exchange Act Financial Misconduct & Investor Impact 1.899 2018 • • • ◦ · • • • Section 17(a) of the Securities Act Financial Misconduct & Investor Impact 1.970 2022 • • • • · • • ◦ Section 5 of the Securities Act Financial Misconduct & Investor Impact 1.408 2023 • · · • · ◦ • • Section 14(e) of the Exchange Act Regulatory Compliance 1.550 2016 • • · · · Section 13(a) of the Exchange Act Regulatory Compliance 1.156 2020 · · • • ◦ · Section 12(g) of the Exchange Act Regulatory Compliance 1.156 2020 · · • · · Section 17(b) of the Securities Act Promotion & Misrepresentation 1.678 2023 · · · • • • Section 206(4) of the Advisers Act Promotion & Misrepresentation 1.067 2018 • · · • Section 12(k) of the Exchange Act Promotion & Misrepresentation 1.851 2018 · • • • Section 5(a) of the Securities Act Scope and Scale of Operations 1.816 2016 • · • · · · • ◦ Section 5(c) of the Securities Act Scope and Scale of Operations 1.816 2016 • · • · · · • ◦ Section 15(a) of the Exchange Act Scope and Scale of Operations 1.582 2021 · • · • ◦ ◦ Section 13(a) of the Exchange Act Technological Risks 1.330 2023 · · · • · • Section 15(b) of the Exchange Act Technological Risks 1.408 2019 ◦ · • · ◦ • ◦ Section 3(a) of the Exchange Act Technological Risks 1.876 2017 ◦ • • · ◦ Section 10(b) of the Exchange Act Key Individuals 1.904 2020 • ◦ · • • · ◦ · Section 20(a) of the Exchange Act Key Individuals 1.178 2022 • • · Section 12(a) of the Securities Act Key Individuals 1.270 2019 • • · · Section 20(e) ,22(a) of the Securities Act , and Section 21(d), 21(a) of the Exchange Act , which presents the SEC’s broad enforcement powers to investigate violations, seek injunctions, impose penalties, and enforce compliance with securities laws. Since these Acts are pri- marily related to the general enforcement mechanisms rather than the specific thematic factors and legal provisions, these sections are not central to our analytical focus. Focusing on the distinct correlation, Financial Misconduct & In- vestor Impact shows consistently high coefficients with Section 5 and Section 17(a) of the Securities Act , indicating strong enforce- ment against unregistered securities offerings and fraud. Regulatory Compliance shows strong associations with Section 12(k), 12(g) of the Exchange Act suggesting heightened regulatory scrutiny on registration requirements. Promotion & Misrepresentation exhibits rising coefficients linked to Section 17(b) of the Securities Act ,Sec- tion 206(4) of the Advisers Act , reflecting intensified enforcement against misrepresentation and undisclosed promotions. Scope and Scale of Operations shows coefficients with Section 12a, 12g of the Exchange Act , indicating operational requirements, such as requir- ing companies to register securities traded on national exchanges. Technological Risks present high coefficients related to Section 3(a) of the Exchange Act , reflecting the attention to how crypto asset trading terms are integrated with the key concepts and definitions from the Exchange Act. Key Individual s is notably linked to Section 10(b) of the Exchange Act forSection 206 of the Advisers Act for prohibiting fraud by investment advisers, representing a focus on individual misconduct and high-profile executive cases. Beyond specific correlations, our research objective emphasizes analyzing the temporal Act-factor trend to uncover shifts in the SEC’s enforcement priorities. To conduct the analysis, each Act- factor pair was ranked based on the number of years where coef- ficients surpassed 1.0, categorizing them as high. Values over 0.5 were deemed moderate and all others low. We disregarded nega- tive coefficients since they complicate the interpretation of direct impacts or influences, focusing instead on positive coefficients to provide the insights of direct regulatory emphasis.From 2012 to 2016, the SEC focused heavily on the market, in- vestors, and regulation mentioning Section 10(b) of the Exchange Actto combat securities fraud and deceit. The emphasis on Section 14(e) of the Exchange Act regulating tender offers, which allows shareholders in a private company to sell some or all of their shares. At this very early period, we saw enforcement under Section 5 of the Securities Act , which addresses the registration of securities, stressing the agency’s commitment to ensuring that all securities offerings were duly registered. In 2017, the SEC began to shift its focus toward technological risks and further enhancing regulatory compliance, as evidenced by increased enforcement of Section 3(a) of the Exchange Act , related to broker-dealer registration. This focus was likely a response to the rise of digital trading platforms and of the cryptocurrency price in 2017. Both Section 10(b) of the Exchange Act and Section 17(a) of the Securities Act remain high coefficients with the Financial Misconduct & Investor Impact factor , reflecting the SEC continued addressing securities fraud and deceptive practices. Following the rise of trading platforms, the SEC presented the first time focus on promotion in 2018, concerning fraudulent pro- motional activities and misleading financial endorsements, such as celebrities who promoted ICOs on social media without disclosing the fact. Promotion & Misrepresentation factor highly correlated to Section 17(b) of the Securities Act , which prohibits the promotion of securities without full disclosure of compensation received for such promotion, accompanied by Section 206(4) of the Advisers Act pro- hibits false statements by investment advisers, reflecting the SEC’s strategy to curb misleading promotions and endorsements on social media platforms. The period likely witnessed an SEC’s response to the burgeoning impact of social media and celebrity endorsements, where undisclosed financial incentives could lead to conflicts of interest. Meanwhile, the coefficient linking misrepresentation to Section 12(k) of the Exchange Act is associated with addressing short sale regulations in the market. Sections 5(a) and 5(c) of the Securities Actexhibited high coefficients for Scope and Scale of Operations , reflecting the SEC’s intensified focus on compliance with securities registration during the period of market expansion. Decoding SEC Actions: Enforcement Trends through Analyzing Blockchain litigation using LLM-based Thematic Factor Mapping Table 4: SEC cases related to crypto and cyber assets (by year and SEC’s categorization) Year Category Cases Notable Cases 2016 Account Intrusions 3 SEC v. Mustapha: Hacked brokerage accounts for unauthorized trades 2017 Account Intrusions 1 SEC v. Willner: Hacked brokerage accounts to manipulate stock prices 2022 Account Intrusions 1 SEC v. Mohamed, et al.: Fraudulent scheme hacking brokerage accounts 2016- Crypto Assets 6 SEC v. Garza, et al.: Bitcoin mining Ponzi scheme; SEC v. Shavers: Bitcoin Ponzi scheme with high returns 2017 Crypto Assets 5 SEC v. PlexCorps, et al.: Fraudulent ICO scheme; SEC v. REcoin Group Foundation, LLC, et al.: Fraud with ICOs backed by real estate 2018 Crypto Assets 16 SEC v. Longfin Corp., et al.: Fraudulent trading activities 2019 Crypto Assets 17 SEC v. Kik Interactive Inc.: $100 million unregistered securities offering; SEC v. ICOBox, et al.: Illegal $14 million securities offering 2020 Crypto Assets 23 SEC v. Meta 1 Coin Trust, et al.: Conducting a fraudulent initial coin offering of unregistered digital asset securities 2021 Crypto Assets 18 SEC v. BitConnect, et al.: $2 billion fraud with crypto lending platform; SEC v. LBRY, Inc.: Unregistered offering of digital asset securities 2022 Crypto Assets 23 SEC v. Wahi, et al.: Insider trading charges against a former Coinbase manager 2023 Crypto Assets 36 SEC v. Hex et al.: $1 billion raised fraudulently; SEC v. Coinbase, Inc.: Operating as an unregistered securities exchange 2024 Crypto Assets 6 SEC v. Geosyn Mining, LLC: Fraudulent securities offering; SEC v. Sanchez, et al.: $300 million Ponzi scheme 2016- Hacking/Insider Trading 4 SEC v. Dubovoy, et al.: Newswire hack for insider trading; SEC v. Hong, et al.: Law firm hack for insider trading 2019 Hacking/Insider Trading 1 SEC v. Ieremenko, et al.: Hacked SEC’s EDGAR system for illegal trading 2021 Hacking/Insider Trading 2 SEC v. Kliushin, et al.: Profited from stolen earnings announcements 2022 Hacking/Insider Trading 1 SEC v. Dishinger, et al.: Insider trading with Equifax breach data 2023 Hacking/Insider Trading 1 O. Kuprina: Alleged hacking scheme targeting the SEC’s Electronic Data Gathering, Analysis, and Retrieval (EDGAR) system 2017 Market Manipulation/False Tweets/Fake Websites/Dark Web 1 SEC v. Murray: Manipulated stocks with false SEC filings 2018 Market Manipulation/False Tweets/Fake Websites/Dark Web 1 SEC v. Burns: Manipulating stock price with false EDGAR filing 2020 Market Manipulation/False Tweets/Fake Websites/Dark Web 2 SEC v. Sotnikov, et al.: Lured investors with fake websites 2021 Market Manipulation/False Tweets/Fake Websites/Dark Web 5 SEC v. Trovias: Sold "insider tips" on the Dark Web; SEC v. Gallagher: Stock manipulation using false Twitter posts 2022 Market Manipulation/False Tweets/Fake Websites/Dark Web 6 SEC v. EmpiresX, et al.: $40 million fraud with fake daily profits; SEC v. Parrino: Market manipulation with false rumors 2023 Market Manipulation/False Tweets/Fake Websites/Dark Web 1 SEC v. Patel: False rumors for illicit profits 2016- Market Manipulation/False Tweets/Fake Websites/Dark Web 3 SEC v. PTG Capital Partners LTD, et al.: False SEC filings to manipulate prices 2018 Public Company Disclosure and Controls 2 Altaba Inc., f.d.b.a Yahoo! Inc.: Concealment of a massive data breach 2021 Public Company Disclosure and Controls 2 First American Financial Corporation: Poor cybersecurity disclosures 2022 Public Company Disclosure and Controls 1 NVIDIA Corporation: Inadequate disclosures on cryptomining impact 2023 Public Company Disclosure and Controls 2 Solarwinds Corp.: Fraud and internal control failures 2016- Regulated Entities – Cybersecurity Controls and Safeguarding Customer Information 2 Morgan Stanley Smith Barney LLC: Failed to safeguard customer data 2018 Regulated Entities – Cybersecurity Controls and Safeguarding Customer Information 1 Voya Financial Advisors: Cybersecurity failures and data protection issues 2019 Regulated Entities – Cybersecurity Controls and Safeguarding Customer Information 2 Virtu Americas LLC: Violations in dark pool operation compliance 2021 Regulated Entities – Cybersecurity Controls and Safeguarding Customer Information 4 KMS Financial Services, Inc.: Cybersecurity failures exposing client data 2022 Regulated Entities – Cybersecurity Controls and Safeguarding Customer Information 4 Morgan Stanley Smith Barney LLC: Failure to protect customer PII; J.P. Morgan Securities LLC: Identity theft prevention deficiencies 2023 Regulated Entities – Cybersecurity Controls and Safeguarding Customer Information 1 Options Clearing Corporation: Non-compliance with SEC-approved stress testing rules 2024 Regulated Entities – Cybersecurity Controls and Safeguarding Customer Information 1 Intercontinental Exchange, Inc.: Failure to timely inform SEC of cyber intrusion 2016- Trading Suspensions 1 In re Imogo Mobile Technologies Corp.: Trading suspended due to questions about claims of a secure mobile Bitcoin platform 2017 Trading Suspensions 7 The Crypto Co.: Trading was suspended due to concerns about the accuracy of information regarding insider plans to sell shares 2018 Trading Suspensions 9 PDX Partners, Inc.: Trading suspended due to concerns over information accuracy and business operations. 2019 Trading Suspensions 1 Bitcoin Generation, Inc.: Trading suspended due to concerns about the impact of stock promotional activities 2021 Trading Suspensions 2 Long Blockchain Corp.: Trading suspension due to failure in timely filings 2022 Trading Suspensions 1 American CryptoFed DAO LLC: Halted registration of digital tokens Table 5: SEC Categories, averaged alignment score for each category, percent of cases with high score (Cse. pct.). The top three most contributive pairs are demonstrated. Category names are abbreviated for clarity. Category Avg. Score Cse. pct. Most Contributive Pairs Act Description Crypto Assets 1.477 .662Section 5(a) of the Securities Act Section 5(c) of the Securities ActScope and Scale of Operations Scope and Scale of OperationsProhibits the sale or offer of securities in interstate commerce without an effective registration statement filed. Prohibits the sale of securities unless a registration statement is in effect. Account Intrusions 1.647 .750Section 17(a) of the Securities Act Section 10(b) of the Exchange ActFinancial Misconduct & Investor Impact Financial Misconduct & Investor ImpactProhibits fraud and deceit in the offer or sale of securities. Prohibits manipulative and deceptive practices in connection with the purchase or sale of securities. Hacking/Insider Trading 1.371 .444Section 21(d) of the Exchange Act Section 20(b) of the Securities ActKey Individuals Key IndividualsGrants the SEC authority to seek court orders to enforce compliance with the Exchange Act. Addresses the jurisdiction and venue for legal actions under the Securities Act. Market Manipulation 1.406 .631Section 21(d) of the Exchange Act Section 17(a) of the Securities ActKey Individuals Financial Misconduct & Investor ImpactGrants the SEC authority to seek court orders to enforce compliance with the Exchange Act. Prohibits fraud and deceit in the offer or sale of securities. Regulated Entities 0.766 .263Section 203(e) of the Advisers Act Section 203(k) of the Advisers ActRegulatory Compliance Regulatory ComplianceAllows the SEC to censure, place limitations on, or suspend or revoke the registration of investment advisers. Provides the SEC with authority to impose sanctions on investment advisers for violations. Public Company Disclosure and Controls1.059 .574Section 12 of the Exchange Act Section 13(a) of the Exchange ActTechnological Risks Technological RisksRequires securities to be registered with the SEC to be traded on national exchanges. Requires issuers to file annual and quarterly reports with the SEC. Trading Suspensions 0.673 .173Section 12(k) of the Exchange Act Section 8(d) of the Securities ActRegulatory Compliance Regulatory ComplianceAddresses short sale regulations and the reporting of certain trading activities. Addresses the process and conditions under which the SEC can issue a stop order against a registration statement From 2018 to 2020, the SEC continued to address security regis- tration while also targeting key individuals under Section 10(b) of the Exchange Act and Section 20(a) concerning controlling persons. This demonstrated the SEC’s commitment to holding executives and other high-profile figures accountable for misconduct, rein- forcing the principle of individual accountability within corporate governance. In 2020, the SEC focused on regulatory compliance un- derSection 13(a) of the Exchange Act , concerning periodic financial reporting, for companies’ transparent disclosure practices. In 2021, the SEC’s enforcement efforts emphasized Scope and Scale of Operations , particularly correlated with Section 15(a) of the Exchange Act , which governs broker-dealer activities. The SEC’s strategic intent is to oversee the operations of large-scale firms and ensure their compliance with the registration and operational provisions. This year was characterized by a bull market, with rising crypto prices, which may have influenced the SEC’s scrutiny on broker-dealer activities and high-volume market operations.From 2022 to 2023, the SEC intensified its focus back on finan- cial misconduct and investors, notably mentioning Section 10(b), 17(a) of the Securities Act to address fraud in securities offerings. Simultaneously in 2023, the SEC focused on enforcing Section 17(b) of the Securities Act andSection 206(4) of the Advisers Act , showing high coefficients for promotion and misrepresentation to target fraudulent promotions and misleading financial advisement, while Section 12(k) of the Exchange Act was also mentioned to authorize trading suspensions and protect market integrity. 5.2 Trend Alignment across SEC’s Categories We calculate an alignment score for each case to quantify how closely the factors and Acts in a case align with the overall (all- inclusive) trend of Act-factor coefficients obtained in the previous section. The alignment scores of individual cases are calculated to examine their distribution across the SEC’s official categoriza- tion. This scores help understand whether the SEC’s categorization Anonymous Author(s) aligns with or diverges from broader enforcement patterns, i.e., whether certain categories, exhibit consistent enforcement pat- terns, or present more variability suggesting diverse regulatory challenges. The alignment score 𝑆𝑐of a category 𝑐is defined as follows, where each case (compliant) 𝑐is associated with a set of Acts𝐴𝑐and factor proportions 𝑋𝑐, as well as a specific year 𝑦𝑐. 𝑆𝑐=Í 𝑖∈𝐴𝑐Í 𝑗∈𝑋𝑐𝑝𝑗·𝐶𝑦𝑐 𝑖𝑗 Í 𝑖∈𝐴𝑐Í 𝑗∈𝑋𝑐 𝐶𝑦𝑐 𝑖𝑗 𝑛 𝑝𝑗is the proportion of factor 𝑥𝑖in the case, and 𝐶𝑦𝑐 𝑖𝑗is the overall correlation coefficient between Act 𝑖and factor𝑗for the corre- sponding year 𝑦𝑐. The denominator assumes an equal distribution of factors across Acts normalizing the score. A high alignment score (𝑆𝑐≥1.0) suggests that the specific combination of factors and Acts in the case corresponds more closely to the overall trends than a hypothetical scenario where factors are evenly distributed. The average alignment scores across categories are presented in Table 5 with the percentage of cases with high scores for the cases of each category. The table identifies the most contributive Act-factor pairs for each category. i.e., a pair of Act and factor for a given year that has the highest correlation coefficients of a category. For in- stance, the Crypto Assets category with the most cases prominently features Section 5(a) and Section 5(c) of the Securities Act paired with Scope and Scale of Operations indicating a persistent regulatory focus on unregistered securities offerings and the amount of money involved for crypto assets for all the lawsuit cases in this category. The higher average scores and larger percentage of high-scoring cases in categories like Crypto Assets andMarket Manipulation sug- gest strong conformity to the overall trends. Conversely, lower scores in categories like Regulated Entities andTrading Suspensions may indicate more diverse or evolving challenges, suggesting at diverse complexities. The relation between cases in each category and the overall trend indicates that Crypto Assets andMarket Ma- nipulation consistently align with global trends patterns due to well-defined enforcement practice, whereas others, such as Reg- ulated Entities and Trading Suspension show more variability in litigation reasoning, suggesting diverse regulatory challenges. 6 RELATED WORK This section reviews literature relevant to crypto regulation, crypto litigation and the techniques for analyzing legal documents. Crypto Regulation. The regulation of cryptocurrencies has been a subject of global interest. For instance, Blandin et al. [3] analyzed regulatory frameworks for cryptoassets in 23 jurisdictions. The study found significant variability in regulatory approaches. Tran- sitioning from the global perspective, many scholars have focused on the legal framework specific to the United States. Hughes [ 18] examined various federal and state-level enforcement actions, the challenges of regulating decentralized digital currencies, and the legal definitions provided by various U.S. agencies. The paper con- cluded that while significant efforts have been made to regulate the cryptocurrency market, the existing patchwork of laws often creates confusion and inconsistency. Moffett [ 27] discussed the reg- ulatory challenges and jurisdictional conflicts between the CFTC and the SEC concerning cryptocurrencies. The article suggested adual regulatory framework and emphasized the need for coopera- tion between the CFTC and SEC. Crypto Litigation. Research has also investigated the wider scope of crypto litigation beyond SEC actions. Ghodoosi [ 11] provided an empirical analysis of crypto-related cases litigated in the United States using the dataset from the Morrison Cohen Crypto Litiga- tion Tracker3. This study examined the number of cases, types of disputes, and causes of actions involving cryptocurrencies, tokens, exchanges, and decentralized autonomous organizations (DAO). It revealed that while early cases were dominated by securities litiga- tion from the ICO boom, there has been a significant shift towards private law claims involving contracts and torts. This trend, termed the “private law pivot,” suggests future crypto litigation will focus on more complex private law issues. Yahya and Pecharsky et al. [43] provided an overview of crypto litigation from 2020, categorizing cases by causes of action and highlighting the prevalence of fraud, breach of contract, and regulatory infractions. Their findings under- scored the diversity of legal challenges faced by the crypto industry, from fraudulent investment schemes to criminal prosecutions. Natural Language Processing in Legal Analysis. The applica- tion of Natural Language Processing (NLP) techniques to analyze legal documents has proven valuable in understanding regulatory and litigation trends [ 14]. For instance, Chalkidis et al. [5] explored adapting BERT models for legal tasks such as multi-label text clas- sification of EU laws, binary and multi-label classification of Euro- pean Court of Human Rights cases, and named entity recognition in US contracts. The study compared using BERT out of the box, further pre-training on legal texts, and pre-training from scratch with a legal-specific vocabulary and found that domain-specific pre- training improved performance. The authors introduced LEGAL- BERT, a family of BERT models optimized for legal texts, show- ing improved results in the aforementioned tasks. Merchant et al.[25] used Latent Semantic Analysis (LSA) for legal text summa- rization. The method involves pre-processing the text, creating a term-document matrix, and applying Singular Value Decomposi- tion (SVD) to identify key sentences. The method was tested using a dataset of legal judgments from Indian courts and achieved a decent average ROGUE-1 score. Jallan et al. [20] used the Lexis- Nexis database [ 22] to automatically extract and analyze cases from the past decade. By applying the Latent Dirichlet Allocation (LDA) model, they identified and classified common themes and patterns in these cases. The study concludes that the automated method can effectively identify broad patterns in construction-defect litigation. 7 CONCLUSION We approach a systematic investigation of the drivers behind SEC enforcement actions against blockchain and cryptocurrency en- tities. The drivers are substantively delineated through thematic factors defined by our study conceptualized in response to previ- ous publications. By leveraging pretrained language models and large language models, we provide a data-driven semantic mapping method for quantifying these factors and assessing their impact on regulatory actions. By aligning thematic factors with regulatory 3https://www.morrisoncohen.com/insights/the-morrison-cohen-cryptocurrency- litigation-tracker Decoding SEC Actions: Enforcement Trends through Analyzing Blockchain litigation using LLM-based Thematic Factor Mapping Acts, we offer insights into the SEC’s evolving priorities, providing the understanding of the SEC’s adaptive focus annually. REFERENCES [1] Llama 3. 2024. Llama 3 Chat Meta AI - Llama 3 Chat Online 8B and 70B. https: //llama3.dev/ [2] Entered as Second-Class and Matter October. 1937. COMMODITY EXCHANGE ACT VALID. (1937). [3]Apolline Blandin, Ann Sofie Cloots, Hatim Hussain, Michel Rauchs, Rasheed Saleuddin, Jason G Allen, Bryan Zheng Zhang, and Katherine Cloud. 2019. Global cryptoasset regulatory landscape study. University of Cambridge Faculty of Law Research Paper 23 (2019). [4] Tonantzin Carmona, Josephine Wolff, Eduardo Levy Yeyati, and Sebastián Katz. 2023. What do the SEC’s lawsuits signal for the future of cryptocurrency? Brookings (June 2023). https://www.brookings.edu/articles/what-do-the-secs- lawsuits-signal-for-the-future-of-cryptocurrency/ [5]Ilias Chalkidis, Manos Fergadiotis, Prodromos Malakasiotis, Nikolaos Aletras, and Ion Androutsopoulos. 2020. LEGAL-BERT: The Muppets straight out of Law School. In Findings of the Association for Computational Linguistics: EMNLP 2020 . 2898–2904. [6]JESSE COGHLAN. 2023. SEC Labels 61 Cryptocurrencies as Securities After Binance Suit. https://cointelegraph.com/news/sec-labels-61-cryptocurrencies- securities-after-binance-suit [7] Alexis Collomb, Primavera De Filippi, and SOK Klara. 2019. Blockchain technol- ogy and financial regulation: A risk-based approach to the regulation of ICOs. European Journal of Risk Regulation 10, 2 (2019), 263–314. [8] Dennis Cox. 2014. Handbook of anti-money laundering . John Wiley & Sons. [9]Evangeline Ducas and Alex Wilner. 2017. The security and financial implica- tions of blockchain technologies: Regulating emerging technologies in Canada. International Journal 72, 4 (2017), 538–562. [10] Yannick Gabuthy. 2023. Blockchain-based dispute resolution: Insights and chal- lenges. Games 14, 3 (2023), 34. [11] Farshad Ghodoosi. 2022. Crypto Litigation: An Empirical View. JREG Bulletin 40 (2022), 87. [12] Carol R Goforth. 2021. Regulation of crypto: who is the securities and exchange commission protecting? American Business Law Journal 58, 3 (2021), 643–705. [13] Google. 2024. Gemini. https://gemini.google.com/ [14] Fahad ul Hassan, Tuyen Le, and Xuan Lv. 2021. Addressing legal and contractual matters in construction using natural language processing: A critical review. Journal of Construction Engineering and Management 147, 9 (2021), 03121004. [15] Adam Hayes. [n. d.]. Does crypto pass the Howey test? https://www. investopedia.com/does-crypto-pass-the-howey-test-8385183 [16] Jacqueline Hennelly. 2022. The Cryptic Nature of Crypto Digital Assets Reg- ulations: The Ripple Lawsuit and Why the Industry Needs Regulatory Clarity. Fordham J. Corp. & Fin. L. 27 (2022), 259. [17] Justin Henning. 2018. The Howey Test: Are Crypto-Assets Investment Contracts? U. Miami Bus. L. Rev. 27 (2018), 51. [18] Scott D Hughes. 2017. Cryptocurrency Regulations and Enforcement in the US. W. St. UL Rev. 45 (2017), 1. [19] Global Legal Insights. 2023. Blockchain & Cryptocurrency Laws and Regulations 2024. Available on: https://www. globallegalinsights. com/practice-areas/blockchain- laws-and-regulations/switzerland (2023). [20] Yashovardhan Jallan, Elizabeth Brogan, Baabak Ashuri, and Caroline M Clevenger. 2019. Application of natural language processing and text mining to identify patterns in construction-defect litigation cases. Journal of legal affairs and dispute resolution in engineering and construction 11, 4 (2019), 04519024. [21] Karisma Karisma and Pardis Moslemzadeh Tehrani. 2023. Blockchain: Legal and Regulatory Issues. In Sustainable Oil and Gas Using Blockchain . Springer, 75–118. [22] LexisNexis. [n. d.]. Nexis Uni Academic Research Platform. https://www. lexisnexis.com/en-us/professional/academic/nexis-uni.page. [23] Ioannis Lianos, Philipp Hacker, Stefan Eich, and Georgios Dimitropoulos. 2019. Regulating blockchain: techno-social and legal challenges . Oxford University Press. [24] Brendan McGurk and Stefan Reichenbach. 2024. Risks and the regulatory issues arising from the use of DLT. In Financial Services Law and Distributed Ledger Technology . Edward Elgar Publishing, 91–119. [25] Kaiz Merchant and Yash Pande. 2018. Nlp based latent semantic analysis for legal text summarization. In 2018 international conference on advances in computing, communications and informatics (ICACCI) . IEEE, 1803–1807. [26] Bonan Min, Hayley Ross, Elior Sulem, Amir Pouran Ben Veyseh, Thien Huu Nguyen, Oscar Sainz, Eneko Agirre, Ilana Heintz, and Dan Roth. 2023. Recent advances in natural language processing via large pre-trained language models: A survey. Comput. Surveys 56, 2 (2023), 1–40. [27] Taylor Anne Moffett. 2022. CFTC & SEC: The Wild West of Cryptocurrency Regulation. U. Rich. L. Rev. 57 (2022), 713.[28] Jianmo Ni, Gustavo Hernandez Abrego, Noah Constant, Ji Ma, Keith Hall, Daniel Cer, and Yinfei Yang. 2022. Sentence-T5: Scalable Sentence Encoders from Pre- trained Text-to-Text Models. In Findings of the Association for Computational Linguistics: ACL 2022 . 1864–1874. [29] Jianmo Ni, Chen Qu, Jing Lu, Zhuyun Dai, Gustavo Hernández Ábrego, Ji Ma, Vincent Y Zhao, Yi Luan, Keith B Hall, Ming-Wei Chang, et al .2021. Large dual encoders are generalizable retrievers. arXiv preprint arXiv:2112.07899 (2021). [30] Benedikt Notheisen and Christof Weinhardt. 2019. The blockchain, plums, and lemons: Information asymmetries & transparency in decentralized markets . Tech- nical Report. KIT Working Paper Series in Economics. [31] OpenAI. 2024. ChatGPT . https://openai.com/chatgpt/ [32] Joao Pedro Quintais, Balazas Bodo, Alexandra Giannopoulou, and Valeria Ferrari. 2019. Blockchain and the law: A critical evaluation. [33] Saniya Raahath. 2024. Majority of SEC Claims Against Binance Can Proceed, Says Judge. https://coincodecap.com/majority-of-sec-claims-against-binance- can-proceed-says-judge [34] Bary Rahma. 2023. Full List of Cryptos Named Securities in SEC Lawsuits Against Binance and Coinbase. https://beincrypto.com/full-list-cryptos-securities-sec- lawsuit-binance-coinbase/ [35] US Securities. 1934. Securities exchange act of 1934. Washington, DC: Government Printing Office (1934). [36] U.S. Securities and Exchange Commission. [n. d.]. SEC Charges Ripple and Two Executives with Conducting $ 1.3 Billion Unregistered Securities Offering. https://www.sec.gov/newsroom/press-releases/2020-338. Accessed: 2024-08-13. [37] US Securities, Exchange Commission, et al. 1933. Securities act of 1933. [38] Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. 2020. Mpnet: Masked and permuted pre-training for language understanding. Advances in neural information processing systems 33 (2020), 16857–16867. [39] U. S. Securities and Exchange Commission. [n. d.]. Framework for ’Investment Contract’ Analysis of Digital Assets. https://www.sec.gov/about/divisions- offices/division-corporation-finance/framework-investment-contract- analysis-digital-assets. Accessed: 2024-08-13. [40] U.S. Securities and Exchange Commission. [n. d.]. Crypto Assets and Cyber En- forcement Actions. https://www.sec.gov/spotlight/cybersecurity-enforcement- actions Accessed: 2024 July 21. [41] Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. 2020. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in Neural Information Processing Systems 33 (2020), 5776–5788. [42] Xihan Xiong and Junliang Luo. 2024. Global Trends in Cryptocurrency Regula- tion: An Overview. arXiv preprint arXiv:2404.15895 (2024). [43] Moin A Yahya and Nicole Pecharsky. 2022. Crypto-Litigation: An Empirical Overview for 2020-Present. SMU Sci. & Tech. L. Rev. 25 (2022), 195. [44] Urchade Zaratiana, Nadi Tomeh, Pierre Holat, and Thierry Charnois. 2023. GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer. arXiv:2311.08526 [cs.CL] [45] Dirk A Zetzsche, Filippo Annunziata, Douglas W Arner, and Ross P Buckley. 2021. The Markets in Crypto-Assets regulation (MiCA) and the EU digital finance strategy. Capital Markets Law Journal 16, 2 (2021), 203–225.
{ "id": "2408.11961" }
2302.06348
A Tale of Two Currencies: Cash and Crypto
We discuss numerous justifications for why crypto-currencies would be highly conducive for the smooth functioning of today's society. We provide several comparisons between cryptocurrencies issued by blockchain projects, crypto, and conventional government issued currencies, cash or fiat. We summarize seven fundamental innovations that would be required for participants to have greater confidence in decentralized finance (DeFi) and to obtain wealth appreciation coupled with better risk management. The conceptual ideas we discuss outline an approach to: 1) Strengthened Security Blueprint; 2) Rebalancing and Trade Execution Suited for Blockchain Nuances 3) Volatility and Variance Adjusted Weight Calculation 4) Accommodating Investor Preferences and Risk Parity Construction; 5) Profit Sharing and Investor Protection; 6) Concentration Risk Indicator and Performance Metrics; 7) Multi-chain expansion and Select Strategic Initiatives including the notion of a Decentralized Autonomous Organization (DAO). Incorporating these concepts into several projects would also facilitate the growth of the overall blockchain eco-system so that this technology can, have wider mainstream adoption and, fulfill its potential in transforming all aspects of human interactions.
http://arxiv.org/pdf/2302.06348v1
Ravi Kashyap
econ.GN, cs.CR, cs.CY, q-fin.EC, 90B70 Theory of organizations, 97U70 Technological tools, 93A14 Decentralized systems, 91G45 Financial networks
econ.GN
A Tale of Two Currencies: Cash and Crypto Ravi Kashyap (ravi.kashyap@stern.nyu.edu)1 Estonian Business School / City University of Hong Kong July 19, 2023 Keywords: Crypto; Cash; Tao; Dao; Human Capital; Decentralized Autonomous Organizations; Blockchain; Risk Parity; Wealth Management; Universal Identity; Small; Step; Giant; Leap; Mankind Journal of Economic Literature Codes: D7: Analysis of Collective Decision-Making; D8: Information, Knowledge, and Uncertainty; I31: General Welfare, Well-Being; O3 Innovation ,Research and Development, Technological Change, Intellectual Property Rights; XYZ: Creation of Universal Identities (New JEL Code to be Added) Mathematics Subject Classification Codes: 90B70 Theory of organizations; 68V30 Mathematical knowledge management; 97U70 Technological tools; 68T37 Reasoning under uncertainty in the context of artificial intelligence; 93A14 Decentralized systems; 91G45 Financial networks; 97D10 Comparative studies; XYZ: Mathematical Techniques for Creating Universal Identities (New MSC Code to be Added) 1Numerous seminar participants, particularly at a few meetings of the econometric society and various finance organizations, provided suggestions to improve the paper. The following individuals have been a constant source of inputs and encouragement: Joshua Hong and the team at Formation Fi; Dr. Yong Wang, Dr. Isabel Yan, Dr. Vikas Kakkar, Dr. Fred Kwan, Dr. Costel Daniel Andonie, Dr. Guangwu Liu, Dr. Jeff Hong, Dr. Humphrey Tung and Dr. Xu Han at the City University of Hong Kong. The views and opinions expressed in this article, along with any mistakes, are mine alone and do not necessarily reflect the official policy or position of either of my affiliations or any other agency. ©2021 Ravi Kashyap. All Rights Reserved. 1arXiv:2302.06348v1 [econ.GN] 13 Feb 2023 TABLE OF CONTENTS Table of Contents 1 Abstract 3 2 MMT and MPT are Starting to Sound Empty 4 2.1 Outline of the Sections Arranged Inline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 Interest in Interest Rates, Inflation and Money Machines!!! 6 4 Since Bitcoin Was Coined ... 8 5 Decrypting Crypto and DeFi Investing 9 6 Back To The Future: Decentralized to Centralized and Back 10 7 Crypto Conundrums versus MMT Mayhem 11 7.1 DeFi Yield Farming: The Fields of Gold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 7.2 The Decentralized Ark for The Great Flood of Post Modern Monetary Maladies . . . . . . . 12 8 Bringing Risk Parity To The DeFi Party 13 8.1 A Complete Solution To The Crypto Asset Management Conundrum . . . . . . . . . . . . . . 13 8.2 DeFi Security: Turning the weakest link into the strongest attraction . . . . . . . . . . . . . . 14 8.3 Trade Execution: To Trade or Not To Trade . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 8.3.1 Shakespeare As A Crypto Trader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 8.4 VVV Weight Calculations: Prepared for the Downside and Primed for the Upside . . . . . . 19 8.4.1 Tables and Explanations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.5 The Risk Parity Line: Moving from the Efficient Frontier to the Final Frontier of Investments 23 8.6 Sharing is Caring: Setting Aside Profits for The Crypto Community . . . . . . . . . . . . . . 26 8.7 Raising the Bar for Portfolio Performance Measurement: The Concentration Risk Indicator . 29 8.8 Multichain Expansion and Select Strategic Initiatives: Building Bridges That Do Not Burn . 32 9 Crypto or Cash or Crypto will become Cash 36 10 End-notes 36 11 References 40 ©2021 Ravi Kashyap. All Rights Reserved. 2 1 ABSTRACT 1 Abstract We discuss numerous justifications for why crypto-currencies would be highly conducive for the smooth func- tioning of today’s society. We provide several comparisons between cryptocurrencies issued by blockchain projects, crypto, and conventional government issued currencies, cash or fiat. We summarize seven funda- mental innovations that would be required for participants to have greater confidence in decentralized finance (DeFi) and to obtain wealth appreciation coupled with better risk management. The conceptual ideas we discuss outline an approach to: 1) Strengthened Security Blueprint; 2) Re- balancing and Trade Execution Suited for Blockchain Nuances 3) Volatility and Variance Adjusted Weight Calculation 4) Accommodating Investor Preferences and Risk Parity Construction; 5) Profit Sharing and Investor Protection; 6) Concentration Risk Indicator and Performance Metrics; 7) Multi-chain expansion and Select Strategic Initiatives including the notion of a Decentralized Autonomous Organization (DAO). Incorporating these concepts into several projects would also facilitate the growth of the overall blockchain eco-system so that this technology can, have wider mainstream adoption and, fulfill its potential in trans- forming all aspects of human interactions. ©2021 Ravi Kashyap. All Rights Reserved. 3 2 MMT AND MPT ARE STARTING TO SOUND EMPTY 2 MMT and MPT are Starting to Sound Empty There is a debate raging amongst economists and politicians that goes to the very heart of what governments should and shouldn’t do to manage future prosperity. The monetary and fiscal policies adopted by many nations, over the last few decades, have garnered strong support for the so called Modern Monetary Theory (MMT)(Mankiw2020; Wray2015). MMT’sproponentsclaimthatanynationthatproducesitsownsovereign currency (fiat or cash) cannot run out of money because it can always just print more. In other words, the government essentially has no financial constraints. MMT was originally a description of how spending in the economy already happens. In that sense, the debate isn’t so much whether it should or shouldn’t be implemented, but to what degree and under what circumstances. Challengers say MMT would be highly irresponsible mismanagement of the economy. The policies, they say, will lead to a massive increase of the money supply that is bound to trigger inflation at levels not seen since the seventies and eighties and perhaps even trend higher. The application of MMT will require tax increases, to control any inflationary pressures, which can be hugely unpopular and hard to implement. The debate boils down to whether we believe that politicians and officials have the data, knowledge and skills to delicately balance their spending to deliver full employment while hitting an inflation target. MMT, coming at a time of general economic uncertainty, could have a profound impact on investment management, Decentralized Finance (DeFi: Zetzsche, Arner & Buckley 2020; End-note 1) and how corporations and ordinary citizens secure their wealth. Modern Portfolio Theory (MPT) is the theory behind most current financial investment strategies. It uses elegant mathematics to formalize many intuitive ideas about risk and return. MPT is one of the primary tools used by fund managers to construct portfolios that match expected reward to accepted risk (Elton & Gruber 1997; Goetzmann, et al. 2014; Fabozzi, Gupta & Markowitz 2002). MPT is driven by a wide diversification of assets to even out any downturns and achieve consistent growth. Asset classes such as bonds are usually included to reduce risk, But when the US Treasury bond yields dip to low levels, such as the recent drop of 10 year US Treasury bond yields to below 1% as it happened during 2020, investors are having to look around for alternatives. Bitcoin is suddenly coming up in more financial planning conversations (End-note 3). Despite its success, MPT is under threat (Miccolis 2012; Curtis 2002;2004). MPT is not immune from inflation. Economicexpectationsarepricedin, butunexpectedeconomicshocksarenot. Aneconomyrunning according to MMT principles carries a higher risk of missing the inflation target as the government tries to juggle its spending and taxation. Bonds offer no protection here either, as witnessed during the high inflation 1970s, when the spread between bond yields and inflation converged significantly compared to previous years (Laidler & Parkin 1975; Blinder 1982; DeLong 1997; Boschen & Weise 2003; Figure 1). ©2021 Ravi Kashyap. All Rights Reserved. 4 2 MMT AND MPT ARE STARTING TO SOUND EMPTY Another environmental risk comes from economic growth targets. MMT’s main aim is to secure full employment thereby maximizing productivity and GDP. Again, as governments try to spend and tax their waytotheirobjectives, theyareunlikelytogetconsistentresults(Palley2015; Epstein2019; Baker&Murphy 2020). Figure 1: Interest Rates and Inflation Source: St. Louis Federal Reserve, S&P Dow Jones Indices 2.1 Outline of the Sections Arranged Inline Section (2), which we have already seen, provides an introductory overview of the monetary policies cur- rently being pursued by most governments and the wealth management strategies commonly used by many traditional financial firms. Section (3), develops an analogy that helps us to understand the role of money in society and then to see how crypto can fulfill the functions of money, as we know it, in a better way. Sections (4; 5) look at the origins of crypto-currencies and the evolution of decentralized finance. Section (6) looks at how money has moved from being centralized to decentralized and how there are attempts to make it centralized again using blockchain technology. Section (7) is a discussion of how crypto can be a remedy to several monetary maladies and the promise it holds for creating equal wealth generation opportunities for everyone. Section (8) summarizes several innovations that would be necessary to make blockchain wealth management accessible and safe for the masses. Thesevensub-sectionsinSection(8)cover: 1)StrengthenedSecurityBlueprint(Section8.2); 2)Rebalanc- ing and Trade Execution Suited for Blockchain Nuances (Section 8.3); 3) Volatility and Variance Adjusted ©2021 Ravi Kashyap. All Rights Reserved. 5 3 INTEREST IN INTEREST RATES, INFLATION AND MONEY MACHINES!!! Weight Calculation (Section 8.4); 4) Accommodating Investor Preferences and Risk Parity Construction (Section 8.5); 5) Profit Sharing and Investor Protection (Section 8.6); 6) Concentration Risk Indicator and PerformanceMetrics(Section8.7); and7)Multi-chainexpansionandSelectStrategicInitiatives(Section8.8). This present article provides a conceptual overview of these topics since these ideas will be published in seven separate articles, with detailed mathematical formulations and software architectural design considerations where applicable. 3 Interest in Interest Rates, Inflation and Money Machines!!! We look at a simple analogy (Kashyap 2015) to get a better understanding of money, interest rates, inflation and the importance of these concepts for economic growth and wealth generation including how technology is shaping the future of money. Sweeney & Sweeney (1977) is a very interesting tale of interest rates and inflation. Cochrane (2009) has a discussion of money machines as they are understood in finance (End-note 4). Water gives life and sustains it (Franks 2000; Chaplin 2001; Westall & Brack 2018). It is required everywhere for life, as we know it, to exist. In a similar vein, it is hard to imagine a modern economy without money or money-equivalents. This comparison is only partly valid since life, as we know it, would cease to prevail without water. While we can essentially have a barter economy without money-equivalents. Barring this key limitation, the smooth functioning of a modern economy requires the flow of money-equivalents. Money has three main utilities: it serves as a medium of exchange, a unit of measurement and a storehouse for wealth (Brunner & Meltzer 1971; McLeay, Radia & Thomas 2014). Water has numerous uses, but we list three main ones to develop our comparison: it helps to transports nutrients and minerals both within our bodies and all around us; it regulates the temperature of our bodies and the external environment and gives shape and structure to many things around us; and it dissolves nutrients and stores them, more than any other substance known to mankind. We have constructed elaborate devices and machines, to control and divert the flow of water, to maximize the growth of life (Rogers & Fiering 1986; Pahl-Wostl 2008; Cosgrove & Loucks 2015). Likewise, we have the financial services sector, that controls and diverts the flow of money-equivalents, to maximize the growth of an economy. Taking the analogy a step further: our central reservoirs, irrigation canals, water tankers, pumping stations, pipes and water sprinklers are devised to keep water flowing around. Similarly, centralized and regional financial institutions, wire transfers, credit cards, checks, bank drafts, the internet and related technologies are meant to keep money-equivalents sloshing around. Whencentralbankscreateliquidityorpumpmoneyintothefinancialsystem, itislikerainfallorsnowmelt that feeds rivers and streams which carry the water around. The centralized institutions , or monetary policy ©2021 Ravi Kashyap. All Rights Reserved. 6 3 INTEREST IN INTEREST RATES, INFLATION AND MONEY MACHINES!!! makers, then become our rain gods or water gods. We do not know exactly when and how much rain we are likely to receive. But we have some decent expectations, which is what we call our seasons, and we have views on what to anticipate based on previous experiences. Central bank meetings, which do have a fair bit of regularity, to decide future monetary measures are like the seasonal patterns we have come to rely on. Inflation, which happens when there is too much money in the system, is like a flood scenario. Drought then becomes a recessionary episode. Clearly both are not desirable. These are unintended consequences, both in an economy and other aspects of life, due to the nature of uncertainty around us, all of which we will discuss in later articles as it pertains to investment management (Kashyap 2016b). Interest rates can be viewed as the ways in which money is taken away by the system that is designed to send it around. As water flows around, part of it is lost due to evaporation, seeping into the ground or flowing into the ocean. This rate at which water is lost by the system is similar to the base interest rate set by the monetary authorities. All rates (interest and water loss) and transaction costs are then modifications of these fundamentals rates specific to different situations. As our analogy illustrates, when interest rates are higher inflation will tend to be lower and vice versa. There are two main issues with the central monetary or water system. One boils down to the essence of centralization and the overt dependence on the main source of water or money, which relies heavily on what the gods or policy makers do. Central bankers have sole control over money machines, which have become crucial for financial well-being. The other issue is that when fresh water does find its way into the system, the people that can collect most of it are the ones that are already connected to and well established in the existing network. In a water system, this is simply the life around rivers and streams that benefit the most from rainfall. Similarly new wealth ends up getting concentrated in the hands of those already well entrenched into the current money transfer mechanisms. Unfortunately, the money gods are also likely to be influenced (aka lobbying) by those that benefit the most whenever new money is printed. In some ways, the vegetation around a water network precipitates further rainfall. It would not be entirely incorrect to state that most, if not all, policy makers have good intentions with no desire to cause monetary mutilation. We want to emphasize that there are no good or bad people. Policy makers do what they do, in response to seemingly tough situations, based on the application of what they have learnt from mediocre role models. Things have gone haywire due to the lack of better solutions. The reasons for the lack of superior methods is due to the need to be conservative when tinkering with economy wide policies as discussed in Section (5). It is also worth mentioning that the natural system of rainfall or snowfall and the corresponding watering network, which we should someday hope to more thoroughly emulate, has no strict parallels for now in our economy. But the comparison we have outlined serves as a way to illustrate how the existing monetary system works and to make a strong case for the necessity of the DeFi technological innovations, which we ©2021 Ravi Kashyap. All Rights Reserved. 7 4 SINCE BITCOIN WAS COINED ... discuss next in Sections (4; 5). Money to Business is as Water to Life. 4 Since Bitcoin Was Coined ... The invention of Bitcoin in 2008, and the subsequent launch of the currency in 2009, is no doubt a landmark event permanently etched in the history of technological innovations. This seminal event is opening frontiers that are set to transform all aspects of human interactions (Nakamoto 2008; Narayanan & Clark 2017; Chen 2018; Monrat, et al. 2019). It has opened the floodgates for innovations seeking to add different aspects of business and human experiences onto the blockchain. The rest, as they say, is history. As the Bitcoin movement gained steam, adding supporters and gaining momentum as a substitute for money as we know it, many great minds deemed several improvements as being essential to enhance this landscape. Ethereum, which was conceived in 2013 and launched in 2015, provided a remarkable innovation in terms of making blockchain based systems Turing complete (or theoretically being able to do what any computer can do: Sipser 2006; End-note 5). This has now opened the floodgates for innovators seeking to add different aspects of business and human experiences onto the blockchain. That said, many barriers need to be scaled for the wider adoption of blockchain technologies. Some of these limitations are: increased latency, usability limitations, security issues, size and bandwidth limitations, all of which need to quantified and assessed from a risk perspective depending on specific use cases (Hughes, et al. 2019). The funding needs for new projects, and innovators seeking capital for amazing novel ideas, are creating remarkable opportunities for investors. Though, the early days of crypto investing are synonymous with huge swings in prices or volatility, security issues or hacks, and a lack of protective mechanisms for investors. This has stood in the way of wider inclusion of crypto currencies, and blockchain assets, in the portfolios of individuals who do not have a stomach for roller coaster rides and fatal accidents. As the story of Sergey Bubka illustrates (End-note 6), human ingenuity has no bounds. Many innovators are learning from the insightful lessons offered by contemporary chains. Proof of work, as a consensus mechanism, already has a plethora of interesting alternatives (Dimitri 2022). Massive efforts are underway to build platforms that address issues related to high transaction costs, low throughput, scalability and also to ensure that different chains have a greater degree of connections and interoperability. We see this development of newer chains as a great possibility to find investment opportunities. Selection of assets will be done across networks such that each investor can get exposure to the whole suite of assets on multiple chains. Investing on different chains, and hence linking different networks, is one way of providing diversified exposure to an investor base. Though, to trade numerous assets on different chains can be an onerous task. But, many innovations in decentralized finance are clearing the way for more investors to ©2021 Ravi Kashyap. All Rights Reserved. 8 5 DECRYPTING CRYPTO AND DEFI INVESTING enter this space. Several DeFi protocols are pioneering new methodologies to make crypto investing less risky, secure and accessible to everyone. Better risk management techniques will ensure that the gap between funding needs and the supply of funds will be bridged. Rigorous risk management within the crypto landscape is something that is badly needed by all investors seeking crypto exposure. Blockchain technology is still evolving and this new landscape presents amazing opportunities to revolutionize all aspects of how we transact. But several issues, related to security, wild swings in prices and diversification of assets, have to be addressed for the wider adoption of the blockchain innovation from an investing perspective. Once investing in this sector becomes more appealing it will spur further innovation in all other areas of blockchain technology. 5 Decrypting Crypto and DeFi Investing The DeFi phenomenon is offering a radically different paradigm (Werner, et al. 2021; Xu et al. , 2021). The DeFi movement is creating entirely new sources and systems of money transfer. This is like tapping into new and alternate sources of water and building novel techniques to spread it around. Cryptocurrencies are creating channels that can stay independent of the centralized systems in many ways. These new pathways are more accessible for anyone to benefit from them. This plethora of wealth generation opportunities are due to the many alternate ways to create and raise money. Technology and other innovations are also ensuring that these new sources of money have safety measures designed to prevent inflationary scenarios and several forms of fraudulent activity. This does not imply that sailing on crypto waves with be completely smooth. There are likely to be unintended consequences in DeFi, just as in every aspect of life. But a strong argument can be made that many independently controlled systems are likely to weather tougher storms, which makes for a more robust overall framework for financial welfare. Misdemeanour on the part of any DeFi assets will send funds fleeing to other crypto alternatives that are already there or those that will mushroom up as needs arise. Better solutions are obtained when we can have a trial and error approach (Kashyap 2021). Such a trial and error approach happens naturally in the DeFi environment when compared to the full economy. The risk of any crypto blowing up is unlikely to be fatally detrimental to the entire system. Taking fundamentally different approaches would be extremely ill advised in a central banking atmosphere. As the crypto ecosystem grows, innovators will have greater flexibility in trying new and unproven techniques. Everyone benefits since the lessons learnt, even from failed projects, can be applied elsewhere. As many blockchain projects pioneer the way in bringing sophisticated risk mitigation principles to the DeFi space, innovation will flourish and continue to happen in an unperturbed manner. ©2021 Ravi Kashyap. All Rights Reserved. 9 6 BACK TO THE FUTURE: DECENTRALIZED TO CENTRALIZED AND BACK 6 Back To The Future: Decentralized to Centralized and Back Money started as a decentralized unit, (in the form of animal skins, salt, shells etc., to facilitate commerce. It then became centralized (in the form of coins and notes) when monarchs and later governments took over the task of supplying currency. Now money, which is increasingly becoming digital, is moving away from the control of any authority (Davies 2010; Nakamoto 2008; Reiners 2020; Yadav, et al. 2020). History does repeat itself. As the acceptance of crypto currency increases, and the majority of daily business transactions happen in the alternative world of crypto, the influence of centralized banking systems and the corresponding policies will wane. Using our water analogy in this case, as alternate water sources become important, we can see that the system of rainfall and other water courses have little effect on our lives. It is a scenario wherein we (all or humanity or at-least the majority) are living very far from natural water pathways so that floods and droughts in this system, have little bearing on us. Clearly we are not there yet both in the water and monetary system. There is no backup for national currencies right now. With crypto-currencies on the rise, wealth will get more options to flee to an alternate asset quite easily. Central bank digital currencies (CBDCs) or centralized decentralized currencies, oxymoronic as it sounds, have many pros and cons (Auer, et al. 2021; Barrdear & Kumhof 2021; Agur, et al. 2022). Not wanting to be left out, many national monetary authorities are planning or actively contemplating such a scheme. CBDCs can offer stable diversification benefits and act as a safe haven, if they are governed like other crypto- currencies with strict guidelines on money supply and other related aspects. But if just becomes a national currency in digital form, it will not be very different from other conventional currencies. If participants are required to follow extensive guidelines before they can participate, money flow patterns can be traced back to the originators and CDBC will be less anonymous than pure crypto. Some participants might favour CDBCs because of the extent of traceability that comes with recording and displaying all transactions in a blockchain. But for the same reason, many might stay away from it entirely. This will be an interesting development to watch once CBDCs become a reality and try to fit in with the rest of the crypto landscape. A counter argument to support centralized currencies can be that it is easy to manage one currency, whereas too many competing currencies are bound to cause chaos. To see that this argument holds little merit, itisimportanttorealizethateachcrypto-currencyisselfgoverningwithmembershavingatransparent view of the policies and in many cases even having a say on how things should be run. Despite these measures, things can go wrong sporadically but money will be able to flee to other sources in such instances given the plenty of alternatives available. There will be turbulence when new and heavy flows of water, or money, start pouring in. We experience this as volatility in prices when money moves in and out of crypto-assets. The next wave of innovations in DeFi will be geared around reducing fluctuations and ensuring the adoption of crypto as a main stream asset ©2021 Ravi Kashyap. All Rights Reserved. 10 7 CRYPTO CONUNDRUMS VERSUS MMT MAYHEM class. Numerous startups are pioneering the way by bringing many well established techniques that have worked well in traditional investing, including many innovations tailored for the DeFi arena, to decentralized finance. We list below seven techniques that are essential for Decentralized Finance and blockchain investing to be more widely adopted by individuals and businesses alike (Section 8). 7 Crypto Conundrums versus MMT Mayhem Crypto is starting to be perceived as a hedge against a devaluing dollar (Shahzad, et al. 2020; Blau, Griffith & Whitby 2021; Conlon, Corbet & McGee 2021; Choi & Shin 2022). Several asset management firms are actively investing in cryptocurrencies and crypto is being deemed as an asset class (Hong 2017; Bianchi 2020; Bianchi & Babiak 2022). The majority of crypto assets are engineered to be actively deflationary with features such as fixed supply/flow, token burns, etc. Whether it is going to be completely effective or not is still to be seen. But the high level of volatility in Crypto assets, and the general correlation between Bitcoin and the S&P500, suggests that a strategy of simply holding crypto assets is not necessarily a wise move (Chuen, Guo & Wang 2017; Kosc, Sakowski & Ślepaczuk 2019; Flori 2019; Xi, O’Brien & Irannezhad 2020; Liu, Tsyvinski & Wu 2022; Troster, et. al. 2019; Figure DELETION:Add figure here). Nonetheless, if inflation continues to rise then demand for crypto is likely to go up, driven by corporations wanting to diversify their reserves. There will be another side effect of MMT policies too. As unemployment falls, there will be more money in people’s pockets and their ability to save will increase. Some will be attracted by crypto’s get rich quick headlines, some by the stories of inflation protection. A few will be drawn by the transparency of DeFi, or in other words, driven away from banks by the centralized and politicized feel of MMT. 7.1 DeFi Yield Farming: The Fields of Gold In 2020, many people in the crypto space discovered yield farming: the ability to increase returns on holdings through different combinations of staking, liquidity pools, lending, and so on (Xu & Feng 2022; End-note 2). Annualized returns of over 100%, for a short time anyways,were not uncommon. It is tempting then, to consider if yield farming will protect against market fluctuations and environmental shocks. In 2020 and 2021, yield farming has achieved higher real yields than can be achieved by cash or bonds, but all assets don’t behave equally. Yield farming strategies should be considered as growth assets, highly dependent upon crypto market volatility and volumes. Crypto deposited in liquidity pools, such as Uniswap (Angeris, et. al. 2019), earn a fixed 0.03% of all trades pro-rata. But the total return depends on the volume of trades going through the exchange and the capital is also at risk of impermanent loss (Aigner & Dhaliwal ©2021 Ravi Kashyap. All Rights Reserved. 11 7 CRYPTO CONUNDRUMS VERSUS MMT MAYHEM 2021). High price volatility, and other fees in some instances, also reduce the usefulness of yield farming as an inflation hedge. Lending crypto, on the other hand, is not so volatile. Stable coin (Ante, Fiedler & Strehle 2021; Hoang & Baur 2021; Lyons & Viswanath-Natraj 2023; End-note 7) deposits earned yields higher than bonds or cash in 2021. Rates will vary but they are likely to beat income from traditional cash deposits under normal circumstances (End-notes 8). Lending crypto can therefore be equated to the role of bonds in MPT. In the year 2021 we found ourselves in an unenviable position. Permanently low interest rates had broken monetary policy. Quantitative Easing (QE: Blinder 2010; Fawley & Neely 2013) had not reached past the banks, forcing MMT style policies. This massive fiscal stimulus could backfire by causing steep inflation. MMT centralizes more power in the hands of politicians who distort the spending patterns, adding further inflation risk. Evidence of rising inflation will drive further corporate and consumer demand towards crypto and DeFi. However, crypto and DeFi are not necessarily immune either. We need a new (or proven, repurposed) strategy that will offer protection against environmental shocks. Yield farming, however, even with lending, is still at risk from MMT inflation. Most yield farming is denominated in stable-coins, which are pegged to the US dollar, so any gains will be subjected to the same devaluation as the dollar. Cryptocurrencies and blockchain projects are recent innovations with several active frontiers of research (Yli-Huumo, et. al. 2016; Xu, Chen & Kou 2019; Gorkhali & Shrestha 2020). They have not yet lived through many different business cycles and stressful episodes. Reliable data on crypto projects only goes to a little more than a decade and DeFi platforms are much younger still (Zetzsche, Arner & Buckley 2020; Schueffel 2021) with no previous exposure to inflationary periods, so we do not know for sure how crypto markets will behave as situations change drastically. Some DeFi platforms are attempting to use MPT to construct balanced crypto indexes (Kim, Trimborn & Härdle 2021; Lucey, et. al. 2022;Naeem, et. al. 2022). Although many indices are constructed such that they can perform reasonably well during a market downturn, MPT does not defend against environmental shocks (Lee, et. al. 2022; Briola, et. al. 2023) as we have seen in Section (2). Another strategy is required to bring this layer of protection from external impacts and to construct more robust crypto portfolios. Risk Parity is such a strategy, which we introduce in the next sub-section (7.2). 7.2 The Decentralized Ark for The Great Flood of Post Modern Monetary Maladies Risk Parity is an extraordinarily successful methodology from traditional finance pioneered by Ray Dalio at Bridgewater Associates (Chaves, Hsu & Shakernia 2011; Clarke, De Silva & Thorley 2013). It is specifically designedtoresistenvironmentalfactorssuchasunexpectedinflationandgrowth(Asness, Frazzini&Pedersen 2012; Fabozzi, Simonian & Fabozzi 2021). ©2021 Ravi Kashyap. All Rights Reserved. 12 8 BRINGING RISK PARITY TO THE DEFI PARTY The traditional finance world has generated many models and innovations related to trading and risk management. These techniques have gone several phases of iterations involving implementation and active usage, which have resulted in many robust and improved techniques becoming a part of our lives. The challenge is to find ways to simplify many aspects of the sophisticated techniques used by investment firms and tailor them to the blockchain environment. A big part of our lives revolves around seeking financial security. The existing mainstream financial industry has done a lot to bring about financial well-being to many. But there are several issues with the existing set up. One of the main concerns is that access to financial services that work really well are highly restricted and not available to most people. Clearly, we are simplifying the picture significantly for the sake of this discussion. The essence of what is needed is about creating “Equal Wealth Generation Opportunities For Everyone,” which can be accomplished using decentralized technological innovations discussed next (Section 8). To bring effective risk management, and to incorporate asset management technique such as Risk Parity, to cross-chain DeFi using crypto native assets, would be to achieve what traditional wealth managers are doing with stocks and bonds. One approach would be to engineer a set of four indexes or funds: Alpha, Beta, Gamma and Parity (ABGP). Alpha, Beta and Gamma are funds with different levels of risk and expected returns. The investment mandates for these three funds will be to ensure that, under most circumstances, Alpha will be more risky than Beta and Beta will be more risky than Gamma. Investors will be able to combine the three funds depending on their risk appetites. Mixing Alpha, Beta and Gamma will give the RiskParityportfolio(Kashyap2021-X).RiskParitywillbetheinvestmentvehiclethatwillprovidediversified returns, tailored to the risk appetites of each investor, entirely on a highly secure blockchain environment. Together, ABGP will capture the market highs, track consistent growth, even out downturns and protect against shocks. By assigning different weights to each one, it will provide the capability to offer balanced, risk-adjusted portfolios. 8 Bringing Risk Parity To The DeFi Party 8.1 A Complete Solution To The Crypto Asset Management Conundrum We will publish seven separate articles, that will discuss several innovations necessary to address the main concerns and to alleviate the challenges in crypto asset management, in significant detail. These separate articles, which are referenced in the appropriate place throughout the text below, contain mathematical formulationsandtechnicalimplementationpointerswhereapplicable. Thesequenceofthenextsevensections will summarize numerous conceptual ideas, in an incremental fashion, to make DeFi investing more secure and less risky. They will provide a description of the main components that would need to be created to reach ©2021 Ravi Kashyap. All Rights Reserved. 13 8 BRINGING RISK PARITY TO THE DEFI PARTY our goal of bringing Risk Parity to the decentralized finance world. These articles, which are summarized in separate sections below, describe our approach to: 1. DeFi Security (Section 8.2; Kashyap 2021-I) 2. Rebalancing and Trade Execution (Section 8.3; Kashyap 2021-II) 3. Weight Calculation (Section 8.4; Kashyap 2021-III) 4. Risk Parity Construction (Section 8.5; Kashyap 2021-IV) 5. Profit Sharing and Investor Protection (Section 8.6; Kashyap 2021-V) 6. Concentration Risk Indicator and Portfolio Performance Metrics (Section 8.7; Kashyap 2021-VI) 7. Multi-chain expansion and Select Strategic Initiatives (Section 8.8; Kashyap 2021-VII) Risk Parity will bring long-term stability to DeFi and the seven innovations we describe below will bring Risk Parity to the Crypto Party. 8.2 DeFi Security: Turning the weakest link into the strongest attraction •We start with the first section of this series of seven, which will focus on what we consider to be the foremost priority for all organizations engaged in decentralized finance endeavors, to provide an overview of a strengthened security blueprint. Kashyap (2021-I) has a detailed discussion including the corresponding mathematical formulations and pointers for technological implementation.This first section will focus on security and the corresponding innovation, which we are calling the Safe-house. The Safe-house is a piece of engineering sophistication that utilises existing blockchain principles to bring about greater security when customer assets are moved around. The Safe-house is badly needed since there are many ongoing hacks and security concerns in the DeFi space right now. •Any tall tower, has to withstand a lot of wind resistance. The taller a structure the stronger the wind forces that it has to overcome. Hence, the height of the tall tower becomes its weakest aspect. But if this weakness is addressed properly, and enough safety mechanisms are incorporated in the design, the height of the tower becomes its greatest attraction. People flock to the top to marvel at the views and to admire the accomplishment of having created such a safe and tall structure. Clearly, the importance of having a solid foundation for a tall structure cannot be overlooked. •Likewise, security is the biggest threat, or the weakest link, in DeFi right now. DeFi is nothing but the movement of funds seeking profits. The more the funds move, the greater the security vulnerability. But if the security concerns are adequately addressed, and appropriate features are designed to make ©2021 Ravi Kashyap. All Rights Reserved. 14 8 BRINGING RISK PARITY TO THE DEFI PARTY DeFi investing more safe, this very weakness can be turned into the greatest attraction. The captivating fascination will then be the generation of significant wealth for all participants. The solid foundation, in our case, is the rigorous risk management, or Risk Parity, that is an intrinsic part of the framework. DeFi Protocols need to add a protective shield against internal theft and external intrusion. These are proprietary innovations, entirely custom built to safeguard our workflow, and we call this, The Safe House. The Safe House is the combination of a novel software engineering architecture and automated / manual processes, specific to handling fund movements, with certain multi-signatory approvals required for changing key governance policies. This approach will limit any potential one-time loss to a negligible amount and keep a detailed history of all the transactions linked to specific internal staff responsible for fund movements and trade execution. Needless to say, an extra layer of protection can be provided if the personnel involved in the process are fully KYC’ed (Know Your Customer or Client; End-note 9). Necessity is the mother of all creation / invention / innovation, but the often forgotten father is frustration. The enhanced security features we are describe here are, no doubt, very necessary. But the essence of the security innovations we are creating are borne out of the numerous troubles several (all?) protocols are encountering due to unauthorized parties trying to access their funds (Grobys 2021; Li, et al. 2020). The same could be said about the rest of the investment vehicles discussed here. These innovations are very necessary. But the key motivation for these mechanisms and architectural designs are due to the main issues that one encounters while trying to obtain: 1) unencumbered access to decent investment opportunities in the traditional financial world, and 2) peace of mind while investing in crypto assets. In today’s blockchain environment, many protocols are constantly under threat wherein their assets can be taken out or withdrawn by unlicensed individuals. Cryptographic methods used in blockchain protocols, do provide a certain amount of security. But, most projects are still vulnerable either when cryptographic keys, corresponding to fund movements, are compromised or when internal parties, who have access to the keys, have the intention of misappropriating investor funds. The extent of the perils are magnified in the blockchain environment, since a few parties with malicious intentcanreachnumerousvictims,giventhedistributednatureofthistechnology. Thisaddstotheperception that security dangers are commonplace and that hackers are ruling the roost. The many security related incidents stand in the way of the mass adoption of blockchain technology, which otherwise has the potential to transform all human interactions. We wish to do our part to grow this ecosystem by mitigating the harmful influences and restoring the balance of power to groups that are actively trying to develop this landscape. To counter these hazards, we are introducing several new innovations that will increase the overall defense mechanisms of our protocol. The novel security innovations, which we are developing, are to ensure that our system cannot be compromised by either internal or external actors. Our multi-pronged protection ©2021 Ravi Kashyap. All Rights Reserved. 15 8 BRINGING RISK PARITY TO THE DEFI PARTY scheme refines the existing cryptographic cover by adding extra layers of protective shields. By making these upgrades, we are converting one of the major drawbacks of the DeFi space to one of the major strengths of our protocol. The central element of our security innovations is the creation of a safe house, which will be guarded by private-public key cryptographic methods, to store all our assets. As an additional measure to enhance the security, access to the safe house will be provided only upon verification of the identity of the person requesting the permission. Our identity verification methodology is above and beyond the security provided by existing blockchain public-private key cryptographic methods.We can this technique the One Time Next Time Password (OTNTP). The OTNTP works similar to the One Time Password (OTP) mechanism. The OTNTP concept will be used to verify the identity of the portfolio manager, trying to take out funds, and to allowsafe-houseaccessformakingwithdrawals. Thismodifiedschemeshouldhelpwithpasswordprotectionin decentralized environments where all transaction information has to be made public for verification purposes. The safe house has also been designed to detect and neutralize dangers such as attempts to withdraw by players without the right credentials. If a real threat is determined, the safe house will go into a locked state. It will not allow anyone to take out any assets or funds from it until the severity of the danger has been assessed and it is deemed safe to resume further operations. In the event of an extreme situation, such as a malicious party breaching the safe house, the extent of damage will be limited due to numerous safeguards on the mobility of funds. This scenario can occur if an internal member, or an employee, decides to turn rogue. In such a case, the identity of the person who stole the funds would be established with certainty, due to our identity verification methodology, and the amount lost would be minimal. Even if the missing amount is very small, further action will be taken to recover the lost funds since the identity of the individual, who took the funds, will be known. While building the new security features mentioned above, the overriding challenge will be to ensure that the improved safety procedures will not become too cumbersome. The objective is to be able to accommodate more security guidelines and yet operate quickly and effectively to take advantage of market conditions. This will be discussed further in the next article, where we consider our trade execution related innovations. But to summarize, this can be accomplished by matching fund flows, which are governed by security parameters, to asset management principles and requirements. The result is a system that will protect investor assets and yet allow smooth functioning of our investment machinery. 8.3 Trade Execution: To Trade or Not To Trade •The portfolio rebalancing mechanism we recommend is based on an innovative and proprietary system called, The Cascading Waterfall Round Robin Mechanism. This algorithmic approach recommends an ideal trade size for each asset during the periodic rebalancing process, factoring in the gas fee and ©2021 Ravi Kashyap. All Rights Reserved. 16 8 BRINGING RISK PARITY TO THE DEFI PARTY slippage. •In the hyper-volatile crypto market, our approach to daily rebalancing will benefit from volatility. Price movements will cause our algorithm to buy assets that drop in prices and sell as they soar. In fact, the buying and selling happen only when certain boundaries are crossed in order to weed out any market noise and ensure sound trade execution. •Careful orchestration among mathematical optimization for portfolio construction, trade automation of the investment apparatus, and human oversight will allow one to watch out for exceptional situations and ultimately lead to a better outcome. 8.3.1 Shakespeare As A Crypto Trader To Trade Or Not To Trade, that is the Question, Whether an Optimizer can Yield the Answer, Against the Spikes and Crashes of Markets Gone Wild, To Quench One’s Thirst before Liquidity Runs Dry, Or Wait till the Tide of Momentum turns Mild. This is inspired by Prince Hamlet’s soliloquy in the works of Shakespeare: "To be or not to be; that is the question" (End-note 10; Bradley 1991). We continue with the second of the 7-section series of blockchain innovations, describing the main com- ponents that need to be built, to get closer to Risk Parity. . In this article, we will take a closer look at the trade execution innovations we have brought to the DeFi space in order to rebalance portfolios on a daily basis or even at an intraday frequency. “Cascading Waterfall Round Robin Mechanism” are the words we use to summarize our rebalancing algorithm. To describe how it works, we first assign a certain capacity to hold funds to each asset in our portfolio. This capacity is the result of several calculations that depend upon: 1. The risk and return properties of each asset. 2. How the asset prices vary in comparison to other assets in the portfolio. 3. The amount of funds collected for investment (or the total requests for redemption). Once the capacity is determined, we check how much of that capacity is utilized. This gives us an idea of how much money we can put into each individual asset when we invest money across our assets. Likewise, it also tells us how much to pull out of each asset if a withdrawal is needed. Next, we distribute funds across the assets, or redeem funds from the assets, in a circular manner, or round robin fashion, till the full capacity of each asset is reached. As the capacity on one asset reaches its full limit, the funds start trickling down to ©2021 Ravi Kashyap. All Rights Reserved. 17 8 BRINGING RISK PARITY TO THE DEFI PARTY the next asset, similar to a waterfall. The reverse happens when redemptions are to be fulfilled. Hence the name, “Cascading Waterfall Round Robin Mechanism”. After the trade execution schedule is decided, we must consider the transaction costs of completing the trade orders. There are two main implicit costs at this stage. First, there are gas fees for each transaction we execute. Second, there is slippage or market impact. The gas fees depend on a number of factors, such as the time of execution and the network on which a trade happens (Zarir, et. al. 2021; Donmez & Karaivanov 2022). The slippage depends on the size of our trades relative to the sources of liquidity (Kashyap 2020). Here is a quick summary: 1. The larger the number of trades, the greater the total gas costs. 2. The larger the trade sizes, the greater the slippage. 3. The smaller the trading volume (or liquidity) at the exchange, the greater the slippage. The quintessential trading conundrum in traditional finance is timing (when to enter a trade) and trade size. The problem is compounded in crypto since we must factor in the gas fees, which are constantly variable based on network congestion and type of blockchain. We will discuss market timing in a later article as it’s a topic particularly insightful to future front-runners but generally our portfolio will rebalance daily. The trade size is then determined by the dual objectives of minimizing both gas fees and slippage. We perform asset level calculations which are coupled with our “Cascading Waterfall Round Robin Mechanism” to arrive at recommended minimum and maximum trade sizes. Basically, the algorithm described in Kashyap (2021-II) will generate (recommends) a set of min-max values for each trade. These trade size recommendations ensure that the fund managers adhere to the security guidelines, when funds need to be moved into and out of assets from our secure safehouse. The first section has a detailed discussion of the security plan (Section 8.2). The goal of strengthening security is achieved without creating bottlenecks for trading since fund movements correspond to trade size restrictions. The calculation of asset capacities and the rebalancing methodology are among the most central elements of any investment process. It is no different in our case. If anything, it is more important for blockchain projects given the need to adhere to strict risk metrics and having to incorporate several new techniques geared towards overcoming the additional challenges in the decentralized space. These two components, asset capacities and the rebalancing methodology, can be invoked and utilized on an on-demand basis in the initial stages. The next set of enhancements are to be able to connect them to data updates, and completely automate them, so that these calculations can run on a daily basis or even several times during a 24-hour period. To govern a system with many moving parts, such as blockchain wealth management, several parameters must be monitored and tweaked on a regular basis. The portfolio management team will have to observe ©2021 Ravi Kashyap. All Rights Reserved. 18 8 BRINGING RISK PARITY TO THE DEFI PARTY these parameters continuously and update them, as necessary, using specialized internal tools. The bulk of the configurations that decide how the system will run are related to asset capacities and trade executions. In addition, trade executions can be error prone wherein failures need to be monitored and intelligent cus- tomizations to retry need to be incorporated into the process. Hence trade execution related parameters and operational procedures will garner significant focus and a big chunk of time from the investment team. The internal tools, to run this operation, are designed such that the flow of funds happens automatically, for the most part, with human intervention to complement the decision making. Significant automation of our investment apparatus will allow us to take advantage of market opportunities seamlessly and human oversight will enable us to watch out for exceptional situations and fine-tune the decisions. This coupling of “Man-and-Machine” will lead to a better final outcome for all our participants. An illustration of this pairing is that our approach to investing will benefit from volatility, which is seen as the bane of crypto markets by most players. Volatility, which is the up and down movement of asset prices, will cause our rebalancing algorithm to buy assets that drop in prices and sell assets as they start soaring again. But to filter out the noise, and react only to real signals, the buying and selling happens only when certain boundaries or range thresholds are crossed. This spectrum over which transactions happen are automatically calculated based on asset properties, but fine tuned by investment specialists. Suffice it to say, while mathematical optimization techniques offer powerful venues to garner profits, they might fall short of conquering the extreme scenarios that markets present. Hence mixing mathematical models with human intuition, that takes care of exceptional cases, is the ideal recipe for wealth creation. In the next section (8.4), the third one, we will go into greater detail regarding the use of risk and return characteristics to arrive at the capacity for each asset. 8.4 VVV Weight Calculations: Prepared for the Downside and Primed for the Upside •Two of the most essential ingredients in determining weights are volatilities and variances (also covari- ances) of assets. •In the “Velocity of Volatility and Variance” (or VVV) crash protection mechanism, we adjust the volatilities and the variances (including covariances) of assets depending on how fast they are likely to change during market crashes. •Using VVV weights, portfolios can outperform, in terms of returns, typical portfolios using more con- ventional weighing mechanisms by almost 80% with a considerably higher sharpe ratio (e.g. VVV: 1.91 vs OTHERS: 1.44; Sharpe 1994). We achieve this by taking slightly higher risk and based on our belief that volatility is a small price to pay for the convenience of trading anything from anywhere and ©2021 Ravi Kashyap. All Rights Reserved. 19 8 BRINGING RISK PARITY TO THE DEFI PARTY anytime, as long as we are sufficiently equipped to deal with downward movements. Thisthirdsection, ofsevenplannedonesinthisseries, willprovideasummaryofourassetweightcalculations. Our novel portfolio weighting technique considers certain stylized facts about the financial markets. We have then tweaked the weight computations to factor in the nuances of the crypto markets. Researchers have observed and documented, over several decades, a few stylized facts about traditional financial markets. The propensity for markets to suddenly crash is much higher than the probability of an upward movement of similar magnitude (Hong & Stein 2003; Veldkamp 2005; Bates 2012). When markets crash the prices of most assets move in tandem or they fall together (Ang & Bekaert 2004; Hartmann, Straetmans & Vries 2004). That is, during market crashes assets tend to have higher correlations. This correlated movement of prices is due to the extensive linkages that have developed between financial markets over the years (Dungey & Martin 2007). Volatilities tend to be higher during market crashes. We need to take note of this point about asset prices moving a lot more, and tending to become more volatile when markets crash, as we build a weight calculation engine. Asset weight calculations are generally driven by many inputs, but the most essential ingredients are volatilities and variances (also covariances) of assets. We adjust the volatilities and the variances (including covariances) of assets depending on how fast they are likely to change during market crashes. Hence, we term this methodology the “Velocity of Volatility and Variance” (or VVV) crash protection mechanism. Our approach is ideally suited for crypto assets which, even during normal times, are very volatile and are also heavily correlated (Klein, Thu & Walther 2018). Hence, we can expect much higher volatilities and correlations in the crypto investment landscape during a downturn. Our protection scheme is tailor- made for beating benchmarks when markets head downward. As we will demonstrate, our methodology also performs better than other weighting schemes over an entire bull-and-bear market cycle with no significant underperformance during upward market trends. Returns are obtained as a direct result of bearing risk. Hence, an approach that allocates equal risk across all assets will yield a more robust weighting scheme. This approach is also known as the risk parity approach. Here, the weights allocated to an asset are proportional to their corresponding risk (as opposed to their expected return) relative to that of the overall portfolio. And, this weighting mechanism is statistically measured using volatility and also accounts for correlations between assets in a portfolio. Implementing risk parity techniques for defi cryptoassets will require paying special attention to the nuances of how these markets operate. Crypto markets are more volatile and highly correlated as seen in Tables (3; 2) shown in Section (8.4.1) below, compared to traditional finance. A weighting technique designed to outperform most benchmarks during a market crash while generating solid returns under other market conditions should be the recommended approach. And, VVV is our recommended approach. ©2021 Ravi Kashyap. All Rights Reserved. 20 8 BRINGING RISK PARITY TO THE DEFI PARTY The asset weights are the primary constituents required to calculate asset capacities, which determine how our rebalancing methodology would work. Section (8.3) has a discussion regarding our rebalancing methodology. TheVVVWeightcalculationalgorithmswereamongtheearliest,ifnottheearliest,components that we had worked on and tested using historical data. A simple way to use the weight calculation engine would be to invoke, calculate and utilize the weights on an on-demand basis. The next set of enhancements can be able to connect it to data updates, and completely automate them, so that these calculations can run on a daily basis or even several times during a 24-hour period. The VVV weighting methodology factors in several empirical observations about financial markets and tailors them to the more volatile and correlated defi environment. This approach does well under a wide vari- ety of market conditions and is custom built to outperform benchmarks during market downturns. Building portfolios in this manner epitomizes our belief that upward movements will take care of themselves, but it is the downward movements that require the most preparation. As we have discussed in (Kashyap 2021-III), volatility is caused by the actions of traders. It is inevitable when a huge number of traders, with different perceptions of value, transfer large sums of money. Volatility is a small price to pay for the convenience of trading anything from anywhere and anytime, as long as we are sufficiently equipped to deal with downward movements. VVV is the protection mechanism sorely needed for the DeFi space. 8.4.1 Tables and Explanations Each of the tables in this section are referenced in the main body of the article. Below, we provide supple- mentary descriptions for each table. The full data sample consists of daily observations over the previous 365 days going back from October 31, 2021. The portfolio based on VVV significantly outperforms the portfolios using MVO (mean variance optimization) and MVO without shorts by 74-81%. Yes, VVV Portfolio takes more risk (by 34-36%). However, for the unit of risk assumed, the portfolio based on VVV will generate a much higher return - as demonstrated by the higher Sharpe Ratio. This is one trade-off worth the risk. In the Table in Figure (3): Each cell represents the correlation between the asset returns in the corre- sponding row and column over the historical period. In the Table in Figure (3): The first column represents the name of the asset under consideration. The next six columns represent the following information respectively: •Volatility (annualized) of the assets calculated on a 90 day moving internal; •vvvFactor calculated on a 90-day moving interval (i.e. volatility of volatility); •VVV-Adj-Volatility , which is the sum of annualized Volatility and vvvFactor; •vvvWeight calculated using VVV-Adj-Volatility; ©2021 Ravi Kashyap. All Rights Reserved. 21 8 BRINGING RISK PARITY TO THE DEFI PARTY •mvoWeight calculated using mean variance optimization (MVO) by Markowitz; •noShortWeight calculated using MVO with no shorts (or no negative weight). The last three rows show the portfolio expected return calculated based on the annualized average return over the data set horizon; the portfolio volatility; the sharpe ratio given by the portfolio expected return minus benchmark rate of 10% divided by the portfolio volatility. Figure 2: Correlation Matrix ©2021 Ravi Kashyap. All Rights Reserved. 22 8 BRINGING RISK PARITY TO THE DEFI PARTY Figure 3: VVV Weights Comparison to MVO Weights 8.5 The Risk Parity Line: Moving from the Efficient Frontier to the Final Fron- tier of Investments •Each of the sub-funds (Alpha, Beta and Gamma, ABG) we discussed in Section (7.2) can be designed to provide risk parity because the weight of each asset in the corresponding portfolio can be set to be inversely proportional to the risk derived from investing in that asset. This can be equivalently stated as equal risk contributions from each asset towards the overall portfolio risk. •Investors can select their desired level of risk or return and allocate their wealth accordingly among the sub funds (ABG), which balance one another under different market conditions. This evolution of the risk parity principle, resulting in a mechanism that is geared to do well under all market cycles, brings more robust performance and can be termed as conceptual parity. •The inclusion of newer and more diversified assets into the portfolios, as the crypto landscape expands, can be viewed as a natural progression from the conventional efficient frontier to a progressive final frontier of investing, which will continue to transcend itself. Risk Parity is the holy grail that we originally set out to bring to the decentralized investment world. To obtain parity, the amount of money allocated to the individual assets in a portfolio has to be proportional ©2021 Ravi Kashyap. All Rights Reserved. 23 8 BRINGING RISK PARITY TO THE DEFI PARTY to the extent of risk encountered from investing in that specific asset. As the risk characteristics of an asset fluctuate, the weight assigned to that asset has to be correspondingly modified. AsubtleaspectofourportfolioconstructionandVVVweightcalculationmethodology(Section8.4)isthat parity is already accomplished in each of the individual funds Alpha, Beta and Gamma. These investment products, (Alpha, Beta, Gamma and Parity) will provide risk managed access to several crypto assets and strategies. We have adapted many of the well known safety mechanisms and investor protection schemes that have evolved for several decades in traditional finance, and combined them with many innovations that are unique to crypto markets (Section 8.6). Having mentioned that each of the sub funds already achieves risk parity, we need to draw a distinction between mathematical parity and conceptual parity. The assets weights are calculated based on precise rules and mathematical operations and this brings parity to each of the sub funds at the asset level. While this is still a huge innovation to bring to the blockchain environment, we wish to proceed further and bring parity also on a conceptual level. To elaborate further, we create portfolios that perform satisfactorily where mathematics can fall short of completely combating market uncertainty. Broad categories of assets have slightly different risk and return attributes. By grouping assets with similar responses to different market regimes, we can ensure that the various groups counterbalance one another under diverse market conditions. Hence, in addition to mathematical parity, within each sub fund, each sub fund has an overall risk return feature which is preferable to the other sub funds under a particular market criterion. Another motivation for creating these groups is because even if assets at the individual level deviate from their risk and expected return properties, such a misalignment is less likely at the group level. A few assets in a bunch might display atypical behavior, but the majority of them will be closer to their representative qualities. The result is that the overall group can be expected to behave in a certain way and offset other groups, which are constructed based on the same principle of clubbing together similar assets, that have different attributes. We term this fluctuating pseudo-equilibrium between groups of assets conceptual parity. A remarkable idea from the financial markets is that of the efficient frontier (Elton, Gruber & Padberg 1978; Broadie 1993; Bodnar & Schmid 2009). There are many ways to combine assets to create portfolios. Among all the possible combinations the set of combinations that are superior to the rest, in terms of risk and expected returns, form the efficient frontier. Despite the efficient frontier being an intriguing idea, there are many practical limitations to accomplish this. To ensure that we are not constrained by the many reservations, our innovation has been to come up with the idea of conceptual parity tailored for the crypto environment (Kashyap 2021-IV). With this modification, Alpha will be a sub-fund composed of assets that provide higher returns and take on higher risks. Beta will be representative of the larger market behavior and provide more steady returns with a ©2021 Ravi Kashyap. All Rights Reserved. 24 8 BRINGING RISK PARITY TO THE DEFI PARTY correspondingly lower level of risks. Gamma will take on the role of acting as the risk free rate, with decent returns but with very little to no risk. Gamma will also be filled with assets that demonstrate negative correlation to Alpha and Beta assets. The implication of constructing the sub-funds (Alpha, Beta and Gamma) in this way ensures that when the overall market under performs, which means Alpha and Beta will not deliver very high returns, Gamma will still continue to provide acceptable returns because of its negative correlation to Alpha and Beta. The manufacturing, and linking, of Alpha, Beta and Gamma will then produce the most efficient set of portfolios in terms of risk and return characteristics. We term this collection of portfolios, the parity line. We believe that the efficient frontier is a moving target, even in the traditional financial world, with assets being added or removed, their risk-return properties undergoing alterations and even entire markets getting transformed. This is all the more the case with the rapidly evolving crypto landscape, where many new protocols and projects are appearing on the scene. Investment funds will need to add several blockchain protocols, as they become available, transforming themselves into highly diversified cross chain collectors of wealth appreciation venues. The plans to add more protocols will be discussed in the last and seventh section of this series (8.8). Clearly, there will be a need to continuously evaluate new projects, and if they pass certain due diligence standards, to include them in the portfolios. Adding exposure to derivative instruments and physical assets such as gold, real estate, and so on, as and when they become available. would be prudent as well The implication of this is that investors will be getting better returns and lower risks, as we seek out varied sources of risk adjusted returns. The user experience has to be designed such that investors can tailor their wealth allocations to their preferred risk appetites. Users can select either their preferred level of risk or return. Investors can also directly decide how much of their wealth they want to allocate to the three funds: Alpha, Beta and Gamma. Once either of the three routes are selected, (Risk or Return or Weights of Alpha, Beta and Gamma), the other parameters can be automatically calculated and saved into an NFT, which the investor will hold for the life of the investment. The preferences can be changed anytime by investors and this will trigger a readjustment of their sub fund allocations. Investment specialists have to also monitor the markets and, as the relationship between risk and return changes, fine tune the parameters of the parity line and update the parameters of the portfolio allocations. This will guarantee that all investors are getting the best possible outcomes customized for their desired wealth management objectives. The challenge will be to ensure that the user interactions are intuitive, and yet their preferences are precisely captured in the investment decisions. This can be accomplished by letting someone who does not wish to be bothered with all the settings, or a novice investor, have the simple option of choosing the default, depositing his funds and forgetting about everything else. If this is the option chosen, the portfolio can select ©2021 Ravi Kashyap. All Rights Reserved. 25 8 BRINGING RISK PARITY TO THE DEFI PARTY a low level of risk and calculate the other parameters accordingly. Advanced users can choose their risk level or their expected return, or the weights they want to assign to each of the sub funds. The other parameters will be automatically calculated. The outcome of these innovations is an investment machinery that responds to investor preferences and adapts to changing market conditions. In addition, these vehicles will adhere to the core tenets of decentral- ization and be accessible by anyone. The next, and fifth, section (8.6) will discuss plans to share a significant portion of the profits generated with the community. All of this can be viewed as a natural progression from the conventional efficient frontier to a progressive final frontier, which will continue to transcend itself. 8.6 Sharing is Caring: Setting Aside Profits for The Crypto Community •A significant portfion of the trading profit will be earmarked for distribution to the investors who hold project tokens along with investments in either of the funds: Parity, Alpha, Beta or Gamma. •“Trickle effect” mechanism ensures that the rewards will be paid out slowly while the amount of the profits designated as performance fees and the fraction of the fees that will be earmarked for the community will be varied at different stages of the growth cycle of the project. •Each of the four funds (Parity, Alpha, Beta, and Gamma) will operate as individual profit and loss (P&L) centers. Investors in Parity will get their share of the profits which are derived from how their investment will be split into Alpha, Beta and Gamma. It is essential to stay close to the spirit of decentralization by setting aside a significant portion (up to 50%, perhaps) of the trading profits generated to be paid out to long term investors. This is absolutely unheard of in the hallowed halls of high finance and a definitive differentiator in the decentralized community as well. The cutting edge designs we have outlined thus far, tailored to overcome the challenges in the crypto environment, are geared to accumulate wealth through all cycles in the market. As the investments funds grow, just like any organization, they will collect fees and generate revenues to offset the costs. We see two clear claimants to the earnings produced: the loyal investors and the talented team. The investors are those who hold the project tokens and also those who will put capital into Parity, Alpha, Beta and Gamma funds. Without investors providing capital there is little that could be accomplished and they need to be rewarded accordingly. Also, the highly skilled individuals in the project build the vehicles to channel the funds received into pools that continue to expand. Their efforts are the key to increase the capital received and due appreciation needs to be shown. Also, a portion of the proceeds has to be used to develop the organization and recruit the brightest minds so that it can continue to do the best towards creating the preeminent wealth management platform for the masses. ©2021 Ravi Kashyap. All Rights Reserved. 26 8 BRINGING RISK PARITY TO THE DEFI PARTY An extremely popular investor protection mechanism in the traditional finance world is the idea of per- formance fees and a high water mark (Goetzmann, et al. 2003; Guasoni & Obłój 2016; Kashyap 2021-XI). The simple summary of this concept is that performance fees are charged only when investors are entitled to a profit off their original principal. This is perhaps best clarified with a simple numerical illustration. For example, let us say an investor deposits 10,000 USD. After some time, the invested amount grows to 14,000 USD, at which a high water mark is established. The profit in this case is 4,000 USD. A part of this profit is taken as performance fees. After this, if the value of the investment goes down to say 12,000 no performance fees are charged until the value of investment climbs back above 14,000, the high water mark. The bottomline is that unless a tangible wealth increase is generated for every investor, at a holistic level, no performance fees are paid. This creates a strong incentive for the team to produce solid returns for the investors. This simple scenario can get extremely complicated when there are multiple investors who deposit at different levels of the fund price. Tracking all this in a smart contract, with the current state of blockchain technology, is extremely hard and can be deemed almost impossible (Wang, et. al. 2018; Zou, et. al. 2019; Zheng, et. al. 2020). Tobeabletoaccommodatethesecomplexitieswehavefoundanovelsolutionthatworks elegantly, is rather straightforward to implement as a smart contract, provides the same level of protection to every single investor and is mathematically identical, in terms of fees and proceeds, to what investment funds in the traditional world have been doing for decades. Kashyap (2021-V) has a detailed discussion of this topic including the corresponding mathematical formulae. The point worthy of highlighting is that the performance fees, earmarked for community distribution, will be directed to a separate bucket, and kept aside, to be paid out regularly to loyal investors. Loyalty here will be measured in terms of the length of time someone holds project tokens along with either Parity, Alpha, Beta or Gamma. If someone has to claim the full share of their reward, they need to stake project tokens and either Parity, Alpha, Beta or Gamma tokens and keep it staked to gather rewards. Staking here means deposting tokens into a smart contract. The amount of project tokens and other fund tokens to be staked to claim the full rewards will be dependent on a ratio, such as 1:1 or 2:3 and so on. This is a parameter that can be changed depending on external factors such as the price of project token, the total investments made, the amount of profits being generated and so on. To ensure greater equitability for all investors, who might invest a large sum into say Parity, if they hold a certain minimum amount of project tokens they need not adhere to this ratio of project tokens to other tokens to claim the full share of their profits. The fundamental criteria is that everyone needs to hold project tokens, in addition to any other investments they make and they need to continue holding project tokens, to be eligible to earn their rewards. Another innovation we have designed, to ensure that investors are motivated to continue to hold project ©2021 Ravi Kashyap. All Rights Reserved. 27 8 BRINGING RISK PARITY TO THE DEFI PARTY tokens can be termed the “Trickle effect”. This mechanism will not pay out the bulk of the profits as and when they are generated, but the rewards will be paid out slowly. For example, if the profits we have put into the community pot today is 100,000 USD. All of this will not be given away on the same day. Rather, a certain percentage will be paid out today, and a percentage of what remains will be given out the next day. Let us say, this payout percentage is 50%. Then the first day, USD 50,000 will be distributed to investors as rewards. If no additional profits are generated the next day, 50% of what is left will be distributed. So investors will get 25,000 on the second day and so on. If additional profits are added to the pool only a percentage of the total accumulated amount that can be shared will be paid out immediately and the rest will be retained for subsequent payouts. The result is that there is a strong incentive to continue to invest in the funds and hold the project token to be eligible to claim the full stream of profits. In addition to the above primary utility of the project token, which enables one to have substantial participation in our upside, there are two additional reasons for someone to buy and keep the project token. Holding the project token gives someone the right to participate in the governance process when the protocol starts to operate as a DAO, Decentralized Autonomous Organization (End-note 11). Also, project tokens owners could be given access to hot, and upcoming projects with significant upside potential. This would like having a sub-fund which invests in special projects and accept investments only from project token owners. Hence the project token will be a triple utility token. Theamountoftheprofitsdesignatedasperformancefeesandthefractionofthefeesthatwillbeearmarked for the community can be varied at different stages of the growth cycle. When significant profits are being generated, the possibility of using those proceeds to burn (retire) some of the project tokens (from the circulation) will be pursued so that it might act as a deflationary mechanism and prop up the token price. When the platform starts to function as a DAO, some of these governance parameters will be subject to community input. The bulk of the revenue generated will be from performance fees. Setting aside, a big chunk of this for the community might seem excessive. To toe the fine line between growth (investment for future) and decentralization (distribution of profit to the community for now), during the initial stages of the lifecycle before transforming into a DAO, the parameters can be skewed towards favoring growth. And even at a later stage, there can be a threshold in the distribution bucket, so that profits only in excess of that level will be handed out using the trickle effect. This threshold can be varied depending on the magnitude of profits, the stage of growth and future plans, risk provisions to accommodate unforeseen emergency funding requirements, and to ensure that both investors and employees are compensated fairly for their contributions. Since Parity is a combination of Alpha, Beta and Gamma. Investors in Parity will get their share of the profits which are derived from how their investment will be split into Alpha, Beta and Gamma. Each of the four funds will continue to operate as individual profit and loss (P&L) centers. Since claiming profits requires ©2021 Ravi Kashyap. All Rights Reserved. 28 8 BRINGING RISK PARITY TO THE DEFI PARTY holding both project tokens and one of the other tokens, the total rewards will match and exceed the rewards from holding project tokens alone. In the initial phases when very little profits are being generated investors can deposit project tokens in a single sided staking pool, which can eventually be phased out entirely and replaced by the enhanced profit sharing plan discussed above. This profit sharing mechanism, and related innovations, will ensure that we are creating a strong economic incentive for investing in and holding fund tokens (Alpha, Beta, Gamma, and Parity), and especially the project governance token. The other unintended, yet perhaps welcome consequence, will be that such an approach might become the trendsetter clearing the path for other enterprises to be able to share their proceeds with all their stakeholders, which is the true hallmark of decentralization. 8.7 Raising the Bar for Portfolio Performance Measurement: The Concentra- tion Risk Indicator •CRI (the concentration risk indicator), modified and adapted from the Herfindahl-Hirschman (HH) index, is a novel risk measurement measure we have developed. Supplementing the CRI with other metrics allows us to gauge how portfolios are performing and to compare them to the wider set of crypto investment opportunities. •Asset selection guidelines, due diligence process, risk management oversight and the VVV weighting methodology (Section 8.4) take care of monitoring the many other factors that dictate whether an asset makes a good investment. •Continuous innovation, inspired by how world class athletes deal with new record settings, is the hallmark of any outstanding investment management approach. Bringing Risk Parity to the DeFi Party has been the impetus for numerous innovations and designs de- scribed here. Once these novel techniques, are implemented in the blockchain environment, it will create an unparalleled platform for wealth generation accessible by anyone. In this sixth section, we will discuss a new metric we have developed, termed the concentration risk indicator (CRI), that will allow us to gauge how portfolios are performing and compare them to the wider set of crypto investment opportunities. This metric is focused on the current facet of the decentralized terrain, wherein the majority of the wealth is restricted to a small number of tokens. Our new measure, when supplemented with other well known portfolio measurement yardsticks, will give a complete picture of how well any investment machinery is working. The crypto landscape has many individuals who invested early in projects such as Bitcoin and Ethereum, when they were up and coming prospects. These holdings have grown significantly to become fairly large positions. From a portfolio perspective, their wealth is heavily concentrated in a few names. This is also the ©2021 Ravi Kashyap. All Rights Reserved. 29 8 BRINGING RISK PARITY TO THE DEFI PARTY very nature of the crypto markets, where bitcoin and ethereum command more than 60% of the total market capitalization. The number of tokens listed now on major data providers, such as coinmarketcap, is around 19,500+ as of May-25-2022 (End-note 13). This figure has more than doubled within the last one year. With a trend where several tokens appear, and an equal or greater number disappear, choosing the right investments is an arduous task. Proper due diligence and research procedures need to be utilized for forming portfolios. Having the right selection methodology is crucial and, once a selection is made, evaluating the corre- sponding performance is equally important. To address drawbacks with prevailing methodologies, and to supplement existing methods, we had to come up with the CRI. The concentration risk indicator is meant to indicate how diversified the holdings in a portfolio are. This is a modification of the Herfindahl–Hirschman (HH) index, (Rhoades 1993; End-note 12), which is widely used as a measure of the size of firms in relation to the industry they are in and an indicator of the amount of competition among them. We tailor the HH-Index to the crypto markets based on the following two features: 1) the larger the market cap of an asset, the lesser the risk of holding it; 2) the more volatile an asset, the higher the risk of holding it. The amount of money invested in an asset as a fraction of the overall wealth held by an investor, which is also the weight of the asset within the portfolio, is also factored in this metric. The concentration risk indicator can be calculated for individual assets and for portfolios of assets as well. When comparing two investments, the lower the concentration risk, the better the investment from a diversification point of view. If two assets have comparable market cap then the asset with lower price volatility would be preferred. Instead of using the raw market cap values, we normalize and express it as a fraction to the total crypto market cap before including this factor in the concentration risk indicator. Similarly, if two assets have comparable levels of volatility, the asset with a greater share of the market would be preferred. As an illustration, given a choice between holding BTC or ETH, if we need to isolate the effect of size on our investment, BTC with its higher market capitalization would seem as a better alternative (End-note 14). Likewise, SOL, XRP and ADA have a similar level of market share and hence their price volatility determines how concentrated an investment in these assets would be. This simplified example is meant only to illustrate the influence of size and volatility. Clearly, ETH has many other features that could potentially qualify it as a more desirable investment than BTC. An argument can also be made that tokens with higher market cap will have lower volatility than the ones with lower market cap (Fama & French 1992; Perez-Quiros & Timmermann 2000; Van Dijk 2011; Fama & French 2018). The first draft of this article originally included LUNA along with SOL, XRP and ADA in the above example. But the events of the past few weeks are a wake up call to all players in the Crypto landscape. Better risk management, stress testing and checking numerous seemingly unlikely scenarios are an absolute ©2021 Ravi Kashyap. All Rights Reserved. 30 8 BRINGING RISK PARITY TO THE DEFI PARTY necessity. The recent LUNA / UST episode on the Terra network, from May 8 to May 13 2022 and beyond, is a demonstration of the risk of holding concentrated portfolios (Uhlig 2022; Lee, et. al. 2022; Briola, et. al. 2023). We have been developing and testing this new CRI metric for several months now. The creation of this measure was to have a numeric score to show people that no concentrated holding is safe even if it is as large as BTC or ETH. Clearly the recent events, surrounding LUNA, have not been easy for many of us. But it affirmsourlongheldbeliefthatnothingcanbetakenforgrantedincrypto, andforthatmatteranywhere, and suitable risk mitigation plans have to be made even for rather extreme scenarios. These beliefs are encoded in the risk management guidelines, espoused in Kashyap (2022), that investment teams have to adhere to. Going beyond just this new metric, a rigorous approach to investing and risk management is what investing on blockchain needs. Risk parity and the whole suite of tools we are describing are exactly the need of the hour. While the CRI metric gives preference for larger and more stable assets, smaller and newer assets will be the drivers of growth. Hence, adding a greater number of smaller assets can compensate for the risk they bring in terms of size. Asset selection guidelines, due diligence processes, proper risk management oversight and our VVV weighting methodology take care of monitoring the many other factors that dictate whether an asset makes a good investment. We are deeply cognizant of the delicate necessity that to keep improving the performance of our portfolios, our tools to assess performance need to keep improving as well. Volatility, returns and other metrics are generally more meaningful when evaluated on a comparative or relative basis. Since Crypto investments are deemed riskier, to perform a proper comparison for risk and return, it will be helpful to try to incorporate benchmarks external to the crypto world. Initially it would be easier to start displaying returns, volatility and the concentration risk indicator, over different time intervals, comparing the main funds we have discussed, Alpha, Beta and Gamma, with several other prominent crypto assets. Parity investments at different risk levels can also be viewed as different crypto funds and similar comparisons can be performed. At a later stage, we can compare the volatility of crypto investment funds to an external benchmark such as the VIX volatility index (End-note 15; Wang 2019). Also returns can be benchmarked against returns from other asset classes outside the crypto landscape. External indices across asset classes such as stocks, bonds, commodities and so on could be useful for this purpose. There are further improvements we are planning to the CRI, so that it will take into account the proportion of assets invested on different chains. Similar to the basic CRI discussed earlier, the enhanced CRI will reflect the diversification benefits of amounts invested across multiple chains (Kashyap 2021-VI). Abigpartofcryptoinvesting, andalsoperhapsmanyotheraspectsofourlives, isdealingwithuncertainty and our struggle to overcome it. Sergey Bubka is our Icon of Uncertainty. As a refresher, he broke the pole ©2021 Ravi Kashyap. All Rights Reserved. 31 8 BRINGING RISK PARITY TO THE DEFI PARTY vault world record 35 times (End-note 6). Pole vault is a simple sport, where you use a long pole to jump over another long pole, which is placed on top of two other long poles. Applying the central idea from pole vault to the crypto landscape, we can view the introduction of any new trading strategy or innovation or even regulatory change as equivalent to the raising of the bar in the game of pole vault. Once a new innovation starts becoming popular others imitate it or come up with other wonderful ideas, and we need to find ways to better ourselves. Each time the bar is raised the spirit of Sergey Bubka, whom we admire a lot and who is a huge inspiration for us, will help us to reach higher and find a way over the raised bar. This anecdote, about Sergey Bubka and overcoming uncertainty, forms our fundamental belief that gal- vanizes us to constantly innovate and find better models, metrics, trading strategies and ways to generate wealth for all investment participants. Figure 4: Sergey Bubka: Icon of Uncertainty 8.8 Multichain Expansion and Select Strategic Initiatives: Building Bridges That Do Not Burn •Selection of assets can be done across networks in such a way that each of the investors will get exposure to the whole suite of assets we have on all chains. Investing on different chains, and hence linking different networks, is a way of providing diversified exposure to the investor base. The fund prices can be the same across all the networks where the investments are deployed. •Use of bridges should be cautious at first and depending on asset flow requirements, and improvements to the corresponding infrastructure, we can readjust the fund transfer limits. •Our all inclusive approach is to recognize the team and community as one group: Our Human Capital. ©2021 Ravi Kashyap. All Rights Reserved. 32 8 BRINGING RISK PARITY TO THE DEFI PARTY Essentially what this means is that we will not differentiate between the team and community but instead view them simply as different subunits or divisions within our organization. In this seventh and the final section of the series, we will touch upon some strategic plans, that projects can consider over the long term horizon, and our motivations for choosing this particular set of initiatives. A key focus that will be highlighted are the efforts and the rationale for rolling out various investment products on different chains. As discussed in Section (4), many protocols with wonderful possibilities are being developed. At this time, ETH, BSC and Polygon are good candidates for an initial launch of the investment funds, including riskparitycomponentsandasafehouse. Lauchingtheproductinphasesispracticalsothatwecanthoroughly test on each platform and resolve any issues related to each blockchain system. These three protocols are good candidates for starting out given the remarkable progress they have made, the stability they bring to this space and the similarity they offer in terms of technological requirements. All three of them are EVM (Ethereum Virtual Machine) compatible, making it relatively straightforward to start using another of these platforms once a product is built for one of these chains (Jia & Yin 2022).That said: ETH with high gas fees, BSC with some vulnerabilities in its choice of validators, Polygon with scalability issues at times represent challenges that are inherent in any technology saga. Numerous small tweaks and entire redesigns of architectural frameworks are being undertaken with these networks and their future looks promising. To elaborate on this further, fund prices will be the same across all the networks on which the investment infrastructure will be deployed. To arrive at a fund price, we will consider two factors: 1) the combined total value locked (total investment funds received) across all networks for that fund, and 2) the number of tokens issued for that fund across all networks. For example, if an investor invests $50,000 USD on only one network, say BSC for example, he / she will be getting exposure to the performance and diversification benefits of all the assets held across all networks in that fund. For an investor to do this by himself would be an extremely arduous task. For any one person to continually monitor such a portfolio spread across networks, and change it based on market conditions, would be almost impossible. Solana, Fantom, Harmony One, Avalanche are some chains, which are showing a lot of promise, and should feature actively in any plans to deploy products and invest in assets on these platforms. Several other platforms could also be on the immediate radar. As and when promising investment opportunities arise on newer chains, it is prudent to be prepared to monetize that. From a network exposure point of view, the entire amount of funds under management will be seen from two perspectives: one is the network portfolio and a global portfolio that aggregates all of the network portfolios. We need to monitor the weights of assets globally and strict risk management limits have to apply to the global portfolio. This global capacity on each asset will be filled by positions on each network depending on how easily funds can flow between networks. The amount of funds we transfer across networks ©2021 Ravi Kashyap. All Rights Reserved. 33 8 BRINGING RISK PARITY TO THE DEFI PARTY via bridges will depend on the capacity of the bridge that spans across networks, the relative gas fees of the networks, the amount of funds we receive, the asset availability, and the exposure we assign to each network. Right now, “Bridges” built between various networks are both a “Bottleneck” and an “Achilles heel”. They limit the amount of funds that can move between networks and they also become an attack vector for hackers to target, resulting in the loss of funds (End-note 16; Belchior, et. al. 2021; Lee, et. al. 2022; Li, Liu & Tan 2022). Hence the use of bridges should be cautious at first and depending on asset flow requirements, and improvements to the corresponding infrastructure, we need to readjust our fund transfer limits. Therewillbedifferentdegreesofcorrelationbetweenpricesacrossdifferentchainsdependingontheextent of inter-connectedness between them. As the fund flow increases across existing chains, it is highly likely that the movements will increase in lock steps. The greater overlap between chains in terms of asset movements will also bring about the risk for a drastic drop in total value invested in on any chain, if that particular network starts to lose trust and get abandoned. Initially, frictions that will impede fund movements will serve the best interest of certain parties. But as competitive pressures erode the frictions, they will later exacerbate certain other risks. Trials with small errors are the key to sustained progress. As product iterations happen we have to continuously assess what we have learned so far and look to make improvements. Huge mistakes such as Terra / Luna, unintended and unwanted as they might be, can be quite costly to the system. It is reassuring to see that efforts are being made towards a recovery and the community of blockchain enthusiasts are not deterred by this setback. This resilience is to be whole heartedly applauded. One of the core reasons why we have written this article is to be prepared for such drastic incidents by incorporating more robust mechanisms. Despite the unfortunate losses for many victims it serves to affirm that better risk management principles, and the other benefits described here, are sorely needed by the blockchain community. Another set of bridges that need to be actively built are strategic partnerships to ensure that the crypto environment can be highly inclusive, and connect investing to several real world platforms, solving many problems that plague humanity along the way. These will be ongoing and some focus on these initiatives will be required once the main products are tested thoroughly and deployed. Moving on to the investing activities and plans for seeking additional returns. As time goes on several overlay strategies can be added, to the basic funds (ABG) we have discussed in Section (7.2), and we can seek to benefit from any potential opportunities that open up (Mulvey, Ural & Zhang 2007). A team of researchers and investment specialists need to continually scour the landscape to identify ways to generate profits. The development of new networks, and derivative providers within networks, will enable us to use options as a hedging mechanism (Hull 2003). This will help to protect from market crashes and can be used to reduce the risk in Gamma. Also, derivative strategies combined with rigorous risk management can help to gain additional returns (Huberts 2004; Madan & Sharaiha 2015). These will be considered for Alpha. ©2021 Ravi Kashyap. All Rights Reserved. 34 8 BRINGING RISK PARITY TO THE DEFI PARTY Further overlays can be based on specific allocations to sectors we see as promising. This would be similar to sector themed sub-indices or ETFs but within a larger grouping of assets (Healy & Lo 2009; Mohanty, Mohanty & Ivanof 2021). These developments can be part of Beta, including allowing investors to customize their preferences in a basket or theme. Initially it will be easier to accept investments made only in stable coins (USDT, USDC and BUSD). We are developing mechanisms through which investors can participate in these investment vehicles by making deposits denominated in a larger set of assets (Kashyap 2021-IX). DAOs (Decentralized Autonomous Organizations: End-note 11; Kashyap 2021-VIII) are seen as the way forward for blockchain systems. Tao or Dao is the natural order of the universe (End-note 17). This intuitive knowing of life cannot be grasped as a concept. Rather, it is known through actual living experience of one’s everyday being. We draw inspiration from the natural order of the universe, as we know it, and try to incorporate these principles into the DAO, as wish to create it. The simple message that we arrive at is this: our engagement with the DAO has to be one of absolute involvement, just like our experience with the universe has to be. A belief that a DAO is not just an organization but a way of life is necessary to ensure that we can make the most of the fascinating capabilities of the decentralized realm. We propose several mechanisms in Kashyap (2021-VIII) by which such an attitude can be developed among all the participants and how technological systems can facilitate that. The topic of the DAO can be a seven hundred part, or more, series of articles. But in this article, we summarize the most essential ingredients for a DAO. The core philosophy we espouse regarding this topic is that we need to have similar principles, and the same group of people in the organization, for all human touch points and to handle the policies for both the Team and the Community. Having such a structure would be a huge first step towards the establishment of a DAO. To the best of our knowledge every organization thus far, both within the crypto terrain and outside, has viewed employees and clients, including external stakeholders, as two separate entities. The all inclusive approach that we recommend is to recognize the team and community as one group, the human capital. Essentially what this means is that we should not differentiate between the team and community but instead view them simply as different subunits or divisions within the organization. The team and community will include all human (and perhaps, even non-humans at a later stage) actors that are participating in some aspect of the DAO. It is important to have similar principles, but not the same ones, for all participants. Though, similar to any other organization, there will be different sets of responsibilities and rewards for different departments within the organization. We need to have different incentives, and guidelines, for the many different duties that members of the human capital perform. Surely, such a unique approach might bring conflicts that are inherent when attempting such a radical change. The objective should be to establish this paradigm as an ©2021 Ravi Kashyap. All Rights Reserved. 35 10 END-NOTES intrinsic part of the culture and revise policies to ensure conflicts are minimized. 9 Crypto or Cash or Crypto will become Cash We have considered the many challenges in blockchain projects and decentralized finance. We have discussed several innovations that will aid DeFi projects in their efforts to become more widely adopted by the general public. The innovations we have described here are covered in greater detail, including mathematical formu- lations and technical implementation pointers in separate articles, in separate articles which are referenced at the appropriate places. As with any technology that holds vast promise, it is hard to accurately pin down exactly how it will shape our lives. That said, money is likely to end up almost entirely in a digital format. How soon will the corresponding developments democratize wealth management is a question that we need to ponder further upon? Blockchain technology is creating a fascinating marketplace where any-one can participate from any-where and at any-time to trade any-instrument to full-fill almost any-desire. Preparation for the unintended and unwelcome outcomes, by coupling rigorous risk mitigation with continuous innovation, will ensure that this technology fulfills the massive potential it holds. The possibilities are endless. 10 End-notes 1. Decentralized finance (often stylized as DeFi) offers financial instruments without relying on intermedi- aries such as brokerages, exchanges, or banks by using smart contracts on a blockchain. Decentralized Finance (DeFi), Wikipedia Link 2. The following are the four main types of blockchain yield enhancement services. We can also consider them as the main types of financial products available in decentralized finance: (a) Single-Sided Staking: This allows users to earn yield by providing liquidity for one type of asset, in contrast to liquidity provisioning on AMMs, which requires a pair of assets. Single Sided Staking, SuacerSwap Link i. Bancorisanexampleofaproviderwhosupportssinglesidedstaking. Bancornativelysupports Single-Sided Liquidity Provision of tokens in a liquidity pool. This is one of the main benefits to liquidity providers that distinguishes Bancor from other DeFi staking protocols. Typical AMM liquidity pools require a liquidity provider to provide two assets. Meaning, if you wish to deposit "TKN1" into a pool, you would be forced to sell 50% of that token and trade it for "TKN2". When providing liquidity, your deposit is composed of both TKN1 and TKN2 in the pool. Bancor Single-Side Staking changes this and enables liquidity providers to: Provide ©2021 Ravi Kashyap. All Rights Reserved. 36 10 END-NOTES only the token they hold (TKN1 from the example above) Collect liquidity providers fees in TKN1. Single Sided Staking, Bancor Link (b) AMM Liquidity Pairs (AMM LP): A constant-function market maker (CFMM) is a market maker with the property that that the amount of any asset held in its inventory is completely described by a well-defined function of the amounts of the other assets in its inventory (Hanson 2007). Constant Function Market Maker, Wikipedia Link This is the most common type of market maker liquidity pool. Other types of market makers are discussed in Mohan (2022). All of them can be grouped under the category Automated Market Makers. Hence the name AMM Liquidity Pairs. A more general discussion of AMMs, without being restricted only to the blockchain environment, is given in (Slamka, Skiera & Spann 2012). (c) LP Token Staking: LP staking is a valuable way to incentivize token holders to provide liquidity. When a token holder provides liquidity as mentioned earlier in Point (2b) they receive LP tokens. LP staking allows the liquidity providers to stake their LP tokens and receive project tokens tokens as rewards. This mitigates the risk of impermanent loss and compensates for the loss. Liquidity Provider Staking, DeFactor Link i. Note that this is also a type of single sided staking discussed in Point (2a). The key point to remember is that the LP Tokens can be considered as receipts for the crypto assets deposits in an AMM LP Point (2b). These LP Token receipts can be further staked to generate additional yield. (d) Lending: Crypto lending is the process of depositing cryptocurrency that is lent out to borrowers in return for regular interest payments. Payments are typically made in the form of the cryp- tocurrency that is deposited and can be compounded on a daily, weekly, or monthly basis. Crypto Lending, Investopedia Link; DeFi Lending, DeFiPrime Link; Top Lending Coins by Market Cap- italization, Crypto.com Link. i. Crypto lending is very common on decentralized finance projects and also in centralized ex- changes. Centralized cryptocurrency exchanges are online platforms used to buy and sell cryptocurrencies. They are the most common means that investors use to buy and sell cryp- tocurrency holdings. Centralized Cryptocurrency Exchanges, Investopedia Link ii. Lending is a very active area of research both on blockchain and off chain (traditional finance) as well (Cai 2018; Zeng et al., 2019; Bartoletti, Chiang & Lafuente 2021; Gonzalez 2020; Hassija et al., 2020; Patel et al. , 2020). 3. United States Department of Treasury provides daily interest statistics for the past several decades: US Department of Treasury, Interest Rate Satistics. ©2021 Ravi Kashyap. All Rights Reserved. 37 10 END-NOTES 4. Money Machines will get turned off, as soon as people step in to take advantage of it. This is also know as arbitrage (Shleifer & Vishny 1997) and it is possible when the law of one price is violated (Isard 1977; Crouhy-Veyrac, Crouhy & Melitz 1982). 5. In computability theory, a system of data-manipulation rules (such as a computer’s instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any Turing machine. Turing Completeness, Wikipedia Link A Turing machine is a mathematical model of computation describing an abstract machine that ma- nipulates symbols on a strip of tape according to a table of rules. Despite the model’s simplicity, it is capable of implementing any computer algorithm. Turing Machine, Wikipedia Link 6. Any attempt at regulatory change is best exemplified by the story of Sergey Bubka, the Russian pole vault jumper, who broke the world record 35 times. Attempts at regulatory change can be compared to taking the bar higher. Similarly, when faced with obstacles, or constraints or problems, the spirit of Sergey Bubka within all of us will find a way to surmount those challenges and sail over them. •Sergey Nazarovich Bubka (born 4 December 1963) is a Ukrainian former pole vaulter. He rep- resented the Soviet Union until its dissolution in 1991. Sergey has also beaten his own record 14 times. He was the first pole vaulter to clear 6.0 metres and 6.10 metres. Bubka was twice named Athlete of the Year by Track & Field News and in 2012 was one of 24 athletes inducted as inaugural members of the International Association of Athletics Federations Hall of Fame. Sergey Bubka, Wikipedia Link 7. A Stablecoin is a type of cryptocurrency where the value of the digital asset is supposed to be pegged to a reference asset, which is either fiat money, exchange-traded commodities (such as precious metals or industrial metals), or another cryptocurrency. Stable Coin, Wikipedia Link 8. Lending rates on Stable coins have fallen down from around 12% in 2021 to less than 3% in 2022 after the crash of LUNA and FTX (Uhlig 2022; Fu, Wang, Yu & Chen 2022). The stable coin lending rates mentioned here are from Aave, a DeFi protocol on the Ethereum network (Ao, Horvath & Zhang 2022). 9. The know your customer or know your client (KYC) guidelines in financial services require that profes- sionals make an effort to verify the identity, suitability, and risks involved with maintaining a business relationship. Know Your Customer, Wikipedia Link; Know Your Client, Investopedia Link ©2021 Ravi Kashyap. All Rights Reserved. 38 10 END-NOTES 10. To be, or not to be" is the opening phrase of a soliloquy given by Prince Hamlet in the so-called "nunnery scene" of William Shakespeare’s play Hamlet, Act 3, Scene 1. (William Shakespeare: William Shakespeare, Wikipedia Link) To be, or not to be, that is the question: Whether ’tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take Arms against a Sea of troubles, And by opposing end them: to die, to sleep ... 11. A decentralized autonomous organization (DAO) is an organization constructed by rules encoded as a computer program that is often transparent, controlled by the organization’s members and not influ- enced by a central government. Decentralized Autonomous Organization, Wikipedia Link 12. The Herfindahl index (also known as Herfindahl–Hirschman Index, HHI, or sometimes HHI-score) is a measure of the size of firms in relation to the industry they are in and is an indicator of the amount of competition among them. Herfindahl–Hirschman Index, Wikipedia Link 13. CoinMarketCap is a leading price-tracking website for cryptoassets in the cryptocurrency space. Its mission is to make crypto discoverable and efficient globally by empowering retail users with unbiased, high quality and accurate information for drawing their own informed conclusions. It was founded in May 2013 by Brandon Chez. CoinMarketCap, Website Link 14. A ranking of cryptocurrencies, including symbols for the various tokens, by market capitalization is available on the CoinMarketCap website. We are using the data as of May-25-2022, when the first version of this article was written. CoinMarketCap Cryptocurrency Ranking, Website Link 15. Chicago Board Options Exchange (CBOE) Global Markets revolutionized investing with the creation of the CBOE Volatility Index ®(VIX®Index), the first benchmark index to measure the market’s expectation of future volatility. The VIX Index is based on options of the S&P 500 ®Index, considered the leading indicator of the broad U.S. stock market. The VIX Index is recognized as the world’s premier gauge of U.S. equity market volatility. Chicago Board Options Exchange, VIX Link; Chicago Board Options Exchange VIX, Wikipedia Link 16. Blockchain bridges work just like the bridges we know in the physical world. Just as a physical bridge connects two physical locations, a blockchain bridge connects two blockchain ecosystems. Bridges facil- itate communication between blockchains through the transfer of information and assets. Blockchain Bridges, Ethereum.Org Website Link ©2021 Ravi Kashyap. All Rights Reserved. 39 11 REFERENCES 17. Tao or Dao is the natural order of the universe whose character one’s intuition must discern to realize the potential for individual wisdom. Tao, Wikipedia Link 11 References •Aigner, A. A., & Dhaliwal, G. (2021). Uniswap: Impermanent loss and risk profile of a liquidity provider. arXiv preprint arXiv:2106.14404. •Ang, A., & Bekaert, G. (2004). How regimes affect asset allocation. Financial Analysts Journal, 60(2), 86-99. •Angeris, G., Kao, H. T., Chiang, R., Noyes, C., & Chitra, T. (2019). An analysis of Uniswap markets. arXiv preprint arXiv:1911.03380. •Ante, L., Fiedler, I., & Strehle, E. (2021). The influence of stablecoin issuances on cryptocurrency markets. Finance Research Letters, 41, 101867. •Ao, Z., Horvath, G., & Zhang, L. (2022). Are decentralized finance really decentralized? A social network analysis of the Aave protocol on the Ethereum blockchain. arXiv preprint arXiv:2206.08401. •Asness, C. S., Frazzini, A., & Pedersen, L. H. (2012). Leverage aversion and risk parity. Financial Analysts Journal, 68(1), 47-59. •Auer, R., Frost, J., Gambacorta, L., Monnet, C., Rice, T., & Shin, H. S. (2021). Central bank digital currencies: motives, economic implications and the research frontier. Annual Review of Economics, forthcoming. •Agur, I., Ari, A., & Dell’Ariccia, G. (2022). Designing central bank digital currencies. Journal of Monetary Economics, 125, 62-79. •Baker, A., & Murphy, R. (2020). Modern monetary theory and the changing role of tax in society. Social Policy and Society, 19(3), 454-469. •Barrdear, J., & Kumhof, M. (2021). The macroeconomics of central bank digital currencies. Journal of Economic Dynamics and Control, 104148. •Bartoletti, M., Chiang, J. H. Y., & Lafuente, A. L. (2021). SoK: lending pools in decentralized finance. In Financial Cryptography and Data Security. FC 2021 International Workshops: CoDecFin, DeFi, VOTING, and WTSC, Virtual Event, March 5, 2021, Revised Selected Papers 25 (pp. 553-578). Springer Berlin Heidelberg. ©2021 Ravi Kashyap. All Rights Reserved. 40 11 REFERENCES •Bates, D. S. (2012). US stock market crash risk, 1926–2010. Journal of Financial Economics, 105(2), 229-259. •Belchior, R., Vasconcelos, A., Guerreiro, S., & Correia, M. (2021). A survey on blockchain interoper- ability: Past, present, and future trends. ACM Computing Surveys (CSUR), 54(8), 1-41. •Bianchi, D. (2020). Cryptocurrencies as an asset class? An empirical assessment. The Journal of Alternative Investments, 23(2), 162-179. •Bianchi, D., & Babiak, M. (2022). On the performance of cryptocurrency funds. Journal of Banking & Finance, 138, 106467. •Blau, B. M., Griffith, T. G., & Whitby, R. J. (2021). Inflation and Bitcoin: A descriptive time-series analysis. Economics Letters, 203, 109848. •Blinder, A. S. (1982). The anatomy of double-digit inflation in the 1970s. In Inflation: Causes and effects (pp. 261-282). University of Chicago Press. •Blinder, A. S. (2010). Quantitative easing: entrance and exit strategies. Federal Reserve Bank of St. Louis Review, 92(6), 465-479. •Bodnar, T., &Schmid, W.(2009). Econometricalanalysisofthesampleefficientfrontier. TheEuropean journal of finance, 15(3), 317-335. •Boschen, J. F., & Weise, C. L. (2003). What starts inflation: evidence from the OECD countries. Journal of Money, Credit and Banking, 323-349. •Bradley, A.C. (1991). Shakespearean Tragedy: Lectures on Hamlet, Othello, King Lear and Macbeth. London: Penguin. ISBN 978-0-14-053019-3. •Briola, A., Vidal-Tomás, D., Wang, Y., & Aste, T. (2023). Anatomy of a Stablecoin’s failure: The Terra-Luna case. Finance Research Letters, 51, 103358. •Broadie, M. (1993). Computing efficient frontiers using estimated parameters. Annals of operations research, 45(1), 21-58. •Brunner, K., & Meltzer, A. H. (1971). The uses of money: money in the theory of an exchange economy. The American Economic Review, 61(5), 784-805. •Cai, C. W. (2018). Disruption of financial intermediation by FinTech: a review on crowdfunding and blockchain. Accounting & Finance, 58(4), 965-992. ©2021 Ravi Kashyap. All Rights Reserved. 41 11 REFERENCES •Chaplin, M. F. (2001). Water: its importance to life. Biochemistry and Molecular Biology Education, 29(2), 54-59. •Chaves, D., Hsu, J., Li, F., & Shakernia, O. (2011). Risk parity portfolio vs. other asset allocation heuristic portfolios. The Journal of Investing, 20(1), 108-118. •Chen, Y. (2018). Blockchain tokens and the potential democratization of entrepreneurship and inno- vation. Business horizons, 61(4), 567-575. •Choi, S., & Shin, J. (2022). Bitcoin: An inflation hedge but not a safe haven. Finance Research Letters, 46, 102379. •Chuen, D. L. K., Guo, L., & Wang, Y. (2017). Cryptocurrency: A new investment opportunity?. The journal of alternative investments, 20(3), 16-40. •Clarke, R., De Silva, H., & Thorley, S. (2013). Risk parity, maximum diversification, and minimum variance: An analytic perspective. The Journal of Portfolio Management, 39(3), 39-53. •Cochrane, J. H. (2009). Asset pricing: Revised edition. Princeton university press. •Conlon, T., Corbet, S., & McGee, R. J. (2021). Inflation and cryptocurrencies revisited: A time-scale analysis. Economics Letters, 206, 109996. •Cosgrove, W. J., & Loucks, D. P. (2015). Water management: Current and future challenges and research directions. Water Resources Research, 51(6), 4823-4839. •Cousaert, S., Xu, J., & Matsui, T. (2022). Sok: Yield aggregators in defi. In 2022 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) (pp. 1-14). IEEE. •Curtis, G. (2004). Modern portfolio theory and behavioral finance. The Journal of Wealth Manage- ment, 7(2), 16-22. •Curtis, G. (2002). Modern Portfolio theory and Quantum mechanics. The Journal of Wealth Manage- ment, 5(3), 7-13. •Davies, G. (2010). History of money. University of Wales Press. •DeLong, J. B. (1997). America’s peacetime inflation: the 1970s. In Reducing inflation: Motivation and strategy (pp. 247-280). University of Chicago Press. •Dimitri, N. (2022). Consensus: Proof of Work, Proof of Stake and Structural Alternatives. In Enabling the Internet of Value (pp. 29-36). Springer, Cham. ©2021 Ravi Kashyap. All Rights Reserved. 42 11 REFERENCES •Donmez, A., & Karaivanov, A. (2022). Transaction fee economics in the Ethereum blockchain. Eco- nomic Inquiry, 60(1), 265-292. •Dungey, M., & Martin, V. L. (2007). Unravelling financial market linkages during crises. Journal of Applied Econometrics, 22(1), 89-119. •Elton, E. J., Gruber, M. J., & Padberg, M. W. (1978). Simple criteria for optimal portfolio selection: tracing out the efficient frontier. The Journal of Finance, 33(1), 296-302. •Elton, E. J., & Gruber, M. J. (1997). Modern portfolio theory, 1950 to date. Journal of banking & finance, 21(11-12), 1743-1759. •Epstein, G. A. (2019). What’s wrong with modern money theory?: A policy critique. London: Palgrave Macmillan. •Fabozzi, F. J., Gupta, F., & Markowitz, H. M. (2002). The legacy of modern portfolio theory. The journal of investing, 11(3), 7-22. •Fabozzi, F. A., Simonian, J., & Fabozzi, F. J. (2021). Risk parity: The democratization of risk in asset allocation. The Journal of Portfolio Management, 47(5), 41-50. •Fama, E. F., & French, K. R. (1992). The cross-section of expected stock returns. the Journal of Finance, 47(2), 427-465. •Fama, E. F., & French, K. R. (2018). Volatility lessons. Financial Analysts Journal, 74(3), 42-53. •Fawley, B. W., & Neely, C. J. (2013). Four stories of quantitative easing. Federal Reserve Bank of St. Louis Review, 95(1), 51-88. •Flori, A. (2019). News and subjective beliefs: A bayesian approach to bitcoin investments. Research in International Business and Finance, 50, 336-356. •Franks, F. (2000). Water: a matrix of life (Vol. 21). Royal Society of Chemistry. •Fu,S.,Wang,Q.,Yu,J.,&Chen,S.(2022). FTXCollapse: APonziStory. arXivpreprintarXiv:2212.09436. •Goetzmann, W. N., Ingersoll Jr, J. E., & Ross, S. A. (2003). High-water marks and hedge fund management contracts. The Journal of Finance, 58(4), 1685-1718. •Goetzmann, W. N., Brown, S. J., Gruber, M. J., & Elton, E. J. (2014). Modern portfolio theory and investment analysis. John Wiley & Sons, 237. •Gonzalez, L. (2020). Blockchain, herding and trust in peer-to-peer lending. Managerial Finance, 46(6), 815-831. ©2021 Ravi Kashyap. All Rights Reserved. 43 11 REFERENCES •Gorkhali, A., Li, L., & Shrestha, A. (2020). Blockchain: A literature review. Journal of Management Analytics, 7(3), 321-343. •Grobys, K. (2021). When the blockchain does not block: on hackings and uncertainty in the cryptocur- rency market. Quantitative Finance, 21(8), 1267-1279. •Guasoni, P., & Obłój, J. (2016). The incentives of hedge fund fees and high-water marks. Mathematical Finance, 26(2), 269-295. •Hanson, R. (2007). Logarithmic markets coring rules for modular combinatorial information aggrega- tion. The Journal of Prediction Markets, 1(1), 3-15. •Hartmann, P., Straetmans, S., & Vries, C. D. (2004). Asset market linkages in crisis periods. Review of Economics and Statistics, 86(1), 313-326. •Hassija, V., Bansal, G., Chamola, V., Kumar, N., & Guizani, M. (2020). Secure lending: Blockchain and prospect theory-based decentralized credit scoring model. IEEE Transactions on Network Science and Engineering, 7(4), 2566-2575. •Healy, A. D., & Lo, A. W. (2009). Jumping the gates: Using beta-overlay strategies to hedge liquidity constraints. Journal of investment management, 3(11). •Hoang, L. T., & Baur, D. G. (2021). How stable are stablecoins?. The European Journal of Finance, 1-17. •Hong, K. (2017). Bitcoin as an alternative investment vehicle. Information Technology and Manage- ment, 18(4), 265-275. •Hong, H., & Stein, J. C. (2003). Differences of opinion, short-sales constraints, and market crashes. The Review of Financial Studies, 16(2), 487-525. •Huberts, L. C. (2004). Overlay Speak. The Journal of Investing, 13(3), 22-30. •Hughes, L., Dwivedi, Y. K., Misra, S. K., Rana, N. P., Raghavan, V., & Akella, V. (2019). Blockchain research, practiceandpolicy: Applications, benefits, limitations, emergingresearchthemesandresearch agenda. International Journal of Information Management, 49, 114-129. •Hull, J. C. (2003). Options futures and other derivatives. Pearson Education India. •Jia, R., & Yin, S. (2022, November). To EVM or Not to EVM: Blockchain Compatibility and Network Effects. In Proceedings of the 2022 ACM CCS Workshop on Decentralized Finance and Security (pp. 23-29). ©2021 Ravi Kashyap. All Rights Reserved. 44 11 REFERENCES •Kashyap, R. (2015). Financial Services, Economic Growth and Well-Being. Indian Journal of Finance, 9(1), 9-22. •Kashyap, R. (2016a). Fighting Uncertainty with Uncertainty. Available at SSRN 2715424. •Kashyap, R. (2016b). Notes on Uncertainty, Unintended Consequences and Everything Else. Working Paper. •Kashyap, R. (2019). For Whom the Bell (Curve) Tolls: A to F, Trade Your Grade Based on the Net Present Value of Friendships with Financial Incentives. The Journal of Private Equity, 22(3), 64-81. •Kashyap, R. (2020). David vs Goliath (You against the Markets), A dynamic programming approach to separate the impact and timing of trading costs. Physica A: Statistical Mechanics and its Applications, 545, 122848. •Kashyap, R. (2021). Artificial intelligence: a child’s play. Technological Forecasting and Social Change, 166, 120555. •Kashyap, R. (2021-I). DeFi Security: Turning The Weakest Link Into The Strongest Attraction. Work- ing Paper. •Kashyap, R. (2021-II). Trade Execution: To Trade or Not To Trade. Working Paper. •Kashyap, R. (2021-III). Velocity of Volatility and Variance: Crash Protection For Crypto-Defi Portfo- lios. Working Paper. •Kashyap, R. (2021-IV). The Risk Parity Line: Moving from The Efficient Frontier to The Final Frontier of Investments. Working Paper. •Kashyap, R. (2021-V). Sharing is Caring: Setting Aside Profits for The Crypto Community. Working Paper. •Kashyap, R. (2021-VI). Raising The Bar for Portfolio Performance Measurement: The Concentration Risk Indicator. Working Paper. •Kashyap, R. (2021-VII). Multichain Expansion and Select Strategic Initiatives: Building Bridges That Do Not Burn. Working Paper. •Kashyap, R. (2021-VIII). The TAO of The DAO: One Small Step for Blockchain Systems, But A Giant Leap for Mankind. Working Paper. •Kashyap, R. (2021-IX). Multi-Asset Fund Flows: Old Money Plus New Money. Working Paper. ©2021 Ravi Kashyap. All Rights Reserved. 45 11 REFERENCES •Kashyap, R. (2021-X). Bringing Risk Parity To The Defi Party: A Complete Solution To The Crypto Asset Management Conundrum. Working Paper. •Kashyap, R. (2021-XI). Hedged Mutual Fund Blockchain Protocol: High Water Marks During Low Market Prices. Working Paper. •Kim, A., Trimborn, S., & Härdle, W. K. (2021). VCRIX—A volatility index for crypto-currencies. International Review of Financial Analysis, 78, 101915. •Klein, T., Thu, H. P., & Walther, T. (2018). Bitcoin is not the New Gold–A comparison of volatility, correlation, and portfolio performance. International Review of Financial Analysis, 59, 105-116. •Kosc, K., Sakowski, P., & Ślepaczuk, R. (2019). Momentum and contrarian effects on the cryptocur- rency market. Physica A: Statistical Mechanics and its Applications, 523, 691-701. •Laidler, D., & Parkin, M. (1975). Inflation: a survey. The Economic Journal, 85(340), 741-809. •Lee, S., Lee, J., & Lee, Y. (2022). Dissecting the Terra-LUNA crash: Evidence from the spillover effect and information flow. Finance Research Letters, 103590. •Lee, S. S., Murashkin, A., Derka, M., & Gorzny, J. (2022). SoK: Not Quite Water Under the Bridge: Review of Cross-Chain Bridge Hacks. arXiv preprint arXiv:2210.16209. •Li, X., Jiang, P., Chen, T., Luo, X., & Wen, Q. (2020). A survey on the security of blockchain systems. Future Generation Computer Systems, 107, 841-853. •Li, Y., Liu, H., & Tan, Y. (2022, May). POLYBRIDGE: A Crosschain Bridge for Heterogeneous Blockchains. In 2022 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) (pp. 1-2). IEEE. •Liu, Y., Tsyvinski, A., & Wu, X. (2022). Common risk factors in cryptocurrency. The Journal of Finance, 77(2), 1133-1177. •Lucey, B. M., Vigne, S. A., Yarovaya, L., & Wang, Y. (2022). The cryptocurrency uncertainty index. Finance Research Letters, 45, 102147. •Lyons, R. K., & Viswanath-Natraj, G. (2023). What keeps stablecoins stable?. Journal of International Money and Finance, 131, 102777. •Madan, D. B., & Sharaiha, Y. M. (2015). Option overlay strategies. Quantitative Finance, 15(7), 1175-1190. ©2021 Ravi Kashyap. All Rights Reserved. 46 11 REFERENCES •Mankiw, N. G. (2020, May). A skeptic’s guide to modern monetary theory. In AEA Papers and Proceedings (Vol. 110, pp. 141-44). •McLeay, M., Radia, A., & Thomas, R. (2014). Money in the modern economy: an introduction. Bank of England Quarterly Bulletin, Q1. •Miccolis, J. A. (2012). Management: Putting the “Modern’Back in Modern Portfolio Theory. Journal of financial Planning. •Mohan, V. (2022). Automated market makers and decentralized exchanges: a DeFi primer. Financial Innovation, 8(1), 20. •Mohanty, S. S., Mohanty, O., & Ivanof, M. (2021). Alpha enhancement in global equity markets with ESG overlay on factor-based investment strategies. Risk Management, 23(3), 213-242. •Monrat, A. A., Schelén, O., & Andersson, K. (2019). A survey of blockchain from the perspectives of applications, challenges, and opportunities. IEEE Access, 7, 117134-117151. •Mulvey, J. M., Ural, C., & Zhang, Z. (2007). Improving performance for long-term investors: wide diversification, leverage, and overlay strategies. Quantitative Finance, 7(2), 175-187. •Naeem, M. A., Lucey, B. M., Karim, S., & Ghafoor, A. (2022). Do financial volatilities mitigate the risk of cryptocurrency indexes?. Finance Research Letters, 50, 103206. •Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Decentralized Business Review, 21260. •Narayanan, A., & Clark, J. (2017). Bitcoin’s academic pedigree. Communications of the ACM, 60(12), 36-45. •Palley, T. I. (2015). Money, fiscal policy, and interest rates: A critique of Modern Monetary Theory. Review of Political Economy, 27(1), 1-23. •Pahl-Wostl, C. (2008). Requirements for adaptive water management. In Adaptive and integrated water management (pp. 1-22). Springer, Berlin, Heidelberg. •Patel, S. B., Bhattacharya, P., Tanwar, S., & Kumar, N. (2020). Kirti: A blockchain-based credit recommendersystemforfinancialinstitutions. IEEETransactionsonNetworkScienceandEngineering, 8(2), 1044-1054. •Perez-Quiros, G., & Timmermann, A. (2000). Firm size and cyclical variations in stock returns. The Journal of Finance, 55(3), 1229-1262. ©2021 Ravi Kashyap. All Rights Reserved. 47 11 REFERENCES •Qian, E. (2011). Risk parity and diversification. The Journal of Investing, 20(1), 119-127. •Reiners, L. (2020). Cryptocurrency and the State: An Unholy Alliance. S. Cal. Interdisc. LJ, 30, 695. •Rhoades, S. A. (1993). The herfindahl-hirschman index. Fed. Res. Bull., 79, 188. •Rogers, P. P., & Fiering, M. B. (1986). Use of systems analysis in water management. Water resources research, 22(9S), 146S-158S. •Schueffel, P.(2021). DeFi: DecentralizedFinance-AnIntroductionandOverview. JournalofInnovation Management, 9(3), I-XI. •Shahzad,S.J.H.,Bouri,E.,Roubaud,D.,&Kristoufek,L.(2020). Safehaven,hedgeanddiversification for G7 stock markets: Gold versus bitcoin. Economic Modelling, 87, 212-224. •Sharpe, W. F. (1994). The Sharpe Ratio. The Journal of Portfolio Management, 21(1), 49-58. •Shleifer, A., & Vishny, R. W. (1997). The limits of arbitrage. The Journal of Finance, 52(1), 35-55. •Sipser, M. (2006). Introduction to the Theory of Computation (Vol. 2). Boston: Thomson Course Technology. •Slamka, C., Skiera, B., & Spann, M. (2012). Prediction market performance and market liquidity: A comparison of automated market makers. IEEE Transactions on Engineering Management, 60(1), 169-185. •Sweeney, J., & Sweeney, R. J. (1977). Monetary theory and the great Capitol Hill Baby Sitting Co-op crisis: comment. Journal of Money, Credit and Banking, 9(1), 86-89. •Troster, V., Tiwari, A. K., Shahbaz, M., & Macedo, D. N. (2019). Bitcoin returns and risk: A general GARCH and GAS analysis. Finance Research Letters, 30, 187-193. •Uhlig, H. (2022). A Luna-tic Stablecoin Crash (No. w30256). National Bureau of Economic Research. •Van Dijk, M. A. (2011). Is size dead? A review of the size effect in equity returns. Journal of Banking & Finance, 35(12), 3263-3274. •Veldkamp, L. L. (2005). Slow boom, sudden crash. Journal of Economic theory, 124(2), 230-257. •Wang, S., Yuan, Y., Wang, X., Li, J., Qin, R., & Wang, F. Y. (2018). An overview of smart contract: architecture, applications, and future trends. In 2018 IEEE Intelligent Vehicles Symposium (IV) (pp. 108-113). IEEE. ©2021 Ravi Kashyap. All Rights Reserved. 48 11 REFERENCES •Wang, H. (2019). VIX and volatility forecasting: A new insight. Physica A: Statistical Mechanics and its Applications, 533, 121951. •Werner, S. M., Perez, D., Gudgeon, L., Klages-Mundt, A., Harz, D., & Knottenbelt, W. J. (2021). Sok: Decentralized finance (defi). arXiv preprint arXiv:2101.08778. •Westall, F., & Brack, A. (2018). The importance of water for life. Space Science Reviews, 214(2), 1-23. •Wray, L. R. (2015). Modern money theory: A primer on macroeconomics for sovereign monetary systems. Springer. •Xi, D., O’Brien, T. I., & Irannezhad, E. (2020). Investigating the investment behaviors in cryptocur- rency. The Journal of Alternative Investments, 23(2), 141-160. •Xu, M., Chen, X., & Kou, G. (2019). A systematic review of blockchain. Financial Innovation, 5(1), 1-14. •Xu,J.,Paruch,K.,Cousaert,S.,&Feng,Y.(2021). Sok: Decentralizedexchanges(dex)withautomated market maker (AMM) protocols. arXiv preprint arXiv:2103.12732. •Xu, J., & Feng, Y. (2022). Reap the Harvest on Blockchain: A Survey of Yield Farming Protocols. IEEE Transactions on Network and Service Management. •Yadav, S. P., Agrawal, K. K., Bhati, B. S., Al-Turjman, F., & Mostarda, L. (2020). Blockchain-based cryptocurrency regulation: An overview. Computational Economics, 1-17. •Yli-Huumo, J., Ko, D., Choi, S., Park, S., & Smolander, K. (2016). Where is current research on blockchain technology?—a systematic review. PloS one, 11(10), e0163477. •Zeng, X., Hao, N., Zheng, J., &Xu, X.(2019). Aconsortiumblockchainparadigmonhyperledger-based peer-to-peer lending system. China Communications, 16(8), 38-50. •Zetzsche, D. A., Arner, D. W., & Buckley, R. P. (2020). Decentralized finance. Journal of Financial Regulation, 6(2), 172-203. •Zheng, Z., Xie, S., Dai, H. N., Chen, W., Chen, X., Weng, J., & Imran, M. (2020). An overview on smart contracts: Challenges, advances and platforms. Future Generation Computer Systems, 105, 475-491. •Zou, W., Lo, D., Kochhar, P. S., Le, X. B. D., Xia, X., Feng, Y., ... & Xu, B. (2019). Smart contract development: Challenges and opportunities. IEEE Transactions on Software Engineering, 47(10), 2084- 2106. ©2021 Ravi Kashyap. All Rights Reserved. 49
{ "id": "2302.06348" }
1805.01081
LedgerGuard: Improving Blockchain Ledger Dependability
The rise of crypto-currencies has spawned great interest in their underlying technology, namely, Blockchain. The central component in a Blockchain is a shared distributed ledger. A ledger comprises series of blocks, which in turns contains a series of transactions. An identical copy of the ledger is stored on all nodes in a blockchain network. Maintaining ledger integrity and security is one of the crucial design aspects of any blockchain platform. Thus, there are typically built-in validation mechanisms leveraging cryptography to ensure the validity of incoming blocks before committing them into the ledger. However, a blockchain node may run over an extended period of time, during which the blocks on the disk can may become corrupted due to software or hardware failures, or due to malicious activity. This paper proposes LedgerGuard, a tool to maintain ledger integrity by detecting corrupted blocks and recovering these blocks by synchronizing with rest of the network. The experimental implementation of LedgerGuard is based on Hyperledger Fabric, which is a popular open source permissioned blockchain platform.
http://arxiv.org/pdf/1805.01081v1
Qi Zhang, Petr Novotny, Salman Baset, Donna Dillenberger, Artem Barger, Yacov Manevich
cs.DC, cs.CR
cs.DC
LedgerGuard: Improving Blockchain Ledger Dependability? Qi Zhang1, Petr Novotny1, Salman Baset1Donna Dillenberger1 Artem Barger2, Yacov Manevich2 1IBM Research, Yorktown, USA 2IBM Research, Haifa, Israel Abstract. The rise of crypto-currencies has spawned great interest in their underlying technology, namely, Blockchain. The central component in a Blockchain is a shared distributed ledger. A ledger comprises series of blocks, which in turns contains a series of transactions. An identical copy of the ledger is stored on all nodes in a blockchain network. Maintaining ledger integrity and security is one of the crucial design aspects of any blockchain platform. Thus, there are typically built-in validation mecha- nisms leveraging cryptography to ensure the validity of incoming blocks before committing them into the ledger. However, a blockchain node may run over an extended period of time, during which the blocks on the disk can may become corrupted due to software or hardware failures, or due to malicious activity. This paper proposes LedgerGuard , a tool to main- tain ledger integrity by detecting corrupted blocks and recovering these blocks by synchronizing with rest of the network. The experimental im- plementation of LedgerGuard is based on Hyperledger Fabric, which is a popular open source permissioned blockchain platform. Keywords: Blockchain Ledger Dependability Fault tolerance Hy- perledger Fabric. 1 INTRODUCTION A distributed ledger is the central component of any blockchain platform. Each peer in the Blockchain network maintains its own replica of the ledger. The ledger is an immutable append-only data structure, which contains a sequence of historical transactions grouped into blocks. The ledger is formed by chaining the blocks together with hash pointers (i.e., a subsequent block contains the hash of its previous block). The integrity of the ledger is essential for correct functioning of the peer. With corrupted ledger, the peer is not able to generate valid transactions when the smart contract needs to retrieve historical transactions from the ledger. More- over, when historical transactions recorded in the ledger are requested by ex- ternal tools such as analytical or auditing applications, the peer rst veri es ?This paper has been accepted by 2018 International Conference on Blockchain (ICBC)arXiv:1805.01081v1 [cs.DC] 3 May 2018 2 Qi Zhang et al. the integrity and validity of the relevant blocks before extracting the transac- tions. Any corruption of blocks discovered by these operations leads to signi cant degradation of the peer functionality. Typically, the peer will cease to function till the correct ledger is available. Furthermore, the applications accessing the corrupted data may become signi cantly impaired as well. The peer protects its ledger from introducing corrupted data. When a new block is received the peer validates the integrity of the block before appending the block to the ledger. However, the peer lacks the capability of detecting and recovering the corrupted blocks existing in the ledger during its runtime. A corruption of the ledger may have one of several di erent causes. Vari- ous types of ledger corruptions have been observed on the public Blockchain platforms, such as Bitcoin [16] and Ethereum [10]. For instance, on Ethereum platform users reported corrupted data les due to false positives of antivirus software [5]. Ledger corruptions were also reported by Bitcoin users due to block checksum mismatch [6] . In private Blockchains such as Hyperledger Fabric [7] or R3 Corda [9], it is critical to maintain the nodes hosting peers highly secure. However, when a peer is hosted in a less secure environment, an external at- tacker or malicious user can hack into the peer node and modify the content of the ledger les. Moreover, since the ledger les are typically stored on a storage medium such as magnetic disks or SSDs, a hardware failure [13] [17] [15] may also cause a corruption of the ledger les. In this paper, we introduce LedgerGuard , a mechanism that enables the peer to maintain the integrity of its ledger. LedgerGuard enforces the integrity of the ledger with the following two techniques. First, it validates the content of each block and the hash links between blocks. Second, if corrupted block is identi ed, LedgerGuard recovers the block and corrects the a ected part of ledger without the need for rebuilding the whole ledger. LedgerGuard is designed in a highly con gurable manner. It can be used as a tool (e.g., by an operator) to validate and correct online or oine ledger. It can also be used as a service of the peer node, to continuously monitor and correct the ledger and thus increase the resiliency and availability of the peer. 2 BACKGROUND In this section, we brie y describe the ledger design of Hyperledger Fabric. Al- though the ledger design varies among di erent Blockchain platforms, they follow the same principles. Due to the space limitation, we do not describe the details of Hyperledger Fabric design in the paper, but we recommend readers to refer to [11] [20] [19] for more information. In Hyperledger Fabric, a transaction is submitted by the client and endorsed by multiple peers. If being successfully endorsed, the transaction with its en- dorsements will be further sent to the orderer, who collects transactions from multiple clients and organizes them into blocks. After that, the orderer delivers the block to the peers, who nally validates the block and commits it into ledger. LedgerGuard: Improving Blockchain Ledger Dependability??3 Fig. 1: Hyperledger Fabric Blockchain ledger Figure 1 shows the design of the Blockchain ledger in Hyperledger Fabric, which consists of a chain of blocks that are connected by hash pointers. Normally, a block will never be changed after being committed into the ledger. The rst block is called the genesis block, which contains con guration information of this Blockchain network. Blockchain con guration can be changed over time, for example, when a new peer joins or an existing peer leaves. The new con guration transactions will be recorded in the other blocks. Each block has three sections: block header, block data, and block metadata. The block header section includes the sequence number of this block, the hash value of the previous block, and the hash value of the data section in the cur- rent block. The block data section contains a series of transactions with some additional information such as the read/write sets and the endorsers' signatures. For the medadata section, it incorporates the certi cate, public key and the sig- nature from the orderer. When creating the block, the orderer signs the block header and stores the signature into the metadata section. Depending on the architecture, a block can be signed by a single or multiple orderers. The meta- data section also contains information such as the ags of the validity of each transaction in the block. 3 LEDGER CORRECTION In this section, we describe LedgerGuard , which improves the Blockchain ledger dependability by providing a runtime self-correction mechanism for ledger. Approach overview. In order to minimize the negative impact brought by the corrupted ledger, we introduce a runtime self-correction mechanism, Ledger- Guard , for the Blockchain ledger. LedgerGuard runs as a service on each peer, checks the integrity of the ledger on the peer, and recovers the corrupted block if there is any. We provide several options for the users to activate LedgerGuard . First, it can be setup as a periodically running process in the peer, which is initialized when the peer starts and runs after every period of time. Second, in order to not a ect the peer performance, LedgerGuard can be triggered by a resource monitor in the peer when the hardware resource utilization, such as 4 Qi Zhang et al. CPU, is under a pre-con gured threshold. Third, LedgerGuard can be provided as a peer built-in tool and explicitly activated by the user when he or she wants to know the integrity of the ledger. Ledger corruption detection As shown in Figure 1, the blocks in the ledger are connected by the hash pointers. LedgerGuard validates the ledger integrity from two aspects: (1) each single block in the ledger is not corrupted, and (2) the hash pointers between the blocks are valid. In Hyperledger Fabric, a block is created by the ordering service, which signs the block header and stores the signature in the block metadata. Therefore, LedgerGuard uses the certi cate of the ordering service to validate the correctness of each block header. Since the block header contains the hash value of the block data section and the signature is collected from the block metadata section, a successfully veri ed signature indicates the block has not been tampered with. We assume the root Certi cate Authority in the Hyperledger Fabric Blockchain platform is trusted, thus LedgerGuard can get a valid ordering service certi cate to validate the blocks. To validate the correctness of the hash pointer, LedgerGuard calculates the hash value of the current block (e.g. Hash(block X)), and compares this hash value with the value of "PreviousHash" in the header of block X+1. The hash pointer is integrated if these two value matches. Otherwise, at least one of the two blocks are corrupted. Corrupted ledger recovery Once a corrupted block is detected by a speci c peer (e.g. peer 1), LedgerGuard on this peer will send a request to the other peers (e.g. peer 2) in the same Blockchain network, and ask for the block with the same ID as the corrupted block. Since all the peers have the same copy of the ledger, after peer 1 obtains the block from peer 2, it use the approach described in the previous subsection to validate the correctness of this newly received block. If this block is invalid, peer 1 will keep asking the other peers for the same block. Otherwise, peer 1 uses this newly received block to recover the corrupted ledger. Sometimes multiple blocks need to be retrieved to x the Fig. 2: Blockchain ledger stored in les ledger even though only one block is corrupted. In Hyperledger Fabric, a ledger consists of one or multiple x sized les, and each le contains a continuous LedgerGuard: Improving Blockchain Ledger Dependability??5 series of blocks. A corrupted block can be either larger or smaller than the original block, thus simply replacing the corrupted block with a correct block still breaks the integrity of the ledger. As an example depicted in Figure 2, block A in le 2 is detected as a corrupted block. Block A' is a correct block retrieved from another peer. If the size of block A is not equal to that of block A', simply replacing block A with block A' will either overwrite part of block B or leave a gap between block A and block B. In order to solve this problem, LedgerGuard rst checks whether the size of block A has changed. If it is, as shown in Figure 2, the process will replace all the blocks in le 2 that are subsequent to block A (case1 and case2). Otherwise, only block A needs to be overwritten (case3). Optimization As an in progress work, we are exploring optimizations for Ledger- Guard . For example, since hash value calculation and signature veri cation are CPU intensive, LedgerGuard can use le level veri cation to decrease its CPU resource consumption. Concretely, when LedgerGuard validates the ledger for the rst time, it temporarily keeps the validated blocks in memory until all the blocks in a le have been validated. If all the blocks as well as the hash pointers are correct, LedgerGuard calculates the hash value of the whole le. The hash values of the les will be kept by system administrators in a separate secure storage. Therefore, when the same portion of the ledger needs to be checked for a second time, only the hashes of the les need to be calculated and compared. Since a le usually contains many blocks, this will largely reduce the amount of hash value calculations. The linkage between the two les can be validated by checking hash pointer between the last block of the previous le and the rst block of the next le. 4 Evaluation In this section, we evaluate the e ectiveness of LedgerGuard on a 4-core VMWare virtual machines, with Intel(R) Xeon(R) CPU E5-2698 2.20GHz with 4GB of RAM. The ledgers used in this section is generated by a tool, which closely simulates the blocks generation on a real Hyperledger Fabric Blockchain network. The tool rst loads peer and orderer private keys and certi cates, then crafts transaction proposals and endorsements signed by the peer private key, and nally batches the resulting transactions into blocks signed with the orderer private key. A Hyperledger Fabric Blockchain network used in this section is setup with 4 peers, and each peer loads the generated ledger. Figure 3 shows how much time LedgerGuard takes to validate all the blocks in the ledger. The ledger size of 1000 blocks, 2000 blocks, 5000 blocks, and 10000 blocks are used. For each ledger size, we vary the block size from 50 transactions per block to 150 transactions per block, and each transaction is 3KB. We observe that rst, with di erent ledger sizes but the same block size, the larger the ledger is, the longer it takes to nish validation. For example, with 50 transactions per block, it takes 69 seconds to nish the validation of the ledger with 10000 blocks, while it takes 69 seconds when there are 5000 blocks in the ledger. This is because LedgerGuard sequentially scans through each block in the ledger, the 6 Qi Zhang et al. Fig. 3: LedgerGuard ledger validation time more blocks the ledger contains, the longer time LedgerGuard takes to nish validation. Second, with the same ledger size but di erent block sizes, the larger the block size is, the longer it takes for validation. Taking the ledger with 5000 blocks as an example, it takes 39 seconds to nish validation when each block contains 50 transactions, while that number increases to 110 seconds when each block includes 150 transactions. Our measurement shows that the block hashing time does not vary much when the block size increases from 50 transactions to 150 transactions, and also the order signature veri cation time is independent of the block size. Therefore, the di erence in the ledger validation time is mostly because the larger the block size is, the more time is spent on I/O to read the blocks. (a) 50 trans/block (b) 100 trans/block (c) 150 trans/block Fig. 4: LedgerGuard CPU and memory utilization(ledger size is 10000 blocks) We also measure how much CPU and memory does LedgerGaurd consume during ledger validation, and the results are depicted in Figure 4. It shows that, no matter for what block size, LedgerGuard uses about 60MB memory, and the CPU utilization of LedgerGuard starts with around 110%, then drops to around 20% and stays stable. The reason for the initial CPU utilization spike is Ledger- Guard needs to do some initialization work such as opening the ledger, reading con guration of the blockchain network, and initializing the MSP (Membership Service Provider) manager. After that, the LedgerGuard works as a single process to scan through the ledger and validate each block. Since calculating the block LedgerGuard: Improving Blockchain Ledger Dependability??7 hash value and verifying the signature are both CPU intensive, the LedgerGuard occupies the whole CPU core, which leads to around 20% CPU utilization in a 4 core machine. Moreover, we measure the speed of recovering the ledger. It shows that with the size of 150 transactions per block, a peer node can fetch the block from the other peer, validate and commit it in a speed of 8.5 blocks per second. As part of our on going research, we are working on creating a ledger with di erent distribution of corrupted blocks, and measure the e ectiveness of LedgerGuard to recover the corrupted ledger. 5 Related Work As blockchain technologies gain popularity, issues about the Blockchain plat- form reliability and security have been observed. Some Ethereum users reported that the Blockchain ledger on his or her machine has been corrupted due to a false positive of antivirus software [5]. This was con rmed by another user who has seen report saying that an antivirus software corrupted an Ethereum Blockchain by deleting some le from the ledger. The suggested solution was to delete the ledger data, and restart the client to re-download the whole ledger. Error of "block checksum mismatch" has also been observed by users of Bit- coin [16], Litecoin [3], and Dogecoin [2] when Btrfs [18] is used. The reason was due to single-bit errors when reading from disk, and the proposed solution was to change the lesystem to EXT4 [12] and re-downloading the whole ledger [6]. Moreover, since smart contracts are programs that could move large value assets on the Blockchain, they always become the victims of attackers who want to steal the assets. The DAO attack [4] showed that a program built on the Ethereum Blockchain platform was breached in a case that results in $50 million worth of Ether being stolen. Researchers and practitioners are making great e orts to improve the reliability and security of the Blockchain platform. Nicola [8] did a survey of the attacks on Ethereum smart contacts by exploiting a series of attacks and providing a taxonomy of programming pitfalls which can lead to such vulnerabilities. Zcash [14] was invented by creating transactions that re- veal neither the payment's origin, destination, nor the amount. This approach prevents leakage of the users' spending habits by Blockchain mining [1]. 6 Conclusions and Future work Blockchain ledger can be corrupted due to many reasons, and ensuring the in- tegrity of the ledger is critical to the functionality and the performance of the Blockchain platform. In this paper, we propose LedgerGuard - a mechanism to keep track of ledger integrity by detecting corrupted blocks and recover the ledger by synchronizing it with rest of the network, implement a preliminary pro- totype, and evaluate its e ectiveness and overhead. As the on-going and future work, we are extending and improving the LedgerGuard from multiple aspects. For example, we are exploring algorithms to enable the LedgerGuard to smartly 8 Qi Zhang et al. select the other peers based on the network connection quality when it tries to fetch a block, which will further improve the performance of recovering the ledger. Furthermore, we are investigating more alternative approaches to detect corrupted blocks other than sequential scan. References 1. Chainalysis. https://www.chainalysis.com/ 2. Dogecoin. http://dogecoin.com/ 3. Litecoin. https://litecoin.org/ 4. Understanding the DAO attack. https://www.coindesk.com/ understanding-dao-hack-journalists/ 5. Antivirus corrupting ethereum block. https://github.com/ethereum/mist/ issues/581 (2018) 6. Bitcoin Block Checksum Mismatch. https://github.com/bitcoin/bitcoin/ issues/6528 (2018) 7. Androulaki, E., Barger, A., Bortnikov, V., Cachin, C., Christidis, K., De Caro, A., Enyeart, D., Ferris, C., Laventman, G., Manevich, Y., et al.: Hyperledger fab- ric: A distributed operating system for permissioned blockchains. arXiv preprint arXiv:1801.10228 (2018) 8. Atzei, N., Bartoletti, M., Cimoli, T.: A survey of attacks on ethereum smart con- tracts (sok). In: International Conference on Principles of Security and Trust. pp. 164{186. Springer (2017) 9. Brown, R.G.: Introducing r3 corda: A distributed ledger for nancial services. R3, April 5(2016) 10. Buterin, V., et al.: A next-generation smart contract and decentralized application platform. white paper (2014) 11. Cachin, C.: Architecture of the hyperledger blockchain fabric. In: Workshop on Distributed Cryptocurrencies and Consensus Ledgers (2016) 12. Cao, M., Bhattacharya, S., Ts'o, T.: Ext4: The next generation of ext2/3 lesystem. In: LSF (2007) 13. Gray, J., Van Ingen, C.: Empirical measurements of disk failure rates and error rates. arXiv preprint cs/0701166 (2007) 14. Hopwood, D., Bowe, S., Hornby, T., Wilcox, N.: Zcash protocol speci cation. Tech. rep., Tech. rep. 2016-1.10. Zerocoin Electric Coin Company (2016) 15. Meza, J., Wu, Q., Kumar, S., Mutlu, O.: A large-scale study of ash memory fail- ures in the eld. In: ACM SIGMETRICS Performance Evaluation Review. vol. 43, pp. 177{190. ACM (2015) 16. Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash system (2008) 17. Pinheiro, E., Weber, W.D., Barroso, L.A.: Failure trends in a large disk drive population. In: FAST. vol. 7, pp. 17{23 (2007) 18. Rodeh, O., Bacik, J., Mason, C.: Btrfs: The linux b-tree lesystem. ACM Trans- actions on Storage (TOS) 9(3), 9 (2013) 19. Sousa, J., Bessani, A., Vukoli c, M.: A byzantine fault-tolerant ordering service for the hyperledger fabric blockchain platform. arXiv preprint arXiv:1709.06921 (2017) 20. Vukoli c, M.: Rethinking permissioned blockchains. In: Proceedings of the ACM Workshop on Blockchain, Cryptocurrencies and Contracts. pp. 3{7. ACM (2017)
{ "id": "1805.01081" }
2103.02606
Blockchain in Cyberdefence: A Technology Review from a Swiss Perspective
Since the advent of bitcoin in 2008, the concept of a blockchain has widely spread. Besides crypto currencies and trading activities, there is a wide range of potential application areas where blockchains are providing the main building block for secure solutions. From a technical point of view, a blockchain involves a set of cryptographic primitives to provide a data structure with security and trust properties. However, a blockchain is not a golden bullet. It may be well suited for some problems, but often an inappropriate data structure for many applications. In this paper, we review the high-level concept of a blockchain and present possible applications in the military field. Our review is targeted to readers with little prior domain knowledge as a support to decide where it makes sense to use a blockchain and where a blockchain might not be the right tool at hand.
http://arxiv.org/pdf/2103.02606v1
Luca Gambazzi, Patrick Schaller, Alain Mermoud, Vincent Lenders
cs.CR
cs.CR
Blockchain in Cyber defence: A Technology Review from a Swiss P erspective Luca Gambazzi, Patrick Schaller, Alain Mermoud , Vincent Lenders Cyber Defence Campus armasuisse, Science and Technology, Switzerland Abst ract: Since the advent of bitcoin in 2008, the concept of a blockchain has widely spread. Besides crypto currencies and trading activities , there is a wide range of potential application areas where blockchains are providing the main building block for secure solutions. F rom a technical point of view, a blockchain involves a set of cryptographic primitives to provide a data structure with security and trust properties. However, a blockchain is not a golden bullet . It may be well suited for some problems, but often an inappropriate data structure for many applications . In this paper , we review the high-level concept of a blockchain and present possible applications in the military field. Our review is targeted to readers with little prior domain knowledge as a support to decide where it makes sense to use a blockchain and where a blockchain might not be the right tool at hand. 3 March 2021 Corresponding author: luca.gambazzi@ ar.admin.ch Disclaimer: Opinions expressed in this report are solely our own and do not express the views or opinions of our employer, the Swiss government . 2/22 1 What is a Blockchain? In 2008, in his seminal work on Bitcoin [1] Satoshi Nakamoto introduced a data structure ("a chain of blocks") as well as a consensus mechanism that enables a set of entities to maintain the general ledger of a currency in a distributed manner . The construction provides security guarantees as long as more than half of the entities participating are honest. Parts of the difficulty and confusion when talking about "blockchains" stems from the fact that there is no precise definition of what a "blockchain" is. S ome consider the whole ecosystem , including all its compon ents, such as the consensus mechanism, the execution environment for a scripting language running on the participating nodes, etc. as "the blockchain", others restrict the focus on the underlying data structure that consists of blocks that contain the data and build a chain. Blocks are tied -up using cryptographic primitives in such a way that it is impossible to modify the blocks' content or to rearrange the blocks, thus resulting in an immutable chain (Figure 1). Figure 1 Immuta ble Chain of Blocks . First application of the blockchain: B itcoin Nakamato has implemented the first blockchain in 2009 as part of the bitcoin system, where the blockchain represents the core component of the cryptocurrency. In terms of a distributed cryptocurrency such as bitcoin, where the blockchain (here the data structure) is supposed to provide a ledger archiving every single transaction of bitcoins, the requirements are rather obvious: • Consensus on the extension of the blockchain among honest players: every new block added to the chain of blocks must fulfill a set of consistency rules, e.g., transactions contained in a new block have to be valid transactions. • Public verifiability : given data with in the blockchain, it is easily verifiable, that the data is indeed part of the blockchain. • Immutability of block chain data: Once players have reached consensus about the extension of the chain of blocks and once a block was appended to the chain, it shoul d be impossible to change the content s of the block or to rearrange the sequence of the blocks in the chain. These are probably the most striking properties introduced by the blockchain construction. Of course, there are many other properties to be met, su ch as efficiency, authenticity, non - repudiation; however, the other properties are more standard, in the sense that there exist other well-established database solutions. 3/22 2 How a Blockchain operates 2.1 Architecture of a blockchain In the following, we provide more background on the blockchain architecture from Hardware to Application layer (Figure 2) as suggested in [2]. Figure 2 Blockchain architecture . Hardware l ayer The hardware layer specifies the characteristics necessary for a node to perform blockchain operations efficiently and safely. T he requirements to be considered are mai nly related to the performances required by the consensus layer, the execution security (e.g., smart contracts, but also the secure use of all the private cryptographic elements) and the connectivity, including the performance requirements of the network layer. Data l ayer The data layer specifies a data structure that holds the blockchain information . It defines how a valid element of a blockchain (i.e., a "block") looks like, the data structure in a block, and a set of conditions that makes a block a valid element of the blockchain (Figure 3). Consider for example an element (a block) of the bitcoin blockchain1. It contains a set of parameters (e.g., the reference to previous block), as well as the transactions validated in this block (2'580 in the referenced example). 1 https://www.blockchain.com/btc/block/000000000000000000301fcfeb141088a93b77dc0d52571a1185b425256 ae2fb 4/22 Figure 3 A simplified view of a blockchain. The main characteristic of the data structure used in blockchains is that each block has a unique predecessor and a unique successor, thus building a chain of blocks. The linkage of the data - blocks is implemented using cryptographic tools , such as hash f unctions and digital signatures, that guarantee that the order of the blocks in the chain is preserved and that the content of the blocks cannot be modified once a block is part of the chain. Network l ayer The Network Layer defines how elements (nodes) of the blockchain ecosystem communicate and what kind of information they exchange. In the case of the Bitcoin or Ethereum blockchain, the network is a peer -to-peer network 2. As of October 2020, the Bitcoin network consisted on average of 10'500 nodes reachable from the Internet3 (Figure 4), the Ethereum network of 83004 nodes. A large number of nodes are not accessible directly from the Internet, either because the nodes are elements of private networks (NAT), or because they are part of the Tor anonymity network5. In this regard, a work was presented at the Internet Mea surement Conference [ 3]. Figure 4 Reachable bitcoin nodes around the world. Source: bitnode s.io. Consensus The previous paragraphs have described properties of the underlying data structure and the necessity of a network to build a blockchain ecosystem. Given that we have defined an underlying data structure and network protocols that enable nodes to exchange information, an 2 https://bitcoin.org/en/p2p -network -guide 3 https://bitnodes.io/ 4 https://www.ethernodes.org/ 5 https://www.torproject.org / 5/22 important follow -up question is how one could achieve agreement about the state and the correctness of the content of the blockchain among the participating nodes especially in the presence of potentially malicious nodes. This problem is trivially solved, if there is a trusted and accepted authority that checks the correctness of the content and returns the current state of the data upon request. One of the strongest properties of the Bitcoin blockchain is the fact that it allows to achieve agreement among honest no des and correctness of the data in the blockchain in the presence of potentially malicious nodes in a decentralized setting. The keyword here is consensus. "Classic" consensus protocols achieve consensus among honest agents in the presence of malicious nodes , as long as the fraction of malicious nodes does not exceed a certain threshold. A famous result in computer science 6 shows that consensus can be achieved among honest agents if the fraction of malicious agents does not exceed 1/3. One of the central bu ilding blocks of the bitcoin ecosystem and one of the main contributions of Nakamoto [1] is the introduction of a new consensus mechanism, the so- called "Nakamoto consensus". This type of consensus allows the blockchain ecosystem to provide guarantees about the state and the correctness of the blockchain in a decentralized setting, i.e., in a peer - to-peer setting, where there is no central, trusted authority. "Permissionless blockchains" (decentralized blockchains, presented in detail below ) such as Bitcoin or Ethereum rely on this type of consensus mechanisms , the two most well -known are: • Proof of work (PoW) : Extending the blockchain with a new valid block requires a predefined amount of computational work to be completed. The work is desi gned in way that is hard to be done , but can be easily verified . Similar to solving a puzzle, where assembling the puzzle is hard, checking the correctness of an assembled puzzle is easy. Completing the work and extending the blockchain with a valid block is rewarded (mining). Creating valid blocks for the blockchain thus requires computational power. Given the chain structure of the blockchain, changing a block within the blockchain requires changing all subsequent blocks and thus requires even more work. The simple rule "the longest blockchain is the valid blockchain" creates a race between malicious nodes and honest nodes. It can be argued that as long as more than half of the computational power is controlled by honest players, the correct blockchain grows faster than any maliciously modified version of the blockchain. Nevertheless, it is worth remembering that selfish mining attacks could reduce the tolerable number of malicious nodes in Bitcoin network [4], [5]. • Proof of stake (PoS) : Here the node to ex tend the blockchain with a new block is selected from the set of participating nodes through a combination of earned credits and randomness. The intention is to design or tune the selection criteria in a way such that correct behavior is rewarded, malicious behavior is penalized. Finally, malicious behavior should not be profitable. Note that most of the real- world and open blockchains currently rely on PoW. Incentive l ayer To guarantee persistence and liveness of a network, it is crucial to attract as many nodes as possible willing to participate in the consensus protocol. T o achieve this goal, there have to be incentives for nodes to participate in the blockchain extension process. In PoW and PoS mechanisms mentioned above, nodes that ex tend the blockchain and thereby contribute to correct functioning of the system, receive a reward for their contribution. 6 https://en.wikipedia.org/wiki/Byzantine_fault 6/22 In the Bitcoin ecosystem this process is called "mining", since with the creation of a new block the creator is rewarded with a predef ined number of newly created (mined) Bitcoins. The reward rule was defined by the Bitcoin creator and is a central rule in the system. The rule cannot be changed without agreement of the entire Bitcoin network. The block reward started at 50 BTC in block #1 and is defined to halve every 210,000 blocks. Thus, every creation of a valid block up to block #210,000 has been reward 50 BTC, while block 210,001 has been rewarded with 25 BTC. This is the only way Bitcoins are created. Consequently, the total number of Bitcoin cannot exceed the limit of 21 million BTC. Besides the "mining" of fresh coins, creators of valid blocks are paid transaction fees, such that in case all coins have been mined, there is still an incentive to participate and contribute to the ecosystem. Contract l ayer Transactions of Bitcoins consist of one or more inputs and outputs. An input denotes a previous transaction that transfers Bitcoins to the payer (of the current transaction ), an output assign s Bitcoins to the payee of the transaction. In the Bitcoin ecosystem inputs/outputs of transactions are defined as function associated with the transaction, so called scripts. For example, a transaction could have a timestamp associated with it, that allow s the transaction to be pending and replaceable until an agreed -upon future time, specified either as a block index or as a timestamp. Bitcoin has a basic set of instructions that can be used to define constraints/conditions on the execution of the corresp onding transaction. These scripting languages enable more sophisticated smart contracts. Smart contracts are programs stored in blocks of a blockchain that are executed if a set of conditions is fulfilled. This enables contractual partners to automate the execution of tasks without a third -party intermediary. Technically Bitcoin supports smart contracts too, but the scripting language is extremely limited making this type of feature impractical. Other blockchain frameworks contain rich scripting languages: for example, Solidity on Ethereum. Smart contract technology could therefore speed up business processes, reduce operational errors, and improve cost efficiency. Application l ayer The application layer is the point where users interact with the blockchain. In case of the Bitcoin framework, this would for example be a Bitcoin- Wallet that enables a user to transfer money to another user's Bitcoin- Wallet. 2.2 Changes in the architecture The s pecification and implementation of the layers presented in the previous paragraphs of this chapter define a blockchain system. As we had explained , it is not enough to define the data structure of a block only, but also requires the definition of the consensus mechanis m, the way nodes communicate, a language to define contracts, etc. This defines the rules of the game, which have to be followed by the nodes participating in the system. As such, the rules define/specify the elements in the blockchain system, for example, the client- software that allows end users to take part of the system. As it is the case for all data processing systems, the requirements might change over time or there may be bugs in the implementation that need to be fixed. As a consequence, data 7/22 struc tures or code may need to be changed and the system needs to be updated. Especially in the case of decentralized systems ( e.g., Bitcoin) this kind of changes/updates may be challenging. Changes/updates that affect the consensus rules of the system are call ed forks . In some sense they introduce "forking points" into the chain of blocks since after the change/update the governing rules of how the blockchain is extended chances. One differentiates between soft forks and hard forks . In case of a soft fork, node s do not require to update to maintain consensus, because blocks of the "new"/forked blockchain follow the old as well as the new consensus rules. However, nodes that did not update might not be able to produce new, valid blocks since the old set of consensus rules may violate the new set of consensus rules. In case of a hard fork, the new set of consensus rule s is not compatible with the old set of consensus rules. Consequently, all participating nodes are required to upgrade to the latest version in order to be compatible with the new version of the consensus rules. 2.3 Types of b lockchains Considering a blockchain as a distributed ledger [1], there exist two main types of blockchains: • Permissionless b lockchains : Examples of this type of blockchain are Bitco in [1] and Etherum [ 6]. The system is open and decentralized and allows any peer to join the network as a reader or writer. There is no membership management, which would ban malicious readers or writers. Typically, the consensus mechanism prevents malicio us behavior and guarantees security requirements up to a certain threshold of malicious peers. • Permissioned b lockchains : In this type of blockchains only an authorized set of writers and readers is admitted participating in the system. Examples of this type of bl ockchains is Hyperledger Fabric 7. Here a consortium of peers or a central entity assigns rights to peers that want to participate in the network. In terms of permissioned blockchains, we further distinguish between public permissioned blockchains and private permissioned blockchains. Whereas private permissioned blockchains restrict access to stored data to a set of peers that hold the necessary access rights, public permissioned blockchains allow every to access t he stored data and thereby to verify that the data has been stored according to the consensus rules of the blockchain. Note at this point, that verifiability of the content of a blockchain may interfere with privacy requirements. However, in many cases pri vacy is achieved by the use of cryptographic techniques to prevent leakage of private data when public verifiability is a requirement. 7 https://www.hyperledger.org/projects/fabric 8/22 3 Blockchain market analysis Blockchain technology can be integrated into multiple application areas. The primary use of blockchains today is as a distributed ledger for cryptocurrencies, most notably bitcoin. There are a few operational products maturing from proof of concept s [7] [8]. Here follows a market analysis with the aim of measuring the presence of this technology on the innovation sector and more specifically in Switzerland . 3.1 Blockchain's emergence Various studies estimate the future potential of blockchains and distributed ledgers as high to very high. In a 2018 study, the World Economic Forum (WEF)8 calculated world -wide efficiency gains of around 1‘000 billion USD for trade finance alone. Other areas of application include logistics (Maersk plans to optimize its container logistics), retail (IBM and Walmart are developing a solution for food safety), insurance (B3i is developing a smart contract solution for insurance contracts), energy (Axpo is developing a solution for peer -to-peer energy markets), transportation (Novotrans stores inventory level data for railway repairs) or public administr ation (the Netherlands are developing a border control system for passenger data). However, businesses have been thus far reluctant to place blockchain at the core of the business structure 9. Despite the hype, blockchain is still an immature technology, w ith a market that is still nascent and a clear recipe for success has not yet emerged. Unstructured experimentation of blockchain solutions , without strategic evaluation of the value at stake or the feasibility of capturing , means that many companies will not likely see a return on their investments. A study of the Internet of blockchain foundation 10 summarizes several applications using blockchain. It should be noted that, as will be discussed in the following chapters, the use of the blockchain is rarely essential : in most of these applications, the blockchain is used as a distributed logbook. Such applications can also be transposed to Switzerland. Further examples in this country include Modum (pharmaceutical supply chain), Swiss Prime Site (property management and rentals) and UBS (Utility Settlement Coin, trade finance, etc.). Next to improving efficiency, blockchains and distributed ledgers also open up numerous new fields of business, including new services ( e.g., digital identity), software development (e.g. new web services or so- called “distributed apps” or “dApps”) and specialist services (e.g. legal). Their successful implementation hinges on at least three critical factors: the availability of talents and their training at institutions of higher education, a well a functioning ecosystem of institutions of higher education, established players and startups (with good access to venture capital), as well as a flexible regulatory and legal framework. While Switzerland has a well -functioning ecosystem, it needs to catch up as regards the education of talents and access to venture capital. 11 8 https://www.weforum.org/agenda/archive/blockchain/ 9 https://www.ft.com/content/c905b6fc -4dd2- 3170- 9d2a -c79cdbb24f16 10 https://medium.com/@essentia1/50 -examples -of-how-blockchains -are-taking -over-the-world -4276bf488a4b 11 https://www.satw.ch/en/cybersecurity/technology -outlook -2019/ 9/22 Some probably overoptimistic financial forecasts on statista.com12 suggest that global blockchain technology revenues will experience massive growth in the coming years, with the market expected to climb to over 39 billion U.S. dollars in size by 2025. The financial sector has been one of the quickest to invest in blockchain, wi th over 60 percent of the technology’s market value concentrated in this field. The United States, Russia, China, and most of the G20 countries have devoted resources to blockchain solutions. The United Arab Emirates, led by its tech- hub in Dubai, aims to be the world’s first blockchain powered government; and the Australia National Blockchain aims to move the nation towards blockchain immersion. Many industry leaders have pooled into consortia — technology -specific, such as R3 and the Ethereum Enterprise Alliance; or business specific, such as the Hyperledger, Bankchain, TradeLens, and MediLedger. The goal for such co-opetition is to bring standards that lifts all boats, such as a Blockchain in Transport Alliance for supply chain management, or a Blockchai n Law Consortium for the legal industry. 3.2 Blockchain in a cademia Clarivate Analytics' Web Of Science 13 provides ac cess to multiple databases including comprehensive citation data for many different academic disciplines. Data retrieved from Web of Science indicate a clear interest and important volume of investment from Chinese institutions. While the number of academic publications from North American, European and Chinese institutions is comparable (~ 1'500 publication / year) , it is impressive observing the massively higher amount of Chinese investment : almost 10 times larger than European or North American countries . This could be interpreted in two ways: either as a brute force approach to generate scientific success by funding local institutions dispr oportionately, or as a strong signal to the world about the means available for Chinese academic development and innovation. In addition to this information , a quantitative analysis based on title and abstract of the publications on a rXiv 14 allows comparin g the number of publications covering blockchain or blockchain and cyber (Figure 5 ). As of 2018, a clear blockchain- hype is visible, and the first publications related to cybersecurity of blockchain appear. T his can be explained by the fact that the security concerns of an emerging technology often appear i n a second phase of development , or simply that other application domains, such as cybersecurity or cyberdefence are not correlated with blockchain interest. 12 https://www.statista.com/statistics/647231/worldwide -blockchain -technology -market -size/ 13 https://clarivate.com/webofsciencegroup/solutions/web -of-science/ 14 https://arxiv.org/ 10/22 Figure 5 arXiv p ublications containi ng the keywords “Blockchain” (in blue) and “Blockchain AND Cyber*” (in red). Source: S. Gillard , T. Maillart and D . Percia David . 3.3 Blockchain in Switzerland It is possible to observe that to date, blockchain innovation in Switzerland primarily originates from academia and industry, which in turn are stimulated by the financial sector. The defence sector, on the other hand, does not seem particularly active. Swiss institutions of higher education operate various research centres on the topic of “blockchain”; the EPFL and the ETH Zurich as well as the Universities of Basel, Lucerne and Zurich are very active in this field. The Swiss Confederation’s press release “Federal Council wants to further improve framework conditions for bl ockchain/DLT”, published on 14 December 2018, also triggered many social media posts.15 During its session on 19 June 2020, the Federal Council took note of the report on the need to amend tax law with regard to blockchain. The report concluded that no spec ial legislative amendments to tax law are necessary.16 The interest in blockchain in Switzerland is presented in the following indicators: analysis of jobs vacancies in Switzerland (Figure 6 ) and by geographical region (Figure 7)17. 15 https://www.admin.ch/gov/en/start/documentation/media -releases.msg -id-73398.html 16 https://www.efd.admin.ch/efd/en/home/dokumentation/nsb -news_list.msg -id-79513.html 17 Figure 6 and 7 are based on the automated Technology and Market Monitoring (TMM) system developed by armasuisse S+T. The data is collected by a web crawler that searches through publicly available sources, such as commercial registers, company w ebsites and social media channels. The data is searched at regular intervals and updated monthly by TMM. Thanks to TMM, companies can be located along with relevant information such as the products, services and technologies that they offer. 11/22 Figure 6 N umber of bl ockchain jobs opening in Switzerland. Source: TMM armasuisse S+T Figure 7 Blockchain activities based on companies’ websites in Switzerland. Source: TMM armasuisse S+T 12/22 3.4 A brief h istory of the Crypto Valley Switzerland has become a center for new business ideas in the field of blockchain and distributed ledger technology (DLT). In particular, originally based in the canton of Zug, Crypto Valley has established a worldwide reputation as a hub for global growth, resulting in a high density of blockc hain and DLT companies throughout Switzerland. The country is known worldwide for its privacy -conscious legislation, world- class talent and its openness. Like blockchain, Switzerland is also organized in a decentralized way, which has a positive effect on understanding this new technology. The state government’s open and proactive attitude has led to favorable conditions for blockchain companies, which has created an ecosystem that produces world premieres: in 2016, Zug became the first city in the world to accept Bitcoin payments for tax purposes; in 2017, Crypto Valley announced the introduction of a decentralized Ethereum -based digital ID system; and in 2018, the fintech company Amun launched the world’s first crypto index product on the SIX Swiss Exchang e. 3.5 Blockchain and patents In this market analysis, we have deliberately omitted patent data analysis. Well aware that i n order to identify new competitive products and processes it is necessary to have access to detailed informatio n on technological innovations, but analysis of software patents is often misleading. While for other products analysis on filed patents could be a n effective method to obtain such information, for example by indicating the types of products and processes that companies are plan ning to introduce to the market; w hen it comes to software, quantitative patent analysis distorts the reality . In fact, the vast majority of blockchain- based solutions are based on open -source technologies, and the legislation governing the patentability of software is extremely heterogeneous globally [9]. In this sense, we observe the largest number of patents in countries (such as China 18) where patenting software is simple. 18 We observe t hat China fills most of the blockchain -related patents (49%). The US is the second chosen jurisdiction for filing blockchain patents (19%); a 12% of patents documents are worldwide applications that have gone via Patent Cooperation Treaty (PCT) through the Word Intellectual Property Office (WIPO). Korea and Japan are also leading countries for blockchain patent filings; other key regions where protection is sought are Australia, Canada, Taiwan, India and Singapore. Great Britain is the first European countr y for blockchain patents, followed by Germany. 13/22 4 Can a b lockchain solve your problem? In the previous chapters, we provided a brief description of the components and properties of a blockchain and a market analysis as well . Many of the component observed are not exclusive to the blockchain technology: distributed databases exist in many for ms, cryptographically signed chain of events too, etc. Here we present three steps that allow you to decide whether a blockchain is the right technology to solve your problem or not. 4.1 Storing i nformation in an untrusted e nvironment In [10] the authors present a decision graph that allows you to decide whether a Blockchain is the right tool to solve a given problem. They consider the three main types of blockchain (permissionless, public permissioned and private permissioned) and a guide for decision - making (Figure 8 ). Figure 8 Decision graph: choosing the right Blockchain type in an untrusted environment . Necessity to store s tate changes : is state essential for your stored data? A blockchain, as a form of a database, stores information in sequential order and ensure the integrity of the data and of its order. In this context , "is state essential" indicates the need to store information in a given sequential order and to protect it s integrity . This must be an essential requirement in order for the blockchain data structure to make sense. Multiple w riters : are there multiple writers? Although straightforward , it is worth remembering that if only a single entity is responsible for writing data, the integrity and authenticity of the data can be guaranteed without the use of a blockchain. Trusted t hird p arty: can you use an always -online TTP? If there is a trus ted third party (TTP), this can verify the state changes and guarantee transitions correctness. The TTP could be used as a trusted writer in case the TTP fulfills the availability requirements. In this case, from a purely technical point of view, a databas e would be a better and more performing solution. 14/22 In case the TTP does not meet the availability requirements, the TTP, acting – for example – as a Certificate Authority, can establish a group of trusted writers. The TTP in that sense ensures that the secu rity requirements are met. Known writers : are all writers known? If participants do not know each other, and there is no agreement on a common trusted third party, the solution – as in the case of cryptocurrencies – is an open blockchain. Trusted w riters : are all writers trusted? If all the writers are trusted there is obviously no need for a system that guarantees integrity and sequential order of entries, since by definition writers act according to the rules. On the other hand, if we consider the case that writers could be malicious and try to compromise the integrity of the stored data and the correctness of each transaction, a blockchain could be the ideal solution. Public verifiability : is public verifiability required? Finally, it is possible to allow access to the blockchain, without the possibility of changing the chain status, to allow third parties to verify the state of the data saved, and consequently their correctness at all times. 4.2 Interaction with the physical world Depending on the type of blockchain chosen with the help of the decision graph previously presented, we find ourselves in a situation where writers are either unknown, not trusted and therefore potentially malicious. Hence, we provide an additional set of observations with the aim of making the reader aware of the limits of the blockchain when interaction with the physical world becomes necessary (Figure 9) . Figure 9 Using a blockchain when interacting with the physical world. Can state be validated wit h information available on the chain ? It is necessary to be aware of one additional, fundamental aspect before choosing a blockchain as a technical solution: a blockchain can guarantee that an entry in the ledger reflect s the corresponding state only if data and its state changes can be validated with information available on the chain itself . This is the typical scenario i n financial applications, where for 15/22 instance the creation of crypto currencies are the product of the mining process and therefore no interaction with the physical world is ever required. Consensus and integrity : must state veridicity be guarantee? Consequently, if someone wants to capitalize on the characteristics of a blockchain as a whole, he has to find a use case where both data and its state changes can be validated with information available on the chain and they do not depend from external sources. If we consider the two main security properties provided by a blockchain as 1. consensus about the current state of the blockchain 2. guarantee that the blockchain cannot be changed afterwards there is an interesting requirement of cryptocurrencies: in the cryptocurrency case, where the blockchain provides some sort of a ledger, the user does not care about the honesty of the writers. If the ledger contains a transaction according to the user expectations, he has by property 1 the guarantee that everybody agrees that he owns now the money and by property 2 that there is no way the money could be taken from his wallet. In that sense the main value is that it is in the blockchain and that nobody can cha nge it. Following the decision graph presented above, as soon as this kind of "guarantee of veridicy" or "trust" exists, there is the question if the blockchain is then still the right tool, since then one could most probably also trust that the writer doe s not change it afterwards. Decentralized logbook On the other hand, in m any non-cryptocurrency applications , the main role of the blockchain is to provide some kind of a verifiable decentralized logbook where information originated in the physical world are stored on the chain. Typically, the content of a block is reserved to transactions and smart contracts, but this is not mandatory. It is possible to use a blockchain as distributed storage by adding arbi trary data to each transaction. Although it is not possible for a blockchain to provide any guarantee that this arbitrary data in the ledger reflects a corresponding state of the reality, this immutable, distributed and secure data mod el makes it very attractive to add arbitrary information form physical world on a blockchain. In contrast to the cryptocurrency case, where the main value is the entry in the bl ockchain itself, in these scenarios, the main value lies in the fact that the content in the blockchain reflects the corresponding state in the physical world. Thus, it requires trust into the one who reported the physical value written in the blockchain. In case of a violation of the rules in the physical world, the blockchain allows detecting and tracing previous operations, but does not prevent an incorrect write to happen. 4.3 Starting a new blockchain or relaying to an existing one By separating out the architecture of the Blockchain into multiple layers, we could better study the various properties that we want the Blockchain to enjoy and where they need to be implemented. Lastly, before choosing the right solution for a blockchain other aspects ha ve to be taken in account: 16/22 • Security : no party should be able to control a majority of some scarce resource (typically computing power) , and therefore to convince nodes that an alternate version of the ledger is the valid one, • Liveness : nodes can add new blocks to the ledger with acceptable latency, • Stability : nodes in the network should not alter their opinion of the consensus ledger (except in very rare cases), • Correctness : only blocks that represent valid transactions (i.e. they conform t o a specification of how new blocks may relate to previous blocks) may be added to the ledger. Because of all these characteristics, when blockchain fits your requirements, you will have to choose carefully if you want to create your own new blockchain or to use an existing live, solid and stable chain. 17/22 5 Blockchain in d efence: Military application of blockchain Based on the elements and decision- making processes presented above, it is now possible to assess whether the blockchain is the right solution for an application. In this chapter, we carry out this type of analysis systematically. As presen ted in the previous chapter, using an open or permissioned blockchain is justifiable when multiple mutually mistrusting entities want to interact in order to change the state of a system, and are not willing to agree on an online trusted third party. Among the most cited applications in the military press, we present three of them covering supply chain, detached labels and messaging applications. Even for these specific examples, the three applications have not reached a sufficient stage of maturity into the military domain today. Before analyzing individual cases, it is important to revisit two fundamental concepts, as stated in [10] and [ 11]; using a blockchain in a particular application scenario make sense when: 1) the scenario requires multiple mutually mistrusting entities to interact and record or change some state of a system, and 2) in respect to use of a common online Trusted Third Party (TTP): the entities are not able to agree on such TTP or the implementation o f such a common TTP is not possible. It is obvious that the first condition is not the case in most of the national and alliance peacetime operations, as usually there are some pre -existing trust arrangements between the parties involved in the interactions. Nevertheless, situation is different when it comes to federated mission operations. 5.1 Supply c hain for logistics and p rocurement Scenario: The modern military logistics and supply chain brings together hundreds of different military and private sector c omponents [12]. With so many participants, there are numerous points of friction that introduce numerous failure points, unnecessary costs, and result in inaccuracies and misrepresentation. By providing a single source of truth and supporting intelligent a utomation, blockchain is a technology candidate to address these challenges and allows keeping track the origins and history of transactions in various commodities. Moreover, integrating blockchain within each step of an operation to secure and share data throughout the manufacturing process, including design, prototyping, testing, and production; deployment blockchain may offer the defense procurement a solution 19. Using a public infrastructure such a blockchain could ease integration with non- military partners, as well as facilitates civil -military cooperation without depending of a common trusted authority (or cross -signed PKI certificates sharing multiple authorities). Choosing a b lockchain: in a logistic and procurement environment, storing state (e .g. equipment inventory) is critical; moreover, a supply chain can be complex and requires multiple writers. If a trusted third party is agreed among all the writers, a blockchain is not necessary; on the other hand, if it is not possible to agree on a TTP a blockchain- based solution might make sense. In case of a supply chain, depending on the confidentiality of the saved information, you can choose the blockchain model. 19 https://www.army.mil/article/227943/blockchain_for_military_logistics 18/22 Interaction with the physical world : in this particular case, the correctness of the information entered in the blockchain is crucial; it would be a failure if the information stored did not correspond to reality. To solve this problem, we could then delegate the responsibility to inventory the assets to an external body or use certified s ensors, which ensure - for example - the inventorying of the assets. In the first case, this means we would agree on a TTP responsible for data entry; in the second case we would accept data entry only by certified sensors (trusted writers): in both cases, we would find ourselves in a situation where the blockchain is no longer needed. For this type of application, the use of a database (centralized or decentralized) would be more effective and performant. 5.2 Detached l abels and p roof of o wnership in a federa ted e nvironment Scenario: in [11], the author suggests using a distributed ledger for implementing a distributed solution for storing detached labels. The proposed solution aims to add a tool for information security in organization. Hence, ensure traceability and offer a transparent service to verify a metadata co llection for classified information (e.g. ownership, classification, expiration). Such labels include metadata- describing data objects as defined in STANAG 4774. Metadata are neither directly attached to nor stored with the data objects. For such applicati on, it seems to be efficient to write this information in a blockchain as detached metadata instead of depending of a PKI infrastructure. In particular, authors propose to allow only data originators to assign security marking to a document (proof of owne rship). Moreover, the blockchain shall be publicly readable, so that any party requiring access to the data or receiving the data could be able to verify the security requirements for handling and protection of a particular data object. The security classi fication itself can change over time: for example, due to a de- classification of information after some period of time. As an additional application in the physical world, the same infrastructure could be used to keep an inventory of the physical copies of a sensitive document, recording new item creation (e.g. reproducing documents), as well as their destruction and confirmation of destruction. Choosing a blockchain: In this specific case, it is essential to save the status of the information, allowing th e different data originators to enter information. Moreover, the author assumes that it is not possible to have a TTP always online. The choice of an open or permissioned blockchain is left to the user, as long as it is possible to verify the information ( unrestricted or limited to a restricted group of clients). Regardless of the solution chosen, it will be necessary to assess the impact of an open or public blockchain on the confidentiality of the metadata entered. Here, it is assumed that only the data originator, who first registered an object on the blockchain, or the users to whom he delegated the responsibility, can update its state. This is interesting, because it increases - without certain guarantees - the feeling of correctness of the information entered. 19/22 Interaction with the physical world : the main point in this scenario is the proof of ownership and the consequent exclusive responsibility to update the state of an object in the distributed ledger assigned to the first user who claims its ownership. To avoid with certainty that a malicious w riter cannot claim ownership of an asset that does not belong to him, we should delegate the writes to a TTP or trust all writers, in both cases a blockchain would then not be necessary. Moreover, it is realistic to think that the status associated with th e assets described in the blockchain changes regularly over time: what to do if the data originator can no longer change the status of an asset (for example, no longer having access to the credential used to demonstrate its ownership)? Probably you should decide to have a super partes TTP capable of reassigning the ownership of an asset or instead to give up updating the status of an asset. 5.3 Messaging Scenario: Since 2016 DARPA invested about 1.8 mio. dollars to study public blockchains use cases20,21. DARPA asked experts to develop efficient methods to use blockchain technology to support messaging application. Objective of the mandate is to use the stable and reliable infrastructure of existing blockchain such Bitcoin or Ethereum as a transport layer for m essages. In this specific scenario, DARPA does not aim to use blockchain properties as in the case of crypto currencies, but rather seeks to exploit existing blockchain as a method of transporting messages. Choosing a b lockchain: Now, aware that for this type of approach, according to the decision graph in chapter 4, an open blockchain is the solution sought (as independent from an authorization system such as a certificate authority) there are two challenges to solve: • The first one concerns anonymity: it must not be possible to trace and identify who pushed a message to a node participating in a blockchain. It is good to remember the communication between nodes (miners) participating in a blockchain is different for each solution, as is the fee required for each transaction. As an example, the bitcoin communications are not encrypted, so it would be possible, by analyzing the network traffic on a large scale, to trace the source of a message. On the other side, Ethereum communication between nodes is encrypted (while it is not for the discovery of nodes); in this case, it would probably be possible to leave a message without third parties tracing its origin. • Secondly, it must not be possible for third parties to retrieve the content of the message. Encrypti ng a message and depositing it on the blockchain is not enough, as the encrypted message would remain potentially available to analysts forever. In the future, it will be possible to decipher it with the help of more powerful computers, or by exploiting cy pher vulnerabilities unknown today. Based on this latest observation, one can envision exploiting the temporary information used by a network of miners (e.g. discovery protocol) to insert obfuscated messages in the transmission of data between nodes. In t his case, the use of the blockchain might actually be interesting. Even so, at this very moment, no pragmatic and efficient solution has been released. 20 https://sociable.co/technology/darpa -explores -blockchain- to-develop -unhackable -code -for-military/ 21 https://media.consensys.net/why -military -blockchain -is-critical -in-the-age-of-cyber -warfare- 93bea0be7619 20/22 5.4 Further b lockchain use -cases in D efence In 2016, the US Department of Homeland Security (DHS) announce d a project that would use blockchain as a means of securely storing and transmitting the data it captures. Using the Factom22 blockchain, data retrieved from security cameras and other sensors are encrypted and stored, using blockchain as a means to guaran tee data distribution, integrity and traceability . The project is still ongoing. Many other proposals for military applications were analyzed in the preparation of this technology review [13] [14] , but none of them essentially requires the fundamental pr operties to be found in a blockchain. 22 https://www.coindesk.com/factom -blockchain- project -wins -grant -to-protect -us-border -patrol -data 21/22 6 Conclusion In this review, we presented the architecture elements composing a blockchain environment, a series of questions guiding the reader to choose , or not to choose a blockchain technology stack . Moreover, we presented how to select the right blockchain between permissionless , public permissioned and private permissioned. We also brought to light the benefits and limitations of blockchains, particularly with regard to the integration of information from external sources that are not trusted. A market analysis from a global and regional perspective highlights many initiatives, these are not related to defence but mainly to the financial world. In addition, there is great interest in using the blockc hain as a transparency tool where there is a need to publish data, guaranteeing its integrity and immutability without necessarily being linked to a reference authority. Many experts bet on the future stability and performance of blockchains, allowing gene ric information storage and distributed traceability. Especially in government applications, the need of public decentralized verifiability of information where the government itself cannot act as a single, perpetual trusted authority, a distributed ledger could provide a solid base for shared democracy data. Most of the applications depend on existing chains such as Ethereum , because of its stability, liveness and the ability to integrate complex smart contracts. Nevertheless, solutions like the ones proposed in the Hyperledger umbrella project could dramatically increase the performances of a blockchain network, giving the ability to script more complex smart contracts (e.g. Go, JavaScript) and become the reference in the open source community. Finally, we presented three interesting examples for defense, extremely different from each other: a supply chain scenario for logis tics management, a metadata repository with a focus on information ownership, and the exploitation of a blockchain to convey messages. In all cases the use of the blockchain is possible but not necessary. In cases where a form of "trust" is necessary, th e question always comes back if the use of the blockchain is essential or if a central or distributed database can be a more efficient solution. From a military point of view, despite the interest aroused by this technology, to date there are no blockchai n-based products integrated into defense systems. In particular, the need to have no trusted authority and the awareness that information stored on a blockchain cannot be removed in the future, makes this type of solution not suitable for tactical applicat ions where the control of the life cycle of an information is crucial. The focus goes on federated environments where mistrusting entities need to share information or proof some sort of ownership or presence, but advantages are not evident compared to exi sting information sharing solutions and could have a negative impact due to the overhead introduced (e.g. infrastructure, responsiveness, energy consumption). We are convinced that information decentralization, distributed databases and a zero -trust archit ecture are fundamental elements for future interconnected tactical systems; however, with the elements presented in this document, we can say that the blockchain is not necessarily required to address these design goals . 22/22 7 Acknowledgements We would like to thank Arthur Gervais for his feedback and suggestions for this technology review . Moreover, we would like to thank Sébastien Gillard, Thomas Maillart and Dimitri Percia David for Figure 5. 8 References, bibliography and additional resources [1]: S.Naka moto, "Bitcoin: A Peer -to-Peer Electronic Cash System", https://bitcoin.org/bitcoin.pdf, 2008. [2]: R. Zhang, R. Xue, L. Liu, "Security and Privacy on Blockchain", ACM Computing Surveys, 2019. [3]: Seoung Kyun Kim et al., " Measuring Ethereum Network Peers ", Internet Measurement Conference , 2018. [4]: T. Locher, S. Obermeier, Y. Pignolet, "When Can a Distributed Ledger Replace a Trusted Third Party?", IEEE Blockchain, 2018. [5] Ittay Eyal, Emin Gü n Sirer , Majority is not Enough: Bitcoin Mining is Vulnerable , International Conference on Financial Cryptography and Data Security , 2013. [6]: V. Buterin , "Ethereum Whitepaper ", https://ethereum.org/en/whitepaper/, 2013. [7]: M., K rótkiewicz M., Srinilta C. Intelligent Information and Database Systems. ACIIDS 2020. Communications in Computer and Information Science, vol 1178. Springer, Singapore [8]: Ford, B . Technologizing Democracy or Democratizing Technology? A Layered- Architecture Perspecti ve on Potentials and Challenges, 2020. [9]: Bhatt P.C., Kumar V., Lu TC., Cho R.LT., Lai K.K. Rise and Rise of Blockchain: A Patent Statistics Approach to Identify the Underlying Technologies. 2020. [10]: K. Wüst, A. Gervais, "Do you need a Blockchain?", Crypto Valley Conference on Blockchain Technology (CVCBT), 2018. [11]: K. Wronay, M. Jarosz, "Does NATO need a blockchain?", NATO Communications and Information Agency, Milcom, 2018. [12]: Hsieh, M., & Ravich, S.. Leveraging Blockchain Technology to Protect the National Security Industrial Base from Supply Chain Attacks. Researc h memo, Founda tion for Defense of Democracies, 2017. [13]: Sudhan, A., & Nene, M. J . Employability of blockchain technology in defence applications. In 2017 International Conference on Intelligent Sustainable Systems (ICISS) (pp. 630- 637). IEEE. [14]: Tarhini, A., & Chedrawi, C. Blockchain in the security and defense sector, 2019.
{ "id": "2103.02606" }
2103.16216
A Regulatory System for Optimal Legal Transaction Throughput in Cryptocurrency Blockchains
Permissionless blockchain consensus protocols have been designed primarily for defining decentralized economies for the commercial trade of assets, both virtual and physical, using cryptocurrencies. In most instances, the assets being traded are regulated, which mandates that the legal right to their trade and their trade value are determined by the governmental regulator of the jurisdiction in which the trade occurs. Unfortunately, existing blockchains do not formally recognise proposal of legal cryptocurrency transactions, as part of the execution of their respective consensus protocols, resulting in rampant illegal activities in the associated crypto-economies. In this contribution, we motivate the need for regulated blockchain consensus protocols with a case study of the illegal, cryptocurrency based, Silk Road darknet market. We present a novel regulatory framework for blockchain protocols, for ensuring legal transaction confirmation as part of the blockchain distributed consensus. As per our regulatory framework, we derive conditions under which legal transaction throughput supersedes throughput of traditional transactions, which are, in the worst case, an indifferentiable mix of legal and illegal transactions. Finally, we show that with a small change to the standard blockchain consensus execution policy (appropriately introduced through regulation), the legal transaction throughput in the blockchain network can be maximized.
http://arxiv.org/pdf/2103.16216v1
Aditya Ahuja, Vinay J. Ribeiro, Ranjan Pal
cs.GT, cs.CR
cs.GT
A Regulatory System for Optimal Legal Transaction Throughput in Cryptocurrency Blockchains Aditya Ahuja Indian Institute of Technology Delhi New Delhi, India aditya.ahuja@cse.iitd.ac.inVinay J. Ribeiro Indian Institute of Technology Bombay Mumbai, India vinayr@iitb.ac.inRanjan Pal University of Michigan Ann Arbor, USA palr@umich.edu ABSTRACT Permissionless blockchain consensus protocols have been designed primarily for defining decentralized economies for the commercial trade of assets, both virtual and physical, using cryptocurrencies. In most instances, the assets being traded are regulated , which man- dates that the legal right to their trade and their trade value are determined by the governmental regulator of the jurisdiction in which the trade occurs. Unfortunately, existing blockchains do not formally recognise proposal of legal cryptocurrency transactions, as part of the execution of their respective consensus protocols, result- ing in rampant illegal activities in the associated crypto-economies. In this contribution, we motivate the need for regulated blockchain consensus protocols with a case study of the illegal, cryptocurrency based, Silk Road darknet market. We present a novel regulatory framework for blockchain protocols, for ensuring legal transaction confirmation as part of the blockchain distributed consensus. As per our regulatory framework, we derive conditions under which legal transaction throughput supersedes throughput of traditional transactions, which are, in the worst case, an indifferentiable mix of legal and illegal transactions. Finally, we show that with a small change to the standard blockchain consensus execution policy (ap- propriately introduced through regulation), the legal transaction throughput in the blockchain network can be maximized. CCS CONCEPTS •Security and privacy →Distributed systems security ;•Ap- plied computing →Electronic commerce ;Digital cash ;Se- cure online transactions ;Electronic funds transfer ;E-commerce infrastructure . KEYWORDS Legal Cryptocurrency Transactions, Regulated Blockchain Con- sensus Protocols, Regulated Blockchain Stochastic Games, Nash Equilibria 1 INTRODUCTION Decentralized financial institutions are a novel, emerging economic infrastructure. These institutions are based predominantly on cryp- tocurrencies for the trade of assets, both physical and virtual. It has been established that the collective market capitalization of cryp- tocurrencies is over $1 trillion (as of early 2021) [ 51]. This shows promise in the long term presence and viability of cryptocurrency based markets, in competition with (and possibly as a replacement of) federally administered centralized financial institutions. How- ever, these cryptocurrency based markets survive solely on thecorrectness of the underlying computational principles, which are a basis of the efficacy of these economies. More specifically, in order to sustain these cryptocurrency based decentralized economies, blockchain consensus protocols serve as a technical foundation. Existing blockchain protocols for cryptocurrencies address one of (or any combination of) the following system goals: speed, se- curity and decentralization . Unfortunately, these system goals are necessary but insufficient. Illegal activities propelled through the strategic use of blockchain based cryptocurrencies, is a serious problem staring at the face of many world governments today [47]. These illegal activities exploit the permissionless nature of the blockchain networks for illegal trade, to strategically defeat regulation by obfuscating the jurisdictions of the blockchain users through anonymity, making federal legal rules inapplicable [ 36]. In this contribution, we introduce a fourth pillar of correctness for ensuring confidence in blockchain based cryptocurrencies: legality . More specifically, we address the problem of legal cryptocurrency based trade of regulated assets: assets whose value and trade terms are overseen by the respective governments1. The Problem Setting For fear of legal scrutiny and persecution, law abiding cryptocur- rency blockchain users may sign up and get authorization from their respective governments (for instance, through the issuance of the BitLicense in New York, USA [ 8]) to commit solely to legal cryptocurrency based trade of regulated assets, and the respec- tive regulator (for instance, the New York State Department of Financial Services in the case of BitLicense [ 8]) may license these law abiding blockchain users to legally participate in the crypto- economy. However, this does not preclude illegal transactions going on chain. Remembering that the blockchain network is permission- less, there will always exist unregulated transactors and executors of the consensus protocol that propose and mine/validate dubious transactions having an indeterminate legal status, while faithfully following the consensus protocol. Consequently, there opens up a competition in dubious versus legal block proposal between unreg- ulated and regulated consensus protocol executors (respectively), and that competition is dependent on how much consensus re- source (for instance, mining power in proof-of-work blockchains and stake in proof-of-stake blockchains) in the blockchain network, do the regulated consensus protocol executors possess as a whole. This finally results as a problem for the federal regulatory body to 1Regulated assets include but are not limited to the following asset classes: cryptocur- rencies (evidence of regulation: [ 52]), alternate virtual assets (for example copyrighted digital content), physical commodities (for example gold, water, energy), real-estate, etc.arXiv:2103.16216v1 [cs.GT] 30 Mar 2021 , , Aditya Ahuja, Vinay J. Ribeiro, and Ranjan Pal strategically decide on how much consensus resource to license in the blockchain network, and what block proposal strategies to advise to the regulated consensus protocol executors, for reasonable guarantees on legal transaction throughput. The resultant open questions that we address, are: (i) given a per- missionless blockchain network for cryptocurrency based regulated asset trade, can there exist a framework where, without degrading the anonymity/privacy of the blockchain users, legal transactions can be clearly identified and confirmed in the blockchain network?; and (ii) can we derive conditions, as a function of the regulated consen- sus resource in the blockchain network, in which legal transaction throughput supersedes dubious transaction throughput? Our Research Contributions In this paper, we first motivate the need for designing regulatory frameworks for legal cryptocurrency based trade of regulated assets, through the study of the Silk Road darknet online market [45–47] (Section 2). We then make the following research contributions. (1)(A Regulatory Framework) We define a regulated blockchain consensus system for existing permissionless blockchain protocols that support cryptocurrencies (Sections 3 and 4), where the goal of the consensus protocol executors is to maximize their rewards from participating in the consensus protocol, and the mandate of the regulator is to maximize the legal transaction throughput in the blockchain protocol. (2)(Block Proposal Competition) Consequent to our regulated consensus framework, there ensues a competition in block proposal between regulated and unregulated consensus ex- ecutors. We formalize this competition through a two player stochastic game [39, 40, 44] (Section 5), and, we show that: (a)(Under Immediate Block Release [ 39])When the regulator licenses between 58%and100% of the consensus resource, the unregulated executors can do no better than adding legal blocks at the end of the longest unconfirmed branch of legal blocks (Section 5.2), thereby maximizing the legal transaction throughput. (b)(Under Immediate Block Release [ 39], With An Oversight Compliance Fee [ 40])When the regulator licenses be- tween 50%and58%of the consensus resource, given that the regulator incentivizes to build on the branch of legal blocks with a pay forward scheme (similar to [ 40]), the unregulated executors can do no better than adding le- gal blocks at the end of the longest unconfirmed branch of legal blocks (Section 5.3), again maximizing the legal transaction throughput. (c)(Under Strategic Block Release [ 37,39])When the reg- ulator licenses between 33% and50% of the consensus resource, given that regulated executors strategically re- lease a subset of the blocks notarized by them (similar to the selfish mining attacks [ 37,38]), and the unregulated executors faithfully follow the longest branch rule, the regulated executors can prune/orphan some notarized but unconfirmed dubious blocks to increase the legal transac- tion throughput, beyond their fair share of legal transac- tion throughput. However, when the regulator licenses be- tween 0%and33%of the consensus resource, the regulated NetworkBlock ConsensusSmart Contract / Virtual MachineApplication Blockchain System Stack executors + regulatorsagreement on legal transactionsdecentralized , regulated economy consensus executorsagreement on transactionsdecentralized economy Figure 1: Traditional vs Regulated Blockchain Systems consensus executors can do no better than building on the longest unconfirmed branch of dubious blocks (Section 5.4), resulting in legal transaction throughput proportional to their consensus resource. Blockchain based crypto-economies are defined using a four layer system stack [ 27]. The difference between a traditional instantiation of the blockchain stack and an instantiation corresponding to our regulated blockchain system is depicted in Figure 1. 2 CASE STUDY: THE SILK ROAD DARK WEB MARKET We first give a brief study on the operation of the Silk Road Darknet Market, which flourished through the illegal use of the Bitcoin cryptocurrency. 2.1 An Overview of the Silk Road Marketplace Anonymity is the most prominent institution of the Deep Web. Each user (buyer and seller) is identified by a username, with a secret true identity. Deep Web users record market interactions through forums and blogs. Consequent to the anonymity it provides, black market activity over the Deep Web is highly feasible and attrac- tive. Web traffic is anonymized through TOR, and Bitcoin serves as an untraceable virtual currency. Email interactions to discuss illicit transaction details are encrypted through PGP. These three network, email and currency elements serve as the technological foundation to build an illegal market, with low cost illegal trans- actions. Given that previously illegal transactors relied heavily on in-person deals and reputations built on personal encounters, Deep Web based illicit markets resulted in a paradigm shift for illegal activities on a global scale [45]. The Silk Road online (mostly) narcotics trade marketplace has flour- ished anonymously on the Deep Web since 2011. A study aimed at the discovering the realities and motives of operations (naviga- tion and purchase) by drug users on the Silk Road marketplace has been conducted [ 46]. The study was conducted through strategic online observations, four month long fieldwork on marketplace site discussion threads and twenty anonymous online interviews of a sample of adult users. A Regulatory System for Blockchains , , 2.2 Illicit Transactions employing Bitcoin The Silk Road marketplace is inferior to traditional online sites (such as eBay), due to its bad Bitcoin escrow implementation : the ability to undo a transaction. Standard escrow requires that if the trade is deemed fraudulent, the traded assets are returned to the seller, and the escrow service refunds the currency to the buyer. In case of fraud, market users only lose their service fee. Typical of illegal marketplaces, Silk Road purchases cannot be undone: drug sellers do not provide return addresses, and a perfect escrow service cannot exist (although a rudimentary escrow can) that satisfies both the buyer and the seller, simultaneously [45]. A prominent drug study [ 46] concluded that many narcotics buy- ers were not technically proficient and faced trouble in arranging for Bitcoin credit and accessing the Silk Road website via the Tor browser. An anonymous interview of an adult drug user revealed his drug procurement process over Silk Road. The said user was able to procure Bitcoins with minimal paperwork from a particular bank, with no self identifying information submitted to the bank. By the end of the day, the user had Bitcoins credited to his Silk Road account. (S)He then went to the narcotics’ vendor webpage, added the drugs to his shopping cart and entered an encrypted postal address for the drug delivery, thereby confirming the order. The user even employed an escrow system to avoid being scammed by the vendor. Consequently, the Bitcoins are not delivered to the vendor until the drug package reached the user and the order was finalized. Thousands of Bitcoin worth approximately a billion US dollars connected with Silk Road based drugs and goods trade have been confiscated by the United States Justice Department, the biggest seizure in history of the agency [ 48]. This motivates the need for preemptive monetary investment by the regulator to ensure only legal transactions are confirmed on-chain (as is suggested in Sec- tion 5.3) to minimize the cost associated with law enforcement and the recovery of illegal cryptocurrency, and reduce illegal activity through the blockchain. Very recently, senior authorities from the US Treasury Depart- ment and the European Central Bank have also formally recognised the use of Bitcoin and other cryptocurrencies for illegal activities, and are strongly considering regulation in these digital economies [24, 25]. The drug study, seizures and recent concerns raised by authoritative figures in prominent financial bodies advocate that, at least the Bitcoin protocol, is rife with issues of confirmed illegal transactions, and appropriate regulatory mechanisms are need to be enforced to define legal, decentralized crypto-economies. 2.3 Motivation for a Regulated Blockchain Protocol Blockchain systems are defined with a four layer system stack (from bottom to top): the network layer, the consensus layer, the smart contract layer, and the application layer [ 27]. Given the pressing need for a regulatory framework for blockchains, we now moti- vate how introducing regulation for blockchain transactors and consensus protocol executors is a prudent choice for the regulatory body.Problems with Super-Consensus Layer Solutions. Without consid- eration of the network and consensus layer, regulatory policy can only be enforced at the smart contract layer, given that the ap- plication layer is confined to the decentralized trade of regulated assets. Unfortunately, there are two problems associated with reg- ulatory policy enforcement at the smart contract layer: (i) As it has been observed in Section 2.1, most times when a blockchain user is involved in illegal trade, its digital identity is difficult to map to a specific federal jurisdiction. This makes it hard to enforce regulation rules as a distributed program (which is the executed at the smart contract layer). (ii) A smart contract layer enforcement of regulation will take time to achieve consensus + time to execute the smart contract . This would be slower in contrast to consensus layer only enforcement of regulation. Regulating Blockchains at the Consensus Layer. One approach to regulate the blockchain system, to ensure legal transaction proposal and confirmation, is to license the blockchain consensus protocol executors who take it upon themselves to add (provably) legal transactions to their blocks, and run the consensus protocol on these blocks. We give details of this regulatory approach, next. 3 THE REGULATED BLOCKCHAIN SYSTEM MODEL We now detail our regulated blockchain system model. We first give a short summary on the principles of blockchain consensus, and give some foundational definitions and assumptions. We then give the design goals and protocol features (with their motivations) for our regulatory framework. Finally, we give the threat model in our setting. 3.1 A Brief on Blockchain Consensus The original consensus algorithm in a blockchain network is proof- of-work (PoW), where the protocol participants, called miners , solve a crypto-puzzle requiring a significant amount of computation, to add (notarize) blocks as part of the blockchain. On successfully adding a block to the blockchain, miners are eligible for a block reward in the form of cryptocurrency tokens, for their effort. Given that computation is the only resource that dominates the result of consensus, miners might form a pool of their computation power together [ 37] to increase their chances of solving the puzzle, adding their blocks to the blockchain, and consequently winning the block reward. An alternate, dominant family of blockchains follow a proof-of- stake (PoS) consensus regime. In proof-of-stake, blockchain protocol executors validate the correctness of blocks as a function of the number of coins / digital tokens they possess in the blockchain network, which is referred to as their stake . Remembering that digital tokens are a replicatable resource, one possible attack in these blockchain systems is that protocol executors can duplicate and pitch their coins in every block competing to be added to the blockchain, in order to maximize their chances of winning the block reward. This attack is called a nothing-at-stake attack [31]. , , Aditya Ahuja, Vinay J. Ribeiro, and Ranjan Pal 3.2 Stakeholders, Terminology, Assumptions, and Notation We define the stakeholders in our regulated decentralized economy, and give the associated terminology and assumptions, first. •Transaction and Block Types: We will assume there are two types of transactions: legal ordubious . Transactions whose legal status can be established for certain will be called legal. All other transactions would be called dubious. A block that contains at least one dubious transaction will be called a dubious block . A block that contains only legal transactions will be called a legal block . A legal block generated by a regulated consensus protocol executor (defined later) will be called a regulated block . •A Body of Regulators: We will assume the existence of a cross- jurisdictional network of regulators, which are federal asso- ciations in-charge of ensuring legal and non-discriminatory practices in the institutions they oversee [ 2]. In our case the institution is the blockchain network. •Blockchain Transactors: We will refer to blockchain users that define and propose cryptocurrency transactions as transac- tors. The transactors can be of two types: regulated and un- regulated. Regulated transactors will always propose trans- actions that are legal and verifiable within the blockchain network ( assumption: The regulator will announce a li- cense corresponding to each regulated transactor so that the blockchain network can verify the legality of transactions proposed by them). Unregulated transactors can propose either of legal and dubious transactions. •Blockchain Executors: We will refer to blockchain users that execute the consensus protocol as consensus executors , or executors for short. These executors will be miners in proof- of-work (PoW) blockchains, or validators in proof-of-stake (PoS) blockchains. We will assume that all executors are ratio- nal, and want to maximize their reward / revenue resulting from their participation in the consensus protocol (identical to the standard notion of rationality in [ 39,40]). We will also refer to the consensus resource associated with each execu- tor, where the resource is hash power in PoW blockchains, or stake in PoS blockchains. Here too, we will assume executors will be of two types: regulated and unregulated. Regulated executors will propose blocks that contain only verifiably legal transactions, with an evidence of regulation of the said executor, and so their blocks will be called regulated blocks. Unregulated executors can propose blocks that may be ei- ther legal or dubious. When specifically dealing with PoS blockchains, we will consider Byzantine behaviour by un- regulated validators through a nothing-at-stake attack [ 31]. Finally, we assume that unregulated executors cannot form selfish notarization pools, due to lack of trust in fair block re- ward distribution in the unregulated setting, given the pool administrator can be dishonest [ 41]. However unregulated executors can coordinate amongst themselves for deciding individual notarization strategies that may maximize their individual expected block rewards. Figure 2: Notation for our Regulatory Framework •Block Notarization and Confirmation: We say that a proposed block is notarized2(similar terminology in [ 35]), once it is successfully mined by a PoW executor, or successfully vali- dated by a PoS executor (for instance, on receiving the thresh- old of validation votes in Algorand [ 32]). We say that a block isconfirmed once it is sufficiently deep in the blockchain and all the transactions contained in it are confirmed/finalized (for instance, transactions in Bitcoin are confirmed once they are six blocks deep [30]). •Block Proposal in Discrete Time: We assume that the consen- sus protocol executors have loosely synchronized clocks by employing protocols such as NTP [ 32]. We will ignore net- work delays, and assume that blocks are proposed in discrete sequential epochs of time, with the time difference between two consecutive epochs equal to the block proposal time of the base protocol (for instance, 10minutes in Bitcoin [ 30] and22seconds in Algorand [ 32]). Also, the epoch number of every block will also be equal to the block’s height. •Dubious and Legal Block Branches: Given the block proposal competition ensuing between two categories (regulated and unregulated) of consensus executors, there would exist a fork in the blockchain with block branches corresponding to each category of executors. We would refer to the block where this fork originates as the root block (this would be the block at the end of the trunk of the unambiguous part of the blockchain). The block branch corresponding to regulated executors will be referred to as the legal branch (as all blocks in this branch will be verifiably legal), and that corresponding to unregulated executors will be referred to as a dubious branch . Given any one of the legal or dubious branches, we would refer to the most recently notarized block in a branch as afrontier block for that branch, and every other notarized block as an interior block for that branch. We present the notation that will be used throughout the paper. Given𝑛blockchain consensus protocol executors, we will denote them using[𝑛]:={1,2,...,𝑛}. The consensus resource of each executor𝑖∈[𝑛]will be given by 𝛼𝑖. Given any blockchain user 𝑖 2In the context of dubious blocks, the word ‘notarized’ will bring out the violation in how unregulated executors validate/attest blocks with possibly illegal transactions. A Regulatory System for Blockchains , , (may it be a transactor or executor), its private signing key will be denoted by𝑠𝑘𝑖and its public verification key will be denoted by 𝑣𝑘𝑖. We will assume the existence of a signature scheme (sign,ver), where, for any message 𝑚, given Sig𝑖(𝑚):=(𝑚,sign𝑠𝑘𝑖(𝑚)), it is true that∀𝑖,ver𝑣𝑘𝑖(Sig𝑖(𝑚))=1(verification succeeds for a signed message). We will also assume the existence of a random oracle 𝐻∗, realizable through an ideal collision resistant hash function. We will denote the set of networked, cross-jurisdictional regulators byF. Each executor in [𝑛]will be under the jurisdiction of some regulator inF. We will denote the set of regulated executors by 𝑅(⊆[𝑛]). We will denote the set of unregulated executors with 𝑅:=[𝑛]\𝑅. We will denote the regulatory licenses for legal transaction proposal by 𝜎F 𝑗(where𝑗is a transactor) and legal block notarization by 𝛽F 𝑖(where𝑖is an executor). We will denote the block proposal rounds/epochs by 𝑒. Finally, we will denote the regulatory oversight window, as the number of sequential block proposal rounds for which the regulatory licenses are valid3, by𝐸. Our notation is summarized in Figure 2. 3.3 Regulated Blockchain System Design Goals 1. Enforcing legal policies on blockchain users while preserving anonymity. A1. As a general rule, the regulators need not intervene in the blockchain network beyond their policymaking role, as is their purview in existing financial institutions [ 3] and computational systems [2]. A2. The identity of the regulated users in the blockchain network should not be unanonymized beyond their legal status in the net- work: this means that the regulated users preserve their anonymous digital identity, but their digital identity is mapped to a policy state- ment dictating what are the legal rules applicable to the said identity when employed for cryptocurrency based trade of regulated assets. A3. Regulated users should not be able to participate in the regu- lated version of the consensus protocol prior to a sanction of their license by the regulatory body. 2. Requirement of regulatory policy enforcement in lock-step with transaction agreement (blockchain consensus). As a pre-emptive measure to eliminate illegal transactions within the crypto-economy, regulatory policy enforcement should be in lock-step with the execution of the consensus protocol by regulated executors, so that legal transactions are preferentially agreed over and above the dubious/illegal transactions, and illegal activities through cryptocurrencies are minimized in this way, if not elimi- nated. This requires re-engineering of existing blockchain protocols, and leads to the following goals: B1. The re-engineered protocol should be different from the original protocol to enable the network to distinguish protocol execution and blocks coming from regulated users following the re-engineered protocol, as opposed to protocol execution and blocks from unreg- ulated users following the original protocol. B2. The design philosophy of the re-engineered blockchain proto- col should be same as that of the original blockchain protocol, and 3Many regulated assets exist whose monetary value and trading terms vary over time. Consequentially, licenses corresponding to these assets may have a date of expiry. The regulator determines this expiry window.the two protocols should be statistically equivalent4, so that the re-engineered protocol retains the speed, security and decentraliza- tion guarantees of the original protocol. B3. Assuming there are always some legal transactions eligible to be added to the blockchain, the blockchain network being permission- less, must have public guarantees of legal transaction throughput : number of legal transactions distributively agreed per unit time. The throughput of legal transactions generated by regulated users should supersede the throughput of dubious transactions generated by unregulated users, in instances of race conditions in block pro- posal. These guarantees would increase confidence in the legality of the associated crypto-economy. 3.4 Regulated Blockchain Protocol Features Given an existing blockchain consensus protocol BChain , we re- engineer the same to define a regulated blockchain protocol RBChain . Under RBChain , the regulatory body Fonly licenses (consistent with A1,A2,A3 ) the consensus protocol transactors and executors to ensure that these blockchain users undertake the responsibility of distributed consensus on legal transactions. Also, the RBChain protocol (defined in Section 4) must have the following features: •Transactions under RBChain should be distinguishable from those under BChain .This feature would allow the blockchain network to distinguish between legal and dubious transac- tions by regulated and unregulated transactors respectively. •Block structure under RBChain should be different from that under BChain .This feature would allow the blockchain net- work to distinguish between regulated blocks and unreg- ulated (which could be either of legal or dubious) blocks proposed by regulated and unregulated executors respec- tively (consistent with B1). •The execution of RBChain andBChain , when viewed as prob- ability distributions, should be statistically indistinguishable. This would guarantee that the regulated executors do not have an unfair advantage over unregulated executors, in speed and security during protocol execution (consistent with B2). •The consensus resource of executors under RBChain should be same as that when they were executing BChain .This fea- ture would allow the regulated executors to have the same consensus as when they were unregulated, in order to pre- serve the decentralization status of the blockchain network (consistent with B2). We address system design goal B3in Section 5. 3.5 The Threat Model in a Regulated Setting We discuss briefly the threat model inherited by RBChain , on being re-engineered from BChain . Security under the Traditional Byzantine Adversary. An artefact of the statistical properties of RBChain andBChain being equivalent, we can conclude that RBChain will be secure under a Byzantine fault adversary, under the same security assumptions as applicable 4If both protocol states are observed as probability distributions, then the two distri- butions should be statistically indistinguishable [42]. , , Aditya Ahuja, Vinay J. Ribeiro, and Ranjan Pal Figure 3: Toy Model of a Permissionless Regulated Blockchain Network. Regulatory body (center) licenses four executors (highlighted with a stamp on the associated coin miner) to propose regulated blocks. The remaining executors are free to propose any type of blocks. toBChain (for example, majority of miners being honest in Bitcoin [30], or fraction of money held by honest users being >2 3rd of the total wealth in Algorand [32]). Block Proposal Competition between Regulated and Unregulated Ex- ecutors. Given the permissionless nature of cryptocurrency blockchain networks, these networks can never be wholly regulated. This would entail a strategic competition between legal and dubious block proposal. In Section 5, we study legal transaction throughput as a function of the cumulative consensus resource licensed by the regulatory bodyF. We derive conditions under which unregulated executors ‘defect’ to a legal block proposal, (i) to avoid legal scrutiny and prosecution; and more importantly, (ii) to have monetary benefit in consensus protocol participation: incentivized to participate in legal block proposal, given dubious block proposal does not give the best reward. We will also assume that regulated executors can form notarization pools and keep notarized blocks private, whereas un- regulated executors cannot form such pools due to mistrust among them towards a fair distribution of block notarization reward (con- sistent with the study of prevalent mistrust among unregulated miners in [41]). A toy model of our regulated blockchain system is given in Figure 3. 4 REGULATED CONSENSUS PROTOCOLS We now give exact construction of the regulated version of two popular regimes of blockchain consensus protocols. We will use ◦as a bit-string concatenation operator. To denote statistical in- distinguishability of two probability distributions, we will use the notation≈𝑠.4.1 Regulatory Licenses Prior to generating verifiably legal transactions and notarizing reg- ulated blocks, regulated blockchain users5wait for license from the regulatory bodyFto define the terms for legal trade and regulated block proposal in the blockchain network. The regulator first announces the legal rules applicable to the cryp- tocurrency based trade of asset classes Ain regulatory jurisdic- tionsF, through a signed document ΓF A. More specifically, ΓF Ais a|F|×|A| matrix where each entry (𝑓,𝑎)∈F×A is a list of legal rules pertaining to cryptocurrency based trade of asset 𝑎in jurisdiction 𝑓. These rules may pertain to the legality of asset 𝑎in jurisdiction 𝑓, or the (time varying) valuation of asset 𝑎in juris- diction𝑓. Next, the regulator licenses each authorized transactor 𝑗by announcing signed permissions for the transactor to trade in jurisdictions 𝐹𝑗(⊆F) with asset classes 𝐴𝑗(⊆A) . This essentially means that under license (denoted by 𝜎F 𝑗), transactor 𝑗is only per- mitted to trade under rules Γ𝐹𝑗 𝐴𝑗. Finally, given that the regulator approves executors 𝑅(⊆[𝑛]), the regulator licenses each autho- rized executor 𝑖∈𝑅by announcing signed permissions (denoted by𝛽F 𝑖) that𝑖is to include only transactions consistent with ΓF A in the blocks that it proposes. All the licenses announced by the regulator are only valid for an oversight window of 𝐸contiguous blocks, starting from some root block 𝐵𝑒0proposed in epoch 𝑒0. The announcement of regulatory licenses is highlighted in Algo- rithm 1. Note that the legal rules ΓF A, and the licenses 𝜎F 𝑗for trans- actors𝑗and𝛽F 𝑖for executors 𝑖∈ [𝑛]are only relevant for the regulated protocol specification. They have no bearing on the block proposal competition in the next section, as the said competition only depends on the consensus resource (𝛼𝑅,𝛼𝑅), and the oversight window𝐸(please see Section 5 for details). Algorithm 1: Regulatory Licenses procedure RegLicenses (BChain ) L0.Regulator announces over [𝑛]:SigF(RBChain,𝐵𝑒0,𝐸,ΓF A). L1.For each transactor 𝑗, regulator issues 𝜎F 𝑗:=SigF(RBChain,𝐵𝑒0,𝐸,𝑣𝑘𝑗,transactor ,𝐹𝑗,𝐴𝑗). L2.For each executor 𝑖∈𝑅, regulator issues 𝛽F 𝑖:=SigF(RBChain,𝐵𝑒0,𝐸,𝑣𝑘𝑖,executor,𝐻∗(ΓF A)). end procedure 4.2 Regulating Proof-of-Work Consensus Legal Transaction Structure: Consider the off-chain transfer of a reg- ulated asset of type 𝑎(∈𝐴𝑗), in jurisdiction 𝑓(∈𝐹𝑗), to transactor 𝑗with a corresponding receipt 𝛿𝑓,𝑎 𝑗. A regulated Bitcoin transaction for transactor 𝑗includes(𝜎F 𝑗◦𝛿𝑓,𝑎 𝑗)in the transaction script. The Regulated Bitcoin Protocol: The Bitcoin [ 30] consensus protocol requires the executors (called miners) to solve a compute inten- sive crypto-puzzle, to notarize a block. Our proposed regulated Bitcoin protocol RBitcoin is given in Algorithm 2, where the regu- lated miner adds evidence of its license in the coinbase transaction 5We use the term ‘users’ to refer to both transactors and executors collectively. A Regulatory System for Blockchains , , script before trying to solve the crypto-puzzle associated with the regulated block that it wishes to go on-chain. Algorithm 2: Regulated Bitcoin Consensus Protocol Given: TheBitcoin Consensus Protocol [30]. procedure RBitcoin Given a legal block LB, regulated miner 𝑖∈𝑅generates a regulated blockRBby adding𝐻∗(𝛽F 𝑖)to the coinbase transaction ofLB, and finds nonce 𝜂such that𝐻∗(𝜂◦RB) lies in the target window. end procedure Security of RBitcoin (Consistent with B2in Section 3.3): It is known that the image distribution of the random oracle (ideal CRHF) 𝐻∗is uniform, for any pre-image distribution. So, for any block Bmined on for an appropriate nonce 𝜂′in the traditional Bitcoin consensus protocol, it is true that: 𝐻∗(𝜂′◦B)≈𝑠𝐻∗(𝜂◦RB) . This implies that mining under RBitcoin is statistically equivalent to mining under Bitcoin . 4.3 Regulating NxtProof-of-Stake TheNxtProof-of-Stake [ 31] consensus protocol uses the IsEligible deterministic algorithm to elect a validator for notarizing a block. We propose the regulated version of the eligibility algorithm, to validate a regulated block, called RIsEligible , using the regulatory license in the hash pre-image for eligibility proof generation. RIsEl- igible is given in Algorithm 3. The proof of security of RIsEligible is identical to that of RBitcoin . Algorithm 3: Regulated NxtProof-of-Stake Protocol Given: TheNxtConsensus Protocol [31]. procedure NxtPoS-RIsEligible Given a legal block LB, regulated validator 𝑖∈𝑅receives a regulated blockRB(formed by adding 𝛽F 𝑖toLB).𝑖then finds nonce𝜂such that𝐻∗(𝑣𝑘𝑖◦𝛽F 𝑖◦𝜂)lies in the target window which is a function of time and 𝛼𝑖, to become eligible to validate RB. end procedure 5 BLOCK PROPOSAL COMPETITION BETWEEN REGULATED AND UNREGULATED EXECUTORS We now analyze the competition between regulated and unregu- lated consensus protocol executors (as per goal B3in Section 3.3) as a two player stochastic game, inspired from [ 39,40]. We for- mally define the stochastic game, and state best responses by the regulated executors 𝑅and unregulated executors 𝑅(in the form of their Nash Equilibria [ 39,44] strategies), as a function of the total consensus resource regulated by F. The proof of each theorem in this section, is given in Appendix A.5.1 The Regulated Blockchain Game Features We give the general characteristics and an overview of our regulated blockchain stochastic games, in this subsection. Generality of Blockchain Mining Games. The blockchain mining games introduced by Kiayias and Koutsoupias [ 39,40], atop which our regulated blockchain stochastic games are constructed, allow a minority resource consensus executor p(⊆[𝑛], with𝛼p<0.5) to consider switching to an interior block (a block that is not the most recent block), or the frontier block, in the competing chain, as a better response than its present notarization strategy. However, the pioneering selfish mining strategy SM1 [ 37] (named in [ 38]) only allows pto switch to the frontier block in the competing chain. Consequently, the mining games introduced in [ 39,40] are more general in their strategy than the original selfish mining proposal. Preliminaries. Our blockchain notarization stochastic game defines competition between two player categories: the regulated execu- tors𝑅and the unregulated executors 𝑅. We assume that the to- tal consensus resource in the blockchain network is normalized:Í 𝑖∈[𝑛]𝛼𝑖=1; and the expected revenue / reward per epoch of the blockchain for any category of players p∈{𝑅,𝑅}is denoted by𝑔p, and is a function of 𝛼p=Í 𝑖∈p𝛼𝑖. Unless the regulator F adds extra transactions to the blockchain (Section 5.3), 𝑔𝑅+𝑔𝑅=1. Our game evolves as a block tree of width two, with one branch consisting of regulated blocks notarized by 𝑅, and the other branch consisting of legal or dubious blocks notarized by 𝑅, and the fork- ing point of the block tree has a root block, say 𝐵𝑒0. If either of 𝑅or𝑅abandons its branch for notarizing on a block linked to its competing branch, the root block 𝐵𝑒0moves accordingly to newly selected block for notarization, and the game starts afresh. We also allow the regulator Fto add an additional reward 𝜌Fin the regulated blocks, when 𝑅is in a small majority in the blockchain network ( 0.5<𝛼𝑅<0.58), resulting in 𝑔𝑅+𝑔𝑅≥1. Our game has depth𝐸, equal to the oversight window and the window for collecting the notarization reward (coinbase reward in Bitcoin [ 40]). The game depth 𝐸means that the first branch originating from 𝐵𝑒0 that achieves height 𝐸is confirmed as part of the blockchain, the other competing branch is orphaned, and again the game starts afresh. Finally, we assume that the executors collect their block notarization reward at the end of the game depth (for example, for 𝐸=100in Bitcoin [ 39]). For a simplified analysis of the game, we assume𝐸=∞, unless stated otherwise. We will denote the normalized legal transaction throughput, which can also be interpreted as the expected number of legal blocks agreed at each epoch of the blockchain, by 𝑡F. Given that regulated executors only propose legal transactions, and unregulated execu- tors may propose either of legal or dubious transactions, it is easy to see that𝑡F≥𝑔𝑅. Stochastic Game Summary . Our results on normalized legal trans- action throughput 𝑡Fand normalized expected block rewards for regulated executors 𝑔𝑅and unregulated executors 𝑔𝑅are summa- rized in Figure 4. These results are formally detailed in Section 5.2, Section 5.3, and Section 5.4. We now define how executors choose to release their notarized blocks, and which blocks they may select to notarize future blocks on. , , Aditya Ahuja, Vinay J. Ribeiro, and Ranjan Pal Figure 4: A summary of the results of our regulatory sys- tem. When 𝛼𝑅≤0.5, the legal transaction throughput is sub-optimal under the longest branch rule. However, when 𝛼𝑅>0.5, the longest legal branch rule wins, unregulated ex- ecutors can do no better than proposing legal blocks, and the legal transaction throughput is maximized. Consensus thresholds ℎ𝐼𝑅,ℎ𝑜𝑐𝑓 𝐼𝑅, and ˆℎ𝑆𝑅are formally defined later. Block Release Models. We first define the block release models (from [39,40]), which elucidate when consensus executors choose to re- veal information about their notarized blocks. The first block release model stated below can be adopted by both regulated executors 𝑅and unregulated executors 𝑅. Definition 1 (Immediate Release Model). A consensus executor follows the immediate block release (IR) model when, any block notarized by it is immediately released and added to the blockchain for use by other executors. Notarization rewards earned by a notarization pool must be dis- tributed among pool members appropriately. Due to prevalent dis- trust between unregulated executors 𝑅in the fair distribution of notarization rewards among members of a secret notarization pool created by them [ 41], the second block release model stated below can be adopted by regulated executors 𝑅alone. Here, the adminis- trator denotes the pool leader. Definition 2 (Strategic Release Model). A consensus executor fol- lows the strategic block release (SR) model when, on successful notarization of block(s) by it, the (block administering) executor announces its existence, but the block(s) can only be used by other executors when the administrator decides to release them. Consensus Execution Strategies. The honest strategy where a con- sensus executor notarizes blocks at the end of the longest existing unconfirmed branch of the blockchain, is traditionally referred to as the Frontier strategy [ 39,40]. Under the Frontier strategy, the expected gain per epoch of the associated executor is equal to the consensus resource possessed by it. We now give definitions of equivalent (to Frontier ) consensus execution strategies in ourregulated setting. We will use DB to denote dubious blocks, LB to denote legal blocks, and RBto denote regulated blocks. We first define the frontier block notarization strategies that the unregulated executors 𝑅can adopt. Definition 3 ( DubFrontier ).An unregulated consensus executor follows the DubFrontier strategy, when it notarizes legal ( LB) or dubious (DB) blocks chained at the frontier block of the longest dubious branch of the blockchain. Definition 4 ( LegFrontier ).An unregulated consensus execu- tor follows the LegFrontier strategy, when it notarizes legal ( LB) blocks chained at the frontier block of the longest legal branch of the blockchain. We now define the frontier block notarization strategies that the regulated executors 𝑅can adopt. We will also assume that the regulatory bodyFmay adopt a pay-forward scheme (explained in Section 5.3) in the regulated blocks. Definition 5 ( RegFrontier ).A regulated consensus executor follows the RegFrontier strategy, when it notarizes regulated ( RB) blocks chained at the frontier block of the longest legal branch of the blockchain. Definition 6 ( RegFrontier (𝜌F)).A regulated consensus execu- tor follows the RegFrontier (𝜌F) strategy, when it notarizes regu- lated (RB) blocks chained at the frontier block of the longest legal branch of the blockchain, with a pay-forward of 𝜌F(which is a function of 𝛼𝑅) by the regulatory body Fin the regulated blocks, as an oversight compliance fee (OCF). Definition 7 ( RDubFrontier ).A regulated consensus executor follows the RDubFrontier strategy, when it notarizes regulated (RB) blocks chained at the frontier block of the longest dubious branch of the blockchain. The longest legal branch rule. Block notarization strategies LegFrontier , RegFrontier andRegFrontier (𝜌F) constitute notarization on the longest legal branch: at every epoch, all executors following these strategies add legal blocks to the longest existing branch of legal blocks. Our competition analysis. In the following analysis, the first two games (in Section 5.2 and Section 5.3), deal with deriving the condi- tions under which attacks by the unregulated executors on the legal branch fail, given that the regulator licensed the majority of the consensus resource in the blockchain network. The third and final game (in Section 5.4) deals with deriving conditions under which attacks by the regulated executors on the dubious branch succeed, given that the unregulated consensus resource in the blockchain network is in a majority. 5.2 A Stochastic Game with Immediate Block Release Our first two player game consists of competition between the regulated executors 𝑅and the unregulated executors 𝑅, when both players notarize and release their blocks immediately, the regulator A Regulatory System for Blockchains , , time e0 anye0+ 1 R (αR≥58%)e0+ 2e0+ 3e0+ 4 e0+ 1 R (αR≤42%)e0+ 2e0+ 3 join←join → Be0 RB RB RB RB LB DB LB defect Figure 5: When ≥58% of the consensus resource in the blockchain network is regulated, the legal branch (right) cor- responding to the regulated executors 𝑅wins, by forcing 𝑅 to abandon and defect from their branch. Flicenses more than 1−ℎ𝐼𝑅=58%of the consensus resource in the blockchain network, and the regulated executors add regulated blocks to the existing longest legal branch. The best responses (in terms of expected gain maximization) for both players are formal- ized in the following theorem (depicted in Figure 5). Theorem 8 (Eqilibrium under IR). In the immediate block release (IR) model, given regulated executors 𝑅follow the ‘longest legal branch’ rule, and 𝛼𝑅<ℎ𝐼𝑅=0.42, then𝑅playing RegFrontier and𝑅playing LegFrontier is a Nash Equilibrium. Theorem Implication: This theorem implies that, if the regulatory bodyFis successful in licensing more than 58%of the total con- sensus resource, then no executor can do better than adding legal blocks at the frontier block of the legal notarized but unconfirmed branch in the blockchain, resulting in a fair block reward for each executor type: 𝑔𝑅=𝛼𝑅,𝑔𝑅=𝛼𝑅, and a 100% legal transaction throughput in the blockchain network: 𝑡F=1. The consensus resource bound ℎ𝐼𝑅on unregulated executors un- der immediate release, is a function of the game depth (oversight window)𝐸, with experimental values given in Figure 6, with an approximate value of 0.42(please see Section 5.5 for details). 5.3 A Stochastic Game with Immediate Block Release and an Oversight Compliance Fee Our second two player game consists of competition between the regulated executors 𝑅and the unregulated executors 𝑅, when both players notarize and release their blocks immediately, the regulator Flicenses more than ℎ𝑜𝑐𝑓 𝐼𝑅=0.50of the consensus resource in the blockchain network. In this game, the regulator additionally re- mits an oversight compliance fee (OCF) 𝜌Fas an extra transaction in each regulated block (to incentivize legal block proposal over Figure 6: Upperbound on the Unregulated Consensus Re- source for the RegFrontier/LegFrontier strategies, as a func- tion of the Game Depth. dubious block proposal), which is claimed by the executor corre- sponding to the confirmed block following the said regulated block: given that some block 𝐵𝑒is regulated and contains the OCF, then notarizer of block 𝐵𝑒+1claims the said OCF. This OCF is a function of𝛼𝑅. Here again, the best responses for both players, given that the regulated executors add regulated blocks to the existing longest legal branch, are formalized in the following theorem (depicted in Figure 7). Theorem 9 (Eqilibrium under IR with an OCF). In the im- mediate block release (IR) model, given regulated executors 𝑅follow the ‘longest legal branch’ rule, and 𝛼𝑅>ℎ𝑜𝑐𝑓 𝐼𝑅=0.50, then𝑅playing RegFrontier( 𝜌F)and𝑅playing LegFrontier is a Nash Equilib- rium. Theorem Implication (in conjunction with Theorem 1): As a con- sequence of this theorem and the previous one, if the regulatory bodyFis successful in licensing between 50%and58%of the total consensus resource, andmandates legal blocks to an oversight com- pliance transaction fee 𝜌F(which is paid byFand is a function of 𝛼𝑅), then again, no executor can do better than adding legal blocks at the frontier block of the legal branch in the blockchain, resulting in a fair block reward for each executor type: 𝑔𝑅≥𝛼𝑅,𝑔𝑅≥𝛼𝑅 (inequality due to 𝜌F), and a 100% legal transaction throughput in the blockchain network: 𝑡F=1. Note that when the regulated con- sensus resource in the blockchain network is between 50%and58%, if the regulatorFdoes not include the OCF in the regulated blocks, it would still be true that 𝑡F=1, but the unregulated executors 𝑅 can attack and successfully add legal blocks linked to an interior block in their competing branch, resulting in 𝑔𝑅<𝛼𝑅. Thus it is imperative that the regulator adds the OCF in the regulated blocks, to save the expected gain 𝑔𝑅(≥𝛼𝑅)of the regulated executors 𝑅. Justification for a regulatory pay-forward. We justify this model, as an answer to the following question: given that regulated execu- tors follow the pay-forward scheme with money pitched in by the , , Aditya Ahuja, Vinay J. Ribeiro, and Ranjan Pal time e0 anye0+ 1 Rw/ OCF (αR>50%)e0+ 2e0+ 3e0+ 4 e0+ 1 R (αR<50%)e0+ 2e0+ 3 join←join → Be0 RB RB RB RB DB DB LB defect Figure 7: When >50% of the consensus resource in the blockchain network is regulated, and the regulator adds an OCF (denoted by the money bag in the RBblocks), the legal branch (right) corresponding to the regulated executors 𝑅 wins, by forcing 𝑅to abandon and defect from their branch. regulators on the legal branch, why cannot there be a similar pay- forward scheme enforced by unregulated executors on the dubious branch? Here we will assume that world governments, and consequently the regulatory bodies, are richer than the executors and want to preserve the revenue generated by their regulated executors (in order to motivate licensing within the blockchain network). If the unregulated miners even decide to pitch some money per block for the unregulated branch, say 𝑤𝑅, then the regulators can coun- terbalance the legal branch by pitching 𝑤𝑅=𝑤𝑅+𝜌F, where𝜌F is defined as a function of 𝛼𝑅before. This way, the branch of the regulated executors will have an additional weight of 𝜌F, and our model is equivalent to the blockchain pay-forward mining game in [40]. Consequently the results of that game apply. 5.4 A Stochastic Game with Strategic Block Release by Regulated Executors Our final stochastic game considers best responses by 𝑅and𝑅, given that the regulator Flicenses less than one-third ( ˆℎ𝑆𝑅= 0.33) of the total consensus resource, the unregulated executors (being in a majority) follow the longest branch rule, and the regulated executors can follow the strategic block release (SR) model. The best responses are given in the following theorem. Theorem 10 (Eqilibrium under SR from 𝑅).In the strategic block release (SR) model for regulated executors 𝑅, given unregulated executors𝑅play DubFrontier with immediate block release (IR), 𝑅 playing RDubFrontier is a Nash Equilibrium only if 𝛼𝑅≤ˆℎ𝑆𝑅= 0.33. Theorem Implication (in conjunction with Theorem 2): The legal transaction throughput in the dubious branch of the blockchain, without loss of generality, would be less than 100% . In the case that time e0 anye0+ 1 R (αR>33%)e0+ 2e0+ 3e0+ 4 e0+ 1 R (αR<67%)e0+ 2e0+ 3 join←join → Be0 RB RB RB RB LB LB DB defectFigure 8: When >33%but less than a majority of the con- sensus resource in the blockchain network is regulated, the regulated executors 𝑅can force the unregulated executors 𝑅to abandon and defect from their branch through strate- gic release (unreleased RBblock denoted by a dashed box in epoch𝑒0+4). the regulatory body Flicenses less than 33%of the total consensus resource, the regulated executors can do no better than adding legal blocks at the tip of the dubious branch, inducing a small increase in the legal transaction throughput. However, if the regulatory body Fis successful in licensing more than 33%(and less than 50%) of the total consensus resource, it can orphan some of the dubious blocks through strategic release (or equivalently using the original selfish mining attack [ 37]), thereby inducing a higher increase in the legal transaction throughput: 𝑡F≥𝑔𝑅>𝛼𝑅(and also𝑔𝑅<𝛼𝑅). This scenario is depicted in Figure 8. Justification of SR by regulated executors alone. Given that the reg- ulated executors follow strategic release, we argue next that the unregulated executors cannot form a competing pool of their own and also follow strategic release. Remember that executors on the unregulated branch are of two types: law-abiding (but not licensed by the regulator), and law- breaking. It is clear from the Silk road study (Section 2), that a major reason why law breakers choose Bitcoin for illegal trade is to misuse the anonymity it provides. If the law breaking execu- tors decide to form an untrustworthy notarization (mining) pool with unlicensed law abiding executors for strategic release, it has been established in a study [ 41] that such pools will not sustain due to mistrust that a dishonest notarization pool administrator may not fairly distribute notarization rewards to pool members. So the chances of sustainable mining/validation pools forming on the dubious branch among these untrustworthy executors are low. Regulated Executors (Righteously) Attacking the Blockchain. In the instance that the regulated executors 𝑅are in a majority in the blockchain network, with 𝛼𝑅>0.5, these executors might attack the blockchain by using selfish mining strategies from [ 37–39], thereby ensuring 𝑔𝑅=1>𝛼𝑅, and consequently achieving the A Regulatory System for Blockchains , , regulatorF’s goal of𝑡F=1. However, this policy is controversial and socially unacceptable for two reasons: (i) this requires hijacking the blockchain by a majority of the consensus executors, and more importantly (ii) it kills the legal transactions notarized in any com- peting branch. So it is prudent to employ the ‘longest legal branch’ rule when the regulated executors are in a majority, thereby fairly maintaining 𝑔𝑅=𝛼𝑅, and achieving 𝑡F=1. In the instance 0.33<𝛼𝑅<0.5as discussed in this subsection, assuming that the unregulated executors 𝑅might misuse their dom- inance in the blockchain network to notarize dubious transactions, the regulated executors may resort to a white hat attack on the blockchain by adopting one of the selfish mining strategies from [37–39] to ensure 𝑡F≥𝑔𝑅>𝛼𝑅. 5.5 The Consensus Resource Thresholds Our stochastic game for block notarization competition between regulated and unregulated executors is equivalent in analysis to the seminal blockchain mining games proposed in [ 39,40], and consequently the results of those game models directly apply. The consensus resource thresholds ℎ𝐼𝑅,ℎ𝑜𝑐𝑓 𝐼𝑅, and ˆℎ𝑆𝑅are rigorously established in [ 39,40]. In [ 39], it was proven that 0.361≤ℎ𝐼𝑅≤ 0.455, but experimentally ℎ𝐼𝑅≈0.42. Similarly [ 39] proves ˆℎ𝑆𝑅≥ 0.308, but in [ 38], it is experimentally shown that ˆℎ𝑆𝑅≈0.33. Finally, it is proven in [40], that ℎ𝑜𝑐𝑓 𝐼𝑅=0.5. 5.6 Tying the Results with Existing Protocols We now interpret our blockchain notarization stochastic game in the context of two prominent consensus protocol regimes: Proof- of-Work from Bitcoin and vanilla Proof-of-Stake. Competition in Bitcoin. Our regulated blockchain stochastic game is inspired from [ 39,40] where the analysis is focused on game- theoretically determining optimal mining strategies for the Bitcoin consensus protocol in an unregulated setting. In the Bitcoin con- sensus protocol, 𝛼𝑅would represent the total hash power regulated byFin the Bitcoin network. Although the game depth for Bitcoin is100blocks as determined by the coinbase reward rule of the protocol [ 39], all the consensus resource thresholds apply, verifi- able through results in [ 38–40], by replacing 𝐸=∞with𝐸=100. For example, for an approximate hash power upper-bound ℎ𝐼𝑅on 𝛼𝑅, extrapolated for 𝐸=100through experimental results in [ 39], please see Figure 6. Competition in vanilla Proof-of-Stake. Proof-of-Stake (PoS) blockchain systems (unlike PoW) have a replicable consensus resource: the executor (validator) stake can be invested in multiple blocks at the same time. Without risking their stake, executors in PoS sys- tems can notarize (validate) conflicting blocks, thereby launching a nothing-at-stake attack [ 31] and compromising the consistency of the blockchain. Fortunately, in a regulated PoS blockchain, the regulated executors 𝑅cannot mount a nothing-at-stake attack as they are mandated by the regulator to notarize blocks in the regulated branch, exclusively. However, there is a possibility that unregulated executors 𝑅are the sole party that can do a costless simulation with a nothing-at-stake attack. This implies that the consensus resource invested on the reg- ulated branch is≥𝛼𝑅and that on the unregulated branch is ≤𝛼𝑅,and all the results from our regulated blockchain stochastic games where the regulated branch weight has a known lower-bound on 𝛼𝑅(implying a lower-bound on the regulated branch weight in the PoS blockchain), directly apply. The Practical Implication of our Results We assume that the regulator Festimates𝛼𝑅as part of its licensing practice, and accordingly conveys optimal consensus execution strategies to 𝑅. The blockchain network stabilizes once 𝑅adopts best responses to the strategies chosen by 𝑅(given by the Nash equilibria of our regulated blockchain stochastic games). We are proposing a general regulatory framework for permission- less blockchains to give guarantees on legal block throughput as a function of the regulated consensus resource in the blockchain network. World governments can adopt this framework in general commercial cross-border cryptocurrencies like Bitcoin or Algorand, or setup localized digital currency networks in jurisdictionally con- strained but permissionless ‘regulatory sandboxes’6. 6 RELATED WORK We briefly review related work with respect to regulated asset trade using existing blockchain protocols designed for crypto-assets. Since none of the existing protocols have all the principles of regu- lation enforced within the consensus mechanism, we elucidate the legal and technical aspects of regulation enforced separately from the consensus mechanism. Susceptibility of existing blockchains towards illegal transactions. Regulators have identified that the illegal use of blockchain based virtual currencies includes money laundering and terror financing [9]. There have been studies conducted for establishing emerging regulatory approaches for the future of blockchain based token economies [ 21]. None of the existing blockchain protocols, be them permissionless or permissioned, are designed with regulation in the consensus mechanism itself [ 26,28,29]. This has introduced skepticism in the minds of regulatory authorities in the adoption of these protocols as is [ 11], and introduced regulation as a sep- arate mechanism to be enforced by legal authorities. Even given separately enforced regulation, no comprehensive international regulatory framework exists for blockchain technology [ 5], and cross jurisdictional governmental collaboration for regulated trade via legal transactions over blockchains is needed [ 4]. Our regula- tory framework achieves the said collaboration through support for cross-jurisdictional regulation. Pocketed adoption of regulation on blockchains across the world. Li- censing for legal use of cryptocurrencies has been initiated by the New York financial services department, with the issuance of the ‘BitLicense’ [ 8] virtual currency business license. Many nations across the world, including U.K., Australia, the U.S., Hong Kong, Malaysia, Singapore, Switzerland, Thailand, and United Arab Emi- rates are either exploring or have implemented ‘regulatory sand- boxes’ for popular blockchains [ 10]. More specifically in Europe, 6A regulatory sandbox is a framework set up by a regulator to allow small scale and live testing of innovations by private firms in a controlled environment under the regulator’s oversight [12]. , , Aditya Ahuja, Vinay J. Ribeiro, and Ranjan Pal federal banks [ 14] and governmental bodies [ 13] are contemplat- ing (geographically constrained) oversight on existing blockchains. Unfortunately, these separate regulatory enforcements imply that cross-jurisdictional transaction conflict resolution would still re- quire tenuous negotiations for (cross-jurisdictional) agreements on the price / commodity quantity being traded as part of the transac- tion. Such negotiations are trivial under our regulatory framework, owing to a cross-jurisdictional network of regulators overseeing the consensus on regulated asset trade. Permissionless blockchains introduce an untrusted decentralized fi- nancial system in general. Apart from jurisdiction, blockchain tech- nology can be an enabler of decentralized autonomous organisa- tions (DAOs), which have an uncertain legal status [ 15], and so these DAOs constitute an untrusted financial system. These sys- tems facilitate illegal transactions for which conflict resolution or penalisation claims cannot be legally enforced with complete au- thority [ 16]. This drawback of blockchains has already resulted in a fallout for the acceptance of Bitcoin. Bitcoin has suffered a blow to being a trustworthy trade plat- form due to the large scale illegal trading in the Silk Road darknet market (as highlighted in Section 2). Given this illegal trade, and the existing mistrust in the deployment of Bitcoin for financial services in general, Bitcoin has been banned in many countries [17], and federal authorities in the US see more oversight coming on most cryptocurrencies in the future [ 18]. Our regulatory frame- work, on the other hand, provides a trustworthy, decentralized, cross-jurisdictional financial system by curtailing trader autonomy through regulation. Consensus in State-of-the-art Permissionless Blockchains is insuffi- cient. Developers at Algorand admit [ 19] that developing a fast and secure permissionless blockchain is insufficient for a cross- jurisdictional economy, and there is a need to enforce regulation by leveraging sophisticated cryptographic constructions atop the consensus mechanism, such as verifiable random functions, Boneh- Lynn-Shacham aggregate signatures, and new Pixel multi-signatures [19]. These constructions introduce extraneous layers of computa- tion apart from the consensus mechanism, and still are susceptible to attacks as long as their network is permissionless [ 33]. Our regulatory framework does not need non-trivial cryptographic con- structions, and thus is more suitable for regulated decentralized trade. Our regulatory framework differs from federated blockchains. Feder- ated blockchains [ 20], have a permissioned network where certain pre-selected nodes, from each organization that is maintaining a distributed ledger, have the authority to participate in the consensus protocol for agreeing on transactions. Unlike our regulatory frame- work, where a trader has the authority to participate in consensus under the oversight of the regulator, federated blockchains have no notion of regulatory intervention for oversight in the transaction agreement process. 7 CONCLUSION AND FUTURE DIRECTIONS In this contribution, we have proposed a framework for the legal trade of regulated assets via cryptocurrencies through the appro- priate regulation of the consensus resource of existing blockchainconsensus protocols. First, we have motivated the need for our framework through a case study of the Silkroad deepweb cryp- tocurrency based market. Next, we have formally presented our regulatory framework and have given guarantees of legal trans- action throughput as a function of the total fraction of the regu- lated consensus resource. We have shown that the legal transaction throughput can be maximized when the regulated consensus re- source is in a majority in the blockchain network, and the regulated protocol executors follow a ‘longest legal branch’ block notariza- tion rule. In future, we would like to analyze competition between regulated and unregulated executors, when the unregulated executors play theDubFrontier strategy with a non-zero pay-forward scheme, but the regulated executors are not supported by the regulator through an oversight compliance fee. We would like to derive conditions for a successful long range attack by regulated validators on a vanilla proof-of-stake blockchain to confirm a legal branch originating from the genesis block. Finally, we would like to perform a formal, novel Markov Decision Process (MDP) analysis for block proposal competition between regulated and unregulated executors, in both proof-of-work and proof-of-stake regimes, similar to the recent proposal in [54]. ACKNOWLEDGEMENT We would really like to thank Leana Golubchik (Professor, USC) for her comments on improving the readability of a previous version of this paper. REFERENCES [1]Stiglitz, Joseph E. “Government failure vs. market failure: Principles of regulation. " (2008). [2]Stocker, Volker, Georgios Smaragdakis, and William Lehr. “The state of network neutrality regulation." ACM SIGCOMM Computer Communication Review 50, no. 1 (2020): 45-59. [3] The Indian Capital Market Regulators: Roles and Functions https://www.elearnmarkets.com/blog/capital-market-regulators/ [4]Yeoh, Peter. “Regulatory issues in blockchain technology." Journal of Financial Regulation and Compliance (2017). [5]Kiviat, Trevor I. “Beyond bitcoin: Issues in regulating blockchain transactions." Duke LJ 65 (2015): 569. [6]Bahlke, Conrad G., and Marija Pecar. "Unblocking the Blockchain: Regulating Distributed Ledger Technology." The Journal on the Law of Investment and Risk Management Products 36, no. 10 (2016). [7]Nabilou, Hossein. “How to regulate bitcoin? Decentralized regulation for a de- centralized cryptocurrency." International Journal of Law and Information Tech- nology 27, no. 3 (2019): 266-291. [8]Chohan, Usman W. "Oversight and regulation of cryptocurrencies: BitLicense." Available at SSRN 3133342 (2018). [9]Global Legal Insights - Blockchain and Cryptocurrency Regulation 2019, First Edition (Online; Accessed 2020-05-21) https://www.acc.com/sites/default/files/\resources/vl/membersonly/Article/ 1489775-1.pdf [10] Nishith Desai Associates - The Blockchain : Industry Applications and Legal Perspectives (Online; Accessed 2020-05-21) http://www.nishithdesai.com/fileadmin/user-upload/\pdfs/Research- Papers/The-Blockchain.pdf [11] The Conversation - People don’t trust blockchain systems - Is regulation a way to help? (Online; Accessed 2020-05-21) https://theconversation.com/people-dont-trust-\blockchain-systems-is- regulation-a-way-to-help-110007 [12] Jenik, Ivo, and Kate Lauer. “Regulatory sandboxes and financial inclusion." Wash- ington, DC: CGAP (2017). [13] Reuters - Swiss task force to look into blockchain oversight (Online; Accessed 2020-05-21) https://www.reuters.com/article/us-swiss-crypto/\swiss-task-force-to-look- into-blockchain-oversight-idUSKBN1F71T6 A Regulatory System for Blockchains , , [14] CoinDesk - Bank of England Eyes Private Blockchain Oversight [Online; Accessed 2020-05-21] https://www.coindesk.com/bank-of-england-eyes-\regulatory-oversight-of- private-blockchain-data [15] Wikipedia - Decentralized Autonomous Organisations (Online; Accessed 2020- 05-21) https://en.wikipedia.org/wiki/\Decentralized-autonomous-organization [16] Blocks Decoded - 5 Blockchain Problems: Security, Privacy, Legal, Regulatory, and Ethical Issues (Online; Accessed 2020-05-21) https://blocksdecoded.com/blockchain-issues-\security-privacy-legal- regulatory-ethical/ [17] Wikipedia - Legality of bitcoin by country or territory [Online; Accessed 2020- 05-21] https://en.wikipedia.org/wiki/\Legality-of-bitcoin-by-country-or-territory [18] Legal Executive Institute - Consensus 2019: Blockchains Biggest US Conference Sees Increased Legal Oversight Coming (Online; Accessed 2020-05-21) http://www.legalexecutiveinstitute.com/consensus-\2019-blockchain/ [19] Algorand: Where Cryptography meets Economics (Online; Accessed 2020-05-21) https://www.algorand.com/what-we-do/economic-\innovation/where- cryptography-meets-economics/ [20] 2019 The Year of the Federated Blockchain ? Blockchain Consortium Simply Explained (Online; Accessed 2020-05-21) https://101blockchains.com/federated-blockchain/ [21] Ferreira, Agata. "Emerging Regulatory Approaches to Blockchain Based Token Economy." The Journal of The British Blockchain Association (2020): 12270. [22] Peters, Gareth, Efstathios Panayi, and Ariane Chapelle. “Trends in cryptocurren- cies and blockchain technologies: A monetary theory and regulation perspective. " Journal of Financial Perspectives 3, no. 3 (2015). [23] International Finance Corporation - Blockchain Opportunities for Private Enterprises in Emerging Markets (Online; Accessed 2020-05-21) https://www.ifc.org/wps/wcm/connect/2106d1c6-5361-41cd-86c2- f7d16c510e9f/201901-IFC-EMCompass-Blockchain-Report.pdf-MOD= AJPERES-CVID=mxYj-sA [24] Bitcoin News - Janet Yellen Reveals Plans for Bitcoin, Sees Cryptocurrencies Used Mainly for Illicit Financing (Online; Accessed 2021-01-26) https://news.bitcoin.com/janet-yellen-bitcoin-cryptocurrencies-illicit- financing/ [25] Bitcoin News - ECB Chief Christine Lagarde Calls for Global Bitcoin Regulation, Says BTC Conducts ‘Funny Business’ (Online; Accessed 2021-01-26) https://news.bitcoin.com/ecb-christine-lagarde-global-bitcoin-regulation-btc/ [26] Bano, Shehar, Alberto Sonnino, Mustafa Al-Bassam, Sarah Azouvi, Patrick Mc- Corry, Sarah Meiklejohn, and George Danezis. “SoK: Consensus in the age of blockchains." In Proceedings of the 1st ACM Conference on Advances in Financial Technologies, pp. 183-198. 2019. [27] Wang, Wenbo, Dinh Thai Hoang, Peizhao Hu, Zehui Xiong, Dusit Niyato, Ping Wang, Yonggang Wen, and Dong In Kim. “A survey on consensus mechanisms and mining strategy management in blockchain networks. " IEEE Access 7 (2019): 22328-22370. [28] Xiao, Yang, Ning Zhang, Wenjing Lou, and Y. Thomas Hou. “A survey of dis- tributed consensus protocols for blockchain networks." IEEE Communications Surveys and Tutorials 22, no. 2 (2020): 1432-1465. [29] Leonardos, Stefanos, Daniël Reijsbergen, and Georgios Piliouras. “PREStO: A systematic framework for blockchain consensus protocols." IEEE Transactions on Engineering Management (2020). [30] Nakamoto, Satoshi. “Bitcoin: A peer-to-peer electronic cash system". Manubot, 2019. [31] Li, Wenting, Sébastien Andreina, Jens-Matthias Bohli, and Ghassan Karame. "Securing proof-of-stake blockchain protocols." In Data Privacy Management, Cryptocurrencies and Blockchain Technology, pp. 297-315. Springer, Cham, 2017. [32] Gilad, Yossi, Rotem Hemo, Silvio Micali, Georgios Vlachos, and Nickolai Zel- dovich. “Algorand: Scaling byzantine agreements for cryptocurrencies." In Pro- ceedings of the 26th Symposium on Operating Systems Principles, pp. 51-68. 2017. [33] Algorand: A Permissionless Blockchain (Online; Accessed 2020-05-21) https://www.algorand.com/what-we-do/technology/\permissionless- blockchain/ [34] Algorand: A Pure Proof-of-Stake Approach (Online; Accessed 2020-05-21) https://www.algorand.com/what-we-do/technology/pure-proof-of-stake/ [35] Chan, Benjamin Y., and Elaine Shi. "Streamlet: Textbook streamlined blockchains. " In Proceedings of the 2nd ACM Conference on Advances in Financial Technolo- gies, pp. 1-11. 2020. [36] Li, Yannan, Willy Susilo, Guomin Yang, Yong Yu, Xiaojiang Du, Dongxi Liu, and Nadra Guizani. “Toward privacy and regulation in blockchain-based cryptocur- rencies." IEEE Network 33, no. 5 (2019): 111-117. [37] Eyal, Ittay, and Emin Gun Sirer. "Majority is not enough: Bitcoin mining is vulnerable." In International conference on financial cryptography and data security, pp. 436-454. Springer, Berlin, Heidelberg, 2014.[38] Sapirshtein, Ayelet, Yonatan Sompolinsky, and Aviv Zohar. “Optimal selfish min- ing strategies in bitcoin." In International Conference on Financial Cryptography and Data Security, pp. 515-532. Springer, Berlin, Heidelberg, 2016. [39] Kiayias, Aggelos, Elias Koutsoupias, Maria Kyropoulou, and Yiannis Tselekounis. “Blockchain mining games." In Proceedings of the 2016 ACM Conference on Economics and Computation, pp. 365-382. 2016. [40] Koutsoupias, Elias, Philip Lazos, Foluso Ogunlana, and Paolo Serafino. “Blockchain mining games with pay forward." In The World Wide Web Con- ference, pp. 917-927. 2019. [41] Khairuddin, Irni Eliana, and Corina Sas. “An Exploration of Bitcoin mining practices: Miners’ trust challenges and motivations." In Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems, pp. 1-13. 2019. [42] Katz, Jonathan, and Yehuda Lindell. “Introduction to modern cryptography". CRC press, 2014. [43] Shapley, Lloyd S. “Stochastic games." Proceedings of the national academy of sciences 39, no. 10 (1953): 1095-1100. [44] Solan, Eilon, and Nicolas Vieille. “Stochastic games." Proceedings of the National Academy of Sciences 112, no. 45 (2015): 13743-13746. [45] Hardy, Robert Augustus, and Julia R. Norgaard. “Reputation in the Internet black market: an empirical and theoretical analysis of the Deep Web." Journal of Institutional Economics 12, no. 3 (2016): 515-539. [46] Van Hout, Marie Claire, and Tim Bingham. “Surfing the Silk Road: A study of users’ experiences." International Journal of Drug Policy 24, no. 6 (2013): 524-529. [47] Trautman, Lawrence J. “Virtual currencies; Bitcoin and what now after Liberty Reserve, Silk Road, and Mt. Gox?." Richmond Journal of Law and Technology 20, no. 4 (2014). [48] CNBC - Silk Road Cryptocurrency Bust by the US Government (Online; Accessed 06-Nov-2020) https://www.cnbc.com/2020/11/05/1-billion-worth-of-bitcoin-linked\-to-the- silk-road-seized-by-the-us.html [49] Kleiman, Jared A. “Beyond the silk road: unregulated decentralized virtual cur- rencies continue to endanger US national security and welfare." Nat’l Sec. L. Brief 4 (2013): 59. [50] Martin, James. “Lost on the Silk Road: Online drug distribution and the ‘cryp- tomarket’." Criminology and Criminal Justice 14, no. 3 (2014): 351-367. [51] Reuters - Crypto market cap surges above $1 trillion for first time (Online; Accessed 2021-02-14) https://www.reuters.com/article/crypto-currency-int-idUSKBN29C264 [52] Regulation of Cryptocurrency Around the World (Online; Accessed 2021-02-14) https://www.loc.gov/law/help/cryptocurrency/world-survey.php [53] Evidence of non-determinate legal status of Blockchain based Cryptocurrencies: https://www.businessinsider.in/finance/news/how-the-laws-regulations- affecting-blockchain-technology-and-\cryptocurrencies-like-bitcoin-can- impact-its-adoption/articleshow/74464680.cms [54] Zur, Roi Bar, Ittay Eyal, and Aviv Tamar. “Efficient MDP analysis for selfish- mining in blockchains. " In Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, pp. 113-131. 2020. , , Aditya Ahuja, Vinay J. Ribeiro, and Ranjan Pal A THEOREM PROOFS We now give the construction of our regulated blockchain stochastic games, reduce their construction to existing blockchain mining games, and prove the theorems corresponding to the main results of our framework. A.1 Preliminaries Blockchain Game with Regulated Executor Dominance. We define our first regulated blockchain stochastic game RBChain-Rdom- SGame , applicable when the regulated executors are in a majority in the blockchain network ( 𝛼𝑅>0.5). Given a root block, the blockchain state is given by (𝑏𝑅,𝑏𝑅), where𝑏𝑅blocks are proposed by the unregulated executors, and 𝑏𝑅blocks are proposed by the regulated executor. The regulator may include an OCF in all of 𝑏𝑅 blocks. RBChain-Rdom-SGame States: •Mining States. This set of states, denoted by 𝑀, is a collec- tion of states(𝑏𝑅,𝑏𝑅)where both 𝑅and𝑅notarize blocks on their own branch. Note that (0,0)∈𝑀. •Defection/Capitulation States. This set of states, denoted by 𝐶, is when executor 𝑅defects and abandons its own branch, and adds (legal or dubious) blocks linked to some regulated block in the competing regulated branch, transitioning the game from state (𝑏𝑅,𝑏𝑅)to state(0,𝑠𝑅)where𝑠𝑅∈ {0,1,...,𝑏𝑅−1}. •Legal Winning States. This set of states is given by 𝑊𝑙𝑒𝑔:= {(𝑏𝑅,𝑏𝑅):𝑏𝑅=𝑏𝑅+1}and all𝑏𝑅blocks in each state of𝑊𝑙𝑒𝑔are legal. Under 𝑊𝑙𝑒𝑔, when executor 𝑅overtakes, the game transitions to state (0,0). Blockchain Game with Unregulated Executor Dominance. We define our second regulated blockchain stochastic game RBChain-URdom- SGame , applicable when the unregulated executors are in a majority in the blockchain network ( 𝛼𝑅>0.5). Given a root block, the blockchain state is given by (𝑏𝑅,𝑏𝑅), where𝑏𝑅blocks are proposed by the unregulated executors, and 𝑏𝑅blocks are proposed by the regulated executors. The regulated executors release 𝑚𝑖𝑛(𝑏𝑅,𝑏𝑅) blocks. RBChain-URdom-SGame States: •Mining States. This set of states, denoted by 𝑀, is a collec- tion of states(𝑏𝑅,𝑏𝑅)where both 𝑅and𝑅notarize blocks on their own branch. Note that (0,0)∈𝑀. •Dubious Cut Defection/Capitulation States. This set of states, denoted by𝐶𝑑𝑢𝑏, is when executor 𝑅defects and abandons its own branch, and adds regulated blocks linked to some regulated block in the competing dubious branch, transi- tioning the game from state (𝑏𝑅,𝑏𝑅)to state(0,𝑠𝑅)where 𝑠𝑅∈{0,1,...,𝑏𝑅−1}, and all𝑠𝑅blocks are dubious. •Winning States. This set of states is given by 𝑊:= {(𝑏𝑅,𝑏𝑅):𝑏𝑅=𝑏𝑅+1}. Under𝑊, when executor 𝑅 overtakes, the game transitions to state (0,0). Original Blockchain Stochastic Games. We will refer to the original blockchain mining game under the immediate release model, pro- posed by Kiayias et.al. (Sections 2 and 3 in [ 39]) as the K1-IR-SGame . We will refer to the blockchain mining game with a pay-forwardscheme, under the immediate release model, proposed by Kout- soupias et.al. (Sections 2 and 3 in [ 40]) as the K2-IR-SGame . Also, we will refer to the original blockchain mining game under the strategic release model (Section 4 in [39]) as the K1-SR-SGame . Both blockchain mining games [ 39,40] do not consider a distinction between legal and dubious blocks, and define the Frontier mining strategy as a choice to mine on the deepest block in the blockchain among all competing branches (with or without a pay-forward). A.2 Proof of Theorem 8 The K1-IR-SGame considers two miners, named 1and2, where miner 2is in a majority in the Bitcoin network ( 𝛼2>0.5), and is always following the Frontier strategy. Theorem 3.2 [ 39] from K1-IR-SGame proves that when miner 1has hash power 𝛼1less than the root of the polynomial 2𝛼2−(1−𝛼)3≈0.361, then Frontier is a Nash equilibrium strategy for miner 1. Theorem 3.2 is proven by eliminating the possible set of mining states under the given condition. Next, through Theorem 3.12 [ 39] in the K1-IR- SGame , it has been proven that, for game depth E = 3, the expected gain𝑔1per epoch of miner 1is equal to𝛼2 1(2+2𝛼1−5𝛼2 1+2𝛼3 1) 1−𝛼2 1+2𝛼3 1−𝛼4 1>𝛼1, by demonstrating strategies more rewarding than the Frontier strategy for 𝛼1>0.455. By considering alternate game depths 𝐸, theK1-IR-SGame experimentally establishes (Table 1 in [ 39]) the lower bound for a deviating strategy to be 𝛼1>ℎ𝐼𝑅≈0.42. TheRBChain-Rdom-SGame reduces to an instance of the K1-IR- SGame , when the first miner is the unregulated executor 𝑅, the second miner is the regulated executor 𝑅, the first miner’s Frontier strategy is replaced by the LegFrontier strategy, and the second miner’s Frontier strategy is replaced by the RegFrontier strategy. Consequently, the results on the threshold ℎ𝐼𝑅from the K1-IR- SGame directly apply to the RBChain-Rdom-SGame . A.3 Proof of Theorem 9 TheK2-IR-SGame has an identical setting to the K1-IR-SGame in terms of defining the miners, and their best response strategies. However, K2-IR-SGame allows miner 1to add a pay-forward reward 𝑤(as some unknown function of 𝛼1) to the blocks mined by it. This reward 𝑤is collected by the miner who confirms a block immediately succeeding the block that contains the announcement of𝑤. In this setting, it is proven through Theorem 3.2 [ 40], that Frontier is a Nash equilibrium strategy for miner 1, when miner 2has consensus resource 𝛼2>ℎ𝑜𝑐𝑓 𝐼𝑅=0.5. TheRBChain-Rdom-SGame with a regulator contributed OCF 𝜌F in the regulated blocks, reduces to an instance of the K2-IR-SGame , when the first miner is the unregulated executor 𝑅, the second miner is the regulated executor 𝑅, the first miner’s Frontier strategy is replaced by the LegFrontier strategy, and the second miner’s Frontier strategy is replaced by the RegFrontier(𝜌F)strategy. Consequently, the results on the threshold ℎ𝑜𝑐𝑓 𝐼𝑅from the K2-IR- SGame directly apply to the modified RBChain-Rdom-SGame . A.4 Proof of Theorem 10 The K1-SR-SGame again considers two miners, named 1and2, where miner 2is in a majority in the Bitcoin network ( 𝛼2>0.5), and is always following the Frontier strategy while immediately A Regulatory System for Blockchains , , releasing blocks. However, when it comes to miner 1, in the K1-SR- SGame , the said miner only releases 𝑚𝑖𝑛(𝑏1,𝑏2)blocks, where 𝑏𝑖 blocks are successfully mined by miner 𝑖∈{1,2}. In this regime, it is proven in Theorem 4.1 [ 39], that the best response for miner 1 isFrontier only when𝛼1is less than the root of the polynomial 𝛼3−6𝛼2+5𝛼−1≈0.308, but this bound can be improved to 0.33 through results in [38, 40].The RBChain-URdom-SGame reduces to an instance of the K1- SR-SGame , when the first miner is the regulated executor 𝑅fol- lowing strategic release, the second miner is the unregulated ex- ecutor𝑅, the first miner’s Frontier strategy is replaced by the RDubFrontier strategy, and the second miner’s Frontier strategy is replaced by the DubFrontier strategy. Consequently, the results on the threshold ˆℎ𝑆𝑅from the K1-SR-SGame directly apply to the RBChain-URdom-SGame .
{ "id": "2103.16216" }
2305.14748
Towards Understanding Crypto Money Laundering in Web3 Through the Lenses of Ethereum Heists
With the overall momentum of the blockchain industry, crypto-based crimes are becoming more and more prevalent. After committing a crime, the main goal of cybercriminals is to obfuscate the source of the illicit funds in order to convert them into cash and get away with it. Many studies have analyzed money laundering in the field of the traditional financial sector and blockchain-based Bitcoin. But so far, little is known about the characteristics of crypto money laundering in the blockchain-based Web3 ecosystem. To fill this gap, and considering that Ethereum is the largest platform on Web3, in this paper, we systematically study the behavioral characteristics and economic impact of money laundering accounts through the lenses of Ethereum heists. Based on a very small number of tagged accounts of exchange hackers, DeFi exploiters, and scammers, we mine untagged money laundering groups through heuristic transaction tracking methods, to carve out a full picture of security incidents. By analyzing account characteristics and transaction networks, we obtain many interesting findings about crypto money laundering in Web3, observing the escalating money laundering methods such as creating counterfeit tokens and masquerading as speculators. Finally, based on these findings we provide inspiration for anti-money laundering to promote the healthy development of the Web3 ecosystem.
http://arxiv.org/pdf/2305.14748v1
Dan Lin, Jiajing Wu, Qishuang Fu, Yunmei Yu, Kaixin Lin, Zibin Zheng, Shuo Yang
cs.CR, cs.SI
cs.CR
Towards Understanding Crypto Money Laundering in Web3 Through the Lenses of Ethereum Heists DAN LIN, JIAJING WU*, QISHUANG FU, YUNMEI YU, KAIXIN LIN, ZIBIN ZHENG, SHUO YANG With the overall momentum of the blockchain industry, crypto-based crimes are becoming more and more prevalent. After committing a crime, the main goal of cybercriminals is to obfuscate the source of the illicit funds in order to convert them into cash and get away with it. Many studies have analyzed money laundering in the field of the traditional financial sector and blockchain-based Bitcoin. But so far, little is known about the characteristics of crypto money laundering in the blockchain- based Web3 ecosystem. To fill this gap, and considering that Ethereum is the largest platform on Web3, in this paper, we systematically study the behavioral characteristics and economic impact of money laundering accounts through the lenses of Ethereum heists. Based on a very small number of tagged accounts of exchange hackers, DeFi exploiters, and scammers, we mine untagged money laundering groups through heuristic transaction tracking methods, to carve out a full picture of security incidents. By analyzing account characteristics and transaction networks, we obtain many interesting findings about crypto money laundering in Web3, observing the escalating money laundering methods such as creating counterfeit tokens and masquerading as speculators. Finally, based on these findings we provide inspiration for anti-money laundering to promote the healthy development of the Web3 ecosystem. CCS Concepts: •Applied computing →Electronic commerce ;•Mathematics of computing →Exploratory data analysis ;• Information systems →Information systems applications . Additional Key Words and Phrases: Money laundering, Blockchain, Cybercriminal, Web3, Transaction behavior ACM Reference Format: Dan Lin, Jiajing Wu*, Qishuang Fu, Yunmei Yu, Kaixin Lin, Zibin Zheng, Shuo Yang. 2022. Towards Understanding Crypto Money Laundering in Web3 Through the Lenses of Ethereum Heists. In Proceedings of the ACM SIGMETRICS Conference 2023 (SIGMETRICS’23), June 19–23, 2023, Orlando, Florida, USA. ACM, New York, NY, USA, 21 pages. https://doi.org/XX.XXXX/ xxxxxxx.xxxxxxx 1 INTRODUCTION The past decade has witnessed the rapid growth of blockchain and the blockchain-based cryptocurrency ecosystem. The market capitalization of cryptocurrencies has reached a staggering scale, with Bitcoin reaching a market capitalization of $385 Billion [ 24]. Meanwhile, with the further development of blockchain technology, there is a global wave of the third iteration of the Internet (Web3). Web3’s disruption is built on three essential fundamentals [ 7]: an underlying blockchain that stores transaction records and ensures the decentralized nature of Web3, smart contracts that represent the logic of the application, and crypto assets (also called digital assets) that can represent anything of value. The shared, co-constructed, assemblable economic system on Web3 brings a richer application ecosystem, a more open economic system, and a larger transaction volume than traditional financial and public blockchains. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA ©2022 Association for Computing Machinery. ACM ISBN 978-x-xxxx-xxxx-x/YY/MM. . . $15.00 https://doi.org/XX.XXXX/xxxxxxx.xxxxxxx 1arXiv:2305.14748v1 [cs.CR] 24 May 2023 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) However, any new technology, especially those with a lack of regulation, can be exploited for unscrupulous gain. Since blockchain transactions do not require user identification information, blockchain and its ecosystem have become a hotbed of various cybercrimes and illegal financial activities [ 33], and the still-developing blockchain- based Web3 is no exception. According to blockchain security firm Certik [ 26], in the first half of 2022 alone, more than $2 billion was stolen from Web3 projects as a result of hacking and vulnerabilities. After stealing crypto assets, cybercriminals conceal and disguise them through different channels to make them appear legitimate and then withdraw them, a process known as money laundering. So it is said that money laundering is the subsequent part of all other forms of crypto-based crimes [ 22,23]. Therefore, with the frequent occurrence of Web3 security incidents, crypto anti-money laundering (AML) is in a crucial position to be the last line of defense to stop hackers from successfully cashing out and also to deter hackers from committing Web3 crimes at the same time. Anti-money laundering (AML) is not a new issue, and a wealth of research on the AML issue in traditional financial scenarios have been proposed [ 8,11,13,19,32]. In the field of cryptocurrency, the Elliptic dataset [ 30] is the first open-source Bitcoin money laundering dataset that labels abnormal/normal Bitcoin transactions roughly. But for one, this dataset only has binary labels for money laundering with no other business details, and for two, the Bitcoin platform this dataset focuses on is very different from the Web3 ecosystem which contains rich decentralized applications (DApps). To the best of our knowledge, there is currently no public dataset on Web3 money laundering in academia, nor is there a systematic description and analysis of money laundering on the Web3 ecosystem. It is not clear what the transaction characteristics of these Web3 money laundering accounts are, how the flow of illegal funds in the money laundering ring has achieved the effect of obfuscating the source, and what kind of impact it has on the economy of the Web3 ecosystem. Therefore, this is the question that this paper wants to explore. However, due to the unique characteristics of Web3 and money laundering practices on it, AML approaches on traditional financial scenarios or bitcoin cannot be directly applied to Web3 due to the following three challenges. (i)The underlying blockchain. Compared with traditional finance, blockchain is decentralized, borderless, and anonymous, without limiting the number of accounts each user can create. This allows cybercriminals to conduct a large number of frequent transactions between accounts under their control, leading to difficult identification of account entities and a large number of anonymous transfers. (ii)Smart contracts and digital assets. Based on blockchain, smart contracts enable various types of digital assets which can be exchanged in the trading platforms. At the same time, Turing-complete smart contracts can represent and execute more complex application logic and functions, leading to more complex transaction patterns. (iii)Decentralized finance (DeFi) [ 31]. On the one hand, immature DeFi applications gather a large number of assets, attracting the attention of criminals and becoming the hardest hit by asset theft; on the other hand, DeFi services lacking anti-money laundering compliance bring ever-changing means of exchanging coins while also fueling crypto criminals to launder dirty money. In this paper, we go for the first time to characterize and analyze the crypto money laundering behavior in Web3, taking the largest blockchain platform of Web3 [ 24], Ethereum, as an entry point. Note that only the information of the accounts where the security incidents occurred is publicly reported, whereas the money laundering accounts where the stolen money is transferred are usually unknown. To this end, we start from the tip of the iceberg - a very small number of accounts of known security incidents - and then dig and expand the malicious addresses of money laundering, in order to carve out the full picture of the security incidents and complete the chain of evidence for the transfer of stolen assets. Specifically, we first propose an abstract model to describe the process of money laundering and present a heuristic tracing algorithm based on this abstract model to extract money laundering transactions from the massive amount of anonymous blockchain data ( Section 4 ). We construct the first money laundering dataset (containing over 160,000 addresses) in Web3, called EthereumHeist , and also use a case study to illustrate the effectiveness of the tracing method. With these real data, we conduct in-depth empirical analysis from micro to macro perspectives. (i) From the perspective of individual laundering accounts, we count and analyze what are 2 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA the characteristics of accounts and their transaction behavior in the money laundering process ( Section 5 ). (ii) From the perspective of a gang, we model and measure the network of transactions involved in the cases and analyze the difference between money laundering transaction networks and the entire Ethereum transaction network ( Section 6 ). (iii) From a more macro perspective, we explore how the flow of money laundered funds affects the economy of the Web3 ecosystem ( Section 7 ). Finally, we discuss the AML implications, limitations, and ethical issues of this paper, as well as possible directions for future research. The main contributions are as follows. •To our best knowledge, we present the first dataset and the first systematic analysis on crypto money laundering in Web3 through the lenses of Ethereum heists from 2018-2022. Based on a very small number of tagged accounts of hackers, exploiters, and scammers, we adopt an augmented poison policy to trace the untagged money laundering process, which provides a full picture of incidents. Methods for tracing, data collection, and measurement of EthereumHeist can also be reused for other cases. We present the money laundering dataset which can be found at https://www.dropbox.com/. •We obtain many interesting findings of crypto money laundering in Web3 by adopting feature analysis, graph analysis, and other methods. These findings help us gain new knowledge about the crypto money laundering behaviors in Web3. Particularly, we find that it is common for exploiters to obfuscate stolen funds by swapping tokens through DeFi platforms, and hackers even launder money by creating counterfeit tokens for higher anonymity. •We conduct an empirical study to understand the economic impact of laundering in the Web3 ecosystem by investigating the evolution of money laundering destination service providers and the market price of crypto assets. Moreover, we present insights for anti-money laundering in the Web3 ecosystem based on trends of money laundering techniques and service providers, in order to promote the healthy development of Web3. 2 BACKGROUND 2.1 Stolen Funds From Web3 The boom in the Web3 ecosystem is driving demand for trading platforms. However, where there is money, that is where thieves are attracted. The sources of stolen funds on Web3 can be broadly classified into three types. Centralized exchanges (CEXes), which gather large amounts of money but in most cases have weak defenses, have been coveted by hackers. DeFi projects , which are still in the early stage of development, have also been a prime target for hackers in recent years, with DeFi digital assets stolen mainly due to contract vulnerabilities, flash loan attacks, and private key leaks. Scams are a more common but under-disclosed type of asset theft. Scammers commit theft of cryptocurrency personal holdings through malicious emails or false propaganda, such as phishing scams, Ponzi scams, etc. 2.2 Money Laundering Money laundering is the illegal process of transferring funds generated by ill-gotten gains or criminal activities (such as drug trafficking or terrorist financing) in order to conceal and hide the source of the funds. Money laundering typically consists of three main stages: (i) Placement : The process of putting the proceeds of crime into the “laundering system”. These illicit proceeds are often divided into smaller amounts and placed in multiple accounts to prevent detection by AML systems. (ii) Layering : Separation of illicit proceeds from their sources and maximum dispersion through complex multiple, multi-layered financial transactions to disguise leads and hide identities. The higher the frequency of diversion, the more difficult it is for investigators to trace the source through network paths. (iii) Integration : This is the final stage of money laundering, which is graphically described as “draining”. The funds are integrated into the financial system as if they were legitimate. 3 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) 3 RELATED WORK 3.1 Anti-Money Laundering Techniques In traditional financial scenarios, AML techniques can obtain and analyze money laundering data through identity- linked information, as well as various modeling and learning approaches. However, in anonymous blockchain systems, the identity information and the association between accounts are usually not easily accessible. In the world of cryptocurrencies, the first publicly available dataset related to money laundering was the Elliptic dataset, classifying Bitcoin transactions into licit and illicit categories. The Elliptic dataset has attracted much attention and has been widely followed and used in a number of studies [ 1,14,17,28]. However, the Elliptic dataset remains inappropriate for developing and validating AML techniques on Web 3 for two reasons. First, the Elliptic dataset only has binary labels for money laundering transactions and does not contain further details on the events and stages of money laundering; second, the bitcoin platform that this dataset focuses on has very different transaction behaviors than Web3 because it does not support smart contracts and decentralized applications. Therefore, for AML on Web3, a dataset that represents diverse transactions and behaviors on Web3 is urgently needed to be proposed. 3.2 Financial Security Issues on Blockchain Security issues abound in the blockchain ecosystem, such as phishing scams, Ponzi schemes, wash trading and DApp attacks, etc. [ 3–5,12,16,18,21,29,34,35]. There exist several datasets for anomaly detection and a series of approaches have been put forward to solve these issues. For example, Chen et al. [5] collect Ponzi schemes labels1and propose a Ponzi contract detection approach. Wu et al. [34] propose a network-embedding based method for phishing identification and disclose a phishing scam dataset2. Existing efforts are usually focused on the beginning of the security incidents without digging deeper into the money laundering behind them. It has been reported [ 23] that many security incidents are followed by money laundering to withdraw cash through service providers such as exchanges. As a result, existing research cannot fully understand the whole story of security incidents. 4 STUDY DESIGN & DATA COLLECTION Our research aims to systematically investigate the characteristics of crypto money laundering in Web3, from an individual account, to the transaction networks formed by money laundering groups, and further, their resulting economic impact on the Web3 ecosystem. To this end, our research is driven by the following research questions (RQs): RQ 1 From a micro perspective, what are the characteristics of accounts and their transaction behaviors in the process of crypto money laundering in Web3? Previous work lacks the collection of data on crypto money laundering in Web3. We strive for a complete picture of cryptocurrency money laundering accounts that cover each suspicious path and compare their trading features with normal accounts. RQ 2 From a meso perspective, what are the properties of the complex network of transactions formed by crypto money laundering groups? As previous work has conducted network-based measurements and investigations on the entire Ethereum blockchain [ 15], we wish to perform network modeling of money laundering groups’ transactions to investigate the differences in money laundering networks compared to the entire transaction network. RQ 3 From a macro perspective, what is the impact of the flow of crypto money laundering on the economy of the Web3 ecosystem? Several reports [ 23,25,27] have revealed that a large number of stolen assets 1https://www.kaggle.com/datasets/xblock/smart-ponzi-scheme-labels 2http://xblock.pro/#/dataset/6 4 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA have flowed into the Web3 trading platform. Therefore, it is interesting to explore how the inflow of stolen assets will affect the Web3 ecosystem. 4.1 Abstraction Model for Money Laundering Since our goal is to measure the money laundering process of stolen funds in Web3, we first propose an abstract model of the crypto money laundering process. Formally, the money laundering process of a heist can be defined as a four-tuple:(P,L,I,T), whereP,LandIrepresent the address sets of placement ,layering , and integration , respectively (corresponding to the three phases of money laundering mentioned in Section 2.2). Tis a transaction set which represents the involved transactions during the money laundering process, including external, internal and ERC20 token transactions. Placement Layering IntegrationMixing ExchangeStablecoin Cross-chain Lending DEXAttacked account Tagged hackerUntagged accounts Stolen funds Service providers Fig. 1. Illustration of crypto money laundering phases in the Web3 ecosystem. Figure 1 shows a toy example of crypto money laundering in Web3. Specifically, the hacker performs an attack to steal assets and place them in P, i.e. placement address set. The addresses in Pis the source of the stolen funds, whose tagges can be obtained by consulting the blockchain browser (e.g. Etherscan) or official announcements. After takingP, the hacker initiates multiple transactions of Ether or ERC20 tokens, passing the money in Player by layer into the untagged layering address set Lin the layering phase, cycling back and forth, obfuscating the source. Finally, the stolen funds are aggregated to integration address set Ifor cash out. The addresses in Iare usually service providers such as exchanges, DeFi platforms, etc. 4.2 Framework of Dataset Construction 4.2.1 Target Incident Selection. Ethereum has seen many security incidents of crypto asset theft each year since its creation. As of April 27, 2022, the “Label Word Cloud” service on Etherscan has flagged 115 addresses as “Heist”3related to stolen assets from exchange hacks, scam projects, DeFi exploits, and more. It should be noted that the statistics of Etherscan only account for incidents from “cryptocurrency-native" crimes (i.e. on-chain crimes), in which illicit profits are almost always obtained in the form of cryptocurrency rather than fiat currency. Based on the “Heist” list marked by Etherscan, we selected a number of representative incidents by year and amount stolen, and obtained the placement address set Pfor each incident. The list of incidents selected by us for this study is shown in Table 1 in Section 4.4. 3https://etherscan.io/accounts/label/heist 5 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) Algorithm 1: Heuristic Transaction Tracing Algorithm Data: placement address set P, address label library 𝐿𝑖𝑏 Input: max. depth of traced layers 𝐾, max. number of addresses per layer Ψ, threshold transaction number for unknown services Ω Result: layering address set L, integration address set I, involved transaction set T 1𝑘←0;// The tracing depth 2𝐶𝑢𝑟𝑘←P ;// The current suspicious address set 3while𝑘≤𝐾and 0<|𝐶𝑢𝑟𝑘|<Ψdo 4 for𝑎∈𝐶𝑢𝑟𝑘do 5T𝑎←QuaryTxns( 𝑎); 6 ifDirtyAmount (T𝑎,Ð𝑘 𝑖=0𝐶𝑢𝑟𝑖) >𝛽then 7 if|𝑇𝑎|>Ωthen 8I←I∪{𝑎}; 9 𝐶𝑢𝑟𝑘←𝐶𝑢𝑟𝑘−{𝑎}; 10 𝑇𝑎←FilterTxns (𝑇𝑎,Ð𝑘 𝑖=0𝐶𝑢𝑟𝑖); 11 else 12 𝐶𝑢𝑟𝑘+1←𝐶𝑢𝑟𝑘+1∪GetUnfamiliar (T𝑎,𝐿𝑖𝑏); 13I←I∪ GetServices (T𝑎,𝐿𝑖𝑏); 14 end 15T←T∪T 𝑎; 16 end 17 end 18𝑘←𝑘+1; 19end 20L←Ð𝑘 𝑖=1𝐶𝑢𝑟𝑖; 4.2.2 Tracing Method. In order to build a model of the above-mentioned money laundering process of Web3 heists, we need to design strategies to trace transactions and sample the transactions used for money laundering. To this end, we propose a heuristic-based algorithm to identify the money laundering transactions of the heists, as shown in Algorithm 1. The basic idea of the algorithm is the Augmented Poison Policy [ 18]. That is, the downstream accounts for money laundering are usually also money laundering accounts, only to the service provider as an exit. Next, we briefly explain each part of the tracing algorithm. The input of the algorithm includes the placement address setPfor each incident, and the tracing parameters: the maximum depth of traced layers 𝐾, the maximum number of addresses per layer Ψ, and the threshold transaction number for unknown services Ω. The purpose of setting these parameters is to control the scope of transaction tracing, to avoid an explosion in the number of downstream addresses, and to delineate the conditions for terminating tracing. Transaction tracking starts with the placement address set P(line 1–2). For any address 𝑎in the current address set 𝐶𝑢𝑟𝑘at layer𝑘, query its external, internal and ERC20 transactions, and get the transaction record T𝑎(line 5). We assume that the purpose of money laundering is to conceal the origin of illicit funds and thus the process tends to be very low profile and avoids using one address for a large number of transactions. Therefore, money laundering usually involves intensive and large-amount transactions between a group of accounts. We consider the address 𝑎with a large number of transactions to be an unknown service address in the aggregation phase rather than the layering phase 6 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA (a) 0123456789 Depth0200040006000800010000# Predicted 1411461653911760384358158770 020406080100 Prediction (%) (b) Fig. 2. (a) The simplified money flow graph of the Upbit Hack case. Nodes represent accounts, and edges represent transactions. (b) Evaluation of Upbit Hack case. (lines 6–9), after filtering transactions containing small amounts of dirty money ( ≤threshold𝛽). We then retain the transactions between unknown service providers and upstream laundering accountsÐ𝑘 1𝐶𝑢𝑟𝑖within one week as suspected money laundering transactions (line 10). For address 𝑎with a small number of transactions, we select the next level of suspicious addresses 𝐶𝑢𝑟𝑘+1from recipient addresses of 𝑎’s outgoing transactions. In particular, we check whether these recipient addresses are known service providers, according the address label library𝐿𝑖𝑏If they are, they are added to I. Otherwise, they are included in the 𝐶𝑢𝑟𝑘+1crawled in the next layer (line 12-13). Then, the transactions of address 𝑎are added to the transaction set T(line 15). We keep increasing the depth𝑘(line 18) until the depth exceeds the maximum number of layers 𝐾, or the size of the current addresses set𝐶𝑢𝑟𝑘exceeds the range[0,Ψ](line 3). Finally, we merge the addresses of each layer to obtain the final layering address setL(line 20). 4.2.3 Data Crawling Tools. Crawlers are important means to accomplish the collection of the dataset in this work. Specifically, we used BlockchainSpider [36], an open source crawler toolkit implemented based on the Etherscan API, to obtain the transaction records of accounts, i.e., the QuaryTxns function in line 4, Algorithm 1. Moreover, we utilize the address label library 𝐿𝑖𝑏in line 12-13 of Algorithm 1. The label library 𝐿𝑖𝑏consists of two parts: the labels of the service platforms and token contracts. To determine the service providers, we employ “Label Spider” of BlockchainSpider [36] to crawl label addresses associated with exchanges (e.g. “Exchange”, “DEX”, etc.), mixing services (e.g. “Tornado.Cash”) and other label addresses that appear in connection with actual money laundering activities. We obtain more than 260,000 items, which is sufficient to cover money laundering destinations. The token contracts refer to the “ERC20TokenInfo” dataset with more than 313,000 ERC20 tokens, and the “ERC721TokenInfo” dataset with more than 15,000 ERC721 tokens, published by Zheng et. al. [38], including contract addresses, token names, token symbols, etc. These can help identify the types of tokens being used for money laundering in token transactions. 4.3 Example: Upbit Hack Case To show the complexity of crypto money laundering, we visualize the simplified money flow graph of Upbit Hack (without round-trip transactions) in Figure 2(a). Specifically, the root node (i.e., the leftmost node) represents the source of money laundering, (i.e., P), the following nodes show the layering addresses (i.e., L), and the links show the tainted money flow through multiple transactions (i.e., T). Through this case, we can see that crypto money laundering flows are massively intertwined. 7 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) Table 1. The selected incidents in Web3 from 2018-2022. Case Name Case Type Year Case Name Case Type Year CoinrailHacker CEX Hack 2018 LiquidExchangeHacker CEX Hack 2021 BancorHacker DeFi Exploit 2018 AlphaHomoraV2Exploiter DeFi Exploit 2021 SpankChainHacker Others 2018 bZxPrivKeyExploiter DeFi Exploit 2021 FakeMetadiumPresale Scam 2018 CreamFinanceExploiter DeFi Exploit 2021 BitpointHacker CEX Hack 2019 EasyfiHacker DeFi Exploit 2021 CryptopiaHacker CEX Hack 2019 PolyNetworkExploiter DeFi Exploit 2021 DragonExHacker CEX Hack 2019 UraniumFinanceHacker DeFi Exploit 2021 UpbitHacker CEX Hack 2019 BadgerDAOExploitFunder Others 2021 PlusTokenPonzi Scam 2019 VulcanForged Others 2021 KucoinHacker CEX Hack 2020 ATOStolenFunds CEX Hack 2022 AkropolisHacker DeFi Exploit 2020 LCXHacker CEX Hack 2022 HarvestFinanceExploiter DeFi Exploit 2020 CashioAppExploiter DeFi Exploit 2022 Lendf.MeHacker DeFi Exploit 2020 FloatProtocolFuseExploiter DeFi Exploit 2022 WarpFinanceHacker DeFi Exploit 2020 DEGOandCocosExploiter Others 2022 NexusMutualHacker Scam 2020 Arthur0xWalletHacker Scam 2022 AscendEXHacker CEX Hack 2021 Fake_Phishing5041 Scam 2022 BitmartHacker CEX Hack 2021 The lack of ground truth for money laundering addresses makes it difficult to show the effectiveness of our tracing method through large-scale experiments. But the good thing is that Etherscan has a unique case of flagging a hacker’s money laundering account, which is the Upbit Hack case4discussed here. Therefore, we start from the source of Upbit Hack case and obtain the suspicious laundering addresses with Algorithm 1 (Here we choose conservative parameters 𝐾=20,Ψ=10,000,𝛽=0.01, andΩ=1,000.) Then, as given in Figure 2(b), we calculate the precision values with varying tracing depth to verify the effectiveness of our tracing method. We observe that as the depth increases, the number of detected money laundering addresses grows exponentially. Even when the depth reaches 8, the precision is still over 90%. This result suggests that our proposed tracing method is somewhat convincing. 4.4 EthereumHeist Dataset Overview In this work, based on the above data collection method, we collect a total of 33 representative security incidents that occurred in the Web3 ecosystem from 2018 to 2022 based on Etherscan’s “Hesit” tag. As shown in Table 1, there are four main types of Web3 cases collected in our dataset: CEX hack, DeFi exploits, Scams and Others, e.g. exploits of Decentralized Autonomous Organization (DAO), Game Finance (GameFi) and NFT Finance (NFTFi), etc. We take a preliminary data analysis and exploration of the money laundering dataset as follows (The complete statistical table of case information is shown in Appendix): (i)In terms of duration, these cases range from less than 1 day to about 3 years. It can be found that some of the cases in early years usually last longer, e.g., the Upbit Hack laundering lasted for more than 2 years, while all the cases that lasted as short as one day occurred in 2022. This may be related to the newer means in Web3 - mixing service. For example, in the LCX exchange hack that occurred in 2022, the hacker took 4https://etherscan.io/accounts/label/upbit-hack 8 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA (a) Lifespan distribution (b) Degree distribution (c) Frequency distribution Fig. 3. Comparison of trading characteristics. only about a day to exchange the stolen ERC20 tokens for Ether through a decentralized exchange (DEX), and eventually transferred them all to a mixing service named Tornado.Cash. (ii)In terms of the amount involved, the average amount of money laundered in these cases ranges from $100 thousand to $1 million, and the highest value reaches $10 million, which shows that the financial loss due to the cases is still very huge. (iii)In terms of the complexity of the cases, we calculate the number of layers (i.e., tracing depth), transaction fees (i.e., gas cost), and the size of transaction set Tof each case. In general, cases with more layers of money laundering have more accounts in Land transactions in T, resulting in a larger and more complicated case data, which makes it easier for hackers to hide and conceal the source of stolen funds, but also costs hackers more in transaction fees. 5 RQ1: TRADING FEATURES OF ACCOUNTS For the laundering accounts of our dataset, we investigate their trading features such as transaction amounts, frequencies, lifespan, etc. To highlight the differences between layering and normal accounts, we also randomly sample the same number of normal accounts as reference objects. After comparing and observing the collected data, we obtain the most significant findings as follows. 5.1 Lifespan As shown in Figure 3(a), on the one hand, many money laundering accounts have extremely short lifespans, exhibiting a “used-and-dumped” characteristic. Compared to normal accounts, the peak of the lifespan distribution for the money laundering account is more to the left. On the other hand, money laundering accounts with larger lifespans show an irregularly high percentage of jumps, which is because some of the more careful hackers do not transfer stolen funds immediately, but lurk until the wind passes before laundering. For example, the Coinrail hacker5stole assets in 2018 and then lurked for two years until 2020 when the stolen money was transferred out. 5.2 Degree and Frequency Degree indicating the transaction activeness, i.e., the sum of in-degree and out-degree. It can be concluded from Figure 4(a) that the net transaction follows power law distribution, we also plot the fitted line 𝑦=𝑥−𝛼(𝛼=1.6) to 5https://cn.etherscan.com/address/0xf6884686a999f5ae6c1af03db92bab9c6d7dc8de 9 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) Avg.NetInflow Avg.inflow Outflow Avg.outflow Net Avg.Net 1.4212.9 56.8 204.6 56.38.31.0138.6 12.7 125.7 19.9 12.9Heist Normal Fig. 4. Comparison of transaction amount (ETH). prove this. Due to the threshold we set is 103, we can see from the figure that our data cut at the same point. As for the several points, that fall around 104is because they get a big degree in the placement phase the very first time and escape from our threshold control. Frequency is the number of transactions that an account is involved in per day. Generally, the frequency of a Heist account is evenly distributed over all magnitudes, but when it comes to the account that has a high proportion, we can see they normally have a high transaction frequency. 5.3 Transaction Amount We calculate and count the inflow, outflow, and net value of layering accounts in each heist, as well as the corresponding average value per transaction of accounts, as shown in Figure 3(b). Note that we filter the account whose transaction value is larger than 1,000 to reduce the bias caused by exchanges with frequent transactions [ 3]. We find that the transaction amount of layering accounts is significantly larger than normal accounts in almost every indicator. This shows that even though hackers can create accounts without restrictions, the amount of stolen funds is so large that the amount per transaction in the laundering process remains large. As shown in Figure 3(b), the average inflow and outflow value of layering accounts reach over 50 ETH, which is about 3-5 times higher than that of normal accounts. The reason for the smaller net value of laundering may be that as little as possible money is left hackers usually leave as little money in the layering account as possible to reduce the risk of being frozen. Finding 1. The laundering accounts usually present an extremely short or long lifespan, reflecting the “use- and-dump” or “wait-and-see” strategies, respectively. Hackers tend to engage in higher value transactions, but their net transaction amount is smaller. The value flow in and out heist account reaches around 200 ETH on average. 6 RQ2: NETWORK FEATURES OF GROUPS In the previous section, we describe the similarities and differences in the characteristics of isolated money laundering accounts and normal accounts, so naturally we have the next question, what are the similarities and differences between these money laundering transaction networks and normal transaction networks? 10 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Table 2. Comparison of network properties. (“Med.” means median. “Avg.” means average). Self-loop Reciprocity Density (s.,undi)7Density (multidi)Global clusterAvg. pathlen HeistEthNet (Med.) 0.06% 4.62E-02 2.59E-02 2.67E-02 1.37E-02 2.47 HeistEthNet (Avg.) 0.64% 9.78E-02 1.86E-01 7.70E-01 2.71E-02 5.56 TransactionNet [15] 0.13% 3.00E-02 1.24E-07 1.87E-07 1.00E-01 5.33 HeistTokenNet (Med.) 0.02% 4.21E-02 2.83E-02 3.36E-02 7.08E-03 2.44 HeistTokenNet (Avg.) 0.03% 1.01E-01 1.78E-01 3.80E-01 1.15E-02 4.97 TokenNet [15] 0.19% 3.00E-02 2.03E-07 1.87E-07 1.75E-01 3.87 6.1 Network Modeling If criminal groups initiate transactions for the purpose of money laundering, then these transaction networks may differ from the normal transaction network of Ethereum. To this end, we first model the money laundering transaction of each case as a network, 𝐺=(𝑉,𝐸),𝐸is the edge set containing all transactions in the case, i.e. T, and𝑉is a node set which denotes the accounts involved in these transactions. 6.2 Global Network Properties For each money laundering case, we model two networks: the Ether transactions (including external and internal transactions) as HeistEthNet , and the ERC20 token transactions as HeistTokenNet , in order to compare with TransactionNet [15] and TokenNet [15] of the entire Ethereum, respectively. It is worth noting that the entire network [ 15] may reflect the nature of the normal transaction network, as our money laundering accounts represent a minuscule 0.3% of the entire transaction network (46 million). Comparative results of graph properties are shown in Table 2. 6.2.1 Basic Features. First, we count the self-loop ratio of each money laundering network and calculate their statistic. When compared to TokenNet , as expected, the self-loop ratio of HeistTokenNet is smaller because self-loop transactions are not consistent with the purpose of money laundering, i.e., no splitting and diverting. Surprisingly, the average self-loop ratio of HeistEthNet is higher than that of TransactionNet . Our further analysis reveals that it is because the CashioApp Exploiter6left messages to the community through several self-transactions in the input data area, resulting in the high self-loop ratio in this case. Reciprocity is defined as the ratio of the number of edges pointing in both directions to the total number of edges. We find that the reciprocity of money laundering networks is higher than that of the entire network, which is likely related to the high activity of token swaps in the Web3 money laundering process. Finally, we report the density of networks, following the formulas in the exiting research [ 15]. As shown in Table 2, both HeistEthNet andHeistTokenNet have more than twice the average density in multidigraph than they have in simple undigraph, with HeistEthNet even reaching 4 times. But in the entire network, the density ofTransactionNet in multidigraph is only 1.5 times of that in simple undigraph. This indicates crypto money laundering networks are frequent and dense sub-networks. 6.2.2 Small-world Behaviour. Researchers refer to the property of large network size but small average distance as small world effect. Analogous to social networks, the entire Ethereum blockchain graphs are also small-world [ 15]. 6https://etherscan.io/address/0x86766247ba3405c5f15f06b895294200809e9cfb 7simple, undirected graph 11 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) M4 M3 M2M1 M 6 M 5 M 7 M8 M9M 10 M1 1 M12 M13 M14 M15 M16 (a) FloatProtocolFuseExploiterBadgerDAOExploitFunderCreamFinanceExploiterDEGOandCocosExploiterHarvestFinanceHackerLiquidExchangeHackerUraniumFinanceHackerPolyNetworkExploiterbZxPrivKeyExploiterFakeMetadiumPresaleVulcanForgedHackerCashioAppExploiterWarpFinanceHackerNexusMutualHackerSpankChainHackerLendf.MeHackerAscendEXHackerBitpointHackerATOStolenFundsEasyfiHackerBancorHackerBitmartHack1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16Motif LCXHacker (b) Fig. 5. (a) Directed motifs: 𝑀1and𝑀2are all connected two-node motifs; 𝑀3–𝑀15are all 13 connected three-node motifs; 𝑀16is the four-node bi-fan motif. (b) Distribution of the various motifs in money laundering networks. In Table 2, we find that the average shortest path length ofHeistEthNet andHeistTokenNet is 4-6, the same as that of the entire Ethereum transaction network. However, by calculating the average clustering coefficient of the money laundering network corresponding to each case, we find that the money laundering network (both HeistEthNet andHeistTokenNet ) has a smaller clustering coefficient than the entire network. This may be because the special purpose of money laundering makes it lose the multi-hub and social characteristics of the entire network. Therefore, although the average shortest path length of the money laundering network is small enough, its clustering coefficient is small, so the money laundering networks do not exhibit the small world phenomenon. 6.3 High-order Motifs Counting Higher-order structure of networks can be captured by network motifs [ 2] which are recurring small subgraphs in the network. To characterize higher-order patterns, we count the percentage of directed motifs (described in Figure 5(a)) of the simple, directed money laundering network of each case. Figure 5(b) shows the results for the percentage of each motif in 23 cases (the others encountered out-of-memory errors). Then, we compare with the entire Ethereum blockchain network [15] and obtain some interesting observations: (i)The fractions of closed triangular motifs are quite low ( 𝑀3–𝑀9) in money laundering networks. This may be because the pattern of closed triangle motifs is a manifestation of assets circulating internally, such as wash trading behavior [29], which is not consistent with the intent to launder assets. (ii)On the contrary, open triangle motifs are the most frequent motifs that appear in the money laundering network, of which there are three most, i.e. 𝑀10-𝑀12. These three motifs correspond exactly to three phases of money laundering: 𝑀10belongs to the placement phase, which spreads the illegally obtained stolen money and extends the money path; 𝑀11belongs to the layering phase, which continuously passes stolen funds and 12 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA makes it more difficult to trace; 𝑀12belongs to the aggregation phase, which collects the scattered laundered stolen money for withdrawal. (iii)In particular, the money laundering network of DeFi exploit cases has more 𝑀13-𝑀15motifs, in which the bidirectional edges are most likely related to a classic DeFi action – token trade (also called exchange), i.e., the trader’s account sells a certain amount of a certain token in exchange for a certain amount of another token in a liquidity pool of an Automated Market Maker (AMM). To this end, we identify the DeFi token swap action in each case, referring to DeFiRanger [20]. We find that the number of 𝑀13-𝑀15motifs does have a strong correlation with the DeFi token swap action. For example, at least 70 token swaps were identified in money laundering of Cream Finance Exploiter8, and its𝑀13-𝑀15motif fractions are also relatively high. To further understand the criminal activities of hackers using DEXs/AMMs, we explore and analyze the cross-asset behavior of hackers in the money laundering process and its purpose, and attribute it to the following activitie: (i)Swapping tokens to non-freezable assets. For example, Tether (USDT) is a stablecoin pegged to the US Dollar, operated by Tether Limited Inc. USDT issuers may freeze assets held by illegal addresses. As a result, criminals use DEXs to swap freezable assets for non-freezable ones. For example, in the AscendEX Exploit9 event that occurred in December 2021, the attackers quickly exchanged $5.7million worth of USDT stolen through the Curve.Fi service for DAI, USDC, in about two hours and 40 minutes. (ii)Swapping tokens for mixing. Many criminals make use of DEXs to swap their stolen tokens to ETH for mixing. For example, in the Bitmart Hack10event that occurred in December 2021, the criminal swapped MANA token for ETH in 1 inch DEX, then sent swapped ETH to Tornado.Cash for mixing. (iii)Swapping tokens to bridge them to other blockchains. Cross-chain transactions of criminals are cunning behavior to confuse the flow of dirty money. Before Cross-chain transactions, criminals need to swap assets for tokens convertible on bridges. For example, in the Nexus Mutual Hacker event that occurred in December 2020, the stolen ETH was swapped for renBTC, then the renBTC was bridged to the Bitcoin blockchain. RenBTC is a wrapped version of bitcoin on Ethereum which can then be bridged across to the Bitcoin blockchain using RenBridge. We go a step further to explore Illicit Token Flows for money laundering. We analyze these 33 cases in this paper and find that criminals stole 923 different types of token assets. These different types of assets went through multiple DEXs token swaps (in some cases occurring multiple times), with the more popular destination tokens being: ETH, USDT, WETH, and DAI. the average time for cross-asset behavior to occur was 15 hours after the start of laundering the stolen assets. Some of the more popular DEXs services include Uniswap, 1 inch, etc. Finding 2. In general, the self-loop ratio of crypto money laundering networks is lower than that of the entire network and the reciprocity is the opposite. The crypto money laundering network in Web3 is a frequent and dense subnetwork, but does not exhibit the small world phenomenon. There exists a large number open triangle interaction patterns but few closed triangle patterns in crypto money laundering networks. Particularly, the open triangles in DeFi exploit cases contain more bidirectional edges, reflecting the method of further obfuscating stolen assets through Defi’s token exchange. The use of DEXs/AMMs by crypto criminals is closely associated with exploits in the DeFi projects and hacks of exchanges. 8https://etherscan.io/address/0x24354d31bc9d90f62fe5f2454709c32049cf866b 9https://etherscan.io/address/0x2c6900b24221de2b4a45c8c89482fff96ffb7e55 10https://etherscan.io/address/0x39fb0dcd13945b835d47410ae0de7181d3edf270 13 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) (a) Word cloud of service providers 2018 2019 2020 2021 2022 Year0%20%40%60%80%100%PercentCentralized Exchanges Decentralized Exchanges Crossing chain Services Loan Services Others Mixing Services (b) Evolution of destination service providers Fig. 6. Illustration of the economic impact of money laundering in terms of destination service providers and marketplace. 7 RQ3: ECONOMIC IMPACT OF LAUNDERING 7.1 Service Providers of Laundering Exit In the aftermath of Web3 security incidents, almost all black money flows to service providers to be washed. Thus, it is necessary to present the percentage and changes of various service providers. For a first impression, in Figure 6(a), we draw a word cloud graph of the service providers involved in collected events. As we can see, the most frequent word is “Uniswap”. Uniswap is a decentralized exchange of great name that enables peer-to-peer market making and enables users to trade or swap cryptocurrencies without any involvement with a centralized third party, so it provides a wide platform for criminals to money laundering. Additionally, there are some other typical service providers popular among crypto laundering in Web3. For example, Binance (an eminent centralized exchange), Opensea (the largest NFT marketplace), and SushiSwap (a decentralized exchange similar to Uniswap). To further explore the evolution of service providers involved in money laundering over time, we first divide the service providers into six categories, which are centralized exchanges (CEXes), decentralized exchanges (DEXes), crossing chain services, loan services, mixing services, and others. Then, we draw a stacked bar chart displaying the percentage of various service providers change over time as shown in Figure 6(b). As can been seen, the preferences of the service providers to which this dirty money goes change over time. On the one hand, centralized exchanges, once the top destination for stolen funds in 2018, phased down in 2019. The reason may be that CEXes have enhanced AML and KYC procedures at the request of the regulatory section in recent years [ 9,10]. On the other hand, there is an increase in the share of DEXes, which can infer that DEXes without a centralized third party is more likely to escape law enforcement investigations. Moreover, the share of crossing chain services is growing year by year since 2019, which allows black money to circulate and confuse on multiple chains, indicating that criminals are becoming more crafty. There is even dirty money flowing to lending services such as Aave, Compound, Dydx, etc. By using the liquidity pool of lending services, criminals can not only conceal the source of dirty money and reduce the possibility of being traced, but also earn extra income via providing huge amount dirty money to liquidity pools. In addition, since the inception of the mixing service, Tornado.Cash, in 2019, it has been one of the destinations of dirty money. It can be presumed that it is a 14 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Fig. 7. Transaction volume from Kucoin Hacker vs. ETH price classic and effective money laundering service, no wonder Tornado.Cash was recently sanctioned by the U.S. OFAC11. In addition, there exist some other kinds of service providers. For example, criminals deposit crypto to Air Wallet, a kind of distributed airdrop and digital wallet platform. 7.2 Crypto Price Drop Caused by Cash-outs In the previous section, we find that various trading platforms are destinations for dirty money. There is a great possibility that money laundering accounts selling stolen crypto in large quantities to withdraw cash will affect the volatility of the crypto price. Therefore, in this part, we further explore whether hackers sending ETH to various service providers affects the price of ETH. Due to space limitation, here we only show the result of one of the typical cases - Kucoin Hacker12. From Figure 7, we see that KucoinHackers sent ETH to service providers from April 2021 to May 2022 and there exist 5 apparent spikes of transaction volume, for example, May 2021, December 2021, March 2022 and May 2022. When a transaction spike occurs, which means that the hacker is withdrawing a lot, the price of ETH drops significantly. Therefore, we can presume that a large number of cashouts correlate significantly with the price of ETH drops. This may be because hackers are eager to withdraw cash and then sell ETH at low prices, resulting in a significant drop in the price of ETH. In addition, we find that the stolen NFTs also face the fate of being sold at low prices. On the day of the Arthur Hot Wallet heist, the hacker directly sold or auctioned off the 17 stolen Azuki NFTs for around 10 ETH, which was significantly lower than the average market price (13 ETH) at the time. One of the biggest price drops was Azuki#60613- from 78 ETH before the heist to 50.15 ETH when it was sold off. Moreover, the hacker transferred the stolen NFT to other wallets before dumping it in order to prevent it from being frozen. On the one hand, 11https://home.treasury.gov/news/press-releases/jy0916 12https://etherscan.io/address/0xeb31973e0febf3e3d7058234a5ebbae1ab4b8c23 13https://etherscan.io/nft/0xed5af388653567af2f388e6224dc7c4b3241c544/606 15 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) ② Transfer ETH... ① Stole Funds③ Create RZN & Mint ④ Add Liquidity CreatorHackersAkropolis Fake RZN ⑥ Remove Liquidity⑤ Swap Token Liquidity PoolParticipants (RZN-ETH) Fig. 8. The Role Fake Tokens Play in Money Laundering. it is not obvious to distinguish whether the purchaser of the stolen NFT is a hacker-controlled account or an ordinary user, increasing the difficulty of tracing the hacker’s money laundering transactions. On the other hand, ordinary users are likely to accidentally purchase these stolen NFTs, resulting in their subsequent blacklisting by the trading platform, which is not conducive to NFT market stability. Finding 3. A large number of cashouts of hackers correlate significantly with ETH price drops. The hackers send lots of stolen ETH to service providers in order to get back clean fiat currency. Hackers dumping stolen NFTs at low prices could lead to a crisis of trust in the NFT programs and increases the risk of freezing the crypto assets of a genuine user of NFT trading platforms. The service providers being used to launder money are changing over time. The phenomenon of decentralized exchanges, cross-chain services, and lending services increasing their share year by year indicates that criminals are becoming more anti-regulatory and are constantly seeking more cunning and stealthier means of money laundering. 8 COUNTERFEIT TOKEN DEPLOYMENT FOR CUNNING LAUNDERING In addition to money laundering techniques such as layered transfers and cross-chaining, more cunning hackers may disguise themselves as other common players to evade detection in the Web3 ecosystem, where the existence of counterfeit tokens provides the perfect opportunity for hackers to launder money. Researchers [ 12,37] have found that counterfeit tokens are prevalent in the Web3 ecosystem because most DEXes do not enforce any rules for token listing. Hackers can easily create counterfeit tokens and liquidity pools, and even disguise themselves as ordinary speculators to launder illicit funds from liquidity pools of counterfeit tokens. To this end, we conduct an empirical analysis based on the counterfeit token dataset provided by Gao et. al. [12], and are surprised to find that in 13 of the 33 cases in this paper are related to counterfeit tokens some way. One notable case is Akropolis Hacker14(a DeFi Hacker). By tracing downstream laundering transactions of Akropolis Hacker, we find evidence that this hacker was laundering money by creating counterfeit tokens. As plotted in Figure 8, the main procedures are as follows: 14https://etherscan.io/address/0x9f26ae5cd245bfeeb5926d61497550f79d9c6c1c 16 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA (i)Using the tracing method mentioned earlier, we see that the hacker cascaded the stolen funds from Akropolis to several accounts under his control (0x1c8015and 0x982d16identified as “Heist” in our dataset), and transferred funds to another controlled account 0x1f817. (ii)Subsequently, address 0x1f8 created the fake token RZN (Rizen Token)18, and a liquidity pool on Uniswap19 with 594 fake RZN and 0.877 ETH. (iii)The hackers then manipulated the liquidity pool through multiple accounts, posing as ordinary speculators and participating in the trading of counterfeit tokens, e.g. address 0x8c4d20sold 1000 fake RZN and got 300 clean ETH. (iv)Finally, the RZN creator removed the liquidity of 2144 RZN coins and 0.25 ETH. The hackers successfully laundered the illegal funds by disguising their addresses as ignorant participants. Finding 4. Hackers launder money anonymously by creating fake tokens and disguising their addresses as ignorant participants, which is an upgraded method of money laundering in Web3. At the same time, the fake tokens created by hackers simultaneously increase the risk of ordinary users falling for the scams. 9 MONEY LAUNDERING CORE GROUP IDENTIFICATION. In the previous section of dataset construction, we introduce how to mine downstream unknown money laun- dering accounts and networks based on the starting hackers, exploiters, and scammers. Here, the target of the identification of core money laundering organizations is to find core account groups with more intensive interactions and frequent capital transactions in the relatively sizeable downstream money laundering network, as a supplement to criminal evidence collection. In order to achieve this target, on the basis of the money laundering network initially crawled in this paper, we first define the money laundering suspiciousness of an account, then use the approximate greedy algorithm to prune the original downstream network and build a minimum priority tree to speed up the iterative process. Through this process, the most suspicious subnetwork can be obtained as the core money laundering network. The main idea of suspiciousness comes from the money laundering characteristics observed in RQ1 and RQ2: Money launderers will create a large and dense subgraph of transfers because money laundering accounts need to transfer a large number of funds in a short period of time to avoid being detected and frozen, resulting in a dense transfer subnetwork. The suspiciousness of subgraph 𝑆=(𝑁,𝐸), where𝑁denotes nodes and 𝐸denotes edges, is defined as: 𝑔(𝑆)=𝑓(𝑆) |𝑆|, which can be regarded as the result of taking the average value after summing the suspiciousness of each node and edge in the subgraph structure. Generally, 𝑓(𝑆)is defined as follows: 𝑓(𝑆)=𝑓𝑁(𝑆)+𝑓𝐸(𝑆) =∑︁ 𝑖∈𝑁𝑎𝑖+∑︁ 𝑖,𝑗∈𝑁,(𝑖,𝑗)∈𝐸𝑐𝑖𝑗, 15https://etherscan.io/address/0x1c80f8670f5c59aab8e81e954aabb64dabde2710 16https://etherscan.io/address/0x982dd33d6bc5bf83eedcbcab92e4899c7a 17https://etherscan.io/address/0x1f84ba7bacd29e875367688b38ecccb7849b50fa 18https://etherscan.io/token/0x9c91310c9bf1c779b667f46322d33bfdc96c1a07 19https://etherscan.io/address/0x658b4a15aae288757c41a9b074ab1881d3ecad0c 20https://etherscan.io/address/0x8c4dedecbe3e8fbcc0501599cb59e7feadd99ffc 17 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) Algorithm 2: An approximate greedy algorithm based on a Minimal priority tree. Data: Initially crawled Laundering Transaction newtwork 𝐺=(𝑈∪𝑉,𝐸)by Algorithm 1, suspiciousness 𝑔is defined before. 1𝑋denotes the subgraph of 𝐺.Result: A densest subgraph with maximum suspiciousness 2initialization(𝐺,𝑔); 3construction of priority tree 𝑇of𝑈∪𝑉; 4𝑋0←𝑈∪𝑉; 5for𝑡=1,...,𝑚+𝑛do 6𝑖∗←𝑎𝑟𝑔𝑚𝑎𝑥𝑖∈𝑋𝑖𝑔(𝑋𝑖\{𝑖}); 7 update the priorities in tree 𝑇for all neighbors of 𝑖∗; 8𝑋𝑡←𝑋𝑡−1\{𝑖∗}); 9end 10𝑋∗←𝑎𝑟𝑔𝑚𝑎𝑥𝑋𝑖∈{𝑋0,...,𝑋 𝑚+𝑛} where𝑎𝑖denotes node suspiciousness, 𝑐𝑖𝑗denotes edge suspiciousness. For simple calculation, we set edge suspiciousness 𝑐𝑖𝑗=0and𝑎𝑖=𝛼when node𝑖is labeled as a heist. In our experiment, we set 𝛼=49to achieve the best result according to the experiment. Note that when it comes to application, the formula of 𝑓(𝑆)is general and can be replaced with other formulas according to needs. The algorithm2 for identification of the money laundering core network is shown as follows: Step 1: Built a transaction network 𝐺=(𝑈∪𝑉,𝐸), where𝑈is a set of transaction sender with size 𝑚, and𝑉is a set of recipients with size 𝑛,𝐸indicates transaction records. Step 2: Build a priorities tree to restore the priorities 𝑃of each node 𝑖, calculated as: 𝑃𝑖=𝑓(𝑋𝑡\{𝑖})−𝑓(𝑋𝑡). Step 3: Traverse all nodes in 𝑈and𝑉, and calculate the suspiciousness after removing the current node 𝑖∗. Step 4: Find out the subgraph with the largest suspiciousness. Step 5: Update the priorities of nodes. Step 6: Iterate accordingly until all nodes have been traversed. Step 7: Get the subgraph 𝑋∗with the largest suspiciousness. Due to limited space, we only show the experimental process and results of the Upbit Hack money laundering case here. First, We built a bipartite graph based on the transaction data. In the case of Upbit Hack, there are 131,654nodes in𝑈,16,138of which are labeled as heists, and 482,775nodes in𝑉with 16,536heists in them. The heists are marked according to the labels we get in the previous experiment. That is, we get a matrix of size |𝑈|×|𝑉|=131,654×482,775. After implementing the algorithm, we get a core network of size 200×1,332. For the200and 1,332nodes extracted from 𝑈and𝑉respectively, we calculated the classification results of whether these account has been marked as money laundering: it turns out that the precision of our experiment reached 82.5%and 100% in𝑈and𝑉respectively. Next, we collect the transaction data from our core network. The original transaction network has 2,348,180transactions while the core network we extract has only 45,811transactions. In all, through this method in this article, the money laundering core network of size 200×1,332can be extracted from the original Upbit Hack money laundering network of size 16,138×16,536, which narrows the scope of suspicion for criminal evidence collection and investigation. 18 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA 10 ETHICAL CONSIDERATIONS In this paper, we reveal the first crypto money laundering dataset in Web3, investigating and analyzing the money laundering techniques of hackers, exploiters, scammers, and others. The disclosure and investigation may cause the community to worry about contributing to the “copycat crime” effect, but actually, our research motivation is similar to the studies of Ponzi contracts [ 5], phishing scams [ 16], DApp attacks [ 21], counterfeit tokens [ 12], etc. The money laundering transactions published in EthereumHeist are only the tip of the iceberg. As shown in this paper, cybercriminals are improving their methods and techniques year by year in the “cat-and-mouse” game of Web3 anti-money laundering, reinforcing the need for investigation and understanding of crypto money laundering in the Web3 ecosystem. This work will facilitate more effective designs of anti-money laundering algorithms based on our interesting findings in the laundering accounts and networks, and further promote the healthy development of the Web3 ecosystem. As for whether our research involves privacy issues, the answer is NO. First, the data we collect is completely public and can be accessed by anyone on blockchain. Second, our dataset only includes anonymous transaction data on blockchain, but not other data associated with real-life personal information. Therefore, based on these two points, we do not consider that this work will invade the privacy of others, or directly lead to the arrest or prosecution of individuals. 11 DISCUSSION & CONCLUSION In this paper, we conduct the first systematic study to characterize the crypto money laundering in the Web3 ecosystem. We start from a very small number of security incident accounts, collect abundant money laundering transactions, and build a dataset named EthereumHeist . Based on the dataset, we obtain a series of interesting findings of crypto money laundering in Web3 via answering three research questions from micro, meso to macro perspectives, reflecting the feasibility and necessity of Web3 AML. By answering RQ1 and RQ2, we summarize the characteristics at the account level and the network level, e.g. the lifespan and transaction amounts of accounts, and higher order patterns of sub-networks. These findings can help design effective red flag indicators and detective methods for Web3 AML. Furthermore, by answering RQ3 in a data-driven manner, it can be observed that DApps on Web3 such as DEXes, lending services, etc. have been increasingly involved in money laundering activities in recent years. There is also evidence that dumping stolen money in the money laundering process affects price volatility. Therefore, money laundering is detrimental to the stability of the Web3 market, and it is necessary to develop decentralized security protocols based on economic incentives to achieve effective regulation of decentralized platforms in Web3. Coincidentally, the EU Commission has recently launched a public call for tender for a study on “embedded supervision” of DeFi [6]. As a preliminary exploration of Web3 money laundering and limited by space, this paper also has some limitations (discussed in the Appendix), and there are ample opportunities for future work following our dataset and analysis. As the proposed dataset contains lots of accounts and transactions, and empirical results, researchers are able to propose intelligent tracing methods and money laundering subgraph detection based on this dataset, as those based on Elliptic dataset. Moreover, it is interesting to investigate the correlations and interactions between money laundering transactions in different cases, such as the hacks on Upbit and Kucoin, which are both responsible for Lazarus Group [ 22]. This may provide further insights into the evolution of their money laundering strategies and lead to more accurate money laundering tracing. Last but not the least, researchers can also design strategies and methods based on cross-chain tracing in the Web3 ecosystem to extend the dataset of this paper. 19 SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA Anonymous author(s) REFERENCES [1]Ismail Alarab, Simant Prakoonwit, and Mohamed Ikbal Nacer. 2020. Comparative analysis using supervised learning methods for anti-money laundering in bitcoin. In ICMLT . 11–17. [2] Austin R. Benson, David F. Gleich, and Jure Leskovec. 2016. Higher-order organization of complex networks. Science 353, 6295 (2016), 163–166. [3]Weili Chen, Xiongfeng Guo, Zhiguang Chen, Zibin Zheng, and Yutong Lu. 2020. Phishing scam detection on Ethereum: Towards financial security for blockchain ecosystem. In IJCAI . 4506–4512. [4]Weili Chen, Jun Wu, Zibin Zheng, Chuan Chen, and Yuren Zhou. 2019. Market manipulation of bitcoin: Evidence from mining the Mt. Gox transaction network. In INFOCOM . 964–972. [5]Weili Chen, Zibin Zheng, Jiahui Cui, Edith Ngai, Peilin Zheng, and Yuren Zhou. 2018. Detecting ponzi schemes on Ethereum: Towards healthier blockchain technology. In WWW . 1409–1418. [6]European Union Commission. 2022. Study on Embedded Supervision of Decentralised Finance 2022/S 192-542418 Contract Notice . https: //ted.europa.eu/udl?uri=TED:NOTICE:542418-2022:HTML:EN:HTML&tabId=1&tabLang=en [7]McKinsey & Company. 2022. Web3 beyond the hype . https://www.mckinsey.com/industries/financial-services/our-insights/web3- beyond-the-hype [8]Bogdan Dumitrescu, Andra Băltoiu, and Ştefania Budulan. 2022. Anomaly detection in graphs of bank transactions for anti money laundering applications. IEEE Access 10 (2022), 47699–47714. [9]FATF. 2019. Guidance for a risk-based approach to virtual assets and virtual asset service providers . www.fatf-gafi.org/publications/ fatfrecommendations/documents/Guidance-RBA-virtual-assets.html [10] FATF. 2021. Updated guidance for a risk-based approach to virtual assets and virtual asset service providers . www.fatf-gafi.org/publications/ fatfrecommendations/documents/Updated-Guidance-RBA-VA-VASP.html [11] FATF. 2022. Money laundering and terrorist financing red flag indicators associated with virtual assets . http://www.fatf-gafi.org/ publications/fatfrecommendations/documents/Virtual-Assets-Red-Flag-Indicators.html [12] Bingyu Gao, Haoyu Wang, Pengcheng Xia, Siwei Wu, Yajin Zhou, Xiapu Luo, and Gareth Tyson. 2020. Tracking counterfeit cryptocurrency end-to-end. SIGMERICS 4, 3, 1–28. [13] Zengan Gao and Mao Ye. 2007. A framework for data mining-based anti-money laundering research. Journal of Money Laundering Control 10, 2 (2007), 170–179. [14] Kartick Kolachala, Ecem Simsek, Mohammed Ababneh, and Roopa Vishwanathan. 2021. SoK: Money laundering in cryptocurrencies. In ARES . [15] Xi Tong Lee, Arijit Khan, Sourav Sen Gupta, Yu Hann Ong, and Xuan Liu. 2020. Measurements, analyses, and insights on the entire Ethereum blockchain network. In WWW . 155–166. [16] Sijia Li, Gaopeng Gou, Chang Liu, Chengshang Hou, Zhenzhen Li, and Gang Xiong. 2021. TTAGN : Temporal transaction aggregation graph network for Ethereum phishing scams detection. In WWW . 661–669. [17] Joana Lorenz, Maria Inês Silva, David Aparício, João Tiago Ascensão, and Pedro Bizarro. 2020. Machine learning methods to detect money laundering in the bitcoin blockchain in the presence of label scarcity. In ICAIF . [18] Malte Möser, Rainer Böhme, and Dominic Breuker. 2014. Towards risk scoring of Bitcoin transactions. In FC. 16–32. [19] José de Jesús Rocha-Salazar, María Jesús Segovia-Vargas, and María del Mar Camacho-Miñano. 2021. Money laundering and terrorism financing detection using neural networks and an abnormality indicator. Expert Systems with Applications 169 (2021), 114470. [20] Siwei Wu, Dabao Wang, Jianting He, Yajin Zhou, Lei Wu, Xingliang Yuan, Qinming He, and Kui Ren. 2021. DeFiRanger: Detecting price manipulation attacks on DeFi applications. arXiv preprint arXiv:2104.15068 (2021). [21] Liya Su, Xinyue Shen, Xiangyu Du, Xiaojing Liao, XiaoFeng Wang, Luyi Xing, and Baoxu Liu. 2021. Evil under the sun: Understanding and discovering attacks on Ethereum decentralized applications. In USENIX Security . 1307–1324. [22] Chainalysis Team. 2021. Report: Key players of the cryptocurrency ecosystem . https://go.chainalysis.com/rs/503-FAP-074/images/Key- players-in-crypto-report.pdf [23] Chainalysis Team. 2022. The Chainalysis 2022 Crypto Crime Report . https://go.chainalysis.com/2022-crypto-crime-report.html [24] Chainalysis Team. 2022. The chainalysis state of web3 report . https://go.chainalysis.com/2022-web3-report.html [25] CipherTrace Team. 2022. Cryptocurrency crime and anti-money laundering report . https://ciphertrace.com/crime-and-anti-money- laundering-report-october-2022/ [26] CertiK Team. 2022. The web3 security quarterly report (Q2 2022) . https://certik-2.hubspotpagebuilder.com/hack3d-q1-2022-0 [27] SlowMist Team. 2022. First half of the 2022 blockchain security and anti-money laundering analysis report . https://www.slowmist.com/ report/first-half-of-the-2022-report.pdf [28] Adam B Turner, Stephen McCombie, and Allon J Uhlmann. 2020. Discerning payment patterns in Bitcoin from ransomware attacks. Journal of Money Laundering Control 23, 3 (2020), 545–589. 20 Money Laundering SIGMETRICS ’23, June 19–23, 2023, Orlando, Florida, USA [29] Friedhelm Victor and Andrea Marie Weintraud. 2021. Detecting and quantifying wash trading on decentralized cryptocurrency exchanges. In WWW . 23–32. [30] Mark Weber, Giacomo Domeniconi, Jie Chen, Daniel Karl I. Weidele, Claudio Bellei, Tom Robinson, and Charles E. Leiserson. 2019. Anti- money laundering in Bitcoin: Experimenting with graph convolutional networks for financial forensics. arXiv preprint arXiv:1908.02591 (2019). [31] Sam M Werner, Daniel Perez, Lewis Gudgeon, Ariah Klages-Mundt, Dominik Harz, and William J Knottenbelt. 2021. Sok: Decentralized finance (defi). arXiv preprint arXiv:2101.08778 (2021). [32] Christoph Wronka. 2021. “Cyber-laundering”: The change of money laundering in the digital age. Journal of Money Laundering Control 25, 2 (2021), 330–344. [33] Jiajing Wu, Jieli Liu, Yijing Zhao, and Zibin Zheng. 2021. Analysis of cryptocurrency transactions from a network perspective: An overview. Journal of Network and Computer Applications 190 (2021), 103139. [34] Jiajing Wu, Qi Yuan, Dan Lin, Wei You, Weili Chen, Chuan Chen, and Zibin Zheng. 2022. Who are the phishers? Phishing scam detection on Ethereum via network embedding. IEEE Transactions on Systems, Man, and Cybernetics: Systems 52, 2 (2022), 1156–1166. [35] Lei Wu, Yufeng Hu, Yajin Zhou, Haoyu Wang, Xiapu Luo, Zhi Wang, Fan Zhang, and Kui Ren. 2021. Towards understanding and semystifying bitcoin mixing services. In WWW . 33–44. [36] Zhiying Wu, Jieli Liu, Jiajing Wu, and Zibin Zheng. 2022. Transaction tracking on blockchain trading systems using personalized PageRank. arXiv preprint arXiv:2201.05757 (2022). [37] Pengcheng Xia, Haoyu Wang, Bingyu Gao, Weihang Su, Zhou Yu, Xiapu Luo, Chao Zhang, Xusheng Xiao, and Guoai Xu. 2021. Trade or trick? Detecting and characterizing scam tokens on Uniswap decentralized exchange. In SIGMERICS , Vol. 5. [38] Peilin Zheng, Zibin Zheng, Jiajing Wu, and Hong-Ning Dai. 2020. XBlock-ETH: Extracting and exploring blockchain data From Ethereum. 1, April (2020), 95–106. 21
{ "id": "2305.14748" }
2409.10031
Assessing the Impact of Sanctions in the Crypto Ecosystem: Effective Measures or Ineffective Deterrents?
Regulatory authorities aim to tackle illegal activities by targeting the economic incentives that drive such behaviour. This is typically achieved through the implementation of financial sanctions against the entities involved in the crimes. However, the rise of cryptocurrencies has presented new challenges, allowing entities to evade these sanctions and continue criminal operations. Consequently, enforcement measures have been expanded to include crypto assets information of sanctioned entities. Yet, due to the nature of the crypto ecosystem, blocking or freezing these digital assets is harder and, in some cases, such as with Bitcoin, unfeasible. Therefore, sanctions serve merely as deterrents. For this reason, in this study, we aim to assess the impact of these sanctions on entities' crypto activities, particularly those related to the Bitcoin ecosystem. Our objective is to shed light on the validity and effectiveness (or lack thereof) of such countermeasures. Specifically, we analyse the transactions and the amount of USD moved by punished entities that possess crypto addresses after being sanctioned by the authority agency. Results indicate that while sanctions have been effective for half of the examined entities, the others continue to move funds through sanctioned addresses. Furthermore, punished entities demonstrate a preference for utilising rapid exchange services to convert their funds, rather than employing dedicated money laundering services. To the best of our knowledge, this study offers valuable insights into how entities use crypto assets to circumvent sanctions.
http://arxiv.org/pdf/2409.10031v1
Francesco Zola, Jon Ander Medina, Raul Orduna
cs.CR, cs.CE
cs.CR
arXiv:2409.10031v1 [cs.CR] 16 Sep 2024Assessing the Impact of Sanctions in the Crypto Ecosystem: Effective Measures or Ineffective Deterrents? Francesco Zola1[0000−0002−1733−5515], Jon Ander Medina1[0009−0008−1107−0617], and Raúl Orduna1[0000−0002−5932−0987] Vicomtech Foundation, Basque Research and Technology Alli ance (BRTA); Paseo Mikeletegi, 57, Donostia 20009, Spain {fzola, jmedina, rorduna}@vicomtech.org Abstract. Regulatory authorities aim to tackle illegal activities by tar- geting the economic incentives that drive such behaviour. T his is typi- cally achieved through the implementation of financial sanc tions against the entities involved in the crimes. However, the rise of cry ptocurrencies has presented new challenges, allowing entities to evade th ese sanctions and continue criminal operations. Consequently, enforcem ent measures have been expanded to include crypto assets information of s anctioned entities. Yet, due to the nature of the crypto ecosystem, blo cking or freezing these digital assets is harder and, in some cases, s uch as with Bitcoin, unfeasible. Therefore, sanctions serve merely as deterrents. For this reason, in this study, we aim to assess the impact of thes e sanctions on entities’ crypto activities, particularly those relate d to the Bitcoin ecosystem. Our objective is to shed light on the validity and effective- ness (or lack thereof) of such countermeasures. Specificall y, we analyse the transactions and the amount of USD moved by punished enti ties that possess crypto addresses after being sanctioned by the auth ority agency. Results indicate that while sanctions have been effective fo r half of the examined entities, the others continue to move funds throug h sanctioned addresses. Furthermore, punished entities demonstrate a p reference for utilising rapid exchange services to convert their funds, r ather than em- ploying dedicated money laundering services. To the best of our knowl- edge, this study offers valuable insights into how entities u se crypto assets to circumvent sanctions. Keywords: Sanctions circumvention, Money laundering, Flow analysis , Behavioural analysis, Cryptocurrency, Traceability 1 Introduction Understanding the multidimensional nature of crime is cruc ial for developing effective strategies to prevent and combat these illicit act ivities. Crimes often manifest in various forms and domains, like drug trafficking, human trafficking, and other types of organised crime. Nevertheless, in all the se cases, the main 2 F. Zola et al. goal of the criminal networks is still to make a profit [22]. Fo r this reason, dis- rupting the economic incentives driving illicit behaviour has become the primary objective in tackling these crimes [28]. This task requires cooperation and co- ordination among governments, law enforcement agencies, fi nancial institutions, regulatory bodies, and other stakeholders at national and i nternational levels. This is the case of authority agencies such as the Office of Fore ign Assets Control (OFAC)1, Office of Financial Sanctions Implementation (OFSI)2, Eu- ropean External Action Service (EEAS)3and United Nations Security Council (UNSC)4, that aim to implement and enforce financial sanctions direc tly to the entity behind some violations and crimes. In fact, these age ncies have the au- thority to freeze, block or restrict access to sanctioned en tities’ assets such as banking accounts, real estate, vessels, etc. However, with the advent of virtual currencies such as crypt ocurrencies, sta- blecoins, and Non-Fungible Tokens (NFTs), sanctioned enti ties have discovered new opportunities for circumventing sanctions and continu ing their illicit activi- ties [29]. These digital assets promote decentralization a nd offer varying degrees of anonymity or pseudo-anonymity, creating a borderless ec osystem ideal for the proliferation of illicit activities [14][24]. According t o “The 2024 Crypto Crime Report ” [12], although illicit crypto-transactions constitute l ess than 0.5% of the total on-chain transaction volume, they accounted for near ly 40 billion USD in 2022 and over 24 billion USD in 2023. The significant size of the crypto market, the opportunities crypto assets present, and their proven involvement in illicit activitie s [9][16] have raised con- cerns about ensuring compliance with existing financial reg ulations. While some countries such as Tunisia, Nepal, Libya, Iraq, Bolivia, and Algeria have banned the use of cryptocurrency [7], others have directed their eff ort to implement new frameworks and technology to increase their control deg ree over the crypto ecosystem. Thus, regulatory agencies have intensified thei r enforcement actions against sanctioned entities, including tracking informat ion about their crypto assets whenever possible. However, due to the nature of the c rypto ecosystem, they still face limitations in blocking these digital asset s. As a result, sanctions solely serve as a deterrent, aiming to discourage other indi viduals and companies from engaging in transactions with punished entities. Yet, this limitation makes crypto assets the perfect facilitator for ongoing illicit o perations and circumvent- ing sanctions. For this reason, in this work, we aim to examine the impact the se sanctions generate in the crypto activities of punished entities and t heir related violations. Our objective is to evaluate the validity and effectiveness ( or lack thereof) of such countermeasures. Specifically, we analyse the transaction s and the amount of USD moved by punished entities that possess crypto addresse s before and after being sanctioned by the authority agency. Furthermore, we i nvestigate which 1https://ofac.treasury.gov/ 2https://sanctionssearchapp.ofsi.hmtreasury.gov.uk/ 3https://www.eeas.europa.eu/ 4https://www.un.org/securitycouncil/content/un-sc-co nsolidated-list Assessing the Impact of Sanctions in the Crypto Ecosystem 3 type of known crypto entities (Exchange, Mixers, Gambling, etc.) are typically engaged with by the punished entities post-sanction. Thus, we investigate if they are attempting to connect with other entities involved in illicit operations or are employing strategies such as money laundering, on-ra mps and off-ramps operations, funding raise campaigns, etc. More specifically, this work analyses entities (individual s and companies) sanctioned by the OFAC agency that have information about Bi tcoin (BTC) assets. These decisions were taken for two specific reasons: a) Bitcoin (together with stablecoins) is widely recognised among the most popul ar cryptocurrencies for illicit activities [12], primarily due to its high marke t value and accessibility, even for users without technical background; b) other autho rity agencies (OFSI, EEAS, UNSC) do not have a comprehensive list of sanctioned cr ypto-related entities or do not release it publicly. The results suggest that sanctions have been effective for ro ughly half of the sanctioned entities, while the others continue to engage in transactions through sanctioned Bitcoin addresses. Additionally, sanctioned e ntities prefer to directly convert their cryptocurrencies using dedicated services ( Exchanges ), rather than apply money laundering strategies using services like Mixers orGambling . To the best of our knowledge, this study offers a first step towa rds determin- ing the effectiveness of sanctions within the crypto ecosyst em and how sanctioned entities used them to circumvent sanctions. 2 Background This section presents an overview of the crypto ecosystem, s howing regulations, directives, and literature approaches. Specifically, in Se ction 2.1 a review of Eu- ropean Union regulations related to the crypto ecosystem is presented, while Section 2.2 is focused on presenting the United States OFAC a gency and its crypto sanctions. Finally, Section 2.3 describes related r esearch in the field. 2.1 EU Directive review As mentioned, crypto assets can be harder (or in some cases un feasible) to freeze or block directly. However, governments and regulatory aut horities worldwide have been increasingly implementing measures to monitor an d regulate crypto markets to tackle concerns related to illicit activities. T hus, these regulations aim to facilitate the imposition of sanctions when necessar y. The European Union (EU) has established and reviewed severa l directives aimed at tackling issues such as money laundering, fraud, te rrorism financing, and other emerging challenges related to non-cash payments . For instance, in 2015, the 5th Anti-Money Laundering Directive (5AMLD) [1] w as introduced to address new trends in terrorist financing, building upon t he provisions of the 4AMLD. Notably, under the 5AMLD, the role of cryptocurrency Exchanges has changed, they are now considered equivalent to financial ins titutions. There- fore, they are required, among other measures, to adhere to K now Your Cus- 4 F. Zola et al. tomer (KYC) requirements, implement Anti-Money Launderin g (AML) mecha- nisms, and register with national regulatory authorities. This directive has been amended to include provisions regarding information accom panying transfers of funds and certain crypto-assets, through the Regulation (E U) 2023/1113 [6]. The amendment fosters international cooperation within the Fi nancial Action Task Force (FATF) and the global implementation of its recommend ations [4]. Fur- thermore, it sets the obligation for virtual asset service p roviders (VASPs) and crypto asset service providers (CASPs) to collect informat ion about the person who uses their services. Together with these directives, an other pivotal regula- tion is the Markets in Crypto-Assets (MiCA) [5], which clear ly distinguishes be- tween different types of crypto-assets (asset-referenced t okens, electronic money or e-money, and other crypto assets). It then imposes constr aints on CASPs to ensure market integrity and financial stability. One of it s key provisions in- volves significant disclosure and transparency rules aimed at better informing consumers about associated risks, as well as mandating the i mplementation of security measures and anti-money laundering compliance. Fraud and counterfeiting of non-cash means of payment is reg ulated through the EU directive 2019/713 [3]. The framework establishes me asures aimed at preventing and detecting fraud and counterfeiting of non-c ash payment instru- ments, such as security requirements for payment service pr oviders, customer authentication procedures, and usage of secure technologi es (encryption and to- kenization). This directive aimed to cover also new types of non-cash payment instruments such as e-money and virtual currencies, since t hey have a significant cross-border dimension. Another interesting EU framework , although it doesn’t specifically mention digital currency or cryptocurrencies due to its general aim, is the Directive (EU) 2017/1371 [2] that defines legal framew ork and measures to combat any fraud against the financial interests of EU. Despite the revision, update, and implementation of these p olicies, freezing or blocking crypto assets remains harder to accomplish by te chnical design. Its boundary-less structure, the availability of services in j urisdictions where these policies don’t apply, or in countries unwilling to cooperat e in criminal investi- gations, the anonymity of users, and the ease of conducting t ransactions - these properties collectively enable users to circumvent sancti ons and persist in their illicit activities. 2.2 US Office of Foreign Assets Control The Office of Foreign Assets Control (OFAC) is part of the Depar tment of the United States (US) Treasury, and it is in charge of implement ing economic and trade sanctions in accordance with US foreign policy and nat ional security objec- tives. These sanctions are directed towards specific foreig n countries and regimes, terrorists, international narcotics traffickers, individu als involved in the prolif- eration of weapons of mass destruction, and other actors pos ing threats to the national security, foreign policy, or economy of the United States. These actors and their blocked assets are included in a Specially Designated Nationals and Assessing the Impact of Sanctions in the Crypto Ecosystem 5 Blocked Persons (SDN) list5. Consequently, US individuals and companies are generally prohibited from dealing with them. The actors rep orted in the SDN list, which we refer to as entities in this paper, are sanctioned due to the vio- lation of one (or more) Executive Orders and/or Code of Feder al Regulations (CFR)6. Since 2018, OFAC has included cryptocurrency-related inf ormation in the SDN list as blocked assets for sanctioned entities whene ver such information is available. In some cases, one entity can have multiple san ctioned addresses. To date, the violations that have led to sanctions against en tities with crypto addresses involved, are detailed in Table 1. In this paper # Code Description Executive Order N. 1 CYBER2 Malicious Cyber Activities 13694, 13757 2 DPKR3 Blocking Property of the Government of North Korea 13 722 3 DPKR4 Additional Sanctions With Respect to North Korea 138 10 4 ELECTION Foreign Interference in the US Election 13848 5 IFSR Iranian Financial Sanctions Regulations 31 CFR part 5 61 6 ILLICTI-DRUGS Illicit Drug Trade 14059 7 IRGC Iranian Financial Sanctions 31 CFR Part 561 8 NPWMD Weapons of Mass Destruction Proliferators Sanction s 31 CFR part 544 9 RUSSIA Blocking Harmful Activities of the Russian Federat ion 14024 10 SDGT Narcotics Trafficking Sanctions 31 CFR part 594 11 SDNTK Foreign Narcotics Kingpin Sanctions 31 CFR part 598 Table 1. Violations reported in the SDN list that have generated sanc tions against cryptocurrency related entities. 2.3 Cryptocurrency and Cybercrime Cryptocurrencies have created a convenient ecosystem for t he permanence and movement of illicit cybercrime-related activities, with c urrencies such as Bitcoin, Ethereum, and Monero becoming their operational space. The evolution of illicit activities within the cryptocurrency ecosystem has been st udied extensively [13] [11]. For instance, Hornuf et al. [17] analysed cybercrime r elated to Ethereum transactions. In particular, they identified over 1.78 mill ion transactions related to 19 categories of cybercrime, with losses amounting to $1. 65 billion up to the year 2021, posing the focus on estimating how these cyber crimes impact victims’ risk-taking, risk-adjusted returns, and investo r behaviour. In the same line, in [25], authors employ the Generalized Autoregressi ve Score (GAS) model to examine the impact of cybercrime on cryptocurrency retur ns in South Africa. On the other hand, in [10], authors attempted to correlate th e expansion of ransomware activities with transactions performed in thes e cryptocurrencies be- tween 2015 and 2020. However, although it is clear that these cryptocurrencies 5https://sanctionssearch.ofac.treas.gov/ 6https://ofac.treasury.gov/specially-designated-nati onals-list-sdn-list/program-tag- definitions-for-ofac-sanctions-lists 6 F. Zola et al. facilitate the growth of ransomware revenue [12], authors d id not find an evident correlation. In [8], traditional machine learning algorit hms are used to detect illegal activities using a Bitcoin dataset, while in [18] gr aph-based networks are used for a similar task. Similar applications are also explo red in [19] for defining a method to identify and trace illicit activities in the Ethe reum blockchain. Among the most relevant cybercrimes, cryptocurrencies hav e become the per- fect solution for laundering illegal funds [26]. By fosteri ng decentralization, user anonymity, and the ease of making cross-border transaction s, they have led to the proliferation of dedicated services. Achraf Guidara [16] e xamines the relation- ship between cryptocurrencies and money laundering, empha sising the urgent need to develop a robust and internationally coordinated re gulatory framework to mitigate these risks. In [20], 182 Bitcoin addresses belo nging to 56 mem- bers of the Conti ransomware group are analysed with the aim o f identifying if money laundering mechanisms are applied. They conclude tha t cryptocurrency exchanges and dark web services are involved in 71% and 30% of transactions, respectively, while only 8% utilized mixers. These findings challenge the pre- vailing notion that cybercriminals employ sophisticated m ethods, highlighting instead the simplicity of their tactics [21]. At the same time, as introduced in the previous sections, the lack of market control has turned these cryptocurrencies into a means of ev ading sanctions, al- lowing entities to continue their illicit activities. For t his reason, in this work, we aim to analyse how punished entities use crypto assets to c ircumvent sanc- tions and whether they also employ laundering mechanisms to increase their anonymity. 3 Experimental Framework In this section, the dataset and the approach followed in thi s study are presented. More specifically, Section 3.1 reviews the sanctioned list u sed, while Section 3.2 introduces the Bitcoin dataset. Finally, the guidelines an d key concepts used during the experiments are reported in Section 3.3. 3.1 Sanctions List As of February 2024, the SDN list contains information about 600 crypto ad- dresses related to 17 different cryptocurrencies, as shown i n Figure 1a. The figure shows that the majority of reported addresses ( ∼65%) belong to the Bitcoin (BTC) network, while another ∼25% are from Ethereum (ETH). The remain- ing addresses, representing just 10%, are divided across 15 cryptocurrencies. Furthermore, analysing the composition of the sanctioned e ntities (Figure 1b) that belong to the top-5 sanctioned cryptocurrencies, it be comes evident that while there are more punished individuals than companies fo r both BTC and ETH, companies possess a greater number of punished address es. These results lead us to focus the analysis only on the BTC-related entitie s, as anticipated Assessing the Impact of Sanctions in the Crypto Ecosystem 7ARB BCH BSC BSV BTC BTG DASH ETC ETH L TC TRX USDC USDT XMR XRP XVG ZEC Cryptocurrency050100150200250300350400# Sanctioned Addresses (a) Distribution of sanctioned cryptocurren- cies in the SDN list.BT C ETH USDT L T C BCH050100150200250300350400P opulationEntities Individuals CompaniesAddresses Individuals Companies (b) Addresses and entities distribution in the SDN list (top-5 populated cryptocur- rencies). Fig.1. Overall statistics of sanctioned entities with cryptocurr ency information ex- tracted from the SDN list (February 2024). Canada China Czech Republic Iran Israel Netherlands None North Korea Pakistan Region: CIS Region: Gaza Russia St. Vincent T ajikistan Ukraine United Kingdom024681012# Distinct EntitiesIndividuals Companies (a) Distribution of BTC-related entities in the SDN list per country/region. CYBER2 DPRK3 DPRK4 ELECTION IFSR ILLICIT -DRUGS IRGC NPWMD RUSSIA SDGT SDNTK05101520# Entities (b) Distribution of BTC-related entities in the SDN list per violation.11-2018 08-2019 03-2020 09-2020 04-2021 07-2021 09-2021 11-2021 12-2021 04-2022 05-2022 09-2022 11-2022 02-2023 04-2023 05-2023 10-2023 11-2023 02-2024024681012 CYBER2 SDNTK DPRK3 ELECTIONNPWMD SDG T ILLICIT -DRUGS RUSSIAIFSR IRGC DPRK4 (c) BTC-related entities per violation over time. Fig.2. Overview about violations of sanctioned entities with BTC i nformation ex- tracted from the SDN list (February 2024). 8 F. Zola et al. in Section 2.2. In particular, this constraint leaves us to s tudy 43 out of the 56 available entities in the SDN list. Figure 2a details that most of the BTC-related sanctioned en tities (both companies and individuals) are located in China and Russia. In fact, of the 43 punished entities, 13 are from China and 10 from Russia ( ∼54%). In both cases, the number of sanctioned individuals overwhelms the number of compa- nies, while there are only sanctioned companies in Canada, t he Czech Republic, St. Vincent, and in the regions of Gaza and the Commonwealth o f Independent States (CIS). Figure 2b shows the distribution of these sanc tioned entities with respect to their violations. It is to be noted that one entity can face sanctions for multiple violations. Consequently, the most prevalent cat egory, with 23 entities, pertains to malicious cyber-enabled activities since they include a broad spec- trum of crimes. Furthermore, among the most populated categ ories, 10 entities are sanctioned for illicit drug trading, while 5 entities ar e linked to interference in the US election. Finally, Figure 2c analyses the temporal ity of these sanctions and the number of entities involved. The figure shows that US a uthorities led a significant operation on illicit drug trading in October 20 23, resulting in the sanctioning of 6 entities. Another interesting finding is th at sanctioning opera- tions against specific violations tend to occur only on speci fic dates. Specifically, violations related to CYBER2 ,ILLICIT-DRUGS , andRUSSIA are consistently detected over time, while the others are detected only on spe cific dates. 3.2 Bitcoin Dataset In this paper, the entire Bitcoin blockchain data until the b lock 830,000 are downloaded, i.e., all the transactions until February 11th , 2024 (more than 900M transactions). On the other hand, to have more informat ion about real- world entities, labelled (tagged) addresses are gathered f rom multiple reliable sources, such as WalletExplorer7and the tagpacks provided by Graphsense8. Indeed, these sources represent valid solutions used in man y previous researches [23][27][31], and allowed us to gather more than 38M address es of almost 400 entities labelled as Exchanges, Gambling, Marketplaces, Mining Pools, Mixers, Services, Trading platforms, eWallet, Ransomware, Sextortio n,andExtremist . 3.3 Proposed Analysis As mentioned in Section 3.1, the BTC addresses included in th e SDN list rep- resent the starting point of our investigation. More specifi cally, from each of them, we analyse the address-transaction graph [15][31]. T his graph is directly built using the information available in the BTC blockchain , where nodes are BTC addresses and transactions. Then directed edges (arrow s) from addresses to transactions represent incoming relations, while edges from transactions to addresses are outgoing relations, as shown in Figure 3. Furt hermore, the edge 7https://www.walletexplorer.com/ 8https://graphsense.info/ Assessing the Impact of Sanctions in the Crypto Ecosystem 9 may incorporate BTC information like amount, fee, timestam ps, etc. With these principles, it is possible to define the n-step address-transaction graph of a sanc- tioned address X1, as a graph in which all the paths from X1involve maximum ntransactions. Thus, the paths from X1have a maximum length of 2n(Figure 3). Fig.3. An example of a 1-step address-transaction graph In this work, we present two different analyses: the first one i s based on assessing the effectiveness of the sanctions by analysing th e activities of the entities ( flow analysis ), and the second has the aim to detect the relations that entities have after being sanctioned ( behavioural analysis ). For the flow analysis , a temporal aspect is introduced in the address-transactio n graph. Specifically, for each address of each entity, multip le 1-step address- transaction graphs are created, considering 4 different tem poral ranges: a) all the transactions prior to the imposed sanction ( pre-sanction ); b) transactions achieved immediately after the sanctions within the subseq uent 7 days ( 7 post- sanction ); c) transactions achieved immediately after the sanction s within 30 days post-sanctions ( 30 post-sanction ); d) and finally all the activities post- sanctions up to February 11th, 2024 ( up-to-date ). These ranges allow us to eval- uate the behaviour of the sanctioned entity and detect how th ey react to this situation in short, medium, and long terms. Once these graphs are built, from each one, several metrics s uch as the num- ber of input and output transactions, the overall balance of the entity after each temporal range, and the amount in USD of money sent and receiv ed by the entity (the BTC/USD value is fixed on the day the transaction i s performed), are extracted and used for evaluating the trends and the effec tiveness of the sanctions. It is to be noted that one entity may possess multi ple sanctioned ad- dresses. Therefore, metrics computed from each of its addre sses are aggregated to provide a comprehensive overview of the entity’s behavio ur. On the other hand, the behavioural analysis is based on analysing a single address-transaction graph for each entity, that is created using data from im- 10 F. Zola et al. mediately after the sanctions until the end of the dataset ( up-to-date ). Further- more, this graph is enriched with real-world entity informa tion, i.e., with labels gathered from the external sources mentioned in Section 3.2 . This approach enables us to identify whether the sanctioned entity engage s in transactions with other known entities, which could include potential ac tors related to illicit operations (e.g. other sanctioned entities, ransomware, e tc.) or it tries to ap- ply strategies for conducting activities such as money laun dering (e.g. involving mainly mixers, gambling or other services), on-ramps and off -ramps operations (e.g. involving exchanges), funding raise campaign (e.g. i nvolving mining pool or marketplace). This behavioural analysis is performed considering both 1-step and 2-step address-transaction graphs. This approach give s us a deeper view of the entity strategy, since the 1-step analysis only provide s information about its direct relations, while the 2-step also includes undirecte d transactions (reached in two steps). 4 Current Study In this section, the results obtained in the two proposed ana lyses are presented. In particular, Section 4.1 describes the results obtained a nalysing transactions and money flow of the entities before and after their sanction s, while Section 4.2 details the relations that the sanctioned entities have had with other known type of entities. Finally, discussions and limitations are reported in Section 4.3. 4.1 Flow Analysis Results Figure 4 shows the number of entities that received and sent m oney through crypto transactions post-sanctions. Specifically, the figu re illustrates that only half of all the sanctioned entities were effectively discour aged from engaging in transactions. In particular, only 21 entities stopped to re ceive money, and 25 to send funds. On the other hand, the figure reveals that despite the sanctions, some entities (7) continued to move funds within 7 days of the OFAC sanction. For this reason, Figure 5 enables us to comprehend how these funds are being moved, analysing the balance in terms of BTC held by each entity in it s sanctioned addresses before and after the sanctions. Although Figure 4 indicates that some entities were not dete rred from con- ducting transactions, Figure 5 emphasises a general trend o f maintaining at least a minimal balance in the sanctioned addresses, excluding th e two entities with the highest balance ( ≥50BTC) who adopted an off-ramp strategy. Yet, the number of entities with a balance of 0 decreased, while the nu mber of entities with a balance in a range >0 and≤0.1 BTC increased. Table 2 reports the number of transactions that involve sanc tioned entities, categorised by the violation they are convicted of. Additio nally, the table in- cludes the USD volume moved by the entities for each violatio n, both before and after the sanctions. In particular, the volume indicate s both incoming and Assessing the Impact of Sanctions in the Crypto Ecosystem 11 7 post-sanction 30 post-sanction up-to-date010203040# Entities Entities: no receive money receive money no send money send money Fig.4. Number of sanctioned entities that perform transactions (r eceived and sent) in the different post-sanction intervals. pre-sanction 7 post- sanction30 post- sanctionup-to-date051015202530354045# EntitiesBalance in BTC: = 0 (0 - 0.0001] (0.0001 - 0.001] (0.001 - 0.1] (0.1 - 1] (1 - 5] (5 - 10] (10 - 50] > 50 Fig.5. Entity balance (in BTC) considering the sanctioned address es at the four stages: pre-sanction, 7 post-sanction, 30 post-sanction, andup-to-date . 12 F. Zola et al. outgoing transactions. Results in Table 2 show that CYBER2 represents the vi- olation with the highest number of transactions pre-sancti on (more than 150K) and the highest USD volume of about 8,300 million. The result is expected since this violation also has the highest number of sanctioned ent ities (Figure 2b). However, what is interesting, is that after the sanctions, e ntities related to this violation still perform 305 transactions for a market of abo ut 3 million USD. On the other hand, entities related to DPRK3 andILLICIT-DRUGS violations per- form a high number of transactions and show a USD volume of 240 million and 120 million pre-sanction, respectively. Although these nu mbers decrease in the post-sanction phase, they remain consistent, with 209 thou sand USD for DPRK3 and 8 million USD for ILLICIT-DRUGS . Also, the market related to RUSSIA violation is pretty high pre-sanctions, with almost 40 mill ion USD moved in just 553 transactions. However, it seems strongly affected by the sanctions, result- ing in just 4 transactions with an overall amount of 162 USD. F inally, entities related to violations such as IFSR, IRGC andSDGT are indeed deterred from performing transactions; in fact, they achieve only 1 trans action post-sanctions, moving just a few dollars (or less). Notably, the entities in volved in DPRK4 ac- tivities are shut down. More precisely, they have not achiev ed transactions from May 2023 (Figure 2c) until the date. # Transactions USD Volume # Violation Pre-Sanction Up-to-date Pre-Sanction Up-to-date 1CYBER2 153 K 305 8,300 M 3 M 2DPRK3 2 K 63 240 M 209 K 3DPRK4 62 0 10 M 0 4ELECTION 46 K 8 6 M 1 K 5IFSR 182 1 461 K ≤1 6ILLICIT-DRUGS 9 K 747 120 M 8 M 7IRGC 182 1 461 K ≤1 8NPWMD 97 8 26 K 1 K 9RUSSIA 553 4 39 M 162 10SDGT 18 K 1 42 M 103 11SDNTK 354 42 104 K 12 K Table 2. Number of transactions achieved and estimation of USD moved before and after the sanctions for each violation. 4.2 Behavioural Analysis Results Table 3 reports the results gathered during the behavioural analysis, involving 1-step and 2-step address-transaction graphs. In particul ar, by creating a 1-step graph from each of the 43 entities (387 BTC-sanctioned addre sses) it is possible to reach about 4K addresses, of which only 340 addresses (8.4 8%) are related to known entities and have an external label. On the other han d, increasing the analysis considering also undirected connections (2-s tep address-transaction Assessing the Impact of Sanctions in the Crypto Ecosystem 13 graphs), it is possible to reach more than 10M addresses, of w hich just 175,444 (1.67%) are labelled. These outcomes confirm that, although the 1-step analysis has more labelled information, it identifies only 15 known en tities of 4 different behaviours, while the 2-step analysis enriches the investi gation by uncovering 67 entities with 9 different behaviours. The results reported in Table 3 highlight that, in both the 1- step and 2-step analyses, the majority of labelled addresses belonged to Exchanges with 97% and 86%, respectively. At the same time, in the 2-step analysis, 13.5% of the labelled addresses are linked to 11 crypto services (trading, eWalle t, banking, etc.). This enhanced scenario also highlights connections between san ctioned entities and addresses associated with Sextortion, Ransomware andExtremism crimes. 1-step analysis 2-step analysis # Behaviour# Distinct Entities# Distinct Address# Distinct Entities# Distinct Address 1Service 3 5 13 23,727 2Mixer 1 1 2 14 3Exchange 9 331 37 151,385 4OFAC Sanctioned 2 3 6 33 5Gambling - - 1 249 6Extremism - - 1 13 7Ransomware - - 2 9 8Mining Pool - - 4 13 9Sextortion - - 1 1 Labelled 15 340 67 175,444 No Labelled - 3,668 - 10,356,787 Table 3. Behavioural analysis of output entities related to sanctio ned actors consid- ering 1-step and 2-step address-transaction graphs. 4.3 Discussion and Limitations Discussion. New regulations have started to treat Exchanges as financial ser- vices, requiring any Crypto Asset Service Provider or Virtu al Asset Service Provider to implement anti-money laundering control measu res such as Know Your Customer (KYC) policies. Nevertheless, criminals hav e started to explore new methods to obtain money fraudulently and to launder and u se it, e.g., includ- ing dedicated services and other digital assets that curren t solutions/directives do not adequately supervise. Indeed, these new money launde ring methods ex- ploit gaps in existing legislations, which in turn require f requent updates and make them challenging to enforce and follow. In this context , it is crucial to con- sider and incorporate also technical connectivity to the cr ypto ecosystem, i.e., ensuring the technology used by both users and service provi ders is connected and operates under unified legal standards. This alignment w ill help enforce the 14 F. Zola et al. law and catch those who commit crimes, making it more difficult for criminals to exploit any legal loopholes. Aligned with the findings presented in [26], this study, usin g OFAC infor- mation, shows that Bitcoin is among the most used cryptocurr encies for various crimes, not limited to the cyber ecosystem. The results indi cate that, despite being sanctioned, entities still perform operations with t heir blocked or frozen cryptocurrencies without employing complex tactics or ded icated money laun- dering services in their transactions. In fact, entities pr efer to achieve off-ramp activities through known and reliable exchanges. These res ults are aligned with the outcomes reported in [20] and [21] regarding ransomware funds. However, the results also show that, in some cases, sanctioned entiti es maintain relation- ships with other sanctioned entities or entities involved i n other crimes, such as sextortion, ransomware, and extremism. This paper shows that a 1-step analysis is not sufficient for un derstanding and tracing the operations of sanctioned entities. Indeed, the analysis reveals that only a few sanctioned entities can be traced to known ser vices, while a 2- step analysis provides enhanced context to their operation s. However, although expanding the analysis to include more steps seems beneficia l, it should be noted that this approach also introduces more unlabelled address es, increasing the uncertainty in the "follow-the-money" investigation. The refore, the number of steps to be included must be determined on a case-by-case bas is. Limitation. When interpreting the results, it is important to take into a c- count some assumptions/constraints considered during thi s investigation. Firstly, the results of the behavioural analysis strongly depend on the quantity and qual- ity of labelled data available in the literature. The outcom es of this work are strictly related to the information provided by the US OFAC a uthority and need to be verified when information from new authorities bec omes available. At the same time, regarding the quantity of the data, as intro duced in Section 3.2, this work has gathered 38M addresses of almost 400 entit ies used in many state-of-the-art works [23][27][31]. Yet, these 38M repre sent only 2.9% of the addresses used in the BTC blockchain, which counts about 1,3 00M addresses as of February 2024. Additionally, the OFAC SDN list being cons idered includes 40 sanctioned entities with Bitcoin addresses involved. Wh ile one might argue that this number is insufficient for comprehensive trend anal ysis, it should be noted that this is the maximum number available in the real ec osystem. On the other hand, regarding the quality of the information, we rel y on the fact that the labelled datasets are used in many research investigati ons, as mentioned in section 3.2, and in some cases, they are extracted by tools th at are used by LEAs in real investigations [ ?]. Moreover, although these datasets are generated and gathered from different sources, they do not present inconsi stencies among them in the provided data. Furthermore, it is to be noted that some entities were sancti oned in late 2023 or early 2024, meaning that the gathered crypto transaction s (until February 2024) might not fully capture their activities. However, we decided to focus the analysis on the type of violation rather than concrete entit ies (Table 2). In fact, Assessing the Impact of Sanctions in the Crypto Ecosystem 15 looking at the distribution analysis provided in Figure 2c, it is possible to see that the majority of the entities for each violation are prior to M ay 2023 - excluding theILLICIT-DRUGS crime - allowing us to analyse 9 months of transactions. Finally, in the context of the 2-step analysis, this study ha s assumed that there has been no change in ownership of the funds. However, r elying just on blockchain information, the validity of this assumption cannot be ensured. Nonetheless, we acknowledge this risk because limiting the analysis solely to 1-step graphs would be excessively restrictive, generatin g a skewed and poor view of the impact of the sanctions. Furthermore, a change in the ownership of the funds should not generate high-impact deviations in the proposed analysis, since we are just analysing the reached entities using a basi c "follow-the-money" approach. 5 Conclusion The present study represents a first step and provides an inte resting yet partial understanding of the impact of sanctions on the crypto ecosy stem, with a focus on the Bitcoin cryptocurrency. The first point to emphasise i s that sanctions are inherently tied to the prevailing regulations at any giv en time. As context, this study solely reports on European policies aimed at regu lating the crypto market and preventing financial fraud. However, the analysi s is conducted using data provided by the US OFAC authority, as it is the only entit y that releases a comprehensive list of economically and trade-sanctioned e ntities. Theflow analysis shows that in general, sanctions have been effective on at least half of the sanctioned entities, while the other half h as continued to move (receive and send) money through the sanctioned BTC address es, although they do not show huge changes in their current balance. In particu lar, sanctions seem to be not very effective against entities related to specific v iolations, like CY- BER2 andILLICIT-DRUGS which are the ones that still make transactions and move high quantities of USD in proportion with their activit ies pre-sanctions. On the other hand, the behavioural analysis highlights that sanctioned entities tend to prefer reaching out directly to Exchanges to convert their cryptos, rather than use dedicated services for money laundering (mixers or gambling). With the aim of deepening that understanding, further analy sis should in- clude heuristics assumptions in the loop [30] as well as auto matic labelling strate- gies to generate clustered entities. Yet, in this way, it wou ld be possible for each punished entity, not only to consider the actual sanctioned addresses reported in the list, but also other addresses that are likely to belong t o the same wallet. At the same time, it will be interesting to scale up our approach by incorporating information from other cryptocurrencies (Ethereum) and st ablecoins. In fact, as reported in [12], they represent a good alternative - especi ally in the last three years - through which criminals engage in illicit activitie s and sanctions circum- vention. This approach will allow Law Enforcement Officers to have a complete picture of criminal modus operandi . 16 F. Zola et al. Acknowledgments. This work has been partially supported by the European Union’s Horizon 2020 Research and Innovation Program under the project FAL- CON (Grant Agreement No. 101121281) References 1. Directive (eu) 2015/849 of the european parliament and of the council on the prevention of the use of the financial system for the purpo ses of money laundering or terrorist financing (2015/849), https://eur -lex.europa.eu/legal- content/EN/TXT/?uri=celexaccessed on 08/05/2024 2. Directive of the european parliament and of the council on the fight against fraud to the union’s financial interests by means of criminal law (2017), https://www.consilium.europa.eu/en/policies/fight-ag ainst-terrorism/fight- against-terrorist-financing/ accessed on 08/05/2024 3. Directive of the european parliament and of the council on combating fraud and counterfeiting of non-cash means of payment (2019/713) , https://eur- lex.europa.eu/eli/dir/2019/713/oj accessed on 08/05/20 24 4. International standards on combatting money laundering and the financing of terrorism and proliferation, the fatf recommendations (20 23), https://www.fatf- gafi.org/content/dam/fatf-gafi/recommendations/FATFac cessed on 08/05/2024 5. Regulation of the european parliament and of the council o n markets in crypto- assets (2023), https://eur-lex.europa.eu/legal-conten t/EN/TXT/?uri=CELEXon 08/05/2024 6. Regulation of the european parliament and of the council o n information ac- companying transfers of funds and certain crypto-assets (2 023/1113), https://eur- lex.europa.eu/eli/reg/2023/1113/oj accessed on 08/05/2 024 7. Cryptocurrency bans explained: Which countries have res tricted crypto and why? (2024), https://www.techopedia.com/cryptocurrenc y-bans-explained-which- countries-have-restricted-crypto accessed on 25/05/202 4 8. Alotibi, J., Almutanni, B., Alsubait, T., Alhakami, H., B az, A.: Money launder- ing detection using machine learning and deep learning. Int ernational Journal of Advanced Computer Science and Applications 13(10) (2022) 9. Bele, J.L.: Cryptocurrencies as facilitators of cybercr ime. In: SHS Web of Confer- ences. vol. 111, p. 01005. EDP Sciences (2021) 10. Berry, H.S.: The evolution of cryptocurrency and cyber a ttacks. In: 2022 In- ternational Conference on Computer and Applications (ICCA ). pp. 1–7 (2022). https://doi.org/10.1109/ICCA56443.2022.10039632 11. Blanchini, M., Cerreta, M., Di Monda, D., Fabbri, M., Rac iti, M., Ahmad, H.S., Costa, G.: Supporting criminal investigations on the block chain: A temporal logic- based approach (2022) 12. Chainalysis Inc.: The 2024 Crypto Crime Report. https://go.chainalysis.com/crypto-crime-2024.html (2024) 13. Cole, T., Gundur, R.: Virtual currency, cryptoassets, a nd cybercrime. In: Oxford Research Encyclopedia of Criminology and Criminal Justice (2024) 14. Connolly, L.Y., Wall, D.S.: The rise of crypto-ransomwa re in a changing cy- bercrime landscape: Taxonomising countermeasures. Compu ters & Security 87, 101568 (2019) 15. Fleder, M., Kester, M.S., Pillai, S.: Bitcoin transacti on graph analysis. arXiv preprint arXiv:1502.01657 (2015) Assessing the Impact of Sanctions in the Crypto Ecosystem 17 16. Guidara, A.: Cryptocurrency and money laundering: A lit erature review. Corporate Law & Governance Review 4(2), 36–41 (2022) 17. Hornuf, L., Momtaz, P.P., Nam, R.J., Yuan, Y.: Cybercrim e on the ethereum blockchain (2023) 18. Japinye, A.: Integrating machine learning in anti-mone y laundering through crypto: A comprehensive performance review. European Journal of Ac counting, Auditing and Finance Research 12(4), 54–80 (2024) 19. Lin, D., Wu, J., Yu, Y., Fu, Q., Zheng, Z., Yang, C.: Densefl ow: Spotting cryptocurrency money laundering in ethereum tran saction graphs. In: Proceedings of the ACM on Web Conference 2024. p. 4429–4438. WWW ’24, Association for Computing Machinery, N ew York, NY, USA (2024). https://doi.org/10.1145/3589334.3645692 , https://doi.org/10.1145/3589334.3645692 20. Nazzari, M.: From payday to payoff: Exploring the money la undering strategies of cybercriminals. Trends in Organized Crime pp. 1–18 (2023) 21. Nazzari, M.: Lost in the maze: Disentangling the behavio ral variety of money laundering. European Journal on Criminal Policy and Resear ch pp. 1–19 (2023) 22. Neumann, M., Elsenbroich, C.: Introduction: the societ al dimensions of organized crime. Trends in Organized Crime 20, 1–15 (2017) 23. Paquet-Clouston, M., Haslhofer, B., Dupont, B.: Ransom ware payments in the bitcoin ecosystem. Journal of Cybersecurity 5(1), tyz003 (2019) 24. Reddy, E., Minnaar, A.: Cryptocurrency: A tool and targe t for cybercrime (12 2018) 25. Sanusi, K.A., Dickason-Koekemoer, Z.: Cryptocurrency returns, cybercrime and stock market volatility: Gas and regime switching approach es. International Jour- nal of Economics and Financial Issues 12(6), 52 (2022) 26. Soudijn, M.: Encounters with professional money launde rers; an analysis of finan- cial transactions as reported by gatekeepers. European Jou rnal on Criminal Policy and Research pp. 1–14 (2024) 27. Tovanich, N., Cazabet, R.: Fingerprinting bitcoin enti ties using money flow repre- sentation learning. Applied Network Science 8(1), 63 (2023) 28. Viscusi, W.K.: Market incentives for criminal behavior . In: The Black youth em- ployment crisis, pp. 301–351. University of Chicago Press ( 1986) 29. Wardani, A., Ali, M., Barkhuizen, J.: Money laundering t hrough cryptocurrency and its arrangements in money laundering act. Lex Publica 9(2), 49–66 (2022) 30. Zhang, Y., Wang, J., Luo, J.: Heuristic-based address cl ustering in bitcoin. IEEE Access 8, 210582–210591 (2020) 31. Zola, F., Eguimendia, M., Bruse, J.L., Urrutia, R.O.: Ca scading machine learning to attack bitcoin anonymity. In: 2019 IEEE International Co nference on Blockchain (Blockchain). pp. 10–17. IEEE (2019)
{ "id": "2409.10031" }
2207.07002
Applications of Blockchain for the Governance of Integrated Project Delivery: A Crypto Commons Approach
This paper outlines why and how blockchain can digitally support and evolve the governance of collaborative project deliveries, such as integrated project deliveries (IPDs), to provide the foundation for novel and disruptive forms of organizational collaboration in the construction industry. Previous work has conceptualized IPDs as a common pool resource (CPR) scenario, where shared resources are collectively governed. Through the use of blockchain and smart contracts for trustworthy peer-to-peer transactions and execution logic, Ostrom's design principles can be digitally encoded to scale CPR scenarios. Building on the identified connections, the paper 1) synthesizes fourteen blockchain-based mechanisms to govern CPRs, 2) identifies twenty-two applications of these mechanisms to govern IPDs, and 3) introduces a conceptualization of the above relationships towards a holistic understanding of collaborative project deliveries on the crypto commons for novel collective organization of construction project delivery between both humans and machines.
http://arxiv.org/pdf/2207.07002v1
Jens J. Hunhevicz, Pierre-Antoine Brasey, Marcella M. M. Bonanomi, Daniel M. Hall, Martin Fischer
cs.CR
cs.CR
Page 1 of 31 Applications of Blockchain for the Governance of Integrated Project Delivery: A Crypto Commons Approach Jens J. Hunhevicz1*, Pierre-Antoine Brasey1,2, Marcella M. M. Bonanomi1,3, Daniel M. Hall1, Martin Fischer4 1 ETH Zurich, Institute of Construction and Infrastructure Management, Chair of Innovative and Industrial Construction, Zurich, Switzerland 2 INGPHI Ltd, Concepteurs d’ouvrages d’art, Lausanne, Switzerland 3 Polis Lombardia, Milan, Italy 4 Stanford University, Department of Civil and Environmental Engineering, Stanford, United States * Corresponding author: hunhevicz@ibi.baug.ethz.ch Abstract This paper outlines why and how blockchain can digitally support and evolve the governance of collaborative project deliveries, such as integrated project deliveries (IPDs), to provide the foundation for novel and disruptive forms of organizational collaboration in the construction industry. Previous work has conceptualized IPDs as a common pool resource (CPR) scenario, where shared resources are collectively governed. Through the use of blockchain and smart contracts for trustworthy peer-to-peer transactions and execution logic, Ostrom’s design principles can be digitally encoded to scale CPR scenarios. Building on the identified connections, the paper 1) synthesizes fourteen blockchain-based mechanisms to govern CPRs, 2) identifies twenty-two applications of these mechanisms to govern IPDs, and 3) introduces a conceptualization of the above relationships towards a holistic understanding of collaborative project deliveries on the crypto commons for novel collective organization of construction project delivery between both humans and machines. Keywords: Integrated Project Delivery (IPD), Common Pool Resource (CPR), Ostrom Principles, Blockchain, Distributed Ledger Technology (DLT), Smart Contracts, Decentralized Autonomous Organization (DAO), Construction Automation 1. Introduction Construction project delivery models (PDMs) describe how the multiple parties involved in a project are organized and managed to create and capture value (Davies et al. 2019). Even though the construction industry has been slow in adopting digitalization, new digital technologies and processes slowly make their way into the construction industry (Singh 2019). Digital information is changing how projects are delivered (Whyte 2019); it can motivate the development of novel collaborative PDMs with new incentive structures, procurement methods, and approaches to communication. Meanwhile, digital information technologies in the construction industry are also rapidly changing. One technology that is increasingly researched for the construction industry is blockchain (Li et al. 2019; Li and Kassem 2021; Nawari and Ravindran 2019a; Perera et al. 2020; Wang et al. 2017). Blockchain is a particular design option of distributed ledger technology (DLT) (Ballandies et al. 2021; Tasca and Tessone 2019) that enables direct peer-to-peer transactions of value without relying on trusted facilitators. The first ever blockchain created is Bitcoin (Nakamoto 2008). Since then, many new blockchains iterated on the approach of Bitcoin to enable new features and infrastructure (Spychiger et al. 2021a). Most notable, the Ethereum blockchain (Buterin 2014) made it possible that Turing-complete code pieces termed smart contracts could be executed on a blockchain. Smart contracts allow for the coding of interaction rules with blockchain transactions for digital workflows to coordinate economic activity Page 2 of 31 of actors in a decentralized and borderless way. In addition, smart contracts can encode containers of value, so-called tokens, such as currencies, securities, or utilities (Ballandies et al. 2021; Mougayar 2017). Tokens can then be transferred among blockchain users. Blockchain has been repeatedly theorized as promising to improve construction project management practices (Sonmez et al. 2021), especially to support financial management, automatic contract administration, and tracing and securing data along the supply chain (Hewavitharana et al. 2019; Kim et al. 2020). This also aligns well with the most often explored use cases for the construction sector (Hunhevicz and Hall 2020; Li et al. 2019; Li and Kassem 2021; Perera et al. 2020; Scott et al. 2021). However, scholarship also suggests that the impact of blockchain is highly disruptive to the coordination of existing economic systems (Davidson et al. 2018; Miscione et al. 2019). Smart contracts can create new organizational systems, incentivizing individual actors towards intended collective behaviour (Voshmgir and Zargham 2019). Therefore, blockchain can be an opportunity for new organizational designs governing the upcoming digital reality of PDMs (Hunhevicz et al. 2022a; Sreckovic and Windsperger 2020). Since construction PDMs are already transforming due to increasing digital information (Whyte 2019), there is need to investigate further the impact of the potentially disruptive impact of blockchain. In this paper, we conceptualize why and how blockchain can digitally support and evolve the governance of PDMs. To build this conceptualization, we specifically make use of ideas about governance of common pool resource (CPR) scenarios (i.e., the “commons”) (Ostrom 2015a). Scholars argue that blockchain-based mechanisms can scale CPR scenario governance (Fritsch et al. 2021; Rozas et al. 2021b; a). Such “crypto commons“ (Maples 2018) build digital governance structures for commons by leveraging blockchain-based market mechanisms and economic incentives to reward contributions to the common good (Crypto Commons Association 2021). This is interesting because there is strong theoretical alignment between Integrated Project Delivery (IPD) and the management of CPR scenarios (Hall and Bonanomi 2021). IPD is a new collaborative PDM that uses a relational contracting approach to manage large and complex construction projects. One driver for the development of IPD was the need for more flexible and collaborative organizational structures to gain benefit from digital building information modelling (Hall and Scott 2019). To do this, IPD uses a financial pool to share risk and reward among project participants depending on the outcome of the project. IPD also emphasizes decentralized, agile, and self-organized project governance arranged by the project participants. Collaborative PDMs such as IPD can better deal with the complexity and ever-changing nature of modern construction projects (Levitt 2011; Luo et al. 2017). The strong alignment of the collective nature of blockchain and collaborative approach of IPD has not escaped the attention of researchers. Nawari and Ravindran (2019b) theorize blockchain as a “evidence of trust” for IPD. Elghaish et al. (2020) and Rahimian et al. (2021) have developed a blockchain prototype for the IPD financial risk-and-reward system. However, these works mainly apply blockchain to improve existing financial processes. As stated above, blockchain has the potential to lead to new forms of organization and governance (Davidson et al. 2018; Jacobo-Romero and Freitas 2021; Miscione et al. 2019), but no work yet has explained how this might occur for construction PDMs. Therefore, this paper now explores how the relationships of blockchain, CPR theory, and IPD can be used as a theoretical foundation to inform which specific blockchain applications can be developed to evolve and redesign PDMs. This is achieved through systematically exploring the connections between Page 3 of 31 blockchain, CPRs, and IPD. The results of this work can help to conceive the opportunity of blockchain for IPDs to evolve, or even enable the formulation of new digitally supported PDMs on the crypto commons. 2. Methodology and Structure of the Paper An overview of the research approach and contribution is presented in Figure 1. The methodology contained three main steps: 1) We outlined established connections between CPRs, the Ostrom design principles (OPs), and IPDs to manage construction resources; 2) we conducted a state-of-the art review of all papers and articles that propose to use blockchain to manage CPR and identify the proposed mechanisms for the respective OPs; 3) we identified applications of those mechanisms for collaborative construction projects through using the link between IPDs and the OPs. Each of these steps is now described in more detail. In the departure section 3, we introduce relevant established concepts between CPR theory and IPD that act as basis for our research. First, we introduce Ostrom’s design principles (OPs) for the management of CPR scenarios (Section 3.1). Second, we explain the high-level concepts of IPD to manage construction project resources (Section 3.2). Finally, we outline the recently established connection between the OPs and IPD practices (Section 3.3). To verify the link between blockchain and CPR theory (Section 4), we conducted a comprehensive literature review of all papers and articles that proposed blockchain for the management of CPRs. We identify four journal papers (Fritsch et al. 2021; Pazaitis et al. 2017; Rozas et al. 2021b) and five articles (Dao 2018; Decoodt 2019; Emmett 2019a; de la Rouviere 2018; Schadeck 2019) proposing to govern real-world commons with blockchain-based mechanisms. Building on these works, we cluster and categorize fourteen blockchain governance mechanisms encoding the OPs for the governance of crypto commons. We then use abductive analysis (Timmermans and Tavory 2012) to theorize how blockchain governance mechanisms can be transferred to the governance of IPDs. Abduction is making a probable conclusion from what is known by systematically interpreting, matching, or re-contextualizing phenomena within a contextual framework, from the perspective of a new conceptual framework (Dubois and Gadde 2002b; Kovács and Spens 2005). An abductive approach is fruitful if the objective is to develop the understanding of a “new” phenomenon or new insights about existing phenomena by examining these from a new perspective (Dubois and Gadde 2002b; Kovács and Spens 2005). To do this, we first synthesized applications based on observed alignment between the blockchain mechanisms for the OPs and IPD practices in line with the OPs (Hall and Bonanomi 2021). We then refined and complemented applications based on supporting blockchain research both from within and outside the construction industry. In total, we identified 22 blockchain applications that can be used to build IPD governance on the crypto commons (Section 5). A holistic overview of the proposed conceptualization of IPD on the crypto commons demonstrates the cohesiveness between the relationships of the OPs, the blockchain governance mechanisms, and the specific blockchain applications to build novel governance mechanisms for IPDs (Section 6). The paper ends with a discussion of the opportunities for blockchain to be applied to IPD and other future forms of project delivery, as well as the challenges for governance design and for industry implementations to facilitate next research steps (Section 7). Page 4 of 31 Figure 1: Schematic representation of the research approach and contribution. CPR related boxes are pictured in white, the IPD related boxes in grey. The paper builds on the existing conceptualization between CPR, OPs, and IPD (see “Point of Departure”, Section 3.1 – 3.3. Afterwards, the paper comprehensively reviews literature proposing blockchain for CPRs and the OPs and summarizes the proposed mechanisms (Section 4). Finally, the paper identifies applications of blockchain governance mechanisms for IPD (Section 5) towards a holistic conceptualization of IPD on the crypto commons (Section 6) through abductive reasoning using the connection between the mechanisms, OPs, and IPD practices (see red arrow). 3. Point of Departure 3.1. Governing CPR Scenarios CPRs are natural resources, which are freely shared among many users (Ostrom 1990). Examples include forests, pastures, fishing grounds, parking lots or wiki libraries. In a CPR scenario, users might appropriate resources at a higher than optimal rate, resulting in a downward spiral of total resource availability (Hardin 1968). This is known as the tragedy of the commons . For decades, scholars argued that centralized control was the only way to coordinate optimal resource appropriation in CPR scenarios. However, more recent work pioneered by economist Elinor Ostrom (Ostrom 2010, 2015a; Ostrom et al. 1994) and others (Gardner et al. 1990) overturned these beliefs. Ostrom used case studies to demonstrate that local actors are often successful at self-organizing to better sustain CPR scenarios when compared to centralized interventions. Ostrom identified eight design principles – the OPs – that can guide effective governance of CPR scenarios (Table 1). The OPs explain necessary conditions that should be achieved, to facilitate trust and reciprocity and to sustain collective action in long- lasting CPR scenarios (Cox et al. 2010). 3.2. IPD Governance of Construction Projects IPD is a project delivery model that formally multiple, independent firms to collectively share financial risk and reward among themselves and with the project sponsor during the design and construction of a facility (Lahdenperä 2012). IPD governance today can be best described as the combination of multiple formal and informal practices (Bygballe et al. 2015; Hall and Scott 2019). Such practices include early involvement of key stakeholders, risk and reward mechanisms, joint project control, and target value design (Cheng et al. 2016; Hall et al. 2018). IPD departs from the traditional model of project delivery in three notable ways (Hall and Bonanomi 2021). First, the multiparty contract of the IPD model creates a shared financial resource pool for the project. The project resources become contractually available for free use by any of the project signatory parties. Second, the participants of IPD projects share decision-making rights over the project governance structures. Decision-making is no longer centralized (Tillmann et al. 2014). Third, the project team shares the financial risks and rewards of the project. Positive outcomes are split Page 5 of 31 among participants. The project teams must self-organize (Bertelsen 2003) and determine who has access to the shared pools and who is allowed to withdraw from this pool. 3.3. Governing IPD using CPR Design Principles Recent work has proposed a conceptualization bridging the governance of IPD projects and the OPs (Table 1) (Hall and Bonanomi 2021), suggesting that the IPD project environment resembles a CPR scenario (Hall and Bonanomi 2021). Project resources are “pooled” together through a multi-party contract which shares risk and reward (Darrington and Lichtig 2010; Thomsen et al. 2009). Similar as CPR scenarios must avoid the tragedy of the commons , IPD projects must then avoid the tragedy of the project – where the project budget and schedule can be subject to over-appropriation by the project stakeholders to the long-term detriment of the project resource system (Hall and Bonanomi 2021). To avoid the tragedy of the project, project managers create effective self- governance structures manifesting in specific management practices for IPDs, which demonstrate many shared characteristics to the OPs. Additional work has validated this connection with examples from IPD project practices (Bonanomi et al. 2019, 2020). Table 1 lists such example practices for IPDs aligned with the OPs for CPRs. Page 6 of 31 Table 1: The eight Ostrom principles and their connection with IPD practices (Source: Hall and Bonanomi (2021)). Ostrom Principle (OP) Description of OP (Cox et al. 2010; Ostrom 2015b) Example Practice(s) for IPD (Hall and Bonanomi 2021) 1 Clearly Defined Boundaries a) For the users The boundaries between legitimate and non-users who have right to withdraw resource units from the CPR must be clearly defined. The participating firms collectively determine who is a risk and reward “partner” and who is not in the multiparty contract. b) For the resources Resource boundaries of the system must be clearly defined and separated from the larger socio-economic system. The project sponsor and project team collectively define which specific aspects of project scope and budget are open to all and which are not. 2 Ensure congruence a) With local conditions CPR scenarios should ensure congruence with local conditions of appropriation rules restricting time, place, technology, and/or quantity of resource units. Trade contractors are engaged early in the project, because they have knowledge of local conditions, such as availability of labor, material, work routines, and other resources. b) Between appropriation & provision rules The benefits obtained by users from a CPR, as determined by appropriation rules, should be proportional to the amount of inputs required in the form of labor, material, or money, as determined by provision rules. The level of participation in the risk/reward pool is weighted according to a firm’s individual cost structure or accounting practices, its period of involvement, and/or influence on the outcomes. 3 Collective-choice arrangements Most individuals affected by the operational rules can participate in modifying the operational rules. Firms that have signed the multiparty contract are entitled to participate in management group functions and to vote on decisions that directly concern their work and area of expertise. 4 Monitoring of the users and the resources a) Presence Monitors are present to actively audit CPR conditions and appropriator behavior of the users to ensure that all parties are adhering to agreed-upon tasks. Participants share information on resources, costs, profit, and performance openly and transparently. Teams also create cost targets and then track the weekly withdrawals of resource units, monitoring for deviations (Target Value Design). b) Accountability Monitors are accountable to or are the appropriators. Participants make commitments about the work to be completed. The Planned Percent Completed (PPC) metric tracks the percentage of items promised last week that were completed and is publicly reported to all team members. 5 Graduated sanctions Appropriators who violate operational rules are assessed graduated sanctions (depending on the seriousness and context of the offense) by other appropriators, officials accountable to these appropriators, or both. Sanctions can increase due to continuous non-conformance or underperformance of PPC, leading to the removal of individual participants and/or firms if necessary. 6 Conflict-resolution mechanisms Appropriators and officials have rapid access to low-cost local arenas to resolve conflicts among appropriators or between appropriators and officials. Project participants craft conflict resolution mechanisms that include clear dispute resolution strategies intended to avoid costly litigation proceedings. 7 Minimal recognition of rights to organize The rights of appropriators to devise their own institutions are not challenged by external governmental authorities. Conflict resolution mechanisms allow participants to make collective decisions, including procedures for the team to override the wishes of the project sponsor. 8 Nested enterprises Appropriation, provision, monitoring, enforcement, conflict resolution, and governance activities are organized in multiple layers of nested enterprises. Governance activities of IPD projects are organized into multiple layers of hierarchy using a nested enterprise design. Page 7 of 31 4. Blockchain and the Crypto Commons: a Review 4.1. Blockchain as an Institutional Innovation The dominant narrative for economic coordination through the blockchain argues that blockchain enables increased productivity of existing processes by lowering transaction costs through costless verification and without the need for costly intermediation (Catalini and Gans 2020). However, some scholars argue the true potential of blockchain is the development of new types of institutional organization with the potential to disrupt and substitute existing economic coordination (Davidson et al. 2018; Jacobo-Romero and Freitas 2021; Miscione et al. 2019). Blockchain is a new way to reach consensus about a shared truth without requiring centralized trust (Davidson et al. 2018). The innovation of blockchain is the consensus protocols using cryptoeconomic mechanisms to reward honest parties to reach consensus on network transactions, e.g. in Bitcoin with proof-of-work (Gervais et al. 2016; Nakamoto 2008). Blockchain disintermediates transactions with a new form of organizational design, and as a consequence can lower transaction costs (Davidson et al. 2018). As a consequence, applications can leverage the innovation of cryptoeconomic mechanisms of blockchains for trust-minimized social coordination to build new forms of economic activity on top of blockchains. Such cryptoeconomic systems can provide an institutional infrastructure that facilitates a wide range of socio-economic interactions to influence participants in their behavior (Voshmgir and Zargham 2019). There is ongoing exploration of what forms of organization and governance can be supported or replaced through blockchain. Within this paper, we focus on blockchain as a possibility to scale CPR scenarios on the crypto commons. 4.2. The Connection of Blockchain and CPR Governance The OPs describe how commons-based communities can create effective bottom-up governance rules (Cox et al. 2010). However, a major limitation is scaling community governance to large and global systems (Ostrom et al. 1999). Recent scholars point out that blockchains can be assessed through the lens of CPR theory and the OPs. This can enable the creation of effective bottom-up governance rules for decentralized peer production of the network without any centralized coordination (Red 2019; Shackelford and Myers 2016; Werbach 2020). There is growing recognition that the underlying system governance mechanisms are the key to long-term success of blockchain networks (Beck et al. 2018; Machart and Samadi 2020; Red 2019; Werbach 2020). CPR theory and the OPs are a repeatedly mentioned concept to guide the development of blockchain governance (Shackelford and Myers 2016; Werbach 2020). Fritsch et al. (2021) find now that blockchain and other DLTs can enable scaling of a new generation of commons-oriented economies, both for digital and physical commons. On the one hand, cryptoeconomic mechanisms decrease the cost of information exchange through minimizing opportunism and uncertainty trough transparency and cryptographic enforcement (Machart and Samadi 2020; Schmidt and Wagner 2019). On the other hand, blockchain provides reliable organizational means to equitably produce and distribute resources in accordance with the shared values of productive communities (Fritsch et al. 2021). The transparent decision-making procedures and decentralized cryptoeconomic incentive systems help avoid the tragedy of the commons (Bollier 2015). The idea is to craft blockchain-based governance mechanisms by encoding the OPs (Rozas et al. 2021b; a). Blockchain could create networked governance to scale real-world commons, similar to how the stock market enabled corporations to scale (Maples 2018). Such crypto commons could allow new types of value creation with crypto assets rather than shares of stock, contributors rather than employees, and decentralized collaboration rather than centralized ownership (Maples 2018). Page 8 of 31 4.3. Blockchain Governance Mechanisms for the Commons As a basis to later investigate potential applications of blockchain mechanisms for IPD, we reviewed blockchain governance mechanisms proposed for CPRs (see also Section 2). Most notably, Rozas et al. (Rozas et al. 2021a) assesses the relationship between blockchain affordances and the eight OPs to support peer production of real-world commons. Rozas et al. (2021b) explore then how those can be applied to scale-up CPR governance of global software commons to address limitations identified by Stern (2011). Even though IPD can be characterized as a real world common, it hardly falls into the same category of global real world commons. Therefore, we clustered proposed mechanisms from all identified articles into 14 high level mechanisms for the eight OPs (Table 2), instead of just relying on the categorization of Rozas et al. (2021a). Table 2: Clustered blockchain governance mechanisms based on reviewed literature. Blockchain Governance Mechanisms OP Sources M1: Identity, ownership, and access rights based on addresses and tokens 1a (Dao 2018; Rozas et al. 2021b; a; Schadeck 2019) M2: Tokenization of the resources 1b (Decoodt 2019; Emmett 2019a; Fritsch et al. 2021; de la Rouviere 2018) M3: Decentralized markets to match supply and demand of local needs and conditions 2a (Schadeck 2019) M4: Formalizing appropriation and provision rules with smart contracts 2b (Dao 2018; Rozas et al. 2021b; a) M5: Decentralized proposal and voting platforms 3 (Dao 2018; Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019) M6: Decentralized prediction markets 3 (Dao 2018) M7: Transparent record and automation of transactions 4a (Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019) M8: Digital signatures for tamper-proof commitments 4b (Dao 2018; Rozas et al. 2021b; a) M9: Decentralized peer-review mechanisms 4b (Pazaitis et al. 2017; Rozas et al. 2021b) M10: Reputation tokens 4b (Pazaitis et al. 2017; Schadeck 2019) M11: Transparent and self-enforcing sanctions 5 (Dao 2018; Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019) M12: Decentralized jurisdiction systems 6 (Dao 2018; Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019) M13: Ensure decisions are made by affected parties 7 (Rozas et al. 2021b; a) M14: Bottom-up interaction among multiple hierarchical levels 8 (Dao 2018; Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019) 4.3.1. OP1 – Clearly Defined Boundaries a) For the Users According to OP 1a, the boundaries between legitimate and non-users who have right to withdraw resource units from the CPR must be clearly defined (Cox et al. 2010; Ostrom 2015b) . The main identified blockchain mechanism for OP 1a is to govern CPR boundaries through blockchain addresses and tokens to control identity, ownership, and access rights (Table 2, M1). Blockchain identifies users with a blockchain address, so there is no need to know the human or machine controlling the address. Access rights and ownership can be assigned to addresses either through smart contract logic that defines roles with specific permissions, or through membership or utility tokens that can be transferred between users (Dao 2018; Rozas et al. 2021b; a; Schadeck 2019). While the second allows to trade these rights with other addresses by transferring the token, the address based roles stays Page 9 of 31 with that address until revoked. In both cases, blockchain controlled ownership and access rights can be more easily and granularly defined, propagated, and revoked (Rozas et al. 2021b). b) For the Resources OP 1b states that resource boundaries of the system must be clearly defined and separated from the larger socio-economic system (Cox et al. 2010; Ostrom 2015b) . Within the context of CPRs, tokenization of the resources (Table 2, M2) can help to achieve clearly defined resource boundaries on the crypto commons. Once resources are tokenized, cryptoeconomic mechanisms through smart contracts can facilitate a wide range of interaction patterns. Tokenization can be in the form of asset- backed currencies or commodity tokens representing the resource, good, or service in the commons (Fritsch et al. 2021). New mechanisms such as bonding curves (Balasanov 2018; Titcomb 2019) can incentivize early protectors of CPR scenarios (Decoodt 2019; Emmett 2019a; de la Rouviere 2018). Bonding curves allow investors to buy a resource token by locking up their investment. Investors can later sell back these tokens according to the new price determined by the bonding curve. The bonding curve increases price with issued supply, and therefore rewards early investors. Bonding curves have been proposed for “continuous organizations”, where the underlying tokens represent rights to future revenues (Favre 2019). Augmented bonding curves introduce additional functionalities to create a more robust system that is less subjective to speculation and manipulation (Titcomb 2019). They act simultaneously as means of funding, liquidity provider and market maker, while the issued tokens represent access or voting rights to the resource (Zargham et al. 2020). Therefore, augmented bonding curves combine access rights through tokens (M1) with the idea of tokenizing the resource. The interplay between the interests of token holders to sell when token price rises and buy as price drops to claim additional governance power over a growing treasury, creates a negative feedback loop that leverages speculative behavior into a continuous source of income for the commons (Fritsch et al. 2021). The Commons Stack implemented such an augmented bonding curve based on research of Zhargam et al. (2020). 4.3.2. OP2 – Ensure Congruence a) With Local Conditions OP 2a states that CPR scenarios should ensure congruence with local conditions of appropriation rules restricting time, place, technology, and/or quantity of resource units (Cox et al. 2010; Ostrom 2015b). Decentralized markets to match supply and demand of local needs and conditions (Table 2, M3) are proposed as a blockchain mechanism (Schadeck 2019). Smart contracts encode the rules to trade with other actors not controlled by any intermediary, so the community using the decentralized marketplace can benefit from unrestricted mutual trading. At the same time, the market place can be tailored to comply with the formalized appropriation rules. b) Between Appropriation & Provision Rules According to OP 2b, the benefits obtained by users from a CPR, as determined by appropriation rules, should be proportional to the amount of inputs required in the form of labor, material, or money, as determined by provision rules (Cox et al. 2010; Ostrom 2015b). Formalizing appropriation and provision rules (Table 2, M4) with smart contracts can make sure these agreements get obeyed (Dao 2018; Rozas et al. 2021b; a). The transparency of rules also promotes an active discussion of the notion of value in the community (Rozas et al. 2021a). The community can then collectively decide which contributions to recognize, as well as suited local appropriation rules (Rozas et al. 2021b). 4.3.3. OP3 – Collective Choice Arrangements OP 3 states that individuals affected by the operational rules can participate in modifying the operational rules (Cox et al. 2010; Ostrom 2015b). Decentralized decision making and voting are often Page 10 of 31 discussed topics to govern blockchain networks and decentralized applications. It is therefore not surprising that smart contract based decentralized proposal and voting platforms (Table 2, M5) are suggested to govern real world commons (Dao 2018; Emmett 2019a). Tokens could grant rights for decision making, either to ensure equal power distribution by design (Rozas et al. 2021b; a), or based on the contribution and reputation of parties (Emmett 2019a; Schadeck 2019). Furthermore, decentralized prediction markets (Table 2, M6) are proposed as a way to establish a trusted knowledge base (Dao 2018). Prediction markets were introduced by Hanson (2013) to establish a more representative picture of a future outcome by using a betting platform. The underlying idea is that predictions made by people willing to risk a loss are more likely to be well- informed. 4.3.4. OP4 – Monitoring a) Presence OP 4a states that monitors should be present to actively audit CPR conditions and appropriator behavior of the users to ensure that all parties are adhering to agreed-upon tasks (Cox et al. 2010; Ostrom 2015b) . Blockchain allows a transparent record and automation of transactions (Table 2, M7) through smart contracts of user behavior and participation in the commons observable by all community members (Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019). b) Accountability OP 4b states monitors are accountable to or are the appropriators of a CPR (Cox et al. 2010; Ostrom 2015b). Multiple blockchain mechanisms are proposed to help ensure accountability within CPR scenarios. Every blockchain transaction is signed by a valid private key creating digital signatures for tamperproof commitments (Table 2, M8). The immutability and censorship resistance of blockchain ensures that decisions and transactions are accountable since all transactions are transparent and verifiable on the blockchain (Dao 2018; Rozas et al. 2021b; a). In cases were no automatic checking of work and contributions to the commons is possible, decentralized peer-review mechanisms (Table 2, M9) facilitated by smart contracts allow to review the status of work or the perceived value of contributions (Pazaitis et al. 2017; Rozas et al. 2021b). Pazaitis et al. (2017) proposed then reputation tokens (Table 2, M10) to represent the perceived value of contributions in the blockchain system. They can be earned by users through complying with the CPR rules and are hence a measure of accountability (Schadeck 2019). 4.3.5. OP5 – Graduated Sanctions According to OP 5, appropriators who violate operational rules are assessed graduated sanctions depending on the seriousness and context of the offense (Cox et al. 2010; Ostrom 2015b) . Blockchain allows for transparent and self-enforcing sanctions (Table 2, M11). Sanctions can be made transparent to the whole community (Schadeck 2019), while smart contracts can self-enforce token- based sanctions (Dao 2018; Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019) through the loss of either financial or reputation tokens (Dao 2018; Emmett 2019a; Schadeck 2019), or a value-decrease of tokens (Schadeck 2019). 4.3.6. OP6 – Conflict Resolution Mechanisms OP 6 states that appropriators and their officials should have rapid access to low-cost local arenas to resolve conflicts among appropriators or between appropriators and officials (Cox et al. 2010; Ostrom 2015b). Blockchain offers the possibility for faster conflict resolutions with decentralized jurisdiction systems (Table 2, M12) (Dao 2018; Emmett 2019a; Rozas et al. 2021b; a). Tokens ensure skin in the Page 11 of 31 game in disputes, as well as incentivize game theoretic proofs (Schadeck 2019). Such protocols must integrate with existing legal and regulatory systems (Emmett 2019a; Schadeck 2019). 4.3.7. OP7 – Minimal Recognition of Rights to Organize OP 7 states that the rights of appropriators to devise their own institutions should not be challenged by external governmental authorities (Cox et al. 2010; Ostrom 2015b). Within crypto commons, smart contract mechanisms were proposed to ensure decisions are made by affected parties (Table 2, M13) (Rozas et al. 2021b; a), e.g. local community rules can only be enforced locally. 4.3.8. OP8 – Multiple Layers of Nested Enterprises OP 8 states that the rules for appropriation, provision, monitoring, enforcement, conflict resolution, and governance activities should be organized in multiple layers of nested enterprises (Cox et al. 2010; Ostrom 2015b) . Smart contracts can facilitate coordination across nested enterprises (Table 2, M14) between various hierarchical levels of participants to realize shared objectives in the best interest of the commons (Dao 2018; Emmett 2019a; Rozas et al. 2021b; a; Schadeck 2019). 5. Applications of Blockchain Governance Mechanisms for IPD Based on the 14 blockchain mechanisms for CPR scenarios (Table 3), we identified 22 potential applications of blockchain mechanisms for IPDs (Table 3) to govern IPDs as a CPR scenario (Hall and Bonanomi 2021). The methodological approach is explained in Section 2. We discuss here for each of the 22 identified applications the potential to improve or extend the IPD practices, either based on already existing practices or for potentially new mechanisms not yet applied within IPD. Moreover, we collate the applications with existing blockchain research in the construction industry to indicate their novelty, or if already realized, their alignment. Page 12 of 31 Table 3: The 22 identified IPD applications based on the blockchain governance mechanisms. Some were already explored in existing construction blockchain literature. IPD Application of Blockchain Mechanism Mecha- nism Ostrom Principle Excerpt of Related Blockchain Research in the Construction Industry M1-1: Scalable management of user identities and rights M1 1a Current research uses address-based rights as a prerequisite for blockchain applications. None investigate token-based rights. M1-2: Machine participation M1 1a Robot participation (Lee et al. 2021); Self-owning house (Hunhevicz et al. 2021). M2-1: Representation and ownership of project resources M2 1b Project bank accounts (Li et al. 2019; Tezel et al. 2021). M2-2: Decentralized funding and investment mechanisms M2 1b Tokenized investment mechanisms (Tezel et al. 2021; Tian et al. 2020). M3-1: Non-rent seeking and unrestricted matching of project needs with local conditions M3 2a Reverse auction-based tendering (Tezel et al. 2021); Decentralized design competition (Dounas et al. 2020; Lombardi et al. 2020a). M4-1: Transparent logic for the appropriation and access to resources M4 2b Financial mechanisms for IPD projects (Elghaish et al. 2020; Rahimian et al. 2021). M4-2: Scalable and self-enforcing shared risk and rewards M4 2b - M4-3: New incentive structures M4 2b Token-based incentives for data records (Hunhevicz et al. 2020; Mathews et al. 2017); performance-based life cycle incentives (Hunhevicz et al. 2022b; O’Reilly and Mathews 2019) M5-1: Scaling of collective choices M5 3 - M5-2: Definition of voting rights for intended power distributions M5 3 - M6-1: Gamified and scalable sourcing of local actors’ knowledge M6 3 - M7-1: More trust because of transparent user actions and resource flows, as well as predictive automation with smart contracts M7 4a Blockchain increases trust in supply chains through data tracking, contracting, and transferring resources (Qian and Papadonikolaki 2020). Many papers focus on these aspects. M7-2: Transaction history enables reaction to events and learning from past decisions M7 4a Many papers focus on triggering financial transactions based on events, e.g. as in (Elghaish et al. 2020; Hamledari and Fischer 2021a). None focus on learning aspect based on transaction history. M8-1: Smart legal contracts M8 4b Theoretical investigation of intelligent contracts (Mason 2017; McNamara and Sepasgozar 2020, 2021). Performance based smart contracts (Hunhevicz et al. 2022b). M9-1: Reputation tokens for special rights or for credentials M9 4b - M10-1: Peer-review for project progress, quality, and cost M10 4b - M11-1: Token-based sanctioning M11 5 - M11-2: Social sanctioning through transparent action M11 5 - M12-1: Smart contract based “mini courts” for fast and transparent conflict resolution M12 6 Blockchain-based dispute resolution platform (Saygili et al. 2021). M12-2: Token-based dispute participation to ensure “skin in the game” M12 6 - M13-1: Smart contracts ensure that powerful parties cannot solely enforce collective choices and conflict resolution M13 7 - M14-1: Smart contracts coordinate decision making among organizational tiers M14 8 - Page 13 of 31 5.1. M1 – Identity, ownership, and access rights based on addresses and tokens (for OP1a) IPD projects need clearly defined rights for each actor based on their role in the project (Cheng et al. 2016). Blockchain allows scalable management of user identities and rights (Table 3, M1-1) through address- based identity and/or transferable tokens. Control of access and rights is the foundation for most blockchain applications proposed for the construction industry, as well as all of the other blockchain- based governance mechanisms, such as access to resources (M2-1), access to decentralized markets (M3-1), access to resources (M4-1) as well as shared risk and rewards (M4-2), access to proposal or voting platforms (M5-2), tracking of user and resource actions (M7-1), participation in smart legal contracts (M8-1), peer-review mechanisms (M10-1), jurisdiction systems (M13-1), or coordination among organizational tiers (M14-1). Smart contract logic ensures that only allowed participants can perform certain actions based on their addresses or token-ownership, providing a scalable approach to define user boundaries in IPD multi-party contracts. Research should investigate whether addresses in IPD projects should be controlled at an individual level or by organizational entities. This depends on many aspects, e.g. how profit, liability and risk should be distributed, or whether an incentive system targets individual actors or firms. Moreover, blockchain only identifies actors through their addresses, therefore allowing for machine participation (Table 3, M1-2), e.g. to tender (M3-1) and sign (M8-1) work packages, as well as giving them access to resources (M3-1) and compensating them for their work (M4-2). We see already example of this in research of Lee et al. (2021) where robots get incremental payments for performed work, as well as in the case of no1s1, a self-owning house that can receive funds for provided services, as well as spend funds for maintenance and operations (Hunhevicz et al. 2021). For now, we assume that decision making for IPD will be still human-based, so collective choice mechanisms (M5-1), peer- review mechanisms (M10-1), conflict resolution mechanisms (M12-1), and coordination among organizational tiers (M14-1) does not involve machine participation. 5.2. M2 – Tokenization of the resources (for OP1b) IPD projects require clearly-defined boundaries for the resources, i.e. which specific aspects of project scope and budget are open to all, and which are not (Hall and Bonanomi 2021). With tokenized project resources, e.g. the project budget, representation and ownership of project resources (Table 3, M2-1) can be clearly defined, also allowing monitoring of resources (M7-1). We are so far not aware of any research that proposes tokenization of physical resources in a construction industry context. Some research goes in this direction by exploring how crypto assets can integrate the physical and financial supply chains (Hamledari and Fischer 2021b), or suggesting non-fungible tokens (NFTs) to represent building components (Dounas et al. 2020). Inspiration how and which physical resources to tokenize could also come from the asset-backed tokenization of “Holochain’s Commons Engine” or the commodity tokens of the “Economic Space Agency” (Fritsch et al. 2021). Tokenization of the resource would allow to manage digitally one or multiple resource pools with distinct appropriation and payoff functions. Related to the project budget, this relates to the suggestion of blockchain-based project bank accounts for construction projects (Li et al. 2019; Tezel et al. 2021). In addition, decentralized funding and investment mechanisms (Table 3, M2-2) leveraging cryptoeconomics can be explored to extend incentive structures (M4-3). Augmented bonding curves could be one such mechanism to extend current risk/reward structures (M7-1) in IPD by yielding additional profit for invested stakeholders. Having said that, even though tokenized investment mechanisms for construction projects were already proposed (Tezel et al. 2021; Tian et al. 2020), Page 14 of 31 normally a client pays for the project and there is no need to raise funds. Moreover, the power distribution to manage the resources is usually determined by the respective project roles, and not dependent on their point in time when they invest and support the project. Nevertheless, future PDMs might benefit from such new funding and investment mechanisms. 5.3. M3 – Decentralized markets to match resources to local needs and conditions (for OP2a) Within IPD, key stakeholders often have experience with local conditions, such as availability of labor, material, work routines and other resources. Their early involvement provides the rest of the project team with a holistic understanding of the project conditions (Hall and Bonanomi 2021). Decentralized markets could improve and extend this with non-rent seeking and unrestricted matching of project needs with local conditions (Table 3, M3-1). Projects can find local resources and knowledge important for the success of the project without middleman profiting from facilitating these marketplaces, improving profitability of both the project and contributors. Decentralized marketplaces also allow users of the marketplace, e.g. the IPD stakeholders, project suppliers, and local residents, to collectively define rules. Furthermore, blockchain-based marketplaces can introduce new decentralized market mechanisms, only requiring a blockchain address and/or holding credentials such as reputation tokens. This could lead to more inclusive markets, potentially not only restricted to humans but also machines. We are not aware of any implemented decentralized marketplaces in the construction industry. Along these lines, Tezel et al. (2021) investigated a reverse auction-based tendering mechanism facilitated by smart contracts, and Dounas et al. (2020) and Lombardi et al. (2020b) analyze a decentralized design competition. 5.4. M4 – Formalizing appropriation and provision rules with smart contracts (for OP2b) In IPD, the risk/reward pool is the main instrument to balance a firm’s required participation with the potential reward according to their individual cost structure or accounting practices, their period of involvement in the project and/or their influence on the project’s outcome (Cheng et al. 2016). Smart contracts encode selection criteria and market mechanics visible to everyone and allow to forecast expected behavior according to the formalized rules. Transparent logic for the appropriation and access to resources (Table 3, M4-1) can be collectively ensured, especially if the resources are represented in the system through tokens (M2-1). This has been acknowledged for mechanisms of monetary resources in IPD projects (Elghaish et al. 2020; Rahimian et al. 2021). Moreover, smart contracts can ensure scalable, self-enforcing, and stakeholder specific rules for shared risk and rewards (Table 3, M4-2), hereby clearly defining provision rules of the system that confirm with the defined appropriation rules. However, this replicates existing IPD allocation rules at the firm level. New incentive structures (Table 3, M4-3) for IPDs only possible with blockchain mechanisms can be created. For example, blockchain could be used to issue non-monetary reputation tokens or access- tokens for decentralized markets (M3-1), decision making processes (M5-2), and to ensure “skin in the game” in legal disputes (M12-2). It is also possible to create new ways of token-based rewards (M4-2) and sanctioning (M11-1) at the individual or at the firm level. Token-based incentives are to date rarely proposed in construction industry literature. Mathews et al. (2017) propose a token to reward parties for maintaining and improving BIM databases. Similarly, Hunhevicz et al. (2020) explore smart contracts and tokens to ensure high-quality data sets in a construction project. Although not token-based, O’Reilly and Mathews (2019) and Hunhevicz et al. (2022b) explored performance-based incentives across life-cycle phases to design and build for the best possible energy performance across phases. Inspiration could come also from outside of the construction industry, e.g. from the Finance 4.0 initiative that explored token-based incentives to address sustainability (Ballandies et al. 2021; Dapp 2019). Page 15 of 31 5.5. M5 – Decentralized proposal and voting platforms (for OP3) In an IPD context, firms that have signed the multi-party contract are entitled to participate in management group functions and to vote on decisions that concern their work and area of expertise (Ashcraft 2011; Perlberg 2009). Scaling of collective choices (Table 3, M5-1) in IPD could be achieved via decentralized proposal and voting platforms. First, stakeholders can gather opinions and proposals on project spending and execution. Afterwards, they allow for trusted voting on proposals to reach fast decisions even among organizational tiers (M14-1). Finally, they could collectively decide, e.g. through peer-review mechanisms (M10-1), on the appropriation and provision rules of the resources (M4-1) or how to incentivize project stakeholders (M4-3). If the project uses a tokenized resource pool or rewards, approved funds or resources could be automatically released upon approval (M2-1). Although there are not yet examples in the construction industry, we can find multiple examples of implemented blockchain based decision making mechanisms. Token Curated Registries (TCR) (Asgaonkar and Krishnamachari 2018; Wang and Krishnamachari 2019) can be used to manage the validity and functionality of tokens (de la Rouviere 2018). With a TCR users can collectively decide and entries to lists, e.g. to decide on new tokens or changes to existing tokens. Within IPD, a TCR could allow trustworthy and fast collective change processes after the initial project definition to existing tokens or propose new tokens as the IPD participants see fit. Another example for a decentralized governance platform is Politeia1 for the Decred2 blockchain, where stakeholders owning the cryptocurrency can upload proposals for network changes and treasury spending and then vote on it. Also, the Aragon project implemented a token based voting platform called Aragon Voice3. IPDs could use similar decentralized applications to manage decision making. Address or token-based access control allows fine-grained definition of voting rights for intended power distributions (Table 3, M5-2) among organizational tiers (M14-1), while maintaining scalability of the system. Suited voting forms and decision-making mechanisms would need to be explored in an IPD context. In the blockchain space, various voting mechanisms are proposed that could inspire new ways of voting within IPD. In Decred for example, holders have 1 vote per token (although pooled into larger amounts and locked for an uncertain time period). This approach is anonymous, whereas in 1 vote per person as often used in existing democratic systems, voters need to be identifiable. Another proposed voting mechanism for CPR governance (Dao 2018; Emmett 2019a) includes quadratic coin lock voting (Buterin 2016) as a token-based variant of quadratic voting (Weyl and Lalley 2017). The weight of votes is discounted by an exponential function to more prominently value the vote of minority opinions (Fritsch et al. 2021). Finally, in conviction voting stakeholders continuously allocate votes in form of tokens to different options that slowly decay if not renewed (Emmett 2019b). This allows to sense user preferences over long time periods and prevent last minute vote swings by large token holders (Fritsch et al. 2021). 5.6. M6 – Decentralized prediction markets (for OP3) To make well informed decisions, decentralized prediction markets could be used for gamified and scalable sourcing of local actors’ knowledge (Table 3, M6-1), maybe in combination with decentralized markets for local actors (M3-1) and to extend present incentive structures towards external actors (M4-3). Augur4 is likely the most common implementation of a blockchain based 1 https://proposals.decred.org/ , accessed 09.12.2021. 2 https://decred.org/ , accessed 09.12.2021. 3 https://aragon.org/aragon-voice , accessed 09.12.2021 4 https://www.augur.net /, accessed 09.12.2021. Page 16 of 31 prediction market. To our knowledge there are so far no similar mechanisms within IPD. Nevertheless, research can explore if decentralized prediction markets can be useful in cases where actors are unknown or should remain anonymous, e.g. a betting platform to gauge expected costs of the project. 5.7. M7 – Transparent record and automation of transactions (for OP4a) IPD projects make use of monitoring practices such as “open-book finances” to track financial resources or “Big Room” to collocate stakeholders to commit publicly to work packages and continuously report their progress to the rest of the team (Hall and Bonanomi 2021). Blockchain creates more trust because of transparent user actions and resource flows, as well as predictive automation with smart contracts (Table 3, M7-1). IPD stakeholders can be identified through address-based access control and their transactions tracked visibly to all stakeholders, creating an inherent incentive to behave trustworthy since the other stakeholders can recognize malicious behavior (M11-2). Because of transparent financial transactions, open-book finances is inherently ensured. Furthermore, with resource tokenization implemented, resource flows and appropriation are observable. For example, a blockchain could help monitor the weekly withdrawals of resource units and alert participants to deviations from the cost targets initially estimated with the target value design process. In addition, smart contract automation gives more certainty in the expected transaction logic. Overall, transparency and smart contract automation creates trust in defined explicit incentive structures (M4-3), in collective choices (M5-1), in conflict resolution mechanisms (M12-1), and for coordination among organizational tiers (M14-1). The available transaction history enables reaction to events and learning from past decisions (Table 3, M7-2) for the management of user identities and rights (M1-1), ownership of resources (M2-1), decentralized market logic (M3-1), logic for the appropriation and access to resources (M4-1), refining incentive structures (M4-3), the definition of voting rights (M5-2), and the execution of smart legal contracts (M8-1), peer-review mechanisms (M10-1), and decentralized jurisdiction systems (M12-1). Blockchain increases trust in supply chains through data tracking, contracting, and transferring resources (Qian and Papadonikolaki 2020). Many papers in a construction context focus on transparent and traceable records, e.g. of design data (Erri Pradeep et al. 2021) or construction related quality data (Sheng et al. 2020; Wu et al. 2021). Literature also investigates how to ensure traceability of built asset product information along the construction value chain in various contexts (Kifokeris and Koch 2020; Li et al. 2021; Wang et al. 2020; Watson et al. 2019). Automated and traceable financial transactions are often suggested to enhance financial processes within construction projects (Ahmadisheykhsarmast and Sonmez 2020; Chong and Diamantopoulos 2020; Das et al. 2020; Elghaish et al. 2020; Di Giuda et al. 2020; Hamledari and Fischer 2021a; Nanayakkara et al. 2021; Ye and König 2021). 5.8. M8 – Digital signatures for tamper-proof commitments (for OP4b) To improve accountability within IPD, stakeholders can commit to work packages by signing a blockchain transaction. This enables smart legal contracts (Table 3, M8-1) when linked to terms encoded in smart contracts for trackable and automatic execution. Construction literature theoretically suggested smart legal contracts (Maciel and Garbutt 2020; Shojaei et al. 2020), also termed intelligent contracts (Mason 2017; McNamara and Sepasgozar 2020, 2021). Based on agreed terms about committed work or performance data (Hunhevicz et al. 2022b), progress and completion can be tracked and confirmed (M7) to ensure accountability. Because machines can hold access rights, they also could commit to work packages and participate in smart legal contracts. Page 17 of 31 5.9. M9 – Reputation tokens (for OP4b) The concept of reputation tokens for special rights or for credentials (Table 3, M9-1) presents an interesting approach to reward or punish IPD participants (M4-3). Instead of monetary incentives, reputation tokens based on stakeholder accountability could give access to extended governance functions (M5-2) or could be used for credentials in decentralized markets for later projects (M3-1). 5.10. M10 – Decentralized peer-review mechanisms (for OP4b) Decentralized peer-review for project progress, quality, and cost (Table 3, M10-1) can be implemented with blockchain. For example, the Covee protocol realized a smart contract based peer review mechanism to determine fair profit distribution for decentralized collaborative teams (Dietsch et al. 2018). Anonymous work contributors get rewarded with cryptocurreny according to their peer- review score. A combination of blockchain-signed work packages, reputation tokens, and decentralized peer-review mechanisms could create a digital “big room platform” to ensure presence and accountability within IPD, and to evaluate appropriate rewards (M4-3) and sanctions (M11-1). 5.11. M11 – Transparent and self-enforcing sanctions (for OP5) Graduated sanctions are often not explicitly implemented in IPDs (Hall and Bonanomi 2021). At most, the weekly public reporting of “Planned Percent Complete” (PPC) (Thomsen et al. 2009) acts as an early stage of social sanctioning (Kenig et al. 2010). In the case of continuous non-conformance or underperformance, the removal of individual participants and/or firms can be necessary (Cheng et al. 2016). Blockchain can be an opportunity to reimagine and improve upon graduated sanctioning for IPD projects through decentralized and self-enforcing token-based sanctioning (Table 3, M11-1), e.g. loss of access tokens, loss of reputation tokens, or decrease in value of monetary tokens. Underperformance is also visible to everyone leading to social sanctioning through transparent action (Table 3, M11-2). In many cases this might be enough to ensure accountability but could be gradually combined with loss of tokens e.g. for access to the financial project rewards or even the project itself. 5.12. M12 – Decentralized jurisdiction systems (for OP6) IPD projects craft conflict resolution mechanisms such as project decision protocols (Ashcraft 2011) or liability waivers (Sive and Hays 2009) that include clear dispute resolution strategies intended to avoid costly litigation proceedings. Blockchain enables smart contract based “mini-courts” for fast and transparent conflict resolution (Table 3, M12-1) in IPDs. An exemplary decentralized jurisdiction system is already implemented in the Aragon Court5 to resolve subjective disputes that cannot be resolved by smart contracts alone. A global network of guardians helps intervene and arbitrate disputes. Saygili et al. (2021) already propose a decentralized blockchain-based online dispute resolution platform to resolve construction disputes. To incentivize compliance and accountability in a decentralized jurisdiction , token-based dispute participation to ensure “skin in the game” (Table 3, M12-2) is suggested. In case of non- compliance with the rules or the verdict, tokens at stake can be sanctioned. 5.13. M13 – Ensure decisions are made by affected parties (for OP7) In IPD projects, project sponsors trade decision-making autonomy for consensus mechanisms among project team members (Hall and Bonanomi 2021). In other words, authority is given by the project owner to the project participants to self-organize and self-govern the project. Blockchain transparency 5 https://court.aragon.org/ , accessed 09.12.2021. Page 18 of 31 and censorship resistance enables smart contracts to ensure that powerful parties cannot solely enforce collective choice and conflict resolution (Table 3, M13-1) in IPDs (M5-2, M12-1, and M14-1). Ideally, decisions should be only possible to be made and challenged by actors that are also affected. 5.14. M14 – Coordination rules across nested enterprises (for OP8) Large IPD projects have multiple nested management levels, including senior management team for executive leadership, a cross-functional project management team to coordinate project management activities, and functional teams that handle the direct work execution and organization (Ashcraft 2011; Laurent and Leicht 2019). Therefore, it will be important that smart contracts coordinate decision making among organizational tiers (Table 3, M14-1). This is either according to existing nested management levels of IPD or for new forms of organization better suited for fast information propagation and reactions to local events enabled by blockchain-based project governance. 6. IPD on the Crypto Commons: An Overview of the Conceptualization Figure 2 summarizes the overall conceptualization, visualizing the OPs (Table 1), the 14 identified blockchain governance mechanisms (Table 2), and the 22 proposed applications for IPDs (Table 3). The interaction arrows indicate then graphically the described connections in Section 5 between the different IPD blockchain applications. The arrows are either outgoing, meaning they are a prerequisite or support other applications, or incoming, meaning they are supported or enabled by other applications. The width of the arrows and/or number of incoming connections can give an approximate indication of the importance of applications (outgoing) or prerequisites to build applications (incoming) within the overall conceptualization. Applications that stand out regarding important prerequisite for IPD on the crypto commons are: M1- 1 defining boundaries for the users through addresses and tokens, and M7-2 monitoring the presence of users and resources for fast system reaction and learning based on transparent record of automation and transactions. Applications that depend on many interactions of other applications in the system are in decreasing order of incoming connections: M4-3 for new incentive structures to influence the system participants towards collective action, M3-1 decentralized market structures to match project needs with local conditions, M5-2 for definition of voting rights to create intended power distributions, and M14-1 coordination among organizational tiers. It is likely that not all connections have been identified and the interactions need to be updated when more research investigates individual applications and/or the interaction between them. Page 19 of 31 Figure 2: Overview of the conceptualization of IPD on the crypto commons: the 12 blockchain governance mechanisms for the eight OPs as identified in Section 4, and the 22 identified applications for IPD and their interactions outlined in Section 5. 7. Discussion 7.1. Impact The novel proposition of this paper is to create blockchain-based governance structures for IPD construction projects using the OPs as design guidelines. Trusted digital processes together with cryptoeconomic incentive mechanisms can align stakeholders, both human and machine, to better collaborate towards the overall project success. We see two main scenarios for the application of blockchain-based governance mechanisms as introduced in this paper. Page 20 of 31 First, blockchain based governance could address tradeoffs of current relational contracting approaches to improve IPDs. Relational contracting is well-suited to deal with contractual hazards of “displaced agency” (Henisz et al. 2012) found in the fragmented (Fergusson and Teicholz 1996; Howard et al. 1989; Levitt and Sheffer 2011) and loosely coupled (Dubois and Gadde 2002a) construction project structures. However, relational contracts also comes at various costs (Henisz et al. 2012) that could be improved through blockchain-based governance mechanisms, e.g. reduced competition with scalable decentralized market structures, or lengthier processes for decision-making with decentralized decision-making platforms. Second, the introduced blockchain mechanisms could be used to build new forms of project delivery coordinated on the crypto commons. Construction projects can be characterized by complexity (Bertelsen 2003; Dubois and Gadde 2002a; Gidado 1996). Research suggests that bottom-up management and self-organization are better suited than hierarchical approaches to manage complexity (Bertelsen and Koskela 2004; Helbing and Lämmer 2008). The OPs introduce guidelines to achieve this for CPR scenarios. Since IPD can be described as a CPR scenario, blockchain governance mechanisms could improve IPD-like project deliveries by creating better bottom-up and self- organizing project structures, while still allowing for scalable coordination mechanisms. This is aligned with the emerging organizational form of a decentralized autonomous organization (DAO), which is a blockchain-based system that enables people to coordinate and govern themselves mediated by a set of self-executing rules deployed on a public blockchain, and whose governance is decentralized (Hassan and De Filippi 2021). Sreckovic and Windsperger (2020) already proposed the evolution of the construction industry organization towards DAOs. Lombardi et al. (2020b) and Dounas et al. (2020) even prototyped a DAO for decentralized coordination of the design finding process through smart contracts. Their research suggests that construction project governance as a DAO is at least in a prototyping context technically feasible. Other ongoing research explores how decision making of a self-owning house can be coordinated through a DAO (Hunhevicz et al. 2021). Emerging examples of DAO frameworks (Faqir-Rhazoui et al. 2021) resemble many of the identified governance mechanisms. The introduced research directions based on Ostrom’s design principles might help to design governance building blocks towards project delivery coordinated through DAOs. 7.2. Design Challenges Designing new blockchain based governance systems is challenging. Cila et al. (2020) identified six design challenges (see Table 4) that are further discussed below in the context of IPDs on the crypto commons. 7.2.1. Tracking While transparent monitoring is essential to manage commons, it could lead to privacy concerns regarding the community-based data (Cila et al. 2020). Especially in public blockchain systems, traditional data privacy solutions are hard or even impossible to implement. It needs to be carefully evaluated what data needs to be transparently stored to enable IPD governance, how construction stakeholders perceive implications of sharing this data, and potential measures to maintain a suited level of privacy without hindering the monitoring. 7.2.2. Coding A major challenge is decide, represent, and encode values in artificial commons (Cila et al. 2020). It tends to be easier to focus on economic and quantifiable values in a blockchain system (e.g. monetary values through market pricing mechanisms) than social and qualified values (e.g. reputation Page 21 of 31 mechanisms). However, in commons non-monetary values often play an important role (Fritsch et al. 2021). Also, in IPDs, both quantitative and informal systems are used. Future research should investigate value flows in IPD, as well as how to encode them into tokens and incentive systems without suppressing creativity and teamwork with too rigid and inflexible smart contract structures. Furthermore, incentives give people a sense of agency, yet at the same time they can have downsides of forced conformity with collectively set rules (Cila et al. 2020). At some point earning rewards might become a duty to not be excluded from the system and rewards cause efforts to shift towards the actions that will be rewarded, causing potentially unforeseen negative secondary effects (Cila et al. 2020). This needs to be subject of further study when designing project delivery mechanisms. Artificial commons needs to find a balance between so trading individual gains for the greater good of the community (Cila et al. 2020). IPDs have differences to natural commons that need to be considered. For example, resources in IPDs are consumed intentionally over time, whereas in natural commons they are renewable. Natural commons also have an infinite lifetime (if the community is able to sustain them), while IPDs only last for the duration of a project (although this could be several years). And the product is owned by the project sponsor, whereas natural commons are not owned by any of the involved parties. Overall, there is a need for more research to thoroughly understand current and new IPD mechanisms, how they contribute to the success of IPDs, and how they need to be set up in different project settings. Methods used to design and test such mechanisms should be able to reflect the complex nature of construction projects (Bertelsen 2003; Dubois and Gadde 2002a; Gidado 1996). Previous research used game theory for the evaluation of profit distribution (Teng et al. 2019) and target value design (Jung et al. 2012), agent based simulations to assess the evolution of collaboration (Son and Rojas 2011), or mechanism design to investigate new incentive structures (Han et al. 2019). 7.2.3. Negotiation The last dilemma concerns how to preserve human reasoning and debate in a system of formalized and algorithmic logic (Cila et al. 2020). Also for IPD, there are major risks involved in ex-ante designs of smart contract, where system engineers need to account from the beginning for all expected cases. Therefore, the governance system should be able to adjust over time to exceptions and design errors through community input. But even with such governance processes embedded, the process will likely only start after the first failure already happened. A stepwise and careful adaption with extensive testing of these systems will be desirable. Table 4: Design challenges for crypto commons (Based on the identified blockchain governance design challenges by Cila et al. (2020)). Design Challenge Type Description Transparency vs. Privacy Tracking Crypto Commons must be monitored, but transparent tracking could lead to privacy concerns. Economic vs. Social Values Quantified vs. Qualified Values Coding Values of the Crypto Commons must be encoded in a representative way. This can be especially challenging for social or qualified values. Incentivisation vs. Manipulation Coding Crypto Commons must encode incentives without causing unjustified manipulation and exclusion of stakeholders. Private vs. Collective Interests Coding Encoding rules for Crypto Commons must weigh individual gains of stakeholders against the greater good of the community. Human vs. Algorithmic Governance Negotiation Crypto commons must preserve human reasoning and debate in a system of formalized and algorithmic logic. Page 22 of 31 7.3. Challenges related to the construction industry context While technical and system design challenges towards a blockchain governed project delivery can be proactively addressed, there are many inherent construction industry barriers. Other scholars have already investigated barriers and socio-technical challenges for blockchain in the construction industry (Li et al. 2019). The provided frameworks likely apply also for the proposed system. Below we highlight some of the key challenges. The level of digitalization in the construction industry is still low (Agarwal et al. 2016; Barbosa et al. 2017). Blockchain-governed PDM require an extensive digital base-line of project related data. As long as this data is not available, the proposed mechanisms cannot make use of it to govern construction projects. Moreover, the fragmented construction industry structure poses major challenges in the adoption of systemic innovations (Hall et al. 2018), e.g. as in the case of BIM (Papadonikolaki 2018). Blockchain based governance for construction PDMs likely falls into the same category of systemic innovations, since value of the solution only comes at scale. At the same time, cryptoeconomic governance promises to reduce implications of fragmentation through incentives across phases and trades (Hunhevicz et al. 2022a). Nevertheless, it will be challenging to organically grow adoption. Finally, there are major legal implications with such new solutions. Research needs to investigate how smart contract code can conform with law and regulations (De Filippi and Hassan 2016). 7.4. Limitations For blockchain based governance processes, the underlying blockchain infrastructure is a key component to success. For simplicity, this paper only refers to blockchain, but there are many kinds of DLTs suitable for different types of use cases. The choice of the right type is not part of this work, but should be considered once a use case will be implemented (Hunhevicz and Hall 2020). Many parameters such as security, throughput, privacy, approaches to smart contracts, and others need to be assessed. The still early technological state and the many different available solutions (Ballandies et al. 2021; Spychiger et al. 2021b) make this challenging. The paper assesses blockchain for CPR and IPD based on the assumption of public permissionless blockchains, since they align with the promise to govern decentralized economic coordination. When using other DLT options, the affected properties need to be adjusted. Future research should assess suited technical infrastructure to realize the proposed blockchain governance mechanisms in an IPD context. Furthermore, the paper acts only as a starting point to conceptualize the connections between blockchain, CPR theory, and IPD. As a next step, further research is needed to validate the conceptualization. This includes validation of both the individual mechanisms and applications as well as their interaction. The contribution of this paper is limited as a proposed conceptualization, meant to underpin future research efforts that can validate and extend the conceptualization. 8. Conclusion The paper extends the thinking around blockchain as an institutional innovation for the delivery of construction projects. It exploits the theoretical connection between both blockchain and IPDs as a CPR scenario to offer a systematic starting point how blockchain can support and evolve PDMs by creating novel governance mechanisms. For that the paper introduces a conceptualization of blockchain-based governance applications for IPDs on the crypto commons. Twenty-two applications for IPD were identified based on fourteen mechanisms of blockchain for the governance of CPR scenarios proposed to encode the eight OPs. The conceptualization is useful to think more structured and modular about blockchain building blocks to Page 23 of 31 govern construction projects collectively on the “crypto commons”. Furthermore, the conceptualization can support the thinking around how blockchain could improve current IPD concepts, potentially lead to the next generation of PDMs, or ultimately end in novel project coordination through DAOs. On the one hand, blockchain-based governance mechanisms promise to facilitate trusted, scalable and efficient bottom-up coordination mechanisms that cope with complexity and displaced agency in construction projects. On the other hand, blockchain-based project delivery offers exciting new opportunities for machine participation. Even though the paper introduced a coherent conceptualization for blockchain-based governance of PDMs, it requires further validation through proof of concepts investigating the feasibility of individual and combined mechanisms. For that the paper discusses challenges related to the early state of blockchain technology, the difficulties in designing blockchain-based governance systems, and the industry-related challenges to overcome. The paper primarily targets the construction industry, but the identified blockchain governance mechanisms and applications could eventually be transferred to other cases of real-world commons. 9. Funding This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. 10. References Agarwal, R., Chandrasekaran, S., and Sridhar, M. (2016). Imagining construction’s digital future . McKinsey & Company. Ahmadisheykhsarmast, S., and Sonmez, R. (2020). “A smart contract system for security of payment of construction contracts.” Automation in Construction , Elsevier, 120(October 2019), 103401. Asgaonkar, A., and Krishnamachari, B. (2018). “Token Curated Registries - A Game Theoretic Approach.” Ashcraft, H. W. J. (2011). “Negotiating an Integrated Project Delivery Agreement.” The Construction Lawyer, 31(3), 17-34,49-50. Balasanov, S. (2018). “Bonding Curves In Depth : Intuition & Parametrization.” <https://blog.relevant.community/bonding-curves-in-depth-intuition-parametrization- d3905a681e0a>. Ballandies, M. C., Dapp, M. M., and Pournaras, E. (2021). “Decrypting distributed ledger design— taxonomy, classification and blockchain community evaluation.” Cluster Computing , Springer, 1– 22. Barbosa, F., Woetzel, J., Mischke, J., Ribeirinho, M. J., Sridhar, M., Parsons, M., Bertram, N., and Brown, S. (2017). “Reinventing Construction: A route to higher productivity.” McKinsey & Company . Beck, R., Müller-Bloch, C., and King, J. L. (2018). “Governance in the blockchain economy: A framework and research agenda.” Journal of the Association for Information Systems , 19(10), 1020–1034. Bertelsen, S. (2003). “Complexity - A new way of Understanding Construction.” Proceedings of the Thirteen Annual Conference of the International Group for Lean Construction, IGLC-13 , 1–13. Bertelsen, S., and Koskela, L. (2004). “Construction beyond lean: a new understanding of construction management.” … the International Group for Lean Construction , 1–11. Bollier, D. (2015). “The Blockchain: A Promising New Infrastructure for Online Commons.” <http://www.bollier.org/blog/blockchain-promising-new-infrastructure-online-commons> (Sep. 22, 2020). Bonanomi, M., Fischer, S., and Hall, D. M. (2019). “Identifying Project Management Practices for the Page 24 of 31 Multi-Party Construction Commons.” 17th Annual Engineering Porject Organization Conference (EPOC), Vail, CO. Bonanomi, M. M., Hall, D. M., and Staub-french, S. (2020). “Governing Integrated Project Delivery as a Common Pool Resource Scenario: What Management Practices and Impact on Project Participants?” 18th Annual Engineering Project Organization Conference (EPOC) . Buterin, V. (2014). “Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform.” White Paper , <https://github.com/ethereum/wiki/wiki/White-Paper> (Aug. 27, 2018). Buterin, V. (2016). “On Coin-lock voting, Futarchy and Optimal Decentralized Governance : Ethereum.” <https://www.reddit.com/r/ethereum/comments/4rtpmm/on_coinlock_voting_futarchy_and_ optimal/> (Mar. 10, 2020). Bygballe, L. E., Dewulf, G., and Levitt, R. E. (2015). “The interplay between formal and informal contracting in integrated project delivery.” Engineering Project Organization Journal , 5(1), 22– 35. Catalini, C., and Gans, J. S. (2020). “Some simple economics of the blockchain.” Communications of the ACM, Association for Computing Machinery. Cheng, R., Allison, M., Sturts-Dossick, C., Monson, C., Staub-French, S., and Poirier, E. (2016). Motivation and Means: How and Why IPD and Lean Lead to Success . University of Minnesota; University of Washington; University of British Columbia; Scan Consulting. Chong, H.-Y. Y., and Diamantopoulos, A. (2020). “Integrating advanced technologies to uphold security of payment: Data flow diagram.” Automation in Construction , Elsevier B.V., 114, 103158. Cila, N., Ferri, G., de Waal, M., Gloerich, I., and Karpinski, T. (2020). “The Blockchain and the Commons: Dilemmas in the Design of Local Platforms.” Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems , ACM, New York, NY, USA, 1–14. Cox, M., Arnold, G., and Villamayor Tomás, S. (2010). “A Review of Design Principles for Community- based Natural Resource Management.” Ecology and Society , 15(4), art38. Crypto Commons Association. (2021). “Crypto Commons.” <https://www.crypto-commons.org/> (Jan. 12, 2022). Dao, D. (2018). “Decentralized Sustainability.” <https://medium.com/@daviddao/decentralized- sustainability-9a53223d3001>. Dapp, M. M. (2019). “Toward a Sustainable Circular Economy Powered by Community-Based Incentive Systems.” Business Transformation through Blockchain , H. Treiblmaier and R. Beck, eds., Springer International Publishing, Cham, 153–181. Darrington, J. W. J., and Lichtig, W. A. W. (2010). “Rethinking the G in GMP: Why Estimated Maximum Price Contracts Make Sense on Collaborative Projects.” The Construction Lawyer , 30(2), 1–12. Das, M., Luo, H., and Cheng, J. C. P. (2020). “Securing interim payments in construction projects through a blockchain-based framework.” Automation in Construction , Elsevier, 118(May), 103284. Davidson, S., De Filippi, P., and Potts, J. (2018). “Blockchains and the economic institutions of capitalism.” Journal of Institutional Economics , 14(4), 639–658. Davies, A., MacAulay, S. C., and Brady, T. (2019). “Delivery Model Innovation: Insights From Infrastructure Projects.” Project Management Journal , SAGE PublicationsSage CA: Los Angeles, CA, 50(2), 119–127. Decoodt, K. (2019). “The Commons Stack: Scaling the Commons to Re-Prioritize People and the Planet.” <https://medium.com/giveth/the-commons-stack-scaling-the-commons-to-re- prioritize-people-and-the-planet-fdc076aec4eb> (Mar. 3, 2020). Page 25 of 31 Dietsch, M., Krause, J., Nax, H. H., Omeru, J., Schoettler, R., and Seuken, S. (2018). “Covee Protocol.” White Paper , <https://covee.network/assets/covee-whitepaper.pdf> (Aug. 8, 2019). Dounas, T., Lombardi, D., and Jabi, W. (2020). “Framework for decentralised architectural design BIM and Blockchain integration.” International Journal of Architectural Computing . Dubois, A., and Gadde, L.-E. (2002a). “The construction industry as a loosely coupled system: implications for productivity and innovation.” Construction Management and Economics , Taylor & Francis Group, 20(7), 621–631. Dubois, A., and Gadde, L. E. (2002b). “Systematic combining: An abductive approach to case research.” Journal of Business Research , Elsevier, 55(7), 553–560. Elghaish, F., Abrishami, S., and Hosseini, M. R. (2020). “Integrated project delivery with blockchain: An automated financial system.” Automation in Construction , Elsevier, 114(November 2019), 103182. Emmett, J. (2019a). “Automating Ostrom for Effective DAO Management.” <https://medium.com/commonsstack/automating-ostrom-for-effective-dao-management- cfe7a7aea138> (Mar. 3, 2020). Emmett, J. (2019b). “Conviction Voting: A Novel Continuous Decision Making Alternative to Governance.” <https://medium.com/commonsstack/conviction-voting-a-novel-continuous- decision-making-alternative-to-governance-62e215ad2b3d>. Erri Pradeep, A. S., Yiu, T. W., Zou, Y., and Amor, R. (2021). “Blockchain-aided information exchange records for design liability control and improved security.” Automation in Construction , Elsevier B.V., 126, 103667. Faqir-Rhazoui, Y., Arroyo, J., and Hassan, S. (2021). “A comparative analysis of the platforms for decentralized autonomous organizations in the Ethereum blockchain.” Journal of Internet Services and Applications , Springer Science and Business Media Deutschland GmbH, 12(1), 9. Favre, T. (2019). “Continuous Organizations.” <https://github.com/c-org/whitepaper>. Fergusson, K. J., and Teicholz, P. M. (1996). “Achieving Industrial Facility Quality: Integration Is Key.” Journal of Management in Engineering , 12, 49–56. De Filippi, P., and Hassan, S. (2016). “Blockchain technology as a regulatory technology: From code is law to law is code.” First Monday , 21(12). Fritsch, F., Emmett, J., Friedman, E., Kranjc, R., Manski, S., Zargham, M., and Bauwens, M. (2021). “Challenges and Approaches to Scaling the Global Commons.” Frontiers in Blockchain , 4(April), 1–16. Gardner, R., Ostrom, E., Walker, J. M., and Wilson, D. B. (1990). “The nature of common-pool resource problems.” Rationality and Society , Sage Publications, 2(3), 335–358. Gervais, A., Karame, G. O., Wüst, K., Glykantzis, V., Ritzdorf, H., and Capkun, S. (2016). “On the Security and Performance of Proof of Work Blockchains.” Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security , ACM, New York, NY, USA, 3–16. Gidado, K. I. (1996). “Project complexity: The focal point of construction production planning.” Construction Management and Economics , Taylor & Francis Group, 14(3), 213–225. Di Giuda, G. M., Giana, P. E., and Pattini, G. (2020). “The Shortening and the Automation of Payments: The Potentiality of Smart Contract in the AECO Sector.” Proceedings of International Structural Engineering and Construction , ISEC Press, 7(2). Hall, D. M., Algiers, A., and Levitt, R. E. (2018). “Identifying the Role of Supply Chain Integration Practices in the Adoption of Systemic Innovations.” Journal of Management in Engineering , 34(6), 04018030. Hall, D. M., and Bonanomi, M. M. (2021). “Governing Collaborative Project Delivery as a Common- Page 26 of 31 Pool Resource Scenario.” Project Management Journal . Hall, D. M., and Scott, W. R. (2019). “Early Stages in the Institutionalization of Integrated Project Delivery.” Project Management Journal , 50(2), 875697281881991. Hamledari, H., and Fischer, M. (2021a). “Role of Blockchain-Enabled Smart Contracts in Automating Construction Progress Payments.” Journal of Legal Affairs and Dispute Resolution in Engineering and Construction , 13(1), 04520038. Hamledari, H., and Fischer, M. (2021b). “The application of blockchain-based crypto assets for integrating the physical and financial supply chains in the construction & engineering industry.” Automation in Construction , Elsevier B.V., 127, 103711. Han, J., Rapoport, A., and Fong, P. S. W. (2019). “Incentive structures in multi-partner project teams.” Engineering, Construction and Architectural Management , Emerald Group Publishing Ltd., 27(1), 49–65. Hanson, R. (2013). “Shall we vote on values, but bet on beliefs?” Journal of Political Philosophy , 21(2), 151–178. Hardin, G. (1968). “The Tragedy of the Commons.” Science, 162(3859), 1243–1248. Hassan, S., and De Filippi, P. (2021). “Decentralized Autonomous Organization.” Internet Policy Review , 10(2). Helbing, D., and Lämmer, S. (2008). “Managing complexity: An introduction.” Understanding Complex Systems, 2008, 1–16. Henisz, W. J., Levitt, R. E., and Scott, W. R. (2012). “Toward a unified theory of project governance: economic, sociological and psychological supports for relational contracting.” Engineering Project Organization Journal , 2(January 2015), 37–55. Hewavitharana, T., Nanayakkara, S., and Perera, S. (2019). “Blockchain as a project management platform.” DOI, 137–146. Howard, H. C., Levitt, R. E., Paulson, B. C., Pohl, J. G., and Tatum, C. B. (1989). “Computer Integration: Reducing Fragmentation in AEC Industry.” Journal of Computing in Civil Engineering , 3(1), 18–32. Hunhevicz, J., Dounas, T., and Hall, D. M. (2022a). “The Promise of Blockchain for the Construction Industry: A Governance Lens.” Blockchain in Construction , Springer. Hunhevicz, J. J., and Hall, D. M. (2020). “Do you need a blockchain in construction? Use case categories and decision framework for DLT design options.” Advanced Engineering Informatics , Elsevier, 45(February), 101094. Hunhevicz, J. J., Motie, M., and Hall, D. M. (2022b). “Digital building twins and blockchain for performance-based (smart) contracts.” Automation in Construction , Elsevier, 133, 103981. Hunhevicz, J. J., Schraner, T., and Hall, D. M. (2020). “Incentivizing High-Quality Data Sets in Construction Using Blockchain: A Feasibility Study in the Swiss Industry.” Proceedings of the 37th International Symposium on Automation and Robotics in Construction (ISARC) , “Furuya Hiroshi” “Tateyama Kazuyoshi” “Osumi Hisashi,” ed., International Association for Automation and Robotics in Construction (IAARC), Japan (Online), 1291–1298. Hunhevicz, J. J., Wang, H., Hess, L., and Hall, D. M. (2021). “no1s1 - a blockchain-based DAO prototype for autonomous space.” Proceedings of the 2021 European Conference on Computing in Construction , University College Dublin, 27–33. Jacobo-Romero, M., and Freitas, A. (2021). “Microeconomic foundations of decentralised organisations.” Proceedings of the ACM Symposium on Applied Computing , Association for Computing Machinery, New York, NY, USA, 282–290. Jung, W., Ballard, G., Kim, Y.-W., and Han, S. H. (2012). “Understanding of Target Value Design for Integrated Project Delivery with the Context of Game Theory.” Construction Research Congress Page 27 of 31 2012, American Society of Civil Engineers, Reston, VA, 556–563. Kenig, M., Allison, M., Black, B., Burdi, L., Colella, C., Davis, H., and Williams, M. (2010). Integrated Project Delivery for Public and Private Owners . National Association of State Facilities Administrators, Construction Owners Association of America, The Association of Higher Education Facilities Officers, Associated General Contractors of America and The American Institute of Architects. Kifokeris, D., and Koch, C. (2020). “A conceptual digital business model for construction logistics consultants, featuring a sociomaterial blockchain solution for integrated economic, material and information flows.” Journal of Information Technology in Construction , International Council for Research and Innovation in Building and Construction, 25(29), 500–521. Kim, K., Lee, G., and Kim, S. (2020). “A Study on the Application of Blockchain Technology in the Construction Industry.” KSCE Journal of Civil Engineering , Springer Verlag, 24(9), 2561–2571. Kovács, G., and Spens, K. M. (2005). “Abductive reasoning in logistics research.” International Journal of Physical Distribution and Logistics Management , Emerald Group Publishing Limited. de la Rouviere, S. (2018). “Saving The Planet: Making It Profitable To Protect The Commons.” <https://medium.com/@simondlr/saving-the-planet-making-it-profitable-to-protect-the- commons-50393906fe22>. Lahdenperä, P. (2012). “Making sense of the multi-party contractual arrangements of project partnering, project alliancing and integrated project delivery.” Construction Management and Economics , 30(1), 57–79. Laurent, J., and Leicht, R. M. (2019). “Practices for Designing Cross-Functional Teams for Integrated Project Delivery.” Journal of Construction Engineering and Management , 145(3), 05019001. Lee, D., Lee, S. H., Masoud, N., Krishnan, M. S., and Li, V. C. (2021). “Integrated digital twin and blockchain framework to support accountable information sharing in construction projects.” Automation in Construction , Elsevier, 127, 103688. Levitt, R. E. (2011). “Towards project management 2.0.” Engineering Project Organization Journal , Engineering Project Organization Society, 1(3), 197–210. Levitt, R. E., and Sheffer, D. A. (2011). “Innovation in Modular Industries: Implementing Energy- Efficient Innovations in {US} Buildings1.” Proceedings of Conference on Energy, Organizations and Society, UC Davis , 1–29. Li, J., Greenwood, D., and Kassem, M. (2019). “Blockchain in the built environment and construction industry: A systematic review, conceptual models and practical use cases.” Automation in Construction , Elsevier, 102, 288–307. Li, J., and Kassem, M. (2021). “Applications of distributed ledger technology (DLT) and Blockchain- enabled smart contracts in construction.” Automation in Construction , Elsevier B.V. Li, X., Wu, L., Zhao, R., Lu, W., and Xue, F. (2021). “Two-layer Adaptive Blockchain-based Supervision model for off-site modular housing production.” Computers in Industry , Elsevier B.V., 128, 103437. Lombardi, D., Dounas, T., Cheung, L. H., and Jabi, W. (2020a). “Blockchain Grammars for Validating the Design Process.” Blucher Design Proceedings , Editora Blucher, São Paulo, 406–411. Lombardi, D., Dounas, T., Cheung, L. H., and Jabi, W. (2020b). “Blockchain Grammars for Validating the Design Process.” Blucher Design Proceedings , Editora Blucher, São Paulo, 406–411. Luo, L., He, Q., Jaselskis, E. J., and Xie, J. (2017). “Construction Project Complexity: Research Trends and Implications.” Journal of Construction Engineering and Management , American Society of Civil Engineers (ASCE), 143(7), 04017019. Machart, F., and Samadi, J. (2020). The state of blockchain governance . Page 28 of 31 Maciel, A., and Garbutt, L. (2020). “The emergence of BIM SLCs.” <https://aecmag.com/comment- mainmenu-36/1951-the-emergence-of-bim-slcs>. Maples, M. J. (2018). “Crypto Commons.” <https://blog.usejournal.com/crypto-commons- da602fb98138>. Mason, J. (2017). “Intelligent Contracts and the Construction Industry.” Journal of Legal Affairs and Dispute Resolution in Engineering and Construction , 9(3), 04517012. Mathews, M., Robles, D., and Bowe, B. (2017). “BIM+Blockchain: A Solution to the Trust Problem in Collaboration?” CITA BIM Gathering . McNamara, A. J., and Sepasgozar, S. M. E. (2020). “Developing a theoretical framework for intelligent contract acceptance.” Construction Innovation , Emerald Group Publishing Ltd., 20(3), 421–445. McNamara, A. J., and Sepasgozar, S. M. E. (2021). “Intelligent contract adoption in the construction industry: Concept development.” Automation in Construction , Elsevier B.V., 122, 103452. Miscione, G., Goerke, T., Klein, S., Schwabe, G., and Ziolkowski, R. (2019). “Hanseatic Governance: Understanding Blockchain as Organizational Technology.” Mougayar, W. (2017). “Tokenomics — A Business Guide to Token Usage, Utility and Value.” <https://medium.com/@wmougayar/tokenomics-a-business-guide-to-token-usage-utility-and- value-b19242053416>. Nakamoto, S. (2008). “Bitcoin: A Peer-to-Peer Electronic Cash System.” www.bitcoin.org . Nanayakkara, S., Perera, S., Senaratne, S., Weerasuriya, G. T., and Bandara, H. M. N. D. (2021). “Blockchain and Smart Contracts: A Solution for Payment Issues in Construction Supply Chains.” Informatics , MDPI AG, 8(2), 36. Nawari, N. O., and Ravindran, S. (2019a). “Blockchain and the built environment: Potentials and limitations.” Journal of Building Engineering , Elsevier, 25, 100832. Nawari, N. O., and Ravindran, S. (2019b). “Blockchain and the built environment: Potentials and limitations.” Journal of Building Engineering , Elsevier, 25, 100832. O’Reilly, A., and Mathews, M. (2019). “Incentivising Multidisciplinary Teams with New Methods of Procurement using BIM + Blockchain.” CITA BIM Gathering 2019 . Ostrom, E. (1990). Governing the commons: The evolution of institutions for collective action . Cambridge university press. Ostrom, E. (2010). “Beyond Markets and States: Polycentric Governance of Complex Economic Systems.” American Economic Review , 100(3), 641–672. Ostrom, E. (2015a). Governing the Commons . Canto Classics , Cambridge University Press, Cambridge. Ostrom, E. (2015b). Governing the Commons . Canto Classics , Cambridge University Press, Cambridge. Ostrom, E., Burger, J., Field, C. B., Norgaard, R. B., and Policansky, D. (1999). “Revisiting the commons: Local lessons, global challenges.” Science, American Association for the Advancement of Science. Ostrom, E., Gardner, R., Walker, J., Walker, J., and Walker, J. (1994). Rules, games, and common-pool resources . University of Michigan Press. Papadonikolaki, E. (2018). “Loosely Coupled Systems of Innovation: Aligning BIM Adoption with Implementation in Dutch Construction.” Journal of Management in Engineering , American Society of Civil Engineers, 34(6), 05018009. Pazaitis, A., De Filippi, P., and Kostakis, V. (2017). “Blockchain and value systems in the sharing economy: The illustrative case of Backfeed.” Technological Forecasting and Social Change , Elsevier, 125(June), 105–115. Perera, S., Nanayakkara, S., Rodrigo, M. N. N., Senaratne, S., and Weinand, R. (2020). “Blockchain Page 29 of 31 technology: Is it hype or real in the construction industry?” Journal of Industrial Information Integration , Elsevier, 17(August 2019), 100125. Perlberg, B. M. (2009). “Contracting for Integrated Project Delivery: ConsensusDOCS.” The 48th Annual Meeting of Invited Attorneys, Victor O. Schinnerer &. Company, Inc. Qian, X. (Alice), and Papadonikolaki, E. (2020). “Shifting trust in construction supply chains through blockchain technology.” Engineering, Construction and Architectural Management , ahead-of- p(ahead-of-print). Rahimian, F. P., Goulding, J. S., Abrishami, S., Seyedzadeh, S., and Elghaish, F. (2021). “Blockchain integrated project delivery.” Industry 4.0 Solutions for Building Design and Construction , Routledge, London, 381–409. Red, R. (2019). Peer Production on the Crypto Commons . Rozas, D., Tenorio-Fornés, A., Díaz-Molina, S., and Hassan, S. (2021a). “When Ostrom Meets Blockchain: Exploring the Potentials of Blockchain for Commons Governance.” SAGE Open , SAGE Publications Inc., 11(1), 215824402110025. Rozas, D., Tenorio-Fornés, A., and Hassan, S. (2021b). “Analysis of the Potentials of Blockchain for the Governance of Global Digital Commons.” Frontiers in Blockchain , Frontiers Media SA, 4, 15. Saygili, M., Mert, I. E., and Tokdemir, O. B. (2021). “A decentralized structure to reduce and resolve construction disputes in a hybrid blockchain network.” Automation in Construction , Elsevier, 104056. Schadeck, W. X. (2019). “8 Nobel-Prize Winning Rules for Governance Design.” <https://medium.com/@wen_xs/crypto-manifesto-682df071d2>. Schmidt, C. G., and Wagner, S. M. (2019). “Blockchain and supply chain relations: A transaction cost theory perspective.” Journal of Purchasing and Supply Management , Elsevier Ltd, 25(4), 100552. Scott, D. J., Broyd, T., and Ma, L. (2021). “Exploratory literature review of blockchain in the construction industry.” Automation in Construction , Elsevier, 132, 103914. Shackelford, S., and Myers, S. (2016). “Block-by-Block: Leveraging the Power of Blockchain Technology to Build Trust and Promote Cyber Peace.” SSRN Electronic Journal , 334, 334–388. Sheng, D., Ding, L., Zhong, B., Love, P. E. D., Luo, H., and Chen, J. (2020). “Construction quality information management with blockchains.” Automation in Construction , Elsevier B.V., 120, 103373. Shojaei, A., Flood, I., Moud, H. I., Hatami, M., and Zhang, X. (2020). “An Implementation of Smart Contracts by Integrating BIM and Blockchain.” Springer, Cham, 519–527. Singh, V. (2019). “Digitalization, BIM ecosystem, and the future of built environment.” Engineering, Construction and Architectural Management , Emerald Publishing Limited, ahead-of-p(ahead-of- print), ECAM-01-2018-0004. Sive, T., and Hays, M. (2009). “Integrated Project Delivery : Reality and Promise A Strategist’s Guide to Understanding and Marketing IPD.” Marketing Research , (800), 1–34. Son, J., and Rojas, E. M. (2011). “Evolution of Collaboration in Temporary Project Teams: An Agent- Based Modeling and Simulation Approach.” Journal of Construction Engineering and Management , 137(8), 619–628. Sonmez, R., Sönmez, F. Ö., and Ahmadisheykhsarmast, S. (2021). “Blockchain in project management: a systematic review of use cases and a design decision framework.” Journal of Ambient Intelligence and Humanized Computing , Springer, 1, 3. Spychiger, F., Tasca, P., and Tessone, C. J. (2021a). “Unveiling the Importance and Evolution of Design Components Through the ‘Tree of Blockchain.’” Frontiers in Blockchain , Frontiers Media SA, 3, 613476. Page 30 of 31 Spychiger, F., Tasca, P., and Tessone, C. J. (2021b). “Unveiling the Importance and Evolution of Design Components Through the ‘Tree of Blockchain.’” Frontiers in Blockchain , Frontiers Media SA, 3, 613476. Sreckovic, M., and Windsperger, J. (2020). “Decentralized Autonomous Organizations and Network Design in AEC: A Conceptual Framework.” SSRN Electronic Journal , Elsevier BV. Stern, P. C. (2011). “Design principles for global commons: Natural resources and emerging technologies.” International Journal of the Commons , Igitur, Utrecht Publishing and Archiving Services, 5(2), 213–232. Tasca, P., and Tessone, C. J. (2019). “A Taxonomy of Blockchain Technologies: Principles of Identification and Classification.” Ledger, University Library System, University of Pittsburgh, 4. Teng, Y., Li, X., Wu, P., and Wang, X. (2019). “Using cooperative game theory to determine profit distribution in IPD projects.” International Journal of Construction Management , Taylor & Francis, 19(1), 32–45. Tezel, A., Febrero, P., Papadonikolaki, E., and Yitmen, I. (2021). “Insights into Blockchain Implementation in Construction: Models for Supply Chain Management.” Journal of Management in Engineering , American Society of Civil Engineers (ASCE), 37(4), (ASCE)ME.1943- 5479.0000939. Thomsen, C., Darrington, J., Dunne, D., and Lichtig, W. (2009). Managing Integrated Project Delivery . Construction Management Association of America, McLean, Virginia, USA. Tian, Y., Lu, Z., Adriaens, P., Minchin, R. E., Caithness, A., and Woo, J. (2020). “Finance infrastructure through blockchain-based tokenization.” Frontiers of Engineering Management , Springer Science and Business Media LLC, 7(4), 485–499. Tillmann, P., Berghede, K., Ballard, G., and Tommelein, I. D. (2014). “Developing a Production System on IPD: Considerations for a Pluralistic Environment.” Timmermans, S., and Tavory, I. (2012). “Theory Construction in Qualitative Research.” Sociological Theory, SAGE PublicationsSage CA: Los Angeles, CA, 30(3), 167–186. Titcomb, A. (2019). “Deep Dive: Augmented Bonding Curves.” <https://medium.com/giveth/deep- dive-augmented-bonding-curves-3f1f7c1fa751>. Voshmgir, B. S., and Zargham, M. (2019). “Foundations of Cryptoeconomic Systems.” 1–18. Wang, J., Wu, P., Wang, X., and Shou, W. (2017). “The outlook of blockchain technology for construction engineering management.” Frontiers of Engineering Management , Editorial Department of Engineering Sciences, 4(1), 67. Wang, Y. L., and Krishnamachari, B. (2019). “Enhancing Engagement in Token-Curated Registries via an Inflationary Mechanism.” ICBC 2019 - IEEE International Conference on Blockchain and Cryptocurrency , Institute of Electrical and Electronics Engineers Inc., 188–191. Wang, Z., Wang, T., Hu, H., Gong, J., Ren, X., and Xiao, Q. (2020). “Blockchain-based framework for improving supply chain traceability and information sharing in precast construction.” Automation in Construction , Elsevier B.V., 111, 103063. Watson, R., Kassem, M., and Li, J. (2019). “Traceability for Built Assets: Proposed Framework for a Digital Record.” Werbach, K. (2020). “The Siren Song: Algorithmic Governance by Blockchain.” After the Digital Tornado: Networks, Algorithms, Humanity , c(2016). Weyl, E. G., and Lalley, S. P. (2017). “Quadratic Voting.” Social Science Research Network , (December), 1–5. Whyte, J. (2019). “How Digital Information Transforms Project Delivery Models.” Project Management Journal, SAGE Publications Inc., 50(2), 177–194. Page 31 of 31 Wu, H., Zhong, B., Li, H., Guo, J., and Wang, Y. (2021). “On-Site Construction Quality Inspection Using Blockchain and Smart Contracts.” Journal of Management in Engineering , American Society of Civil Engineers (ASCE), 37(6), 04021065. Ye, X., and König, M. (2021). “Framework for Automated Billing in the Construction Industry Using BIM and Smart Contracts.” Lecture Notes in Civil Engineering , 98(January), 824–838. Zargham, M., Shorish, J., and Paruch, K. (2020). “From Curved Bonding to Configuration Spaces.” 1–3.
{ "id": "2207.07002" }
2212.01194
Inheritance and Blockchain: Thoughts and Open Questions
Inheritance is the fundamental building block of civilization. This is the addition of wealth, knowledge and properties over time that produce the society in which we are living. Every generation does not have to start from zero and can capitalize on the efforts of previous generations. Blockchain based assets are very efficiently and securely transferred between living entities. Yet the actual way to make heirs inherit crypto-assets is seldom discussed. It appears that the problems linked with the inheritance of crypto-assets raise a lot of technical, societal and legal issues. Part of those issues have to be tackled with at the level of the blockchain infrastructure itself. The aim of this paper is to open a research field, and to discuss some ideas, with regards to this overlooked issue. Inheritance is neither a peripheral question nor one that can be dodged. It comes with its own set of challenges that have to be met if blockchain based finance, and asset management, is to be taken seriously.
http://arxiv.org/pdf/2212.01194v1
Frédéric Prost
cs.CR, K.4.2; K.5.m
cs.CR
arXiv:2212.01194v1 [cs.CR] 28 Nov 2022Inheritance and Blockchain: Thoughts and Open Questions Fr´ ed´ eric Prost LIG - CNRS and Univ. Grenoble Alpes, Grenoble, France frederic.prost@univ-grenoble-alpes.fr December 5, 2022 Abstract Inheritance is the fundamental building block of civilizat ion. This is the addition of wealth, knowledge and properties over time t hat produce the society in which we are living. Every generation does not have to start from zero and can capitalize on the efforts of previous g enerations. Blockchain based assets are very efficiently and securely tra nsferred be- tween living entities. Yet the actual way to make heirs inher it crypto- assets is seldom discussed. It appears that the problems lin ked with the inheritance of crypto-assets raise a lot of technical, soci etal and legal is- sues. Part of those issues have to be tackled with at the level of the blockchain infrastructure itself. The aim of this paper is t o open a re- search field, and to discuss some ideas, with regards to this o verlooked issue. Inheritance is neither a peripheral question nor one that can be dodged. It comes with its own set of challenges that have to be met if blockchain based finance, and asset management, is to be take n seriously. 1 Introduction Crypto-currencies, starting with Bitcoin [Nak09], have shaken the world of fi- nance in less than a decade. It has moved from a pipe dream concept to an every day tangible reality in the meantime. At the time of writing the glo bal market capitalization of emitted bitcoins is around 10% of the global m arket capitalization of gold. There are many discussions on the nature of m oney, and assessing the relative merits of Bitcoin versus gold as a store of valu e is still an ongoing discussion. Among the mandatory properties that a store of value must have, the prop- erty of being inheritable is a major one. Over a sufficiently long period t he survival rate of everyone drops to zero. Transmitting wealth to t he future gen- erations is neither a peripheral issue, nor one that can be dodged. The body of laws, stories and traditions about inheritance is immense. In fundam ental texts like the Bible [Bib] or the Odyssey [Hom], the question of who inherits wha t 1 from whom, and more generally all kinds of problems linked with succes sion, are major preoccupations. The issue of inheritance is orthogonal to the actual implementation of the store of value. Society, in a very broad sense, is the tool tradition ally used to transfer titles, assets, and to settle questions like: ”Who is the ne w King?”. Re- garding material wealth, objects do not disappear when their owne r dies. These remarks no longer hold with crypto-assets. Indeed, one fundame ntal feature of the crypto-assets is that it is only with the knowledge of the appr opriate keys that the assets can be transferred. The actual ownership of crypto-assets amounts to the knowledge of the keys and vice-versa: everyone t hat knows the keys is deemed to be a rightful owner of the associated crypto -assets. But by definition, and under these circumstances, one cannot actually implements his/herown succession because either the knowledgeof the keysd isappears with their death or the ownership of those crypto-assetshas to be sh ared with a third party. It appears that we are finding ourselves painted into a corn er: on one hand a crypto-asset should only be transferred by its legitimate ow ner; and on the other hand, the owner cannot transfer anything once dea d, making the succession of crypto-assets seemingly impossible. In this paper we discuss various challenges and ideas linked with the inh er- itance of crypto-assets from a computer science point of view. Th e idea of the discussion is to think about what desirable properties should be looke d for, in the original spirit of crypto-currencies, inheritance of crypto-a ssets. Indeed, the easiest way to ”solve” the inheritance problem would be to write the k eys into the wills. This solution is going to be discussed further later in the pape r in section 2.1. But clearly, it is not in the spirit of crypto-currencies be cause it relies on a third party. It clashes with the fundamental idea of cryp to-currencies which is to be able to establish trust without having to rely on third par ties. In section 2, basic issues linked with the issue of crypto-asset inher itance are discussed. Problems are addressed in a colloquial way and prese nted by increasing level of complexity. In section 3 is done a state of the art review. Future themes for research and reflection are pointed out in sect ion 4. We finally conclude in section 5 2 Informal discussion on theinheritance of crypto- assets 2.1 Delving into the complexity Let’s examine some issues, as well as some workarounds, raised by t he issue of the inheritance of crypto-assets step by step. In this section we explore this question from a naive point of view in order to give an intuitive idea of th e landscape. In this section we focus on intuitive understanding of th e issues, a more technical/disciplinary point of view approach is considered in sec tion 4. A one liner frame of the question to be addressed goes something like this: 2 How can my eight years old daughter inherits my crypto-asset s? Thisisastartingpoint, therearemanymoresubtlersub-problems. Actually, themoretheproblemofinheritanceisconsideredseriously, themor eitsinherent complexities appear. Let’s examine a sample of those issues, togeth er with some tentative solutions, by increased level of sophistication. 1. The first idea to solve the basic ”eight years old daughter inherita nce” problem is: (a) To set up a meeting with a lawyer. (b) To write down the wills on a document, including the appropriate private keys. (c) To seal off the envelope. (d) To hope for the best. This natural solution presents many challenges. The more salient be ing that crypto-currencies have been built precisely to provide agree ments without having to rely on identified third parties. There is maybe noth ing as opposed to this aim than having to go to see a lawyer, and having to rely on the professional integrity and competence of this lawyer . This is a poster child of all the issues linked with centralization. There are many additional issues. One can think of anonymity related issues: f or instance in order to establish the wills, a comprehensive list of all cryp to wallets has to be done. Another class of problems is the risks inheren t to this solution. Typically for lawyers that will be targeted by wrongdoe rs if this practice becomes mainstream (because stealing the keys give e ffective control of the crypto-assets). The saying ”not your keys not y our coins” sums it all accurately. The simple fact that you have to give your key to a third party amounts to lose the ownership of the associated crypt o-assets. Essentially this solution reintroduces the single point of failure with all the drawbacks attached to it. 2. The second idea that may come to mind is to put all the keys on a thu mb drive, or write them down on a piece of paper, and lock them into a saf e at home. It marginally improves on the previous point if family is more trusted thanprofessionallawyers. Itisamoredistributed solutio nbecause each individual implements a particular version of this protocol. Besides the hazards that such a practice would produce if it were wid ely adopted (basically the same issue than the one discussed with the law yer’s solution and the incentive for wrongdoers to steal keys), it has th e follow- ing additional drawback: actually my eight years old daughter is not m y only heir. Let’s say there are four kids and seven nephews between whom the inheritance is to be shared. It is not as if dramas about success ion, struggleswithin families, andcommunities, area literarygenreunto t hem- selves. Moreover,howcansomeonebesurethattheindividualope ningthe 3 safe will behave correctly? It is harder to cheat with a pile of physica l gold because there may be witnesses, the material has to be physically m oved around etc. With crypto-assets, one just has to remember a pas sphrase. No one can stop someone knowing the correct keys from using them later. Short of killing, it is impossible to delete a passphrase from the memory of another person. 3. It is possible to be smarter and to write a smart contract that imp lements the succession wills. It solves the ”four kids, seven nephews” prob lem: the smart contract is going to perform the sharing. It can be seen as a n equiv- alent of the wills in the blockchain world. It raises a new problem tough: how will the blockchain be aware of the death of the owner of the sma rt contract? This is a variant on the famous oracle problem [ABRSS20]. The first ideas to deal with this issue would be to rely on some sort of stat e based service reintroducing a centralization problem. This specific is sue is discussed more thoroughly in section 4.1. At this point another class of issues, that are not primarily technica l but have technical implications, appears: the heirs may not be of age to un- derstand the crypto technologies involved. Maybe the don’t have t he legal rights to access such kind of funds either. Some of the heirs may als o not have crypto-wallets in the first place. If so the mechanisms by which the proper credentials could be transmitted to them, without being com pro- mised, remain mysterious. There is anothertype ofissue: what if the four kids andthe sevenn ephews die with the one that they are supposed to inherit from? Let’s say, f or instance, that they all (or any subset) disappear simultaneously in a plane crash? It is not possible to re-write the smart contract: that is th e very idea of smart contracts. Then the inheritance disappears (more p recisely it becomes inaccessible) in such a scenario. In real life there are spe cific laws and legal practices to deal with such kind of situation. This issue is discussed more precisely in section 4.3 4. A rather simple solution is to set up an equivalent of a time capsule. I f a date is chosen sufficiently far away in the future, then the death o f the capsule owner becomes a certain event. It can be done via smart co ntracts that just havetowaituntil someblocknumberisreachedin theblock chain before being executed. The drawbacks lie in the lack of flexibility and t he necessary approximation of the time of death. A middle-aged victim o f a traffic accident or an unexpected death could potentially lead to an inheritance process stalled for more than half a century. Moreove r, the probability that the potential beneficiaries of the inheritance may h ave died too in the meantime increases. 5. An improvement over the previous idea is to use a dead man’s switch . Insteadofusingthemaximumageplusasafetymarginforthetimeca psule deadline, it is possible to use a shorter frame. If necessary one has just to 4 edit the time capsule deadline before it is executed. The death of the time capsuleownerstopsthis processofreprogramming,andthetime c apsuleis eventually delivered. It, partially, solvesthe issue of the lag betwee n death and succession. On the other hand it requires a constant vigilance a nd work. It also opens possibilities of denial of service attacks. The de nial of service can be malicious or due to life circumstances, typically the own er of the dead man’s switch cannot access the blockchain for technica l or medical reasons (for instance being in a coma etc.). 6. Everyone is going to die but we hope that it will happen as far away in the future as possible. Life expectancy has improved a lot lately. Fr om a technical point of view it is a very challenging aspect of crypto-ass et inheritance to manage. It is very difficult to anticipate the technolog ical environment a few decades from now. However, any credible propo sal for the inheritance ofcrypto-assetsmustbe resistanttothe futur e. It suggests that any solution should be integrated within the crypto platform its elf rather than having to rely on outsourced processes. This problem is more thoroughly discussed in section 4.5. 2.2 Decentralized Society and inheritance It is not yet clear how much blockchain based technologies are going t o have a fundamental impact on society. Bitcoin has changed the financial landscape in deep. The most important central banks are considering to eithe r develop their own crypto-currencies and on ways to regulate this new field [B ha22]. Some actors go as far as suggesting that the nation-state frame work could be impacted [Sri22], or more modestly that a new kind of society, the dec entralized society [WOB22] will emerge. What is going to happen is very hard to discern precisely but it is clear t hat the impact are not going to be restricted to the technical/technolo gical tiers of the society. The question of inheritance of crypto assets is going t o be major concern. There are already tricky issues linked with death and social media: wh at is supposed to happen when the user of a social account dies? Is th e account frozen for ever? If people have access to this account (for insta nce because the password was saved in a personal computer) can they use it? S hould the account be deleted? Those questions are not light and not easy to d eal with. There are propositions to use Artificial Intelligence in order to have a digital clone of the dead person [Ceb21]. Is it ethical or not to impersonate a dead person through an artificial intelligence piece of software? On what grounds? Likewise there were studies on security implications of social media ac count of deceased persons [DCB22]. Those accounts contain many importan t data that can be used before the knowledge of the death has been spread. It turns out that those questions, though difficult and important, are just a small aspect of a larger one: what becomes the concept of legacy in the digital space? The problem of the inheritance of crypto-assets is a part o f this larger 5 issue. It raises challenges that are both technical, technological a nd societal. 3 Existing solutions review At the time of writing there has been very few proposals to tackle wit h the various issues raised by the inheritance of crypto-assets. Some w orkarounds have been proposed. •Sarcophagus[sar20]isadeadmanswitchimplementationthatisblock chain- enabled. It is resistant to censorship and immutable. It is done by th e combination of Arweave [WJ17] for a permanent storage of data, and Ethereum [But13] to support the ERC20 Sarco Token. This token is used to pay so called ”archaeologists” which are in charge of releasing the data (essentially an encrypted file) to the person of interest. The user have to select one or more existing archaeologists. The archaeologist public key is used asanouterlayerofencryption. This outerlayerhastobe re- wrapped at predefined dates in the future. If one date expires then the ar chaeolo- gist decrypts the outer layer. The inner layer is the data encrypte d with the public key of the final receiver that can decrypt it. In addition to the problems linked with the dead man switch that are discussed in section 2.1, there is the presupposition that the receiv er of the time capsule is already well identified and as access to the necess ary public key infrastructure. •Ternoa [Ter22] is a french start-up that proposes a ”death prot ocol”which is basically a smart contract triggered by the API’s of local authorit ies registering deaths. It presents the problem of relying on a centra lized Oracle. One issue is that it is easier to hack the local authorities data base (or to bribe agents working for this agency) than to break a distrib uted solution relying on crypto technologies. Another issue is that there is no standard API to deal with this issue that is shared among countries . Each solution is limited to one nation-stateat best. Finally there is no warra nty that the API are not going to change in the future. •Casa[Cas22]isacompanythatproposessolutionsbasedonmulti-sig nature schemes. Their primary service is to provide better resiliency for cr ypto wallets. They also have an inheritance product that is basically a tech no- logical implementation of the second point examined in section 2.1. 4 Themes for future research 4.1 A distributed protocol for the death announcement The aim is to define a protocol that is safe, distributed and has some privacy properties such that the blockchain is aware of the death of a part icular in- 6 dividual. This is the basic signal that is going to be used as a trigger for smart-contracts, whatever they might be (see 4.3), implementing the wills. Every solution to this problem must at least meet the following criteria : 1. It should be adaptable to any blockchain modulo an appropriate tu n- ing of technical details and of governance peculiarities of the consid ered blockchain. 2. It should respect privacy in the sense that before the death ha s been enacted by the blockchain, there should be no way to link specific wills, whatever there form are, to a specific crypto-wallet/crypto-ad dress. 3. It should present some warranties of a good execution, namely t hat the inheritancewillbedoneasitwasplanned. Thispoint isnottrivialbecau se the solution has to rely on a distributed system for which it is generally hard to have hard warranties of execution. In [Pro22], I have proposed such a protocol. The idea behind the Tales From the Crypt Protocol (TFCP) is the following: the signal of the death is set when a predetermined amount of coins is transferred to a special w allet after a predetermined time has elapsed. The coins are stacked by witnesse s that tes- tify on the death of a particular person. This stack can be lost if it tu rns out that the information of death proved false. The proof of life is adju dicated by the existence of a financial move on the account of interest. Once the network has acknowledged the death signal, then another group of actors decrypt the information allowing to make the link between the dead person and the corre- sponding crypto-assets and smart-contracts. I refer to the p aper [Pro22] for the technical details. 4.2 Transmitting secrets to the future Cryptography is very efficient at allowing multiple parties to exchange secrets. The untold assumptions of this field are that both parties have to be alive, and most of the time identifiable . Both of those assumptions may not be necessarily true in the case of inheritance. One edge case is that the heir might s till be in the womb when the giver dies. There are also those stories of the re search of the heirs that takes years or even decades. There is even a profe ssion ”probate genealogist” whose job is precisely to solve work on those kind of puz zles. Without havingto goasfarastheseextremecases, itisclearthat, within the realm ofcrypto-assetsinheritance, the issue of transmitting the right credentials to the right person is a major preoccupation. Indeed the knowledg e of the keys amounts to the proof of ownership of those crypto-assets. Thu s the paradoxical requests: the secrets have to be transferred to an unknown th ird party at an unknown time, and in the meantime there should be some warranties t hat the secret is not revealed to any other party while the owner of the sec ret have disappeared. The fact that the time lapse can very easily be counte d in years only makes the issue more complex. 7 A first idea would be to adapt some secret sharing scheme [Bei11], bu t it doesn’t look a trivial endeavorat first sight. Indeed, whateverth e scheme would be, the fact that shareholders should be forbid to collude to revea l the secret is harder to implement: as we mentioned time lapse is very large. In fac ts it is so large that shareholders might have to transfer their shares to another shareholder for instance. Another ideato developis toobjectify sharesin orderto regainsom econtrol. The raw idea would be to find ways to produce clones of objects that do not require any digital process. A very simple idea is the following: you can produce material keys (pieces of metal) that are clones using key duplicating machines. Those machines are analogical: there is no file recording how the clone can be produced. Then these clones can be used in the future as a shared secret: by making standard measurements on the object, it would be possible t o generate some bits of shared information. One interesting point is that the me asure has not to be fully specified at the time of production. The only property that has to be met is that they are really clones from one another, meanin g that any physical measurement on both objects will give the same result s. Another desirable property would be that it should be materially difficult to prod uce other clones: simply scanning the object should not be enough. The underlying idea is that those material keys are going to be saved in a physical sa fe, and just having access to them should not be enough to make clones. Anothe r important propertythat such an artifact must have is the stability of the obj ect acrosslong periodsoftime. The physicality/materialityaspect ofthis kind ofsolu tioncould be a way to work around the issues raised by the non destructive, a nd perfect copy of information, that digital technologies allow. 4.3 Flexibility of wills One of the very basic motivation behind the smart contracts [HHL+21] is the fact that once they have been enacted, it is impossible to change th em. This feature is very interesting in a variety of application. In the case of inheritance, typically when the wills are implemented via a smart-contract, it can be a hard problem to solve. Indeed, as discussed above, the identity of the h eirs is not always the one that was initially defined. There are more subtle proble ms, like, for example, some evolution of the inheritance laws between the coding of the wills. Those problems essentially comes from the fact that the re is an incompressiblepartoftheinheritanceprocessthatcannotbecom pletelyforesaw in advance. Therefore, developing smart-contracts more flexible is an important task from this perspective. This has not to be an evolution of the fundamental ideas behind smar t- contracts but rather a way to develop an ecosystem that adds ov erlays on top of the smart-contract in order to achieve more flexibility. Because death is both unavoidable and unique it can be implemented as a set of ad hoc govern ance rules. Yet those rules have to be clearly determined and studied. Th eir inter- actions with the rest of the blockchain could be tricky to precisely an alyze. 8 4.4 Blockchain and civil status The inheritance process brings to the forefront many problems ar ound links between the virtual world and the material world. One of these issu es is known as Oracle’s problem: how and by what rules is the blockchain ”aware” o f what is happening in the outside world? Regarding the inheritance process there is a dual type of issue: how is the blockchain being able to reach the ou tside world? If you narrow the problem down to first principles, in order to perform an inheritance one has to reach specific individuals. A first problem is t hat people that are looked for do not necessarily have a presence in the blockchain ofinterest. Inthebasic”8yearsolddaughter”scenariotheprob lemisillustrated bythe factthat youngchildren don’thavea crypto-wallet. Anothe r similarissue is that, even if such crypto-wallets exist, they might not be known b y the giver. How can it be represented within the blockchain? There must be some kind of link between the blockchain and the real world, i.e. the ”social secur ity name” of heirs. Again you don’t want to depend on third parties for this link. A recent proposal by Weyl, Ohlhaver and Buterin in [WOB22] is the idea of ”Soul Bound Tokens” or SBDs. The idea is to have NFTs that can’t be transferred. Their use could be to represent non-transferable and persistent social relationships. Many legacy issues could use such a novel prop osition in order to bridge the gap between virtual and real world. 4.5 The long term problem Any solution to the inheritance issues of crypto-assets is going to f ace a particu- lar challenge: the solution is not going to be used before a, hopefully, very large lapse of time has elapsed. Since it is not possible to foresee the exact time of death, the inheritance process of young people may have to stay p ut for many decades before being actually used. It is always possible to rely on th e end user to continually adapt to the new technological environment. But this is clearly not a satisfactory answer both from a practical, societal and philo sophical point of view. From a practical point of view, the inheritance issue is not something that one should have to work constantly on. It should be set once for all unless very specific events occur: loss of an heir, new wedding in your family, app arition of new heirs etc. Changing your wills when such extreme events happen is normal, but otherwise one shouldn’t have to tinker with his/her wills on a regula r basis. Remember than most of the time, in most civilizations, there are no ex plicit wills. There is a ”by default” mode, embodied into customs and dedicat ed laws, that applies. Wills are used when something specific has to be implement ed, and more often than not laws restrict the extent to which wills can be differ from the default procedure. Inheritance is the engine behind culture building. Therefore, the pr ocess of inheritance cannot be completely let to the hand of individuals. In the same way that there are basic laws (murder, stealing are forbidden etc.) for a society to work, there are basic rules regarding inheritance that do not sim ply rest on 9 subjective/personal choices. This has strong implications on the in heritance of crypto-assets, indeed any implementation might have to change be cause legis- lation has evolved. On the course of many decades it is not surprising , or even unexpected. This is somewhat contradictory with the previous poin t. The fact that maybe there are parts of the inheritance process that are g oing to evolve do not solely rest on the whim of individuals. From a more abstract point of view the inheritance process is by nat ure a trade-off between individual wishes and societal rules. This trade -off slowly evolves as time goes by. This has an impact on any technical ”solution ” to the inheritance of crypto-assets. The whole idea of the blockchain gov ernance must have to take this into account. How are these issues going to be solv ed remain subject to many trial and errors, but unlike most of other functio nalities that can be tested in real time, the inheritance functionality cannot be t ested on a large scale quickly. The development of simulations is both mandator y and difficult: what are the correct model of users? How the fact that r ules are going to change over time can be coped with? Those are some of the quest ions that have to be tackled with. 4.6 The customer is not the end user Inheritance can be looked at both from the giver’s side and from the heir’s side. What is unique in the ”inheritance application”, viewed as a featu re of the blockchain, is that the giver, by definition, may never check w hether things have unfolded as planned, and that the heirs may not even be aware that they are heirs. Therefore the inheritance application is a very spec ific kind of applicationforwhichincentivesareveryhardtoset upcorrectly. I ndeed, almost by definition there are no customer feedback. Even if you inherit, m eaning that the processed somehow worked, how do you know that the pr ocess was correctly executed? Moreover, because the inheritance may inclu de privacy management it is not even clear that the heirs of a single giver may kno w each other. So they cannot regroup together to check that who le process has worked as it was intended to. This is not intrinsic to the inheritance of crypto- assets. Butit isrelativelynewfromacomputerengineeringperspec tive. Indeed, in real life institutions, and society, are set to solve this issue. Some how the community”knows”whoiswhoandwhatbelongstowho, evenifthiskn owledge is distributed and somewhat fragmented. There are informal ways to have feedback which is also known as ”reputation”. An equivalent has to b e found in the world of blockchain. Another related point is that heirs may refuse the inheritance. This is a possibility in many cultures. Usually this choice has important legal implic a- tions like accepting/refusingdebts ofthe giver. In the blockchainc ontext it may translates in accepting/refusing the result of some smart contra cts that are exe- cuting. Thiscontributestotheinherentcomplexityofinheritancep rocesswithin the blockchaincontext. If the smart contractwait for an accept ance/refusaltick how does it warn the interested parties? What if no one accepts? Et c. The list of questions grows larger as closer as you look into the issues. Some problems 10 are just programming issues but others are specific to the inherita nce process. The thing is that inheritance is a global functionality of a community an d not just a personal issue. Just like the functionality of funds transfe r is not up to the individuals. What is up to the individual is the definition of the receiv erand the amount to be transferred. But the idea is not up to the whim of t he user. Some parts of the inheritance process are of this nature. To pinpo int which ones and to find out how they could be implemented in a blockchain world rema in open questions. 4.7 Atomicity of wills If only because of technical limits, the inheritance process has alwa ys been, historically, an atomic process in the sense that it was performed loc ally and executed as a batch. It could take time to gather all heirs and comp ute who inherits what but the process itself is clearly identified. It is no longer the case with crypto-assets and it raises specific challenges that are neithe r purely legal nor purely technical. For once, crypto-assets are not going to re ly on a single blockchain. Each blockchain may propose its version of inheritance. In [WOB22] the case for a decentralized society is made. Among the m any points raised, the idea that the key primitives are the accounts, or the wallets, is central: Note there is no requirement for a Soul to be linked to a legal name, or for there to be any protocol-level attempt to ensure “one Sou l per human.” A Soul could be a persistent pseudonym with a range of SBTs that cannot easily be linked The whole idea of inheritance is impacted by this. The questions raised are not only of the technological realm. Another non trivial evolution, that has both societal and technolo gical im- plications, is that, by essence, a Blockchain is not an object that ca n be located in a specific place. Therefore, it is not clear how the legal liabilities may b e inferred. Typically something like ”which court has jurisdiction?” is no t an easy question to settle. The same questions arise regarding the ta x code to be considered. Many pages of similar problems could be filled. They are not trivial issue s. As mentioned earlier, the body of laws, practices and customs linked to legacy is immense. It looks like that the useful abstractions in order to thin k about those issues have yet to emerge. In that respect the inheritance problem is very singular: the problem to solve is not yet clearly defined and cann ot be possibly well defined. Solutions and concepts are going to emerge fr om practice and adoption. Yet those are not issues that can be totally outsour ced, from a blockchain point of view. 11 5 Conclusion In this paper we have discussed many problems and ideas around the theme of the inheritance of crypto-assets. There are several levels to consider. They range from a broad societal point of view down to the technical det ails and the specifics of protocols. Most of the challenges remain open at the tim e of writing. It is not yet clear either what should be part of the blockchain infras tructure, and what should be delegated to the outside world. This question is an integral part of the discussion that has to be done. Studies on the inheritance issue of crypto-assets are interesting in and of themselves. They have the potential to lead to interesting results in the field of blockchains in general. •Theinheritanceprocessispartlyasocialissue. Assucheverytech nological proposition should be made with that caveat in mind. In particular, it means that solely technical solutions are not going to make it. •Any proposition should be such that it includes new possibilities for the blockchain to interact with the outside world. Those interactions sh ould be more sophisticated than what the current implementation of Ora cles offers. Typically, the fact that heirs may not necessarily be users o f a blockchain implies that there are tools that have to be developed in or der to allow interactions from the blockchain towards the real world. Wh ich is a dual problem than the traditional problem that is addressed by Or acles. •By its very nature the inheritance process is a very long time problem . The time horizoncounts in decade. Very few issues havethis proper ty, but as the move towards a digital society accelerate, more and more as pects of our lives will be tackled using digital technologies. And so more and more digital products will accompany us throughout our lives. How t o manage such a kind of products? How can they be tested? Are some of the questions that will have to be answered. The intrinsic social dimension of many aspects of the inheritance pro cess suggeststhat social media should be a useful tool to investigate. The interesting feature of social media is that they are inherently distributed. Mor eover, they could be used to developvirtual identities that do not relyon a numbe r recorded in a database. Indeed, digital identity could be seen as the sum of int eractions withinasocialnetworkratherthananumberinsideacentralizeddat abase. This is of major importance because the whole point of having a blockchain based mechanism for inheritance is to have a mechanism that is not relying on third parties. How and with what level of warrantiesare the important qu estions that future researches will have to address. 12 References [ABRSS20] Hamda Al-Breiki, Muhammad Habib Ur Rehman, Khaled Salah, and Davor Svetinovic. Trustworthy blockchain oracles: Review, comparison, and open research challenges. IEEE Access , 8:85675– 85685, 2020. [Bei11] Amos Beimel. Secret-sharing schemes: A survey. pages 11– 46, 05 2011. [Bha22] Gita Bhatt. Reimagining money in the age of crypto and centr al bank digital currency. International Monetary Fund Blog , Septem- ber 2022. [Bib] The Bible . [But13] Vitalik Buterin. Ethereum white paper: A next generation sm art contract & decentralized application platform. 2013. [Cas22] Casa, https://keys.casa/bitcoin-inheritance-plan, 2022 . [Ceb21] Daniel Cebo. Scientific relevance and future of digital immor tality and virtual humans. CoRR, abs/2101.06105, 2021. [DCB22] Graeme Dickerson-Southworth, Brian Chen, and James Br aman. Securing the accounts of the deceased: Implications of compro- mised profiles. In Constantine Stephanidis, Margherita Antona, and Stavroula Ntoa, editors, HCI International 2022 Posters - 24th International Conference on Human-Computer Interaction, HCII 2022, Virtual Event, June 26 - July 1, 2022, Proceedings, Par t IV, volume 1583of Communications in Computer and Information Sci- ence, pages 467–472. Springer, 2022. [HHL+21] Tharaka Hewa, Yining Hu, Madhusanka Liyanage, Salil Kanhare, and Mika Ylianttila. Survey on blockchain-based smart contracts: Technical aspects and future research. IEEE Access , 03 2021. [Hom] Homer. The Odyssey . [Nak09] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic ca sh system, http://bitcoin.org/bitcoin.pdf, 2009. [Pro22] Fr´ ed´ eric Prost. On the heritage of crypto assets – tale s from the crypt protocol, 2022. [sar20] Sarcophagus - a decentralized dead man switch, https://sarcophagus.io/, 2020. [Sri22] Balaji Srinivasan. The Network State: How To Start a New Coun- try. 2022. 13 [Ter22] Ternoa-whitepaper,https://github.com/capsule-corp- ternoa/white-paper/blob/main/white-paper-en.md, 2022. [WJ17] Sam A. Williams and Will Jones. Archain: An open, irrevocable, unforgeable and uncensorable archive for the internet. 2017. [WOB22] E. Glen Weyl, Puja Ohlhaver, and Vitalik Buterin. Decentralize d society: Finding web3’s soul. SSRN Electronic Journal , 2022. 14
{ "id": "2212.01194" }
2303.17206
Innovative Countermeasures to Defeat Cyber Attacks Against Blockchain Wallets: A Crypto Terminal Use Case
Blockchain transactions are signed by private keys. Secure key storage and tamper-proof computers are essential requirements for deploying a trusted infrastructure. In this paper, we identify some threats against blockchain wallets and propose a set of physical and logical countermeasures to thwart them. We present the crypto terminal device, operating with a removable secure element, built on open software and hardware architectures, capable of detecting a cloned device or corrupted software. These technologies are based on tamper-resistant computing (javacard), smart card anti-cloning, smart card content attestation, application firewall, bare-metal architecture, remote attestation, dynamic Physical Unclonable Function (dPUF), and programming tokens as a root of trust.This paper is an extended version of the paper ''Innovative Countermeasures to Defeat Cyber Attacks Against Blockchain Wallets,'' 2021 5th Cyber Security in Networking Conference (CSNet), 2021, pp. 49-54, doi: 10.1109/CSNet52717.2021.9614649
http://arxiv.org/pdf/2303.17206v1
Pascal Urien
cs.CR
cs.CR
Innovative Countermeasures to Defeat Cyb er Attacks A gainst Blockchain Wallets : A Crypto Terminal Use Case Pascal Urien Telecom Paris 19 Place Marguerite Perey 91120 Palaiseau, France Pascal.U rien@telecom - paris.fr Ab s tract — Blockchain transactions are si gned by private keys. Secure key storage and tamper - proof computers are essential requirements for deploying a trusted infrastructure. In this paper, we identify some threats against blockchain wallets and propose a set of physical and logical countermeasu res to thwart them. We present the crypto terminal device, operating with a removable secure element, built on open software and hardware architectures, capable of detecting a cloned device or corrupted software. These technologies are based on tamper - resi stant computing (javacard), smart card anti - cloning, smart card content attestation, application firewall, bare - metal architecture, remote attestation, dynamic Physical Unclonable Function (dPUF), and programming tokens as a root of trust . This paper is a n e xtended version of the paper "Innovative Countermeasures to Defeat Cyber Attacks Against Blockchain Wallets," 2021 5th Cyber Security in Networking Conference (CSNet), 2021, pp. 49 - 54, doi: 10.1109/CSNet52717.2021.9614649. Keywords: blockchain, securi ty, smartcard, PUF, remote attestation I. I NTRODUCTION Blockchain transactions are signed by private keys, which imply security requirements similar to those of electronic signature processes or EMV payments made using bank cards and payment terminals. The m ain security requirements are secure key generation, secure key storage, and tamper resistance. Some threats of key theft are listed in [29]. A secret key is an integer value whose size is 32 bytes for a 256 - bit elliptic curve. The best practice should be to use a true random number generator (TRNG). Nevertheless, many wallets use passphrases as seeds for key generation; they are based on a choice of words (e.g., 12 values chosen from 2048), which leads to 2 132 possible combinations. The article [30] sugges ts recovering the passphrase by a brute - force dictionary attack. Another technique, called “brain wallet”, calculates the private keys from the passphrases using a hash procedure; the article [31] demonstrates brute - force attacks. Many blockchains, for exa mple, Bitcoin or Ethereum, use the ECDSA ( Elliptic Curve Digital Signature Algorithm ) signature. This procedure generates a random number k, and a point on the elliptic curve (secp256k1) with the generator G, k.G= (x,y) from which is calculated an integer r= x mod n, n being the order of the curve. The knowledge of k, the reuse of k, or a known difference between two values of k, makes it possible to recover the private key. The paper [32] studied such a key leakage in Bitcoin. It extracted 647,110,920 sign atures and found 1,068 distinct r - values appearing at least twice and used by 4,433 keys, or about 0.35% of the r - values. The most frequently observed value is k = 1/2 mod n. It should be mentioned that malicious random number generators, such as kleptogra ms [33][34][35], can be used to recover private keys after two signatures. Even if the signatures are computed by a secure and trusted device, they can be performed by malicious software, whose purpose is to generate fraudulent transactions. In EMV payment systems, point - of - sale (POS) terminals are equipped with security stickers and battery - powered electronics to detect attempted fraudulent use. The PCI Security Standards Council lists approved companies and vendors. Nevertheless, no standards are availabl e today for assessing security in blockchain operations. In addition, low - cost wallets are sold by e - commerce stores and delivered by untrusted supply chains. Secure elements, such as smart cards, are an effective technology for providing secure storage an d trusted cryptographic operations, with high levels of security (EAL 6+ according to Common Criteria - CC - standards) and countermeasures to counter side - channel threats. However, as with EMV cards, it is necessary to detect malicious clones. Secure elemen ts require a terminal with additional functionalities: user interface (touch screen, etc.) and communication (USB, Bluetooth, etc.). Proof of integrity of the software executed by the terminal is an essential prerequisite. From an industrial property point of view, detecting counterfeit electronic cards is an important feature. In this paper, we describe a dedicated blockchain terminal based on open hardware (i.e., Arduino platform) and software technologies. It incorporates a set of countermeasures capable of verifying the authenticity and integrity of the firmware and detecting cloned devices. Thanks to the open hardware, the terminal is realized with components supported by the Arduino integrated development environment (IDE), but it can also be integrate d into a dedicated electronic board. The first prototype [9] used a two - line 16 - character LCD and a 4x4 keyboard. These elements were replaced by a touch screen in the second prototype [10], which also supports a Bluetooth Low Energy (BLE) interface. An or iginal ISO7816 library has been developed to support smart cards by Arduino environments. The firmware integrates a set of original security features detailed in [16] [17] [19], whose goal is to provide a bare - metal architecture with a root of trust, a sof tware attestation procedure, and hardware fingerprints. This paper is organized according to the following outline. Section 2 briefly introduces the blockchain wallet state of the art and identifies some threats; it also presents an original algorithm to d etect duplicated code shards. Section 3 describes the crypto terminal, an open device that integrates a set of countermeasures. Section 4 details the javacard security features: tamper - resistant computing, anti - cloning, content self - attestation. Section 5 presents the terminal security features: applicative firewall and bare - metal architecture. Section 6 introduces remote attestation using the BMAC algorithm. Section 7 describes static and dynamic PUF. Section 8 introduces programming tokens as a root of tr ust. Finally, Section 9 concludes this paper. II. . S TATE OF THE A RT A. Blockchain Wallet Fig1. Overview of blockchain wallets. A blockchain wallet comprises two parts: a set of private keys used to sign transactions and a set of parameters needed to generate t ransactions. The secure storage and use of private keys is a major security prerequisite. While cryptographic keys can be used without communication with the blockchain infrastructure, the information needed to build a transaction must be retrieved, which requires an Internet connection. Figure 1 illustrates two broad categories of blockchain wallets: hot wallets (with TCP/IP stack) and cold wallets (without TCP/IP stack). The first generation of hot wallets was based on software without tamper - resistant fe atures Fig2. Private key storage in the wallet.dat file used by the bitcoin.exe softwar e for windows As an example, the Bitcoin.exe software for win32 was written in 2009 by Satoshi Nakamoto [1]; it consists of about 16,000 lines of C++ code, and its bi nary image is 6 MB. It included information managed by a non - SQL database, the Berkeley DB. In particular, the private keys were stored in the file named wallet.dat. As shown in Figure 2, the private key (colored in yellow) is not encrypted and can be iden tified by its associated Bitcoin address : " 16iLh 7ztLh2mwkhSvZeHxKWQVVMGGgfWGq " In the Bitcoin system, the c oinbase transaction is the first transaction in a block, used to transfer the potential reward to an address identified by its Hash160 attribute: ݏܽܪ ℎ 160 = ܦܯܧܲܫܴ 160 ൫ ܣܪܵ 256 ( ݕ݁ܭ݈ܾܿ݅ݑܲ ) ൯ The bitcoin.exe software generates a random address before mining a new block. The loss or theft of the unprotected wallet.dat file was a major risk, not always understood by early miners. Many blockchains use the Ellipti c Curve Digital Signature Algorithm (ECDSA) signature. Given a message signature made of two integers (r,s): ݏ = ݇ − 1 ( ݁ + ݖ . ݎ ) ݀݋݉ ݊ with n being the group order, e the message hash, z the private key, k a random number kG=(x,y), and r=x mod n. An d given two signatures of two different messages, M 1 and M 2 , with the same r in (r,s 1 ) and (r,s 2 ), e 1 =hash(M 1 ), e 2 =hash(M 2 ), the private key is computed as: ݖ = ( ݁ 1 . ݏ 2 − ݁ 2 . ݏ 1 ) ݎ − 1 ( ݏ 1 − ݏ 2 ) − 1 ݀݋݉ ݊ Therefore, ECDSA generation requires a random number generator (RN G) or a deterministic procedure based on the message fingerprint (as detailed by RFC 6979). In 2010, EC private keys were extracted from PS3 consoles by exploiting the lack of a random number generator [21]. ECDSA, therefore, relies on trusted software. Fig3. Illustration of hierarchical deterministic wallets, according to the BIP32 specification In Bitcoin, according to the BIP32 specification, keys are computed in deterministic wallets (see Figure 3). A root secret (512 bits), divided into two parts (I L0 and IH0), is calculated from a seed. Then, child nodes, identified by a 32 - bit integer index, compute 512 - bit secrets based on their parents’ IL and IR attributes, using the CKD(m,i) procedure. Finally, the private keys (256 bits) are computed, from whi ch the account addresses are derived. Therefore, an address (and the associated private key) is identified by a path in the BIP32 key tree. The suggested hierarchy is as follows: master node, wallet accounts, wallet chains and addresses. The BIP32 seed can be computed from a passphrase according to the BIP19 specification. The passphrase is a set of words selected from a dedicated list of 2048 elements. The computation procedure is based on the password - based key derivation function (PBKDF2) defined by RFC 2898. This mechanism allows the recovery of deterministic wallets, as the key paths (i.e., the key identifiers) are public values. Nevertheless, if the passphrase is stolen, the private keys can be recovered by a brute - force attack on the key identifiers. In 2014, a major Bitcoin company, Mt.Gox, went bankrupt due to a data breach in untested software, leading to the illegitimate use of private keys [29]. In addition, the privileges of system administrators allow the hacking of private keys. As an illustrat ion, Bitfi [2] is a UNIX smartphone without a baseband chip, including an SD memory card, and offering Wi - Fi connectivity. It was rooted, and private keys were extracted. To prevent these attacks, data centers use Hardware Security Modules (HSMs), whose se curity requirements are described in the FIPS 140 - 2 standard (“ Security Requirements For Cryptographic Modules ”) [3]. Four security levels are defined, ranging, according to the Common Criteria (CC) terminology, from EAL1 to EAL4. Cryptographic keys are ma naged by tamper - resistant systems whose access requires multi - factor authentication (e.g., password, hardware key, and PIN). For example, Coinbase recommends [4] storing the PIN - protected hardware key in a vault so that its use involves two human brains, o ne of which knows the smart card PIN and the other the vault combination. Some smartphone wallets are based on a hardware keystore, which runs in a TEE ( Trusted Environment Execution ) processor [5]. Most Android mobiles are equipped with such processors. T EE implements a secure computing environment; however, according to [22], the hardware techniques and processes used for smart cards do not apply to standard System - on - Chip (SoC) technology. The main idea of cold wallets is the offline storage of private k eys. Communication with the outside world uses USB, Bluetooth, Wi - Fi, or QR codes read by a camera and displayed on screens (e.g., cobo vault). There are two broad categories of cold wallets: those that are fully software - based and those that include a tam per - resistant device. The Trezor One is an all - software device with a screen, two buttons, and a USB interface. According to [6], the private keys were recovered by a single - powered attack (SPA) exploiting the unprotected implementation of the double and a dd algorithm, in which a public key (zG, G being a generator) is computed by parsing bit by bit, the private key z. ݖ = ෍ ܾ ݅ . 2 ݅ , ܾ ݅ ∈ { 0 , 1 } 255 ݅ = 0 An elliptic curve addition is computed for every non - null bit, which enables the bit recovery, for example, b y monitoring the power consumption. ܩݖ = ෍ ܾ ݅ . ܦ ݅ , ܦ 0 = ܩ , ܦ >݅ 0 = 2 . ܦ ݅ − 1 255 0 Some wallets use crypto memory (for example, Safe - T Archos ) or Trusted Execution Environment (for example, Archos Safe - T Touch ). Crypto memory devices provide secure storage; they work with mutual authentication procedures and encrypted content. The Ledger Nano S stores keys in a secure element. The device comprises a microcontroller, a secure element, a screen, two buttons, and a USB interface. Upon reset, a software handler sends memory ch unks to the secure element, which hashes their content, and finally checks a signature; upon success, the secure element is unlocked. This mechanism was broken [7] by using a duplicate area of memory. The reference [8] demonstrated a successful replacement of the token software. Fig4. Illustration 64 bytes duplicate code shards As illustrated by [7], software instruction blocks may be duplicated. We call shards these blocks. We assume that shards do not include instructions that explicitly modify the pro gram counter (PC), such as JUMP or CALL. An example of code shards is provided in Figure 4. We implemented original procedures based on Ukkonen ’s algorithm for Suffix Tree Construction [23] to detect and remove shards. This algorithm finds the longest dupl icated binary string; replicas are replaced by random numbers. Finally, it produces a list of duplicate code fragments and their size. Fig 5 . Illustration of code compression, using duplicated code shards; freed memory space is colored in blue As illustra ted by Figure 5 (using instruction mnemonics from AVR processors), shards can be compressed by CALL, JUMP, and RTS instructions. The shard instructions are inserted in a subroutine, ended by RTS; the execution time is increased, but some extra memory is av ailable for malicious code. An example of the result is presented in Figure 6. Fig6. Illustration of code compression, using duplicated code shards; which frees 52 bytes B. Threats As mentioned above, hot wallets require online technology. They are therefo re exposed to all the security threats cloud providers face, the most critical being secure key storage and their remote use. It should be noted that insider attacks are predominant and require a specific physical and logical security policy. Cold wallets are obviously not exposed to such attacks; however, they are subject to threats that are listed in the following (non - exhaustive) list: - T1) Lack of tamper - resistant storage and countermeasures for side - channel attacks, which allows cryptographic keys to be recovered at runtime; - T2) Supply chain attacks aimed at malware injection or malicious firmware modification; - T3) Software integrity is not verified. A bootloader checks the integrity of the updated firmware. It can be corrupted, similar to rootkits ; - T4) PIN or password hacking. For example, a key logger captures the text entered on the keyboard; - T5) Misuse of the device from a laptop or cell phone, running a Trojan horse or worm; - T6) Cloning of genuine devices. Clones, with equivalent features , include hidden functions targeting the recovery of cryptographic keys. III. A BOUT THE C RYPTO T ERMINAL The crypto terminal [10] is a keystore for blockchain wallets, designed to prevent these threats, thanks to adapted countermeasures. Its main services are th e generation of signatures or transactions, with a high level of security and trust. However, it requires an external software component running on a PC or mobile device, which collects the information necessary to generate the transaction under the user’s control. It is based on open software and hardware, namely Arduino and javacard 3.0.4, which means that many form factors are possible. The core of the security is a removable javacard [11], which generates, computes, and stores the account keys and perfo rms the transaction signatures. Fig7. Crypto terminal hardware components A. Open Hardware & Software The crypto terminal (see Figure 7) comprises an 8 - bit ATMEGA2560 microcontroller (16 MHz clock, 256KB FLASH, 8KB SRAM, 4KB EEPROM), a USB chip (CH340), a Bluetooth Low Energy (BLE) module [12] (CC2541, 256KB FLASH, 8KB SRAM), a 320x480 In - Plane Switching (IPS) touch screen (ILI 9486), a USBASP programming token [13] (ATMEGA8, 8KB FLASH, 1KB SRAM, 512B EEPROM), and a removable smart card (EAL6). The BLE chi p uses a five - wire interface for software download, the specifications of which are public. It can be flashed (up to 256KB) by open software, such as CCLOADER [24]. The USB programmer for Atmel AVR microcontrollers (USBASP) is an open project [13], includi ng both hardware and software developments. It is supported by the open AVR Downloader/UploaDEr (AVRDUDE) initiative. Therefore, a complete platform is available for firmware download. The ILI9486 is a device manufactured by ILI Technology Corporation . It includes a 40 - pin interface with five control lines, an 8 - bit data bus, and four wires dedicated to the resistive touch screen Fig8. Crypto terminal software components The crypto terminal uses a set of five software packages (shown in Figure 8): - S1) th e main processor (AVR) firmware, up to 256KB; - S2) the BLE module firmware, up to 256KB; - S3) the firmware of the Java card; - S4) USBASP bootloader; - S5) the USBASP firmware, downloaded via the bootloader. B. Countermeasures against Cyber Attacks We believe that trust in signatures is a key feature for the development of blockchain services. That is why we have developed and published technologies and algorithms to achieve integrity assurance for the software and hardware involved in signing transactions. Th e security model includes the following elements: C1) The security core is an EAL5+/ EAL6 removable security element (javacard), which stores the keys and performs the transaction signatures. Access to the smart card is protected by PINs. C2) The authentic ity of the smart card is guaranteed by an anti - cloning mechanism to detect “Evil Maid” - like attacks. The idea of such attacks is to use a cloned card to collect the user’s keys. The public key of the smart card is signed by a certification authority (CA). C3) The crypto terminal can duplicate the cryptographic contents of the secure element. The content of the smart card is self - attested (i.e., hashed and signed by the smart card). C4) The crypto terminal acts as a firewall between the security element and the “hot” environment connected to the Internet. It also performs operations (key generation, signatures, etc.) in “cold” mode (i.e., without being connected to the Internet). C5) Our security model is based on the “bare - metal” concept (i.e., the terminal is delivered without firmware and the Bluetooth module). Using a programming token, the user may flash these devices at any time. C6) The firmware is authenticated by a built - in “Remote Attestation” algorithm. This algorithm [14] [15] [16] produces a resul t (which we call the authentication code) that cannot be predicted and requires a computation time depending on the result. A server can generate these codes, but so can the legitimate user, thus creating personal and unique authentication codes. C7) Physi cal authentications of the cryptographic terminal processor and the programming token processor are performed using dynamic Physical Unclonable Function (PUF) techniques of SRAM (dPUF) [17]. A software memory probe extracts fingerprints from the SRAM after power - up. Innovative procedures have been developed to acquire such fingerprints, including singular points called flipping bits. Flipping bits [18] cannot be cloned by software. This technique ensures that devices received by clients are authentic. C8) T he programming token is a root of trust [19]. It manages the download of the processor firmware of the crypto terminal. We insert bootloader software [20] inside the programming token processor. The authenticity of this software is proved by a remote attes tation algorithm generating authentication codes displayed by flashing LEDs. As mentioned earlier, the physical identity (dPUF) of this token allows clone detection. IV. J AVACARD S ECURITY E LEMENTS The javacard runs a crypto currency (CC) application written in the javacard programming language [11]. These smart cards are available from multiple manufacturers, with evaluation assurance levels (EAL) ranging from EAL5+ to EAL6+, according to the terminology of the Common Criteria standards. In a nutshell, the C C applet is a keystore, which provides secure key storage and ECDSA signing on a secp256k1 elliptic curve. The CC applet supports two - factor authentication: the knowledge of two PINs enables two working modes. The administrator mode gives access to all sma rt card services; the user mode allows reading public attributes and signatures. According to Wikipedia, “ An evil maid attack is an attack on an unattended device, in which an attacker with physical access alters it in some undetectable way so that they ca n later access the device, or the data on it . ” A smart card software clone can include a backdoor. The principle of the “evil maid” attack consists in recovering the cryptographic keys of an unauthentic smart card. To counter these threats, the CC applicat ion creates a private (Priv k ) and public (Pub k ) key pair during its instantiation. The public key is the identity of the device. The hash of this value is signed by a certification authority (CA), according to the ECDSA algorithm and the private key Priv CA . So a tuple of two integer values (r,s) realizes the device certificate: ݐݎ݁ܥ ݇ = ( ݎ , ݏ ) = ܣܵܦܥܧ ݒ݅ݎܲ ܣܥ ൫ ܣܪܵ 256 ( ܾݑܲ ݇ ) ൯ In order to authenticate a genuine smart card, the crypto terminal performs the following procedure: - 1) Reading the public key, Pub k - 2) Reading t he certificate of the public key, Cert k - 3) Verifying Cert k with the CA’s public key, Pub CA - 4) The knowledge of Priv k is proven through a challenge/response procedure. The terminal generates a random value (rnd) signed by the javacard private key: ܣܵܦܥܧ ݒ݅ݎܲ ݇ ( ݀݊ݎ ) This signature is verified with Pub k . The self - attestation of the smartcard contents is produced according to the following procedure: - 1) The crypto terminal generates a random value. The CC application calculates a hash value of its contents, concatenates this value with the random value, and generates a signature with its private key. The hash is returned with the signature; the response contains the following data: ℎ ݏܽ ℎ | | ܣܵܦܥܧ ݒ݅ݎܲ ݇ ( ℎ ݏܽ ℎ | | ݀݊ݎ ) - 2) The crypto terminal veri fies the signature and, if successful, displays the hash (i.e., the fingerprint of the smart card’s contents). V. T ERMINAL S ECURITY E LEMENTS The firmware of the main processor controls the data exchange with the secure element. PIN entry from the touch scree n prevents key logger attacks on the laptop or smartphone. All security - sensitive operations, such as signing, setting or exporting keys, are confirmed by the user to prevent unwanted actions by malware. In the bare - metal approach, embedded firmware is era sed and fully downloaded. Firmware flashing should prevent supply chain attacks, as it provides implicit proof of software integrity. The programming sequence for the crypto terminal is as follows: - 1) The main processor code is downloaded via an ICSP (In - Circuit Serial Programming) port. This firmware stores the certification authority’s public key (used to authenticate the smart card) and a loader for the BLE module. - 2) The BLE module is flashed using the USB interface and the built - in dedicated loader . It should be noted that the touch screen device (ILI 9486) also includes a microcontroller unit (MCU), whose internal firmware cannot be updated. Nevertheless, the main processor only transmits data to this device and controls communication, thus reducin g the attack surface. The main processor firmware incorporates a remote attestation algorithm (detailed in Section 6) and is also capable of dumping and hashing the BLE module code. The programming token (USBASP) stores a 2KB bootloader. Its integrity is p roven by a remote attestation procedure detailed in Section 6. VI. R EMOTE A TTESTATION Integrity checking at runtime is a major security issue. Bare - metal functionality allows firmware to be downloaded at any time, so there is always a need to ensure the integr ity of the software. To achieve this goal, we have designed a dedicated remote attestation algorithm called bijective MAC (bMAC). Remote attestation is a process by which a trusted entity (the verifier) remotely measures the internal state of an untrusted and possibly compromised device (the verifier). The bMAC verification is a self - verifying hash code (i.e., an instruction sequence that computes a fingerprint on itself and the memory contents), such that the MAC checksum is erroneous or the computation is slower if the instruction sequence or the memory contents are changed. bMAC computes a fingerprint (h) on a set (A) of memories (FLASH, SRAM, EEPROM), whose size is m bytes, according to a pseudo - random order, fixed by a permutation P, such that: ܥܣܯܾ ( ܲ ) = ℎ ( ܣ ( ܲ ( 0 ) | | … ܣ ( ܲ ( ݅ ) … | | ܣ ( ܲ ( ݉ − 1 ) ) The ICE algorithm presented in [14] computes a memory checksum according to a particular permutation. The permutation is an Invertible Mapping introduced in [25]. ܲ ( ݔ ) = ݔ + ݔ 2 ∨ ܥ ݀݋݉ 2 ݊ The least significant bit and the third bit of the constant C are both set to 1. In [14], n=16 (16 - bit word) and C=5. The ICE algorithm has been implemented in a 16 - bit von Neumann architecture with a hardware multiplier, leading to an optimized code size and execution time. The paper [26 ] gives an exact characterization of the permutation polynomials modulo n=2 w , with w ≥2 ܲ ( ݔ ) = ܽ 0 + ܽ 1 ݔ + ⋯ + ܽ ݀ ݔ ݀ ݀݋݉ 2 ݓ P(x) is a permutation polynomial if and only if a 1 is odd, the sum (a 2 +a 4 +a 6 +…) is even, and the sum (a 3 +a 5 +a 7 +…) is even. The paper [27] demonstrates that: ܲ ( ݔ ) = 1 + ݔ + ݔ 2 + ⋯ + ݔ ݀ ݀݋݉ ( ݌ ݁ ) is a polynomial permutation i n field F(q), with q=p e and p prime, if and only if: ݀ = 1 ݀݋݉ ൫ ݍ ( ݌ − 1 ) ൯ We use the SHA256 or KECCAK - 256 procedures for the MAC. The permutation P is based on exponential functions in the group Z/pZ*, with p a Saint Germain prime (p=2q+1 , with q prime, p>m), and p=7mod8, which allows us to deterministically compute the generators (g k ) ݃ ݇ = ݌ − ( 2 ݇ ݀݋݉ ݌ ) , ݇ ∈ [ 1 , ݍ − 1 ] The P permutation is written as: ܲ ( ݕ ) = ܨ ( 1 + ݕ ) − 1 , ݕ ∈ [ 0 , ݌ − 2 ] With: ܨ ( ݔ ) = ݃ 2 ݏ 1 ݃ 1 ݔ ݀݋݉ ݌ , ݔ , ݏ 1 ∈ [ 1 , ݌ − 1 ] A pseudo - r andom generator, detailed in [28], produces the parameters g 2 , g 1 , and s 1 from an integer value (31 bits) called SEED. Then, the bMAC function produces a MAC value. The term z=s 1 .g 1 x is computed by a simple recursive procedure (i.e., s 1 g 1 x+1 = g 1 s 1. g 1 x mo d p). It is serialized as a bit stream (b i ) of n bits. The term g 2 z is computed according to a square and multiply algorithm: ݃ 2 ݖ = ෑ ݃ 2 2 ݅ ݊ − 1 ݅ = 0 ܾ ݅ ݀݋݉ ݌ , ܾ ݅ ∈ { 0 , 1 } Fig.9 Distribution of BMAC computing time, for ATMEGA2560, 256KB, 16MHz clock We observe tha t the bMAC computation time (cT) follows, roughly speaking, a normal distribution (see Figure 9) as a function of the SEED value. We believe this distribution is induced by the multiplication and modulus computations, depending on specific integer values. Fig.10 BMAC authentication code The authentication code is a 16 - bit integer value constructed with the two least significant bytes (see Figure 10) obtained from: ܥܣܯܾ ( ܦܧܧܵ ) ݎ݋ݔ݁ ܶܿ An internal timer measures the computation time. The idea o f the stop&start attack is to stop this timer to perform hidden operations and then restart it. The timer uses a sub - clock (N=64) of the processor (F clock /N), which protects against such an attack because the stop operation creates a random error in the ra nge 0 to T clock (N - 1). We performed a stop&start attack by inserting instructions into the BMAC code that stop the internal clock and then restart it. This programming sequence has a prefix STS (short for Store Direct to data Space), which costs 2 cycles, and a suffix LDI+STS (LDI short for Load Immediate), which requires 3 cycles (1+2). For a memory size m, we should expect an increase in the measured time (i.e., number of cycles) of T=5.m. Experimental results with about 1000 samples show a normal distri bution; on average, the increase in computing time is about T= m x 2.07 cycles (i.e., T/m = 2.07 cycles). The timer is stopped after the first STS instruction, which creates a (false) delay of 61, 62 or 63 cycles with a probability of about 1/64. Therefore , an estimate of T/m is: ܶ ݉ # 5 ∗ 61 64 − 61 64 − 62 64 − 63 64 = 1 , 86 cycles Fig.11 BMAC computing time average and standard deviation for three devices (ATMEGA8, ATMEGA368, ATMEGA2560) with different memory size. We use AVR processors with a 16 MHz clock. Figure 11 shows the average computation time and standard deviation for three devices: ATMEGA8 (8KB), ATMEGA368 (32KB), and ATMEGA2560 (256 KB). The average is proportional to the memory size, about 1s/KB. The logarithm of the standard deviation seems to be proportional t o the memory size; in other words, the BMAC entropy increases with the memory size. VII. D YNAMIC PUF The sale of hardware and software clones, which are not original devices, is a critical issue in complex supply chains. Since microcontrollers incorporate stati c RAM, we have developed authentication procedures based on the SRAM Physical Unclonable Function (SRAM - PUF). The SRAM - PUF is a physical identifier that can be used to authenticate the main processor of the crypto terminal (ATMEGA2560) and the programming token processor (ATMEGA8). First, a memory probe firmware is downloaded into the processor, which also includes a UART interface. Second, the board, including this device, is powered via the ICSP port, with a controlled rise time. Third, the content of the SRAM is extracted via the serial interface. Fig.12 SRAM memory cell (left part), output voltage versus input voltage (right part). On power - up, some SRAM cells take a fixed value. This effect is induced by the physical and electrical asymmetry of the P MOS and NMOS transistors (see Figure 12, left - hand side). During power - up (see Figure 12, right - hand side), the output voltage of an SRAM cell remains close to VDD/2 until the gain is sufficient to switch to VL (logic low) or VH (logic high). For a highly mismatched cell, the output always takes a fixed value. The voltage (Vs) at which the transition occurs depends on the cell [17][18]. The paper [18] demonstrates the effect of voltage ramps on the PUF SRAM. Given a ramp V(t)= t VDD/T (i.e., slope=VDD/T), f lipping bits are observed for slopes of high values. Flipping bits are created by capacitance mismatch, while most PUF - bits are due to voltage threshold differences (VTH). In other words, voltage ramps reproductively switch the value of some SRAM cells on power - up. A test RAM chip was designed with 180nm technology and simulated. Bit flipping was observed for T values below 15ms. Thanks to the firmware memory probe, we read 1KB of SRAM. We perform these operations N times to extract the PUF cells. The stati c authentication of the processor requires only one reading of the SRAM, which is compared to a reference; the observed error is about 0.1%. Fig13. SRAM PUF measurement results obtained with batches of 250 consecutive tries. These values decrease slight ly, about 5% for N between [250, 10000], and about 2% for N between [10000, 50000]. In our experiment, we record a set of 250 measurements in about 10 minutes; these data are aggregated to define N results (i.e., N/250 records). These results suggest that errors (i.e., an erroneous measurement of the state of a cell) occur randomly and increase with the duration of the measurement, like a Poisson distribution, according to a probability density function: ρ ( ݐ ) = λ e − λ t t being the measureme nt duration. What leads to an error probability : p ( ݐ ) = 1 − ݁ − ߣ . ݐ # λ . t So the number of cells always seen at zero or one decreases like: ݊ ( ݐ ) = ݊ 0 ( 1 − ߣ . ݐ ) Some PUF cells (about 5%) are sensitive to the voltage rise time and are cal led “flipping bits.” For a “high” slope (>200mV/s), they have a content b k , which is switched to (1 - b k ) for a “low” slope (<10mV/s). We define [17] Sy waveforms constructed with two slopes (see Figure 14, right - hand side), switching at voltage y, y=0 corre sponding to zero and y=1 to VDD. Therefore, S1 is the first slope, and S0 is the second. S0 (high slope) creates a flipping bit; S1 (low slope) does not create a flipping bit. We perform 25 measurements for each power - up with Sy, which allows us to estimat e the threshold value y for each flipping bit. Figure 14 (left - hand side) shows the results for some flipping bits; we observe a low y threshold value. Fig.14 Flipping - bits state according to y value for 25 measures (left part), Sy powering - up signal (r ight part) Dynamic processor authentication is based on flipping bits. We use the Slope & Square power - up waveforms [17] to set the state of the flipping bits. Rf is a square power - up waveform that creates flipping bits. We define the Slope & Square (Rs) w aveform with a small slope of 625/512 mV/mS up to 512mS and then a fast rise time (see Figure 15, bottom), which does not create flipping bits. Since the processor does not operate at the threshold voltage of the flipping bits (<500mV), it cannot predict t heir value at runtime. Fig15. Dynamic PUF (dPUF) (see text for comments) Figure 15 illustrates the static and dynamic authentication for the main processor of the crypto terminal. The upper left corner shows the result of 250 power - ups. SRAM cells alway s read to one are colored in green, those always read to zero are colored in yellow, and noisy bits (not always one or zero) are colored in white. The flipping bits observed for the Rf waveform versus the Rs waveform are colored in red. This bitmap is a ki nd of fingerprint of the processor. The upper right corner shows the threshold voltage distribution for the flipping bits, which switch below the processor operating voltage at low voltage. The lower left corner displays the comparison of the SRAM content for a single Rs waveform, with the reference obtained after 250 Rs. Only two errors (colored in red) are observed. The lower right corner shows the comparison of the SRAM content for a single Rf waveform, with the reference obtained after 250 Rs. Many erro rs (colored in red) are observed. VIII. P ROGRAMMING T OKEN AS R OOT OF T RUST The USBASP programming token is built on an ATMEGA8 microcontroller, with 1KB SRAM, 2KB FLASH for the bootloader, and 6KB for the firmware. By default, USBASP programmers do not have a bo otloader. We use the bootloader for three reasons: - To verify the bootloader’s integrity using an integrity probe. This firmware runs the bMAC algorithm, which calculates the authentication code displayed by blinking LEDs. - To authenticate the microcontr oller, thanks to a memory probe and dPUF measurements. First, two references are collected with the power - up waveforms Rs and Rf. Then, memory dumps are performed with the Rs and Rf waveforms. - To download the firmware required by the USBASP driver on the laptop side (e.g., Windows or Linux). On the laptop side, the bootloader runs under the USBASP protocol. Therefore, software such as AVRDUDE can be used to download firmware to the MCU; the programming token is able to flash itself. The bootloader is not activated by default, so the loaded firmware is executed. The bootloader is activated by a shortcut with the ground, with a time slot of five seconds, during which the internal flashing operation is activated. It should be noted that programming tokens can program each other, so a trusted USBASP card can flash untrusted devices. IX. C ONCLUSION In this article, we described a crypto terminal based on open hardware and software technologies. It is equipped with a set of countermeasures to thwart cyber attacks aga inst blockchain wallets. These innovative procedures, such as remote attestation or dynamic PUF, could also be deployed for other use cases, typically involving secure elements and an associated terminal. R EFERENCES [1] Nakamoto, S. (2008). Bitcoin: A peer - to - peer electronic cash system . Retrieved January 4 , 202 2 , from http://bitcoin.org/bitcoin.pdf [2] Munro , K. (2018). Hacking the bitfi . Retrieved January 4 , 202 2 , from https://www.pentestpartners.com/security - blog/hacking - the - bitfi - part - 1 [3] National Institute of Standards and Technology (2001). Security Requirements for Cryptographic Modules . FIPS140 - 2. [4] Armstrong, B. (2016). How Coinbase Builds Secure Infrastructure To Store Bitcoin In The Cloud , Retrieved January 4 , 202 2 , from https://blog.coinbase.com/how - coinb ase - builds - secure - infrastructure - to - store - bitcoin - in - the - cloud - 30a6504e40ba. [5] Sabt, M., Achemlal, M., and Bouabdallah, A. (2015). Trusted Execution Environment: What It is, and What It is Not . 2015 IEEE Trustcom/BigDataSE/ISPA, pp. 57 - 64, https:// doi .org/ 10 .1109/Trustcom.2015.357. [6] Hoenicke , J. (2015). Extracting the Private Key from a TREZOR . Retrieved January 4 , 202 2 , from https://jochen - hoenicke. de/crypto/trezor - power - analysis/. [7] Rashd , S. (2018). Breaking the Ledger Security Model . Retrieved January 4 , 20 2 2 , from https://saleemrashid.com/2018/03/20/breaking - ledger - security - model/ [8] Nedospasov , D., Roth , T., Datko , J. (2018). Wallet F ail . 35 th Computer Chaos Congress . Retrieved January 4 , 202 2 , from https://wallet.fail/ . [9] Urien, P., (2018) Crypto Terminal Bas ed On Secure Element For Consumer Trusted Blockchain Transactions . 16 th IEEE Annual Consumer Communications & Networking Conference (CCNC), 2019, pp. 1 - 2, doi: 10.1109/CCNC.2019.8651788. [10] Urien , P. (2020). Crypto Terminal: A New Open Device For Securing Blo ckchain Wallets . 2020 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) . https://doi.org/ 10.1109/ICBC48266.2020.9169410. [11] Zhiqun, C. (2000) Java card technology for smart cards: architecture and programmer's guide . A ddison - Wesley Profess ional . [12] Texas Instrument ( 2014 ). CC2540/41 System - on - Chip Solution for 2.4 - GHz, Bluetooth® low energy Applications, User's Guide [13] Fischl,.T ( 2011 ). USBasp - USB programmer for Atmel AVR controllers . Retrieved January 4 , 202 2 from https://www.fischl.de/usb asp [14] Asokan, N. et al (2018) . A SSURED: Architecture for Secure Software Update of Realistic Embedded Devices . IEEE Transactions on Computer - Aided Design of Integrated Circuits and Systems 37.11 . https://doi.org/10.1109/TCAD.2018.2858422 [15] Seshadri, A. , et al (2006). SCUBA: Secure Code Update By Attestation in sensor networks . WiSe '06: Proceedings of the 5 th ACM workshop on Wireless security . https://doi.org/10.1145/1161289.1161306 [16] Urien , P. (2020). Proving IoT Devices Firmware Integrity With Bijective MAC Tim e Stamped . IEEE 6 th World Forum on Internet of Things (WF - IoT) . https:// doi .org/ 10.1109/WF - IoT48130.2020.9221395. [17] Urien , P. (2020). Innovative Dynamic SRAM PUF Authentication for Trusted Internet of Things . 16 th International Conference on Wireless and Mob ile Computing, Networking an d Communications (WiMob). https:// doi .org/ 10.1109/WiMob50308.2020.9253432. [18] Elshafiey , A. T. , Zarkesh - Ha , P. and Trujillo , J. (2017). The effect of power supply ramp time on SRAM PUFs . 2017 IEEE 60 th International Midwest Symposi um on Circuits and Systems (MWSCAS) . https:// doi .org/ 10.1109/MWSCAS.2017.8053081. [19] Urien, P. (2019 ). Integrity Probe: Using Programmer as Root of Trust for Bare Metal Blockchain Crypto Terminal . 2019 Fifth Conference on Mobile and Secure Services (MobiSecSe rv) . https://doi.org/ 10.1109/MOBISECSERV.2019.8686637. [20] Thomson, J. (2011). Project Ouroboros - Reflashing A Betemcu USBasp Programmer , Retrieved January 4 202 2 , from https://jethomson.wordpress.com/2011/08/18/project - ouroboros - reflashing - a - betemcu - usbasp - pr ogrammer/ [21] Marcan, B, (2010). Console Hacking 2010, PS3 Epic Fail . 27 th Chaos Communication Congress, Retreived January 4 2022 from https://fahrplan.events.ccc.de/congress/2010/Fahrplan/attachments/178 0_27c3_console_hacking_2010.pdf [22] ARM (2009). ARM Security Technology Building a Secure System using TrustZone Technology , Retreived January 4 2022 from https://developer.arm.com/documentation/PRD29 - GENC - 009492 [23] Ukkonen, E. (1995). On - line construction of suffix trees . Algorithmica. 14 (3): 249 – 260. [24] RedBearLab (20 17). CCLoader . Retreived January 4 2022 from https://github.com/RedBearLab/CCLoader [25] Klimov, A., Shamir , A., (2002) . A New Class of Invertible Mappings . CHES, volume 2523 of Lecture Notes in Computer Science, page 470 - 483. Springer, [26] Rivest , R. L. (2001) Pe rmutation polynomials modulo 2 w . Finite Fields And Their Applications, 7, 287 - 292 . [27] Matthews R ., (1994) Permutation Properties Of The Polynomials 1 + x +…+x k Over A Finite Field . Proceedings of the American Mathematical Society, Volume 120, Number 1, Janua ry 1994 [28] Park, S.K., Miller, K.W, (1998) Random Numbers Generators: Good Ones Are Hard to Find . Communication of ACM , Volume 31, Number 10, pp1192 - 1201. [29] Saad , M., et al. , (2020) Exploring the Attack Surface of Blockchain: A Comprehensive Survey . IEEE Commu nications Surveys & Tutorials, vol. 22, no. 3, pp. 1977 - 2008, thirdquarter 2020, doi: 10.1109/COMST.2020.2975999. [30] Volety , T., Saini , S., McGh in, T., Liu, C. Z , and Choo, K. R., Cracking bitcoin wallets: I want what you have in the wallet . Future Gener ati on Comput er Syst em , vol. 91, pp. 136 – 143, Feb ruary 2019 , . doi.org/10.1016/j.future.2018.08.029 [31] Vasek, M., Bonneau , J., Castel lucci, R., Keith, C., and Moore, T., (2016) The bitcoin brain drain: Examining the use and abuse of bitcoin brain wallets . Proc eedi ngs of Financ ial Cryptography and Data Security, Feb ruary 2016, pp. 609 – 618 , doi.org/10.1007/978 - 3 - 662 - 54970 - 4_36 [32] Breitner, J., Heninger, N., (2019) Biased nonce sense: Lattice attacks against weak ECDSA signatures in cryptocurrencies . Proc eedings of Finan c ial Cryptography and Data Security , September 2019 , pp 3 – 20 , doi.org/1 0.1007/978 - 3 - 030 - 32101 - 7_1 [33] Young, A., Yung, M. , (1997) Kleptography: Using Cryptography Against Cryptography . P roceedings of Advances in Cryptolog - EUROCRYPT '97. Lecture Notes in Comp uter Science. Springer , Berlin, Heidelberg. pp. 62 – 74, doi.org/ 10.1007/3 - 540 - 69053 - 0_6 [34] Young, A., Yung, M., (1997) The prevalence of kleptographic attacks on discrete - log based cryptosystems . Kaliski, B.S. (eds) Advances in C ryptology - CRYPTO '97. CRYPTO 1997. Lecture Notes in Computer Science, vol 1294. Springer, Berlin, Heidelberg. doi.org/10.1007/BFb0052241 [35] Verbücheln , S. (2017) How Perfect Offline Wallets Can Still Leak Bitcoin Private Keys . arXiv:1501.00447 , 2017, doi.org/10.48550/ arXiv.1501.00447
{ "id": "2303.17206" }
2006.05483
Blockchain in the management of science: conceptual models, promises and challenges
Blockchain has received much attention recently, due to its promises of verifiable, permanent, decentralized, and efficient data handling. In 2017-2019 blockchain and associated technologies such as smart contracts has progressed beyond cryptocurrencies, and has been adopted in banking, retail, healthcare, and other fields. This study critically examines recent applications of blockchain in science, touching upon different stages of research cycle, from data management to publishing, peer review, research evaluation and funding. The paper is based upon a review of blockchain projects, relevant literature, a set of interviews and focus groups with startup founders, scholars, librarians, IT experts from the EU, USA, Russia, and Belarus. Proponents of blockchain for science present this technology as a tool to make science free from bias, red tape, data fraud, as well as provide innovative means to secure financial backing for new ideas. However, these projects face a set of challenges. One issue concerns introducing crypto economy, with its financial incentives, into science, a field that emphasizes disinterested and non-pecuniary pursuit of truth. Another source of concern relates to the ongoing conflict between the principle of decentralization inherent to blockchain and the practice of forcing it from above, by the state and other centralized entities.
http://arxiv.org/pdf/2006.05483v1
Artyom Kosmarski
cs.CY
cs.CY
Blockchain in the management of science: conceptual models, promises and challenges Blockchain has received much attention recently, due to its promises of verifiable, permanent, decentralized, and efficient data handling. In 2017 -2019 blockchain (and a ssociated technologies such as smart contracts) has progressed beyond cryptocurrencies, and has been adopted in banking, retail, healthcare, and other fields. This study critically examines recent applications of blockchain in science, touching upon differ ent stages of research cycle – from data management to publishing, peer review, research evaluation and funding. The paper is based upon a review of blockchain projects, relevant literature, a set of interviews and focus groups with startup founders, schol ars, librarians, IT experts from the EU, USA, Russia, and Belarus. Proponents of blockchain for science present this technology as a tool to make science free from bias, red tape, data fraud, as well as provide innovative means to secure financial backing for new ideas. However, these projects face a set of challenges. One issue concerns introducing crypto economy (with its financial incentives) into science, a field that emphasizes disinterested and non - pecuniary pursuit of truth. Another source of concern relates to the ongoing conflict between the principle of decentralization inherent to blockchain and the practice of forcing it from above, by the state and other centralized entities. Keywords: blockchain, management of science, research data, decentr alization, incentive design Highlights:  Blockchain technologies have provided a solution to challenges on all stages of the research cycle, from data sharing to publishing and funding.  This study examines use cases of blockchain in science, drawing upon systematic review of extant projects and a set of sociological interviews with stakeholders.  There is a tension between principles of decentralization and disintermediation inherent to blockchain, and the practice of implementing DLT solutions in a central ized way, by states and universities.  Introduction of token economy and crypto incentives into academia, while providing scientists with new funding opportunities, runs the risk of corrupting the operation of science as a collective disinterested search f or new knowledge. Artyom Kosmarski ( Артём Космарский ), Laboratory for the Study of Blockchain in Education and Science (LIBON), State Academic University for the Humanities (GAUGN), Moscow, Russia. kosmarski@gaugn.ru Funding This work was supported by the Russian Foundation for Basic Resear ch (RFBR), grant number 18 -29-16184. Artyom Kosmarski has done extensive research in the field of STS and anthropology of science. Blockchain caught his attention as a hotbed of various and sometimes unpredictable solutions to the grievances of academic community, as well as a pathway to a more flexible, grass -root and reputation -based governance of science. Right now Artyom is studying the implementation of smart contracts in universities (research project funded by the Russian Foundation for Basic Resea rch) and investigating the potential of token -curated registries as a basis for reputation metrics. He is also deputy head of the Laboratory for the Study of Blockchain in Education and Science (LIBON) at the State Academic University for the Humanities (G AUGN), Moscow. 1. Introduction1 The rapid development of blockchain (distributed ledger technology, DLT), building upon the success of Bitcoin, has made it a promising and potentially disrupting technology in a multitude of fields. In 2017 -2018 blockchai n (and associated technologies such as smart contracts) has been adopted in banking, retail, supply chain management, healthcare, even public administration (Chung -Shan Yang 2019; Tönnissen & Teuteberg 2019; Angraal, Krumholz, & Schulz 2017). The appeal of blockchain to industry and academia builds upon its promise to make data stable, transparent, and decentralized. A distributed ledger is a set of blocks connected by cryptographic tools in such a way as to make it impossible to change the content of one block without interfering with all other blocks. In this database, transactions are transparent, and the information about them is stored on the computers of all the participants. This decentralization prevents altering or destroying the data by infiltrat ing the core of the system. However, it is not the data handling but the social appeal of blockchain (Atzori, 2015) that has attracted the attention of academia. Principal advantages of blockchain in this perspective, apart from stability and verifiabili ty of data, is the guarantee of trust in the trustless environment and successful peer -to-peer interactions without the need for a central governing body ("the third party"). These features dovetail with the logic of modern science: it is international, de centralized – there is no governing body that decides everything (Polanyi, 1962) – and develops thanks to networks of trust within the academic community (peer review system 1 This preprint was submitted to the “Technology in Society” journal in October 2019. and invisible colleges ( Crane, 1972) . The analogy was not lost on a few early obse rvers: “Scientific information in its essence is a large, dynamic body of information and data that is collaboratively created, altered, used and shared, which lends itself perfectly to the blockchain technology ” (van Rossum , 2017: 8 ). Infrastructure and m anagement of science, on the contrary, is fraught with bias, red tape, data manipulation, and non -transparent black boxes (Bunge , 1963 ) on every level, from research data handling to funding, publishing, and research evaluation. How does the selection of reviewers for a manuscript submitted to the journal go? Who assesses the quality of a scientist's work? How and by whom are the recipients of a grant determined? The opacity of these processes, their inertia, bureaucratization, corruption often cause discon tent of scientists (Rockwell, 2009). Scientific research itself is also full of black boxes: p -hacking, ex post facto hypothesizing, and outright scientific fraud (Head , Holman, Lanfear, Kahn & Jennions, 2015 ; Fanelli , 2009 ). Thus, introducing blockchain i nto science might at least crack open some black boxes and make the processes inside them more transparent, reliable, and efficient. However, as science is not strictly business and still depends on public funding, blockchain and crypto projects were slo w to emerge in this field. The first tentative projects and academic publications appeared in 2015 -2016. Then, at the peak of the ICO boom in 2017, several startups promised to solve all the problems of science with their tokenized economy, some of them en ding up as scam (globex.sci, scientificcoin.com), others just petering out for the lack of funds (scienceroot.com). Eventually, blockchain for science proved more workable as a set of solutions for specific processes (peer review, data storage, funding, et c). At the same time, there has emerged an extensive network of scholars, IT -experts and crypto -enthusiasts, many of whom have joined Blockchain for Science association (blockchainforscience.com) and research groups in Europe and the USA. Finally, corporat ions began to enter this field – IBM, for instance, has obtained a patent for a platform for the collection and analysis of scientific data on the blockchain (Suberg, 2018) . Therefore, early experience of blockchain adoption in science management and organ ization makes it possible to review the challenges and barriers to its implementation. My paper is based upon a critical review of blockchain projects, relevant literature, a set of interviews (N=22) and focus groups (N=3) with startup founders, scholars, librarians, IT experts, and blockchain evangelists from EU, the USA, Russia, and Belarus. The interviews were taken in November 2018 – September 2019 in the framework of an interdisciplinary research project "Smart Contracts as an Instrument for Regulatio n and Administration of Science", supported by the Russian Foundation for Basic Research (RFBR). Participants were recruited through snowball sampling in social networks (the objective was to reach a varied sample of experts that have had an experience of organizing or evaluating DLT projects for science). The interviews were conducted in person or by Skype, and lasted on average 60 minutes. Focus groups (group discussions of a set of particular topics) were conducted in three universities, with professors, staff, and post -graduate students who have demonstrated awareness and interest in the issues of blockchain. The focus groups lasted 90 minutes. The paper is organized as follows: the next two sections present an overview of blockchain -based solutions fo r research data verification, academic publishing, and peer review. Section four outlines the challenges of introducing crypto economy (with its financial incentives and profit -seeking behavior) into science, a sphere that emphasizes disinterested and non - pecuniary pursuit of truth. Section five discusses the ongoing conflict between the principle of decentralization inherent to blockchain and the practice of forcing blockchain systems from above, by the state and other centralized entities. Finally, I disc uss the strengths and weaknesses of blockchain solutions in the context of digital economy and b2c IT products. 2. Blockchain and research data The replication crisis is arguably the most wide -scale crisis afflicting contemporary academia, particularly the social and life sciences. In many disciplines, the impossibility of reproducing experiments has brought about retractions of seminal studies. In psychology, for instance, researchers failed to reproduce the results of 59 of the 98 well -known works (Baker, 2015). A survey conducted by Nature in 2016 showed that more than 70% of the 1576 scientists surveyed tried and failed to replicate their colleagues' experiments (Baker, 2016) . In the biomedical sciences, the problem is no less acute (Ioannidis , 2005 ). However, non -reproducibility is only the tip of the iceberg. Science suffers from errors and distortions at all stages of the research cycle, from dubious data collection and protocol procedures to the distorting of evidence to fit the hypothesis (Simmo ns, Nelson, Simonsohn, 2011), as well as p -hacking (Head, Holman, Lanfear, Kahn & Jennions, 2015 ). The pressure to publish and journals' preference for positive rather than negative results (positive -results bias, see (Sackett , 1979 ) have lead to the forma tion of the so -called false chain of research: new studies are based on untested (and probably erroneous) old ones. However, these problems are not caused exclusively by the malicious intent of fraudulent scientists. There are many reasons for false data, from inevitable inaccuracies in large collaborations to salami -slicing (need to publish even small results as soon as possible in order to extend funding (Fochler & Sigl, 2018). Blockchain solutions could fix that by making the research cycle open and tran sparent, and by facilitating data sharing. Discoveries may be rapidly recorded in the distributed registry, indicating the authorship and date of discovery. Time -stamping on the blockchain acts as a novel way to protect ideas without resorting to (slower) patents and publications (Benchoufi & Ravaud, 2017 ; Moehrke, 2016 ). Furthermore, blockchain allows for tracking the entire scientific project from hypothesis to data collection and further analysis. The stability of data on the blockchain is essential here (all changes are trackable). By uploading the data into such database and making it open to a broader academic community, researchers will no longer be able to tamper with it, rigging the data to achieve necessary results, remove outliers, etc. ( Blockchai n for Open Science and Knowledge Creation : 13-18) However, regardless of the fact that virtually every text on blockchain in science praises the potential of this technology to overcome the replication crisis and to foster open, fraud -free science, little progress has been made in this direction. The first reason is technical: recording vast amounts of research data on the blockchain requires considerable computation power, and for most blockchains currently in use it would be a long and expensive process. Second, transparency and availability of research data on DLT require mass support of scientists. If only a handful of enthusiasts pursues this task, it w ill not become the norm for the academic community, and this would compromise the whole project. Next , making all research data transparent and verifiable takes researchers' time without bringing apparent benefits in their careers. Therefore, open science on the blockchain could probably be implemented only from above, forced upon the scientists by public agencies and foundations. This fact is grudgingly acknowledged even by blockchain enthusiasts : “The state should fund Blockchain and related digital infrastructure, there is no other option. It is a difficult and complex task. You can't do these things th rough short -term grants or private money " (D., decentralized data startup founder). The big public agencies in Europe and other Western countries are still too distrustful of DLT (at this early stage of their development). Also, individual researchers lack resources and initiative to "blockchainify" their workflow. Therefore, this trend of DLT for research data is rather slow to develop. Another avenue for open science on the blockchain lies in encouraging transparency through material incentives. In other words, a DLT platform with its tokens and rules that make adherence to open science (e.g., open and valid data, negative results made public) lucrative for scientists. The EUREKA platform (eurekatoken.io) has advanced in this direction, promising to rewar d scholars with tokens for publishing both positive, negative, and uncertain results. Also, a separate token fund is allocated to pay for replication studies and experiments aimed at increasing reproducibility. The success of this initiative, however, depe nds on the price of EUREKA tokens on the market (after a forthcoming ICO). Even still, the pegging of open science principles to the vagaries of market speculation (the forces beyond scientists' control) is risky at best. 3. Blockchain and academic publ ishing Academic publishing is passing through turbulent times – the crisis of subscription model, the rise of open access journals, and potentially disrupting Plan S with its forceful drive of compulsory transition to open access journals (Else, 2018) . Regardless of the payment model, the publishing cycle is extremely slow: writing an article, submitting it to a journal, searching for reviewers, getting feedback, and finalizing takes months if not years (Smith, 2006). Researchers are involved in the race f or priority, but the current system significantly slows down the exchange of results, let alone ideas. Finally, the process itself is deeply flawed. Double -blind review frequently turns out to be pseudo -anonymous, with little limits to reviewers' bias (Wan g, Kong, et al., 2016). Also, reviewers are increasingly overworked and underpaid (Kovanis , Porcher , Ravaud & Trinquart , 2016) . The need for incentives in peer review, e.g., “academic dollars” was voiced well before the advent of cryptocurrencies (Pruefer & Zetland, 2009). The advantages of blockchain technology for solving these problems are quite obvious. Minimally, it provides notarization. Recording a text or even a draft idea on the blockchain (time -stamping) allows a scientist to assert priority and intellectual property rights, and then he or she might freely share it as a preprint. Further, the decentralization and disintermediation principles behind blockchain suggest an independent publishing platform where authors and reviewers interact directly with each other in a p2p network, with no need for excessive publishing and subscription costs. Not surprisingly, this idea has been so appealing that virtually each blockchain startup in science promised an open access platform (scienceroot.com, eurekatok en.io, pluto.network, orvium.io). However, the success of these platforms has been so far limited, with less than a hundred papers in each: scientists prefer to publish in established journals relevant to their research communities. This trend is well -known in the sociology of innovation (Dahlin, 2014) : the revolutionary benefits of new technology are insufficient to draw users away from customary practices. Moreover, running an academic journal on an automated system of smart contracts is an arduous task , and developing an efficient ecosystem for several journals with their own rules and principles is a process beyond the scope of current blockchain projects (Janowicz , Regalis , et al., 2018). There is another way to integrate blockchain into academic pu blishing – by putting in into the service of corporations . "Blockchain for Peer Review", a project implemented jointly by the developer Katalysis (katalysis.io) and the Digital Science (a technology company), has followed this path. Its main goal is to dev elop a protocol that would allow collecting information about reviewers from publishers, storing it on the blockchain, and then making it possible to evaluate the work of reviewers while maintaining their anonymity. In other words, the distributed register allows recording the connection between the reviewer and the manuscript without revealing the author's public identity. Players such as Springer Nature, Taylor & Francis, Cambridge University Press, and ORCID are already involved in the project. However, this approach to DLT is entirely devoid of critical disrupting qualities of blockchain – decentralization, elimination of the third party (such as publishers). "Blockchain for Peer Review" has met criticism from the community, precisely because it's a narr ow, technical and corporate solution that does not bring about any disruption to the broader scientific ecosystem. 4. Blockchain, research funding, and incentivization Research funding is fraught with bias, cumbersome, non -transpare nt, and ineffective procedures – the "black boxes" mentioned above. Furthermore, scientists have to spend a great deal of their time writing reports, grant applications, and doing paperwork (Link , Swann & Bozemann, 2008 ). Finally, a pressing problem is the shrinking of fundi ng. Governments are gradually moving away from large -scale research funding, hoping that business, industry, and private foundations will replace it (Mervis, 2017). How could DLT fix these issues? First of all, an automated system of disbursement of funds with transactions on smart contracts will significantly reduce overhead costs and ease the burden on accountants, auditors, and scientists themselves. It would save them from filling out a lot of papers and make the whole process of allocation and distribu tion of funds more efficient. Also, a funder might set a combination of conditions (e.g., citations, articles, datasets) and peg the grant money to the fulfillment of these conditions (through smart contracts) – this approach is implemented in the DEIP blo ckchain ecosystem (deip.world) . However, the innovative drive of DLT lies in the fact that science funding and incentive structures may be easily changed with blockchain. " We can experiment with new money distribution schemes, grant schemes, and that woul d bring about cultural change. With blockchain, things would change much quicker ” (S., blockchain evangelist) . Entering the cryptocurrency sphere gives the scientist a chance to find money from investors whose interests and outlook are very different from universities . In such cases, blockchain will provide investors with a guarantee against scams and roguish projects: all the initial data and development of the research can be traced, and the allocation of funds can be pegged to the achievement of certain milestones. Moreover, one could receive tokens if their research results are validated independently by others, or used in their future work, as an economic equivalent of citation. Thus token economy creates a potentially powerful channel for financing an d implementing breakthrough ideas, even in basic science (Blockchain for Open Science and Knowledge Creation : 25) In this sense, crypto -economic tools give more independence to scholars, opening an alternative channel of recognition and funding, giving sci entists a clear economic interest to engage in the crypto economy. In the end, science would get more independent economic agents, apart from the state and big funding agencies and philanthropies. " There we have more opportunities for more independent play ers, and for more intermediaries – and that is an interesting contradiction, as they say that blockchain is all about disintermediation. And we will probably have more players here, with less bureaucracy and more efficient, blockchain -based ways to redirec t money in different directions ” (L., librarian ). However, these innovations are not easily adopted. Most scientists are not entrepreneurs working for themselves and pursue their goals within complex institutional structures, while the latter are not alwa ys friendly towards new technologies.” Smart contracts might efficiently indicate expenses of the lab – test animals, chemical agents, etc. – and allocate necessary funds. But what if you have an accountants office working with these expenditures, for many years, 50 people in all, who would think of firing them? ”. (E., researcher). Furthermore, the dubious reputation of crypto -economic tools (ICO scams, hacker attacks targeting crypto wallets), sluggish transaction speeds of many blockchains makes university authorities doubt the practicality of introducing DLT into their finances. However, these are merely technical issues, easily to be overcome in the near future, as the technology matures. There is a more fundamental challenge to merging the crypto -econo my with science. At the heart of Bitcoin, the most successful blockchain project, as envisaged by its architect Satoshi Nakamoto, lies an incentive system. Bitcoin arranges incentives and rewards for all members of its ecosystem (miners, users, developers) in such a way that the output is stable, secure, and at the same time decentralized digital currency. It is through incentives that Satoshi Nakamoto has ensured that behavior beneficial to the common good of the system is encouraged and that harmful behav ior is blocked (Nakamoto, 2008) . Incentive design principles were conceptualized as one of the key benefits of blockchain. They entered other cryptocurrencies and then got integrated into more complex and di verse projects. The developers laid down what be havior will be encouraged by the participants. The mechanism of encouragement itself is material: through tokens, which ultimately turn into money. Finally, the third important feature of incentive design is voting and decision -making by a simple majority of votes. For example, Gnosis, Augur, and other predictive markets on blockchain encourage users to make accurate predictions and bet on the results of these predictions. Steemit social network rewards popular posting with tokens (popularity is determined by the number of votes cast, i.e., upvoting). Various token -curated registries (Goldin, 2017) encourage the creation of authoritative lists (cafes, universities, media), encouraging responsible voting for or against the inclusion of a unit in the list. Th us, blockchain has made it possible to create powerful incentive machines (McConaghy, 2018). However, incentive design might go rogue as one moves the field where living creatures, not machines, make decisions. In Bitcoin, incentives are automatic and embe dded within the system so that people are not required to make decisions all the time (it is enough to just mine). When this mechanism is replicated in science, for instance, it would hardly be realist ic to expect rational behavior from the actors. Humans are subject to cognitive biases, herd instincts, often prefer short -term gains to long -term benefits (Verbin, 2018) Moreover, the "engine" of most blockchain startups is the system of tokens, which motivate scientists, vote, connect individual system node s, and, ultimately, attract investors. The “tokenization” of science is a dubious enterprise . For scientists, the desire for recognition and the pursuit of truth – non-monetary incentives – are no les s important than material ones ( Jindal - Snape & Snape, 2006). Introduction of quantitative metrics and market mechanisms might corrupt science as a social institution: “ when you introduce monetary incentives into Wikipedia or peer review, you destroy them ”(L., librarian) . In addition, market logic (when everyone strives to maximize their profits) atomizes the scientific community, further undermining the logic of science as the collective search for the truth, when the common goal is more important than individual career success - the Mertonian norm of disinteres tedness (Merton 1973; Higginson et al. 2016). We face a dilemma: blockchain for scienc e initiatives intend to build a self-regulating system run by scientists themselves, stimulating scientific progress in a self -governing sphere, but this new vision is ba sed on a race for rewards and monetary incentives. The advantages of the crypto economy (new funding opportunities, more freedom) are partially offset by the reluctance of scientists to take on the role of business people. Not every researcher is ready to act as an investor or a startup manager who attract s investments for their project. Blockchain – democracy or coercion? Apart from a set of technical solutions, blockchain in science is turning into a movement within academia, with its ideology and wide -ranging goals. The impetus of this movement is mounting dissatisfaction with the oligopoly of large publishing houses, the "tyranny of metrics" (Muller, 2018) and indicators, the alarming growth of biased and non -reproducible research, the “prec ariatizatio n” of scientists . Blockchain addresses these concerns with its promise to radically restructure the rules of the game in science: transparent transactions and decision -making, tokens as flexible incentives, new communities based on common rules set in code (Berg, 2017) , decentralization, and an opportunity for scientists themselves to determine what is important (for example, to encourage reproducible research). However, the practical applications of blockchain in science often run afoul of this ideology. Academics face vigorous time constraints and are naturally reluctant to engage in community projects that demand active participation, discussion, voting, and other obligations of participatory democracy (Pateman, 2012) . “The state is motivated to employ b lockchain to investigate research fraud. The state, the university, not the scientists themselves. We planned to structure the whole process of evaluating publications and dissertations in our university on the blockchain. But the project failed because no body was motivated. Everybody cares only about her data, and not about checking and evaluating her colleagues' input ” (A., vice -principal ). In the meantime, corporate players are beginning to take an interest in blockchain in science ( Suberg, 2018; Novot ny, Zhang et al. , 2018). This development reflects the general dynamics of blockchain's fortunes: creators and enthusiasts of technology conceived it as a path to digital democracy, life without banks, states, and corporations, whereas DLT are becoming a tool to optimize management processes and strengthen the power of the same states and private companies. "Corporations enjoy a significant head start in the race to program their logics into mainstream blockchain applications, as well as the capacity to ena ct state policies that block new applications threatening future disintermediation... the corporatization of blockchain toward the ends of corporate sovereignty. ( Manski & Manski, 2018). Corporate applications aside, DLT itself, as a technology, is not so decentralized and libertarian as its creators and evangelists have portrayed it – blockchain coders and developers enjoy an advantage over ordinary users, effectually acting as sovereign authority of their platforms [Manski 156]. As one interviewee put it, “Buterin [co -founder of Ethereum] preaches decentralization, but the meta -platform which sets the basic rules, the infrastructure on which a whole lot of independent projects and tokens is based, belongs to him. Decentralized autonomous organizations (DAO s) on Ethereum are not truly independent because they are founded on his code. The more numerous and independent these projects become, the more his monopoly is entrenched ” (O., researcher ). Finally, as blockchain technologies are implemented from above, b y the states eager to make use of transparency and data permanence that DLT offers, the scientists face the perspective of increased control and coercion – an extra obligation to register all their data on the blockchain, for instance. Proponents of new te chnology hail this as an essential step towards better science (van Rossum , 2017: 11 ), but from an end -user perspective, this could look more like a burden than an advantage. Conclusion Taking into consideration ambitious goals and reasonable ideas put forward by blockchain projects in science, it is slightly surprising that no platform or application has yet become an unquestionable success story . This slow tempo of innovation may be explained by legal uncertainties surrounding smart contracts and cryp tocurrencies ( thus making universities and public foundations wary). Another barrier – to make use of DLT projects, users should be minimally aware of the basic principles of DLT, which is rarely the case outside computer science. Last but not least, certa in infrastructural conditions are to be met: fast and reliable Internet, sufficient computing power to confirm transactions, solving the problem of user identification, and access to cloud services (Rachovitsa 2018: 21) . Quite a few universities, especiall y in developing countries, cannot ensure these conditions. However, other trends are more favorable towards the implementation of blockchain in the management of science. In recent years, scholars all over the world have been increasingly mastering cloud applications aimed at automating different stages of the research cycle: note - taking (Evernote), collaborative writing (Authorea, GoogleDocs, Overleaf), references and citations management (Mendeley, Zotero), data exchange (Figshare, GitHub). Experimental approaches have permeated the practice of science, be it new publishing models (open access), new metrics, such as altmetrics, new forms and practices of reviewing (open peer review, collaborative peer review). Blockchain fits into this trend quite natura lly. The problem is, existing DLT projects for science lack a "killer app", simple and efficient, aimed at solving one or maximum two problems evident to thousands of scientists – an approach modeling the success of the applications mentioned above. Projec ts under development lean toward complex solutions, ecosystems that reshape whole rules of the game. Such an ambitious approach is riskier and would succeed only if enough stakeholders throw their weight behind a specific project. "Introducing a blockchain for research and its successful adoption will depend on the collaboration between all stakeholders: funders, government, institutions, publishers, and researchers themselves, whether in their role as researcher, reviewer, editor or author" (van Rossum, 20 17: 15) . One could argue that blockchain has every chance of creating new opportunities and opening new avenues in the management of science. But mere promises of a brighter digital future are not enough. To make it to the top, DLT projects in science sho uld succeed in reaching out to individual scientists, as well as to the scores of fragmented academic “tribes” (Becher & Trowler, 2001) . Successful applications should integrate seamlessly into existing practices and procedures into scientists' daily lives , should their work more comfortable rather than more demanding. Finally, they should prove to key stakeholders, especially the universities and major foundations, that blockchain provides a standard of accuracy, transparency, and reliability. Conflict o f interest statement The author declares no conflict of interest. Funding This work was supported by the Russian Foundation for Basic Research (RFBR), grant number 18 -29-16184. Angraal , S., Krumholz , H. M., Schulz , W. L. (2017) Blockchain Technology: Applications in Health Care. Circulation. Cardiovascular quality and outcomes , 9 (10), e003800 . https://doi.org/10.1161/CIRCOUTCOMES.117.003800 Atzori, M . (2015). Blockchain Technology and De centralized Governance: Is the State Still Necessary? (December 1, 2015). http://dx.doi.org/10.2139/ssrn.2709713 Baker , M. Over half of psychology studies fail reproducibility test (2015). Retrieved f rom Nature News. Accessed 20 October 2019. https://www.nature.com/news/over -half-of- psychology -studies -fail-reproducibility -test-1.18248 Baker, M . 1,500 scientists lift the lid on reproducibility (2016). Retrieved from Nature News. Accessed 20 October 2019. https://www.nature.com/news/1 -500-scientis ts-lift-the-lid-on- reproducibility -1.19970 Becher, T., & Trowler, P. R. (2001). Academic tribes and territories: intellectual enquiry and the cultures of disciplines . (2nd ed. ed.) Buckingham: Open University Press/SRHE. Benchoufi M, Ravaud P. (2017) Blo ckchain technology for improving clinical research quality. Trials . 18, 335 . https://doi.org/10.1186/s13063 -017-2035 -z Berg, C . (2017) Delegation and Unbundling in a Crypto -Democracy (July 13, 201 7) http://dx.doi.org/10.2139/ssrn.3001585 Blockchain for Open Science and Knowledge Creation. Living document . Accessed 20 October 2019. https://docs.google.com/document/d/1Uhjb4K69l0bSx7UXYUStV_rjuPC7VGo0ERa - 7xEsr58/edit Bunge , M. (1963) . A General Black Box Theory. Philosophy of Science. 4 (30), 346-358. https://doi.org/10.1086/287954 Crane, D. (1972) I nvisible colleges. Diffusion of knowledge in scientific communities . Chicago and London: The University of Chicago Press. Dahlin, E. C. (2014). The Sociology of Innovation: Organizational, Environmental, and Relative Perspectives . Sociology Compass, 8, 671-687. https://doi.org/10.1111/soc4.12177 Else, H. (2018) . Radical open -access plan could spell end to journal subscriptions. Nature , 561, 17-18. https://doi.org/10.1038/d41586 -018-06178 -7 Fanelli , D. (2009) . How Many Scientists Fabricate and Falsify Research? A Systematic Review and Meta -Analysis of Survey Data. PLOS One . (May 29, 2009) . https://doi.org/10.1371/journal.pone.0005738 Fochler , M., Sigl , L. (2018) . Anticipatory Uncertainty: How Academic and Industry Researchers in the Life Sciences Experience and Manage the Uncertainti es of the Research Process Differently. Science as Culture , 3 (27), 349-374. https://doi.org/10.1080/09505431.2018.1485640 Goldin , M. (2017). Token -Curated Registries 1.0 (white paper). Access ed 20 October 2019. https://docs.google.com/document/d/1BWWC__ - Kmso9b7yCI_R7ysoGFIT9D_sfjH3axQsmB6E/edit Head , M. L., Holman , L., Lanfear, R., Kahn , A.T. Jennions , M. D. (2015). The Extent and Consequences of P -Hacking in Science. PLOS Biology (March 13, 2015). https://doi.org/10.1371/journal.pbio.1002106 Higginson , A. D., Munafò ,M. R. (2016) Current Incentives for Scientists Lead to Underpowered Studies with Erroneous Conclusions. PLOS Biology (November 10, 2016). https://doi.org/10.1371/journal.pbio.2000995 Ioannidis , J. P. A. (2005 ). Why Most Published Research Findings Are False. PLOS Medicine . (August 30, 2005). https://doi.org/10.1371/journal.pmed.0020124 Jindal‐Snape , D., Snape , J. B. (2006) Motivation of scientists in a government research institute: Scientists' perceptions and the role of management. Management Decision , 10 (44) , 1325 -1343. https://doi.org/10.1108/00251740610715678 Janowicz , K., Regalia , B., Hitzler , P., Gengchen Mai, Delbecque , S., Fröhlich , M., Martinent , P. & Lazarus , T. (2018) On the prospects of blockchain and distributed ledger technologies for open science and academic publishing. Semantic Web , 8, 545-555. Kovanis, M., Porcher, R., Ravaud, P., & Trinquart , L.. The Global Burden of Journal Peer Review in the Biomedical Literature: Strong Imbalance in the Collective Enterprise . PLOS One (November 10 , 2016 ). https://doi.org/10.13 71/journal.pone.0166387 Link, A. N., Swann , C. A. and Bozeman , B. (2008). A time allocation study of university faculty. Economics of Education Review , 4 (27), 363-374. https://doi.org/10.10 16/j.econedurev.2007.04.002 Manski, S. & Manski, B. (2018). No Gods, No Masters, No Coders? The Future of Sovereignty in a Blockchain World. Law Critique , 29, 151. https://doi.org/10.1007/s10978 -018- 9225 -z McConaghy , T. (2018). Can Blockchains Go Rogue? Accessed 20 October 2019. https://blog.oceanprotocol.com/can -blockchains -go-rogue -5134300ce790 ] Merton , R. K. (1973) The Normative Structure of Science. I n R. K. Merton, The Sociology of Science: Theoretical and Empirical Investigations (pp. 267 -278). Chicago: University of Chicago Press. Mervis , J. (2017) . Data check: US government share of basic research fundin g falls below 50% . Retrieved from Science (News). Accessed 20 October 2019. https://www.sciencemag.org/news/2017/03/data -check -us-government -share -basic -research - funding -falls-below -50 Moehrke , J. (2016) . Blockchain and Smart -Contracts applied to Evidence Notebook. Accessed 20 October 2019. https://healthcaresecprivacy.blogspot.com/2016/08/blockchain -and- smart -contracts -applied.html Muller , J. Z. (2018). The Tyranny of Metrics . Princeton: Princeton University Press . Nakamoto , S. Bitcoin: A Peer -to-Peer Electronic Cash System. Accessed 20 October 2019. https://bitcoin.org/bitcoin.pdf ] Novotny, P., Zhang Q., Hull R., Baset S.. Laredo J., Vaculin R., Ford D., & Dillenberger D. (2018). Permissioned blockchain technologies for academ ic publishing. Information Services & Use , 3 (38), 159-171. https://content.iospress.com/articles/information -services -and- use/isu180020 Pateman, C . (2012). Parti cipatory Democracy Revisited. Perspectives on Politic ,. 10 (1) , 7-19. https://doi.org/10.1017/S1537592711004877 Polanyi, M. (1962). THE REPUBLIC OF SCIENCE: Its Political and Economic Theory. Minerva, 1(1), 54-73. http://www.jstor.org/stable/41821550 Prüfer , J. Zetland , D. (2009) An auction market for journal articles. Public Choice , 3 (145) , 379-403. http://dx.doi.org/10.2139/ssrn.1005304 Rachovitsa , A. (2018). Blockchain 4 Open Science & SDGS. In A. Zwitter & J. Herman (Eds.), Blockchain for sustainable development goals (pp. 19 -21). Groningen: University of Groningen. Rockwell, S.T. (2 009). The FDP Faculty Burden Survey. Research Management Review, 16 2, 29-44. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2887040/ van Rossum , J. (2017) Blockchain for Research. Perspe ctives on a New Paradigm for Scholarly Communication. Digital Science Report. Accessed 20 October 2019. https://doi.org/10.6084/m9.figshare.5607778 Sackett , D. L (1979) . Bias in analytic research . Journal of Chronic Diseases , 1-2 (32) , 51-63. https://doi.org/10.1016/0021 -9681(79)90012 -2 Simmons , J. P., Nelson , L. D., Simonsohn , U. (2011) False -Positive Psychology: Undisclosed Flexibili ty in Data Collection and Analysis Allows Presenting Anything as Significant. Psychological Science , 11 (22), 1359 -1366. https://doi.org/10.1177/0956797611417632 Smith , R. (2006) . Peer review: a fl awed process at the heart of science and journals . Journal of the Royal Society of Medicine , 4 (99), 178-182. https://doi.org/10.1177/014107680609900414 Suberg , W. (2018). IBM Targets Scientific Research in Latest Blockchain Patent . Retrieved from Cointelegraph. Accessed 20 October 2019. https://cointelegraph.com/news/ibm - targets -scientific -research -in-latest -blockchain -patent Tönnissen, S., Teuteberg , F. (2019) A nalysing the impact of blockchain -technology for operations and supply chain management: An explanatory model drawn from multiple case studies . International Journal of Information Management . In Press, Corrected Proof . https://doi.org/10.1016/j.ijinfomgt.2019.05.009 Verbin , E. (2018). Behavioral Crypto -Economics: The Challenge and Promise of Blockchain Incentive Desig n. Accessed 20 October 2019. https://medium.com/berlin -innovation - ventures/behavioral -crypto -economics -6d8befbf2175 ] Yang , C. S. (2019) . Maritime shipping digitalization: Blockchain -based technology applications, future improvements, and intention to use . Transportation Research Part E: Logistics and Transportation Review , 131, 108-117. https://doi.org/10.1016/j.tre.2019.09.020
{ "id": "2006.05483" }
1905.08517
Blockchain in the Government Technology Fabric
Fuelled by the success (and hype) around cryptocurrencies, distributed ledger technologies (DLT), particularly blockchains, have gained a lot of attention from a wide spectrum of audience who perceive blockchains as a key to carry out business processes that have hitherto been cumbersome in a cost and time effective manner. Governments across the globe have responded to this promising but nascent technology differently - from being apathetic or adopting a wait-and-watch approach: letting the systems shape themselves, to creating regulatory sandboxes and sponsoring capacity building, or in some instances (arguably) over-regulating and attempting to put the blockchain genie back in the bottle. Possible government role spans across a spectrum: regulating crypto-currencies and initial coin offerings (ICO), formulating regulatory frameworks for managing the adoption of blockchains, particularly in critical infrastructure industries, facilitating capacity building, and finally, embracing blockchain technology in conducting the activities of the government itself - be it internally, or in using them to deliver public services. In this paper we survey the last, namely, the use of blockchain and associated distributed ledger technologies in the government technology (GovTech) stack, and discuss the merits and concerns associated with the existing initiatives and approaches.
http://arxiv.org/pdf/1905.08517v1
Anwitaman Datta
cs.CY, cs.CR
cs.CY
BlockchainintheGovernmentTechnologyFabric AnwitamanDATTA1 1SchoolofComputerScienceand Engineering,NTUSingapore Correspondence AnwitamanDATTA,SchoolofComputer ScienceandEngineering,NTUSingapore Email:anwitaman@ntu.edu.sgFuelledbythesuccess(andhype)aroundcryptocurrencies, distributedledgertechnologies(DLT),particularlyblockchains, havegainedalotofattentionfromawidespectrumofaudi- encewhoperceiveblockchainsasakeytocarryoutbusiness processesthathavehithertobeencumbersomeinacostand timeeffectivemanner.Governmentsacrosstheglobehave respondedtothispromisingbutnascenttechnologydiffer- ently-frombeingapatheticoradoptingawait-and-watch approach:lettingthesystemsshapethemselves,tocreating regulatorysandboxesandsponsoringcapacitybuilding,or insomeinstances(arguably)over-regulatingandattempt- ingtoputtheblockchaingeniebackinthebottle.Possible governmentrolespansacrossaspectrum:regulatingcrypto- currenciesandinitialcoinofferings(ICO),formulatingregu- latoryframeworksformanagingtheadoptionofblockchains, particularlyincriticalinfrastructureindustries,facilitating capacitybuilding,and finally,embracingblockchaintechnol- ogyinconductingtheactivitiesofthegovernmentitself-be itinternally,orinusingthemtodeliverpublicservices.In thispaperwesurveythelast,namely,theuseofblockchain andassociateddistributedledgertechnologiesinthegov- ernmenttechnology(GovTech)stack,anddiscussthemerits andconcernsassociatedwiththeexistinginitiativesand approaches. KEYWORDS (Supra)nationalBlockchain,E-government(E-gov),Digital Government,GovernmentTechnology(GovTech) 1arXiv:1905.08517v1 [cs.CY] 21 May 2019 2 ANWITAMANDATTA 1|INTRODUCTION Sincearoundtheturnofthecentury,withtheriseofInternetpenetration(aroundthedot.comboomandbust),many governmentsacrosstheglobeembracedtheuseofonlineservices(Heeks(2001)),bothasachannelfordelivering servicestoitscustomers,aswellasformanagingthebackendandinternalprocesses.Fromthoseearlydaysofe- government(e-gov),whichtheOECDde finesas‘theusebythegovernmentsofinformationandcommunicationtechnologies (ICTs),andparticularlytheInternet,asatooltoachievebettergovernment ’(OECD(2014)),overthenextroughlytwo decades,wehavearrivedatajuncture,whereriseindigitalliteracy,nearsaturationofinternetpenetrationinadvanced societies,particularlyenabledbyubiquityofsmartphonesandmobileinternetinfrastructure,aswellasadvnaces inbigdatamanagementandanalyticsenabledarti ficialintelligence(AI)techologies,putusinasweetspot,where muchmorethantheoriginalobjectivesofe-governmentande-governance(forinstance,asoutlinedinOECD’se- governmentimperativedocument(Fieldetal.(2003)))canbeachieved.TheOECDemphasizesthisbroaderscopewith adistinctnomenclature‘digitalgovernance’,andde finesitasthe“useofdigitaltechnologies,asanintegratedpartof governments’modernisationstrategies,tocreatepublicvalue.Itreliesonadigitalgovernmentecosystemcomprisedof governmentactors,non-governmentalorganisations,businesses,citizens’associationsandindividualswhichsupports theproductionofandaccesstodata,servicesandcontentthroughinteractionswiththegovernment”(OECD(2014)). Whileoftenthetermse-government/governance1anddigitalgovernmentarealsousedinterchangably,thedistinct OECDde finitionshelpcapturesubtleyetfundamentalchangesthathaveemergedovertime.Prominently,whilethe coremissionofcateringtothepublicatlargeremainsthesame,themeanshasexpandedinitsscope,andtheemphasis hasshiftedfromthegovernmentsdeliveringitontheirowntocreatinganenvironment,whereitcanbedoneusing public-privatepartnerships,aswellasbyfacilitatingpurelyprivatelyfundedeffortsto flourish.Thisisbeingachievedby creatinganecosystemcomprisingdigitalinfrastructureandregulatoryframeworksonwhichthediverseparticipants canbuildupon. Forinstance,manycountriesandcitieshaveembarkedonsmartcityinitiativesinthelastdecade.Theriseofapp basedridesharingandhailingservicesisanexampleinstanceofhowprivatepartiesareaddressingurbantransportation needs.Sharingeconomyingeneral,asaphenomenon(Heinrichsetal.(2013);Martin(2016)),forbetterorworse, exempli fiesthismodelfurther.InFigure1weshowtheGoogletopicssearchtrend,(nottobetreatedasanirrefutable evidenceoftheargumentwehaveputforward,butmore)asoneplausibleindicator.Wenoticethatsearchesforthe topic‘Smartcity’haveincreasedovertime.Furthermore,thein-setmapindicatesthatthistermdominatesinmanyof thedigitallyadvancedcountrieswhichembracede-governmentearlyon,andhencehavemovedupthedatavaluechain. Whilethedrivetowardssmartcitiesisjustoneamongmanyaspectsofdigitalgovernment,itencapsulatesthegeneral trendofmovingupinthedatavaluechain,thatisevolvingfromtheoriginaldigitizationdrivewhichwasfocussedon creatinganelectronicchannelfordeliveringcitizenservicesandmanagingbackendgovernmentwork flows. Thereareseveralintertwinedandcascadingfactorsatplayinthisevolution.Whatstartedasamovefrompaper basedwork flowstodigitization,ledtocreationofahugevolumeofdatathatisreadilyavailableforautomated processing.Theinfrastructuretostoreandprocesshumongousvolumeofdatastartedtomature,evenasthevolume ofdatabeingacquiredalsokeepsrisingbyleapsandbounds.Thisdatacomesfromaplethoraofsources,andisvery diverseinnature-socialmedia,sensorsdeployedformonitoringtheenvironment,cities,buildings, financialrecords, healthrecords,tonamejustafew.Analysingthisdatayieldsintelligence,andcreatesopportunities,bothforsolving (andidentifying)problems,aswellasthepositivesocietaland financialimpactsuchsolutionsyield. 1Thedistincttermse-governmentande-governancearesometimesusedtodistinguishtheuseoftechnologyformanagingthegovernment’sinternalactivities versusservicedeliverytocitizens.Nevertheless,forbrevity,inthispaper,wewillusetheterme-goverment,andlikewise,digitalgovernment,tocaptureboth meanings. ANWITAMANDATTA 3 FIGURE 1 Datafromgoogletrendsforthetopicsof‘E-government’and‘Smartcity’worldwidefortheperiodfrom January2004tillApril2019wereobtained(on2ndMay2019).Thenormalizedrelativefrequenciesareplottedhere. Therelativedominanceoftheindividualtermsineachcountryisalsodepictedinthein-setmap(withthecolor correspondingthedominantterm),obtainedfromtheGoogletrendswebsite https://trends.google.com/ .Forthe creationofthemap,lowsearchvolumeregionswereincluded(greyregionsindicatelackofadequatedatastill). Acommonunderlyingthemeinallthisistheavailabilityandsharingof(goodqualityof)data.However,thereare severalchallengesthathamperthis,tonameafewprominentones:dataintegrationandportability(Doanetal.(2012)), privacy,distributedcontrol,provenanceanddatausagetransparency. Therearenumerousprivacyissues,andnotalltheissuesareevenwellunderstood.Thisincludesquestionsof accesscontrol(whoshouldgetwhatdata),informationleakandsidechannels(evenifaspeci ficdatainitselfmaynot primafacierevealsomething,inconjunctionwithsomeotherinformation,itmayrevealsomethingmorethanwhat eachoftheindividualpiecesofinformationdisclosed).Evenwithindifferentgovernmentagencies,sharingcertain datamaybeviolativeoftherightsofacitizenasperthelawsofthecountry.Sharingitwithnon-governmententities compoundtheconcerns.Lackof(wellthoughtof)regulationsalsoleadtomanygreyareas.Furthermore,individual dataaggregatorsneedtosatisfytheasscoiatedprivacyandsecurityrequirements,andtheymayalsowanttocontrol thedatatheyowninamannerwheretheycanaccountforitsusage. Forwhicheverreasons,thedatainthesystemmaybeofpoorquality,oroutrightwrong.Evenotherwise,itwould bereasonabletoexpectcertainaccountabilityonthesourceoftheinformation.Thus,dataprovenanceandlineage, alongwithabilitytotracewhoallhaveaccessedsaiddata,andforwhichpurposes,arealsoessential. Technologicalsolutionsarethusneededtostore,process,andsharedatainasecuremanner,balancingtheneeds (aspirational,aswellas,often,regulatory)ofutilityandprivacyinahighlydistributedenvironment,involvingmany autonomousentities,whichmaynot(fully)trusteachother.Blockchaintechnologieshaveemergedasapotential candidateprovidingaframeworktoaddressseveraloftheseconcerns.Atthisjuncture,itisworthemphasizingthat, blockchains(i)maynotbetheonlyway,orthebestway,tosolvetheabovementionedproblems,(ii)maynotevenbe solvingalltheproblemsenumeratedhere(letaloneotherissuesnotmentioned).Nevertheless,itisacandidatesolution thatcannaturallyaddressissuessuchasdistributedcontrolamonguntrustedentities,andprovidescertainextentof flexibilities,whichiswhytheyarebeingtriedoutinaplethoraofapplicationdomains. Itisinthisbackground,promptedbothbyneedandpotentialbutalsohype,thatseveralgovernmentshavestarted pilotprojectsofusingblockchainsaspartofthegovernmenttechnologystack. 4 ANWITAMANDATTA Intherestofthispaper,we firstbrie flyreviewdistributedledgerandblockchaintechnologiesinSection2,thenin Section3wereport(inanon-exhaustive,butrepresentativemanner)onseveralgovernmentblockchaininitiatives,and finallyinSection4wedrawourconclusionswithacritiqueoftheseearlyefforts. 2|BACKGROUND:BLOCKCHAINS DLTversusblockchains NationalInstituteofStandardsandTechnology(NIST,U.S.DepartmentofCommerce)de finesblockchainsas “tamperevidentandtamperresistantdigitalledgersimplementedinadistributedfashion(i.e.,withoutacentral repository)andusuallywithoutacentralauthority(i.e.,abank,company,orgovernment)”(Yagaetal.(2018)).Thus,one cancharacterizeablockchainwithfoursalientproperties:(i)immutability(append-only)datastructure,(ii)replication ofthedataacrossmultipleparticipants,(iii)whetherandhowparticipationisrestricted,and(iv)howtheparticipants establishanagreement(consensus)onhowtoaddnewdatatotheexistingdata. Thisimmutabilityproperty-whereanychangestoexistingrecordscanbedetected(tamperevident),anditis prohibitivelycostlyifnotimpossibleforone,oraminorityoferrantparticipantsmaintainingthedistributedledger tointroduceillegitimatechanges(tamperresistant),makeblockchainsparticularlyappealingforawiderangeof applicationsandscenarios.Storingrecordsof financialtransactionsisanaturalsuchapplication,andblockchainshave beenpopularizedbytheirusageforemostinBitcoin,andsubsequentlybyaplethoraofotherdigital(crypto)currencies whichleverageoncryptographyforbothguaranteeingintegrityoftherecords(asisachievedusinghashingandchaining torealizeablockchain),aswellasformakingitprohibitivetoalterpastrecordsorinsertarbitrarynewrecords(e.g., Bitcoinusescryptographicpuzzlesforproof-of-worktoallowadditionofnewblocksintheblockchain)andforthe purposeofauthenticationandauthorization(e.g.,publickeycryptography,speci ficallydigitalsignaturesareusedin Bitcointodeterminethelegitimacyofspeci ficBitcoinsbeingspent).Butmanyotherapplications,particularlywhenever anyformofauditisdesirable,wouldbene fitfromsuchanimmutabledatastructure.Evenforapplications,where theinformationbeingstoredisinherentlymutable,forexample,propertyorlandownershiprecords,medicalhistory records,etc.,theoverlyingapplicationcanleverageanimmutabledata-structureunderneathtorecordthehistoryof changes,whileusingthelatestversionastheworkingdata. Thereplicationofinformationacrossmultiplesitesisanecessityforenforcingtheimmutabilityandintegrityofthe informationstoredintheblockchain,where,thereplicatedsitesactaswitnesses,sothatunilateralchangestopast recordsorintroductionofnewrecordsarenotfeasible,andinsteadthedecisionsaremadebyestablishingaconsensus onthesharedstate. Sincethestateoftheblockchaincanbeupdatedonlythroughconsensusamongthemultiplesitesmaintaining it,theblockchaincanalsobeusedtoestablishtrustamonginherentlyuntrustedentities.Userscanestablishasmart contractusingsomeprogrammelogic(anddata):forexample,changethenameagainstwhichapropertyisregistered, providedacertainamountofmoneyispaidtotheoriginalownerofsaidproperty,andrelyontheblockchaintocarry outthepaymentwithtokenizedmoneyandenforcethenamechange. Finally,sincetheinformationstoredintheblockchainisvisibletoeverypartipatingreplicationsiteintheblockchain (andwhoeverelsehaveaccesstothedatetherein,moreonthisbelow),whichisdesirableforaudit,itmayappear undesirablefromtheperspectiveofprivacyorcon fidentialityofinformation.However,creativeworkaroundtopreserve privacyandcon fidentialitymaybepossibleforawiderangeofapplications,bystoringaproxyinformation(tokenization) whichinitselfdoesnotrevealthecontent,butcarriesenoughinformationforthespeci ficpurposeoftheapplication. Forinstance,ifonewantstoprovethatadigitialdocument(e.g.,educationalcerti ficate)wasgenuinelyissuedbycertain ANWITAMANDATTA 5 organization,justacryptographichashsummaryofthedigitallysigneddocumentmaybestoredintheblockchain. Whentheoriginaldocumentispresentedbytheownertoanyspeci ficpartyscrutinizingthedocument,thescrutinizer canvalidatethatthedocumentwasindeedregisteredwiththeblockchainbythelegitimateentityauthorisedtoissue saiddocument,while,thepresenceofthesaidsummaryintheblockchainrevealsnousableinformationinitself.Having saidthat,theissueofinformationleakfromdatastoredinblockchain,particularlywhencoupledwithsideinformation thatmightbeavailabletoanadversary,isstillnotathoroughlyunderstoodproblem,andisatopicthatwouldneed substantialfurtherresearch. 2.1|Permissionless,PermissionedandPrivateBlockchains Blockchainscanbebroadlyclassi fiedasbeingpermissionlessorpermissioned.Permissionlessblockchainsareopenfor anyonetoreplicatetheblockchaindataandparticipateinthe(consensus)processtoupdatethesame. Permissionedblockchainsincontrastrestrictthoseparticipatinginthemaintenanceoftheblockchain.Thisrestric- tionmightbeimposedinacentralizedmannerorinadecentralizedmanner.Oneexampleofcentralizedmembership controlwouldbethatagovernmentagencydecideswhoallcanparticipate.Anexampleofdecentralizedmember- shipcontrolcouldbethatexistingmembersofanallianceoforganizationscollectivelydecidetoincludeorrevoke memberships. Furthermore,inapermissionedblockchain,thedataintheblockchainmaybeavailable(tobeaccessed/read) exclusivelytoacertainsetofentities/individuals-makingitaprivateblockchain. BlockchainissupposedtoprovideamechanismtoderivetrustTheEconomist(2015)amongagroupofentities whichdonotinherentlytrusteachother.Inapermissionlessblockchain,wherethereisnoaprioritrustamongentities, moreexpensivemechanisms(e.g.,solvingcyptographicpuzzlesasproof-of-workNakamotoetal.(2008))arerequiredin ordertomitigatemalbehavingparticipants.Incontrast,inpermissionedorprivateblockchains,acertaindegreeoftrust amongtheparticipantsisinherently(andimplicitly)assumed,andassuch,itallows flexibilityintheextentofstringency requiredtoachieveconsensus. 2.2|Forks,Side-chainsandCross-chaining Differentmembersmaintaningablockchainmaytrytoadddistinctnewblockssimultaneously,whichleadstowhatis calledforking.Suchdivergenceiseventuallyreconciledthroughaconsensusmechanismtoarriveataconsistentshared history.However,thisprovidesaninterestingopportunity,whereby,whiletheparticipantsagreeonthepasthistory thathasbeenestablished,new/differentrulescanbeimposedforde finingwhatisavalidnewblock.Ifthenewblocks arestillcompatibleandvalidaspertheoldersetofrules(backwardcompatible)itscalledasoftwork,while,otherwise, itiscalledahardfork.Suchforkingalsoallowstheoriginalcommunityofmembersmainainingablockchaintosplit,and createnewcommunities,withasharedhistoryuptillatimepoint,anddifferentonesfromthepointofforking. Itmaybeundesirabletoputallinformationintheblockchain,eitherbecauseitoverloadsthesystem,orbecause ofotherconcernssuchascompatibility,ortocarryoutexperimentationswithoutinterferingwiththecontentofthe blockchain,orsimplytokeepcertaininformationoffthemainchain.Suchcasesareaccommodatedbyrunningparallel ledger(s)maintainedindependently,whichhowevercross-reference(s)theprimaryblockchain,andmayalsousethe primaryblockchainforrecordingcertain(butnotallthe)statesofsuchparallelledgers,whicharethencalledside-chains. Finally,separateblockchainsmaywanttointerchangeamongthemselvesthestoreddata/informationorthe associateddigitalassets,andthisleadstothenotionofanetworkofinter-operablebutindependentblockchains,i.e., cross-chainingButerin(2016). 6 ANWITAMANDATTA 3|BLOCKCHAINUSE-CASESFORDIGITALGOVERNMENT Notaryandregistryservices: Themostnaturalapplicationofagovernmentserviceofblockchainisanotaryservice. Drawingonthis,registryforanyrealworldassetscanalsobebuiltusingablockchain.Thisisindeedoneofthecanonical usecasesofblockchainbeingpilotedinmanyplacesEder(2019);CastellanosandBenbunan-Fich(2018).Different variationsexist,governmentledorbackedinitiatives,aswellasprivateentitiesmirroringthegovernment’slandregistry recordonablockchain. Ingeneral,registryservicesofallsortscanberealizedusingblockchain,e.g.,aregistryof companiesSmartDubai.ae(2016);TheMaltaIndependent(2019). Digitalidentity: TheEuropeanUnionBlockchainObservatory&Forum( https://www.eublockchainforum.eu ),an EuropeanCommissioninitiative,identi fiesdigitalidentityasafundamentalbuildingblockLyonsetal.(2018a)that canberealizedusingablockchain,toactasadigitalequivalentofgovernmentissuedidentitydocuments. Sucha mechanismideallyneedstohave flexibility,suchthatonlyrelevantaspectsofthedigitalidentityareexposed,without revealingotheraspectsofidentityinformationnotrelevantforthegivencontext,thusaffordingindividualsadegree ofsovereignityinmanagingtheiridentity.Itisenvisagedthatsuchanidentityservicecanbeleveragedtoprovidea widerangeofotherservices.Somepilotcasesthathavetriedidentityservicesusingblockchainsincludee-voting2 andbikerental3triedinZug,Switzerland;workertrainingcerti ficationandcheck-in/outatworksitescarriedout bySwissrailways4,debitcardsforrefugeeswithoutotherdocumentationsorbankaccountinFinland5. Allthe threeusecasesfromSwitzerlandthatarementionedhereusedapublicblockchainbaseddecentralizedidentity service( https://www.uport.me ),whiletheFinnishinitiativewasinliasionwithaprivateenterprise,Moni.Estonia, consideredapioneerindigitalidentity,usesablockchainvariantcalledKSI(KeylessSignatureInfrastructure),created byGuardtimeeestonia.com(2008).TheEuropeanUnionregulationeIDAS(electronicIDenti fication,Authentication andtrustServices)mandatesadigitalidentitysystemthatinteroperatesacrossEU,howeveritsomewhatpredates therecenthypearoundblockchaintechnologies,anditdoesnotutilizeblockchainasthecoreinfrastructuretorealize it,butuseofandwithblockchainsisunderdeliberationServidaandMunoz(2018).TheID2020ID2020.org(2014)is anotherpublic-privatepartnership,whileDecentralizedIdentityFoundationDIF(2017)isanindustryalliance,both aimedatrealizingblockchainenableddigitalidentityinaglobalscale.Inthedigitalidentityspace,wethusseeuseof bothpermissionlessaswellaspermissioned/privateblockchains,ledbygovernment,public-privatepartnerships,as wellasprivateentities. Digitalcerti ficatesandrecords: Theideasofaregistryservice,alongwithidentity,naturallyextendstoarepositoryof certificatesandrecords.Thesecouldbeinherentattributes(intrinsictotheindividual,forexample:dataofbirth/death, biometrics,health),attributesaccumulatedorcreatedovertime(healthrecords,educationalcredentials,wealthand associatedpropertyand financialrecords,will&testament),orassigned(e.g.,governmentIDnumbers,creditriskscore). TheserecordsfurthermorecanbegroupedasperthefrequencywithwhichtheychangeMorrisetal.(2018).Finally,a thirddimensionrelatestoaccessrightsandprivacy/con fidentialityrequirementsoftheserecords,namelywhohave therighttoaccesswhichpartsofsaidrecords,andwhohaverighttoupdatesaidrecords.Thesuitabilityofstoring thespectrumofsuchrecordsoverblockchain,meetingtheaccesscontrol,con fidentiality,(system)accessandchange logging,andcontentupdatedynamicsrequireexploration.Blockchainusetocurbdegreefraudincountriesasdiverse asMalaysia6andMaltaPatel(2018)havebeenproposed.HashbasedintegritycheckandloggingisusedforEstonia’s 2https://medium.com/bitrates-news/swiss-city-of-zug-successfully-completes-blockchain-based-e-voting-trial-b ˆb„‚ƒe†cdc 3https://medium.com/uport/zug-residents-can-now-ride-e-bikes-using-their-uport-powered-zug-digital-ids- ˆed„‚acŠd‡ƒ‚ 4https://medium.com/linum-labs/swiss-federal-railway-trials-first-digital-identity-pilot-on-ethereum- …a„cb„c‡‡ƒ‚ 5https://www.wired.com/story/refugees-but-on-the-blockchain/ 6https://www.nst.com.my/news/nation/ ƒ‚‰ /‚‚/…ƒŠ‡‚† /university-consortium-set-authenticate-degrees-using-blockchain ANWITAMANDATTA 7 electronichealthrecords7,andmanyhealthcareindustryusecasesfromdrugtraceability8toinsuranceDeloitteare expectedtoimprovethequalityofdata,serviceandcosttodeliverthesame.Again,mostoftheseareinexploratory pilotstageatthemoment,andrangesfromgovernmentledeffortsliketheonefromEstonia,toalliancesofprivate companiessuchastheSynapticHealthAlliance9. Sovereign/ fiatcurrency:Giventhatblockchain’spopularityinthepastdecadeoriginatesfromthesuccessofcryptocur- rencies,useofblockchaintosupportdigitalsovereign fiatcurrencies(asidethemanyprivatesector financialtechnology innovationattempts)isnatural.Sinagpore’sprojectUbinTheMonetaryAuthorityofSingapore(2017),understew- ardshipoftheMonetaryAuthorityofSingaporeandincollaborationwithmajor financialinstitutions(theAssociation ofBanksinSingapore(ABS))carriedoutpilotstudiesofinter-banktransactionsusingdigitalledgertechnologies,and developedthreemodelsfordecentralisedinter-bankpaymentandsettlements.WhiletheSingaporeprojectused theblockchaintechnologysolelyasadistributedledgerforrecordingthetransactionsusingtokenizedcoins,“Crypto Franc”wasproposedasabond10,withitsvaluepeggedtotheSwissfrancona1-to-1basis,wherepermissionednodes federatingSwissCantonswereproposedtoenforcetheadherencetoregulatoryrequirements,andtomaintainthe ledger.Thestatusofthisproposalisambiguousatthetimepointthisarticleisbeingwritten,andingeneral,thereseems nogovernmentlevelsupportorintentforasovereignSwissdigitalcurrency11.Anotablebutdubious(becauseofthe politicalbackground)andapparentlydefunctattemptwasVenezuela’sOilandMineralbackedPetrocurrency.Marshall island,throughSovereignCurrencyActof2018RepublicoftheMarshallIslands(2018),introducedanewblockchain basedcurrencycalledtheSovereign(‘SOV’),andironically,planstoissuephysicalnotesforthedigitalcurrency.AJuly 2018articlesurveysthestatusofstateissueddigitalcurrenciesonitsadoption,explorationandpossiblerejection11. Aplatformfordatamanagementacrossmultiplestake-holders(anddigitaltwinning): Theterm‘digitaltwins’ hasrootsinthecyber-physicalsystemscommunity,butitcanbemorebroadlyinterpretedasSaddik(2018)“Adigital replicaofalivingornon-livingphysicalentity. Bybridgingthephysicalandthevirtualworld,dataistransmitted seamlesslyallowingthevirtualentitytoexistsimultaneouslywiththephysicalentity.”Inthatcontext,adiverserange ofapplications,includinghealthmonitoringdevices;IoTenabled‘smart’solutionsacrossaspectrumofscale-smart home,building,city;supplychains,canallbeseeasprojectingadigitaltwin.Blockchaincanserveasareal-timedata managementframeworktoenabledigitaltwinningforthewholelifecycle(fromdataacquisitiontologgingitsaccess providingprovenance,integrityaswellasaccountabilitywithaudittrailandtransparency). Amulti-stakeholderdatasharingplatform,whichactsasanaturalaggregatorofdata,andallowssecuredata management(including,facilitatingdataownerssovereignityoversaiddata)andthusenablesbothdigitalgovernment aswellasnon-governmentalapplications(thisistermedas‘Blockchainplatformasaservice’inLyonsetal.(2018a)) canthusbeseenastheholygrailforablockchaininthegovernmenttechnolgystack.Severalgovernments,atcity, state,countryaswellassupra-nationallevels,havedeployed,starteddevelopingorexpressedinterestinexploringthe provisioningofsuchmulti/omni-purposeblockchains.ProminentexamplesincludeDubaiSmartDubai.ae(2016),State ofIllinoisMorrisetal.(2018),Estoniaeestonia.com(2008),SwitzerlandSwisscom(2018),Australia12,andEUthrough EuropeanBlockchainPartnership13. 7https://e-estonia.com/solutions/healthcare/e-health-record/ 8https://www.ibm.com/blogs/blockchain/ ƒ‚‰ /‚ƒ/what-are-the-use-cases-for-blockchain-tech-in-healthcare/ 9https://www.synaptichealthalliance.com 10https://www.swissinfo.ch/eng/stable-coin_crypto-bond-catapults-swiss-franc-onto-blockchain/ ……†‚ƒ‰‰ 11https://cointelegraph.com/news/state-issued-digital-currencies-the-countries-which-adopted-rejected-or-researched-the-concept 12https://www.minister.industry.gov.au/ministers/karenandrews/media-releases/advancing-australias-blockchain-industry 13https://ec.europa.eu/digital-single-market/en/news/european-countries-join-blockchain-partnership 8 ANWITAMANDATTA 4|CRITIQUE:STATEANDTHECHAIN Theembraceofblockchainsinthegovernmenttechnologystackisinitsnascence.Consequently,despitenumerous newsarticles,pressreleasesandwhitepapers,actualtechnicaldetailsregardingmostoftheinitiativesareoftensparse, sometimescontradictory,orjustabsentfromthepublicdomainintheseearlydays.Furthermore,designanddecisions mayjustnotyetbe finalized,andsothingsnaturallychange.Whilewehavetriedourbestto filteroutthelatestrelevant andcorrectinformation,itisapttonoteatthisjuncturethatsomeofthepointswemakeheremayinadvertentlybe somewhatoffthemark,ormaybecomeobsoleteovertime. Justlikeweseediverseformsofeconomicsystemsingeneral,wherecoreservicesforcitizens(suchashealth care,transportation, financialservices,utilities)areprovidedinsomeinstancesbysolelygovernmentagencies,in others,byonlyprivateentities,inyetothers,inprivate-publicpartnerships,and finally,alsoinformswhereprivateand governmentrunentitiesbothoperateandcompeteinthemarket;fromtheexampleswehavediscussedabove,wesee anechoofsimilardifferentformatsinthegovernmenttechnology(GovTech)spaceingeneral,andforblockchainsfor GovTechinparticular. Fortherestofourdiscussionshere,wefocusonthreeaspects:(i)blockchainsupportfordigitalsoverigncurrency, (ii)blockchainasaplatformfordigitalidentity,and(iii)thenatureoftheunderlyingblockchaininfrastructure.The otherspeci ficusecases,suchasregistryservicesorrepositoryfordigitalrecords,allinturnrelyontheunderlying infrastructureandtheidentityservice. Digitalsovereigncurrency: InLyonsetal.(2018a),thefollowingargumentisforwarded“Anotherimportant buildingblock,inouropinion,ishavingdigitalversionsofnationalcurrenciesontheblockchain,forexamplethrough blockchain-basedcentralbankdigitalcurrencies(CBDCs).Makingitpossibleforlegaltendertobecomeanintegralpart ofblockchaintransactionswillmakeiteasiertoreapthebene fitsofnewtechnologieslikesmartcontracts.Onasystemic level,CBDCscouldbringthebene fitsofdecentralisationtointer-bankpaymentsandreal-timegrosssettlementsystems, amongotherthings”. Thereareseveralcryptocurrency flavouredapproachestorealizeadigitalsoverigncurrency,Venezuela’sPetro (nowapparentlydefunct)andMarshallIslands’‘theSovereign’(whichalsoisplannedtocomewithphysical‘banknotes’) cometomind.Whilethereissomelevelofenthusiasmaboutsuchdigitalsoverigncurrencies(tobedistinguisedwiththe non-state-backedcryptocurrencies),itisratherunnecessaryandatokenizationbasedapproachshowcasedinproject Ubinisapragmaticsolutiontorealizecentralbankdigitalcurrencies(CBDCs). ToquoteTheMonetaryAuthorityofSingapore(2017):“theSGD-on-ledgerisaspeci ficusecouponthatisissued onaone-to-onebasisinexchangeformoney.Thecouponshaveaspeci ficusagedomain–inourcaseforthesettlement ofinterbankdebts–butnovalueoutsideofthis.Oneisabletocashoutbyexchangingthecouponsbackintomoneylater ...SGD-on-ledgerhasthreeusefulpropertiesthatmakeitsuitedtoourprototype.First,unlikemoneyinbankaccounts, wedonotreceiveinterestontheonledgerholdings.Theabsenceofinterestcalculationsreducesthecomplexityof managingthepaymentsystem.Second,toensurefullredeem-abilityoftheSGD-on-ledgerformoney,eachtokenis fullybackedbyanequivalentamountofSGDheldincustody.Thismeansthattheoverallmoneysupplyisunaffected bytheissuanceoftheonledgerequivalentssincethereisnonetincreaseindollarclaimsonthecentralbank.Third, SGD-on-ledgerarelimiteduseinstrumentsandcanbedesignedwithadditionalfeaturestosupporttheusecase–such assecurityfeaturesagainstmisuse.” ThethreehighlightedpropertiesfromtheprojectUbinreportemphasizetheimportanceofresponsiblyusing blockchainwithoutcreatinginstabilitywhilesolvingactualpainpointsofdigitial financialactivitiesthatexistwithlegacy infrastructure:particularlythattheprocessesareunnecessarilycomplexwithrespecttothefunctionalitiesprovided, makingthesolutionsinef ficient(slowerand/orexpensive).Suchatokenizedapproachalsoallowsanaturalintegration ANWITAMANDATTA 9 ofthecurrencywithotherwork flowsandfunctionalitiesthatmaybecarriedoutoveramulti/omni-purposeblockchain platform. DigitalIDinamulti-stakeholderenvironment: Digitalidentityhasbeenrepeatedlyemphasizedasoneofthe ‘killerapps’ofgovernmentblockchains.Forinstance,toquoteMorrisetal.(2018):“Acitizen-centricdigitalidentity modelbasedondistributedledgertechnologiescouldbeusedtoconsolidatedisparatedatathatcurrentlyexists acrossmultipleagenciesandlayersofgovernmentintoanetworkcenteredaroundacitizen’sorbusiness’credentials, licensesandidentityattributes.Itwouldenablecitizenstoviewtheirpublicserviceidentityviaanidentityappon theirsmartphoneandsharerelevantdatawithgovernmenttoaccesspublicservices.”AEuropeanUnionBlockchain Observatory&ForumreportLyonsetal.(2018a)likewisestates“Oneofthemostimportantrequirementsinbuilding adigitaleconomyandsocietyisviabledigitalidentitiesforallparticipants,whetherindividuals,companies,public agenciesor,increasingly,machinesandotherautonomousagents.Theneedtobeabletoidentifyourselvesandothers issoimportant,infact,thatitisconsideredtheessentialprerequisiteformostusecases.”Manyotherwhitepapers WorldEconomicForum(2016);TheWorldBankGroup(2018);AustraliaPost(2016);Willars(2019)havelikewise elaboratedtheimportanceofdigitalidentityintherecentyears. TheEstonianblockchainatitscoredealswithdigitalidentityeestonia.com(2008),andseveraloftheproposed governmentrunblockchainsaimtoprovideandutilizedigitalidentityinsomemanner.Yet,someoftheworld’slargest digitalizedidentitysystemsareinfactnotblockchainbased.ThisincludesEU’selectronicIDenti fication,Authentication andtrustServices(eIDAS14),India’sAadhaar15whichistheworld’slargestworld’slargestbiometricIDsystem managedbyUniqueIdenti ficationAuthorityofIndia(UIDAI)andChina’ssocialcreditsystemTheEconomist(2016). Sotheperformanceatscale,orthemulti-stakeholderusagescenariosinthemselvesdonotneccessitatetheuseofa blockchain.Oneargumentforusingblockchainsisthenotionof‘self-sovereigndigitalidentity’Willars(2019).Inthis(as wellasmanyothersecuritybene fitsthatareassumedand/orpromisedwithblockchain,suchasmoregenerallydata sovereignty,portability,privacyandsecurity,integrityandaudittrail),thenuancesofhowtheunderlyinginfrastructure isactuallydesigned,deployedanduseddetermineswhetherthesecurityguaranteesareactuallyrealized.Itistoo earlytocommentonhowID2020.org(2014)orDIF(2017)technologystackevolves,butwewillthusdiscuss(below) thespeci ficmodelusedineestonia.com(2008).Overall,whatisfactualisthatblockchainbaseddistributedledger technologycanbeusedtosupportdigitalidentity.However,itisnotasingularoptiontodoso,norarealltheassumed securityguaranteesinherentinvariants. Theinfrastructurebehindablockchainasamulti/omni-purposeplatform: Asrecentlyasearlierthisyear,on9 February2019,theEuropeanMedicinesVeri ficationSystem(EMVS)16waslaunched17.Suchanapplicationperfectly fitsablockchainusecase,giventhescaleandmulti-stakeholdernatureofthesystem.It(tothebestofourunderstanding) howeverdoesnotuseblockchaintechnologies.Inanycase,manylarge-scalemulti-stakeholdersystemsingeneralexist andoperatemeetingtheirdesignobjectives.Whiletechnologicallynotsingular,andmanyotheralternativerealizations arepossible(asexempli fiedbydeployedsystems),oneargumentinfavourofablockchainistoexposeitasaplatform orservice,wherenewapplicationscanbemodularlyintegrated,ratherthanhavingtodesignanddeploydifferent systemsfromscratchforindividualapplications.Incidentally,sincesuchsystemsarebeingbuiltgroundup,theyareina positiontoavoidsomeoftheproblemsfacedbymanylegacysystems,suchaspoorlystructured,non-standardizeddata, interoperabilityacrosssystems(thoughblockchaininteroperabilityisstillanopenresearchissueLyonsetal.(2018b); Buterin(2016);Rutter(2017))andtheabilitytomigratethedatato/fromanothersystem.Whilethesearenotinherent 14https://ec.europa.eu/digital-single-market/en/trust-services-and-eid 15https://uidai.gov.in/my-aadhaar/about-your-aadhaar.html 16https://emvo-medicines.eu/mission/emvs/ 17https://emvo-medicines.eu/new/wp-content/uploads/EMVO-Press-Release-EMVS-Launch.pdf 10 ANWITAMANDATTA propertiesofblockchain,thecreationofanewdigitalinfrastructureprovidesacoincidentalopportunity. InLyonsetal.(2018b,a),somedesigndilemmasarediscussedatlength.Forinstance,atop-downapproachwhere thegovernmentdeploys(andpossiblyenforces)theusageofasingleblockchainforeverygovernmentrelatedpurpose, willhelpwiththeaforementionedstandardizationbydefault,andyet,itmayleadtoasinglevendorlock-in,whilelacking theflexibilitytoaccommodateallpossibleusecases.ManyofthenationalblockchaininitiativesSmartDubai.ae(2016); Swisscom(2018);eestonia.com(2008)appeartobefollowingthisapproachofasinglestandardizedblockchain.Incon- trast,uncoordinatedexperimentationsofdifferenttechnologiesbydifferentagenciesmayleadtoduplicationofeffort, aswellasfragmentationofplatforms.InLyonsetal.(2018a)amiddlegroundisadvocated:“ flexible,cloud-basedshared infrastructurethathostsdifferentprotocolsaswellasdevelopertools,andanintegrateddevelopmentandoperations environment”.Theauthorsfurtheradd“Ashared“sandbox”approach,evenonefeaturingmultipletechnologies,should alsofosterknowledgesharingandmakeiteasierforagenciestoworktogethertoensureinteroperability”.Particularly forasupra-nationalset-upsuchastheEU,thisapproachmaybeinevitable,sinceindividualmemberstateswouldlikely embraceaspectrumofblockchainsolutions. Whiletheabovedesigndilemmasarerelevant,inthispaper,wewanttohighlightafewother,arguablymorecritical issues,thatneedscarefulattention. ConsidertheKSIblockchain(usedineestonia.com(2008)),quotingGuardtime(2015)regardingdataprivacy guarantees:“KSIdoesnotingestanycustomerdata;dataneverleavesthecustomerpremises.Insteadthesystem isbasedonone-waycryptographichashfunctionsthatresultinhashvaluesuniquelyrepresentingthedata,butare irreversiblesuchthatonecannotstartwiththehashvalueandreconstructthedata-dataprivacyisguaranteedatall times.”.Sincetheblockchaindoesnotstoretheactualdata,primafaciedataprivacyisachievedusingtheblockchain, whilealsovalidatingdataintegrity.However,dependingonthenatureofthedata/application-ifitissomethingthat residesonanoff-chainstoragerepositoryandiscorrupted,theblockchainwouldbeabletodetectsuchcorruptionupon usageofsaidoff-chaindata,butitdoesnotsupportpreventionorcorrection(forwhich,outofchainmechanismswould berequiredinawelldesignedsystem).Likewise,thecon fidentialityofsuchdatamaystillbeviolatediftheoff-chain repositoryisbreached.Fortheelectronicvotingsystemi-Voting,eestonia.com(2008)states:“theEstoniansolutionis simple,elegantandsecure.Duringadesignatedpre-votingperiod,thevoterlogsontothesystemusinganID-cardor Mobile-ID,andcastsaballot.Thevoter’sidentityisremovedfromtheballotbeforeitreachestheNationalElectoral Commissionforcounting,therebyensuringanonymity.Withanymethodofremotevoting,includingtraditionalpostal ballots,thepossibilityofvotesbeingforcedorboughtisaconcern.Estonia’ssolutionwastoallowvoterstologon andvoteasmanytimesastheywantduringthepre-votingperiod.Sinceeachvotecancelsthelast,avoteralwayshas theoptionofchanginghisorhervotelater.”Howeversuchbroadandstrongclaimofsecuritycallsforskepticism.For instance,side-informationsuchastimeofauthentication/communicationmightrevealwhoaspeci ficpersonvoted for,evenifthatinformationisnotexplicitlystored.WearenotassertingthattheEstonianblockchaindeploymentin theire-Governmenttechnologystacknecessarilysuffersfromallthesevulnerabilities,andinfact,itisverylikelythat sometheseconcernshavebeenlookedintoandmanyfurtherlayersofprotectionhavebeendeployed.Thepurpose ofthisdiscussionusinghypotheticalsistoemphasizethattheblockchaindoesnotandcannotprovidearangeof securityguaranteesinastand-alonemanner,yetweoftenseeamarketingpitchinthelinesof‘itssecurebecauseitisa blockchain’. Ineestonia.com(2008)itisfurtherstated:“WithKSIBlockchaindeployedinEstoniangovernmentnetworks, historycannotberewrittenbyanybodyandtheauthenticityoftheelectronicdatacanbemathematicallyproven.It meansthatno-one–nothackers,notsystemadministrators,andnotevengovernmentitself–canmanipulatethedata andgetawaywiththat.” However,generallyspeakingtheclaimthatdataisimmutablebecauseitisonablockchain(whichistheone ANWITAMANDATTA 11 fundamentalfunctionalityablockchainissupposedtoprovide)mayoverlooksomefundamentalissues.Inthespeci fic caseofeestonia.com(2008),theblockchainisfurtherpublishedinthephysicalmedia(newspapers),whichare subscribedbymanylibrariesspreadworldwide,creatingagloballydispersedphysicalbackupwhichisnightoimpossible totamper. Publicblockchainsarehugelyinef ficientforthepurposesofe-Governmentusecases.Fromusabilityandcost perspectives,thesolerationalchoiceistousepermissioned(andevenprivate)blockchains.Forinstance,Swisscom (2018)states“SwissPostandSwisscomareconnectingtheirexistingprivateinfrastructuresforblockchainapplications. Onthebasisofdistributedledgertechnology,thetwoinstancescheckeachotherandthushelptoestablishtrust. Incontrastto"publicblockchains"(e.g.BitcoinandEthereum),thisprivateblockchaininfrastructurerequiresmuch lessenergy,sinceitcanonlybeusedbyidenti fieduserswhohaveacontractualrelationshipwiththeprovidersofan application.Thisenablesmoreef ficientagreementproceduresaswellassigni ficantlyhighersecurityandperformance. Thisisanimportantprerequisiteformanycompaniestolaunchtheirownapplicationsbasedonblockchaintechnology.” Theparticipatingentitiesinsuchpermissionedorprivateblockchainscancolludetogether,ormaybeforcedbya (hypothetical,dystopian)government,tomanipulatethedata.Furthermore,inmanysuchdeployments,thesoftware runningatallsitesaresourcedfromthesamevendor.Soasoftware(update)runbyallthesitesfromamaliciousor compromisedvendorwouldbesuf ficienttosubvertthewholeblockchain’sintegrity.Thesearesomeverycriticalissues thatneedmoreattention,particularlyinthecontextofblockchainuseinthegovernemnttechnologystack.Anapproach likeeestonia.com(2008)utilizingoff-chaingloballydispersedphysicalback-upisaniftysafeguard. Finally,towrapup,wewanttonotethatsmartcontractscanbeusedovera‘Blockchainplatformasaservice’to automatemanytasks,including,nearrealtimemonitoringandactuationofactionplans,andinthelongerterm,to enhancework flowsanddecisionprocessesfurtherdrivenbyanalytics(arti ficialintelligence).Suchautomationcan significantlyimprovethecosteffectivenessandqualityofservicethatcanbedelivered.However,theopportunities toleveragesuchdatausingtheblockchaininfrastrucutredirectlymayalsobeconstrained,dependingonthenature oftheblockchaindeployment.Forexample,iftheactualdataisstoredoff-chain,andtokenizationisused,thenthe natureoftokenizationwouldin fluencetheversatilityofapplicationsthatcanbebuiltontopoftheblockchain.This initselfisnotnecessarilyabadthing,nordoesitaddfundamentallimitationsincreatingdecentralizedapplications leveragingthetroikaofblockchains,smartcontractsandarti ficialintelligence.InLopezetal.(2019),anargumentfor(a networkof)blockchainsbeingutilizedasagluetobindactualdataandservicesthatareoffthechain(torealizebetter datasoverignity),andlikewisekeepingthelogicalsoattheedge(whichiswherethedataoriginatesand/orisutilized)is forwarded. REFERENCES AustraliaPost(2016)Africtionlessfutureforidentitymanagement:Apracticalsolutionforaustralia’sdigitalidentitychal- lenge.Tech.rep.,AustraliaPost. Buterin,V.(2016)Chaininteroperability. Tech.rep.,R3Reports. Castellanos,A.andBenbunan-Fich,R.(2018)Digitalizationoflandrecords:Frompapertoblockchain. Deloitte()Blockchainininsurance.Deloittewhitepaper. DIF(2017)DecentralizedIdentityFoundation:DIF. Doan,A.,Halevy,A.andIves,Z.(2012) Principlesofdataintegration .Elsevier. Eder,G.(2019)Digitaltransformation:Blockchainandlandtitles.In OECDGlobalAnti-Corruption&IntegrityForum . 12 ANWITAMANDATTA eestonia.com(2008)KSIblockchain.URL: https://e-estonia.com . Field,T.,Muller,E.andLau,E.(2003)Thee-governmentimperative. Guardtime(2015)KSIdatasheet:Keylesssignatureinfrastructure.URL: https://m.guardtime.com/files/KSI_data_sheet_ ƒ‚†Š .pdf. Heeks,R.(2001) Reinventinggovernmentintheinformationage: InternationalpracticeinIT-enabledpublicsectorreform ,vol.1. PsychologyPress. Heinrichs,H.etal.(2013)Sharingeconomy:apotentialnewpathwaytosustainability. GAIA-EcologicalPerspectivesforScience andSociety,22,228–231. ID2020.org(2014)ID2020.URL: https://id ƒƒ .org. Lopez,P.,Montresor,A.andDatta,A.(2019)Please,donotdecentralizetheinternetwith(permissionless)blockchains! In IEEEInternationalConferenceonDistributedComputingSystems(ICDCS) . Lyons,T.,Courcelas,L.andTimsit,K.(2018a)Blockchainforgovernmentandpublicservices. Tech.rep.,TheEuropeanUnion BlockchainObservatory&Forum. —(2018b)Blockchainscalabilitythematicreportscalability,interoperabilityandsustainabilityforinteroperabilitygovern- mentandandpublicsustainabilityservicesblockchains. Tech.rep.,TheEuropeanUnionBlockchainObservatory&Forum. Martin,C.J.(2016)Thesharingeconomy:Apathwaytosustainabilityoranightmarishformofneoliberalcapitalism? Ecological economics,121,149–159. Morris,C.,Mirkovic,J.,O’Rourke,J.andCayholl,C.(2018)Illinoisblockchainanddistributedledgertaskforce finalreportto thegeneralassembly.StateofIllinoisGovernmentReport. Nakamoto,S.etal.(2008)Bitcoin:Apeer-to-peerelectroniccashsystem. OECD(2014)Recommendationofthecouncilondigitalgovernmentstrategies. Patel,N.(2018)Maltapilotsblockchain-basedcredentialsprogram. RepublicoftheMarshallIslands(2018)Declarationandissuanceofthesovereigncurrencyact2018. http://law.sov. global/law.pdf . Rutter,K.(2017)Themythofeasyinteroperability. Tech.rep.,R3Reports. Saddik,A.(2018)Digitaltwins:Theconvergenceofmultimediatechnologies. IEEEMultiMedia ,25. Servida,A.andMunoz,C.(2018)TheeIDASregulation,andhowitmaybelinkedtoblockchain. EUBlockchainforumWork- shop5Reportone-identity. SmartDubai.ae(2016)Dubaiblockchainstrategy. https://www.smartdubai.ae/initiatives/blockchain . Swisscom(2018)SwissPostandSwisscomlauncha100%Swissinfrastructureforblockchainapplications.Pressrelease.URL: https://www.swisscom.ch/en/about/news/ ƒ‚‰ /‚ƒ/post-swisscom-blockchain-infrastruktur.html . TheEconomist(2015)Thepromiseoftheblockchain:Thetrustmachine. —(2016)Bigdata,meetbigbrother:Chinainventsthedigitaltotalitarianstate. TheMaltaIndependent (2019) URL: http://www.independent.com.mt/articles/ ƒ‚Š -†-‰/local-news/Registry-of- Companies-to-be-first-agency-in-the-world-run-by-a-Blockchain-based-system- ‡ˆ„‡ƒˆ‰…‰. ANWITAMANDATTA 13 TheMonetaryAuthorityofSingapore(2017)ProjectUbin:SGDondistributedledger.MonetaryAuthorityofSingaporeand Deloittereport. TheWorldBankGroup(2018)G20digitalidentityonboarding.WorldBankGroupReport. Willars,E.(2019)Self-sovereignandsharedledgers:Anewdawnfordigitalidentity? WorldEconomicForum(2016)Ablueprintfordigitalidentity.WorldEconomicForumReport. Yaga,D.,Mall,P.,Roby,N.andScarfone,K.(2018)Blockchaintechnologyoverview. Tech.Rep.NISTIR8202 ,NIST.
{ "id": "1905.08517" }
2108.11818
Understanding Money Trails of Suspicious Activities in a cryptocurrency-based Blockchain
The decentralization, redundancy, and pseudo-anonymity features have made permission-less public blockchain platforms attractive for adoption as technology platforms for cryptocurrencies. However, such adoption has enabled cybercriminals to exploit vulnerabilities in blockchain platforms and target the users through social engineering to carry out malicious activities. Most of the state-of-the-art techniques for detecting malicious actors depend on the transactional behavior of individual wallet addresses but do not analyze the money trails. We propose a heuristics-based approach that adds new features associated with money trails to analyze and find suspicious activities in cryptocurrency blockchains. Here, we focus only on the cyclic behavior and identify hidden patterns present in the temporal transactions graphs in a blockchain. We demonstrate our methods on the transaction data of the Ethereum blockchain. We find that malicious activities (such as Gambling, Phishing, and Money Laundering) have different cyclic patterns in Ethereum. We also identify two suspicious temporal cyclic path-based transfers in Ethereum. Our techniques may apply to other cryptocurrency blockchains with appropriate modifications adapted to the nature of the crypto-currency under investigation.
http://arxiv.org/pdf/2108.11818v1
Banwari Lal, Rachit Agarwal, Sandeep Kumar Shukla
cs.CR, cs.SI
cs.CR
Understanding Money Trails of Suspicious Activities in a cryptocurrency-based Blockchain Banwari Lal, Rachit Agarwal, Sandeep K. Shukla CSE, IIT Kanpur, India, Email:fbanwari, rachitag, sandeeps g@iitk.ac.in August 27, 2021 Abstract The decentralization, redundancy, and pseudo-anonymity features have made permission-less public blockchain platforms attractive for adoption as technology platforms for cryptocurrencies. However, such adoption has enabled cybercriminals to exploit vulnerabilities in blockchain platforms and target the users through social engineering to carry out malicious activities. Most of the state-of-the-art techniques for detecting malicious actors depend on the transactional behavior of individual wallet addresses but do not analyze the money trails. We propose a heuristics-based ap- proach that adds new features associated with money trails to analyze and nd suspicious activities in cryptocurrency blockchains. Here, we fo- cus only on the cyclic behavior and identify hidden patterns present in the temporal transactions graphs in a blockchain. We demonstrate our methods on the transaction data of the Ethereum blockchain. We nd that malicious activities (such as Gambling, Phishing, and Money Laun- dering) have di erent cyclic patterns in Ethereum. We also identify two suspicious temporal cyclic path-based transfers in Ethereum. Our tech- niques may apply to other cryptocurrency blockchains with appropriate modi cations adapted to the nature of the crypto-currency under investi- gation. Keywords| Blockchain, Machine Learning, Temporal Graphs, Behavior Analy- sis, Ethereum, Suspect Identi cation 1 Introduction Blockchain technology works on a peer-to-peer (P2P) overlay network over the In- ternet, employs cryptographic algorithms to secure the record of transactions, and ensures transactions are valid and authorized. Permission-less blockchain-based appli- cations are distributed, redundant, and provide their users with a sense of anonymity. While this bene ts privacy, it also allows malicious actors to hide their true identities and perform illegal transactions. The anonymity in most common blockchain-based 1arXiv:2108.11818v1 [cs.CR] 26 Aug 2021 cryptocurrency platforms is not full proof, and transaction data correlation has ef- fectively apprehended some malicious actors in the past. However, such correlation requires processing massive historic transaction datasets, creating graph databases, and implementing search mechanisms speci c to the data. Therefore, Law Enforce- ment Agencies (LEAs) are not always capable of identifying malicious actors. Knowing this, malicious actors carry out illicit activities. Such misuse has, to date, resulted in a considerable loss in cryptocurrencies such as Bitcoin and Ethereum [12, 4]. Cryp- tocurrencies are among the most preferred forms of exchange for illicit transactions pertaining to dark web markets, ransomware attacks, Phishing, Gambling, and laun- dering funds by cyber-criminals. In [8], the authors show that Phishing generates more than 50% of the cyber-crime revenue. Such cyber-attacks and activities exploit the vulnerabilities present in the blockchain infrastructure or target its users through social engineering. Thus, a critical issue that needs attention is to secure users from cyber-attacks yet maintain their privacy. Di erent state-of-the-art approaches such as [30, 2] exist that detect suspicious accounts in cryptocurrency-based blockchains. However, these techniques either con- sider only static features extracted from an aggregated graph of user interactions in the blockchain [30] (thereby neglecting behavioral changes over time) or use temporal features to identify behavioral changes and ignore di erent types of malicious activi- ties [2] (i.e., consider all the malicious activities under one class). In [3], the authors show that di erent malicious activities present in the Ethereum blockchain can be clus- tered in 4 clusters. These 4 clusters contain accounts related to malicious activities such as Phishing ,Gambling ,Money laundering , and others , respectively. However, the authors consider only a few properties that were extracted after considering the \local neighborhood" (a local neighborhood comprises of the accounts to which a particular account has transacted with) to identify clusters. Further, they do not comment on why they obtain such results. In our view, the results in [3] depend on how Phishing, Gambling, Money laundering, and other malicious activities are performed and how the money ow happens between the accounts involved in these activities. Thus, the question we ask is, Q: Does analyzing the money trails help distin- guish the di erent malicious activities ? To answer the question, in [5, 35, 25], the authors consider Motifs (basic building blocks that repeat themselves in a graph) and two-hop cycles to understand motif applications in the temporal transaction graph of a blockchain. However, they do not consider the temporal cycles of larger lengths. In another work, in [19], the authors show that detecting money trails and under- standing temporal user interactions help identify money laundering-based frauds that exist in nance-based institutions. Considering such aspects and the advancements in the state-of-the-art approaches, we aim to understand the di erences in the various classes of malicious activities (those mentioned above) regarding how money ow hap- pens in cryptocurrency-based blockchains and how we can use these paths to identify malicious activities. Thus, in this research, our goal is to understand the behavior of di erent malicious activities (e.g., Phishing, Gambling, and Money Laundering) in cryptocurrency-based blockchains such as Ethereum by understanding the money trail (a path followed by a cryptocurrency) Note that our approach is generic and can extend to any permission-less blockchain, with platform-speci c adaptations. We propose a money trail-based approach and analyze accounts involved in di er- ent malicious activities. Using the temporal cycles, we distinguish malicious activities such as Phishing, Gambling, and Money laundering. We use money loss (amount of cryptocurrency lost along a cyclic path) and the cyclic path's structure to under- stand the behavior of malicious accounts in the blockchain. We nd that it is possible 2 to detect suspicious behavior using money trails, and all the accounts involved in Phishing-based activities do not behave similarly. Further, some of the cyclic transfers result in high money loss in a short time. In short, our contributions are: 1. We propose an approach based on money trails using temporal cycles: (a) to characterize the behavior of malicious activities such as Phishing, Gam- bling, and Money laundering in a cryptocurrency based blockchain, (b) to detect suspicious temporal cycle-based money transfers using money loss along the cyclic path. 2. As a result , we nd that most malicious activities in Ethereum have similarity and can be clustered, while Phishing based accounts clusters themselves into more than one cluster. Also, using money trails, we nd two suspicious temporal cyclic path-based cryptocurrency transfers in the blockchain. 3. Current state-of-the-art approaches either use a machine learning or graph embedding-based approach to detect and analyze suspicious behavior in the blockchain. Our approach presents a new dimension to the existing approaches to study malicious activities using money trails. The structure of this article is organized as follows. Section 2 and Section 3 describe relevant background material necessary for addressing the question Qand illustrate the state-of-the-art approaches in search of answering this question, respectively. Section 4 details the graph construction, our assumptions, and the methodology used in tracking the money trails. Section 5 presents the details of the data we use to validate our approach, how we collect the data, statistics about the data, and our experimental results. Section 6 nally conclude our paper and discuss future directions. 2 Background Blockchain technology presents a decentralized (no central authority) data repository of a digital ledger of transactions. The key di erence between a typical database system and a blockchain ledger is how the data is structured. A ledger records trans- actions in a way that makes it dicult or impossible to change the information present in a transaction. Blockchain technology ensures that the ledger is almost impossible to tamper with, and the integrity of the entries in the ledger is cryptographically en- sured [32]. In a ledger, transactions are grouped to form \blocks" where each block contains many transactions. These blocks are chained together to construct a ledger. Each block in the ledger contains the details of the transactions included in the block, its own hash value, and most importantly, the previous block's hash value and a times- tamp. The decision on which block to include in the ledger among many competing blocks created by multiple participants is taken through a \consensus algorithm" (it veri es transactions, makes sure that the majority of members agree on the block to be added to the blockchain, and decides the current state of the ledger). In a blockchain, each new block (to be included in the ledger) is duplicated and distributed across the entire \blockchain network" (the ledger is duplicated across a network of computers instead of storing at a central location). Each member of a blockchain network has an identical copy of the ledger. There are primarily two types of blockchains: 3 1. A Private blockchain is a restricted blockchain where only a closed group of users are allowed to use the blockchain. If the right to transact or create blocks is restricted to permitted participants, then such a blockchain is also called a \permission-ed blockchain." Such blockchains are used within a consortium of organizations or enterprises that control accessibility and authorization. Some example applications of a private blockchain are blockchains supporting voting systems and digital identity. 2. A Public blockchain is a distributed ledger system which can be accessed by everyone. Here, users are allowed to transact and add blocks without any per- mission. Such blockchains are also called the permission-less blockchain. Here, there is no central authority to control the access and authorization of partic- ipants. A user can join or leave the permission-less blockchain whenever they want. A user who is part of a permission-less blockchain can verify transac- tions, access current and past records, or do \mining" (a process of transaction veri cation and update of the records on the blockchain ledger). Although there are two more types of blockchains: consortium-based and hybrid blockchains, these blockchains are derived using the features of public and private blockchains. We do not describe them here. An activity that is undertaken to cause harm to someone or carry out activities banned by law in certain jurisdictions is called a malicious activity . Some of the most prominent malicious activities are Phishing, Gambling, and Money Laundering. Although there are other activities such as Scamming and Heist, we only focus on Phishing, Gambling, and Money Laundering in this paper. The reason for focusing on these three is that the results in [3] show that most of the accounts involved in many malicious activities in Ethereum show statistically signi cant behavioral similarities to behaviors observed in accounts of these three activities. Note that these results are based on the available ground truth about the marked malicious account. Accounts related to many malicious activities (such as darknet marketplaces) are not marked and thus are out of the scope. Phishing is an activity where a cyber-criminal tries to steal digital cryptocurrency or user's credentials by using social engineering methods (for example, creating a fake website for wallets that look similar to the original website or send a fake email) [10]. In Phishing activity, attackers do not exploit the vulnerabilities present in the system but trick the human mind's inattention. Here, attackers aim to get sensitive information, install the malware in the system, or steal digital currency. One of the widely known Phishing attacks on blockchains was the \Bee Token ICO Scam" attack [15]. In the Bee Token ICO scam, the attackers got hold of emails associated with the accounts related to the Bee token and sent out emails to transfer Eth (a cryptocurrency used by Ethereum). Gambling [22] is a process of taking part in an activity in which a person risks his money or a valuable object on the presumption of a speci c outcome of an event that induces uncertainty of monetary loss or gain. Some Gambling activities are a lottery, video lottery games, card games, and casino games. Due to anonymity and transparency in the transactions, cryptocurrency blockchains are widely used in Gambling-related activities. Some of the main advantages of using cryptocurrency for Gambling are: •Chances of fraud are less due to the immutability of the blockchain. •Anonymity allows users to participate in Gambling from places where Gambling is legally prohibited. 4 •The transaction fee is small. Some online Gambling platforms such as Las Atlantis Casino and Wild Casino for casino games also accept cryptocurrencies. On the other hand, Money Laundering [14] is the process of obfuscating the true source of an income by moving the money into various hands, through mixers, and eventually to get it returned. At the end of such obfuscating transfer cycle, it seems that the money is transferred from a legitimate source. Some of the money laundering- based criminal activities are drug tracking, and terrorist funding, etc. Although it is easier to do illicit activities in cryptocurrency due to user anonymity in blockchain, the overall impact of cryptocurrencies on money laundering is less compared to cash transactions. As of 2019, \only 0.5% of all Bitcoin transactions" [31] involved trading Bitcoin on the dark web. In money laundering, criminals hide the true origin of illicit funds using various methods (such as participating in Initial Coin O erings (ICO) and converting one type of coin into another). In [14], the authors state three main stages of money laundering in cryptocurrency. These stages are: 1.Placement: Cash or other types of crypto (altcoin) can be used to purchase cryptocurrency from exchanges. A legal transaction requires identity veri ca- tion, identi cation of the fund source, and following Anti Money Laundering Practices (AML). Exchanges that cannot force AML practices with sub-par tools and fails to check speci c identity, allow exploitation of vulnerabilities and thereby enable money laundering. Certain exchanges have been found to be involved in such practices. 2.Hiding: Once the digital currency is in play, criminals use the anonymizing aspect of cryptocurrency blockchains to hide the source of the money. 3.Integration: In this phase, the criminals declare the money as a result of a pro table venture or other cryptocurrency appreciation to legitimize the illicit money. 3 Related Work Several state-of-the-art approaches detect malicious accounts associated with such il- licit activities in cryptocurrency blockchains, especially in Bitcoin and Ethereum [29, 12, 1, 2, 3, 18]. These state-of-the-art approaches either detect malicious activities using machine learning (ML) algorithms or by analyzing graphs using various met- rics. Here, we rst discuss state-of-the-art approaches using ML and then the graph analysis-based approaches. We nally demonstrate the state-of-the-art approaches for nding temporal cycles in a temporal graph. ML-based approaches use the features extracted from the underlying social in- teraction network. These features include degree (both inDegree and outDegree), transaction fee, balance, and clustering coecient. Some of these approaches use the aggregated blockchain graph [29], while some use temporal graphs [2]. In [29], the authors use two aggregated graphs to detect suspicious users and transactions in Bitcoin. One graph has users as nodes for detecting suspicious users, and the other has transactions as nodes for detecting suspicious transactions. The approach uses features based on degrees (inDegree, outDegree, uniqueInDegree, uniqueOutDe- gree, and clustering coecient), average (in-transaction, out-transaction), and balance. The authors used three unsupervised ML techniques ( a) K-means clustering, ( b) Ma- halanobis Distance-Based Method, and ( c) Unsupervised SVM to detect suspicious 5 user/transaction. In [29], the authors detect two users and one transaction out of the known suspicious user/transactions in the bitcoin. However, in [29], the authors do not use temporal aspects of blockchain's underlying social interaction network. In [2], the authors propose an ML-based approach that uses graph-based temporal features (such as burst and attractiveness) inspired by past attacks on a blockchain. They show that indegree and outdegree present in the social interaction network of blockchain transactions follow power-law. The authors achieve balanced accuracy 87:2% using ExtraTreeClassi er towards detecting malicious accounts. Nonethe- less, when using the unsupervised learning approach, they detect 814 new malicious accounts that have a high probability of being malicious over time. However, in [2], the authors consider all the malicious activities under one class. Thus, their results are biased towards a malicious activity with the most number of tagged accounts [3]. In [3], the authors show that the Neural Network model is resistant to such bias and detects any adversarial data. Further, they also show that most malicious activities can be clustered into four clusters. However, they do not specify the reason behind their results and why four clusters are obtained. There are a few state-of-the-art approaches that focus on speci c malicious ac- tivities [6, 11]. In [6], the authors focus on the \Ponzi scheme" [13] to detect illicit behavior using supervised ML techniques such as Random Forest Classi er, Bayes Network Classi er, and RIPPER Classi er. They handle the class imbalance prob- lem using the oversampling (minority class's data is replicated) and the cost-sensitive (misclassi cation of minority classes is penalized more) approaches. They nd the combination of cost-sensitive approach and Random Forest classi er provides the best accuracy [6]. In [11], the authors use ML to identify the smart contracts involved in the Ponzi scheme in Ethereum. Their approach uses features based on user account and those from op-codes of the smart contracts. However, being dedicated to a speci c malicious activity, these approaches do not apply to other attacks due to di erences between di erent malicious activities. In [9], the authors perform a graph-based analysis of the transactions present in the Ethereum blockchain. They use three graphs ( a) Money Flow Graph (MFG): a directed graph for money transfer based transactions, ( b) Smart Contract Creation Graph (CCG): a directed graph where an edge ( u,v) represents the node ucreating contract node v. Here, node type is either Smart Contract (SC) or Externally Owned Account (EOA), and ( c) Contract Invocation Graph (CIG): a directed graph where an edge ( u,v) indicates node uinvokes the contract node v. After analyzing the 3 graphs using di erent metrics (such as degree distribution, clustering, node connec- tivity, strongly/weakly connected component), the authors nd that only a few SCs are dominant. The authors also propose an approach to address two security issues (\attack forensics" - for a given malicious smart contract, nding all accounts con- trolled by the attacker, and \anomaly detection" - detection of abnormal contract creation) on Ethereum blockchain using cross graph analysis. However, the authors do not comment on any speci c malicious activity. In [26], the authors propose a Temporal Weighted Multidigraph Embedding (T- EDGE) approach based on graph embedding to classify Phishing/non-Phishing ac- counts. The approach uses the temporal weighted multi-edged directed graph where nodes represent unique accounts in Ethereum and the edges are temporal and con- tain details related to the transactions. The role of the graph embedding is to de- tect implicit features of the accounts in the transaction network of the Ethereum blockchain. The authors use two baseline embedding methods for the classi cation of Phishing/non-Phishing accounts. As one baseline method, they use a random tem- 6 poral walk on the dynamic transaction graph to nd the comprehensive properties (structural relationship) between accounts. This type of random walk contains money ow information in the blockchain. As a second baseline method, the authors use the skip-gram [27] model to update the process parameters in the Neural Network using the Stochastic Gradient Descent algorithm. Using T-EDGE, the authors show that time-dependent walks and edge information are essential in a time-dependent trans- action network. Further, they show that their approach achieves accuracy 82%. However, their approach is dedicated to a particular malicious activity, and no in- sights are provided on the applicability of the approach to other malicious activities. In [35], the authors propose an approach based on motifs (a subgraph that re- peats themselves in a network or group of networks) to nd \mixing services" [7] (services that allow users to mix their coins with those of other users to enhance the anonymity of the transactions) in the Bitcoin blockchain. One of the mixing services prevalent in the nancial sector and cryptocurrency-based blockchains is Money laun- dering. In [35], the authors used two types of temporal directed transactions graphs (a) homogeneous Address-Address Interaction Network (AAIN) and ( b) heterogeneous Transaction-Address Interaction Network (TAIN). The approach uses hybrid motifs composed of temporal homogeneous motifs in AAIN and attributed temporal hetero- geneous (ATH: local subgraphs of heterogeneous information network) motifs in TAIN. In [35], the authors detect 6:4% of total addresses as mixing addresses using hybrid motifs as a key feature. Their detection model is based on the ground-truth informa- tion, thus unknown complex mixing strategies that may exist might not be detected. In [19], the authors propose an approach for detecting frauds using money trails in the temporal transactions graph. They integrate their approach with a real-time fraud detection system in a private bank. This approach was able to detect 2-4 new il- licit activities every month since 2017. The approach in [19] also allowed banks to set new preferences (for example, the limited time between transactions or maximum percentage of money loss is allowed). The state-of-the-art approaches related to general cycle detection [21, 23, 24] are based on a depth- rst search (DFS) algorithm [33]. In [21], the authors propose an approach to nd all the elementary cycles present in a graph using the DFS. However, the approach does not consider temporal aspects for nding elementary cycles. On the other hand, in [23, 24], the authors provide methods to nd all the elementary temporal cycles in a temporal graph. Nonetheless, these approaches do not apply other preferences (for example, the maximum percentage of money loss allowed). Such aspects inhibit us from using these approaches for our problem as, besides timestamps, transaction amount-based attributes are also important. In summary, state-of-the-art approaches related to illicit activity detection in the blockchain using ML and graph embedding are well studied. However, most ML- based approaches are either biased towards a malicious activity with a large number of tagged accounts/transactions or do not consider temporal aspects. Also, most ML- based approaches do not use hidden patterns produced (such as cycle-based transfers) by the transactions network of blockchain. Thus, in our view, an approach to detect money trails for analysis of di erent malicious activities needs to be formalized. This paper is our attempt to do precisely that. 7 4 Methodology This section provides a detailed description of our methodology towards identifying time-respecting cycles to detect money ow. 4.1 Cycle Detection The standard cycle detection methods do not consider the temporal aspects. Thus, to nd time-respecting cycle to detect money ow, there is a need to modify the cycle detection method. In a temporal cycle the order of the edges in a temporal path is restricted by the time in which they occur and can have only one starting node. However, in standard cycle detection methods an edge can be involved in more than one cycle. Thus, it is essential to identify all such cases in which two or more cycles contain common edge/edges. Figure 1 shows an example of such cases and depicts four di erent temporal graphs where an edge Ati:x! Bin the graph represents that a user Ahas transferred xcontains the other details such as amount transferred, gas price incurred. For now for simplicity, consider for xto be amount of cryptocurrency transferred to user Bat time ti. Our method is based on following special cases. 1. Figure 1a shows two temporal cycles ( a)At1:15! Bt3:25! Ct4:20! Aand ( b) At2:10! Bt3:25! Ct4:20! Ain the graph where the edges Bt3:25! Cand Ct4:20! Aare common in both the temporal cycles. All the incoming edges from node A to node B have less timestamp than outgoing edges from B in the temporal cycle. So instead of considering two di erent edges from node A to node B, we merge both the edges from node A to node B into one edge, in this case, At1;t2:25! Bt3:25! Ct4:20! A. Here, we add other information like amount of cryptocurrency transferred via both the edges. Figure 1b shows the graph after our modi cation. 2. Figure 1c, although di erent, again shows two temporal cycles ( a)At1:20! Bt3:20! Dt4:20! Aand ( b)Ct2:20! Bt3:20! Dt4:20! Cin the graph. Here, one temporal cycle starts from node A and the other from node C. But the timestamp of the edge from node A is less than the edge from node C. We give the edge from node with a lower timestamp a higher priority because that edge (transaction) has happened earlier in the blockchain. If the timestamp of two edges is equal, then the edge that transfers higher cryptocurrency or pays higher gas price gets higher priority. Thus, in the example, the temporal cycle originating from node A gets priority. 3. Further, Figure 1d shows two temporal cycles ( a)At1:50! Bt2:20! Ct4:20! A and ( b)At1:50! Bt3:30! Dt5:30! Ain the graph. Edge At1:50! Bis common in both the cycles. If we consider up to timestamp t4, money recovered at account A (incoming money in the temporal cyclic path with respect to outgoing money) is only 20 cryptocurrency. However, when considering t5, the remaining money is recovered by account A. Thus, we consider both the temporal cycles. Note that this also depends on the data we have. Figure 2 shows the contact sequence of the graph present in Figure 1e. Table 1 shows all the 6 temporal cycles present in this graph that meet our criteria and the remaining 3 cycles after the application of our modi cations mentioned above. The 3 8 (a) Example Graph (b) Graph after applying rst modi cation (c) Example Graph considered for second mod- i cation (d) Example Graph considered for third mod- i cation (e) Example Graph towards all modi cations Figure 1: Cases considered for modi cations 9 Figure 2: Contact Sequence of graph represented in Figure 1e. #All Temporal Cycles Temporal Cycles After Modi cations 1At1:100!Ct4:50!Dt5:40!A At1:100!Ct4;t6:110!Dt5;t7:70!A 2At1:100!Ct4:50!Dt7:30!A 3At1:100!Ct6:60!Dt7:30!A 4At1:100!Ct7:60!Bt9:40!AAt6:50!Ct7:60!Bt9:40!A5At6:50!Ct7:60!Bt9:40!A 6Dt5:50!Et6:60!D Dt5:50!Et6:60!D Table 1: List of Cycles before and after applying our modi cations temporal cycles start at 3 distinct timestamps ( a)At1:100! C, (b)At6:50! C, and ( c) Dt5:50! E. From special case 2, the temporal cycles starting from edge At1:100! C gets highest priority while the temporal cycles starting from edge At6:50! Cgets the least priority. Next at node C, there are three outgoing edges but considering case 3 only the edge Ct4:50! Dgets priority. Similarly, now at node D, edge from node D to node A gets priority. The reason for not considering the other edge Dt5:50! Ein the temporal cyclic path starting from A is due to our assumption that no other node except starting node is allowed to repeat more than once in a cycle. Using special case 1, edges from node C to node D and from node D to node A get merged. So the rst three temporal cycles results in only one temporal cycle (cf. Table 1). After applying the di erent cases, the fourth cycle becomes invalid because we do not allow the repetition of edges in any temporal cycles. As another example, in Figure 3a, without using our modi cations, there are, in total, 27 cycles, but after applying the rst modi cation, the total number of temporal cycles reduce to only 1. Total money transferred along the temporal cycle after ap- plying the modi cations is equal to the total money (30 cryptocurrencies) transferred before applying our modi cations. Thus, using our modi cations, there is no loss in the money. Similarly, in Figure 3b, node A and node B transact with each other. Here, the total number of temporal cycles is 9 (5 starting from node A and 4 starting from node B). After applying the second and the third modi cation, only 3 temporal cycles remain. 10 Algorithm 1 Temporal Cycle Detection Method 1:Input 2:Blockchain's Transaction Graph ( G (V;E)) 3:visVertex fTwo states: visited and unvisited g 4:visEdge fThree states: nally visited, partially visited and unvisited g 5: 6:orderedEdges  7:foraccount2startingAccounts do 8: foredge2G[account ]do 9: orderedEdges.append( <edge> ) 10:orderedEdges.sort() #based on <blocknumber;valueTransferred;gasPaid> 11:foredge2orderedEdges do 12:previousPath fg 13: AllCycles(previousPath.append( <edge> )) 14: 15:procedure AllCycles (previousPath= St0:x0!v0t1:x1!v1t2:x2! v2tk:xk!vk) 16:currAcc vk 17:currBlockNo tk 18:flag 0 19: ifS== currAcc then 20: OUTPUT previousPath.append <(currAcc;S;t )> 21: Mark all the edges involved in this cycle as nally visited 22: return True 23:outGoingEdges f(currAcc;v;t )2EandcurrBlockNo<t g 24: outValue 0 25: fortemp2outGoingEdges do 26: ag1 0 27: tmin temp.blockNumber 28: if tmin>currBlockNo and visEdge[temp] and visVer- tex[temp.to()] are unvisited then 29: ifoutValue<inValue then 30: visEdge[temp] Mark partially visited 31: visVertex[currAcc] Mark Visited 32: ag1 AllCycles(previousPath. <(currAcc;temp;t min)>) 33: if ag1==True then 34: ag True 35: outValue+=temp.value 36: visVertex[currAcc] Mark unvisited 37: returnflag ==True 11 (a) Example 1 (b) Example 2 Figure 3: Examples to show that how modi cations can be applied for reducing the number of temporal cycles 4.2 Our Algorithm for nding Temporal Cycles A depth- rst search (DFS) algorithm is a well-known algorithm used to detect cycles in a static graph. For each connected component, DFS produces a DFS tree. A cycle is present in the graph if there is a back edge (an edge that joins a node to itself or one of its ancestors in the DFS tree). We use a modi ed DFS algorithm based on the cases described above to nd temporal cycles in the graph (cf. Algorithm 1). Following are the inputs to our algorithm: (a) The transactions graph G(V; E) represents graph generated using the trans- actions between nodes over time. Here, Vis the set of user accounts in the blockchain. Eis the set of directed transactions between 2 accounts in V. Note that these transactions are temporal. We use the block number to represent the time at which the transaction occur. An edge (or a transaction) in E, besides timestamp, also contains information related to the transaction such as value (money) transferred, gas paid for the transaction, and whether it is an internal transaction or not. (b) Consider startingAccounts to be a set of all malicious accounts. From S2 startingAccounts our temporal cycles starts because we aim to analyze di erent tagged malicious activities. (c) We use a depth- rst search (DFS) based recursive approach starting from node S2startingAccounts to nd cycles. A path to a node vkfrom Sis called thepreviousPath . The previousPath could be understood as a fragment of a potential cycle. Note that vkrepresents current account from which next transactions is to be explored for next edge in the temporal path. An example ofpreviousPath isSt0:x0! v0t1:x1! v1t2:x2! v2tk:xk! vk. (e) There are three types of edges, ( i) visited edges (edges that belong to a cycle), (ii) contenders (edges that are in a temporal path which may evolve to a cycle), and ( iii) not visited edges (edges that are not yet considered). visEdge mark the set of edges that already belong to all the temporal cycles that were previously explored. Edges that are involved in the previousPath are the contenders. visEdge is used to know if an edge has already occurred in any of the detected temporal cycles. 12 (f) Similar to visEdge ,visV ertex is used to know whether a vertex is already visited or not for a particular cycle. Note that a vertex can be in multiple cycles. Thus, visV ertex is local to each cycle. (e) We sort all the transactions from all S2startingAccounts and store them in theorderedEdges . First sorting is based on the timestamps (at which the trans- actions occur), the lower timestamp of a transaction higher priority it gets. If timestamps are same for two transactions, then we sort based on higher cryp- tocurrency transferred. If the cryptocurrency transferred is also same for the two transactions, then we prioritize the transaction based on other attributes in xsuch as gas price (transaction that pays more gas). Our recursive approach returns all the temporal cycles. We initialize the previousPath with the edge from which temporal cycles start (an edge from orderedEdges ) and node S2startingAccount . During the recursive exploration of the temporal graph in the depth- rst search manner, starting from the last visited account in the previous path, there is a temporal cycle if the path ends at S. At the current node, we explore all outgoing edges in sorted order (cf. Algorithm 1 line 25), which respect temporal aspects of the temporal path de ned in previousPath . At each step, if the sum of transacted money (value transferred in a transaction) in the outgoing edges involved in the temporal cycle is greater than incoming money at that node from the incom- ing edge (cf. Algorithm 1 line 29), then further exploration of the outgoing edges at that node is stopped and the node is marked visited (cf. Algorithm 1 lines 31-32). Not allowing further exploration is based on special case 3 because once we trail the complete money for an incoming transaction at any node, we stop to trail that money further in the graph. When a cycle is detected (cf. Algorithm 1 lines 20-22), all the edges involved in the temporal cycle are marked as visited (one edge is allowed to appear in only one temporal cycle). A visited edge during exploration of a particular temporal cycle is not revisited. The procedure AllCycles returns true if there is a temporal cycle, else it returns false. Using the procedure and steps de ned above, we list all the valid temporal cycles based on our modi cations. Our modi cations does not change the functional approach of the DFS algorithm. As shown in [24, 23], the DFS-based approach is valid for nding temporal cycles of n-hop length where n2N. The time complexity of our algorithm is dependent on the number of temporal cycles in the temporal graph. The time complexity of the DFS approach is O(jVj+jEj). Thus, the time complexity of our approach is O(C(jVj+jEj)), where Cis the number of valid temporal cycles present in the transaction graph. 5 Evaluation This section rst presents the details of the data we collect and the pre-processing we perform. We then provide a detailed analysis of our results based on our methodology. 5.1 DataSet There are two most prominent cryptocurrency-based permissionless blockchains: Bit- coin [28] and Ethereum [16]. We choose Ethereum blockchain transaction data because it is more rich and diverse. Etherscan [17] makes available the information about ac- counts and transactions categorised into di erent illicit activities. 13 Figure 4: Sample Internal Transaction in Ethereum Ethereum has two types of accounts Externally Owned Accounts (EOA)s and Smart Contracts (SC)s. SCs get executed on Ethereum Virtual Machine (EVM). The transactions between two SCs (also called internal transactions) are not stored on the ledger, but they can be inferred using EVM. Transactions between two EOAs and EOAs and SCs are stored on the ledger of the Ethereum blockchain and are called external transactions. These transactions are publicly available using Etherscan APIs [17]. We, thus, use the Etherscan APIs to download the transactions. Both the types of transactions have a di erent internal JSON structure. For our analysis, we consider all the internal and external transactions of the chosen accounts from the genesis block (block number 0) to block number 10747845 (generated on date: 28/08/2020). 5.1.1 Transaction Structure As described before, the two types of transactions have di erent structures. A sample internal transaction shown in Figure 4 while a sample external transaction is shown in Figure 5. We now describe the terminology used in these types of transactions and only those that help us understand the money trails. •from: hash of the sender address of the transaction. •to:hash of the receiver address of the transaction. •hash: transaction hash. •blockHash: hash of the block in which transaction appears. •blockNumber: it is the block to which transactions appears. •timeStamp: milliseconds after epoch when the block was generated. •value: It is the amount of cryptocurrency transferred in Wie. For Ethereum, 1018Wei equals 1 Ether. •contractAddress: hash of a contract address. It is not null only if the trans- action is a contract create transaction. 14 Figure 5: Sample External Transaction in Ethereum •gas: The maximum amount of gas units that the transaction can consume. Units of gas represent computational steps. •gasUsed: The amount of gas used for a transaction. •gasPrice: the price of Gas in Gwei. For Ethereum, 109Gwei equals 1 Ether. •isError/txreceipt status: True if transaction is unsuccessful else false. 5.1.2 Dataset Statistics Some of the most common malicious activities involved in the blockchain are Gambling, Phishing, and Money Laundering. These activities have resulted in a sizable losses of cryptocurrency over time in the blockchain. With the increasing popularity of blockchain, adding new dimensions to the analysis of these activities in the blockchain is necessary. Also, in Ethereum, these activities have enough tagged accounts and transactions to understand their behavior in terms of money trails. Table 2 details the statistics about the transaction dataset we extract from Ethereum using Etherscan APIs [17] for our methodology validation. In the Table 2 we present two types of statistics. One, representing that which shows the statistics where we present the EOAs, SCs, and transactions between accounts of speci ed malicious ac- tivity. In the second, we present statistics where we present the EOAs, SCs, and transactions between the accounts of speci ed malicious activities and their one-hop neighbors. Note that here the one-hop neighbors include benign accounts as well. Our results presented next consider these two types. For simplicity, from here, we refer to these two types as type-A and type-B and demonstrate the results obtained using transactions involved in these two types. In [3], the authors used more (such as Heist, Scamming) malicious activities other than those we consider. Other than Scamming malicious activities, all other malicious activities have fewer tagged accounts and transactions. We categorize these activities as one and under the class \other" malicious activities. Most of the scamming-related accounts are also tagged as Phishing in Ethereum. Thus, we consider these accounts 15 Table 2: Statistics including one-hop Total Type of Activity benign neighbors EOAs SCs Transactions Gambling7 4 38 930 3 33158 67289 5942672 Phishing7 4076 693 1422 3 24527 5893 1108836 Money Laundering7 813 2 2157 3 11728 3021 256113 only once under Phishing. For \other" malicious activities (total 315 accounts), we have used data only to analyze whether di erent types of malicious activities transfer money in the temporal cyclic path with each other or not. Thus, we have not included the information for other malicious activities in Table 2. 5.2 Data Pre-processing In our experiments, we use only successful internal and external transactions. From the internal and external transaction data, we construct a graph that contains the details such as ( a) from, ( b) to, ( c) block number, ( d) isInternalTransaction: true if the transaction is internal else false, ( e) value, ( f) gas, and ( g) gas used. We use block numbers to represent timestamp because we do not have the exact time when the transaction happened. We remove the transactions which transfer 0 Eth (Cryp- tocurrency used by Ethereum). Transactions that have 0 Eth transferred can give some important insights. But in our work, we have not used such transactions be- cause these transactions result in 100% money loss, but we aim to nd the suspicious cycles with very little loss along the path. In the future, these transactions also can be included. Each transaction represents a directed temporal edge in the graph, except if account A sends money to an account B multiple times in the same block, then we merge these transactions into a single transaction. As shown in Figure 6a, account A transacts with account B two times in the same block represented by block number 9272415. Thus, we merge both of these transactions into one transaction (cf. Fig- ure 6b). With the computational resources currently available to us, it is impossible to perform experiments on the whole Ethereum blockchain for path-based analysis of the graph due to the large size of the Ethereum blockchain. We perform our experi- ments on the tagged malicious accounts (particularly Phishing, Gambling and Money laundering). One type of Money laundering activity in the Ethereum blockchain is the activity (commonly called as UpBit hack) that involved the UpBit exchange. There are speculations that some insider performed malicious activity during the movement of money from a hot to a cold wallet [20]). In this work, we use accounts tagged as \Upbit Hack" in the Ethereum blockchain as Money laundering accounts. 5.3 Results This section presents results obtained. The presented results pertain to when accounts involved in di erent types of malicious activities: Gambling, Phishing, Money Laun- dering, other malicious activities, as well as when considering all malicious activities under one class. 16 (a) More than one transaction between two accounts in the same block (b) Merged Transactions of Same Block Figure 6: Processing of transactions happening between two accounts in the same block 5.3.1 Gambling We rst apply our methodology to accounts labeled under the Gambling category by Etherscan [17]. As a rst step, we generate the graph from these accounts and their transactions. Here, we consider only those transactions which happen between only Gambling accounts. As it is usually done, for cryptocurrency also, we assume that accounts associated with Gambling activity put their money in a depository (or an exchange in terms of blockchain) for betting/lottery. Upon win, the account gets back the funds assured (for example, people Gambling in casinos [34]). Using our approach, we nd that out of the 42 marked Gambling accounts (4 EOAs and 38 SCs), only 2 SCs have temporal cycles, that too cycles involving only themselves. We do not disclose the addresses of these accounts due to privacy reasons. However, one of these accounts is an exchange. We nd that the total number of temporal cycles is 136958, if we do not apply our modi cations de ned in Section 4. After the application of our modi cations, the total number of temporal cycles reduces to 346. All of these temporal cycles are of two-hop length. Note that two-hop length does not mean that the transactions happen in two consecutive time instances. The inter-event time (time between the two transactions) can be >1. The two accounts involved in the temporal cycles transact with each other regularly. All the transactions involved in the temporal cycles are internal transactions as the transactions happen between two SCs. From these results, it is clear that most Gambling accounts are not transacting with each other for Gambling activities. However, the accounts involved in the temporal cycle follow a traditional gambling approach. Next, we add more accounts to extract more insights and know whether our as- sumptions hold when accounts not marked as Gambling are added. Here, we add those accounts to the graph that are not marked as Gambling but have received funds from the marked Gambling accounts, i.e., Gambling accounts have an out edge to these accounts. The added accounts have high cosine similarity (calculated using features de ned in [3]), more than 0.99, with the tagged Gambling accounts. The number of temporal cycles does not change after adding these accounts and their transactions (limited to considered accounts). Next, we add the neighbors (neighbors of neighbors of Gambling accounts that we added in the last step). We repeat adding neighbor accounts to the graph four times. But, in all the steps, the number of temporal cycles does not change. It means that most Gambling accounts do not show temporal cyclic 17 (a) Example 1 (b) Example 2 Figure 7: Suspicious Temporal Cycles in the Gambling behavior with other Gambling accounts or accounts transacting directly to marked Gambling accounts. To identify the largest cycle, we add all the accounts (and their transactions) that have a path from the Gambling accounts into our graph. We nd that the number of temporal cycles increases many-fold ( >1014). We nd that 6 accounts contribute the most number of temporal cycles in Gambling. With the limited computing resources we have had at our disposal, we were not able to extract the exact number of cycles from these 6 Gambling accounts. For the remaining 36 Gambling accounts, we nd that the total number of cycles is 1313104, and the maximum hop length of the temporal cyclic path is 23. We nd that these 36 accounts are involved in temporal cycles that do not include exchange accounts. These results show that the Gambling accounts do not transfer money in a temporal cyclic path to other Gambling accounts while the Gambling accounts have money trails with other non-gambling accounts. We nd few suspicious temporal cyclic path-based money transfers (cf. Figure 7). In Figure 7, we represent a node by the last four characters of the account address hash and an edge by the key-value pair where the key is the block number in which the transaction appears. The value represents the amount of Ether transferred via the transaction. Money loss along the temporal cycles present in Figure 7 is negative. This type of behavior indicates that there is a possibility that the account won the bet/lottery. Our approach gives all of the temporal cycles for a given threshold of maximum money loss allowed along the cyclic path. For money loss >10%, we nd that the number of temporal cycles does not increase signi cantly, while the number of cycles with money loss<10% is signi cantly high in the Gambling. 5.3.2 Phishing We now apply our methodology to accounts labeled under Phishing. There are a total of 4769 Phishing tagged accounts (4076 EOAs and 693 SCs). We nd that a total of 103 accounts are involved in the time respecting cyclic transfers. There are 55 accounts from which a minimum of one cycle starts. Most Phishing accounts have very few transactions. This limits the chances of them being present in a temporal cycle. There are a total of 1682 cycles in the graph before applying our modi cations. After the application of our modi cations, the total number of temporal cycles reduce to 164. Here, most of the cycles are of two-hop. The maximum hop-length of a cycle obtained is 3. We nd that some of these transfers show suspicious behavior. As shown in Figure 8, money loss along the cyclic path is less than 10%. Then, similar to the analysis of Gambling accounts, we add out-neighbors (accounts to which Phishing accounts send funds) of Phishing accounts and have high similarities (>0:99) with them. We observe that the number of cycles does not change. After that, we add more accounts to get more insights and know whether the results are 18 (a) Example 1 (b) Example 2 Figure 8: Some of the Suspicious Temporal Cycles in the Phishing Table 3: Results Activity Gambling Phishing Money Laundering Considering type-A type-B type-A type-B type-A type-B No. of cycles 346 131304 164 4315 40 90 Max. Hop Length 2 23 3 20 6 6 No of cycles with337 50108 128 1945 8 42( 10%) loss No. of unique accounts2 4305 103 3196 69 150involved in all cycles consistent when the graph size increases. Irrespective of the similarity, we add all the out-neighbors of the tagged Phishing accounts. We nd >108temporal cycles, a signi cantly high number when our modi cations are not applied. However, only 4315 cycles remain when we apply our modi cations. In these 4315 cycles, the maximum hop-length is 20. Figure 8a shows one suspicious cycle detected in the analysis of Phishing accounts. Here, the money loss along the cyclic path is negative, meaning Phishing accounts have received funds. Also, 1945 temporal cycles have less than 10% money loss. 5.3.3 Money Laundering Next, we study money laundering-based accounts. As it traditionally happens, for cryptocurrency-based blockchains, we assume that accounts involved in money laun- dering will produce more cycles than those involved in Gambling or Phishing. For a special case of Money laundering, depicted by accounts related to Upbit exchange, there are 815 tagged accounts. Here, out of these 815 accounts, only two accounts are SCs. We extract both internal and external transactions for these accounts. However, all the internal transactions have an error ag `=True' (meaning the transaction is un- successful). Thus, we do not consider these transactions. Most of these accounts have very few transactions (3 to 5 transactions only). Thus, the chances of these accounts appearing in a temporal path-based cyclic path is less. As before, we rst analyze the transactions between only the tagged accounts. We nd that there are a total of 83 temporal cycles when we do not apply our modi - cations. After the application of our modi cations, only 40 temporal cycles remain. 19 (a) Example 1 (b) Example 2 (c) Example 3 Figure 9: Some of the Suspicious Temporal Cycles in the Money Laundering Here, 69 unique tagged accounts are involved in these temporal cycles. The maxi- mum hop length in these temporal cyclic paths is 6. It means money laundering-based accounts are more actively involved in the cyclic temporal path-based money trans- fers. Thereby validating that money laundering based accounts transact in cycles in cryptocurrency-based blockchain as well. Figure 9 shows a suspicious temporal cyclic path-based transfer. As before, the node name represents the last four characters of the tagged malicious accounts in the Ethereum blockchain. Loss of the money along the temporal cyclic paths in Figure 9a is signi cantly less. In Figure 9a, the completion time for cyclic transfer is 15 (starting block number is 9066502 while the ending block number is 9066487) blocks. This is equivalent to 3min in the Ethereum blockchain. Money transfer along the temporal cyclic path in a short span indicates illicit activity. But the money lost in Figure9b is high. Note that our graph is only limited to Money laundering accounts. It is quite possible that adding all of the neighbors and their neighbors continuously until no new neighbor is found will result in the recovery of the whole amount in the cyclic path-based transfer. In Figure 9b, despite high money loss except for the rst transaction, all other transactions have very little loss of money along the path. One of the reasons for these types of cycles is the limited data set. We add all the out-neighbors of the money laundering accounts into our graph and their corresponding transactions to get more consistent results. If we consider our modi ca- tions, the number of cycles we get is only 90. The maximum number of hops present in these cycles is 6. The number of cycles has not increased signi cantly, but the cy- cles with very less loss (less than 10% money loss) during cyclic temporal path-based transfer increased. The temporal cycles in which high loss occurs indicate suspicious activity. Figure 9c shows one of the detected suspicious temporal cyclic path-based transfer in money laundering after adding one-hop neighbors. In short, our results are summarized in Tables 3 and 4. Table 3 provides results for 20 Table 4: Distribution of cycles concerning Hop-length obtained using transac- tions involved in the two types de ned previously. Gambling Phishing Money Laundering Hop-Length type-A type-B type-A type-B type-A type-B 2 346 113136 156 3812 29 54 3 0 4718 8 246 6 14 4 0 12087 0 135 2 5 5 0 826 0 40 2 16 6 0 334 0 23 1 1 7 0 81 0 27 0 0 8 0 63 0 11 0 0 9 0 8 0 4 0 0 10 0 17 0 2 0 0 11 0 8 0 5 0 0 12 0 6 0 5 0 0 13 0 9 0 1 0 0 14 0 0 0 0 0 0 15 0 0 0 2 0 0 16 0 0 0 1 0 0 17 0 8 0 0 0 0 18 0 1 0 0 0 0 19 0 0 0 0 0 0 20 0 0 0 1 0 0 23 0 2 0 0 0 0 the number of valid temporal cycles, maximum hop-lengths in the cycles found using our approach for a particular malicious activity, and the number of temporal cycles in which money loss along the temporal cyclic path is less than 10%. While Table 3 lists the number of accounts that are involved in any valid temporal cycles. Table 4 presents an exact number of cycles for valid temporal cycles of di erent hop-lengths as found using our approach for the di erent malicious activities. 5.3.4 Other Activities We also apply our approach to other malicious activities. We nd that 113 out of 214 scamming accounts are tagged as Phishing accounts. We nd that these scamming accounts are not involved in any cyclic path-based money transfer. Even after adding one-hop neighbor accounts, which are tagged both as scamming and Phishing, we do not nd any temporal cycles originating except from two EOAs. Thus, it is clear that the accounts that are tagged both as Phishing and scamming behave di erently from the other Phishing accounts and that the Phishing accounts do cluster themselves into more than one cluster. 5.3.5 Combined Graph Next, we combine accounts of all the malicious activities (including \other activities") to know whether malicious activities in the blockchain do cyclic path-based money 21 transfers with other types of malicious activities. We nd that only one Gambling account is involved in a cyclic transfer with two Phishing accounts. But the Gambling account involved in the cyclic transfer is an exchange account. Accounts involved in malicious activities in the Ethereum blockchain do not transfer cryptocurrency in a cyclic path to accounts involved in other malicious activities. Also, we found that \other" malicious activities have no cyclic path-based money transfer with themselves except for 3 accounts. Thus these "other" activities also cluster themselves into a di erent cluster. From our results, it is clear that money laundering-based malicious activities are di erent from other malicious activities. Phishing-based accounts do not cluster into one cluster. Phishing accounts cluster themselves into a minimum of two di erent clusters (accounts also involved in scamming do cluster into di erent clusters than the accounts that are only involved in Phishing activity). Also, most of the Gambling accounts do not transfer money in a cyclic path with themselves. After adding more transactions into validation data, we nd that Gambling accounts are transacting with neighbors regularly. Also, Gambling and Phishing-based accounts that are not involved in scamming show a similar behavior to Phishing accounts after adding neighbor ac- counts. Both Gambling and Phishing activities transfer money using temporal cycles having larger hop counts, and the number of temporal cycles also increases. With the availability of limited computing resources, we could not validate our methodology on a larger dataset. Nonetheless, our approach can be extended to a larger dataset where more computation power is available. From our experiments, it is clear that most malicious activities can be clustered into four clusters. One cluster has money laundering-based activity, another cluster has Phishing and Gambling-based activities, the third cluster contains scamming and Phishing-based activity, and the fourth cluster contains "other" malicious activities. Using Neural Networks, in [3], the authors showed that most of the marked malicious activities in the Ethereum blockchain clusters into four di erent clusters, but they have not given in-depth insights on why such type of similarities and di erences occur. This work also obtains similar clustering indications by exploring a hidden aspects in the blockchains transaction network, i.e., money-trails. 6 Conclusion With the evolution of blockchain 2.0 and beyond, interests in blockchain technology is on a rapid rise. New use cases (such as healthcare for making a secure system for health records) of blockchain have created many applications worldwide that neither support any cryptocurrency nor crypto-tokens. As more and more solutions based on blockchain technology are introduced, we nd more cases of exploitation of the tech- nology and its users. Most of these exploit previously unknown vulnerabilities in the technology stack or gullibility of the users to fall for social engineering attacks. Such attacks result in substantial disruptions and losses of digital assets. In permission-less public blockchains such as cryptocurrency blockchains, the losses amount to monetary loss. Over the last few years, various state-of-the-art approaches have been proposed to counter attacks and detect suspicious behavior in the blockchain. Most of these approaches are ML-based and do not distinguish between multiple classes of malicious activities and club them together under one class. While others focus only on speci c kind of malicious activity. Further, these techniques do not track the cryptocurrency ow. 22 In this work, we use a 'track the money trail' approach for collecting additional behavioral information regarding di erent malicious activities. We use temporal trans- actions network for nding temporal cycles to track the money ow along these tem- poral cyclic paths. Based on the temporal cyclic path and money loss results along the path, we found that the considered malicious activities are clustered into four clusters. Also, we found that accounts involved in the Phishing activities cluster themselves into more than one cluster. We found that accounts involved in both Phishing and scamming cluster into di erent clusters than other accounts involved in Phishing only. Thus, it bears out that suspicious cyclic path-based money transfers in cryptocurrency blockchains can distinguish suspicious accounts of various types of suspicious activities. Illicit activity detection in a blockchain is challenging yet much necessary. There is a demand for forensics that involves nding suspicious activities and attribution from law enforcement agencies, regulators, and regular participants in cryptocurrency blockchains. In future, we aim to integrate our approach with the machine learning approaches and use the properties of these money-trail cycles as features. This may help to detect suspicious activities with high accuracy. Also, parallel computing can be used to reduce computation time for the cycle identi cation algorithms. We have used only EOAs and SCs based transactions; in the future, the token transfers paths and cycles may also be used to get more insights through our approach. List of Abbreviations Acronym Meaning EOA Externally Owned Accounts SC Smart Contracts Blockchain Permission-less Blockchain ICO Initial Coin O erings DFS Depth First Search FH First Hop Outgoing Neighbours of an Account in the Transaction Graph ML Machine Learning NN Neural Network SVM Support Vector Machine CCG Contract Creation Graph CIG Contract Invocation Graph MFG Money Flow Graph ATH Attributed temporal Heterogeneous Motif AAIN Homogeneous Address-Address Interaction Network TAIN Heterogeneous Transaction-Address Interaction Network Table 5: List of Acronyms. Acknowledgements This work is partially funded by the National Blockchain Project at IIT Kanpur spon- sored by the National Cyber Security Coordinator's oce of the Government of India 23 and partially by the C3i Center funding from the Science and Engineering Research Board of the Government of India. References [1] A. Abdallah, M. Maarof, and A. Zainal. Fraud detection system: A survey. Journal of Network and Computer Applications , 68:90{113, 04 2016. [2] R. Agarwal, S. Barve, and S. Shukla. Detecting malicious accounts in permis- sionless blockchains using temporal graph properties. Applied Network Science , 6(9):1{30, 02 2021. [3] R. Agarwal, T. Thapliyal, and S. Shukla. Detecting malicious accounts showing adversarial behavior in permissionless blockchains. arXiv , pages 1{15, 01 2021. [4] N. Atzei, M. Bartoletti, and T. Cimoli. A survey of attacks on ethereum smart contracts (SoK). In in Proc. of 6th International conference on Principles of Security and Trust , pages 164{186, Uppsala, Sweden, 04 2017. Springer. [5] B. Barry and M. Crane. Analysis of cryptocurrency commodities with Motifs and LSTM. In Proceedings for the 27th AIAI Irish Conference on Arti cial Intelligence and Cognitive Science , pages 28{39, Galway, Ireland, 12 2019. [6] M. Bartoletti, B. Pes, and S. Serusi. Data mining for detecting bitcoin ponzi schemes. In 2018 Crypto Valley Conference on Blockchain Technology , pages 75{84, Zug, Switzerland, 06 2018. [7] Bitcoin Magazine. What are bitcoin mixers?, 2020. (Accessed on 15/06/2021), https://bitcoinmagazine.com/guides/what-are-bitcoin-mixers. [8] ChainAlysis. The rise of cybercrime on ethereum, 08 2017. (Accessed on 15/06/2021), https://blog.chainalysis.com/the-rise-of-cybercrime-onethereum/. [9] T. Chen, Y. Zhu, Z. Li, J. Chen, X. Li, X. Luo, X. Lin, and X. Zhange. Under- standing ethereum via graph analysis. In IEEE INFOCOM 2018 - IEEE Con- ference on Computer Communications , pages 1484{1492, Honolulu, HI, USA, 04 2018. IEEE INFOCOM. [10] W. Chen, X. Guo, Z. Chen, Z. Zheng, and Y. Lu. Phishing scam detection on ethereum: Towards nancial security for blockchain ecosystem. In 29th Inter- national Joint Conference on Arti cial Intelligence , pages 4506{4512, Virtual, Japan, 07 2020. International Joint Conferences on Arti cial Intelligence Organi- zation. [11] W. Chen, Z. Zheng, J. Cui, E. Ngai, P. Zheng, and Y. Zhou. Detecting ponzi schemes on Ethereum: Towards healthier blockchain technology. In Proceedings of the 2018 World Wide Web Conference , pages 1409{1418, Lyon, France, 04 2018. International World Wide Web Conferences Steering Committee. [12] M. Conti, S. Kumar, C. Lal, and S. Ruj. A survey on security and privacy issues of bitcoin. IEEE Communications Surveys & Tutorials , 20, 05 2018. [13] Corporate Finance Institute. What is a ponzi scheme? (Accessed on 15/06/2021), https://corporate nanceinstitute.com/resources/knowledge/other/ponzi- scheme/. [14] Crypto-AML-CFT. Bitcoin money laundering: How criminals use crypto, 09 2019. (Accessed on 15/06/2021), https://www.elliptic.co/blog/bitcoin-money- laundering. 24 [15] Paul Deniero. 100s of eth stolen after bee token ico email list hacked, 02 2018. (Accessed on 15/06/2021). [16] Ethereum.org. Ethereum. (Accessed on 01/09/2020), https://ethereum.org/en/. [17] Etherscan Team. The ethereum blockchain explorer. (Accessed on 01/09/2020), https://etherscan.io/. [18] S. Farrugia, J. Ellul, and G. Azzopardi. Detection of illicit accounts over the ethereum blockchain. Expert Systems with Applications , 150:1{11, 07 2020. [19] L. Hajdu and M. Kr esz. Temporal network analytics for fraud detection in the banking sector. In ADBIS, TPDL and EDA 2020 Common Workshops and Doc- toral Consortium , pages 145{157. Springer, Lyon, France, 08 2020. [20] M. Huillet. Upbit hack: Stolen Eth worth millions on the move to unknown wal- lets, 12 2019. (Accessed on 18/01/2021), https://cointelegraph.com/news/upbit- hack-stolen-eth-worth-millions-on-the-move-to-unknown-wallets. [21] D. Johnson. Finding all the elementary circuits of a directed graph. SIAM Journal of Computing , 4:77{84, 1975. [22] T. Kadar. How are crypto and blockchain being utilised in the gaming sector?, 02 2021. (Accessed on 22/02/2021), https://bit.ly/3B4ziwa. [23] R. Kumar and T. Calders. Finding simple temporal cycles in an interaction network. In Proceedings of the Workshop on Large-Scale Time Dependent Graphs (TD-LSG 2017) co-located with the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECMLPKDD 2017) , pages 3{6, Skopje, Macedonia, 09 2017. [24] R. Kumar and T. Calders. 2SCENT: An ecient algorithm for enumerating all simple temporal cycles. Proceedings of the VLDB Endowment , 11:1441{1453, 07 2018. [25] X. Lee, A. Khan, S. Sen Gupta, Y. Ong, and X. Liu. Measurements, analyses, and insights on the entire Ethereum blockchain network. In Proceedings of The Web Conference , pages 155{166, Taipei, Taiwan, 04 2020. ACM. [26] D. Lin, J. Wu, Q. Yuan, and Z. Zheng. T-EDGE: Temporal wEighted multi- DiGraph Embedding for Ethereum transaction network analysis. Frontiers in Physics , 8:204, 06 2020. [27] T. Mikolov, K. Chen, G. Corrado, and J. Dean. Ecient estimation of word representations in vector space. In 1st International Conference on Learning Representations , pages 1{12, Arizona, USA, 05 2013. [28] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system, 03 2009. [29] T. Pham and S. Lee. Anomaly detection in the bitcoin system - a network perspective. arXiv , pages 1{8, 11 2017. [30] F. Poursafaei, G. Hamad, and Z. Zilic. Detecting malicious ethereum enti- ties via application of machine learning classi cation. In 2nd Conference on Blockchain Research Applications for Innovative Networks and Services , pages 120{127, Paris, France, 09 2020. [31] T. Robinson, D. Phil, and Y. Fanusie. Bitcoin laundering: An analysis of illicit ows into digital currency services, 2018. accessed (15/06/2021), https://info.elliptic.co/whitepaper-fdd-bitcoin-laundering. 25 [32] A. Rosic. What is blockchain technology?, 11 2020. (Accessed on 15/06/2021), https://blockgeeks.com/guides/what-is-blockchain-technology/. [33] R. Tarjan. Depth- rst search and linear graph algorithms. In 12th Annual Sym- posium on Switching and Automata Theory (swat 1971) , pages 146{160, East Lansing, USA, 10 1971. IEEE. [34] The Editors of Encyclopaedia Britannica. Casino: gambling house, 07 1998. (Accessed on 18/01/2021), https://www.britannica.com/topic/casino-gambling- house. [35] J. Wu, J. Liu, W. Chen, H. Huang, Z. Zheng, and Y. Zhang. Detecting mixing services via mining bitcoin transaction network with hybrid motifs. IEEE Trans- actions on Systems, Man, and Cybernetics: Systems (Early Access) , pages 1{13, 01 2021. 26
{ "id": "2108.11818" }
2501.10378
The Societal Implications of Blockchain Technology in the Evolution of Humanity as a "Superorganism"
This article examines the broader societal implications of blockchain technology and crypto-assets, emphasizing their role in the evolution of humanity as a "superorganism" with decentralized, self-regulating systems. Drawing on interdisciplinary concepts such as Nate Hagens' "superorganism" idea and Francis Heylighen's "global brain" theory, the paper contextualizes blockchain technology within the ongoing evolution of governance systems and global systems such as the financial system. Blockchain's decentralized nature, in conjunction with advancements like artificial intelligence and decentralized autonomous organizations (DAOs), could transform traditional financial, economic, and governance structures by enabling the emergence of collective distributed decision-making and global coordination. In parallel, the article aligns blockchain's impact with developmental theories such as Spiral Dynamics. This framework is used to illustrate blockchain's potential to foster societal growth beyond hierarchical models, promoting a shift from centralized authority to collaborative and self-governed communities. The analysis provides a holistic view of blockchain as more than an economic tool, positioning it as a catalyst for the evolution of society into a mature, interconnected global planetary organism.
http://arxiv.org/pdf/2501.10378v1
Martin Schmalzried
cs.CY, cs.CR
cs.CY
1 The Societal Implications of Blockchain Technology in the Evolution of Humanity as a “Superorganism” Martin Schmalzried martin.schmalzried@ucdconnect.ie Abstract This article examines the broader societal implications of blockchain technology and crypto -assets, emphasizing their role in the evolution of humanity as a "superorganism" with decentralized, self -regulating systems. Drawing on interdisciplinary concepts such as Nate Hagens' "superorganism" idea and Francis Heylighen's "global brain" theory, the paper contextualizes blockchain technology within the ongoing evolution of governance systems and global systems such as the financial system. Blockchain's decentr alized nature, in conjunction with advancements like artificial intelligence and decentralized autonomous organizations (DAOs), could transform traditional financial, economic, and governance structures by enabling the emergence of collective distributed decision - making and global coordination. In parallel, the article aligns blockchain’s impact with developmental theories such as Spiral Dynamics. This framework is used to illustrate blockchain’s potential to foster societal growth beyond hierarchical models, promoting a shift from centralized authority to collaborative and self -governed communities. The analysis provides a holistic view of blockchain as more than an economic tool, positioning it as a catalyst for the evolution of society into a mature, interconnected global planetary organism. 2 1. Introduction The emergence of blockchain technology and crypto -assets, particularly Bitcoin, has sparked significant interest and debate regarding their potential impact on society, economics, finance and governance. Since the introduction of Bitcoin by the pseudonymous Satoshi Nakamoto (Nakamoto, 2008) , blockchain has been utilized for its ability to enable decentralized, transparent, and secure transactions without the need for intermediaries. This technological innovation carries the promise of revolutioniz ing various sectors, including finance, supply chain management, and even voting systems (Iansiti & Lakhani, 2017) all the while sparking many controversies including security risks, fraud and scams (Kerr et al., 2023) . Despite the growing body of research on blockchain and crypto -assets, there is a notable gap in framing these technologies within a broader narrative that encompasses their societal implications and evolutionary significance. The innovative approach of this paper lies in contextualizing crypto -assets, blockchain, and Bitco in within the larger narrative of humanity's development, drawing ontheories such as Nate Hagens' concept of the human superorganism and Francis Heylighen's "global brain" hypothesis. By d oing so, the aim of this paper is to provide deeper meaning and understanding of how these technolog ical developments can be understood in the broader context of the development of humanity as a whole. Nate Hagens (Hagens, 2020) describes humanity as a superorganism driven by collective behaviors that lead to exponential growth and resource consumption. This perspective highlights the challenges posed by the current trajectory of human development, which is characterized by a purs uit of economic growth often at the expense of environmental sustainability and social equity. Heylighen's "global brain" concept (Heylighen & Lenartowicz, 2017) envisions the internet and associated technologies as forming a collective intelligence that can process information and solve problems at a global scale. In both cases, the prevalent idea is that of humanity forming a global collective organism with its own sets of characteristics and features. This paper explores how blockchain technology, in conjunction with other technological advances such as artificial intelligence (AI) and the metaverse, can play a key role in transitioning humanity from an unsustainable superorganism undergoing exponential and uncontrollable growth into a mature global entity with balanced growth and development (a balanced “global brain”) . This paper posit s that blockchain's decentralized nature aligns with the evolutionary shift toward more distributed and autonomous syst ems of governance and economic exchange. This shift mirrors the stages of human development outlined in Spiral Dynamics theory (Beck & Cowan, 1996), which describes the evolution of human consciousness and societal structures through distinct levels, each with its own value systems and worldviews. 3 Spiral Dynamics provides a framework for understanding the parallels between individual human development stages —such as infancy, childhood, adolescence, and adulthood —and the evolution of human societies. For instance, the transition from egocentric (adol escent) stages to more collaborative and integrative (adult) stages reflects a shift from self -centered behaviors to a greater emphasis on community and systemic thinking. Applying this model, this paper examine s how current societal structures are evolvin g and how technologies like blockchain fit within this broader evolution . Furthermore, this paper delves into the symbolic significance of Bitcoin and other crypto -assets in the context of financial systems and monetary policy , explor ing the idea that Bitcoin represents a form of " fail safe mechanism " or “savings” , analogous to a young adult earning their first income and seeking autonomy from parental control —in this case, autonomy from centralized financial institutions and governmental bodies . This analogy extends to the challenges and opportunities inherent in this transitio n, including regulatory concerns, potential mismanagement, and the need for guidance and support to ensure a smooth shift toward decentralized systems. The paper also addresses the critical question of how existing monetary policies and financial systems can adapt to the rise of crypto -assets by discuss ing the incompatibility between a debt -based monetary system reliant on continuous economic growth and a future where crypto -assets and stablecoins become mainstream. In this context, this paper introduce s Stéphane Laborde's (2010) Relative Theory of Money, which proposes a monetary system based on a universal dividend distributed equally among all participants, thereby eliminating the need for money creation through debt and interest , which is part of the natural inflection points within a developing organism in nature , transitioning out of exponential growth towards a “plateau” or a stabilization in its development . In short , this paper aims to provide a comprehensive analysis that frames blockchain technology and crypto -assets within a broader narrative of human development and societal evolution. By integrating interdisciplinary theories and drawing symbolic parallels, this paper seek s to offer new insights into the potential pathways for a smooth transition between existing systems and novel and emerging systems . This holistic approach underlines the importance of viewing technological advancements not merely as too ls for economic gain but as catalysts for deep societal transformation. 4 2. Theoretical f ramework 2.1 Nate Hagens' concept of the h uman superorganism In his paper entitled “ Economics for the Future - Beyond the Superorganism ”, Nate Hagens presents a narrative that frames humanity as a "superorganism, " a collective entity driven by shared behaviors, values, and an insatiable appetite for growth and resource consumption. This concept draws parallels between biological organisms and human societies, sugg esting that just as individual cells operate within a larger organism, individuals function within the broader context of society, contributing to collective outcomes that transce nd individual intentions. Hagens argues that at this stage, the human superorganism is characterized by unconscious patterns of exponential growth fueled by cultural narratives, technological advancements, and economic systems that prioritize immediate gains over long -term sustainability. This growth is often depicted as be ing out of control, leading to environmental degradation, resource depletion, and social inequities. The superorganism operates under the illusion of perpetual expansion, disregarding the finite nature of Earth's resources. The recognition of humanity as a superorganism emphasizes the need to understand the systemic drivers of our collective behavior. Hagens suggests that addressing global challenges requires a shift from individualistic perspectives to a holistic understandi ng of interconnected systems. This shift involves re-evaluating economic models, governance structures, and societal values to foster a sustainable balance between human activities and the Earth's ecological limits. In this paper, blockchain and crypto -assets are part of this process of re -evaluation and shift. 2.2 Parallel concepts in collective intelligence and societal evolution 2.2. 1 Francis Heylighen's "Global Brain" h ypothesis Francis Heylighen introduce d the concept of the "global brain, " a metaphor for the collective intelligence emerging from the interconnectedness of individuals through technology, particularly the internet. The global brain represents a self -organizing network where information and knowledge are shared and processed collectively, enhancing the problem -solving capabilities of humanity as a whole. Heylighen posits that as communication technologies advance, they facilitate the development of a distributed cognitive system that mirrors th e neural networks of a biological brain. This system allows for rapid dissemination of information, collaborative innovation, and adaptive responses to global challenges. The global brain is seen as an evolutionary step toward a more integrated and intelli gent society. The global brain hypothesis aligns with the superorganism concept by emphasizing the collective aspects of human cognition and behavior. It suggests that technologies enabling decentralized communication and collaboration such as blockchain and crypto -assets can enhance 5 the efficiency and adaptability of the global superorganism , and are a part of this global brain’s natural development . 2.2. 2 Ben Goertzel's v iews on a rtificial general intelligence and d ecentralization Ben Goertzel explores the intersection of artificial intelligence (AI), collective intelligence, and societal evolution (Goertzel, 2015) . He envisions the development of Artificial General Intelligence (AGI) that can understand, learn, and apply knowledge in a generalized way, much like a human being. Goertzel argues that AGI, integrated within decentralized networks, can significantly enhance humanity's cognitive capabilities. Goertzel emphasizes the importance of decentralization in AI development, advocating for open, collaborative platforms that democratize access to AI technologies. He suggests that decentralized AI systems can prevent the concentration of power and promote a more equitable distribution of technological benefits. By integrating AGI into a global brain framework, humanity can achieve higher levels of consciousness and problem -solving abilities. Furthermore, Goertzel highlights the potential of blockchain techn ology to support decentralized AI networks. Blockchain's secure, transparent, and distributed ledger systems can facilitate the coordination and incentivization of contributions to AI development. This synergy between AI and blockchain could accelerate the evolution of the global brain, leading to more sophisticated forms of collective intelligence. 2.3 Spiral dynamics theory applied to s ocietal and i ndividual development To understand the parallels between individual human development and societal evolution, this paper leverages Spiral Dynamics theory, developed by Don Edward Beck and Christopher Cowan (Beck & Cowan, 2014) . Spiral Dynamics is a psychological and sociological model that describes the evolution of human consciousness and cultural values through a series of stages, each characterized by distinct worldviews, motivations, and social structures. The stages, often represented by colors for ease of reference, include: 1. Beige (Survival/Safety): This foundational stage focuses on basic survival instincts and physiological needs. Societies at this level are concerned with immediate necessities, and individuals operate primarily on instincts. 2. Purple (Tribal/Animistic): Marked by a sense of community and mysticism, this stage values tradition, rituals, and the guidance of ancestral spirits. Social structures revolve around kinship and collective safety. 3. Red (Egocentric/Power Gods): Individuals assert themselves, seeking power, dominance, and immediate gratification. Societies may be ruled by strong leaders or warlords, emphasizing personal freedom without regard for others. 6 4. Blue (Absolutist/Mythic Order): Characterized by adherence to absolute truths, order, and stability. Societies develop structured institutions, laws, and moral codes, often underpinned by religious or ideological doctrines. 5. Orange (Achievist/Scientific Achievement): This stage values rationality, individualism, and progress. Societies encourage competition, innovation, and the pursuit of success through scientific and economic advancements. 6. Green (Communitarian/Egalitarian): Emphasizes community, relationships, and social responsibility. Societies prioritize equality, environmentalism, and consensus - driven decision -making. 7. Yellow (Integrative/Systemic): Individuals recognize the complexity of systems and seek to integrate knowledge from various disciplines. Societies focus on flexibility, sustainability, and holistic approaches to problem -solving. 8. Turquoise (Holistic/Globalist): Represents a global consciousness that transcends individual and collective interests. There is an emphasis on unity, interconnectedness, and the synergy of life systems. Spiral Dynamics argues that individuals and societies can evolve through these stages, though not necessarily in a linear fashion. Each stage builds upon the previous ones, incorporating earlier values while expanding to encompass more complex perspectives. 2.4 Parallels between individual development, societal evolution, and spiral dynamics To illustrate the fractal patterns in human and societal development, this paper present s a comparative framework that aligns stages of individual human growth with societal evolution, perceptions of authority, and the corresponding Spiral Dynamics stages . This framework tends to show how individual psychological development mirrors societal transformations, particularly in the context of governance and the perception of authority. 7 Table 1. Comparative f ramework of individual and s ocietal development stages Individual development stage Perception of parents Societal evolution stage Perception of authority Spiral Dynamics stage Description Infancy (0 –2 years) Parents perceived as mysterious, omnipotent beings; the world is magical and incomprehensible Early Tribal Societies Nature filled with spirits and gods; reliance on shamans and mystical figures. Purple (Magical Animistic) Focus on safety, tradition, and mysticism; strong family bonds; reality explained through myths and magic. Early Childhood (3–6 years) Parents seen as kings; admiration and acceptance of authority without question. Formation of Monarchies Kings and priests revered as divine or chosen by gods; authority is absolute. Blue (Authoritarian Absolutist) Emphasis on order, rules, and obedience; belief in one right way; institutions maintain stability. Late Childhood to Adolescence (7–12 years) Beginning to recognize parents' imperfections; questioning authority; desire for autonomy increases. Rise of Democracies , census suffrage Leaders elected but no longer revered; citizens critique and demand accountability. Orange (Achievist Strategic) Focus on individualism, achievement, and rationality; questioning traditional authority; pursuit of success and autonomy. Adolescence (13– 19 years) Rebellion against parents; critical of authority; seeking independence while still reliant on support. Demand for Rights and Social Movements , equal suffrage Citizens advocate for civil rights and increased freedoms; challenge existing systems. Green (Communitarian Egalitarian) Emphasis on equality, community, and social responsibility; challenging existing systems for inclusivity. Young Adulthood (20 – 29 years) Establishing independence; navigating responsibilities; redefining relationship with parents. Emergence of Decentralized Governance Development of self -governing communities; use of blockchain and DAOs. Yellow (Integrative Systemic) Systems thinking emerges; recognition of complexity; seeking sustainable solutions. Mature Adulthood (30+ years) Fully independent; parents become advisors; individual contributes meaningfully to society. Self -Governed Societies Centralized governments make way for autonomous communities; collaborative problem -solving. Turquoise (Holistic) Global consciousness develops; holistic understanding and interconnectedness emphasized. 2.5 Explanation of the f ramework 1. Infancy and e arly tribal societies - Human level perspective: Infants perceive their parents as omnipotent and mysterious entities who control their environment in incomprehensible ways (Piaget, 1952) . Their world is filled with wonder and magic, with no clear distinction between self and others. - Societal parallel: Early human societies interact with nature through animism and shamanism, believing in spirits and gods that influence their reality (Eliade, 8 2024) . Shamans serve as intermediaries between the physical world and the spiritual realm. - Spiral Dynamics s tage: Purple —Characterized by a magical -animistic worldview, strong family bonds, and reliance on traditions and rituals. 2. Early Childhood and monarchies - Human level perspective: Children view their parents as authoritative figures or kings, accepting their decisions without question but recognizing some similarities (Erikson, 1968) . They admire their parents and internalize rules. - Societal parallel: Societies evolve into monarchies with kings perceived as divinely appointed rulers. Authority is absolute, and obedience is expected (Tilly, 2017) . - Spiral Dynamics s tage: Blue —Emphasizes order, conformity, and a strict hierarchical structure. Laws and institutions are established to maintain stability. 3. Late c hildhood to a dolescence and d emocratic movements - Human level perspective: As children grow, they begin to notice their parents' imperfections and question authority. They seek greater autonomy and start forming their own opinions (Vygotsky, 1978) . - Societal parallel: The rise of representative democracy sees citizens no longer viewing leaders as infallible. There is increased scrutiny, demand for accountability, and a push for individual right (Dahl, 2020) . - Spiral Dynamics s tage: Orange —Focuses on individualism, rationality, and the pursuit of personal success. Traditional authorities are questioned in favor of meritocracy. 4. Adolescence and s ocial movements - Human level perspective: Teenagers often rebel against parental control, seeking independence while still relying on family support. They critique inconsistencies and advocate for personal freedoms (Steinberg, 2005) . - Societal parallel: Social movements emerge, demanding civil rights, equality, and greater participation in governance. Citizens protest against perceived injustices and advocate for systemic change (Inglehart, 2020) . - Spiral Dynamics s tage: Green —Values community, equality, and environmental concerns. There is a focus on consensus -building and social responsibility. 5. Young a dulthood and decentralization - Human lev el perspective: Young adults establish independence, manage responsibilities, and redefine relationships with their parents as peers or advisors (Arnett, 2000) . 9 - Societal parallel: The emergence of decentralized governance models, such as blockchain technology and Decentralized Autonomous Organizations (DAOs), reflects a shift toward self -governance and reduced reliance on centralized authorities (Klaus, 2017) . - Spiral Dynamics s tage: Yellow —Characterized by integrative thinking, flexibility, and an appreciation for systemic interconnectedness. Solutions are sought that are sustainable and adaptive. 6. Mature a dulthood and s elf-governed societies - Human level perspective: Mature adults are fully independent and contribute meaningfully to society. They often guide younger generations and collaborate with others for common goals (Levinson, 1986) . - Societal parallel: Societies evolve into self -governed communities where whatever is left of centralized institutions such as governments facilitate rather than control. There is collaboration between authorities and citizens for problem -solving and a progressive shift to self -governing systems without any centralized intermediary . - Spiral Dynamics s tage: Turquoise —Embodies holistic thinking, global consciousness, and an emphasis on the well -being of all life forms. Recognizes the interconnectedness of systems. 10 3. Humanity's d evelopment as a f ractal pattern The concept of fractal patterns suggests that structures and behaviors observed at one scale can be mirrored at other scales, exhibiting self -similarity across different levels of complexity (Cannon, 1984) . In the context of human development and societal evolution, this implies that the stages an individual undergoes from conception to maturity may be thought of as an unconscious basic template or pattern for the broader developmental trajectory of human societies. 3.1 Symbolic parallels in finance and t echnology The evolution of financial systems evolves in parallel to the developmental stages of human growth and societal transformation. Symbolic parallels can be drawn between individual financial independence, the decentralization of economic systems, and the maturation of societal structures facilitated by technology such as blockchain. Other symbolic parallels can be drawn between the financial system and bodily systems within the human body, shedding an original perspective on the role of finance within humanit y’s superorganism. 3.1. 1 Financial independence and d ecentralization The transition from adolescence to adulthood is marked by achieving financial independence, which involves earning income, managing expenses, and making financial decisions autonomously (Shim et al., 2010) . This period is often challenging, as young adults may lack experience in financial management, leading to potential issues such as overspending or getting into debt. Other typical behaviours found in young adults that move in together in a shared apartment or dorm include: mismanagement of food, unwashed dishes, overflowing garbage cans, dirty clothes piling up, and so on. Similarly, the emergence of blockchain technology and cryptocurrencies represents a societal shift toward financial independence from traditional centralized institutions like banks and governments (Nakamoto, 2008) . Early adopters of crypto -assets have encountered challenges including market volatility (Gandal et al., 2018) , regulatory uncertainty, and security vulnerabilities (Castonguay & Stein Smith, 2020). These obstacles reflect the problems associated with adopting new financial paradigms at a societal level , as a fractal projection at a higher level of complexity, of the problems associated to transitioning from adolescence to adulthood and gaining financial independence . Within the blockchain space, one can clearly see the “unwashed dishes and overflowing garbage cans”, which prompts reactions typical of parents coming to visit their young adults’ apartment: “he/she is clearly not ready to live on his/he r o w n ”, which takes the form of numerous regulatory initiatives meant to “clean up” the wild space of experimentation within the crypto -sphere. Yet these same experimentations as young adults are formative and lead to the emergence of responsible adults who can 11 hold their own, who are no longer dependent on their parents, and who can “innovate” and improve upon the parental “template” pushing society to evolve forward, with new ideas and values which eventually, are considered commonplace. Democracy, for instance , as an ideal, was far from an acceptable “norm” a few centuries ago, and the beginnings of democracy implemented in the early 19th century were n’t always successful. Yet nowadays, very few citizens would advocate to return to monarchies of divine right. 3.1.2 Money as humanity’s circulatory system: Bernard Lietar’s perspective Bernard Lietaer, a renowned monetary theorist, compares the financial system to the circulatory system in the human body, with money acting as the blood that flows through economic "veins" to nourish various parts of society (Lietaer, 2013) . He argues that just as a healthy circulatory system is vital for physical well -being, a robust and diverse monetary system is essential for economic stability and resilience. Lietaer emphasizes the need for complementary currencies and decentralized fina ncial structures to promote sustainability and adaptability in the face of economic crises. 3.1. 3 Money as a n ervous system: Brett Scott's p erspective Brett Scott offers a nother metaphor by likening money to the nervous system of a societal superorganism, where finance acts as the motor cortex that coordinates collective action (Scott, 2024) . In his article "Money is a Nervous System, " Scott critiques traditional metaphors that compare money to blood flowing through an economic body. He argues that such metaphors are misleading because they suggest that money carries intrinsic value like nutrients in blood plasma, obscuring the true nature of finance. Scott posits that money does not contain value itself but serves as an impulse that activates economic agents, much like nerve signals prompt muscles to move. He explains that value resides in people and their labor, not within the money. Monetary transact ions are, therefore, not transfers of value but signals or information that mobilize resources and labor within the economy. This perspective aligns with the concept of humanity as a superorganism, where individuals function as cells within a larger entity. The financial system, acting as the nervous system, coordinates activities across the superorganism, enabling complex inter actions and collaborations at scale. The central nervous system, represented by major financial centers and institutions, orchestrates large -scale economic actions through the issuance and management of money , where and how money should circulate in the ec onomy , etc. 12 3.1. 4 Combining both perspectives A more comprehensive understanding of the financial system may emerge by viewing it as a combination of both the circulatory and nervous systems. In this dual metaphor, money serves both as the signaling mechanism and the carrier of value. Just as the circ ulatory system transports oxygen and nutrients necessary for cells to perform their functions, money provides the means for individuals and businesses to engage in economic activities. Oxygen enables the execution of the nervous system's commands, sustaini ng cellular functions; similarly, money enables economic agents to access vital goods and services such as food, shelter, heat and so on. Moreover, while the nervous system transmits information and coordinates actions, it requires the circulatory system to deliver the energy and nutrients that make such actions possible. In the context of the economy, the Internet could be likened to the neural network facilitating communication, while money acts as both the impulse (signal) and the medium (energy) that mobilizes resources. This integrated perspective addresses the complexity of the financial system and its multidimensional role within humanity’s superorganism. It acknowledges that money is not merely a carrier of value or a signaling mechanism but functions as both, enabling the "orders" of the economic system to be carried out while sustaining the activities of humans . 3.1.5 From centralization to decentralization While inside the womb, a baby’s vital or biological resources depend solely on a centralized external organ: the placenta. This organ serves as the centralized intermediary between the mothers’ resources and the baby (developing organism). While in gestation, the baby develops certain organs which will enable it to gain a certain degree of autonomy without maintaining the same degree of total dependency on his mother’s resources and the placenta, which takes the form of breathing oxygen with his own lungs. The transition from one system to the other takes the form of cutting the umbilical cord, at which point, the baby takes his first breath. In order to ensure a rather smooth transition from one system to another, the baby stocks up on some fat, as the lungs and stomach are not yet fully mature and operational. While living in his/her parents’ home, a child’s access to societal resources depend solely on centralized external agents: the parents. Parents serve as the centralized intermediary between society’s resources and the child (developing human individual). A child cannot walk into a store and help him or herself to goods/services without the intermediation of parents. While living in the parental home, the child develops certain skills and undergoes certain developmental stages (toddler, child, teenager, ado lescent, young adult) which enable the child to gain a certain degree of autonomy without maintaining the same degree of total dependency on his parents’ resources and 13 finances. In order to ensure a smooth transition from living at his parents’ home to living on his own, a young adult will get a first student job and set some money aside. The transition from one system to the other takes the form of cutting the umbilical cord a second time, when the young adult moves out of the parental nest and gains full financial autonomy. While living under the rule of governments, a society’s access to the planetary resources depends solely on the affordances granted by centralized institutions which play the role of the symbolic “parent” to society. Governments serve as a centralized inte rmediary between the planet’s resources and society (developing human collective). In order to access planetary resources, one must pay taxes, respect the law, hold property titles, ask for permits, and so forth. While living under the rule of governments, society matures in its ability to self -govern and act responsibly without needing centralized governments to enforce “civil” behaviours or collective decisions . Gradually, a society gains a certain degree of autonomy from governments which takes the form of adopting their own currencies, coordinating their actions via DAOs (decentralized autonomous organisations) . In order to ensure a smooth transition from living under the rule of centralized governments to self -governed communities, and stop relying on c entralized financial institutions (fiat money, or the debt-based monetary system), a society will start to set some money aside (Bitcoin ) to weather the transition from one financial system to another. In this instance, there are a number of parallels between Bitcoin and “fat” that the baby stocks up on before birth (as in the first fractal level above). In order for a baby (global organism) to store fat, it needs to spend ex tra “energy” in order to convert food into a molecule directly assimilable by the b ody (the individual cells). In order for society to store “value” , it needs to spend extra energy in order to convert electricity into an energy which is directly assimilable by humanity (individual humans). As seen above, money is a form of “energy” and i nformation which puts humans to “work”. In case of a global financial collapse, arguably , the only “system” which is relatively neutral (not under the control of a centralized authority or government) and globally accessible is Bitcoin. Any citizen with an internet connection can create a Bitcoin wallet and start transacting (receiving/sending Bitcoin), which is exemplified in cases where currencies and the financial system have failed, such as Lebanon (Finianos, 2023) . During times of economic uncertainty or systemic transitions between financial systems, Bitcoin can serve as a stabilizer. Just as fat reserves provide energy during periods of scarcity, Bitcoin offers a decentralized asset that can preserve wealth and ensure that major necessary transactions can still take place when traditional financial systems are under stress (Baur & Dimpfl, 2021) . As with any organism, exchanges must continue. The same holds true for humanity at the global scale. If exchanges were to suddenly freeze due to a collapse of the financial system, humanity would no longer behave like a collective global organism, but would revert 14 back to fragmented, isolated communities operating independently, much like cells that lose their cohesive functioning when an organism's circulatory system fails. Furthermore, as humanity progresses towards a more interconnected and technologically advanced society, the role of artificial intelligence (AI) becomes significant. AI could be envisioned as the " cognitive facilitator " of the global superorganism, processing vast amounts of data (the sensory input generated by humans ) and generating coherent strategies (the motor output) that guide collective actions (Goertzel, 2015) . This analogy emphasizes that while money (as both nervous and circulatory systems) facilitates the functioning of the economic body, AI represents the cognitive processes that can potentially bring higher levels of decentralized coordination and create a meta- coherence that cannot be achieved with traditional centralized top -down institutions. By integrating these analogies , we can better understand the ethical and practical implications of evolving financial systems to accommodate blockchain and crypto - assets. For instance, the concept of a universal basic income (UBI) aligns with the circulatory system metaphor, where each "cell" (individual) receives the necessary "oxygen" (financial resources) to survive and function without stringent controls or conditions (Van Parijs, 2017) . While transitioning to such a system (see the section below on the Relative Theory of Money), Bitcoin and other crypto -assets can serve as a “temporary bridge” much like the example of “fat” discussed above. The recent move by various governments around the world to set up a “Bitcoin strategic reserve” is directly tied to the symbolic role of Bitcoin as a "store of value" during transitional periods, symbolically reflecting the way organisms store fat to prepa re for significant changes 1. By accumulating Bitcoin reserves, these governments aim to safeguard their economies against potential instabilities in the traditional financial system, much like how a baby relies on fat reserves during the shift from placental nourishment to independe nt feeding. This strategic move underscores the recognition of Bitcoin's potential to act as a financial stabilizer in the face of economic uncertainty. It aligns with the broader transition from centralized to decentralized systems, where reliance on traditional fiat currencies and centralized financial institutions is gradually diminishing. By embracing Bitcoin, governments are acknowledging the evolving financial landscape and the need to adapt to new forms of value exchange that operate independently of centralized control. 1 https://crypto.news/bitcoin -reserve -bill- introduced -in-brazils -congress/ https://www.washingtonpost.com/business/2024/11/27/trump -strategic -bitcoin -reserve -plan/ 15 3.2 Parental reactions and r egulatory responses In the context of individual development, parents may react to their child's pursuit of financial independence with concern or attempts to maintain control, fearing that the child is unprepared for the responsibilities (Aquilino, 2006) . Analogously, governments and regulatory bodies often respond to the rise of decentralized finance with restrictive measures, citing risks such as fraud, money laundering, and threats to financial stability (European Central Bank, 2019) . These apprehensions are not unfounded. The decentralized and permissionless nature of some crypto -assets presents challenges, including susceptibility to fraud, market manipulation, and security breaches. Early adopters may suffer losses due to inexperience or insufficient safeguards, much like young adults who might make imprudent financial choices without proper guidance (Shim et al., 2010) . However, adopting a punitive approach may be self -defeating, in the same way as a parent seeking to forcefully regain control over his/her young adult, which may inadvertently precipitate their desire for independence and autonomy, albeit experienced in a chaoti c way. 3.3 Navigating the Transition A supportive approach in both parenting and societal governance can facilitate smoother transitions to independence. Parents who provide guidance without exerting overbearing control help young adults develop competence, confidence, and responsibility (Schoeni & Ross, 2005) . They recognize the importance of allowing their children to make mistakes and learn from them, fostering growth and maturity. Similarly, governments can adopt a collaborative stance toward the evolving financial landscape by: • Creating regulatory sandboxes: Allowing innovators to test new financial products and services in a controlled environment, enabling regulators to understand emerging technologies and develop appropriate frameworks (Zetzsche et al., 2017) . • Promoting best practices: Encouraging the development of industry standards and self -regulatory organizations that can establish guidelines for ethical behavior and risk management within the DeFi space . • Engaging with s takeholders: Involving technologists, entrepreneurs, consumers, and other stakeholders in the policymaking process to ensure that regulations are informed, balanced, and supportive of the transition from centralized to decentralized systems (Finck, 2018) . • Providing free auditing services for new blockchain initiatives: Establishing government -funded programs that offer security audits, code reviews, and smart 16 contract verification services to early -stage blockchain projects, reducing barriers to entry while ensuring baseline security standards and protecting users from preventable vulnerabilities. These services can help prevent technical failures and security breaches that could harm users and damage confidence in the broader DeFi ecosystem, while also creating a knowledge base of common vulnerabilities and best practices that can benefit the entire industry. • Revise existing systems and regulations : Initiating comprehensive reforms of fundamental financial and regulatory frameworks to accommodate the paradigm shift introduced by permissionless blockchain technology. This includes reimagining core mechanisms like money creation (moving from debt -base d money creation to alternative monetary systems such as the Relative Theory of Money), taxation frameworks, and regulatory approaches. Rather than forcing blockchain innovation to conform to legacy systems, this appr oach recognizes the need to fundamentally redesign these systems to leverage the unique properties of blockchain technology while ensuring public benefit and stability. By adopting such measures, governments can help bridge the gap between traditional financial systems and emerging decentralized models. This approach aligns with the maturation process described in Spiral Dynamics, where societies transition from authorita tive structures (Blue) to more participatory and integrative systems (Yellow and Turquo ise) . The shift toward decentralized governance can occur through various pathways, each presenting unique challenges. An abrupt transition involves a rapid move away from centralized authority, which can lead to instability and resistance from existing institut ions unprepared for sudden change. Alternatively, a gradual independence allows for a smoother transition, where governments and citizens collaborate to delegate responsibilities progressively. This approach can mitigate potential disruptions and foster mu tual adaptation to new governance models. The same pattern applies to a young adult seeking independence from his/her parents: a smooth transition is preferable to an abrupt transition, whereby the young adult has to manage on his own with no parental support. To ensure a stable and beneficial transition, governments can adopt strategies that support citizen -led initiatives. One such strategy is the delegation of competencies, gradually transferring responsibilities like infrastructure maintenance, environmental management, and social services to DAOs or community organizations , all the while maintaining a presence to monitor the outcomes in order to step in should these experiments turn sour (Atzori, 2015) . 17 4. Implications for m onetary policy 4.1 Incompatibility with existing financial systems The rise of crypto -assets and decentralized finance (DeFi) presents significant challenges to traditional monetary policy and existing financial systems. The coexistence of fiat currency and widespread crypto -assets could lead to an artificial multiplication of the monetary supply, potentially causing economic instability. This concern arises because crypto -assets like Bitcoin may serve as alternative means of payment and stores of value, operating parallel to traditional currencies without following the same logic in terms of issuance/creation. . In a debt -based monetary system, money is primarily created through the issuance of loans by banks, which requires continuous economic growth to service the interest on that debt (Keen, 2011) . The introduction of crypto -assets disrupts this model by providing alternative channels for transactions and value storage that are independent of central banks and traditional financial institutions. If crypto -assets become widely accepted as means of payment, the effective monetary mass increases without corresponding controls, potentially leading to inflationary pressures and undermining the effectiveness of monetary policy. In essence, money can now circulate twice. For instance, if someone sells 1000 tokens of a given crypto -asset which has been mined or airdropped (created out of thin air) for 1000€, and those same tokens are accepted widely as payment for goods and services, then the person who sold the tokens is now in possession of 1000€ to spend, while the person in possession of the 1000 tokens can also spend those into the economy. In this sense, Bitcoin cannot be viewed as “digital gold” , as one cannot walk into a bakery and scratch of a few miligrams of a gold bar to pay for bread. In order to use gold as a “means of payment”, one must first sell it against an accepted currency. Bitcoin, on the other hand, could theoretically be used as a means of payment as its value can be broken down into subunits, and also thanks to innovations such as the lightning network allowing for near -free and fast transactions (Divakaruni & Zimmerman, 2023) . However, using Bitcoin as means of payment can only be a temporary fix, much like relying on bodily fat, for obvious reasons: Bitcoin’s deflationary characteristics. For payments, only a currency which manages to maintain its purchasing power over time c an qualify as money or as a medium of exchange, otherwise the incentive to either hold it (in case of deflation) or get rid of it (in case of hyperinflation) distorts economic activities. Moreover, the volatility inherent in many crypto -assets introduces additional risks. Fluctuations in the perceived value of crypto -assets can distort the balance between the monetary mass and the goods and services available in the economy. This instability could complicate the central bank's ability to manage inflation and maintain economic stability. While these effects have not been seen yet given the marginal adoption and weight of crypto -assets within the larger financial system, this could 18 become a problem if the rate of adoption continues and crypto -assets become more and more accepted and recognized as means of payments. Furthermore, the rise of stablecoins —crypto -assets pegged to traditional currencies or assets —adds another layer of complexity to the monetary system (Bullmann et al., 2019). Stablecoins can circulate alongside fiat currency, effectively doubling the money in circulation if not properly accounted for. The way stablecoin issuers manage underlying assets, such as investing customer deposits in bonds, could lead to the same mone y being counted twice in the financial system, exacerbating the tensions identified above . The incompatibility of a debt -based monetary system with the growing use of crypto - assets points to the necessity to undergo a similar transition to the cutting of a baby’s umbilical cord at birth, transitioning from a centralized “system” which enables growth of the organism (the debt -based monetary system, which is perfectly designed to incentivize growth) to another system where the logic is no longer based on growth but on adequacy between the organisms’ needs , based on the organisms’ actions. While a baby inside the womb grows steadily, with energy consumption going up, a baby outside of the womb is equipped with mechanisms allowing to modulate energy consumption based on the need (whether the baby is sleeping, crawling, lying down etc), via its lungs (taking in more or less oxygen) or stomach (eating more or less food) . In this sense, the Relative Theory of Money may be a solution. 4.2 The Relative Theory of Money: An alternative monetary system The Relative Theory of Money (RTM), developed by French mathematician and economist Stéphane Laborde, presents a novel approach to monetary systems that mirrors the decentralized yet coordinated functioning of biological organisms (Laborde, 2017) . By placing the human being at the center of monetary creation, the RTM seeks to emulate the way individual cells in a body contribute to and are influenced by the organism's overall state. This perspective aligns with the concept of humanity as a superorganism, where collective intelligence and coordinated actions emerge from the interactions of individual agents (Heylighen & Lenartowicz, 2017) . The RTM addresses fundamental challenges in monetary policy, particularly the difficulty of maintaining money as a stable measure of value while achieving certain social and economic objectives. Traditional monetary systems struggle with this balance, often leading to inflation, deflation, or unequal wealth distribution. The RTM offers a solution by introducing a monetary framework grounded in principles of relativi ty and individual participation. At the core of the RTM is the recognition that the economy cannot exist without human beings; they are the fundamental element upon which all economic activity is built. In essence, a billion euro is worth nothing for a person stranded alone on a desert island. 19 Money and the economy is only relevant in the context of a human society, facilitating human transactions and relations. This idea parallels the way an organism relies on the existence and health of its individual cells. Just as each cell contributes to the vitality of the body, each person contributes to the economy through their consumption, production, and decision -makin g. Laborde emphasizes that every individual should have an equal opportunity to influence the economy, based on the idea that value of goods and services is subjective and determined by personal assessments. This principle aligns with the concept of money as a voting mechanism, where spending decisions signal preferences and influence the direction of economic development, which Lindblom would call the “do llar-vote” (Lindblom, 2002) . Drawing inspiration from Einstein's theory of relativity, the RTM proposes that money, as a universal medium of exchange, must function identically in any frame of reference. In monetary terms, this means establishing a stable referential system that allow s for consistent measurement of value over time and space. The RTM achieves this by introducing two units of account: the traditional currency unit (e.g., euros or dollars) and the Universal Dividend (UD). The UD is a relative unit that represents a proportion of the total monetary mass, recalculated periodically to account for changes in the economy and population. By expressing values in UDs, the system maintains price stability and avoids the distortions caused by inflation or deflation in the traditional currency unit. In the RTM, monetary creation occurs through the regular distribution of the Universal Dividend to every individual in the monetary zone. Each person receives an equal amount of currency un its daily, which can be spent in the economy. The value of the UD increases over time at a consistent rate (for instance, 10% annually). By counting in UDs, the system naturally regulates wealth distribution. Individuals who accumulate more currency units see their relative wealth decrease over time in UD terms unless they continue to participate actively in the economy. Conversely, those with fewer currency units experience an increase in their relative wealth in UDs, promoting a convergence toward a “mean” . To understand the principle of relativity introduced by counting and displaying wealth/prices in UD, here are two tables. In a standard currency framework, as illustrated in the first table, three individuals start with initial balances ( 1000, 2000, 3000 units) and accrue wealth through compounded growth (receiving the UD, valued at 200 units and increased 10% per year) . This system results in an exponential increase in the total money supply, potentially leading to hyperinflation, where money’s purchasing power erodes as its quantity in circulation rises. 20 By contrast, using the UD as reference, the amount of UD that each individual holds is gradually pulled towards a mean, as the value of the UD is periodically re -evaluated. In this representation (second table), individuals begin with UDs proportional to t heir initial balances (5 UD, 10 UD, 15 UD), and the total money supply remains stable at 30 UD, while their relative share of those 30 UD tends to equalize (assuming no exchanges) . If the UD, on year one, is equal to 200, and increased by 10% each year, then the relative share of UD that the most wealthy person controls (P3 = 15UD) shrinks over time naturally, given the mathematical properties of the Relative Theory of Money. 21 With such a system, one could do away with nearly all policies aiming at redistributing wealth via taxation. Such a system is also growth agnostic. It does not require growth or degrowth. It simply creates a monetary system which enables each human to periodically “vote” on what the economy should look like on a daily basis. 22 The RTM mirrors the functioning of biological systems, particularly in how resources are allocated and energy is distributed within an organism. In the human body, each cell requires a baseline amount of energy to function and can receive more resources as needed based on the body's activities (Alberts et al., 1994) . Similarly, the RTM provides each individual with a baseline amount of currency through the UD, allowing them to participate in the economy and influence its direction. Wherever money accumulates, this prompts the human “superorganism” to “move” in a specific direction, enrolling humans via the accumulated money to carry out the tasks or creating the goods that were “voted” for upon the initial spending of the UD. This approach creates a form of economic homeostasis, where wealth distribution adjusts naturally over time, preventing extreme disparities and promoting overall stability. The system facilitates the emergence of collective intelligence, as individual spending decisions aggregate to reflect societal values and needs . Again, this mirrors the functioning of a biological organism, whereby energy concentrates in organs depending on the need (for instance, if a human starts to run, energy flows to the legs), and energy normalizes once the need disappears (for instance, once a human stops running and sits down). 4.4 Implementation and practical considerations Implementing the RTM would involve significant changes to the current financial infrastructure. All citizens would receive the UD directly into designated accounts, and monetary creation would no longer depend on bank -issued loans. Existing loans could be repaid using the newly generated money from the UD, and new lending could occur through mechanisms like covered bonds, where banks serve as intermediaries between investors and borrowers without creating new money (Gundersen et al., 2011) . Eventually, such lending could occur directly via DeFi protocols, bypassing the need for centralized institutions such as banks. The amount each citizen receives as a UD would be calculated based on the total monetary mass, population, and desired growth rate. For instance, in the Eurozone, with a monetary mass of roughly €10 trillion and 330 million citizens, the UD could range from €138 to €232 per month per person, depending on the growth rate. While this may seem modest, it provides a baseline income that, when combined with other earnings and the velocity of money, su pports economic activity. One must also factor in that under the RTM, the creation/destruction cycle of money is completely different from that of a debt -based monetary system, thus the initial baseline UD injection cannot be considered as a “salary” but as the initial “impulse” that sets the economy and humans within it into motion . 23 By decoupling money creation from debt and interest, the RTM promotes an economy that can adjust organically without the artificial requirement for continuous growth. Economic activity can fluctuate based on actual needs and resources, aligning with susta inable development goal s (Jackson, 2009) . The RTM has been implemented experimentally through the cryptocurrency Ğ1 (pronounced "June"), which operates on a blockchain and incorporates the Universal Dividend concept (Malafosse et al., 2022) . Ğ1 uses a "web of trust" system for user authentication, requiring new members to be certified by existing ones through face -to- face meetings. While the growth of Ğ1 has been modest, it provides valuable insights into the practicalities and challenges of adopting the RTM. Incidentally, the roll -out of CBDCs could enable quickly switching to a system based on the Relative Theory of Money in case of a global financial crisis or collapse of the debt- based monetary system. For instance, each European citizen could instantly rec eive their UD on their digital euro account, while in the Eurozone, governments coordinate to transition from displaying prices in individual currency units (the euro) to UD. 24 5. Discussion In conclusion, the fractal patterns of humanity’s development identified in this paper suggest that the transition toward self -governance via decentralized systems and away from a debt -based monetary system is not optional but an inevitable stage in our collective evolution. Just as individuals progress from dependence to independence, huma nity is poised to shift from centralized, authority -driven systems to more distributed, autonomous frameworks. This transformation is guided by the same underlying developmental principles observed in personal growth: the push for independence, the desire for self -governance, and the need for sustainable practices that align with our interconnected global reality. Blockchain technology and crypto - assets are signs of this incoming shift, offering practical mechanisms through which humanity can establish decentralized, transparent, and fairer systems that resonate with the values of autonomy and equity now emerging on a societal scale. This transition will take some time. While a baby’s transition can take minutes (abruptly cutting the umbilical cord) to a few days (in case one leaves the placenta attached as in Lotus birth) (SONAR, 2023) , and while a young adult’s transition can take a few days to a few months or even years , humanity’s transition from centralized systems to decentralized ones can take a few years or decades. The real choice before us, then, is not whether to undertake this transition but how we approach it. Various stakeholders, actors and institutions can resist, clinging to centralized structures in a way that mirrors the fractal pattern of a parent struggling to control a rebellious young adult —a path that will likely lead to chaos, conflict, and reactive measures that further entrench current issues of inequity and environmental strain. Alternatively, by recognizing these fractal patterns, society has the o pportunity to engage consciously and responsibly in this transformation. Embracing decentralized systems with awareness enables a smoother transition, applying the developmental trajectories identified in Spiral Dynamics and aligning with frameworks like the Relative Theory of Money, which advocates for an adaptive, resilient financial system that distributes value sustainably and equitably. In this approach, governments and institutions act as facilitators rather than control lers, supporting the shift thro ugh collaborative regulation, innovation, and open engagement. By choosing to navigate this evolution with foresight, we can foster a stable and inclusive decentralized future that respects both our collective interdependence and individual autonomy, enabl ing humanity to grow into a mature, cohesive superorganism aligned with the needs and values of a global society , and steering clear of the self -destructive path that the superorganism is currently on, as argued by Nate Hagens . A healthy parent takes pride in raising his/her child to the point where they become fully autonomous and self - governing adults. Governments and current centralized institutions of power should take pride in raising a society to the point where it is capable of self -governance. 25 6. References Alberts, B., Bray, D., Lewis, J., Raff, M., Roberts, K., & Watson, J. D. (1994). Molecular biology of the cell (Vol. 3). Garland New York. Aquilino, W. (2006). Family relationships and support systems in emerging adulthood In Arnett JJ & Tanner JL (Eds.), Emerging adults in America: Coming of age in the 21st century (pp. 193– 217). Washington, DC: American Psychological Association.[Google Scholar] . Arnett, J. J. (2000). Emerging adulthood: A theory of development from the late teens through the twenties. American psychologist , 55(5), 469. Atzori, M. (2015). Blockchain technology and decentralized governance: Is the state still necessary? Available at SSRN 2709713. Baur, D. G., & Dimpfl, T. (2021). The volatility of Bitcoin and its role as a medium of exchange and a store of value. Empirical Economics , 61(5), 2663-2683. Beck, D. E., & Cowan, C. C. (2014). Spiral dynamics: Mastering values, leadership and change . John Wiley & Sons. Bullmann, D., Klemm, J., & Pinna, A. (2019). In search for stability in crypto -assets: are stablecoins the solution? Available at SSRN 3444847. Cannon, J. (1984). The fractal geometry of nature. by Benoit B. Mandelbrot. The American Mathematical Monthly , 91(9), 594- 598. Castonguay, J. J., & Stein Smith, S. (2020). Digital assets and blockchain: hackable, fraudulent, or just misunderstood? Accounting Perspectives , 19(4), 363 -387. Dahl, R. A. (2020). On democracy. Yale university press. Divakaruni, A., & Zimmerman, P . (2023). The lightning network: Turning bitcoin into money. Finance Research Letters , 52, 103480. Eliade, M. (2024). Shamanism: Archaic techniques of ecstasy . Princeton University Press. Erikson, E. H. (1968). Identity: Youth and crisis (Vol. 68). Norton. European Central Bank. (2019). Crypto -Assets: Implications for Financial Stability, Monetary Policy, and Payments and Market Infrastructures (Occasional Paper Series, Issue. https://www.ecb.europa.eu/pub/pdf/scpops/ecb.op223~3ce14e986c.en.pdf Finck, M. (2018). Blockchain regulation and governance in Europe . Cambridge University Press. Finianos, R. R. (2023). Acceptance of cryptocurrency as a financial tool in the Lebanese market Notre Dame University -Louaize]. Gandal, N., Hamrick, J., Moore, T., & Oberman, T. (2018). Price manipulation in the Bitcoin ecosystem. Journal of Monetary Economics , 95, 86-96. Goertzel, B. (2015). Superintelligence: Fears, promises and potentials: Reflections on bostrom’s superintelligence, yudkowsky’s from ai to zombies, and weaver and veitas’s “open- ended intelligence” . Journal of Ethics and Emerging Technologies , 25(2), 55-87. Gundersen, P ., Hesselberg, S. S., & Hove, S. (2011). Danish mortgage credit. Danmarks Nationalbank, Monetary Review 4th Quarter Part , 1, 59 -82. Hagens, N. J. (2020). Economics for the future –Beyond the superorganism. Ecological economics , 169, 106520. 26 Heylighen, F ., & Lenartowicz, M. (2017). The Global Brain as a model of the future information society: An introduction to the special issue. In (Vol. 114, pp. 1 -6): Elsevier. Iansiti, M., & Lakhani, K. R. (2017). The truth about blockchain. Harvard business review , 95(1), 118- 127. Inglehart, R. (2020). Modernization and postmodernization: Cultural, economic, and political change in 43 societies . Princeton university press. Jackson, T. (2009). Prosperity without growth: Economics for a finite planet. Routledge. Keen, S. (2011). Debunking economics: The naked emperor dethroned? Zed Books Ltd. Kerr, D. S., Loveland, K. A., Smith, K. T., & Smith, L. M. (2023). Cryptocurrency risks, fraud cases, and financial performance. Risks , 11(3), 51. Klaus, I. (2017). Don tapscott and alex tapscott: Blockchain revolution. New Global Studies , 11(1), 47 -53. Laborde, S. (2017). Relative Theory of Money v2. 718, rev. 1.3. 7 . In. Levinson, D. J. (1986). A conception of adult development. American psychologist , 41(1), 3. Lietaer, B. (2013). The future of money . Random House. Lindblom, C. E. (2002). The market system: What it is, how it works, and what to make of it. Yale University Press. Malafosse, M., Pascal, A., & Amabile, S. (2022). Commoning with blockchain. The Ğ1 libre currency/Duniter case. Systèmes d’information et management , 27(2), 7 - 34. Nakamoto, S. (2008). Bitcoin: A peer -to-peer electronic cash system. Decentralized business review. Piaget, J. (1952). The origins of intelligence in children. International University . Schoeni, R. F ., & Ross, K. E. (2005). Material assistance from families during the transition to adulthood . The University of Chicago Press. Scott, B. (2024, Aug 01, 2024). Money is a Nervous System and finance is a motor cortex. https://www.asomo.co/p/money -as-a-nervous -system Shim, S., Barber, B. L., Card, N. A., Xiao, J. J., & Serido, J. (2010). Financial socialization of first -year college students: The roles of parents, work, and education. Journal of youth and adolescence , 39, 1457- 1470. SONAR, M. A. (2023). LOTUS BIRTH. Journal of Applied Science And Research , 11(1), 1 - 4. Steinberg, L. (2005). Cognitive and affective development in adolescence. Trends in cognitive sciences , 9(2), 69- 74. Tilly, C. (2017). Coercion, capital, and European states, AD 990 –1990. In Collective violence, contentious politics, and social change (pp. 140 -154). Routledge. Van Parijs, P . (2017). Basic income: A radical proposal for a free society and a sane economy. In: Harvard University Press. Vygotsky, L. S. (1978). Mind in society: The development of higher psychological processes (Vol. 86). Harvard university press. Zetzsche, D. A., Buckley, R. P ., Barberis, J. N., & Arner, D. W. (2017). Regulating a revolution: From regulatory sandboxes to smart regulation. Fordham J. Corp. & Fin. L. , 23, 31.
{ "id": "2501.10378" }
2307.01599
A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management
On-chain data (metrics) of blockchain networks, akin to company fundamentals, provide crucial and comprehensive insights into the networks. Despite their informative nature, on-chain data have not been utilized in reinforcement learning (RL)-based systems for cryptocurrency (crypto) portfolio management (PM). An intriguing subject is the extent to which the utilization of on-chain data can enhance an RL-based system's return performance compared to baselines. Therefore, in this study, we propose CryptoRLPM, a novel RL-based system incorporating on-chain data for end-to-end crypto PM. CryptoRLPM consists of five units, spanning from information comprehension to trading order execution. In CryptoRLPM, the on-chain data are tested and specified for each crypto to solve the issue of ineffectiveness of metrics. Moreover, the scalable nature of CryptoRLPM allows changes in the portfolios' cryptos at any time. Backtesting results on three portfolios indicate that CryptoRLPM outperforms all the baselines in terms of accumulated rate of return (ARR), daily rate of return (DRR), and Sortino ratio (SR). Particularly, when compared to Bitcoin, CryptoRLPM enhances the ARR, DRR, and SR by at least 83.14%, 0.5603%, and 2.1767 respectively.
http://arxiv.org/pdf/2307.01599v1
Zhenhan Huang, Fumihide Tanaka
q-fin.PM, cs.LG
q-fin.PM
A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management ZHENHAN HUANG and FUMIHIDE TANAKA, University of Tsukuba, Japan On-chain data (metrics) of blockchain networks, akin to company fundamentals, provide crucial and comprehensive insights into the networks. Despite their informative nature, on-chain data have not been utilized in reinforcement learning (RL)-based systems for cryptocurrency (crypto) portfolio management (PM). An intriguing subject is the extent to which the utilization of on-chain data can enhance an RL-based system’s return performance compared to baselines. Therefore, in this study, we propose CryptoRLPM, a novel RL-based system incorporating on-chain data for end-to-end crypto PM. CryptoRLPM consists of five units, spanning from information comprehension to trading order execution. In CryptoRLPM, the on-chain data are tested and specified for each crypto to solve the issue of ineffectiveness of metrics. Moreover, the scalable nature of CryptoRLPM allows changes in the portfolios’ cryptos at any time. Backtesting results on three portfolios indicate that CryptoRLPM outperforms all the baselines in terms of accumulated rate of return (ARR), daily rate of return (DRR), and Sortino ratio (SR). Particularly, when compared to Bitcoin, CryptoRLPM enhances the ARR, DRR, and SR by at least 83.14%, 0.5603%, and 2.1767 respectively. CCS Concepts: •Computing methodologies →Machine learning ;•Information systems →Expert systems . Additional Key Words and Phrases: reinforcement learning, quantitative finance, cryptocurrency ACM Reference Format: Zhenhan Huang and Fumihide Tanaka. 2023. A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management. 1, 1 (July 2023), 12 pages. https://doi.org/XXXXXXX.XXXXXXX 1 INTRODUCTION Blockchain networks or platforms, each with its native cryptocurrency (cryptos), are numerous today. Analogously, the blockchain can be compared to a company, while cryptocurrency is akin to its publicly traded shares. On-chain data, or on-chain metrics of a blockchain network, are like a company’s fundamentals. Just as fundamentals disclose significant information about a company, on-chain data provide precise, comprehensive records of a blockchain network. Cryptocurrency valuations are influenced by factors including typical on-chain metrics such as circulating supply, exchange flows, and balance on exchanges. Most on-chain data are real-time, sequentially recorded, capturing operational details and metrics of a specific blockchain network and its native cryptocurrency. Due to the aforementioned nature of on-chain data, people aspire to utilize and incorporate on-chain data into their systems for price prediction and quantitative trading [ 2,7–9,14], since the price of crypto can be determined by multiple factors, e.g., hash rate, a typical on-chain metric. Therefore, the incorporation of on-chain data into quantitative trading systems is naturally expected. Authors’ address: Zhenhan Huang, huang@ftl.iit.tsukuba.ac.jp; Fumihide Tanaka, fumihide.tanaka@gmail.com, University of Tsukuba, 1-1-1 Tennodai, Tsukuba, Ibaraki, Japan, 305-8577. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. ©2023 Association for Computing Machinery. Manuscript submitted to ACM Manuscript submitted to ACM 1arXiv:2307.01599v1 [q-fin.PM] 4 Jul 2023 2 Huang and Tanaka However, such utilization of on-chain metrics in an RL-based system for PM has not been implemented so far [ 10,12, 13]. The extent to which this utilization could help the systems outperform the baselines in terms of return performance is an intriguing question that remains unanswered. Hence, we propose CryptoRLPM, a novel and scalable end-to-end RL-based system incorporating on-chain data for cryptocurrency PM. CryptoRLPM, a mid-frequency (10-to-30-minute) PM system, consists of five units covering the process from information comprehension to trading order execution. On-chain metrics are tested and specified for each cryptocurrency, overcoming the issue of metric ineffectiveness. Additionally, we introduce the Crypto Module (CM), based on MSPM [ 6], to ensure scalability and reusability. Each CM reallocates a single-asset portfolio, including a risk-free asset (cash), necessitating the use of 𝑛CMs for an 𝑛-asset portfolio. This setup enables trained CMs to be reusable for the reallocation of any given portfolios. Furthermore, this setup facilitates CryptoRLPM to allow scalable portfolios, with the underlying cryptocurrencies of the portfolios able to be changed at any time as desired. Backtesting with three portfolios constructed for this study, CryptoRLPM demonstrates positive accumulated rate of return (ARR), daily rate of return (DRR), and Sortino ratio (SR), outperforming all the baseline. Specifically, CryptoRLPM shows at least a 83.14% improvement in ARR, at least a 0.5603% improvement in DRR, and at least a 2.1767 improvement in SR, compared to the baseline Bitcoin. To the best of our knowledge, CryptoRLPM is the first RL-based system adopting on-chain metrics comprehensively for cryptocurrency PM. The benchmarking results indicate that CryptoRLPM robustly outperforms the baselines. 2 METHODOLOGY CryptoRLPM is structured into five primary units, which collectively cover the entire process from information comprehension to trading order execution: (i) Data Feed Unit (DFU), (ii) Data Refinement Unit (DRU), (iii) Portfolio Agent Unit (PAU), (iv) Live Trading Unit (LTU), and (v) Agent Updating Unit (AUU). The architecture of CryptoRLPM is illustrated in Figure 1. The five units are interrelated, with each one responsible for at least one distinct task. From a holistic perspective, the Data Feed Unit (DFU) and Data Refinement Unit (DRU) function as the base units related to data generation . The Portfolio Agent Unit (PAU) is responsible for the initial training of RL agents for one or more portfolios. The Live Trading Unit (LTU) and the Agent Updating Unit (AUU) handle the live trading functionality, as well as the maintenance of the agent and the reallocation of portfolios. In the subsequent sections, we will break down and explain the technical details and tasks of each unit. However, the introductions to the LTU and AUU will be rather conceptual, as the purpose of this study is to validate the viability and outperformance of CryptoRLPM. While we do not intend to conduct live trading using CryptoRLPM in this study, we plan to present the implementation of its live trading functionality in future studies. 2.1 Data Feed Unit (DFU) The Data Feed Unit (DFU) is the most fundamental unit of CryptoRLPM, controlling the acquisition of data both for initial model training and for subsequent ongoing data feed requirements during live trading and model retraining. The system design of DFU is displayed in Figure 2. 2.1.1 Data Retrieval. After confirming the portfolio’s underlying cryptocurrencies, the DFU retrieves historical price data and on-chain metrics using Binance REST API and Santiment’s SanAPI (SanAPI Basic Subscription) respectively [ 1, 16]. The retrieved data are stored in two separate SQLite databases. The Data Refinement Unit (DRU) will fetch the Manuscript submitted to ACM A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management 3 Fig. 1. The architecture of CryptoRLPM, illustrating the abstract compositions of each of the five units. Fig. 2. The system design of DFU, with the data flow indicated. stored data, and then feed them into the Portfolio Agent Unit (PAU) for model training, Live Trading Unit (LTU) for live trading, and Agent Updating Unit (AUU) for model retraining. 2.1.2 On-chain Metrics. On-chain metrics refer to the information generated from the decentralized ledgers of blockchains. For instance, Daily Active Addresses, which represent the number of distinct addresses participating in a transfer of a given crypto on a specific day, indicate the daily level of crowd interaction (or speculation) with that crypto [ 15]. Since most blockchains have their own native cryptocurrencies, the on-chain metrics of a specific blockchain provide insights into its real-time status and ongoing activities. If we liken a blockchain to a public company, the blockchain’s crypto resembles the company’s stock, while on-chain metrics mirror its fundamentals. On-chain metrics, due to blockchain’s decentralized nature, offer more accurate and Manuscript submitted to ACM 4 Huang and Tanaka transparent measurements than traditional company fundamentals, and are continually public and recorded in real time. As per the Efficient Market Hypothesis (EMH) [ 4], a blockchain’s crypto valuation presumably reflects all accessible information, including on-chain metrics. Therefore, it is hypothetically to anticipate the incorporation of on-chain data into quantitative trading systems. Nevertheless, to the best of our knowledge, such an integration into an RL-based PM system remains unexplored so far. Available Metrics: The on-chain metrics employed in this study are those available under the SanAPI Basic Subscription Plan, and vary depending on different crypto. Given that on-chain and social metrics are often intertwined on API platforms and in practical applications, we do not distinguish between them in this study; both are considered as on-chain metrics. 2.2 Data Refinement Unit (DRU) For any given crypto (e.g., Bitcoin), we conduct correlation tests between the on-chain metrics and three-period returns. Figure 3 illustrates the system design of the DRU, as indicated by the dashed line. The term "three-period returns" refers to the percentage change (returns) in a crypto’s price over periods of 12, 24, and 48 days. For instance, if we employ Bitcoin’s daily OHLCV data, then the three-period returns correspond to the percentage changes in Bitcoin’s daily closing prices every 12, 24, and 48 days, respectively. Fig. 3. The system design of the DRU, illustrating the data flow and component structure. 2.2.1 Correlation Test for Feature Selection. However, the effective metrics in predicting a particular crypto’s price may not be applicable to other cryptos, especially considering that not every crypto has the same set of available metrics. Thisineffectiveness of metrics has been barely considered in existing studies. Thus, in this study, we design a scheme in the DRU to sort the metrics so that they are specified for each crypto in order to mitigate the issue of ineffective metrics. Our objective is to select valid on-chain metrics from a large pool to construct the environment with which the RL agents interact. To accomplish this, we examine the linear relationship between each of the three-period returns and the on-chain metrics for a specific crypto. This involves determining the Pearson’s correlation coefficients between the Manuscript submitted to ACM A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management 5 returns and metrics. The coefficients are divided into three groups, corresponding to the three-period returns. Within each group, the metrics are sorted according to their correlation coefficients, and the highest and lowest five from each group are selected. The selected metrics from all three groups are then ranked by their appearance frequency, and the top-10 metrics are used as valid features to construct the agents’ environment in the PAU. Dimension Reduction: To further enhance agent learning efficiency, we apply rolling normalization and rolling PCA to the selected metrics for dimension reduction before feeding them into the subsequent units. The principal components that explain at least 80% of the variance are extracted as the representation of the top-10 metrics and are subsequently fed into the PAU, LTU, and AUU. 2.3 Portfolio Agent Unit (PAU) PAU incorporates the key modules from MSPM[ 6]. MSPM is a multi-agent RL-based system designed to address scalability and reusability challenges in RL-based PM. MSPM consists of two key modules, the Evolving Agent Module (EAM) and the Strategic Agent Module (SAM). The EAM leverages a DQN agent to generate asset-specific signal- comprised information. Conversely, the SAM utilizes a PPO agent to optimize the portfolio by connecting with multiple EAMs and reallocating the corresponding assets. As described in [ 5], the Strategic Agent Modules (SAMs) of MSPM can be built separately rather than jointly. Namely, each SAM reallocates a single-asset portfolio that includes a risk-free asset (i.e., cash). In a similar vein, within CryptoRLPM, we define a Crypto Module (CM) as a composite module, consisting of an Evolving Agent Module (EAM) and a SAM, dedicated to trading a single crypto. Thus, for example, 𝑛 CMs will be necessary for the reallocation of an 𝑛-asset portfolio. With this setup, a trained CM can be integrated into any given portfolio’s weighted reallocation alongside other CMs. Furthermore, for efficient training, the EAM within a CM can be optional in certain circumstances, such as when sentiment-included on-chain metrics are fed directly from the DRU to the SAM within the CM. This configuration allows the PAU to be scalable, accommodating variable underlying cryptos in any given portfolio at any time. 2.3.1 Settings of PAU. Figure 4 illustrates the system design of the PAU, as framed by the dashed line. For the agent training of crypto 𝑥, on-chain metrics are fed into the DRU from the DFU for selection and dimension reduction. Subsequently, these refined metrics, along with the OHLCV data, are transferred from the DRU to the dedicated EAM of crypto𝑥within the PAU. Alternatively, for the sake of efficient training, the refined metrics can be directly fed into the SAM, as shown by the orange dashed line. In this case, the EAM becomes optional, but the high-quality trading signals from the EAM will not be utilized [ 6]. The signals generated by the EAM, in conjunction with the new OHLCV data, constitute the signal-comprised information that is fed into the SAM of crypto 𝑥for decision-making. The trained models are stored separately in the Model Storage. The PAU continues to interact with the AUU for model updates and the LTU for live trading. The EAM and SAM settings are adopted from [ 6] and [ 5], albeit with modifications. Detailed descriptions and discussions of these modifications follow: Environment: Each crypto-specific CM is composed of a pair: an EAM (optional) and an SAM. The EAM’s RL-based agent interacts with an environment formalized by the historical OHLCV and refined on-chain metrics of the designated crypto. The environment for the SAM’s RL-based agent is the combination of signals produced by the trained EAM and new OHLCV, or signal-comprised information. Each CM is reusable and periodically retrained by the AUU. State: Within the dedicated CM, the SAM collaborates with the EAM to establish the weight of a specific crypto. The state𝑣𝑡that the EAM observes at every time step 𝑡includes the recent 𝑛-interval (e.g., 30-minute) OHLCV and Manuscript submitted to ACM 6 Huang and Tanaka Fig. 4. The system design of the PAU, detailing the data flow and illustrating the components. refined on-chain metrics of the designated crypto, where 𝑣𝑡=(𝑠𝑡,𝜌𝑡),𝑠𝑡is the𝑛-interval OHLCV, and 𝜌𝑡represents the refined on-chain metrics from the DRU. In line with the original SAM setting in MSPM, the state 𝑣+ 𝑡observed by the SAM at time step 𝑡involves the new historical OHLCV stack 𝑠𝑡and the trading signals 𝑎𝑠𝑖𝑔𝑡. Since the SAM in CryptoRLPM is assigned to one crypto, for 𝑣+𝑡∈R𝑓×𝑚×𝑛,𝑓denotes the number of features (OHLCV and on-chain metrics),𝑚=2signifies the designated crypto and cash, and 𝑛represents the recent 𝑛intervals. Deep Q-network Agent: As introduced previously, both the EAM and SAM use a Deep Q-network (DQN) agent to interact with their environments. Additionally, for the estimates of action-value functions of the EAM and SAM, 𝑄𝜃𝐸𝐴𝑀(𝑠𝑡,𝑎𝑡)and𝑄𝜃𝑆𝐴𝑀(𝑠𝑡,𝑎𝑡), we continue adopting the settings in [ 5], using a 1-D convolutional neural network (CNN) and a simple 4-layer CNN architecture for representation, respectively. Action Space of EAM:. At every time step 𝑡, the DQN agent in the EAM selects an action 𝑎𝑡—either buy, sell, or hold—for the designated crypto. The actions taken by the EAM establish the crypto’s trading signal . These actions, stacked with the new OHLCV, are later fed into the SAM within the same CM. Action Space of SAM:. In CryptoRLPM, each CM represents a portfolio consisting of the designated crypto and the risk-free asset (cash), which is reallocated by the SAM within it. The SAM of CryptoRLPM assigns full weight to either the risk-free asset or the crypto. In simple terms, at every time step 𝑡, the action𝑎𝑡taken by the SAM of CryptoRLPM is a choice from [0., 1.] or [1., 0.], indicating the reallocation weight of the portfolio of the designated crypto and cash. With this setting, once an SAM is trained, it can be combined with other CMs and integrated into the voted-weight reallocation of any given multi-crypto portfolio. Reward Function: The reward functions for both the EAM and SAM of CryptoRLPM follow the settings in the original MSPM [5, 6]. 2.4 Live Trading Unit (LTU) As CryptoRLPM aims to be an end-to-end system for cryptocurrency portfolio management, it naturally incorporates a live trading functionality. In this section, we introduce the Live Trading Unit (LTU) of CryptoRLPM, which manages the Manuscript submitted to ACM A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management 7 live reallocation of the portfolio at 10-to-30-minute intervals. The realization of LTU depends on the APIs of specific exchanges; further implementation details will not be discussed here. The system design of LTU, framed by a dashed line, is shown in Figure 5. Fig. 5. The system design of LTU, with data flow and components illustrated. At each𝑛interval, new data are fetched and refined as per the schemes of the first two units. The newly fetched and refined data are fed into PAU for weight inference of the CMs (each corresponding to a designated crypto) in the portfolio. The set 𝑃𝑡comprises the reallocation weights obtained from all 𝑚CMs (cryptos) of the portfolio at time step 𝑡: 𝑃𝑡=n 𝑝1 𝑡,...,𝑝𝑚 𝑡 |𝑝𝑖 𝑡∈R2for every𝑖∈{1,...,𝑚}o , (1) and the voted weight 𝑤𝑡will be formalized as the reallocation weight of the portfolio at time step 𝑡 𝑤𝑡=Í𝑑𝑖 𝑡 𝑚,for𝑖∈{1,...,𝑚} (2) The formalized reallocation weight 𝑤𝑡of the portfolio is transformed into the format required by the designated exchange’s API (e.g., Binance). Whenever the portfolio’s weight is updated and formatted, a reallocation request is sent to the exchange via their APIs. 2.5 Agent Updating Unit (AUU) The Agent Updating Unit is responsible for scheduled model re-training and unscheduled updates of CMs. After each fixed interval, set in days, the agent models are re-trained, and the portfolio is updated if there are changes to the underlying cryptos, such as scaling or replacing. 3 EXPERIMENTS 3.1 Preliminaries 3.1.1 Portfolios. We propose three portfolios for our experiments: (1) Portfolio(a) includes two cryptos: Manuscript submitted to ACM 8 Huang and Tanaka •Names: Bitcoin (BTC) and Storj (STORJ) (2) Portfolio(b) includes three cryptos, and shares two cryptos with Portfolio(a): •Names: Bitcoin (BTC), Storj (STORJ), and Bluzelle (BLZ) (3) Portfolio(c) includes four cryptos, and shares three cryptos with Portfolio(b): •Names: Bitcoin (BTC), Storj (STORJ), Bluzelle (BLZ) and Chainlink (LINK) There are four distinct cryptos denominated by USDT [ 18] (a U.S. dollar equivalent stablecoin) included in the three portfolios. The reusability of CM and scalability of PAU allow the application of the trained crypto-designated CMs to different portfolio-designated PAUs, enhancing efficiency in model training. Consequently, we only need to train four CMs for the four cryptos, and organize these CMs in PAUs to represent and reallocate the three portfolios. 3.1.2 Data Ranges. In our experiments, the DFU retrieves historical 6-hour OHLCV data ( 𝑠𝑡) from [ 1] and on-chain metrics (𝜌𝑡) from [ 16], which are later refined by the DRU. In this study, the refined metrics are directly fed into the CMs’ SAMs from the DRU, leveraging the modularized design of the CM and ensuring efficient training. After that, data is split into three subsets: (i) CM(training) from October 2020 to December 2021; (ii) CM(validation) from January 2022 to February 2022; and (iii) CM(backtesting) from March 2022 to September 2022. Notably, the data ranges for different portfolios vary slightly in practice, based on the varying underlying cryptos. Table 1 lists the ranges of the datasets. Table 1. Description of Data Ranges Purpose Range CM(training) 2020 Oct ∼2021 Dec CM(validation) 2022 Jan ∼2022 Feb CM(backtesting) 2022 Mar ∼2022 Sept 3.1.3 Performance Metrics. To measure the performance of the CryptoRLPM system and its baselines, we employ three performance metrics: (i) Daily rate of return (DRR), (ii) Accumulated rate of return (ARR), and (iii) Sortino ratio (SR) [17]. Higher values for these metrics often indicate higher performance. 3.2 Results and Discussion 3.2.1 Backtesting Performance. This study primarily aims to validate the feasibility and effectiveness of the proposed system design, and thus, the baselines used for comparison are the historical performances of the underlying cryptos of each portfolio. We conduct backtesting on our CryptoRLPM system and compare its performance against these baselines. As depicted in Figure 6, Figure 7, and Figure 8, CryptoRLPM consistently outperforms the baselines across all three portfolios, achieving positive values in terms of ARR, DRR, and SR, while the baselines yield negative values on ARR. Specifically, when compared to Bitcoin, CryptoRLPM achieves at least a 83.14% improvement on ARR, a 0.5603% improvement on DRR, and a 2.1767 improvement on SR. These results demonstrate the strong performance of CryptoRLPM in generating capital returns, and validate the system’s potential applicability in crypto PM. Table 2 details CryptoRLPM’s outperformance over the baselines in terms of the ARR, DRR, and SR. It is worth noting that CryptoRLPM achieves promising SR for all portfolios, which indicates CryptoRLPM’s robust ability at profit-making and adaptability to the ever-changing market. Manuscript submitted to ACM A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management 9 Fig. 6. CryptoRLPM outperforms all baselines on Portfolio(a) in terms of the cumulative returns in backtesting. Fig. 7. CryptoRLPM outperforms all baselines on Portfolio(b) in terms of the cumulative returns in backtesting. Fig. 8. CryptoRLPM outperforms all baselines on Portfolio(c) in terms of the cumulative returns in backtesting. Manuscript submitted to ACM 10 Huang and Tanaka Table 2. Comparison of backtesting performance of the baselines and CryptoRLPM. Baselines CryptoRLPM BTC STORJ BLZ LINK Portfolio (a) ARR (%) 31.26 -51.88 -55.95 - - DRR (%) 0.2485 -0.3118 -0.1585 - - SR (%) 0.8709 -1.3082 -0.3879 - - Portfolio (b) ARR (%) 79.87 -51.88 -55.95 -37.72 - DRR (%) 0.4386 -0.3118 -0.1585 0.1001 - SR (%) 1.3877 -1.3082 -0.3879 0.2654 - Portfolio (c) ARR (%) 43.71 -51.88 -55.95 -37.72 -47.60 DRR (%) 0.3140 -0.3118 -0.1585 0.1001 -0.1785 SR (%) 0.9311 -1.3082 -0.3879 0.2654 -0.4347 3.2.2 Scalability of CryptoRLPM and PAU. In CryptoRLPM, each crypto is reallocated by a dedicated, decentralized Crypto Module (CM), rendering it a scalable PM system. The scalability means that trained CMs of the underlying cryptos are reusable and changeable for any portfolio. As an example, for a portfolio 𝑃𝑒𝑥𝑎𝑚𝑝𝑙𝑒 with three trained CMs/cryptos: [𝑎, 𝑏, 𝑐], to replace crypto 𝑐with a new crypto𝑥, we train a new CM( 𝑥), unplug the CM( 𝑐), and plug in the trained CM( 𝑥). Scaling up or down a portfolio is even easier. To exclude a crypto, say 𝑏, we simply unplug CM( 𝑏). To add a new crypto 𝑦to𝑃𝑒𝑥𝑎𝑚𝑝𝑙𝑒 , we plug in a trained CM(𝑦). Figure 9 illustrates the scalability of the architecture. Trained CMs for any cryptos are reusable for different portfolios and can be added or removed at will. Fig. 9. An intuitive illustration featuring the scalability of PAU’s architecture. Trained CMs of any cryptos are reusable for different PAUs/portfolios. Trained CMs can be added/plugged to, or removed/unplugged from, any PAUs at will. 4 LIMITATIONS AND FUTURE WORK In this study, for the efficient training and backtesting of CryptoRLPM, we directly feed refined metrics into PAU from DRU, bypassing EAMs trading signals of CMs. We defer the use of EAMs trading signals to future research, and we anticipate this usage may further enhance CryptoRLPM’s performance (ARR, DRR and SR). We also intend to include additional baselines for benchmarking, such as conventional PM strategies, e.g., CRP [ 3], or RL-based methods, e.g. Manuscript submitted to ACM A Scalable Reinforcement Learning-based System Using On-Chain Data for Cryptocurrency Portfolio Management11 ARL [ 11]. Our focus lies in validating CryptoRLPM’s outperformance through backtesting and benchmarking in this study. We plan to present the live trading functionality of CryptoRLPM in future studies. 5 CONCLUSION We propose CryptoRLPM, a reinforcement learning (RL)-based system incorporating on-chain data for end-to-end cryptocurrency (crypto) portfolio management (PM). CryptoRLPM’s scalability, embodied in its five units, with the reusability of the Crypto Module (CM), enable changes in portfolios’ cryptos at any time, demonstrating the system’s adaptability to dynamic market conditions. Additionally, we demonstrate CryptoRLPM’s ability to efficiently incorporate on-chain metrics for each crypto, overcoming the challenge of metric ineffectiveness. In backtesting with three portfolios, CryptoRLPM consistently delivered positive accumulated rate of return (ARR), daily rate of return (DRR), and Sortino ratio (SR), outperforming all baselines. In comparison to Bitcoin, a prevalent baseline, CryptoRLPM registers at least a 83.14% improvement in ARR, at least a 0.5603% enhancement in DRR, and at least a 2.1767 improvement in SR. Our study with its findings highlight the substantial potential of integrating on-chain data into RL-based crypto PM systems to enhance return performance. ACKNOWLEDGEMENT This work was supported by JST SPRING, Grant Number JPMJSP2124. REFERENCES [1] Binance. 2022. Market Data Endpoints . https://binance-docs.github.io/apidocs/spot/en/ [2]Bruno Casella, Lorenzo Paletto, et al .2023. Predicting Cryptocurrencies Market Phases through On-Chain Data Long-Term Forecasting. In Proceedings of the IEEE International Conference on Blockchain and Cryptocurrency 2023 . 1–4. [3]Victor DeMiguel, Lorenzo Garlappi, and Raman Uppal. 2007. Optimal Versus Naive Diversification: How Inefficient is the 1/N Portfolio Strat- egy? The Review of Financial Studies 22, 5 (12 2007), 1915–1953. https://doi.org/10.1093/rfs/hhm075 arXiv:https://academic.oup.com/rfs/article- pdf/22/5/1915/24429471/hhm075.pdf [4]Eugene F. Fama. 1970. Efficient Capital Markets: A Review of Theory and Empirical Work. The Journal of Finance 25, 2 (1970), 383–417. http://www.jstor.org/stable/2325486 [5]Zhenhan Huang and Fumihide Tanaka. 2022. Investment Biases in Reinforcement Learning-based Financial Portfolio Management. In 2022 61st Annual Conference of the Society of Instrument and Control Engineers (SICE) . 494–501. https://doi.org/10.23919/SICE56594.2022.9905789 [6]Zhenhan Huang and Fumihide Tanaka. 2022. MSPM: A modularized and scalable multi-agent reinforcement learning-based system for financial portfolio management. PLOS ONE 17, 2 (02 2022), 1–24. https://doi.org/10.1371/journal.pone.0263689 [7]Nishant Jagannath, Tudor Barbulescu, Karam M. Sallam, Ibrahim Elgendi, Braden Mcgrath, Abbas Jamalipour, Mohamed Abdel-Basset, and Kumudu Munasinghe. 2021. An On-Chain Analysis-Based Approach to Predict Ethereum Prices. IEEE Access 9 (2021), 167972–167989. https: //doi.org/10.1109/ACCESS.2021.3135620 [8]Huisu Jang and Jaewook Lee. 2017. An empirical study on modeling and prediction of bitcoin prices with bayesian neural networks based on blockchain information. Ieee Access 6 (2017), 5427–5437. [9]Patel Jay, Vasu Kalariya, Pushpendra Parmar, Sudeep Tanwar, Neeraj Kumar, and Mamoun Alazab. 2020. Stochastic neural networks for cryptocurrency price prediction. Ieee access 8 (2020), 82804–82818. [10] Zhengyao Jiang, Dixing Xu, and Jinjun Liang. 2017. A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem. arXiv:1706.10059 [q-fin.CP] https://arxiv.org/abs/1706.10059 arXiv:1706.10059. [11] Zhipeng Liang, Hao Chen, Junhao Zhu, Kangkang Jiang, and Yanran Li. 2018. Adversarial Deep Reinforcement Learning in Portfolio Management. arXiv:1808.09940 [q-fin.PM] https://arxiv.org/abs/1808.09940 arXiv:1808.09940. [12] Giorgio Lucarelli and Matteo Borrotti. 2019. A Deep Reinforcement Learning Approach for Automated Cryptocurrency Trading. In Artificial Intelligence Applications and Innovations , John MacIntyre, Ilias Maglogiannis, Lazaros Iliadis, and Elias Pimenidis (Eds.). Springer International Publishing, Cham, 247–258. [13] Dimitri Mahayana, Elbert Shan, and Muhammad Fadhl’Abbas. 2022. Deep Reinforcement Learning to Automate Cryptocurrency Trading. In 2022 12th International Conference on System Engineering and Technology (ICSET) . 36–41. https://doi.org/10.1109/ICSET57543.2022.10010940 [14] Muhammad Saad, Jinchun Choi, DaeHun Nyang, Joongheon Kim, and Aziz Mohaisen. 2019. Toward characterizing blockchain-based cryptocurrencies for highly accurate predictions. IEEE Systems Journal 14, 1 (2019), 321–332. Manuscript submitted to ACM 12 Huang and Tanaka [15] Santiment. 2022. daily-active-addresses . https://academy.santiment.net/metrics/daily-active-addresses/ [16] Santiment. 2022. On-chain, Social and Financial API . https://api.santiment.net [17] Frank A. Sortino and Lee N. Price. 1994. Performance Measurement in a Downside Risk Framework. The Journal of Investing 3, 3 (1994), 59–64. https://doi.org/10.3905/joi.3.3.59 [18] Tether. 2022. What are Tether tokens and how do they work? https://tether.to/en/how-it-works Manuscript submitted to ACM
{ "id": "2307.01599" }
2102.00659
Quantum crypto-economics: Blockchain prediction markets for the evolution of quantum technology
Two of the most important technological advancements currently underway are the advent of quantum technologies, and the transitioning of global financial systems towards cryptographic assets, notably blockchain-based cryptocurrencies and smart contracts. There is, however, an important interplay between the two, given that, in due course, quantum technology will have the ability to directly compromise the cryptographic foundations of blockchain. We explore this complex interplay by building financial models for quantum failure in various scenarios, including pricing quantum risk premiums. We call this quantum crypto-economics.
http://arxiv.org/pdf/2102.00659v1
Peter P. Rohde, Vijay Mohan, Sinclair Davidson, Chris Berg, Darcy Allen, Gavin K. Brennen, Jason Potts
q-fin.PR, quant-ph
q-fin.PR
Quantum crypto-economics: Blockchain prediction markets for the evolution of quantum technology Peter P. Rohde,1,∗Vijay Mohan,2Sinclair Davidson,2Chris Berg,2Darcy Allen,2Gavin Brennen,3and Jason Potts2 1Centre for Quantum Software & Information (QSI), University of Technology Sydney, NSW, Australia 2RMIT Blockchain Innovation Hub, RMIT University, VIC, Australia 3Center for Engineered Quantum Systems, Dept. of Physics & Astronomy, Macquarie University, 2109 NSW, Australia (Dated: February 2, 2021) Two of the most important technological advancements currently underway are the advent of quantum technologies, and the transitioning of global financial systems towards cryptographic assets, notably blockchain-based cryptocurrencies and smart contracts. There is, however, an important interplay between the two, given that, in due course, quantum technology will have the ability to directly compromise the cryptographic foundations of blockchain. We explore this complex interplay by building financial models for quantum failure in various scenarios, including pricing quantum risk premiums. We call this ‘quantum crypto-economics’. CONTENTS I. Introduction 1 II. Blockchain & cryptography 3 A. Blockchain 3 B. Hash functions 3 C. Public-key cryptography 4 D. Digital signatures 4 III. The quantum challenge to blockchain 5 IV. A financial market indicator of quantum failure 7 A. Crypto-bonds without quantum failure 7 B. Quantum failure with a risk-free asset in same unit of account 7 C. A Shor-attack on blockchain X 7 D. The impact of expansion 8 E. Quantum failure & heterogenous blockchains 10 V. Conclusion & future research directions 11 Acknowledgements 11 References 11 I. INTRODUCTION Quantum computing (Nielsen and Chuang, 2000) has become widely recognised as having the potential to com- promise essential elements of present-day cryptographic techniques, especially public-key cryptography and digital ∗dr.rohde@gmail.com; www.peterrohde.org; www.keybase.io/peter_rohdesignatures. This has profound implications for emerging technologies such as blockchain. There are many mis- conceptions, however, on how this could occur. We spell out the margins where quantum computing could impact blockchain. We also present a financial market predictor of the likelihood of a successful quantum computer at- tack on blockchain-based assets. We define a successful quantum attack on a blockchain as ‘quantum failure’. As a note on terminology, we refer to the origi- nal blockchain described by (Nakamoto, 2008) as the ‘Blockchain’, and its associated cryptocurrency is ‘Bit- coin’. When we use the term ‘blockchain’ we are referring to any generic blockchain. We discuss the Blockchain and blockchains in general for our purposes in the next section. For a discussion of blockchains in general see (Malekan, 2018) for an introductory coverage, (Werbach, 2018) for a more advanced overview, and (Berg et al., 2019) for a discussion of the economic implications of the blockchain. We argue that quantum failure can manifest in two important and distinct ways: first, as a purely monetary phenomenon that reduces the value of the native cryp- tocurrency, but keeps the integrity of the ledger intact, and second, as an accounting/technological phenomenon that undermines the integrity of the ledger itself, making the blockchain and its native cryptocurrency worthless. We treat (and model) these as two distinct problems associated with quantum failure. Consider the monetary aspect of a quantum attack first. Quantum failure can allow an attacker to solve a computational problem faster than other miners (on aver- age), thereby earning the majority of the block rewards over the length of time the attack persists. For a sys-arXiv:2102.00659v1 [q-fin.PR] 1 Feb 2021 2 tem such as the bitcoin Blockchain, this implies that mining can produce coins faster than the current 6.25 coins every 10 minutes (potentially until all 21 million feasible Bitcoins have been produced). We refer to this phenomenon as Grover-expansion , because it increases the rate of monetary expansion (in this instance, of the native currency of a blockchain), a phenomenon well-known and well-understood in economics. A couple of points are worth noting here. First, as defined here, Grover-expansion does not necessarily de- stroy the blockchain because if done on a small scale, it simply adds legitimate entries at a faster pace. Intuition would suggest that this monetary expansion will reduce the value of the native cryptocurrency, but need not nec- essarily reduce the value to zero. Second, many blockchain systems have a difficulty parameter built into the algo- rithms that oversee the rate at which these computations can be solved. In the case of Bitcoin, for example, the algorithm attempts to ensure that, on average, a block is added every 10 minutes. One could argue, therefore, that the difficulty parameter will adjust to negate the faster rate at which the quantum attacker solves the mining problem. The reality, however, is that the difficulty pa- rameter is adjusted at discrete points in time, based on average computation rates in the past. For Bitcoin, the difficulty parameter is adjusted every 2016 blocks; at the current reward rate of 6.25 Bitcoin for every block, the attacker could earn a maximum of 12,600 Bitcoin before the parameter is adjusted. Moreover, once adjusted, the attacker would still be the fastest to solve the now more difficult computational problem. If Grover attacks are done on a large scale, i.e by a large mining pool equiped with quantum computers, then even more dangerous attacks are possible like the 51% attack. This occurs when the pool has over half the com- putational power of the network and allows dominating the blockchain. For example, such a dominant pool can perform a ‘double spend attack’ by performing a spend transaction on one branch of the blockchain while grow- ing a parallel branch where that spend record is missing. Given the computational dominance, this parallel chain will likely grow larger than the original and trusted nodes will adopt it, hence allowing for a second spend at no additional cost. The second manner in which a quantum attacker can exploit the blockchain is by falsifying digital signatures and stealing existing tokens. This quickly erodes trust in the ledger and could elicit panic selling. We refer to this type of attack as a Shor-attack ; by rendering the blockchain entries unreliable, a Shor-attack would reduce the value of the native cryptocurrency, and indeed all assets denominated in that cryptocurrency, to zero. While this problem is distinct from Grover- expansion, it is quite possible that in some instances, depending on the nature of the blockchain, both attacks are launched simultaneously (or sequentially, with Grover-expansion preceding a Shor-attack), resulting in a Grover- Shor attack. There are two major threat vectors enabled by a Shor- attack. The first is a fast steal. After a legitimate transac- tion has been added to the network but before it has been verified (usually within 10 minutes), the attacker can learn the private key of the sender from the publicly announced key. Then the attacker can broadcast a new transaction from the same sender’s address to themselves. If the at- tacker offers a higher transaction fee, that transaction will take priority in the queue and will be verified first, meaning successful and unstoppable theft. The second is the recovery of lost Bitcoin. It is estimated up to 33% of Bitcoin allocated so far on the network are associated with dormant public addresses from owners who presum- ably have lost their private keys and cannot access the coins (Stewart et al., 2018). A Shor-attack would allow the attacker to learn the private key and take those coins. This clearly would increase available supply and devalue the currency especially if released quickly. To understand the impact these attacks can have on financial markets, we construct a model that utilises sim- ple bond pricing analytics, along with well-known parity conditions from exchange rate economics, to derive a financial indicator associated with the possibility of quan- tum failure. This model is useful for a number of reasons. First, it provides us with a method to infer the belief the market places on the probability of a quantum attack on a specific blockchain based on the risk premium of a bond denominated in the native cryptocurrency (or crypto-bond ) of the blockchain. Second, the simplicity of the model structure allows for a careful delineation of how different types of quantum attacks — Grover-expansion and a Shor-attack — impact the risk premium for a crypto-bond threatened with a quantum attack. Third, the use of familiar parity conditions yields intuitive in- sights on relationships between the crypto and fiat (say USD) economy. For example, it is readily shown that under certain simplifying assumptions, the percentage change in the exchange rate between the cryptocurrency and USD equals (approximately) the difference between the rate of Grover induced monetary expansion in the blockchain and the rate of inflation in the US economy; this is, of course, similar to purchasing power parity, and its derivation and intuition does indeed follow from that well-known exchange rate parity condition. Fourth, the model facilitates some simple comparative static exercises to gauge how parametric changes affect bond pricing ana- lytics in this situation. Finally, the model sets the stage for a preliminary consideration of strategic issues relevant in this complex environment where quantum attacks that must be protected from ex anteand defended against ex post. To motivate the final point regarding strategic interac- tion in this environment, we note that not all blockchains are equal — some are more valuable than others. It is 3 also unclear what the motivations of a quantum hacker may be. A hacker motivated by financial gain may attack a blockchain based on their perception of success and amount of financial gain to be had. An ideological hacker, however, may choose to attack a very different blockchain for very different reasons. Whatever their motivation, it is unlikely that a quantum hacker would command the resources to attack all blockchains at the same time. This implies the existence of a malicious quantum hacker would become known before all blockchains could or would be attacked. This in turn raises questions as to what the optimal response would be to this information? It is very clear that a research agenda should exist that explores all these issues and likely responses to quantum failure. In Sec. II, we set out the features of blockchain that are important for our argument. We then explain the quantum computing challenge to blockchain in Sec. III, and our financial model in Sec. IV. A conclusion and suggestions for further research follows in Sec. V. II. BLOCKCHAIN & CRYPTOGRAPHY A. Blockchain The Blockchain, which forms the basis for modern cryptocurrencies including Bitcoin, is a distributed data- structure which maintains a cryptographically irrevocable, chronologically-ordered ledger of transactions between agents. The original blockchain (the Blockchain) was designed by Satoshi Nakamoto (Nakamoto, 2008) to facilitate Bit- coin. This native internet currency has two important features of interest. First it avoids a double-spending problem and it solves the Byzantine generals’ problem, which briefly put is the following: “How do you assure that multiple distant parties agree on the same plan of action even in the presence of a small number of malicious traitors?” It performs both these functions by keeping an im- mutable record of the history of each Bitcoin. Economic agents — known as miners — are incentivised to maintain the Blockchain through the issuance of Bitcoin tokens as they add blocks containing transactions to the Blockchain. In the Blockchain protocol, miners spend computational effort to solve a puzzle (known as ‘proof of work’) and the first one to do it is rewarded with a Bitcoin issuance as well as a transaction fee. These Bitcoins are issued at a known, but diminish- ing, rate that was algorithmically established by Satoshi Nakamoto. In total there will be 21 million Bitcoin is- sued over time, with the issuance amount halved roughly every 4 years. It is useful to differentiate between the Bitcoin issuance rate and a monetary inflation rate. The issuance rate is the rate at which the number of tokens in a blockchain increase over time. An inflation rate isthe rate at which a monetary unit loses value. High is- suance of a monetary unit (popularly known as ‘printing money’) is usually associated with high inflation rates. It is important, however, to maintain a distinction between these two concepts. A high rate of issuance of a blockchain token (Bitcoin being the original token) is not guaranteed to result in price inflation (devaluation of that token). Importantly for our purposes, blockchain is based on several cryptographic primitives: 1.Digital signatures are used to certify transactions under a consensus algorithm, whereby a sufficient number of independent parties must collectively agree to sign off on the legitimacy of a transaction for it to be transcribed to the ledger. 2.Hashing is used to provide chronological links be- tween connected transaction blocks, thus making the blockchain immutable, and Merkle tree data structures allow for fast and efficient verification of transactions by all parties (Merkle, 1988). 3.The computational difficulty of inverse hashing is used in some proof-of-work protocols, such as Bit- coin, for mining new coins. These cryptographic primitives, however, have suscep- tibilities to the deployment of quantum computing, dis- cussed in Sec. III. B. Hash functions Hash functions, also an essential cryptographic primi- tive with widespread applications, that take an arbitrary input bit-string and reduce it to a short, fixed-length hash that acts as a fingerprint of the original data in highly compact form, h(x)→y. (2.1) While the hash doesn’t contain the original data, good (cryptographic) hash functions are designed to make it incredibly difficult to infer what the (or a) likely input was that it corresponds to, on the basis that they are one- way functions (i.e computationally easy to evaluate in the forward direction, but extremely computationally difficult to invert) and exhibit highly quasi-random behaviour. The problem of inverting hash functions — finding an input that maps to a given hash, x=h−1(y), (2.2) is, from a computational complexity perspective, concep- tually similar to the problem of brute-forcing a symmetric- key crypto-system, and can be described mathematically in the same manner as a satisfiability problem. Note that, unlike the similarly-structured case of symmetric-key en- cryption, there is no key involved, and because the length 4 of the output is fixed, there are necessarily collisions , whereby multiple unique inputs map to the same output hash. The Bitcoin Blockchain implements proof-of-work via inverse hashing , whereby a legitimate coin is defined as a bit-string whose hash lies within a particular range. Specifically, SHA256 (SHA256 (c)) =y (2.3) where SHA256 is a standard 256-bit hash function (256- bit Secure Hash Algorithm), and crepresents a legitimate coin when the output bit-string ysatisfies the constraint of having a fixed number of leading zeros. Since hash functions are one-way functions by definition, the mining process requires repeatedly hashing random bit-strings via brute-force until an input is found satisfying the output constraint. In economic terms, this implies that monetary expan- sion is directly related to the hash rate of computers allocated towards the mining process, modulated by a difficulty function , which algorithmically ensures that min- ing becomes progressively harder by adjusting the num- ber of necessary leading zeros in the output bit-string yfrom Eq. (2.3). This imposes an asymptotic cap on the token supply. Thus, the token issuance rate is effec- tively determined by the collective hash rate, and the algorithmically-imposed difficulty function. C. Public-key cryptography The most important cryptographic primitive we have today is public-key cryptography. Here the encryption- decryption process relies on two distinct keys, a public-key which can onlybe used to encrypt messages, and a private- keywhich can onlybe used to decrypt them. For this reason, such protocols are also referred to as asymmetric cryptography . Both keys combined are jointly referred to as akey-pair. The encryption and decryption operations can be de- fined mathematically as, f(m,k pub)→c, f−1(c,kpriv)→m, (2.4) wherefandf−1are the encryption and decryption oper- ations,mis the plain-text message, cis the cipher-text, andk={kpub,kpriv}is the key-pair comprising the public and private keys. The reason asymmetric cryptography is so useful, is that in most real-world scenarios in a globalised economy, we cannot go and meet people in advance of communi- cating with them to securely exchange secret keys. In fact, we may not even know them. By making everyone’s public-keys openly available, we are able to securely sendmessages to them, without first having to perform any secret key-exchange with them a priori in a dark alleyway. Importantly, one of the main criteria for such protocols is that the public and private keys cannot be computed from one another. Obviously, if one were able to look up a public-key on a key-server, and infer the associated private-key from it, the whole thing would be useless. The original asymmetric cryptographic protocol was RSA, named after its inventors (Rivest et al., 1978). More recently, more efficient elliptic-curve cryptography (ECC) has become the norm (Koblitz, 1987; Miller, 1985). The mathematical basis of RSA is that a private-key is defined by two prime numbers, and the corresponding public-key is given by their product. The computational security arises from the unproven, but widely held belief that integer factorisation is an extremely computationally complex problem — believed to be NP-intermediate — that classical computers cannot efficiently solve. This directly equates to their inability to infer private-keys from public-keys — a so-called trapdoor function — and hence the cryptographic integrity of RSA. ECC is based on a different, but closely related mathematical problem, with the same essential cryptographic properties. D. Digital signatures While public-key cryptography can be utilised for se- curing messages, by reversing the roles of the public and private keys it can also be used to authenticate messages via the provision of digital signatures . When you receive anemailfromsomeone,youwanttobesureitwasactually they who sent it, and that the email you received hasn’t been modified or forged by someone else. Similarly, when logging into an online service like your email, users want to be sure they’re interacting with whom they actually think it is. Usingthesamepublic-keysystemasbefore,leteveryone who wishes to be able to authenticate their messages create an additional key-pair. This time, they make the key that can only be used for decryption public, keeping the one that can only be used for encryption private. Now when they send a message they want to digitally sign, they encrypt it (or just a hash of it), that they send along with the message. This encrypted hash acts as a digital signature, which others cannot falsify without knowing the privately-held encryption key. However, the publiclyavailabledecryptionkeycanbeused,uponreceipt of a message along with its digital signature, to decrypt the signature and compare it with the message itself, thereby establishing its integrity. 5 III. THE QUANTUM CHALLENGE TO BLOCKCHAIN Large-scale quantum computers directly compromise both RSA and ECC, via a quantum algorithm known as Shor’s integer factorisation algorithm (Shor, 1994) and closely related discrete logarithm algorithm, allowing them to efficiently calculate private-keys directly from their associated public-keys. If and when quantum com- puting eventuates, this implies that the entire crypto- graphic backbone of our contemporary internet infrastruc- ture would be compromised. In addition to compromising encrypted messages, Shor- armed quantum computers could by the same logic also compromise digital signatures. The analysis changes slightly, however, for symmetric cryptography (and similarly for inverse hashing). Here two parties share a secret-key in common, which is used for both encryption and decryption. Because the same key facilitates both roles, this is also referred to as symmetric cryptography. The foremost current standard symmetric- key algorithm is AES256 (Advanced Encryption Standard, with 256-bit key-length) (Daemen and Rijmen, 2002). This standard is a widely-used cryptographic primitive in today’s internet software infrastructure. In general, good symmetric cryptographic techniques are regarded as being very strong, in the sense that they are considered highly robust against conventional cryptan- alytic techniques, such as differential cryptanalysis, which aren’t known to provide significant shortcuts over brute- force attacks. It’s therefore largely reasonable to associate their security with their vulnerability to brute-forcing, whereby we systematically try out all possible keys, at- tempting to decrypt an intercepted message using each one, and then running some simple tests (e.g statistical or language tests) to flag whether one such decryption attempt is likely to correspond to the unencrypted plain- text message (it’s effectively certain that an incorrect key will not pass this test, providing a false-positive). Using an encryption algorithm with key-length n, there are2npossible choices to work through, of which on average we’d have to try half until we find the right one. This exponential scaling grows extremely rapidly, and already 2256combinations (as for AES256) far exceeds what any classical computer, present or future, could realistically iterate through systematically, from which the security of the algorithm arises. This brute-force approach to cracking a code can be interpreted as what computer scientists refer to as a sat- isfiability problem — for some function that maps a plain- text input message and a key to an output cipher-text, f(m,k)→c, which input value mevaluates to a partic- ular output c, assuming I don’t know the key k? In this case, the input is a given choice of key, and the binary output answers the question ‘is this a legitimate decryp- tion?’. In general, satisfiability problems are extremely computationally hard to solve. From the field of computa-tional complexity theory (Arora and Barak, 2009), they are known to be NP-complete in general. Although it’s unproven whether NP-complete problems can or cannot be efficiently solved on classical computers (proving this is one of the biggest open questions in the field of theoretical computer science), it is very strongly believed that they cannot be. Formally, for a good cryptographic code, evaluating the function, f(m,k)→c, (3.1) should be computationally easy, whereas evaluating its inverse, f−1(c,k)→m, (3.2) should also be computationally easy if kis known, but extremely computationally hard (or impossible) if it is not. A quantum algorithm known as Grover’s search algo- rithmprovides a relatively modest quantum advantage in solving this class of problems (Grover, 1996). The com- putational advantage it provides is to effectively quadrat- ically reduce the input search-space over the equivalent classical brute-force approach. That is, whereas previously we had to search over 2npossible input configurations, now we effectively have to search over only√ 2n= 2n/2of them. The right hand side of this equation provides the direct interpretation that it compromises security to the extent of effectively halving the respective key-length: n becomesn/2. That is, the security of AES256 is effectively reduced to that of AES128. This is not an insurmount- able problem, however, as a security response would be to simply switch to an AES512 standard. Note that this enhanced scaling provided by Grover’s algorithm is in the ideal context of error-free quantum computation. In reality, large-scale quantum computers necessarily require error-correction (Shor, 1995), which incurssignificantoverheadsofitsown(thescalingofwhich is highly architecture-dependent). For this reason, any practical future quantum advantage will be significantly less than the already modest advantage described above. Indeed, if the error-correction overhead is too great, there may be no advantage at all. While symmetric cryptography is far more robust against quantum attacks than asymmetric cryptography, it cannot be used for digital signatures by virtue of its symmetry. Although it appears that symmetric cryptography is robust to the advent of quantum computing, this is not proven. Security remains at the level of computational security, i.e the assumption that computers, classical or otherwise, are unable to provide sufficient computational resources to implement a systematic brute-force attack, or that future cryptanalytic techniques will not provide shortcuts around it. 6 A far stronger claim to security is via information- theoretic security , whereby no such assumptions about adversarial computational capabilities are made. There is one (and only one) such symmetric-key algorithm which provides this information-theoretic level of security — the one-time-pad (OTP) algorithm, also known as the Vernam cipher. This algorithm, however, is absurdly impractical for use. For any given encrypted message, a key of exactly the same length must be employed, which cannot then be reused; hence the name. Encryptionisperformedviaabit-wiseXOR(ormodulo- 2 addition) operation between the plaintext message and key, c=m⊕k. (3.3) Decryption is performed by repeating the same procedure on the encrypted cipher-text, m=c⊕k. (3.4) Thus the protocol is symmetric. This ‘solution’, however is trivial: If agents had the ability to share a key of the same length as the message itself, which couldn’t subsequently be reused, they could use that opportunity to directly communicate the mes- sage.1In short, one-time-pad encryption has very limited applicability. Quantum cryptography provides a potential avenue to resolving the problems associated with the OTP protocol. By exploiting the randomness inherent in the measure- ment of quantum states, something imposed by the laws of quantum mechanics, it is possible to construct proto- cols for securely sharing long random bit-strings between remote parties. This is known as Quantum Key Distribu- tion (QKD) (Bennett and Brassard, 1984; Ekert, 1991). It is impossible for the shared random strings to be com- promised via intercept-resend attacks. This provides only the ability to securely share random data not messages themselves. But by utilising this secure shared random- ness as a source for OTP keys, it is possible, in principle, to resolve its impracticalities. Of course, QKD need not only be used for OTP keys, but could be used for sharing secrets keys for any other symmetric-key algorithm, such as AES256. This creates a hybrid protocol, whereby the distribution of secret-keys is facilitated by QKD, but any unknown vulnerabilities in the underlying conventional crypto-system go unchanged. 1The reason the key can only be safely employed once is because if two cipher-texts encrypted with the same key are XORed together we obtain the same as the XOR of the plain-texts, c1⊕c2= (m1⊕k)⊕(m2⊕k) = m1⊕m2, upon which we can directly apply a conventional two-letter frequency attack to statistically predict m1andm2. As soon as either of these are known we trivially extract the key via k=m⊗c.In contemporary encrypted communications systems it is common to employ similar hybrid schemes combining symmetric and asymmetric elements, where a public-key system is used to share a shorter session-key , that is subsequently employed in a symmetric cipher2. Typically this is performed using the Diffie-Hellman key-exchange protocol (Diffie and Hellman, 1976; Merkle, 1978). Such a hybrid QKD system effectively substitutes only the component associated with the exchange of session-keys. While quantum algorithms do not entirely compro- mise hashing, they very much compromise digital sig- natures based on conventional public-key cryptographic techniques. This implies the ability for future quantum computers to transcribe fraudulent transactions to the Blockchain via falsifying the consensus, thereby undermin- ing the integrity of the transaction ledger it maintains. In the worst-case scenario, this could effectively invali- date the future value of transcribed contracts from the point in time at which such a Shor-enabled compromise of the ledger becomes viable. This highlights the importance of ‘post-quantum cryp- tography’ for future quantum-proof blockchain imple- mentations. Already efforts are underway towards this goal. For example, the Quantum Resistant Ledger em- ploys hash-based digital signatures for this purpose (note that hash-based signatures, despite being presumably ro- bust against quantum attack vectors, have caveats of their own). And NIST has launched a project to identify and standardise post-quantum cryptographic protocols (csrc.nist.gov/projects/post-quantum-cryptography). In summary, Grover’s algorithm can enhance hash- inversion as an instance of a satisfiability problem. This implies that quantum computation has the potential to distort the algorithmic token supply policy. We define the ability to artificially enhance monetary expansion as ‘Grover expansion’. This combined with Shor’s algo- rithm ability to compromise digital signatures suggests that blockchain technology would be severely compro- mised by the advent of quantum computing. This ability of quantum computing to compromise the public key cryptography that underpins blockchain, either through Grover-expansion or a Shor-attack, or both, can be de- scribed as ‘quantum failure’. An analysis of quantum attack vectors on cryptocurrencies is presented in (Aggar- walet al., 2017). One of the notable results there, is that when accounting for fault tolerance overheads, the time- line for a successful Shor-attack is much sooner, perhaps 10-15 years, than for a substantial Grover-attack. 2Themotivationforexchangingasession-keyforuseinasymmetric cipher,asopposedtodirectlycommunicatingusinganasymmetric cipher, is that the former are block-ciphers that map plain-text messages to cipher-text messages of the same length, |c|=|m|, whereas the latter induces significant space overheads in the cipher-text,|c|/greatermuch| m|, thereby making it most space efficient to employ the latter once-off and the former thereafter. 7 IV. A FINANCIAL MARKET INDICATOR OF QUANTUM FAILURE In this section, we construct a simple model based on (Bierman and Hass, 1975; Yawitz, 1977) to predict the impact of quantum failure on the assets in a crypto- economy. A. Crypto-bonds without quantum failure To keep the analysis intuitive, we consider a zero- coupon bond, B, denominated in some cryptocurrency, X. The bond has face value A, and time to maturity of one-year. We do not allow other maturities, although these could readily be incorporated to derive yield curves. Risk in this model centres around the risk of quantum failure. While there is no equivalent of risk-free treasury bonds in the crypto-bond market, future bond face value payments can be guaranteed through smart contracts. Consequently, default risk can be eliminated through the requirement that 100% of the borrowed funds be kept as collateral (possibly in assets denominated in a different currency, or even physical assets) in escrow via a smart contract. Thus, while expensive, smart contracts can eliminate the possibility of the idiosyncratic risk of default by the bond issuer. We assume that all agents are risk-neutral. The first scenario we consider is one where either due to technological advancements in blockchain technology or lack of advancement in quantum ones, or both, a bond has no risk of quantum failure. Thus, in addition to zero idiosyncratic default risk, we impose zero systemic quan- tum risk. Given a yield to maturity (YTM) of iand price P, we have, P=A 1 +i. (4.1) B. Quantum failure with a risk-free asset in same unit of account Now consider a hypothetical intermediate case where there are two bonds existing simultaneously denominated in the same cryptocurrency X: •B, which is risk-free as before. •ˆB, which is susceptible to quantum attack. This cannot happen in general, because either the entire Xnetwork is susceptible to quantum failure in the form of a Shor-attack (in which case all Xdenominated assets are at risk) or the entire network if free from risk of quantum failure. Since quantum risk is systemic, this case is unrealistic and hypothetical because it assumes that quantum risk is idiosyncratic to some bonds. However, it is a useful intermediate stage in the thought process.Let0<ρ< 1be the probability that quantum failure does not occur in the one-year period until maturity. We assume this belief is held by all market participants. The extremities of ρ= 0andρ= 1are trivial. In the case ofρ= 0quantum failure never occurs and the problem reduces trivially to the standard analysis. In the second instance,ρ= 1, quantum failure occurs with certainty, in which case no rational agent will hold risky crypto-bonds at any positive price. We assume that if quantum failure occurs for ˆB, it will pay zero to the holder of the bond. For the risky asset we have, similar to before, ˆP=A 1 +ˆi. (4.2) Arbitrage between the risky and risk-free bonds yields, ˆi=1 +i ρ−1. (4.3) From this we can determine the bond risk premium that arises from the possibility of quantum failure, R=ˆi−i =(1 +i)(1−ρ) ρ. (4.4) This result essentially translates risk of quantum failure to its respective bond risk premium. So, if quantum risk were to be idiosyncratic, by looking at the risk-premium R=ˆi−i, we can infer the expected probability 1−ρthe crypto-market is placing on quantum failure occurring, providing a mechanism (for even non-market-participants) to infer quantum risk from a market-based indicator. C. A Shor-attack on blockchain X Now consider the existence of two separate systems, one of which is free from quantum risk and one that is exposed to quantum failure. It is not necessary that the former exists in the crypto world — it could well be the fiat economy. The two requirements needed to conceptualise ‘risk-free’ in this context are: 1.There must be no idiosyncratic risk of default for the bond. 2.The system must not be susceptible to quantum failure. Fiat can satisfy the first requirement through the is- suance of government securities (treasury bills and bonds) and, even if public key cryptography fails, can satisfy the second requirement through the exclusive use of cash (notes and coins). A crypto-system can satisfy the first requirement through smart contracts, and the second only if the required technological advancements occur. 8 For the purposes of our analysis, there is one system (ei- ther fiator crypto) using currency X∗, andone blockchain, X, that is susceptible to quantum risk in the form of a Shor-attack that will render its cryptocurrency worthless. The former has a risk-free bond, B∗; the latter’s crypto- bond, which is susceptible to quantum failure, is ˆBfrom Sec. IV.B, and will pay out zero if there is a Shor-attack. In the following we assume X∗to be fiat, specifically USD. Since these two systems rely on different units of ac- count to price assets, there is a current spot exchange rate,S, that measures the price of 1 unit of X∗in terms ofX. Thus, a bond priced at Punits ofXis worthP/S units ofX∗, and so on. Further, suppose the expected spot rate at the end of the one-year period when the bond matures is Se. There are two possibilities: 1.The exchange rate is fixed: Xis a stablecoin pegged toX∗(USD), in which case Se=S. 2. The exchange rate is flexible: Se/negationslash=S, in general. Suppose exchange rates are flexible. To link the yield to maturity of the crypto-bond with risk of quantum failure to the yield to maturity of the risk-free treasury bond, we proceed via two steps. First, we compare two assets with identical risk attributes — the (hypothetical) risk-free crypto-bond, B, denominated in X(from Sec. IV.B) with the risk-free bond denominated in X∗. Second, we value the risky crypto-bond, ˆB(denominated in X). For the first step, if i∗is the interest rate on B∗, as- suming uncovered interest parity (UIP) holds, 1 +i=Se(1 +i∗) S. (4.5) For an equilibrium where both ˆBandB∗are held, from Eqs. (4.1) and (4.5), we have, ˆi=Se(1 +i∗) ρS−1, (4.6) Se=ρS/bracketleftBigg 1 +ˆi 1 +i∗/bracketrightBigg , (4.7) or in terms of percentages, ˙Se=ρ/bracketleftBigg 1 +ˆi 1 +i∗/bracketrightBigg −1, (4.8) where, ˙Se≡Se−S S. (4.9) Thus, the equilibrium expected appreciation or depreci- ation ofX∗in terms ofXdepends not only on the interest rate differential, but also on the probability of quantumfailure. For any other spot rate expectation, given the yields to maturity, arbitrage possibilities will exist. The risk premium on the risky crypto-bond becomes, R=ˆi−i∗ =(1 +i∗)(1 + ˙Se−ρ) ρ. (4.10) Compared to the previous result from Eq. (4.4), there is anaddedelementofforeignexchangerisk,thatiscaptured by the presence of ˙Se. In the case where Xis a stablecoin, ˙Se= 0, and if we knowi∗(say the interest rate on USD 1-year treasury bond) and ˆi(the yield to maturity on the risky bond), we can inferρ, the market expectation for quantum failure. In the case of a flexible exchange rate, however, the market’s beliefs about ˙Sewould have to be estimated before such an inference about market perceptions of quantum failure can be made. D. The impact of expansion To investigate the impact of increases in the rate of coin issuance through Grover-expansion, we begin by noting that typically no cryptocurrency, including Bitcoin, acts as a unit of account for the purchase and sale of goods and services. Rather, as pointed out by (Bolt and Van Oordt, 2019), vendors who accept payments in cryptocurrencies often simply convert a fiat price to the cryptocurrency price using an exchange rate S. Assuming that the currency free from quantum risk, X∗(USD), is the unit of account, this essentially implies that the Law of One Price holds. If so, for any good or serviceφ, the price denominated in cryptocurrency Xis pφ=p∗ φS, wherep∗ φis the price of φdenominated in X∗. Since this is true for every good, it follows that Purchasing Power Parity (PPP) holds for any aggregate measure of price levels (such as the Consumer Price Index) in any periodt. Denoting the price levels in period tasCtand C∗ t, PPP implies, Ct=C∗ tSt. (4.11) Consider now the transactions version of the quantity equation (Fisher, 1911), used in (Bolt and Van Oordt, 2019) in the context of pricing cryptocurrencies, which we now suppose holds in cryptocurrency system X, CtTt=MtVt. (4.12) Here, •Vtdenotes the velocity of cryptocurrency Xduring periodt. •Ttdenotes the quantity of goods and services trans- acted on blockchain Xduring period t. 9 •Ctis the aggregate price level in blockchain X. •Mtis the quantity of tokens (money) issued in cryp- tocurrency X. Eq. (4.12) can now be expressed as, Ct C∗ t(C∗ tTt) =MtVt, (4.13) whereC∗ tTtdenotes the value of transactions on blockchain Xbut denominated in currency X∗. Given that PPP holds, it follows from Eq. (4.11) that, St=MtVt C∗ tTt. (4.14) If PPP holds in every period, we have, St−1=Mt−1Vt−1 C∗ t−1Tt−1. (4.15) To integrate this with the bond market analysis, it is worthwhile outlining the timeline more precisely, as shown in Fig. 1. Specifically, we assume that each period lasts for 1 year and we consider period t−1, as the past year. The bond is issued at the end of period t−1(the current time) when the exchange rate is known to be St−1. The bond matures at the end of the following one-year period t. With probability the crypto-economy survives period ρXtPeriod tBonds mature at end of period tBonds issued at end of period t−1Period t−1 Figure 1 Timeline for the asset pricing model. As is evident from the timeline in Fig. 1, all the vari- ables realised during period t−1are pre-determined and known at the time of bond issuance (the end of period t−1). Consequently, St−1,Mt−1,Vt−1,C∗ t−1andTt−1are predetermined variables at the time of bond issuance and when investment decisions are made. At this time, more- over, investors must form expectations over the realisation of periodtvariables. In the absence of a quantum attack, the issuance of money is algorithmically determined for cryptocurrencies, and Mtis known to investors at the end of periodt−1. Investors must form expectations over the remaining variables, which include: Se t,Ce∗ t,Ve tandTe t. With this timeline, it follows that, Se t=MtVe t Ce∗ tTe t. (4.16)Given the relatively short timeline we are focusing on (two periods, tandt−1), let us assume that the velocity of the cryptocurrency is both stable andcommon knowledge, such thatVt−1=Vt=V. Then, from Eqs. (4.15) & (4.16), we have, in the absence of quantum attack, Se t St−1=Mt Mt−1C∗ t−1 Ce∗ tTt−1 Te t. (4.17) Converting this to percentage changes gives, 1 +˙Se=1 +µ (1 +π∗e)(1 + ˙Te), (4.18) where: •Mt Mt−1= 1+µ, whereµis the rate of change of money supply, or in other words, the rate at which new tokens are issued in X, which is an algorithmically determined constant. •Ce∗ t C∗ t−1= 1 +π∗e, whereπ∗eis the expected inflation of goods and services in the fiat system X∗. •Te t Tt−1= 1+ ˙Te, where ˙Teis the rate at which transac- tions are expected to change over the given period. •Se t St−1= 1 + ˙Se, where ˙Seis the expected apprecia- tion/depreciation of X∗in terms of X. In order to focus on the role of token issuance on ex- change rate expectations, let us assume that the volume of transactions using cryptocurrency is expected to be stable, i.e ˙Te= 0. This assumption is readily dropped if the focus shifts from token issuance to gauging the impact of increasing or decreasing popularity of Xmeasured in terms of the volume of transactions, or if a more general approach is required. Under this assumption we obtain, 1 +˙Se=1 +µ 1 +π∗e. (4.19) The following approximation then holds (ignoring ˙Seπ∗e for small percentage changes), ˙Se∼=µ−π∗e. (4.20) Assuming that transaction volumes are stable ( ˙Te= 0) and that the velocity of cryptocurrency Xis stable, the percentage change in the exchange rate is approximately equal to the rate of token issuance for cryptocurrency Xminus inflation of goods and services in the risk-free systemX∗. So, for example, if BTC (blockchain X) token supply increases by 5% every year and inflation of goods and services in the US (risk-free system X∗) is 2%, we would expect the USD to appreciate by approximately 3% in terms of BTC. As an aside, it is evident that the expectation of inflation in the US may itself be driven by the expected rate of change of the USD money supply by the Federal Reserve. 10 Now suppose we allow for the possibility of a quantum attack and Grover-expansion in period t. LettingµGrep- resent the maximum possible monetary expansion that can be achieved by the quantum attacker by virtue of speeding up the mining process through enhanced com- putational (quantum) capabilities, Eq. (4.16) transforms to, SG t=MG tVe t Ce∗ tTe t, (4.21) where, MG t Mt−1= 1 +µG. (4.22) Thus, allowing for the possibility of Grover-expansion the expected exchange rate is now, Se t=ρMtVe t Ce∗ tTe t+ (1−ρ)MG tVe t Ce∗ tTe t =Ve t Ce∗ tTe t[ρMt+ (1−ρ)MG t].(4.23) This yields the parallels to Eqs. (4.19) & (4.20), 1 +˙Se=1 +ρµ+ (1−ρ)µG 1 +π∗e, ˙Se∼=ρµ+ (1−ρ)µG−π∗e.(4.24) Eq. (4.24) suggests that the expected exchange will incorporate the possibility of Grover-expansion in a quan- tumattack.Moreover,thehigherthemagnitudeofGrover- expansion the market expects, the more the USD is ex- pected to appreciate (and the cryptocurrency depreciate). Apart from being interesting in its own right as a way to predict exchange rate changes based on algorithmi- cally determined token increases and (fiat) inflation, this exchange rate forecast impacts the risk-premium of the risky bond if we combine combine Grover-expansion with a Shor-attack, R=ˆi−i∗ =1 +i∗ ρ/bracketleftbigg1 +ρµ+ (1−ρ)µG 1 +π∗e−ρ/bracketrightbigg .(4.25) This implies that if ˆiandi∗are known along with the algorithmically determined µ, the market expectation of the impact of Grover-expansion ( µG), and a publicly available forecast of expected inflation in system X∗, we can infer the market expectation of the probability of quantum failure, 1−ρ. Finally, we can state some simple comparative static results. All else being equal, the risk premium on crypto- bond ˆBincreases when, from Eq. (4.25): 1.The rate of token issuance is higher (since ∂R ∂µ=1+i∗ 1+π∗e>0), unless deflation on goods and ser- vices inX∗(say fiat) is more than 100% ( π∗e<0 and1 +π∗e<0).2.The rate of money supply increases due to Grover- expansion is higher (since∂R ∂µG=(1−ρ)(1+i∗) ρ(1+π∗e)>0), unless deflation on goods and services in X∗(say fiat) is more than 100% ( π∗e<0and1 +π∗e<0). 3.Inflationofgoodsandservicesin X∗decreases(since ∂R ∂π∗e=−(1+i∗)(1+ρµ+(1−ρ)µG) ρ(1+π∗e)2<0). 4.And, of course, as the probability of Xsurviving decreases (since∂R ∂ρ=−(1+i∗)(1+µG) ρ2(1+π∗e)<0). While we do not investigate further generalisations of the model, a number of extensions are possible, including: increasing the periods of analysis to generate a yield curve; increasing the maturity of the bond to allow for coupon payments; allowing for changes in the survival rate when there are more periods; investigating the role of demand through changes in transaction volumes, and so on. While these add greater sophistication to the model, they do not change the fundamental intuition behind the assessment of quantum risk when crypto-bonds are available. E. Quantum failure & heterogenous blockchains Now suppose that there is one risk-free system (crypto or fiat),X∗, andnblockchain systems {X1,X2,...,Xn} that are at risk of quantum failure with associated sur- vival rates of{ρ1,ρ2,...,ρn}. Without loss of generality, supposeρ1> ρ 2> ... > ρ n, such that the market be- lievesX1has the greatest chance of surviving a quantum attack, and Xnthe lowest. One question is why this belief structure exists. Given that quantum attacks are costly, the answer may depend on the attacker’s objective. There are two separate issues here: first the security of blockchains vary; second, the value of blockchains vary. Moreover, ‘value’ itself may depend on the attacker: a mercenary attacker may place the highest value on the blockchain with largest capitali- sation; a political attacker may target a blockchain that causes the greatest harm to a certain group. Irrespective of their motive, the expected benefit (to the attacker) of an attack on Xiisσivi, whereσidenotes the probability that an attack will succeed, and vithe (subjective) value to the attacker upon success. For the market to form a clear assessment of {ρi}, agents may therefore first need to establish who the at- tacker is and their motives. That is, it is quite possible that the probabilities of quantum failure, {1−ρi}, do not depend on technological security {σi}alone. Once such an assessment of {ρi}is formed, however, the set of risk premia {Ri}reflect the market assessment of quantum failure in each system. It is likely that in this situation, there being a single dominant blockchain — for example, the state of affairs conceived by Bitcoin maximalists — is not necessarily a 11 good thing, because all the resources of the attacker could be devoted to compromising the security of the dominant system. Indeed, this opens up a number of strategic possibilities open to attackers and market participants. For example, suppose the attacker commences an attack onXi. Assuming they do not have the resources to attack allnsystems, how should participants in other systems respond? Should they immediately abandon blockchains X\Xiand flee to the safety of X∗? But if that were the case, they could can destroy all nsystems by simply attacking the system with the greatest σi. The flight from all these blockchains will: (a) reduce their security to zero as miners depart; and, (b) drive the exchange rate value of all cryptocurrencies in terms of X∗,1/Si, to crash (presumably to zero), making tokens worthless during the process of exchanging them to X∗. A better market response might be to diversify portfo- lios across blockchains (possibly stochastically) such that mercenary attackers are less likely to find highly concen- trated capitalisation worth attacking. This suggests some degree of randomisation (mixed strategies) both by agents and attackers. There are some interesting game-theoretic considerations here that may be worth exploring in future research. V. CONCLUSION & FUTURE RESEARCH DIRECTIONS We have identified two vulnerabilities that blockchains have to the advent of quantum computing. Quantum hack- ers could falsify blocks being added to a blockchain and/or double spend tokens on any given blockchain depending on the features of the blockchain. This behaviour would manifest itself as monetary inflation — a well-known and well-understood problem in the fiat economy. We are able to deploy standard economic analysis to develop a finan- cial indicator that would reveal whether quantum failure had occurred or not. Our indicator relies on the existence of financially motivated individuals and pricing relation- ships that depend on the existence of efficient markets. As such we are confident that the indicator will be reasonably reliable in detecting quantum failure. Our indicator, however, is only the beginning of an understanding of quantum failure. Scaleable quantum computing will not arrive spontaneously or immediately be deployed to looting blockchains or stealing wealth. Widespread adoption is likely to be gradual and, initially, can be expected to be expensive and possessed by few. In short, the initial applications are unlikely to be ma- licious. If the cost of dedicating quantum infrastructure to compromising a given cryptographic asset outweighs the realisable profit from doing so — assuming financially motivated hackers — a rational quantum-capable player would not be expected to make this investment. Thus, one would reasonably expect cheap cryptographic assetsto retain their integrity via the lack of incentive to com- promise them. On the other hand, cryptographic assets of tremendous value would logically stand higher in the list of priorities to quantum hackers. These insights raise all manner of questions as to how best to respond to the generalised problem of quantum computers hacking blockchains. Which blockchains are likely to be hacked and by whom? How should observers react? Would a successful quantum attack result in a ‘flight to quality’? What does ‘flight to quality’ mean? Is it a flight to fiat? Should individuals diversify their exposure to quantum risk across blockchains? If so, should the risk of quantum attack be thought of as being systematic risk as in Markowitz portfolio risk (Markowitz, 1952)? Another avenue of study is the effect on crypto- economics when many adversarial agents are equiped with quantum computers. For example, in Grover’s al- gorithm there is a non-negligible probability to solve a problem by measurement before the algorithm finishes. This gives rise to a mixed Nash equilibrium strategy for time to measure among many players trying to solve a problem like inverse hashing for mining first (Lee et al., 2018). This would have implications on the fluctuations in transaction speeds, presenting new opportunities for market manipulation. Then there are geo-political risks. In addition to pri- vate agents developing quantum computing capability for their own purposes, nation states are also interested in quantum technology. How will this technology be regu- lated and controlled? The existence of rogue nation states developing capacity in this space is an immediate chal- lenge to digital economic infrastructure over and above blockchain. We propose that the analysis of the interplay between quantum computing and blockchain as economic infras- tructure be labelled quantum crypto-economics . ACKNOWLEDGEMENTS Peter Rohde is funded by an ARC Future Fellow- ship (project FT160100397). Chris Berg, Sinclair David- son, and Jason Potts are funded by an ARC Discov- ery (DP200101808). This research was fundedin part by the Australian Research Council Centre of Ex- cellence for Engineered Quantum Systems (Project num- ber CE170100009) REFERENCES Aggarwal, Divesh, Gavin K. Brennen, Troy Lee, Miklos San- tha, and Marco Tomamichel (2017), “Quantum attacks on bitcoin, and how to protect against them,” Ledger 3, 10.5195/ledger.2018.127. Arora, Sanjeev, and Boaz Barak (2009), Computational com- plexity: a modern approach (Cambridge University Press). 12 Bennett, C H, and G. Brassard (1984), “Quantum cryptogra- phy: Public key distribution and coin tossing,” Proceedings of the IEEE 175, 8. Berg, Chris, Sinclair Davidson, and Jason Potts (2019), Un- derstanding the Blockchain Economy: An Introduction to Institutional Cryptoeconomics (Edward Elgar, Cheltenham). Bierman, Jr, H, and J. E. Hass (1975), “An analytical model of bond risk differentials,” Journal of Financial and Quanti- tative Analysis 10, 757. Bolt, W, and M. R. C. Van Oordt (2019), “On the value of virtual currencies,” Journal of Money, Credit and Banking 52, 835. Daemen, Joan, and Vincent Rijmen (2002), The design of Ri- jndael: AES – the Advanced Encryption Standard (Springer- Verlag). Diffie, Whitfield, and Martin E. Hellman (1976), “New direc- tions in cryptography,” IEEE Transactions on Information Theory 22, 644. Ekert, Artur K (1991), “Quantum cryptography based on bell’s theorem,” Physical Review Letters 67, 661. Fisher, Irving (1911), “The purchasing power of money: Its determination and relation to credit, interest and crisis,” The Economic Journal 21, 393. Grover, L K (1996), “A fast quantum mechanical algorithm for database search,” in Proceedings of the 28th annual ACM symposium on theory of computing , p. 212. Koblitz, N (1987), “Elliptic curve cryptosystems,” Mathemat- ics of Computation 48, 203. Lee, Troy, Maharshi Ray, and Miklos Santha (2018), “Strate- gies for quantum races,” arXiv:1809.03671. Malekan, Omid (2018), The story of the Blockchain (Triple Smoke Stack, New York).Markowitz, Harry (1952), “Portfolio selection,” The Journal of Finance 7, 77. Merkle, R C (1988), “A digital signature based on a con- ventional encryption function,” Advances in Cryptology - CRYPTO ’87 293, 369. Merkle, Ralph C (1978), “Secure communications over insecure channels,” Communications of the ACM 21, 294. Miller, V (1985), “Use of elliptic curves in cryptography,” CRYPTO: Lecture Notes in Computer Science 85, 417. Nakamoto, Satoshi (2008), “Bitcoin: A peer-to-peer electronic cash system,” https://www.bitcoin.org/bitcoin.pdf. Nielsen, M A, and I. L. Chuang (2000), Quantum Computation and Quantum Information (Cambridge University Press, Cambridge). Rivest, R, A. Shamir, and L. Adleman (1978), “A method for obtaining digital signatures and public-key cryptosystems.” Communications of the ACM 21, 120. Shor, Peter W (1994), “Algorithms for quantum computation: discrete logarithms and factoring,” in Symposium on the Foundations of Computer Science , Vol. 35, p. 124. Shor, Peter W (1995), “Scheme for reducing decoherence in quantum computer memory,” Physical Review A 52, R2493. Stewart, I, D. Ilie, A. Zamyatin, S. Werner, M. F. Torshizi, and W. J. Knottenbelt (2018), “Committing to quantum resistance: a slow defence for bitcoin against a fast quantum computing attack,” R. Soc. Open Sci. 5, 180410. Werbach, Kevin (2018), The Blockchain and the New Archi- tecture of Trust (The MIT Press, Cambridge). Yawitz, J B (1977), “An analytical model of interest rate differentials and different default recoveries,” Journal of Financial and Quantitative Analysis 12, 481.
{ "id": "2102.00659" }
2106.10012
XRP Network and Proposal of Flow Index
XRP is a modern crypto-asset (crypto-currency) developed by Ripple Labs, which has been increasing its financial presence. We study its transaction history available as ledger data. An analysis of its basic statistics, correlations, and network properties are presented. Motivated by the behavior of some nodes with histories of large transactions, we propose a new index: the ``Flow Index.'' The Flow Index is a pair of indices suitable for characterizing transaction frequencies as a source and destination of a node. Using this Flow Index, we study the global structure of the XRP network and construct bow-tie/walnut structure.
http://arxiv.org/pdf/2106.10012v1
Hideaki Aoyama
q-fin.GN
q-fin.GN
arXiv:2106.10012v1 [q-fin.GN] 18 Jun 2021XRP Network and Proposal of Flow Index Hideaki Aoyama Graduate School of Advanced Integrated Studies in Human Sur vivability, Kyoto University, Kyoto 606-8306, Japan RIKEN iTHEMS, Wako, Saitama 351-0198, Japan Research Institute of Economy, Trade and Industry (RIETI), Tokyo 100-0013, Japan E-mail: hideaki.aoyama@gmail.com (Received May 17, 2021) XRP is a modern crypto-asset (crypto-currency) developed b y Ripple Labs, which has been increas- ing its financial presence. We study its transaction history available as ledger data. An analysis of its basic statistics, correlations, and network propertie s are presented. Motivated by the behavior of some nodes with histories of large transactions, we propose a new index: the “Flow Index.” The Flow Index is a pair of indices suitable for characterizing t ransaction frequencies as a source and destination of a node. Using this Flow Index, we study the glo bal structure of the XRP network and construct bow-tie/walnut structure. Presented at the“Blockchain in Kyoto” (February 17–18, 202 1), and will appear in the JPS Confer- ence Proceedings. KEYWORDS: Power distribution, Ripple Labs., Ledger data, bow-tie/wa lnut structure 1. Introduction The world of crypto-assets is dynamic and complex (we use the term “crypto-asset” instead of “crypto-currency” throughout this paper. See [1]). Its pre sence in the financial market has steadily increased since its inception in early 2013. Understanding the nature of this world is important. Ever since its inception, all transaction data (except for a few, which we will elaborate in the next section) are stored and available through various media, pr oviding researchers with ample opportunity to study the intriguing properties, similar to Bitcoin. [2– 4]. Traditional monetary transactions through financial insti tutions, such as banks, are crucial for analyzing and understanding inter-firm and firm-household r elationships. However, the availability of such data is quite limited because of privacy concerns, ex cept for a few rare cases [5]. In this study, we present a basic analysis of the XRP world obs erved through ledger data, which is the transaction record comprising the amount of XRP, sour ce account, destination account, and the day and time (in coordinated universal time (UTC)) of tra nsactions. (For a reasonable and read- able introduction to XRP, see [6].) Accounts are just 33 lett er-long codes such as “rfceigRxmgA- jWR6LH1L7YsooWKMqM5Pr6,” and no other information on the o wner (name, address, etc.) are available. Although this makes interpreting the results of analysis rather difficult, because of its im- portance and data availability, it remains a worthwhile end eavor. In Section 2, we describe our ledger data and its basic proper ties, including the distribution of the number of transactions, properties of the time series wi th the day-of-the-week analysis, and cor- relations. Section 3 is devoted to analyzing the XRP network of the transactions, wherein nodes are accounts and edges are transactions. Section 4 describes th e new proposal of the Modified Inverse Herfindahl-Hirschman Index andFlow Index . Section 5 is devoted to studying the global structure of the XRP network, similar to bow-tie /walnut decomposition, using the Flow Index. Section 6 o ffers 1 Fig. 1. Annual number of transactions. The points connected with da shed lines denote all transactions, whereas those with solid lines denote XRP–XRP. discussion and conclusion. 2. Data and its Basic Statistics The ledger data we analyze are for 2,463 days of 1 /2/2013–9/30/2019. The first 32,570 ledgers were lost because of “a mishap in 2012” [7]. 2.1 Data Selection From this data set, we extract data with the following criter ia. (1) The ledger contains transactions between 1,525 currenc ies and crypto-assets. Most of these are from XRP to XRP; however, some of them are from XRP to others, o thers to XRP, and others to others. We provide a yearly breakdown for those with XRP–X RP, and the rest is provided in Fig.1. We use XRP–XRP transactions only. (2) The data set contains “partial payments” [8], wherein th e actual transferred amount is di fferent from the transaction amount because of the payment of transf er fees. In reality, they are rare: 0.018% of all of the XRP–XRP transactions, with the minimum o f 0% in 2013 and a maximum of 0.041% in 2019. The distribution of “Amount” and “Deliver ed amount” and the delivered amount is provided in Fig. 2, wherein we observe some pattern s of quantization of the delivered amount and the proportionality between the amount and the de livered amount. We drop these “partial payment” transactions from the following analysi s. After filtering, we arrive at the data of the sizes listed in Ta ble II. 2.2 Data Distributions The cumulative distribution function (CDF) of the annual XR P transaction is plotted in Fig. 3, wherein the dashed straight line has a gradient of =−1. The data for XRP >105fit are appropriate to this line, except for the first year of 2013. This means that th e XRP distribution has a power-decaying fat tail, XRP−1in CDF and XRP−2in the Probability Distribution Function (eps). The absolu te value of this exponent of CDF tail is called the “Pareto index.”. Th e current Pareto index 1 is known to be a phase transition point between an “Oligopoly” phase and a “P seudo Equality” phase [9, 10]: In case the fat tail is thinner and the Pareto index is larger than 1, t he share of those with higher ranks (top, largest, second largest, and so forth) have zero shares when an infinite number of entries are present. 2 Source Destination No. of Transactions XRP XRP 43,624,956 CCK CCK 3,836,798 CNY CNY 933,208 EUR EUR 836,061 USD USD 667,504 SFO SFO 487,965 BTC BTC 473,921 JPY JPY 207,385 ETH ETH 168,908 GWD GWD 146,054 Table I. Top 10 transaction currencies. Fig. 2. Distribution of “Amount” and “Delivered amount” of the XRP– XRP transactions whose “Amount” is not equal to “Delivered Amount.” The dashed diagonal has a gradient equal to one wherein the amount is equal to the delivered amount. In contrast, the top-ranking ones have finite shares, even wh en an infinite number of entries exists. The top 10 transactions (in amount) are listed in Table III. A s shown in Table II, the total traded amount is∼1.1651×1012XRP. Therefore, the top two transactions in this table occup y 17% of all ∼45 million transactions, which is indeed a large share. This criticality of the Pareto index being equal to one is mos t easily understood when referring to the case of the size of firms in a country. Empirical analysis o f firms in developed countries (such as Japan, France, Germany, and the United Kingdom) showed that the firm size (number of employees, amount of sales, or income) distribution has a Pareto index v ery close to one through many years. This is in contrast to the distribution of personal income whose P areto index varies around 2 (say, 1.5–2.5), depending on the economic situation of the year. For firms, bu siness competition drives the Pareto index downward (fatter tail), as big firms attempt to dominat e the market. In contrast, various political pressures and measures by the central bank and the ministrie s against monopoly and oligopoly are active. The current author argued that the balancing critic al point is at a Pareto index equal to one [9]. However, a big difference between this argument on firm size and the current XRP t ransaction exists. 3 Year # Transactions # Source # Destination # All nodes XRP (/1012) 2013 1,104,589 22,410 548,38 54864 0.2031 2014 2,897,049 35,477 130,658 131,525 0.1368 2015 6,147,511 28,362 56,724 64,310 0.0625 2016 7,652,661 31,370 68,167 75,230 0.2939 2017 7,883,617 297,558 666,749 693,787 0.2109 2018 7,483,668 424,695 714,184 826,622 0.1310 2019 10,379,060 378,700 434,675 535,724 0.1266 All years 43,548,155 1,287,516 1,810,387 1,810,676 1.1651 Table II. Number of transactions, nodes (source, destination, and ei ther of them) and the amount of traded XRP. Fig. 3. Annual Cumulative Distribution Function (CDF) of the amoun t of XRP transactions. The former is “stock,” while the latter (the transaction amo unt we analyze) is “flow.” Moreover, the XRP world is free from central governing organization and th ere is no measure against monopoly and oligopoly. Thus, the reason behind the current finding remai ns a mystery for the moment. 2.3 Time Series Fig. 4 shows the daily amount of transactions. Fig. 5 shows th e daily number of users (blue, orange, and green lines show number of sources, destination s, and either sources or destinations, respectively). We observe that both the amount and number of users are highly volatile and that most users trade both as a source and destination. The left panel of Fig. 6 shows the details of the daily number o f transactions in 2018, wherein Sundays (in UTC) are shown with a vertical dashed line. The re duction of transactions on Saturdays and Sundays is visible to the naked eye. This indicates that m ost of the nodes are operated by humans. (Although the time is in UTC and the data cover the entire worl d, the Saturdays and Sundays in UTC 4 Fig. 4. Daily amount of transactions in linear (left) and log scale ( right). Fig. 5. Daily number of users in linear scale (left) and log scale (ri ght). are approximately weekends in most economically active reg ions, as the Pacific Standard time (PST) in the United States is UTC-7, and Japan Standard Time (JST) i s UTC+9.) It is clear that the absolute values of the Fourier components in the right panel present a clear peak at a period of seven days. The daily number of users also shows reduction on weekends. H owever, the daily total amount of transactions does not show a clear periodicity. This may be b ecause of its high volatility. This weekly periodicity is weaker in other years. A similar behavior was found in the analysis of the volume and No. XRP Destination Data & Time Source 1 1.0×1011bn0864 2016-11-07T07:50:20Z bn0347 2 1.0×1011bn0864 2016-11-07T07:51:10Z bn0347 3 1.1×1010bn0530 2014-06-10T21:59:40Z bn0598 4 1.0×109bn0166 2014-06-10T22:01:50Z bn0915 5 9.1×109bn0151 2014-06-10T22:07:40Z bn0781 6 9.0×109bn0545 2013-01-26T22:35:20Z bn0103 7 9.0×109bn0760 2013-01-26T22:36:00Z bn0103 8 9.0×109bn1010 2013-01-26T22:39:00Z bn0103 9 9.0×109bn0298 2013-01-26T22:39:30Z bn0103 10 8.0×109bn0135 2013-01-26T22:36:40Z bn0103 Table III. Top 10 transactions. “bnxxx” is a encoded node name defined by the author. 5 number of Bitcoin transactions [2]. Fig. 6. Detail of the daily transaction numbers in 2018. The left pan el is the daily series, and the right panel is its Fourier decomposition. 2.4 Correlation There is a correlation that obeys an interesting phenomenol ogical law. Fig. 7 shows the correlation between daily number of users and daily total amount of trans actions, in which di fferent colors show different years. The dashed line has gradient =1.5, which means that [Amount]∝[Number of users]1.5. (1) We observe yearly development toward large numbers of users and a larger amount of transactions roughly along this line. A close examination of the annual da ta reveals that the distribution split into a group above and another below this line in 2013 and 2014, res pectively; however, this converges in later years. This power law is curious, calling for the model ing of agents in this XRP world: Since Eq.(1) means [Amount per user] ∝[Number of users]0.5, (2) This means an interesting characteristic of the herding beh avior in XRP trade: in a day of high activity with a number of users larger than usual, the amount of averag e transactions increases. For example, if the number of users becomes 10 times as much, the amount of a verage transactions becomes√ 10≃ 3.2 times as much. Other correlations between the number of destinations, num ber of sources, and number of trans- actions show no such behavior. All three correlations follo w linear proportionality (power exponents are close to one). 3. XRP Network Let us examine the network(s) they form, where nodes are acco unts, and edges are transactions. The CDFs of in-degree and out-degree are plotted in Fig. 8. We observe that, except for 2015– 2017, it also has a fat tail with Pareto index 1. Again, this is an interesting finding, awaiting deeper insight and/or modelling. 3.1 Nodes with Large Transaction History As noted above, the transactions cover a vast range of 10−6(minimum unit) XRP to ∼1011 XRP (Fig. 3). As dealing with them all is unproductive, we int roduce a threshold for their biggest 6 Fig. 7. Scatter plot of daily number of users and daily total amount o f transactions. Fig. 8. Annual CDF of the in-degree (left) and out-degree (right) of XRP transaction network. 7 Fig. 9. Networks of the nodes selected with three thresholds listed in Table IV. transaction. Let us first examine nodes with transactions eq ual to or greater than 107,8,9XRP at least once during the entire period (2013–2019). The network size s they form are listed in Table IV, and the corresponding networks are visualized in Fig. 9. In deno ting the node, we use the set of 1,136 nodes in the≥107category and name the nodes with “bn” plus its number (0001–1 136) in the set. (Hereafter, we shall call those 1,136 nodes as “big nodes,” a nd the 94 nodes with threshold =109 XRP as “huge nodes.”) For example, “bn0001” is the first node i n a set of big nodes. 3.2 Some Notable Big Nodes Some of the nodes that made these huge transactions have a rat her notable transaction history, some of which are listed below. Pair Nodes This is a pair of nodes, among which a large amount of XRP was tr ansferred, with no other notable activity. An example of this type of node is ( bn0347, bn0864) at the top two in Table III. Within a minute, 2 ×1011XRP was transferred from the former to the latter. The former had no other activity, while the latter had numerous transac tions considered to be negligible amounts compared to these transactions. Their transaction histories are provided in Fig. 10, where blue dots present the day and amount of transactions as destination (receival of XRP), red dots show those of transactions as source, and green line s show balance, assuming it is zero initially. Bridge Nodes This node receives a large amount of XRP and sends it to anothe r node, with no other notable activity. The node bn530, the third in Table II I, is an example of this case, whose transaction history is plotted in Fig. 11. In characterizing these nodes considering the amount and fr equency of transactions, noting that some nodes make these huge transactions and many transactio ns of small amounts is important. A good example is the node bn0846 in Fig. 10: This node made seve ral transactions of small amounts as both a destination and source. However, they are negligib le compared to the two large transactions on the same day, totaling 2.0 ×1011XRP, which are the only significant transactions in characte rizing the transaction behavior of this node. As made clear from thi s example, a simple count of the number of transactions (as a source or destination) or total number of transactions cannot be considered a good measure of its activity. What counts is the number of “si gnificant” (in the amount) transactions Threshold # Nodes # edges 1071,136 5,187 108262 685 10994 170 Table IV . The sizes of the networks formed by nodes with threshold 107,8,9XRP. 8 Fig. 10. An example of Pair Nodes. Fig. 11. A bridge node. it made. For this purpose, we propose a new index called the “F low Index,” which gives e ffective number of transactions in each of the directions. 4. Flow Index 4.1 Herfindahl-Hirschman Index The Herfindahl-Hirschman Index [11] (hereafter abbreviate d to “HH Index,””) is used in several data analysis areas to quantify how numbers are distributed to components in a list. Consider a list ℓ ofNnon-negative numbers, whose total number is equal to 1: ℓ=/parenleftbigℓ1,ℓ2,···,ℓN/parenrightbig, ℓ m≥0,N/summationdisplay m=1ℓm=1. (3) (One might think of this list as a list of shares: For example, the first entryℓ1is the share of the 1st firm in the sales of a certain good, ℓ2share of the second firm, and so on.) Its HH Index H(ℓ) is 9 defined as follows: H(ℓ)=N/summationdisplay k=1ℓk2, (4) and satisfies 0<H(ℓ)≤1. Here are some examples: ℓ=/parenleftbig1,0,···,0/parenrightbig;H(ℓ)=1, (5) ℓ=1 m/parenleftbig1,1,···,ℓm=1,0,···,0/parenrightbig;H(ℓ)=1/m. (6) As presented here, the HH Index H(ℓ) is a measure of the concentration of the values in ℓ: If it is concentrated to just one component, H(ℓ)=1. If it is less concentrated, the smaller H(ℓ) is. The inverse HH Index, 1 /H(ℓ), may be used as a measure of the e ffective number of entries, as 1/H(ℓ)=min the latter case (6). However, it has one undesirable prope rty. In the next subsection, we describe the method and propose a modification for overcom ing it. 4.2 Modified Inverse Herfindahl-Hirschman Index Let us examine the behavior of the inverse HH Index for a gener alization of (6). ℓ(r)=1 m+r/parenleftbig1,1,···,ℓm=1,ℓm+1=r,0,···,0/parenrightbig, (7) with 0≤r≤1, which has H(ℓ(r))=m+r2 (m+r)2. (8) The inverse is plotted in Fig. 12 as a function of m+r(≡x). As shown here,1/H(ℓ(r))=mat integer values of x=m(r=0), as noted above. However, it flattens as r→1, and the derivative with respect to xis discontinuous at x=m. Essentially, the inverse HH Index is much less sensitive to the reduction in the distribution of numbers ( rdecreases starting at r=1 for fixed m−1) than its expansion ( rincreases starting at r=0 for a fixed m). It also deviates in certain ways from the dashed diagonal line f(x)=x, while having a measure closer to this line is desirable. Fig. 12. Behavior of the inverse HH Index 1 /H(ℓ(r)) as a function of x=m+r. 10 To overcome this di fficulty, we define the following measure, modified Inverse Herfi ndahl-Hirschman Index of the n-th order: Mn(ℓ)=¯Hn−1(ℓ) ¯Hn(ℓ), (9) where ¯Hn(ℓ) is a modified HH Index: ¯Hn(ℓ)=N/summationdisplay k=1ℓn k, (10) identical to HH Index for n=2,¯H2(ℓ)=H(ℓ). As ¯H1(ℓ)=1,M2(ℓ) is the inverse HH Index, M2(ℓ)=1/H(ℓ). For the case of the list ℓ(r) in (7), Mn(ℓ(r))=(m+r)(m+rn−1) m+rn, (11) and it satisfies Mn(ℓ(0))=m. Its behavior for n=2,3,10 is plotted in Fig. 13. The higher n, the closer Mn(ℓ(r)) to m+r, because rn→0 for n→∞ (0≤r<1). lim n→∞(m+r)(m+rn−1) m+rn→m+r. (12) Because of this property, one may choose nto be a large number for analysis. In the following, we usen=20 because the difference observed in the right panel of Fig. 13 is at most ∼1.4%. Fig. 13. Left: Modified inverse HH Index Mn(ℓ(r)) as a function of x=m+rforn=2,3,20 from top (blue) to bottom (green). Right: Mn(ℓ(r))/x. 4.3 Flow Index The modified inverse HH Index defined above is useful for quant ifying a node’s transaction his- tory. Let us denote the time series of the daily outflow by foutand the daily inflow by finfor this discussion. All the components of foutandfinare positive. Their “normalized” (in the sense that the total of all components is equal to 1, as in Eq.(3)) versions a re denoted ¯foutand ¯fin. In a case with no flow, for example, fout={}(an empty set), we define ¯fout={}andMn(¯fout)=0, and so on. Here we are dealing with the flows aggregated daily. Alternat ively, one may deal with tick data of the flows. The di fference is that if a node makes several large transactions wit hin a short period of time, treating them as one transaction is most appropriat e. Daily aggregation takes care of them 11 unless several transactions are made in a time window that in cludes 0:00 UTC. For this reason, the daily aggregation is chosen in this study. Take the node bn0864 shown in the right panel of Fig. 10. This n ode fits the case discussed above: two transactions of 1 .0×1011XRP each within 50 s of time were made. Daily aggregation trea ts them as one 2.0×1011XRP transaction. It also included lots of small income over 1 7 days. Therefore, its effective inflow history is best summarized to be on “(very close to) just one occasion.” Its modified inverse HH Index is, in fact, M20(¯fin)=1.00005, quantifying this fact. This is not the end of the story. This node had payment over two days (two red dots in the right panel of Fig. 10) and its modified inverse HH Index for the outfl ow is M20(¯fout)=1.20427. However, the amount of outflow was negligible compared to the inflow. We need to discount the outflow relative to the inflow for this node. To do so for all nodes, we introduce the following quantity, t heFlow Index : A=/parenleftBigg M20(¯fin)Max( fin) Max( fin,fout),M20(¯fout)Max( fout) Max( fin,fout)/parenrightBigg . (13) Max( fin) is the maximum of the components of the outflow, and Max( fin,fout) denotes the maximum of the components of the joined set of inflows and outflows. For node bn0864, we obtain A=(1.0005,5.8955×10−10), (14) a very satisfactory result. One may think of modifying the above by using the total volume of flows instead of maximum values. However, that does not work. This can be further expl ored by our readers. 5. Global Structure of the XRP Network The left panel of Fig. 14 is a scatter plot of 1,136 big nodes (g reen, threshold=107XRP) and 1,176 huge nodes (blue, above threshold =109XRP) (see Table IV) on the Flow Index plane. We observe that the nodes are distributed somewhat widely on th e lower-left part of the Flow Index plane. This implies a tendency of nodes with a small number of effective transactions (as counted by the Flow Index) tend to trade as destination and as origin u nevenly. In contrast, those with a higher number of transactions are located close to the diago nal, meaning that they tend to trade as destinations and origins evenly. This tendency is true for b oth big nodes and huge nodes. The right panel of Fig. 14 shows the details of the left panel. We observe the existence of nodes that mostly participate in one mode. Motivated by this type o f distribution, we classify the nodes with A1≤0.5 (red rectangle) as “OUT” components, as they are mostly on t he destination side. This means they are at the final goal of XRP when viewed as part of the whole network. We found 193 nodes. Similarly, we classify the nodes with A2≤0.5 (purple rectangle) as “IN” components; there are 52 of them. Using this criteria, we can draw bow-tie /walnut-like structures [12], as shown in Fig. 15. This characterizes the global structure of the XRP network, which forms the basis for understand- ing the dynamics and development of this complex structure. 12 Fig. 14. Scatter plot of all big nodes (green) and huge nodes (blue) on the Flow Index plane. The left panel shows all of the big nodes, while the right panel shows detail s close to the origin. Fig. 15. The bow-tie/walnut-like structure of big nodes obtained by the use of Flo w Index. 13 6. Concluding Remarks In this study, we presented an analysis of XRP transaction re cords from ledger data. These data are huge and complex: In addition to the number of t ransactions, The distribution of traded amount, frequency of transactions, and so on cover huge ranges, some of which cover 18 orders of magnitude (10−6to 1011XRP). A notable empirical finding includes the power distrib ution of several quantities with a Pareto exponent close to one, an d a power-law correlation between the daily number of transactions and the daily amount of transac tions. The former remains a puzzle: While Pareto index equal to one is known to be the beginning of the monopoly/oligopoly phase, we have a reasonable explanation behind it only for stock quant ities like number of employees at firms. The current transaction amount between nodes is a flow.. The l atter, the power-law correlation, may be explained in terms of “herding behavior.” Proper modelli ng with the use of deeper analysis of the current data should lead to the explanation of this corre lation. These subjects are worth more extensive exploration in the future. The XRP network, a directive network with nodes as transacti on accounts and edges as transac- tions, is another main subject of this research. To concentr ate on the central structure of this network, we placed a threshold for the maximum amount of each node. We s elected nodes that made trans- actions of more than ≥107XRP at least once and called them big nodes. To examine transa ction frequency while considering the huge range of transaction a mount each nodes make, we defined a new index called “Flow Index,” borrowing and extending the i dea of the Herfindahl-Hirschman In- dex. We further introduced classification of nodes using the Flow Index and arrived at a view of the entire network as a bowtie /walnut-like. We believe this work establishes a foundation for not only th e XRP network but also other dy- namic networks of transactions. Further research on this ne twork should reveal details of the activities and clarification of each node’s characteristics on the stru cture of the bow-tie /walnut-like decompo- sitions. Note added in proof: Toward the end of writing this manuscript, the author learne d of a new paper by Fujiwara and Islam [13], where they examined the Bitcoin network formed b y “regular users.” This approach is complementary to our current analysis. While the latter cho oses to select users based on the number of transactions, the former analyzes the frequency of trans actions. The current author believes that a new approach based on both ways of thinking and picking up goo d features from both is waiting for us in the near future. Acknowledgments The author would like to acknowledge Ripple, which is provid ing financial and technical sup- port through its University Blockchain Research Initiativ e. He would also like to thank Yuichi Ikeda for providing him with the ledger data, Yoshi Fujiwara and Hi ro Inoue for technical support on data- handling, Yuzuki Nomura for helping him with text entry and e diting, and Editage (www.editage.com) for English language editing. References [1] Library of Congress, USA. Regulatory approaches to cryp toassets: Japan.https://www.loc.gov/ law/help/cryptoassets/japan.php . [2] Rubaiyat Islam, Yoshi Fujiwara, Shinya Kawata, and Hiwo n Yoon. Analyzing outliers activity from the time-series transaction pattern of bitcoin blockchain. Evolutionary and Institutional Economics Review , 16(1):239–257, 2019. [3] Rubaiyat Islam, Yoshi Fujiwara, Shinya Kawata, and Hiwo n Yoon. Unfolding identity of financial institu- tions in bitcoin blockchain by weekly pattern of network flow s.Evolutionary and Institutional Economics 14 Review , pages 1–27, 2020. [4] Yoshi Fujiwara and Rubaiyat Islam. Hodge decomposition of bitcoin money flow. In Advanced Studies of Financial Technologies and Cryptocurrency Markets , pages 117–137. Springer, 2020. [5] Fujiwara Yoshi, Inoue Hiroyasu, Yamaguchi Takayuki, Ao yama Hideaki, Tanaka Takuma, and Kikuchi Kentaro. Money flow network among firms’ accounts in a regiona l bank of japan. EPJ Data Science , 10(1), 2021. [6] Introduction to XRP. https://xrpcommunity.blog/introduction-to-xrp-2019- edition/ . [7] Bithomp page. https://bithomp.com/genesis . [8] XRP ledger page. https://xrpl.org/partial-payments.html . [9] Hideaki Aoyama, Yoshi Fujiwara, Yuichi Ikeda, Hiroshi I yetomi, and Wataru Souma. Econophysics and companies: statistical life and death in complex business n etworks . Cambridge University Press, 2010. [10] Hideaki Aoyama, Yoshi Fujiwara, Yuichi Ikeda, Hiroshi Iyetomi, Wataru Souma, and Hiroshi Yoshikawa. Macro-econophysics: New studies on economic networks and s ynchronization . Cambridge University Press, 2017. [11] Stephen A Rhoades. The Herfindahl–Hirschman index. Fed. Res. Bull. , 79:188, 1993. [12] Abhijit Chakraborty, Yuichi Kichikawa, Takashi Iino, Hiroshi Iyetomi, Hiroyasu Inoue, Yoshi Fujiwara, and Hideaki Aoyama. Hierarchical communities in the walnut structure of the japanese production net- work. PloS one , 13(8):e0202739, 2018. [13] Yoshi Fujiwara and Rubaiyat Islam. Bitcoin’s crypto flo w newtork. 2021. in this volume. 15
{ "id": "2106.10012" }
2307.07066
Proof of Training (PoT): Harnessing Crypto Mining Power for Distributed AI Training
In the midst of the emerging trend of integrating artificial intelligence (AI) with crypto mining, we identify three major challenges that create a gap between these two fields. To bridge this gap, we introduce the proof-of-training (PoT) protocol, an approach that combines the strengths of both AI and blockchain technology. The PoT protocol utilizes the practical Byzantine fault tolerance (PBFT) consensus mechanism to synchronize global states. To evaluate the performance of the protocol design, we present an implementation of a decentralized training network (DTN) that adopts the PoT protocol. Our results indicate that the protocol exhibits considerable potential in terms of task throughput, system robustness, and network security.
http://arxiv.org/pdf/2307.07066v1
Peihao Li
cs.CR, cs.CE, cs.DC, cs.LG
cs.CR
O R I G IN A L A RT IC L E Ne t w o r k s Proof of Training (PoT): Harnessing Crypto Mining Power for Distributed AI Training Peihao Li1* 1Co-founder at Intellichain Solutions KFT, 1054 Budapest, Hungary Correspondence Peihao Li, Intellichain Solutions KFT, Honvéd utca 8. 1. em. 2. ajtó, 1054 Budapest, Hungary Email: peihao.li@kaust.edu.sa Funding informationIn the midst of the emerging trend of integrating artificial intelligence (AI) with crypto mining, we identify three ma- jor challenges that create a gap between these two fields. To bridge this gap, we introduce the proof-of-training (PoT) protocol, an approach that combines the strengths of both AI and blockchain technology. The PoT protocol utilizes the practical Byzantine fault tolerance (PBFT) consensus mech- anism to synchronize global states. To evaluate the perfor- mance of the protocol design, we present an implementa- tion of a decentralized training network (DTN) that adopts the PoT protocol. Our results indicate that the protocol ex- hibits considerable potential in terms of task throughput, system robustness, and network security. K E Y W O R D S proof of training, AI, blockchain, hash power, distributed network, consensus mechanism 1|INTRODUCTION 1.1 |Motivations Crypto mining is the process of creating and adding new blocks to a blockchain network through the use of various consensus mechanisms based on different resources (mining rigs, staked tokens etc..), with Proof of Work (PoW) being the most commonly used [21, 24]. In a blockchain network built on the PoW consensus mechanism, miners compete to create the subsequent valid block by being the first to solve a cryptographic puzzle, earning a reward for their efforts. The consensus algorithm, which integrates an appropriate rewards distribution system, is the core of a blockchain *Equally contributing authors. 1arXiv:2307.07066v1 [cs.CR] 13 Jul 2023 2 network. The most prominent blockchain projects in the crypto industry, such as Bitcoin (BTC) and Ethereum (ETH), uses the PoW consensus mechanism, with the latter recently shifted to Proof of State (PoS) [17]. According to bitcoin energy consumption analysis [5, 8], the yearly electricity consumption of Bitcoin mining exceeds that of United Arab Emirates (119.45 TWh) in 2021 and Sweden (131.79 Twh) in 2022. The majority of the energy consumed is dedicated to solving cryptographic puzzles. While this process enables trustless consensus, it does not offer any additional practical benefits. In fact, the apparent lack of a theoretical upper bound on the energy consumption of the PoW mechanism has raised global concerns, leading to the development of alternative consensus mechanisms, such as PoS, and changes in institutional policies. For instance, Tesla announced in 2021 that it would no longer accept BTC due to climate concerns [23]. Crypto mining is a rapidly changing industry. In 2022, Ethereum transitioned from the energy-intensive Proof of Work (PoW) consensus mechanism to an alternative called Proof of Stake (PoS), in response to growing environmental and energy concerns. Consequently, this change led to a substantial reduction in power demand, ranging from 99.84% to 99.9996% [14]. Ethereum’s reduction in energy consumption could be comparable to the electrical power needs of a nation like Ireland or even Austria, whose advancement has a significantly positive impact on environmental sustainability. However, it has also resulted in a substantial amount of unused hashrate, equivalent to 1,126,674 GH/s [3], which now lacks a specific application. This brings the potential for miners to shift their computational resources from crypto mining to other areas like internet of things (IOT) and data services [2, 1]. This transition can remain fully within the blockchain space, by using these resources to run processes hosted on decentralized blockchain-based networks. Meanwhile, with the integration of artificial intelligence (AI) into various sectors of the economy, the demand for computational resources to fuel this machine intelligence is experiencing rapid growth. Training a model like ChatGPT incurs expenses exceeding $5 million, and operating the initial ChatGPT demo costs OpenAI approximately $100,000 per day prior to the surge in its current usage [13]. Due to the extensive number of neural parameters and significant GPU hours required, the high computational demands of model optimization present substantial challenges for academic researchers and small-scale enterprises, limiting the widespread use of artificial intelligence technologies. It is therefore unsurprising that an increasing number of crypto miners are exploring ways to utilize their existing computation infrastructures to contribute to the advancement of AI, redirecting its previously mining-focused compu- tational resources for machine learning and other high-performance computing (HPC) applications, as demonstrated by Hive Blockchain. The company’s long-term HPC strategy involves shifting from Ethereum mining to HPC appli- cations, including artificial intelligence, rendering, and video transcoding, with an anticipated revenue generation of approximately $30 million per month. Considering the developments mentioned, we believe that the emerging trend of combining and integrating these resources has the potential to significantly enhance the development process of AI tools in both technical and financial aspects. This would provide AI tool developers with a more affordable plan to monetize their innovations, including simplified training and marketplace access. Instead of exclusively commercializing their creations through major tech- nology corporations, developers have the opportunity to contribute to the decentralization of technology by shifting their assets from centralized entities to a global commons. In the long run, this new direction is anticipated to yield significant societal benefits by optimizing resource allocation and minimizing costs. 1.2 |Challenges Despite the considerable potential, the decentralization of software and hardware underlying AI remains in its early stages, due to the absence of well-developed consensus frameworks. Several pioneering studies have innovatively 3 proposed new consensus schemes based on training machine learning models [4, 2, 6, 19, 10]. However, a notable gap exists between the theoretical foundations of these frameworks and their practical implementations. SingularityNET and FetchAI [4, 2] present a general high level framework but without technical details clearly shown. Coin.AI [6] further addressed this issue by proposing Proof of Useful Work (PoUW). However, they do not have customized AI training task, which can greatly reduce their network efficiency in serving clients, restricting their applicability to a limited range of business models. Authors in [19] further addressed this issue by incorporating features of customized clients. The design’s limitation is mainly the inherent flaw in its blockchain structure, where the inclusion of test data within a block’s body can rapidly consume the storage capacity of consensus nodes. While Proof of Work (PoW) has been proven to be quite secure and effective since the launch of Bitcoin and Ethereum, an industry-level consensus mechanism explicitly designed for decentralized AI training remains absent. In general, we identify the following major challenges currently hindering the progress and realization of a decentralized AI utility network: 1. Reliable validation mechanism. Although resource consuming, PoW exhibits favorable time complexity for vali- dation, ensuring efficient processing within the system. Upon mining a block, the network can efficiently verify its validity and append it to the local chain with ease. Another benefit of PoW is its determinacy in the global state, which guarantees that if a node is honest and abides by the complete set of rules within the system, it will consistently achieve the same state at a specific timestamp, consequently validating the system with confidence. However, in the context of decentralized machine learning, it is inherently challenging to ascertain whether a miner has genuinely performed its task as required. This is because when using different GPUs to perform the same AI training task with the same optimizer and dataset, it is still possible to obtain completely different results. Factors such as parallelism, random seeds, and rounding errors can all lead to differences in results, thus posing significant challenges for implementing validators within the network. Consequently, it is impossible for an en- tity to provide verifiable evidence that they have executed the necessary tasks to train a model by following the PoW-like consensus mechanism. 2. Ownership protection from model-stealing attacks. In decentralized AI training, once a trained model is released publicly in the network by a miner to claim network rewards, it will be broadcasted by other nodes either unaltered or manipulated (i.e., the model is stolen and the attacker claims ownership) until it fully propagates throughout the network. The model’s actual owner may need to prove that they trained the model as a means to claim ownership. Proof of Learning (PoLe) [19] introduced an anti-theft scheme utilizing inner product-based functional encryption (IPFE) and IPFE with function-hiding (IPFE-FH). However, the problem of guaranteeing that the data node receives the complete model information remains unaddressed and requires further exploration. Ideally, it would be preferrable that the network receives full model info before applying the validation process. 3. Absense of efficient consensus protocols for delivering services. Upon successfully developing a consensus mechanism for decentralized AI training, it is of great interest to subsequently integrate it within a practical blockchain framework. According to the FLP impossibility theorem, which states that in an asynchronous dis- tributed system where at least one process can fail, it is impossible to create a consensus algorithm that guaran- tees both safety and liveness at the same time [16], which is why most blockchain systems adopt synchronous consensus mechanisms. However, storage and bandwidth can be quite expensive in such systems since the sys- tem always store nreplicas of the global states. Therefore, we require the protocol to store only the necessary states, minimizing storage requirements. Given the rapid evolution of AI models, integrating the entire system into a layer-1 (L1) blockchain solution1may not be the most optimal approach [19, 6]. Such systems typically maintain 1A Layer-1 (L1) blockchain refers to the foundational layer of a blockchain network, which consists of the base protocol that governs the consensus mechanism, 4 a consistent block production rate2, thus ensuring a stable transaction throughput capacity. However, in a decen- tralized AI training system, the workload dynamically fluctuates in response to market supply and demand. There may be periods when the system experiences inactivity due to a lack of incoming training jobs, during which the majority of nodes become stale without a flow of rewards. In such a system, the primary objective is to generate valuable AI models, with transaction validation serving as a secondary function. A well-constructed framework should address these aspects by dynamically adjusting system workload according to the influx of training jobs, enabling seamless system upgrades over time, and ensuring the ease of use and security for users’ assets. Such a protocol is currently lacking in the industry. 2|PROOF OF TRAINING Our primary objective is to establish a robust consensus protocol called proof of training (PoT) that lays the foundation for harnessing the power of crypto mining for distributed artificial intelligence (AI) training. The development of this protocol is crucial for enabling the efficient and secure utilization of computational resources across a decentralized network, with the ultimate goal of advancing AI model training. In this section, we will concentrate on the functions and utilities of the protocol, abstracting away from specific network designs. A comprehensive discussion of network realization can be found in Section 3. 2.1 |Notations We denote the set of naggregator nodes running the global ledger LbyA={Ai}n i=1whereAirepresents each aggregator node, coordinating the client C, the service provider Pand the protocol validator V. We denote all participants in the network by N={A,C,P,V}, with each individual denoted as Ni. We letSNdenote participant- specific security variables, including components for asymmetric encryption. We let SN[pk]denote the public key of nodeNi, andSN[sk]denote the corresponding private key. We use the notation Mto denote an AI model and Mto denote the full set of nsmodels generated in a given specification where Ms=(M1,M2,···,Mns). Specifically, we use the notation MCto denote the model supplied by a client for the network to train, typically with a certain initialization. Additionally, we introduce Dtrainto represent the training data and Dtestfor the test data. We denote VRF_Model (M,Dtest)→( score)as the validation function, the purpose of which is to validate the model. Generally the model validation function VRF_Model3is specified by the client C. We letσN(m)=SigSN(m)denote a signature on message mwith respect toSN, i.e., using corresponding private keySN[sk]. Let VRF_Sig(SN[pk],σ,m)→{0,1}denote a corresponding signature verification algorithm. Specifi- cally we define σM P=SigSP(M) as the model signature message of service provider Pon its generated model M. transaction processing, and data storage. This layer is responsible for the core functionality of the blockchain system and provides the infrastructure for building additional layers or applications on top of it. 2The block production rate in a blockchain refers to the frequency at which new blocks are generated and added to the blockchain. For example, TRON (TRX) network has a fast block production rate, with a new block being produced every 3 seconds. 3Two crucial properties are required here: simplicity and certainty . The computation complexity of VRF_Model should beO(1), and the output score of the computation should be identical across different nodes, as long as Nhonestly perform the function. 5 2.2 |Consensus Assumptions In this paper, we employ the term "global ledger" (in uppercase), denoted by L, to refer to the fundamental data struc- ture maintained by PoT protocol in order to support the specific services it offers. While blockchains are one method for implementing a reliable ledger, there are alternative approaches as well. We anticipate that PoT protocol imple- mentations will utilize Byzantine Fault Tolerant (BFT) systems for their underlying ledgers, which significantly predate blockchains like EOS.io [15]. For the sake of convenience, we utilize BFT-type notation and properties throughout this paper, though we stress that PoT implementations can be realized using permissionless consensus protocols as well. We view a ledger generally as having a few key properties: •Append-Remove: Data, once added, can be removed but cannot be modified. •Public: The contents are accessible to everyone, which are consistent across time. •Available: The ledger can always be written to by authorized writers and read by anyone in a timely way. A wide variety of modern BFT protocols are supported in the PoT protocol. The exact choice will depend on trust assumptions and characteristics among the network nodes. The PoT protocol could in principle be implemented in a highly performant permissionless blockchain or in an adaptive and scalable layer-2 or blockchain system4. 2.3 |Protocol Overview (proof-of-training) A PoT scheme enables an efficient service provider Pto convince the network of aggregator nodes AthatPhas trained the model MC, given by a client C, with validations from V. It also enables the selection of the winner who generated the best model Moptimum . A PoT protocol is characterized by a tuple of polynomial-time algorithms: (Claim ,Validate ,Verify ,Finalize) •PoT.Claim generates the claim message for a trained model trained via the initial model MCand dataDtraingiven by a clientC. The service provider trains the model and saves the outputs for further processing. PoT .Claim is employed to generate model ownership claim messages and broadcast models, which are subsequently used for claiming rewards. Furthermore, it supplies information necessary for executing PoT .Validate and PoT .Verify. This process might rely on third-party services, such as model storage and parameter setup. •PoT.Validate evaluates the models claimed by service providers and subsequently broadcasts a validation message to the network. This message includes the model’s performance score and the identity of the service provider, thereby providing an evaluation of their contribution. •PoT.Verify checks whether a validation from Vis correct. PoT .Verify can be run by any node N(either a participant or validator) in the network to determine whether a certain validator has correctly validated a model, thereby convincing the global ledger Lthat the global states are correct. It’s important to note that any incorrect states that are successfully challenged will be corrected, with significant economic incentives awarded to the challengers, which further ensures the safety of the protocol. 4A Layer 2 (L2) in blockchain refers to a secondary protocol or framework built on top of an existing blockchain, primarily aiming to enhance the network’s scalability, efficiency, and transaction throughput. Layer 2 solutions leverage the security and decentralization of the underlying blockchain (Layer 1), while offloading a portion of the computational workload to a separate network or system. This enables faster and cheaper transactions, as well as more complex operations, without burdening the base layer. Examples of Layer 2 solutions include state channels, sidechains, and rollups. 6 •PoT.Finalize is run by the aggregators based on global ledger Lto finalize rewards distribution. It summarizes all the validated models and corresponding validators which validated them. The optimum model’s owner shall receive the majority of the rewards while the validators which validated the model receive the rest of the rewards to incentivize active participation and honest validation. 2.4 |Practical PoT Construction In a practical PoT scenario where a client Caims to train a model with data D, the protocol requires that Cmakes the initial model (potentially with initialized model parameters) MCand training dataDtrainpublicly accessible at time t05. The protocol also requires Cto specify the duration of training time ∆Ttrain, after which the test data Dtestshall be released by client Cfor validation and verification purposes. Once the current timestamp tsatisfies the condition t>t0+∆Ttrain, the network rejects new incoming model signatures σP(Moutput). Meanwhile, a service provider P will broadcast the generated model Moutput corresponding to σP(Moutput)broadcasted earlier. Mσ outputaggregates model signatures generated by all service providers which validators execute validation function with. Generate a Claim PoT.Claim(MC,Dtrain,SP) → (σP(Moutput)t1,Moutput t2), whereSPdenotes participant-specific security vari- ables forP.Moutput is the latest generated model6byPbased onMCandDtrainwithin∆Ttrainspecified byC. We uset1andt2to denote two separate timestamps in the process, which indicate the broadcasting times of the content, with the following condition: t0<t1<t0+∆Ttrain <t2 (1) Once the current timestamp tof the global ledger Lsatisfiest>t0+∆T, the network rejects further model signature messages andPstarts to broadcast Moutput corresponding to the previous model signature message σM P. •INPUTS: – initial modelMC – dataDtrain – key parameterSP •OUTPUTS: model signature message σP(Moutput)t1, generated modelMoutput t2 Validating the Models PoT.Validate(σM P,M,Dtest,SP[pk],SV) → (σV(πD V)t4, πD V t5), whereMis a model the validator Vnewly re- ceives.SVdenotes participant-specific security variables for V.Dtestdenotes the testing data released by the client att3, and we use t4andt5to denote two separate timestamps in the process, with ∆Tvalidate specified by the client or default values in the protocol: t0+∆Ttrain≤t3<t4≤t3+∆Tvalidate <t5 (2) 5t0will be set by the primary of aggregator nodes following the PBFT synchronization protocol. 6As long ast1<t0+∆Ttrain satisfies, the service provider Pwill keep optimizing the model Moutput and once better model M∗ outputis generated,Pwill sendσP(M∗ output)t1to replace the previous model signature message σM P. 7 Utilizing the VRF_Model function, validators can effectively evaluate the performance metrics of each model. The outputπD Vrefers to the validation message provided by the validator, which contains meta data such as the key and score ofMand identity ofP. •INPUTS: – model signature message σM P – generated model M – dataDtest – public key of service provider SP[pk] – key parameterSV •OUTPUTS: validation signature message σV(πD V)t4, validation message πD V t5 Verifying the Validations PoT.Verify(πD V,Dtest)→{0,1}, which checks whether a validation from Vis correct. PoT .Verify can be run by any nodeNi(either a participant or validator) in the network and convince the global ledger Lwhether a certain validator has correctly validated a model. If not, the node will send Sig SN(cVπ)to the network along with a challenge message cVπ, which other participants can verify (σN(cVπ)t6, cVπ t7). We denote t6andt7as two seperate timestamps and we use∆TChallenge to denote the client specified or protocol default challenge period, which satisfies: t5<t6≤t3+∆Tvalidate+∆TChallenge <t7 (3) If the challenge is successful, the challenged validator Vwill be penalized, and the challenger Niwill be rewarded by receiving part of the penalization. •INPUTS: – validation message πD V – dataDtest •OUTPUTS: verification boolean value b:{0,1}, challenge message (σN(cVπ)t6, cVπ t7)&&(¬b) Distributing the Rewards After the challenge period of a client’s order, PoT.Finalize (M,π)→(M optimum ,SPoptimum[pk],V)is run by the global ledgerLto finalize reward distribution. Mis the vector containing all the validated models (M1,M2,···).πis the vector of global validation messages indicating the performance of different models in M.Moptimum andPoptimum are the optimum model (with the highest score) and its corresponding owner after sorting operations performed by L.Vis the vector containing addresses of all the corresponding validators (SV1[pk],SV2[pk],···) which validated Moptimum . The ownerPoptimum shall receive the majority of the rewards while the validators Vreceive the rest of the rewards to incentivize active participation and honest validation. •INPUTS: – validated models M – global validation messages π •OUTPUTS: optimum modelMoptimum , owner’s public key SPoptimum[pk], corresponding validators V Fig. 1 presents a brief overview of the data flow between different participants within the protocol. ‘StorageM‘, 8 F I G U R E 1 Brief overview of data flow between protocol participants. Data flows are represented by arrows, each labeled with the corresponding operation and color-coded based on the participant interaction. Access to different storage components by various participants is omitted for simplicity, whereas all participants can access any storage through a query link. ‘StorageC‘, ‘StorageVe‘, and ‘StorageVa‘ represent storage resources provided by miners, clients, verifiers, and validators, respectively. These can be either centralized storage services or IPFS [7]. It’s the participants’ responsibility to ensure that this stored data remains accessible to other network participants, while also meeting a certain bandwidth limit required by the protocol implementation. If this is not guaranteed, the system will invoke a voting process that may render the participant invalid. Fig. 2 provides an illustration of the protocol by showcasing a sequential diagram that describes the protocol logic and data flow across different phases of a complete task cycle. 2.5 |Miscellaneous Notes •Network Securities and Cryptoeconomic Aspects: The decentralization of AI model generation across various nodes requires robust security measures, particularly when some nodes may be compromised or corrupted. Ensuring that nodes have a financial incentive to act honestly is crucial in maintaining the integrity of the system. One such method is staking, which requires nodes to place deposits of utility tokens, with the potential for confiscation in cases of misbehavior. This incentive design has already been successfully employed in numerous blockchain implementations, as evidenced by the literature [20]. We require the aggregator nodes , which maintain the global ledgerL, to stake a significant amount of utility tokens in order to become an aggregator node. Misbehavior will result in the loss of their staked tokens. In this way, we can ensure the security of the L1 layer of the protocol. In addition to the aggregators, the appropriate number of tokens that different roles in the network should stake depends on various factors, such as the value of the tokens, the expected rewards, the risk of penalties, and 9 the overall economic model of the network. Here are some suggestions to help determine the staking amounts for different roles: Service providers should stake an amount that reflects their commitment to providing quality services and generating accurate models. The staking amount should be high enough to discourage fraudulent behavior with slows down the validation process of the network but not too high to create a barrier to entry for genuine providers. Validators should stake an amount that demonstrates their commitment to performing honest and accurate validations. The staking amount should be substantial enough to prevent validators from approving fraudulent claims or models, yet not so high as to create transaction friction that prevents honest validators from participating. Verifiers should stake a relatively smaller amount compared to service providers and validators, as their primary role is to verify the validators’ work, which is generally expected to be accurate. •Concurrent Roles : It is possible for various nodes to assume different roles and responsibilities simultaneously in order to maintain the integrity and efficiency of the system, as the network can make better use of available resources. For example, nodes with high GPU power can act as both validators and service providers. In general, it is expected that any node within the network would be capable of performing verification, as this process can be efficiently optimized. It is absolutely essential to apply the verification algorithm to a model associated with two or more clusters of validations, as at least one or more clusters of validations are guaranteed to be incorrect. Meanwhile, a model linked to a single cluster of validations is highly likely to have been correctly validated. •Validation Definiteness : The validation process must yield consistent results, ensuring that for a given model and test data, the output remains constant across honest nodes with varying settings. This requirement eliminates any potential confusion in both validation and verification procedures. Consequently, it is recommended that the PoT implementation itself always supply the validation function, ensuring adaptability and upgradability within the system. Clients should not be allowed to provide their own validation functions for their models to avoid inconsistencies. Instead, they should be given options to select from available validation functions. To accom- modate a wide range of use cases, it is crucial for the network to be compatible with most mainstream models, such convolutional neural networks (CNN) and Long Short-Term Memory Network (LSTM). This can be achieved by incorporating the validation functions for these models into the system’s foundational layer, thus ensuring a consistent and reliable validation process across all nodes. •Commitment Scheme : A commitment scheme7in the context of decentralized training systems enables partici- pants to commit to a generated model while keeping it hidden from others, with the ability to reveal the commit- ted model later. Such commitment schemes are designed so that a participant cannot claim the model without committing to it at an earlier timestamp than that of the real owner (in the global ledger L). This approach has im- portant applications in PoT protocol implementations, including model ownership claim/verification, and rewards distribution. Recall PoT .Claim algorithm, interactions in the commitment scheme take place in two phases: 1.Thecommit phase : During this phase, a participant trains a model and commits to it by broadcasting its signature to the network. 2.Thereveal phase : In this phase, the participant reveals the trained model by sharing it with the network, allowing other participants to validate its performance and verify the ownership claim. Given the commitment scheme, malicious service providers are theoretically unable to steal any models, as they do not possess the model’s signature in the global ledger during the model revealing phase, when the network stops accepting new model signatures. 7The concept of commitment schemes was formalized by Gilles Brassard, David Chaum, and Claude Crépeau [9] as part of numerous zero-knowledge protocols for NP. 10 F I G U R E 2 Sequential diagram describing protocol logic and data flow in different phases of a task cycle. It contains the training phase [t0,t0+∆Ttrain], the validation phase [t0+∆Ttrain,t3+∆Tvalidate], the challenge phase [t3+∆Tvalidate ,t3+∆Tvalidate+∆TChallenge], and the finalization phase. The time instances are defined in Eqs. 1, 2, and 3. 11 3|PROTOCOL IMPLEMENTATION WITHIN NETWORK ARCHITECTURE We present an in-depth exploration of the proof-of-training (PoT) protocol within a peer-to-peer network architec- ture through the design and implementation of a decentralized training network (DTN). The DTN aggregates models offered by multiple independent service providers, and the network participants self-coordinate to provide the best models to clients. This coordination is decentralized and does not require trusted parties. The secure operation of the system is ensured by the PoT protocol, which verifies that operations are correctly carried out by network participants. 3.1 |The DTN Construction In decentralized service networks, blockchains fulfill two roles: they serve both as registers of cryptocurrency owner- ship and as foundations for decentralized services. In our system, the registration of participants and distribution of rewards happen on-chain, whereas the actual execution of training, validation, and other model-related computations occur off-chain due to the inherent costs and limitations of on-chain operations. On-chain operations are not only slow and expensive, but also restricted, unable to benefit from real-world data and various functionalities that simply can’t be accomplished on-chain. These functionalities include diverse forms of computation, fast data distribution between miners and clients, and flexible infrastructure upgrades, among other features. To effectively leverage the potential of this decentralized network for AI training, a two-layer architecture is im- plemented: the on-chain component (SC), which records the value flow in the network, and the off-chain component (exec), consisting of a set of protocols running on the DTN where utilities are performed. By securely integrating the on-chain functionality with the vast array of off-chain services offered by the DTN, it can exhibit the robustness and upgradability that traditional Layer 1 solutions often lack. In the L1-L2 design, the protocols and infrastructures primarily operate off-chain in the decentralized network, whereas token utilities such as transfer and withdrawal op- erate on Layer 2 of any mainstream blockchain. This setup allows the system to continuously update with additional features and utilities, while keeping the network’s assets and user experience unaffected. Further details are depicted in Fig. 3. 3.1.1 |Network The DTN is a decentralized training network that is publicly verifiable and designed on incentives . Clients pay a network of miners8for model generation and retrieval. Miners compete to train the best models in exchange of payments. Miners receive their payments only if the network has verified that their service was correctly provided. Definition Our DTN scheme is a tuple of algorithms run by clients and network participants: (Put,Get,Manage) •Put(order)→OID: Clients execute Putto submit a training order under a unique identifier OID(order ID). The training order includes all information necessary for service providers to execute the training task. •Get(OID)→model : Clients execute Getto retrieve trained models that are stored using OID, upon task comple- tion. 8The terms ’miners’, ’service providers’ and ’validators’ can be used interchangeably in this section. 12 F I G U R E 3 Conceptual figure depicting on-chain / off-chain components in the DTN, which consists of two major components: an on-chain component SC , resident on a mainstream blockchain, and an off-chain component exec that executes on a DTN. The DTN serves as a bridge between the two components as well as connecting the system-level contract with off-chain resources such as service providers, validators, decentralized storage, etc. •Manage: Manage() : The network of participants coordinates via Manage to: control the available computational resources, validate the service offered by providers and repair possible faults. The Manage algorithm is mostly run by a network of aggregator nodes. 3.1.2 |The Global Ledger and Data Storage In our decentralized training network, the Global Ledger Lplays a key role as a system record, logging all essential network interactions. The ledger contains three key components: the orders record , the task cycle data , and the node info. The orders record logs all orders placed by clients within the network, each containing the specific task details requested by a client; including the required model, data, and associated rewards. The task cycle data records the metadata of tasks that have undergone the full cycle of model generation and validation within the network; including the generated model signatures, related validation outcomes, and potential challenges. The node info section saves the details of all registered nodes (miners and validators) within the network, including their reputation and performance history. Collectively, these components of the ledger boost the network’s performance by ensuring all operations are traceable and accessible in a timely manner. The aggregator node , tasked with the responsibility of publishing multi-signature transactions on the blockchain and updating contract states, plays a central role in managing ledger data and global states. Through the application of the Practical Byzantine Fault Tolerance (PBFT) algorithm [11], it effectively maintains, updates, and synchronizes the Global Ledger L. Besides storing and managing a synchronized copy of the global ledger, the aggregator nodes also act as data access points for other network participants. They 13 provide on-demand access to the global ledger, ensuring its data is always available for different network operations. Clients in the network are responsible for providing training and test data links, while miners must supply model in- stances. These data must be consistently accessible throughout the task cycle. Failure to comply with this requirement can lead to order or model claim invalidation through a community voting process. It is the participants’ responsibility to download the necessary data to their local storage for efficient training and validation processes. 3.1.3 |Economics and Cryptoeconomics To encourage correct behavior in the DTN, the system implements a cryptoeconomic incentive model. Each node is required to deposit a certain amount of tokens into a smart contract as a stake during registration. This staked amount acts as a financial commitment and failure to comply the rules may result in the lost of staked tokens. The staking system also provides protection against Sybil attacks. By introducing a cost for network participation, the system discourages entities from creating multiple nodes with the intention of disrupting network operations. This cryptoeconomic model incentivizes nodes to act in the best interests of the DTN, thereby enhancing its security and overall efficiency. Client Economics The design of our network’s economic system ensures that clients’ tasks are handled with precedence, proportional to the average rewards offered over time. This approach prevents an overload of low-reward tasks that could strain the network’s computational resources. Moreover, it incentivizes miners to prioritize tasks that yield higher returns, thereby optimizing the network’s efficiency. 3.2 |Data Structure The Decentralized Training Network (DTN) utilizes several primary data structures for operation purposes. Orders Anorder in the context of our DTN is a declaration of intent to request a service. Clients issue orders to the network to request services, and miners compete to provide the best services. Claims Aclaim in our DTN is a commitment made by a miner to deliver a trained model. Miners broadcast their claims to the ledger, which allows them to start competing rewards. A claim consists of the signature of the trained model and the model itself after t2, following the PoT protocol’s requirements in Eq. 1 Models The models is a mapping between a model identifier (MID) and its corresponding model instances, which is built by using information extracted from claims . This data structure increase the system’s efficiency by directly associating a model’s link with its identifier, enabling quick look-ups and access. Validations Avalidation is the result of an evaluation process carried out by a validator to compute the performance of a trained model in the network. The validator uses the validation function and testing data as input parameters to this process. Upon completing the evaluation, the validator broadcasts the validation message to the network. This message com- prises a validation signature at t3which serves as a seal of the validation, and a validation instance that details the 14 TA B L E 1 Core Data Structures in our DTN scheme Data Structures Order Network Record Table Oi:=⟨reward, type, time, link ⟩ •reward: the economic incentive provided to the miners for training a model. •type: the kind of model that is to be trained. •time: the Unix time instances including the training time t0and the validation time t2. •link: the link specific to model’s training/testing data and metadata necessary for the task (such as initial model parameters). Orders O1..On •Oi, current orders from txPool. Validation validation message :=⟨MID, score, vStake ⟩Mi •MID: the hash of the model instance generated for the order’s request. •score: the model’s performance metrics. •vStake: the amount of stakes a validator is willing to commit to support a particular validation message. Validations(V1..Vn) •Vi, current validations from txPool. Challenge challenge message :=⟨VID, cStake⟩Vi •VID: the hash of the original validation for a model. •cStake: the amount of stakes a verifier is willing to com- mit to support a particular challenge message. Challenges(c1..cn) •ci, current challenges from txPool.table: Oi→Oi’s cycle data, ...} order’s cycle data :=⟨order , phase, mList, vList, cList ⟩order •order : the original order of the model. •phase: An enum indicating the current phase of the task. It can be either ’model generation phase’ or ’valida- tion phase’. •mList: list of generated models and its corresponding validations and challenges (if any) {G1..Gm}. Gi:=⟨MID, vList, cList⟩Oi •MID: the hash of the generated model instance. •vList: the list of validations corresponding to the gener- ated model instance {V1,V2..}. –Vi:=⟨validation message , sig⟩Oi – sig: the signature of the validation message . •cList: the objections raised against a existing validation identified by VID {c1,c2..}. –ci:=⟨MID, VID, sig⟩Vi – VID: the hash of the validation being challenged. – sig: the signature of the challenge message . Global Ledger L:=⟨models, txPool, table, nInfo ⟩ •models: the maps between a MID and its model in- stances, whereMMID=models[MID] •txPool :=⟨orders ,claims ,validations ,challenges⟩ •table: the network record table. •nInfo: the node info structure containing a node’s regis- tration metadata and reputation. model’s performance metrics at t5, following the PoT protocol’s requirements in Eq. 2. Challenges Achallenge includes a digital signature at t6and a challenge message at t7, following the PoT protocol’s requirements in Eq. 3. The digital signature is generated by the challenger signing the hash of the challenge message. The challenge message itself holds the specific validation being challenged and the amount of staked tokens backing the challenge. Network Record Table The Network Record Table functions as a key-value database. The table’s structure is designed to map the hash of each order to a list of data structures which contains the following components: the original order issued by the client, thephase indicating the current phase of the task (as defined in Fig. 2), the ModelList comprising generated models related to the order with each model containing the ValidationList detailing evaluations carried out on the model and 15 theChallengeList capturing any objections raised against existing validations. 3.3 |Protocol Implementations In this section, we focus on the operations carried out by various participants - clients, the network, and the miners. We illustrate the process flow of of different algorithms. 3.3.1 |Client Cycle We give an overview of the client cycle. 1. Put :The client orders model training service . Clients can train their models by paying service providers with DTN utility tokens. A client initiates Putby sub- mitting an order to the network. Subsequently, service providers have the freedom to decide whether they wish to compete for this order, which they can do by submitting claims, along with generated models, to the network. Clients have the flexibility to determine the amount of training time by modifying the ’time’ variable in their orders. A longer training time may potentially yield higher accuracy in the resulting models. 2. Get :Client retrieves model from the network . Clients can retrieve any model stored in the DTN by fetching model links from the network. A client initiates Getby submitting an API request to one of the aggregator nodes. This node then retrieves the link from its local database. When the best model generated by the miners is found, the client receives a notification (with the model link) from the network. It is the miners’ responsibility to ensure that their model links are always live to avoid penalties from the network. 3.3.2 |Mining Cycle (for service providers) We give an overview of the mining cycle of service providers. Service providers earn rewards by competing to generate the model with highest score in the validation evaluation. 1. Register : Service Providers pledge their computational resources to the network. This is done by depositing collateral, via a transaction in the network, using Manage.RegisterResource . This collateral is locked in for the time intended to provide the service, and is returned upon request of the service provider if the provider decides to stop committing to the network, using Manage.UnRegisterResource . Once the service provider is registered, they can start generating model claims which will be added to the global ledger. Manage.RegisterResource/UnRegisterResource •INPUTS: – current global ledger Lt – registration request register •OUTPUTS: current global ledger Lt′ 2. Fetch Orders : Service providers can fetch training orders from the network. Once registered, service providers specify how many orders they would like to fetch using the Manage.FetchOrders function. Upon executing this function, the corresponding number of training orders are fetched from the global ledger, sorted by the average 16 reward per unit of training time, and sent to the service provider. These orders contain details about the model training tasks, including the necessary data, the model to be used, and the amount of training time required. Once fetched, service providers can freely decide which orders they want to handle based on their available computational resources and other preferences. Manage.FetchOrders •INPUTS: – current global ledger Lt – number of orders to fetch nOrders •OUTPUTS: fetched orders fetchedOrders (sorted by average reward per unit of training time) 3. Compete Rewards : Service providers compete for the client’s order by executing the training with the provided training data. They aim to generate a model with higher training accuracy. Once a new, more accurate model is generated, it is broadcasted to the network. This new model replaces any previous models with lower perfor- mance for that specific order. This process continues until the specified training time has elapsed. Subsequently, the validation process begins for that order9. Manage.Claim •INPUTS: – current global ledger Lt – the generated POT.claim •OUTPUTS: updated global ledger Lt′ 4. Sending Models : Service Providers are responsible for ensuring the availability of links to generated model in- stances throughout the full mining cycle. This is done through the Get.SendModel function. If a service provider fails to maintain the availability of these model links, the network may invalidate the model, which will result in the service provider not receiving the rewards. Get.SendModel •INPUTS: – model ID MID – model link mLink •OUTPUTS: success status sStatus 3.3.3 |Mining Cycle (for verifiers) We give an overview of the mining cycle of verifiers10. Verifiers earn rewards by challenging the wrong validations in the validation phase of an order. 1. Register : Verifiers pledge their computational resources to the network. This is done by depositing collateral, via a transaction in the network, using Manage.RegisterVerifier . This collateral is locked in for the time intended to provide the service, and is returned upon request of the verifier if the verifier decides to stop participating in 9While the Manage.Claim function describes the process of competing for a single order, it’s important to note that service providers can execute this function in parallel to compete for multiple orders simultaneously. This parallelism allows service providers to optimally utilize their computational resources and maximize their potential rewards. 10It’s worth noting that both service providers and validators can take on the role of a verifier, as long as they have sufficient computational resources. This overlap of roles allows for increased flexibility and efficiency in the network, as entities with more resources can contribute more significantly to the network’s operations. 17 the network, using Manage.UnRegisterVerifier . Once the verifier is registered, they can start challenging the validations in the validation phase of an order. Manage.RegisterVerifier/UnRegisterVerifier •INPUTS: – current global ledger Lt – registration request register •OUTPUTS: current global ledger Lt′ 2. Fetch Validations : Verifiers can fetch validations for a specific order from the network. Once registered, ver- ifiers specify which order they would like to fetch validations for by providing the OIDof the order using the Manage.FetchValidations function. Upon executing this function, the corresponding validations for that order are fetched from the global ledger and sent to the verifier. Once fetched, verifiers can determine whether any of these validations should be challenged by executing the POT.verify function on them. Manage.FetchValidations •INPUTS: – current global ledger Lt – order ID OID •OUTPUTS: fetched validations fetchedValidations for the specific order 3. Challenge Validations : Verifiers challenge the validations in the validation phase of an order by executing the Manage.Challenge function. If a validation is found to be incorrect, the verifier earns the reward associated with the successful challenge. Manage.Challenge •INPUTS: – current global ledger Lt – the incorrect validation V •OUTPUTS: updated global ledger Lt′ 3.3.4 |Network Cycle We give an overview of the network cycle. 1. Refresh : The global ledger will repeatedly refresh orders in the transaction pool and corresponding data structures. For instance, it will check if an order has transitioned from the training phase to the validation phase. If so, the global ledger updates the state variable and starts accepting validations and challenges, while miners begin sending models. This refresh uses the Unix timestamp as a reference and updates the system variables according to the PoT protocol. Manage.Refresh •INPUTS: – current global ledger Lt •OUTPUTS: updated global ledger Lt′ 2. Update : The global ledger periodically commits the system states to smart contracts on the main chain, updating the global ledger accordingly. When orders pass both the validation and challenge phases, they are marked as 18 ’sealed’ and include the information of the winning miner, before being placed into a pending rewards queue. At each update cycle, aggregator nodes coordinates to multisign a transaction to the main chain, which updates the smart contracts, enabling miners to receive their rewards. Simultaneously, the global ledger removes the orders, along with their corresponding models and validations, once rewards have been distributed. This process is designed to save space in local storage. It’s worth noting that the length of the update cycle is determined by a voting process among DTN nodes. Manage.Update •INPUTS: – current global ledger Lt •OUTPUTS: updated global ledger Lt′ TA B L E 2 Example execution of the DTN, grouped by network participants and sorted chronologically by row Client Network Miner PutOrders (..,Oi) CompeteOrders (..,Oselected )Put Validate (..,Mi) AllocRewards (..) Challenge (..,Vi) AddOrders (..,Oseal) GetModels (..,oID)Get GetModels (..,oID) SendModels (..,mID) TrackDeliver (..) Register (..)ManageRefresh () Update () UnRegister () 3.4 |Guarantees and Requirements The DTN is designed to ensure integrity ,retrievability ,incentive compatibility ,public verifiability and flexibility in the network, as detailed below: •Achieving Integrity: Models, orders, and validations are identified by their respective cryptographic hashes (IDs). Clients only need to keep the hashes of the order and model to retrieve the model and verify the integrity of the content received. Network participants can utilize these hashes to reference specific data structures, thus simplifying the input requirements for function calls. •Achieving Retrievability: All participants are required to stake tokens to register in the network to join mining, creating a strong incentive for them to consistently keep data available. If a client is unable to fetch the model they paid for, they may initiate an irretrievable report. The network will then call upon other participants to verify the report. Once a significant number of participants (with the total number of registered tokens supporting their consensus) verify and agree, the service provider will be penalized for failing to provide the model instance. •Achieving Incentive Compatibility: Miners and validators are rewarded for the computation resources they pro- 19 vide. Those who fail to fulfill their commitments or submit incorrect proofs are penalized, incentivizing honest participation in the network. •Achieving Public Verifiability and Auditability: All network participants, including miners and validators, have the ability to verify the validity of validations stored in the global ledger. They are economically incentivized to audit all work on the network, as successful challenges can earn rewards through utility tokens taken from dishonest or malicious validators. Unsuccessful challenges, however, result in a loss of collateral for the challenger. This system encourages positive behavior while simultaneously preventing any wrongdoing in the network, thus enhancing the autonomous feature of the system. •Flexibility: The network utilizes a community Decentralized Autonomous Organization (DAO)[12] to decide on critical system parameters, such as the length of the challenge period, among others. This mechanism allows the system to adapt and evolve over time in response to the needs of the community and the growth of the business. This flexibility, combined with the network’s robust design, creates a strong foundation for a secure, efficient, and user-responsive DTN. 4|SIMUILATIONS 4.1 |Global Ledger Synchronizations In the first part, we primarily focus on the synchronization of the transaction pool (txPool) within the global ledger. The txPool holds the most recent transactions and provides all necessary information for the global ledger to reach global states. The network of aggregator nodes maintains this global ledger, assembling incoming transactions from various network participants and synchronizing them with the global txPool. The synchronization mechanism we implement is the Practical Byzantine Fault Tolerance (PBFT) algorithm, which enforces consensus among nodes regarding the pool of transactions, thus ensuring consistent data synchronization across the network. The efficacy of this synchronization mechanism, especially in real-world scenarios, is crucial to our system’s performance and throughput. Therefore, we will conduct a series of simulations to evaluate the effectiveness of our PBFT-based synchronization within the global ledger. 4.1.1 |A Localhost Network Analysis During our simulation, we used crypto/x509 andencoding/pem , for facilitating the digital signatures and SHA-256 for hashing algorithm. The source code implementing PBFT algorithm can be accessed on the author’s GitHub page, for accommodating future improvements and extensions. •SHA-256 Hash: For any hashing needs, the SHA-256 algorithm is used which produces a 256-bit (32-byte) hash. •RSA-2048 Signature: RSA-2048 is used for signatures, meaning the size of a signature would be equal to the size of the key, i.e., 2048 bits or 256 bytes. •String Fields: Assuming a UTF-8 encoding which is common in Go, a string uses 1 byte per character for most common characters, although some characters can use more. As shown in Table 3, we analyze the approximate size of orders, validations, and challenges, depending on their respective fields. The order structure, consisting of reward, type, time, link, and a signature fields, costs approximately 312 bytes plus the size of varying fields. The Validation structure is made up of MID, score, vStake, and signature fields, 20 Algorithm 1 Practical Byzantine Fault Tolerance (PBFT) 1:Phase 1 [Request]: Client, Miners, Validators, Verifiers sends a request to the Primary aggregator node. 2:Phase 2 [Pre-Prepare]: The Primary node broadcasts a PRE-PREPARE message to all the Aggregator nodes. 3:Phase 3 [Prepare]: The Aggregator nodes validate the PRE-PREPARE message, and upon validation, they broad- cast a PREPARE message to all the Aggregator nodes. 4:Phase 4 [Commit]: After receiving 2fPREPARE messages from different nodes, the Aggregator nodes broadcast a COMMIT message. 5:Phase 5 [Reply]: After receiving 2f+1COMMIT messages from different nodes, the Aggregator nodes apply the operation and send a REPLY message to the Client, Miners, Validators, Verifiers . 6:Phase 6 [Result Acceptance]: The Client, Miners, Validators, Verifiers accept the operation result after receiving f+1identical REPLY messages from different Aggregator nodes. costing approximately 304 bytes. The Challenge structure includes VID, cStake, and a signature fields, costing around 296 bytes. These sizes are necessary considerations when simulating the system’s throughput, as they affect aspects such as ledger synchronization speeds and bandwidth requirements. TA B L E 3 Size in bytes of orders, validations and challenges Data Structure Field Size (bytes) Notes Order reward 8 Size of float64 type varies Assuming 10 bytes for a string of length 10 time 8 Size of int64 link varies Assuming 30 bytes for a string of length 30 sig 256 Size of RSA-2048 signature Total∼312 Plus the size of varying fields Validation MID 32 Size of SHA-256 hash score 8 Size of float64 vStake 8 Size of float64 sig 256 Size of RSA-2048 signature Total∼304 Challenge VID 32 Size of SHA-256 hash cStake 8 Size of float64 sig 256 Size of RSA-2048 signature Total∼296 We categorize networks into three sizes: small, medium, and large. Small networks consist of up to 10 nodes, used in cases such as sample or demo networks. Medium-sized networks, with 10 to 30 nodes, represent moderately distributed systems that could span across several geographical regions or countries. Large networks, with more than 30 nodes, represent global L1-L2 systems such as Chainlink [22]. For our analysis, we focus on the PBFT’s 21 synchronization time within the designed DTN structure, excluding considerations of network connection and data transfer latencies. In Table. 4, we analyze how variations in network size and message size affect synchronization time. By adjusting these parameters, we can measure the capacity of our system to handle varying client request loads. For instance, simulations might involve synchronizing a single order with 10 validations (totaling 3432 bytes), or ten orders each with 10 validations (totaling 6160 bytes), or one order with 100 validations (totaling 30512 bytes), among other scenarios. TA B L E 4 Synchronization times for different message sizes and network sizes (in seconds). Network Size Scenario (Message Size) Small (10 nodes) Medium (30 nodes) Large (100 nodes) 1 order, 10 validations (3432 bytes) 0.0387 0.132 0.463 1 order, 50 validations (15412 bytes) 0.0374 0.106 0.418 1 order, 100 validations (30512 bytes) 0.0466 0.149 0.373 10 orders, 50 validations (15640 bytes) 0.0452 0.113 0.407 10 orders, 100 validations (30740 bytes) 0.0338 0.125 0.392 The experiments were conducted on a 64-bit Ubuntu 22.04.2 LTS system powered by the 12th Generation Intel®Core™i7-12700T processor with 20 cores, and equipped with 32GB memory. As seen in Table 4, the network size significantly affects the synchronization time across all scenarios. As the number of nodes in the network increases, so does the synchronization time, requiring more time to update nodes in larger networks. Despite differences in message size, the impact on synchronization time appears relatively complex. In fact, the system shows considerable efficiency in handling large packages, regardless of the number of orders and validations. This suggests that, without considering network latency, the system is designed to efficiently manage substantial volumes of transactions simultaneously. Thus, given our PBFT-based design, we can conclude that the network size plays a more substantial role in influencing synchronization time than the message size. Meanwhile, the network handles different message sizes effectively and robustly. 4.1.2 |A Real Network Analysis Apaft from the theoretical txPool synchronization time analyzed in the previous section, we introduce a more compre- hensive simulation of the PBFT synchronization algorithm. This simulation is designed to emulate real-world network conditions in distributed consensus scenarios. It considers the importance of variable network conditions, particularly network latency and bandwidth limitations, as these significantly impact the performance of a distributed system. In real-world scenarios, nodes within a distributed network are typically spread across different geographical regions, each subject to unique network conditions. These variations in network latency and bandwidth can greatly influence the performance of the consensus algorithm. Consequently, it’s crucial to incorporate these parameters into the network simulation, providing a more realistic analysis of the consensus algorithm’s performance. Analyzing recent data trends, global latency times and packet delivery rates can serve as reliable reference points for our simulation inputs. Data from May 2023 reveals average latency times of around 29ms for regional round 22 trips within North America, 15ms for those within Europe, and 71ms for transatlantic round trips. These are general trends and the actual times can fluctuate based on a number of factors, including the specific locations within the regions, the network conditions, and time of day11. For transpacific and other international round trips, latency values are typically slightly higher than 300ms, but still within acceptable ranges for efficient network performance. These average latency and packet delivery figures provide us with a solid basis to input realistic and relevant values into our simulations. Regarding the bandwidth, slow networks are classified as those with bandwidths less than 1 Mbps, medium networks range from 1 Mbps to 100 Mbps, and fast networks are those with bandwidths greater than 100 Mbps. We emulate a global network with varying network sizes, ranging from 10 to 50 nodes. The network latency varies between 30ms and 300ms, reflecting typical delay times both within a country and for transpacific connections. We further adjust the actual bandwidth limit, testing slow, medium, and fast speeds, although the theoretical bandwidth could be significantly higher. Additionally, we alter the size of the synchronized message (number of orders) from 100 orders to 10,000 orders to examine the performance metrics. TA B L E 5 Synchronization times for different message sizes, network sizes, and bandwidth limits (in seconds). Bandwidth Limit Scenario (Message Size) Network Size (nodes) Slow (0.1 Mbps) Medium (30 Mbps) Fast (125 Mbps) 100 transactions Small (10 nodes) 8.609 1.494 1.497 100 transactions Medium (30 nodes) 8.707 1.685 1.755 1000 transactions Medium (30 nodes) 73.536 1.682 1.833 100 transactions Large (50 nodes) 8.697 1.842 1.752 200 transactions Large (50 nodes) 15.984 1.908 1.893 5000 transactions Large (50 nodes) 37.532 1.767 1.678 10000 transactions Large (50 nodes) - 7.215 2.074 The experiments were conducted on a 64-bit Ubuntu 22.04.2 LTS system powered by the 12th Generation Intel ® Core™i7-12700T processor with 20 cores, and equipped with 32GB memory. The results in Table 5 illustrate the impact of different message sizes, network sizes, and bandwidth limits on synchronization times. The message contains a bundle of transactions where each transaction can be identified as either an order, a validation, or a challenge, all of which have approximately similar sizes. As the message size increases, particularly under bandwidth-constrained conditions, synchronization times increase significantly. This effect is less apparent under high bandwidth conditions, indicating that adequate network bandwidth can guarantee high network throughput and robustness. Furthermore, the network size does not dramatically affect the synchronization times for small message sizes. Given the results, we emphasize the importance of sufficient bandwidth in the implementations of a Decentralized Training Network (DTN). Also considering the multi-sig process of the aggregator nodes, we don’t suggest the number of nodes be large enough because that will complicate the DAO election process. As a result, a network size of 30-50 nodes and an average bandwidth requirement of 30 Mbps for aggregator nodes are suggested in the DTN implementation. 11https:/ /www.verizon.com/business/terms/latency/ 23 4.2 |Mining Rewards Distribution In this section, we analyze the process of mining reward distribution on the Binance Smart Chain (BSC), known for its affordability with lower transaction costs compared to other blockchains. Rewards, generated by sealing orders, are distributed to accounts that could be owned by miners, verifiers or aggregators. As the multi-signature setup, adopting the (k,n)configuration ensures robustness in our operations, even in the face of up to ffaulty nodes. We maintain the capacity to approve and execute transactions as the choice of kensures a consensus requirement. Aggregator nodes, using the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm, collate the rewards for each account and update this information within the smart contracts. To safeguard the integrity of the distribution process, a multi-signature system is employed during the transactions. The associated cost of updating an account is computed as: Cost =Gas Price×Gas Cost×Token Price. Function Gas Cost Executions Tokens Cost proposeReward 86,875 Once 0.000396 $0.098 confirmReward 45,371 ktimes 0.000207 $0.051 executeReward 161,888 Once 0.000739 $0.18 TA B L E 6 Summary of function executions on BSC Mainnet. Note that the ‘Cost‘ and ‘Tokens‘ values are calculated based on the current token price and gas price. As of June 20 2023, the gas price on BSC is 4.562 Gwei, and the token price is $246.2. In Table 6, we present a detailed cost analysis associated with executing key functions for reward distribution on the Binance Smart Chain (BSC) mainnet. Each function’s cost is calculated in tokens and their corresponding USD value. By summing the costs of proposing, confirming (with 30 confirmations), and executing a reward, we can estimate the total cost our network spends to distribute rewards to a single account. Given the gas price on BSC (4.562 Gwei as of June 20) and the token price of $ 246.2, this aggregate cost is approximately 0.007582 tokens or $ 1.87per account. The estimation can help us in understanding the scalability and economic feasibility of implementing reward distribution mechanisms on Layer 2 networks on the BSC. Moreover, it’s necessary to note that these costs may fluctuate due to variations in gas and token prices. 5|DISCUSSIONS 5.1 |Protocol Capacity and Scalability The previous sections have described the proof-of-training (PoT) protocol along with its implementations and simula- tions in a decentralized training network (DTN). While implementations in DTN can vary, the network’s performance can approximately represent the protocol’s performance, since the underlying structure and program logic remain con- sistent. The aggregator nodes serve as a platform in the system, coordinating clients, miners, and validators, enabling self-governance to initiate, process, and finalize services. While the actual influx of transactions (including orders, claims, validations, and challenges) will largely depend on the customer base and total hash power of the network, the processing power of the global states maintained by the aggregator nodes can be analyzed. According to the simulation, the network exhibits favorable results in synchronizing system tasks and operations. 24 By considering internet geographical latency and setting specific bandwidth limits and a certain number of aggregator nodes, the network can synchronize thousands of transactions every second. Given the approximate sizes of the order, claim, validation, and challenge respectively, we can infer that the protocol can manage at least 10-100 models every second. A significant advantage of the design is the allocation of computation-heavy tasks and storage to network partic- ipants. This strategy prevents the overconsumption of global storage, which could potentially be expensive, consid- ering that updating global states is a synchronous process. The global ledger only stores order, model, and validation information, the sizes of which are in the unit of kilobytes. Meanwhile, processing them requires a computational complexity ofO(1)orO(n). This approach enables the system to handle an empirically unlimited number of task requests and model finalizations simultaneously. 5.2 |Protocol Security In most blockchain protocols, the security of a protocol is guaranteed by cryptoeconomics, i.e., attacking the system is more costly than complying with it. Similarly, in the proof-of-training (PoT) protocol, one would need to obtain more tokens than the counterparties to initiate attacks, which can often prove quite expensive. Unless the potential rewards are substantial, there is little incentive for someone to attack the protocol. Even in high reward instances, they attract more attention from miners and validators in the network. Consequently, the tokens committed to the task increase significantly, raising the cost of any potential cheating attempts. Another possible attack scenario involves tampering with the Manage.Update() process in the aggregator nodes, allowing hackers to withdraw all tokens from the rewards contract. To compromise the multi-sig design of the PoT protocol, the miners would need a ( k/n) portion of the total staked tokens by the aggregator nodes. We call this Linear staking impact , meaning that to be successful, an attacker must have a budget Bgreater than a ( k/n) portion the combined staked tokens of all aggregator nodes. More precisely, we mean that as a function of k,B(k)=dkin a network ofnaggregator nodes, each with a fixed staked amount d. Given our requirement for aggregator nodes to stake a significant amount of tokens to act as network coordinators, a hacker would need at least 10% of the total circulation if 20% of tokens are held by the aggregator nodes (assuming k= 18 andn= 30). Therefore, the cost of such an attack is generally much higher than the tokens in the reward contract. As shown in Table 6, it costs an aggregator an average of $1.87 to finalize an order and update it on the blockchain mainnet. So, how do we incentivize them to cover this cost? Regarding the economic incentives for aggregator nodes, the PoT protocol suggests two possible approaches. The network can periodically issue new tokens to reward aggregators. However, this method would introduce an annual inflation in token value based on the reward rate over time. An alternative approach is to tax each sealed order by a certain percentage ( r). As long as the cumulative taxes exceed the cost of updating transactions, the aggregators will make a profit. This profit provides a strong incentive for the aggregators to perform diligently and honestly in their role as an aggregator node. 5.3 |Protocol Advantages We believe the protocol’s major advantage lies in its consensus mechanism design and optimized data structure, which provide significant capacity and scalability benefits compared to other solutions in this field. With this protocol design, the network coordinator, which maintains the global ledger and global states, is relieved from handling large data storage or heavy computation tasks inherently in most AI training processes. These tasks are delegated to participant nodes with sufficient resources. Participants are given strong cryptoeconomic incentives to act honestly and diligently, 25 resulting in a system that can largely self-govern, thus enhancing the protocol’s capacity and scalability. Participants are regulated by a voting mechanism. If, for example, any participant fails to provide storage and bandwidth for an instance download, they may be penalized by other nodes on the network and potentially lose their staked tokens during the voting process. The protocol can therefore ensure that participants remain committed to their orders and services, guaranteeing system liveliness. Another major advantage of the protocol over others lies in the design of its L1-L2 system structure, which ensures the easy upgradability of the system. AI is a rapidly shifting industry with new types of models being developed on a daily basis. The protocol uses Layer-2 (on-chain) applications to deposit, withdraw, and transfer users’ assets, while most operations are carried out on Layer-1 (off-chain) for upgradability purposes. For any new models, we can integrate them into the system by asking miners and aggregators to upgrade to the latest version of the exec . Then, clients will be able to specify new model types in their orders. Theoretically, the system can include any type of AI model into the L1 infrastructure, given that there is a valid validation function for that model which meets the protocol’s requirements mentioned in section 2. Question: Can the protocol handle training task of Large Language Models (LLM) such as chatGPT? In the PoT protocol, although a ’miner’ denotes a single node, there can actually be many GPU cards behind that node, as seen in the case of mining pools. Hundreds or even thousands of miners can join a mining pool to receive rewards. Given the significant computing power of a mining pool, it is much more likely to receive rewards in a competitive process. These rewards are then evenly distributed among mining pool participants based on their contributed com- puting power. A significant advantage of a mining pool is its reliability: unlike a single mining entity, which can become faulty at any time, the mining rigs gathered in a pool are typically more reliable. Consequently, they can handle more complex training algorithms like those described in [18], particularly when dealing with large models. It’s clear that mining pools are capable of handling large language models (LLMs) with billions of parameters. We believe that, with this component taken into consideration, the protocol can certainly handle LLM training tasks. This can be achieved by specifying detailed parameters on the client side and offering proportionate rewards to miners based on their contributions. 6|CONCLUSIONS AND FUTURE WORKS In conclusion, our work successfully bridges the emerging gap between artificial intelligence (AI) and crypto mining by addressing three major challenges that are currently keeping these two fields apart. The proof-of-training (PoT) protocol combines the strengths of both AI and blockchain resources, thereby enhancing the potential of both. The capacity, scalability, upgradability, and security attributes of the protocol have been rigorously evaluated and discussed throughout this study. By innovatively integrating a delicate system design and robust economic incentives, our solution circumvents common drawbacks of blockchain technology such as high storage and computation costs and limited network data access, while bolstering its strengths, such as security and user accessibility. We believe the protocol can be a game changer in the industry, providing individuals with affordable and straightforward access to resources which were previously exclusive to large companies and enterprises. One aspect not covered in this paper is the execution of experiments involving the interaction between clients and miners with actual tasks being resolved. This is mainly because any simulation in this aspect would merely represent a specific case of the system’s capacity and throughput. However, to analyze the protocol from a financial perspective, we set it as part of our future works: To engage the current hash power in the market by introducing network utility 26 tokens and implementing a complete version of the DTN, which would enable a detailed analysis of the system’s performance on real-world tasks, leading to further developments and understanding of the PoT protocol. Code Availability The source code used in this study for the implementation of the proof-of-training (PoT) protocol and the decentralized training network (DTN) is available for review, use, and modification under the terms of the MIT License. You can access the repository at: https://github.com/P-HOW/proof-of-training . References [1] 2018. Ocean Protocol: A Decentralized Substrate for AI Data and Services . Accessed: [Date Accessed]. [2] 2019. Fetch.AI Whitepaper . Accessed: [Date Accessed]. [3] 2023. Ethereum Network Hashrate Chart . Accessed: [Date Accessed]. [4] 2023. Singularitynet . Accessed: 2023-04-05. [5] H. Alshahrani, N. Islam, D. Syed, A. Sulaiman, M. Al Reshan, K. Rajab, A. Shaikh, J. Shuja-Uddin, and A. Soomro, Sus- tainability in blockchain: A systematic literature review on scalability and power consumption issues , Energies 16(02 2023), 1510. [6] A. Baldominos and Y. Saez, Coin.ai: A proof-of-useful-work scheme for blockchain-based distributed deep learning , Entropy 21(2019). [7] J. Benet, IPFS - content addressed, versioned, P2P file system , CoRR abs/1407.3561 (2014). [8] J. Boyle, 2021. BTC Mining Used More Electricity than Sweden . Accessed: [Date Accessed]. [9] G. Brassard, D. Chaum, and C. Crépeau, Minimum disclosure proofs of knowledge , J. Comput. System Sci. 37(1988), 156– 189. [10] F. Bravo-Marquez, S. Reeves, and M. Ugarte, Proof-of-learning: A blockchain consensus mechanism based on machine learn- ing competitions , 2019 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPCON), 2019, pp. 119–124. [11] M. Castro and B. Liskov, Practical byzantine fault tolerance , OSDI 99(1999), 173–186. [12] S. Cohney, J. Sklaroff, and D. Wishnick, The dao controversy: The case for a new legal framework for daos , Stanford Tech- nology Law Review 24(2021). [13] Cointelegraph, 2023. Cryptocurrency miners may lead the next stage of ai . Accessed: [Date Accessed]. [14] A. De Vries, Cryptocurrencies on the road to sustainability: Ethereum paving the way for bitcoin , Patterns 4(2023), 100633. [15] EOS.IO, 2017. Eos.io technical white paper . [16] M.J. Fischer, N.A. Lynch, and M.S. Paterson, Impossibility of distributed consensus with one faulty process , J. ACM 32(apr 1985), 374–382. [17] E. Foundation., Ethereum 2.0 Specifications . Accessed: [Date Accessed]. [18] M. Langer, Z. He, W. Rahayu, and Y. Xue, Distributed training of deep learning models: A taxonomic perspective , IEEE Trans. Parallel Distrib. Syst. 31(2020), 2802–2818. 27 [19] Y. Liu, Y. Lan, B. Li, C. Miao, and Z. Tian, Proof of learning (pole): Empowering neural network training with consensus building on blockchains , Comput. Networks 201(2021), 108594. [20] C. Nguyen, H. Dinh Thai, D. Nguyen, D. Niyato, H. Nguyen, and E. Dutkiewicz, Proof-of-stake consensus mechanisms for future blockchain networks: Fundamentals, applications and opportunities , IEEE Access PP(06 2019), 1–1. [21] T. Nguyen and K. Kim, A survey about consensus algorithms used in blockchain , J. Informat. Process. Syst. 14(01 2018), 101–128. [22] N. Sergey and S. Johnson, 2017. Chainlink: A decentralized oracle network . Accessed: yyyy-mm-dd. [23] Swiss Government, 2021. Federal Act on the Adaptation of Federal Law to Developments in Distributed Electronic Register Technology . Accessed: [Date Accessed]. [24] W. Wang, H. Dinh Thai, P. Hu, Z. Xiong, D. Niyato, P. Wang, Y. Wen, and D.I. Kim, A survey on consensus mechanisms and mining strategy management in blockchain networks , IEEE Access PP(01 2019), 1–1.
{ "id": "2307.07066" }
2001.03937
Simulated Blockchains for Machine Learning Traceability and Transaction Values in the Monero Network
Monero is a popular crypto-currency which focuses on privacy. The blockchain uses cryptographic techniques to obscure transaction values as well as a `ring confidential transaction' which seeks to hide a real transaction among a variable number of spoofed transactions. We have developed training sets of simulated blockchains of 10 and 50 agents, for which we have control over the ground truth and keys, in order to test these claims. We featurize Monero transactions by characterizing the local structure of the public-facing blockchains and use labels obtained from the simulations to perform machine learning. Machine Learning of our features on the simulated blockchain shows that the technique can be used to aide in identifying individuals and groups, although it did not successfully reveal the hidden transaction values. We apply the technique on the real Monero blockchain to identify ShapeShift transactions, a cryptocurrency exchange that has leaked information through their API providing labels for themselves and their users.
http://arxiv.org/pdf/2001.03937v1
Nathan Borggren, Hyoung-yoon Kim, Lihan Yao, Gary Koplik
cs.CR
cs.CR
Simulated Blockchains for Machine Learning Traceability and Transaction Values in the Monero Network Nathan Borggren, Hyoung-yoon Kim, Lihan Yao and Gary Koplik Geometric Data Analytics, Inc., Durham, NC, 27701 Abstract Monero is a popular crypto-currency which focuses on privacy. The blockchain uses cryptographic techniques to obscure transaction values as well as a `ring con dential transaction' which seeks to hide a real transaction among a variable number of spoofed transactions. We have developed training sets of simulated blockchains of 10 and 50 agents, for which we have control over the ground truth and keys, in order to test these claims. We featurize Monero transactions by characterizing the local structure of the public-facing blockchains and use labels obtained from the simulations to perform machine learning. Machine Learning of our features on the simulated blockchain shows that the technique can be used to aide in identifying individuals and groups, although it did not successfully reveal the hidden transaction values. We apply the technique on the real Monero blockchain to identify ShapeShift transactions, a cryptocurrency exchange that has leaked information through their API providing labels for themselves and their users. 1 Introduction We have successfully applied machine learning (ML) in the past by combining features derived directly from blockchains with labels aggregated from o -chain sources [ 1,2]. Other researchers have used ML techniques as well to deanonymize exchanges [ 3], identify malware [ 4], and other institutions [ 5]. With the exception of [2], these analyses have largely focused on Bitcoin as the labels are easily sourced, albeit dicult to verify [6]. However, other crypto-currencies have also greatly progressed and provide sucient liquidity to be incorporated into cross-currency mixing schemes [2, 7]. Although many crypto-currencies are derivative of Bitcoin, originating in a fork of the code repository followed by some cosmetic changes, some coins have adopted di erent basic assumptions and introduced substantially new codebases and cryptographic techniques to overcome some of the privacy limitations inherent in Bitcoin. One such coin is Monero [ 8]. Monero has introduced some structural di erences to Bitcoin that were sucient to render our Bitcoin-like ML machinery inapplicable. In particular, the following features of the Monero blockchain obstruct our previous analysis. Addresses are not included in the blockchain, obfuscating the recipient of a transaction. Transaction values are obfuscated Inputs to a transaction are combined with spoofed transactions (the RingCT), obfuscating the origin of a transaction. Despite these improvements, Monero is still susceptible to some level of tracking using heuristics [ 9] and understanding residual e ects of hard-forks [10]. Can we regain an ML approach to the deanonymization of Monero? A few hurdles need to be overcome. First, featurizations of the Monero blockchain will be heavily topological in their nature; timestamps, number of inputs, size of RingCTs and the connectivity among transactions are the raw materials from which we can make features. Second, the monerod wallet client, in comparison with the bitcoind wallet client, has removed a number of features that are of use to blockchain analysts but not necessary for the day to day use of the coin. Lastly, large repositories of labels of transactions are either unavailable, unreliable, or classi ed. 1arXiv:2001.03937v1 [cs.CR] 12 Jan 2020 To overcome the rst hurdle, in Sec. 3, we will quantify some topological aspects in the blockchain neighborhood of a given transaction. We have utilized [ 11], the open source repository behind xmrchain.net , to overcome the second hurdle. To address the third hurdle, we have collected and veri ed labels aggregated from the ShapeShift API. These labels allows us to deanonymize only one entity, ShapeShift, and while we do so in Sec. 5 to demonstrate the use of our features on the real monero blockchain, but for the sake of generality and additional con dence we have chosen another course which we hope will inspire other privacy analysis on Monero and other blockchains. In cybersecurity studies, it is commonplace to generate synthetic datasets to develop and assess threat detection techniques [ 12]. We use this analogy to provide a framework to understood the inner workings of Monero in action; test networks are created including ten and fty person networks to provide a dataset for an ML analysis. For the ML assessment, the blockchain, that is the public-facing aspect of the network, is used to develop featurizations while the wallet contents are used to supply the labels as depicted in g 1. Figure 1: A test-network is used to generate a blockchain and provide labels. Monero also provides new opportunities for machine learning that were not present or applicable in the Bitcoin-like case. In Section 4, in addition to exploring the agent identi cation task we will explore these other use cases. For example, we can use our features in a regression analysis seeking to nd the missing transaction value. Although this is shown to be unsuccessful in this case, we did achieve success in recovering the real input out of the spoofed transactions. 2 Simulating Blockchains To simulate a Monero economy where multiple agents transact with each other and mine simultaneously, we use tmux, an application for creating and managing multiple terminal sessions on a single machine. We run a shell script to create a tmux-based network of Monero agents based on hard-coded wallet information. On this network, each agent runs a mining operation and a wallet remote procedure call (RPC) attached to an allocated set of ports. All agents on the network are connected to each other and keep a synchronized blockchain. The economy les specify how the economy will operate. Each economy le contains a list of transaction amounts, destination addresses, and wait times between the transactions that the particular agent will adhere to. We generate these les with a stochastic model. We use a Python program to process these les and make HTTP-based transaction requests to the Monero wallet RPCs accordingly. Other than the constraint that the wait times between transactions must be sucient to keep the delays in transaction processing relatively small, the content of the economy les is up to imagination. We consider several economic scenarios with varying assumptions and create the economy les accordingly. Three of the ve scenarios we consider are ten-agent economies, and the rest are fty-agent economies. The wait intervals between transactions and the transaction amounts are generated by the Poisson distributions. For scenario s03, the agents wait intervals come from varying Poisson parameters ranging from 45 to 90,000, while the transaction amounts come from the same Poisson parameter for all agents. Scenario s04 uses varying Poisson parameters for generating transaction amounts as well. Scenario s05 is the same as s03, but 2 (a) graph for s03 and s04 (b) graph for s05 (c) graph for s06 (d) Graph and s07 Figure 2: Graphs of economy les, showing connectivity of trading partners with edges, and color shows transaction size. the economy is divided into two pools. That is, the agents only transact within the pool they belong to. Telling these pools apart based on public transaction data is one of the machine learning questions we pursue. For one of the two fty-agent scenarios (s06), we create two pools of equal number of agents. Additionally, we create two di erent cycles of transactions for the two pools, simulating a time zone di erence in the real world. Finally, in our nal fty-agent scenario (s07), we devise a transaction network with ve ten-agent pools. Fig. 2 shows the experimental setup. To examine the blockchain data, we link the Onion Monero Blockchain Explorer to the blockchain of one of the agents. Table 1 shows a summary of the datasets generated, while g 3 shows the dramatic sparsity that can be achieved by removing the spoofed transactions from the blockchain. Simulation Number of Blocks Number of Transactions s03 23812 4898 s04 25509 4923 s05 41583 4923 s06 37281 24807 s07 58551 7070 Table 1: Summary of Simulation Datasets (a) For s06, all edges between transactions are shown (b) For s06, only true edges between transactions are shown Figure 3: Removing the spoofed transactions shows a much clearer image of the blockchain activity. 3 3 Featurizing Monero Blockchains Real Monero Blockchain For most machine learning tasks on real cryptocurrency blockchains, the diculty in procuring labels for supervised learning remains a central challenge, despite the accessibility of blockchain activities themselves. In Monero, this is especially so. In certain situations, labels and unseen blockchain information may be collected by law enforcement, hedge funds and hobbyists. We utilize transaction data from Shapeshift service. The dataset contains around 1,700,000 transaction entries of which 20,000 are ShapeShift transactions being converted into Monero. For each transaction entry, the data contains 7 0-hop features - features intrinsic to the transaction as it appears on the Monero explorer interface, e.g. transaction timestamp, ring size, day of week, hour of day, etc. From the 0-hop features, 175 1-hop features, aggregate statistics including mean, max, standard deviation, regarding the transaction neighbors' 0-hop features are also collected. The 182 features are Z-normalized prior to the predictive task. Figure 4: A neighborhood around a transaction is featurized by collecting statistics of the 0-hop and 1-hop transactions. This approach considers the neighborhood information of a particular transaction, while not requiring the extraction of the entire network. We nd that the 1-hop features have been informative in Shapeshift transaction predictions. On test nets, group membership prediction and transaction value regression tasks have also bene ted from neighborhood information. In a related work [ 13], we propose a correlation statistic for mitigating the noise introduced by the mixin mechanism. This feature follows from the hypothesis regarding multiple wallet usage: when a transaction contains multiple ring CTs, the real inputs within each ring are contributed by the same user or users exhibiting similar behavior. For example, a receiver may expect a token amount exceeding the value stored within a single wallet, so the sender provides inputs from multiple wallets that were previously traded at a similar frequency themselves . We quantify this intuition by tabulating a population statistic over transactions containing exactly two rings. The ( i;j)-th entry of the correlation matrix is the correlation in time between i-th oldest entry of the rst ring with j-th oldest entry of the second. The binning of the matrix can be presented in hours of the day, or by partitioning the relative timestamp di erence between inputs i,j. While our features do not explicitly reference the measured correlation matrix, our features have been chosen to be sensitive to these e ects. Test Nets Of the ve test nets s03, s04, s05, s06, s07, all were inputs to the transaction value regression task, while group membership prediction was studied in the last three test nets. The preprocessing of Monero explorer information and featurization follows the featurization process of the real Monero blockchain. 4 4 Machine Learning 4(a) Machine Learning Spoofed/Real Transactions An interesting new ML task that Monero uniquely o ers is in identifying which of a given set of RingCT elements was the real previous transaction. Our correlation analysis suggests that pattern-of-life behaviors, such as a users' typical transaction time of day can reveal information about the true input. The features we have computed are sensitive to these di erences and give reason to suggest that ML can recover real signal despite the mixins. Fig. 5 shows a depiction of the task at hand. In black is a screenshot of the blockchain with an arrow in red showing the true input. The true input is known by analyzing the wallets, shown in white, of the users after the simulation terminates. Figure 5: In black background is the public facing blockchain, in white are the known transactions of the given user. The ML exercise is to recover the index of the real transaction. 4(b) Machine Learning User Identity and Group Membership In the task of identifying users and groups from transaction logs, we applied neural networks and random forest for classi cation. An observation in this case is a transaction - we classify the group that the transaction's receiver belongs to. The groups across scenarios trade strictly within-group, and only during designated time intervals. These time intervals repeat in a cyclic pattern, akin to timezones. For both models, a randomized search over hyperparameters was conducted. The neural network is composed of 2 dense layers with 182 and nneurons respectively, where the second layer ranges from 10 to 30. The random search over random forest hyperparameters include: number of decision trees, maximum depth, maximum features, minimum samples per split, and the splitting criterion. Because random forest has an interpretable feature importance weighting, the top 3 informative features for group membership classi cation are: S05 The informative S05 features involve the input minute among a transaction's inputs. They are listed in decreasing order of importance: Sum of average input minutes, average of max input minutes, and average of minimum input minutes. S06 The informative features are: sum of input seconds, average of maximum input hours, and sum of max input hours S07 The informative features are: median of input minute sums, maximum of input minutes, and average of maximum input minutes. 4(c) Machine Learning Transaction Value Model performance for the value regression task is the R2coecient. R2= 1P i(yi~yi)2 P i(yiy)2 5 Figure 6: The membership in a group is known from the wallet les and economy instructions. whereyis the transaction value in expectation. We set the baseline predictor of this task to be predicting shapeshift transaction values in expectation, and its R2performance is 0. A perfect score is 1, and models that improve on our baseline performance lies in the range (0 ;1]. To predict the transaction values of the i-th entry, we tted two models: Epsilon-Support Vector Regression (SVR) and neural network. For both models, a randomized search was completed over hyperparameters. The SVR hyperparameters include its kernel, regularization parameter C, and tolerance parameter . The neural network is composed of 2 dense layers, with 182 and nneurons respectively, nranging within [10, 30]. The learning rate was another hyperparameter searched over. Given a hyperparameter set, model performances are computed over 5-folds of the data then averaged. We nd that more information regarding transactions is required to predict their values. The SVR model has aR2value of 0:16, and the neural network has a value of 0:1, both below the baseline performance of 0. Future directions of value regression include 1. In the case of multiple rings, incorporating input-level correlations between rings. 2. Integrating known user-level information to value prediction. 4(d) ML results Fig. 8 shows the results of our machine learning e orts. We expect that uniformity between the users and a severe lag in time transactions posted compared to the design speci cations contributed to the poor performance in Scenario 6 and Scenario 7. 5 Machine Learning on the real Monero network; Identifying ShapeShift Previously in [ 2] we had collected and validated ShapeShift transactions using their API. This collection of data provided labels for Bitcoin, ZCash, Litecoin, and Dash transactions. Our featurizations of Bitcoin-like blockchains allowed us to successfully recall 73% of ShapeShift transactions while analyzing only 20% of the Bitcoin blockchain. In Table 2, we have extended that analysis to identify ShapeShift transactions whose target currency was Monero. Surprisingly, the classi er for Monero outperformed that for Bitcoin. We attribute this to the fact that during its peak in 2018, ShapeShift was responsible for upwards of 4% of the entire Monero blockchain, where only one in a thousand transactions in Bitcoin were attributed to ShapeShift. Although our dataset was still greatly imbalanced, the extent of the imbalance was not nearly as severe. 6 Figure 7: The transaction value on the blockchain is missing in the black. We attempt to recover the value from the wallet in white through regression on the features. Metric Summary Statistic ShapeShift Not ShapeShift Precision Mean 0.050062 0.999161 SD 0.000129 0.000030 Recall Mean 0.941982 0.794504 SD 0.002058 0.000548 Table 2: Our features enable a high recall of ShapeShift transactions, identifying 94% of the transactions looking at 20% of the blockchain. The most important feature was by far the number of rings used in the tx, with seven of the other nine top-ten-features also involving summary statistics of the number of rings. These are shown in Fig. 9. 6 Conclusions We have found that despite the complexities created by the enhanced privacy features of Monero, the blockchain is still susceptible to deanonymization and information gathering by machine learning techniques. To establish this fact, test networks were developed to generate simulated blockchains. These blockchains were featurized while the wallets were parsed to provide labels. Monero proved to be robust against our e orts in recovery of the obfuscated transaction values, while classi ers for spoofed transaction identi cation and faction/group/user identi cation proved informative. Additionally we have shown that ML on the real Monero blockchain can be used to identify a given party provided a sucient collection of labels. We used as our example the cryptocurrency exchange ShapeShift to demonstrate this, but expect this to hold true if other large collections of labels were recovered, for example from wallets recovered in criminal investigations. Despite having values for ShapeShift transactions, our regression attempts to recover these values proved unsuccessful. We hypothesize that future e orts could use much deeper features such as tracing all the way back to coinbase transactions, noting which version of Monero was being used for previous transactions, and incorporate features that look forward in time rather than the exclusively backwards features we have used. Such features may perhaps allow value information to leak into the features and provide success to a regression analysis, but the task would indeed be computationally expensive. It is noted that recent versions of Monero now enforce the RingCT size to be eleven; as ring number 7 Figure 8: ML results for the various tasks are shown. In transaction value predictions, our regressors did not surpass baseline of guessing average transaction values. derived features had been the most informative features in the ShapeShift analysis, we expect this change to greatly enhance privacy going forward. However, as previous studies have shown, the residue from history of the past transactions will likely linger for some time as these new characteristics reshape the underlying distributions of features. We would like to thank the Machine Learning and Emerging Technologies exemplars at the LAS at North Carolina State University for funding and continuous feedback. The irony does not escape us that the generosity of code and data from Monero, Onion explorer and the ShapeShift API, all participants devoted to privacy and security in the blockchain realm, were essential to this anti-privacy investigation and we are grateful for their contribution. 8 (a) the features were ranked in accordance to their importance (b) Descriptors for the important features Figure 9: Characteristics of the RingCT topology were largely informative. References [1]Nathan Borggren. Deep learning of entity behavior in the bitcoin economy. https://ncsu-las.org/ wp-content/uploads/2017/12/borggren-gda_bitcoin.pdf , 2017. [2]Nathan Borggren, Gary Koplik, Paul Bendich, and John Harer. Deanonymizing shapeshift: Linking transactions across multiple blockchains. https://ncsu-las.org/wp-content/uploads/2019/01/LAS_ Shapeshift_Poster_1543186217.pdf , 2017. [3]Stephen Ranshous, Cli A. Joslyn, Sean Kreyling, Kathleen Nowak, Nagiza F. Samatova, Curtis L. West, and Samuel Winters. Exchange pattern mining in the bitcoin transaction directed hypergraph. Lecture Notes in Computer Science (including subseries Lecture Notes in Arti cial Intelligence and Lecture Notes in Bioinformatics) , 10323 LNCS:248{263, 2017. [4]Cuneyt Gurcan Akcora, Yitao Li, Yulia R. Gel, and Murat Kantarcioglu. Bitcoinheist: Topological data analysis for ransomware detection on the bitcoin blockchain. CoRR , abs/1906.07852, 2019. [5]Francesco Zola, Maria Eguimendia, Jan Lukas Bruse, and Raul Orduna Urrutia. Cascading machine learning to attack bitcoin anonymity, 2019. [6] Ales Janda. Wallet explorer. https://www.walletexplorer.com , 2013-2017. [7]Haaroon Yousaf, George Kappos, and Sarah Meiklejohn. Tracing transactions across cryptocurrency ledgers. CoRR , abs/1810.12786, 2018. [8] u ypony et al. Monero project. https://github.com/monero-project/monero/blob/master/src/ wallet/wallet2.cpp , 2015. [9]Andrew Miller, Malte M oser, Kevin Lee, and Arvind Narayanan. An empirical analysis of linkability in the monero blockchain. CoRR , abs/1704.04299, 2017. [10]Abraham Hinteregger and Bernhard Haslhofer. An empirical analysis of monero cross-chain traceability. CoRR , abs/1812.02808, 2018. [11]moneroexamples et al. onion-monero-blockchain-explorer. https://github.com/moneroexamples/ onion-monero-blockchain-explorer , 2016. 9 [12]J. Glasser and B. Lindauer. Bridging the gap: A pragmatic approach to generating insider threat data. In2013 IEEE Security and Privacy Workshops , pages 98{104, May 2013. [13] Nathan Borggren and Lihan Yao. Correlations of multi-input monero transactions, 2019. 10
{ "id": "2001.03937" }
1810.12596
VAPOR: a Value-Centric Blockchain that is Scale-out, Decentralized, and Flexible by Design
Blockchains is a special type of distributed systems that operates in unsafe networks. In most blockchains, all nodes should reach consensus on all state transitions with Byzantine fault tolerant algorithms, which creates bottlenecks in performance. In this paper, we propose a new type of blockchains, namely Value-Centric Blockchains (VCBs), in which the states are specified as values (or more comprehensively, coins) with owners and the state transition records are then specified as proofs of the ownerships of individual values. We then formalize the "rational" assumptions that have been used in most blockchains. We further propose a VCB, VAPOR, that guarantees secure value transfers if all nodes are rational and keep the proofs of the values they owned, which is merely parts of the whole state transition record. As a result, we show that VAPOR enjoys significant benefits in throughput, decentralization, and flexibility without compromising security.
http://arxiv.org/pdf/1810.12596v2
Zhijie Ren, Zekeriya Erkin
cs.DC
cs.DC
arXiv:1810.12596v2 [cs.DC] 14 Dec 2018VAPOR: a Value-Centric Blockchain that is Scale-out, Decentralized, and Flexible by Design Zhijie Ren and Zekeriya Erkin Department of Intelligent Systems Delft University of Technology, The Netherlands {z.ren, z.erkin}@tudelft.nl Abstract. Blockchains is a special type of distributed systems that op - erates in unsafe networks. In most blockchains, all nodes sh ould reach consensus on all state transitions with Byzantine fault tol erant algo- rithms, which creates bottlenecks in performance. In this p aper, we propose a new type of blockchains, namely Value-Centric Blo ckchains (VCBs), in which the states are specified as values (or more co mprehen- sively, coins) with owners and the state transition records are then spec- ified as proofs of the ownerships of individual values. We the n formalize the “rational” assumptions that have been used in most block chains. We further propose aVCB, VAPOR, thatguarantees secure valuet ransfers if all nodes are rational andkeep theproofs of thevalues theyo wned, which is merely parts of the whole state transition record. As a res ult, we show that VAPOR enjoys significant benefits in throughput, decent ralization, and flexibility without compromising security. Keywords: Blockchain,DistributedLedgers,ConsensusAlgorithm,Sc al- ability, Decentralization 1 Introduction Blockchain technology, also referred as distributed ledger techno logy, considers a distributed system operating in a network with untrusted nodes. I n blockchains, all nodes of the system apply the same rules to process consistent data, which mainly takes form of data blocks chained with unbreakable hash func tions. We can categorize all existing blockchains into two categories by the ir data structures: one follows the idea of Bitcoin [22] and we call Transact ion-Centric Blockchains (TCBs), and the other follows from Ethereum [32] and t he classical state machine replication model, we call Account-Centric Blockchain s (ACBs). The former is commonly referred as ledgers, since all data are tran sactions, i.e., value transfer records. The concepts of account and balance ar e not explicitly emphasized. The latter, on the other hand, the states of nodes lik e their balances and other variables are defined and the state transition records, e.g., the trans- actions, are put to the back-end of the system. In either case, a ll nodes in the blockchain system should essentially always keep a consistent state regardless of whether the concept of state is explicitly emphasized. Then, in blo ckchains, 2 Z. Ren and Z. Erkin nodes should only pre-agree with the initial state, i.e., the genesis blo ck, and then be able to use a consistent rule to independently validate each in put and then perform their state transitions. As a result, both TCBs and A CBs require the complete state transition records to be acquired reliably and co nsistently by all nodes in the network, which causes a critical bottleneck in the pe rformance of blockchain. In this paper, we use the term “traditional blockchains ” to refer to all blockchains that all nodes need to acquire the whole state trans ition records. A straightforwardconsequence of the bottleneck is the scalability issue which has been addressed in several other works [9,31]. The throughpu t of blockchains does not grow with the number of nodes as the requirement of comm unication, computation, and storage grow at least proportionally to the numb er of nodes in the network. Hence, the throughput is limited to the capacity of t he least capable node in the network and will not increase as the network gro ws. Then, we also observe that centralization is an indirect consequenc e of the requirement for the whole state transition record. As novel block chain systems are pursuing high throughput in terms of transaction per second ( TPS), the requirement for communication, computation, and storage becom es a threshold too high for normal users to participate. Then, the participation threshold is a crucial factor in evaluating the decentralization of the blockchain , since a blockchain with a high participation threshold will be consequentially un friendly to normal users and more centralized, regardless of whether a fu lly decentralized consensus algorithm is used. The third problem we address in traditional blockchains is inflexibility. A s blockchainsaredecentralizedbytheirnature,anupgradeorchan getothesystem is much more difficult than centralized systems as inconsistency might happen if nodes follow different rules. Some examples of such inconsistency ar e “forks”like Bitcoin Cash/Bitcoin and Ethereum Classic/Ethereum, which cause t he system to split and degrade in security. In this paper, we address the problem of “all nodes need to acquire and agree with allstatetransitions”whichessentiallycausesallabovemention edproblems. To solvethis problem, we proposea new type ofblockchainscalled Valu e-Centric Blockchains (VCBs) that are equally secure as traditional blockcha ins but re- quires each node to only acquire partial state transitions. More pr ecisely: –We formalize the rationality of nodes in value transfer system, we ca ll Ratio- nality of Value Owner (RVO), which has already been explicitly or implicitly used in almost all blockchains without specification. –We propose a novel type of blockchains, called VCBs, which differ fro m traditional blockchains as the states are specified as the distribut ion for all values. A value can have an arbitrary amount and can be concept ually interpreted as a banknote. Then, all state transitions are sorte d into proofs for the ownership of individual values.1 1Similar ideas can be found in many classical digital cash sys tems, i.e., Ecash [7,8]. The relationship and difference between VCBs and early digit al cash systems will be discussed in Subsection 7.1. VAPOR 3 –We propose a VCB called VAPOR in which nodes only needs to hold the proof of their own values. We further prove that it guarantees se cure and fullydecentralizedvalue-transferundertheRVOassumption.Mor eover,with examples, we show that VAPOR can be easily extended with extra fun ction- alities like fast payment channels. –WeshowthatVAPORhassignificantadvantagesovertraditionalblo ckchains in throughput, decentralization, and flexibility. This paper is organized as follows. In Section 2, we formally introduce the rationality of value owners in blockchains. Then, in Section 3, we intro duce VCBs, their features, and the conditions required for a valid VCB. I n Section 4, we introduce a VCB, called VAPOR, and prove that it guarantees relia ble value transfer. We show some examples of extension of VAPOR in Section 5 and show the advantages of VAPOR over traditional blockchains in Section 6. At last, we compareoursystemtosomerelatedworksinSection7andconclude inSection8. 2 Rationality of Value Owner Blockchain technology is no stranger to the notion of rationality as it was in- troduced as one of the fundamentals of Bitcoin. However, the rat ional behaviors of nodes in blockchains, especially regarding the values they owned, are seldom formalized. A commonly utilized rationality assumption is that rational trans- action issuers are motivated to prove to the receivers that the tr ansactions are successful. It is mostly in the form of transaction fees, i.e., rationa l nodes would like to pay reasonable transaction fees so that their transactions could be added to the chains by the “miners”, which is shown as the evidences that t he transac- tions are successful. It has also been utilized in other forms, e.g., in t he Tangle [27], rational nodes will do a POW and validate two previous transactio ns to make a transaction and in Omniledger [17], rational nodes will take init iative in issuing their inter-shard transactions to all related shards and t ake effort in completing the transactions. There is another type of rationality, the rationality of receiving valu es, which is mostly ignored in literature. In Bitcoin for instance, once a transa ction is issued, a rational receiver should observe the chain for the trans action and a number of consecutive blocks to confirm the transaction. Howeve r, this is not emphasized since in most blockchains, the receiver do not need to va lidate extra information besides the blockchain itself. However, some off-chain s olutions like Lightning Network (LN) and Plasma [25,26] introduce new requireme nts for the rationalreceiversto validatesomeoff-chaininformationto confirm atransaction. Finally, we also specify a rationality, the rationality of holding values, w hich is usually considered trivial. In the basic Bitcoin system, it is simply holdin g the private key and keeping it secret. However, in current Bitcoin s ystem, there are some special transactions called Pay-to-Script-Hash (P2SH) transactions, in which the values are locked by scripts that the value owners should b e able to provide. Then, in LN, rational nodes also need to keep certain “c ommitment transactions”secretly. Moreover,they should activelymonitort he chain to check 4 Z. Ren and Z. Erkin if some specific transactions appear and take certain responses. Otherwise, their received transactions could be canceled. In this paper, we formally introduce the Rationality of the Value Owne rs (RVO),whichisthecombinationofallthreerationalitiesmentionedab ove.These rules are in fact no stronger than the common rationality assumptio ns made in existing blockchains. We say that if a rational node follow the RVO rule s, then he (we use the pronouns “he” for a node throughout this paper) w ould use his communication,computation,andthestorageresourcestoperf ormthefollowing: – Rationality in Holding Value: If he owns a value, he will make sure that he could prove the ownership. – Rationality in Sending Value: If he sends a value, then he will take responsibility of proving to the receiver that 1), he owned this value ; 2), the value is successfully transferred to the receiver. – Rationality in Receiving Value: If he receives a value, then he will take responsibility of validating 1), the authenticity of that value; 2), th e value transfer is successful. 3 Value Centric Blockchains The data structure of VCBs is similar to many “off-chain” schemes like [19]. Each node individually puts its own transactions in off-chain transact ion blocks and periodically sends an abstract of those blocks to a globally agree d main chain. Then, the key elements in VCBs are values and their ownership . A value can be conceptually interpreted as a banknote with arbitrary deno mination. Virtually, there exists a list of all values in the system, their amount, and their owners which updates with the system states. Moreover, for eac h ownership, there is aproofandan verificationalgorithmthat couldbe used to de termine the ownership, which consists of a subset of all transaction blocks. In this section, we introducethe basicconceptsin VCBs:the mainchain,the values, th everification algorithm, and the conditions required for a valid VCB, i.e., a valid VCB sh ould be able to guarantee secure value transfers between nodes. 3.1 Main Chain For a VCB, we define the main chain as a sequence of data blocks chained with unbreakable hash function, denoted by B={B1,B2,...}. The main chain shouldhavethefollowingproperty,whichisessentiallyachievedbyall traditional blockchains. Property 1 (Consensus on the Main Chain). – Asynchronous Consistency: In the situation where the message delay in the network is arbitrary, if an honest node agrees with a block Bias thei-th block of the chain, then another honest node will not agree with B′ i/ne}ationslash=Bias thei-th block of the chain. VAPOR 5 – Synchronous Liveness: In the situation where the message delay in the networkcouldbe bounded by aconstant τ, ifanhonest node proposesames- sagem, then eventually an honest node will agree with a block Bcontaining m. The main chain has two functions. First, it serves as a global clock. T hroughout this paper, we use the term “the system is at state Bi” to represent a state that thesystemhasjustreachedconsensuson Bi.Second,itisusedtoreachconsensus on data that needs global agreements, e.g., the initial value distribu tion, the verification algorithm, and digital signatures of the transaction blo cks of nodes, which we will specify later. 3.2 Value, Ownership, and Proof We assume that there are Nnodes in the network, denoted by 1 ,2,...,N. We assume that there is a unique public key attached to each node and w e can match the node and its public key when both are shown. In VCB, at ea ch state of the system Bi, associated with a value vj,j= 1,2,..., we have the amount of the value Q(B1) ={Q(v1),Q(v2),...,}and the owner of the value O(vj,Bi)∈ {NA,1,2,...,N}. Here,O(vj,Bi) =NAsuggests that this value is not owned by anyone at state Bi. We define value distribution of state Bias V(Bi) ={[vj,O(vj,Bi)] :∀vj}. The initial value distribution and the amount of each value, i.e., V(B1) andQ(B1), are contained in the first block of the main chainB1. Then, for a transaction, or more specifically a transfer of the va lue vjfrom owner xtoy, denoted by txm(vj,x→y), we will have O(vj,Bi) =x andO(vj,Bi+1) =yfor a certain state Bi. Furthermore, we define a verifica- tion scheme, consists of an verification algorithm GetOwner (vj,Bi,p) and proofs P(vj,Bi) for alli,j, that satisfies that 1), GetOwner (vj,Bi,p) returns O(vj,Bi) ifp=P(vj,Bi); 2),GetOwner (vj,Bi,p) returns “Fail” if p/ne}ationslash=P(vj,Bi). The algorithm GetOwner (vj,Bi,p) should also be agreed in B1. Now, we have all fundamental elements of VCBs: for a state Bi, there exists a set of values vj,∀j, their corresponding owners O(vj,Bi), their proofs of the ownership of the values P(vj,Bi), and an algorithm GetOwner (vj,Bi,p) that could determine the owner of a value when the proof is given. Creating, Demolishing, Merging, and Dividing Values The creation and demolition of values are crucial in many blockchains with Nakamoto-like con- sensus algorithms, since usually part of the incentives is given by cre ating new values. On the other hand, merging and dividing values are optional s ince the value exchange does not require the values to be divisible or mergeab le, e.g., fiat currencies with banknotes and coins. Hence, we introduce how values could be created or demolished here, and the merging and dividing of values will be introduced in Section 5.1 as an additional functionality. The creation and demolition of value should be agreed by all nodes, th us will be contained in the main chain. More precisely, to create a new valu evj: [vj,O(vj,Bi)]/∈ V(Bi), a statement [ Add:vj,Q(vj),O(vj,Bi+1)] should be in 6 Z. Ren and Z. Erkin blockBi+1. Similarly, to demolish value vj, we put a statement [ Delete:vj] in blockBi+1. 3.3 Validity of VCB As far as we know, a rigorous definition of a valid value transfer syst em is still lacking, which remains a non-trivial and interesting topic for future research. In this work, we aim to propose a system that provides an equivalent va lue transfer functionality as other traditional blockchain systems, e.g., Bitcoin. Hence, we have the following definition for a valid VCB. Definition 1 (Valid VCB). Firstly, we give the following properties. – Ownership: The owner of a value vjis able to validate the value and prove it to others, i.e., if O(vj,Bi) =x, then node xwill eventually have P(vj,Bi). Moreover, the ownership can only be transferred by the owner . – Liquidity: The owner of a value can transfer it to any other node within a certain period of time, i.e., if O(vj,Bi) =x, then node xcan make O(vj,Bi+k) =yfor some k,k≥1. – Authenticity: All values have at most one owner at each state, i.e., for all vj,Bi, we have O(vj,Bi)∈ {NA,1,2,...,N}. A VCB is valid if and only if Ownership and Authenticity are gu aranteed un- der asynchronous network settings and Liquidity is guarant eed in synchronous network settings. 3.4 RVO Rules in VCBs In a VCB, the RVO rules becomes: – Rationality in Holding Value: At a state Bi, if node xis the owner of value vj, he will always make sure that he has a proof psuch that GetOwner (vj,Bi,p) =xunless he sends vjatBi. – Rationalityin SendingValue: Atastate Bk,foravalue vjthatO(vj,Bk) = x, if node xwould like to send this value, he will take responsibility of pro- viding to the receiver y: 1), the time of the transaction Bi,i > k; 2), a proofpsuch that GetOwner (vj,Bi−1,p) =xand; 3), a proof psuch that GetOwner (vj,Bi,p′) =y. – Rationality in Receiving Value: For node yto receive this transaction, it will check 1), GetOwner (vj,Bi−1,p) =x; and 2), GetOwner (vj,Bi,p′) =y. 4 VAPOR In this section, we propose a VCB, namely VAPOR, which stands for t he five basic elements of our system, Value, Agreement, Proof, Ownersh ip, and Ratio- nality. As introduced in Section 3, a valid VCB should have the following. VAPOR 7 –A main chain that guarantees Property 1. –Theownerandproofofvalue O(vj,Bi),andavalidauthenticatingschemein- cludingP(vj,Bi) for alli,jand a verification algorithm GetOwner (vj,Bi,p) as described in Subsection 3.2. Now we describe these two parts in VAPOR. Then, we prove its validity and state its features. 4.1 Main Chain and Its Consensus Algorithm There are two major types of algorithms that could achieve Proper ty 1: BFT al- gorithms and Nakamoto-like algorithms. The former includes [6,13,18,2 1] which explicitly requires the identity/public keys and the number of nodes t o be prede- termined and known by all nodes. The latter is inspired by Bitcoin and h as been greatly developed in recent years. It contains a large number of alg orithms such as Proof-of-Work based algorithms [10,16,24], Proof-of-Stake ba sed algorithms [4,12,15], Directed Acyclic Graph based algorithms [27,29,30], etc. This type of algorithms do not require nodes to be predetermined. However, ec onomical and game theoretical aspects have to be introduced to prevent Sybil attack as well as to encourage honest behaviors, and Property 1 is achieved with ov erwhelmingly high probability rather than absolute. In VAPOR, any of the existing consensus algorithms that guarante e Prop- erty1 (with ahigh probability)can be used forthe main chain B={B1,B2,...}. Then,VAPORhasthesamerequirementsastheconsensusalgorith mandachieve the same level of security. For instance, if PBFT [6] is chosen, the n VAPOR al- lows less than 1/3 of the predetermined nodes to be malicious. Then, if Bitcoin POW is chosen, then VAPOR tolerates less than 1/4 of the total minin g power to be malicious [11] and the confirmation of the transactions is proba bilistic. 4.2 Proofs and the Verification Algorithm The main content of VAPOR is transactions. The proofs of the owne rship of values are just different subsets of the whole transaction set. He re, we first in- troduce the data structure of the transactions, then introduc e how the proof is chosen for each value. Transaction Blocks In VAPOR, each node independently makes transaction blocks with the transacitons sent by itself. A transaction txm(vj,x→y) is defined as txm(vj,x→y) = [vj,y,sn], in which snis an internal serial number generated by node xto identify his transactions. Since transactions are then put in blocks with index o fx,xis omitted in individual transactions. Note that here mis a virtual global trans- action identifier we used in this paper and it does not actually acknowle dged 8 Z. Ren and Z. Erkin by any node. Periodically, a node puts transactions in a transaction blockband send an abstract, a(x) = [x,H(pkx),Sigx(x|H(pkx)|MR(b))], to reach consensus on the main chain, where H(pkx) is the hash of the public key ofxandSigx(H(pkx)|MR(b)) is a digital signature made with H(pkx) concatenated with the Merkle root of bencrypted by the private key of x. In each round, at most one abstract from a node can be included in the main chain. Ifmultiple differentabstractsfromthesamenodearereceivedin th esameround, then only one of them is considered valid. By the property of digital s ignature, the content of bis immutable once the abstract a(x) is confirmed on the main chain. Hence, we denote the abstract a(x) contained in block Bibyai(x) and the block bbybi(x) and call it a confirmed block. Then, as Bis agreed by all nodes, blocks bi(x),∀xwill also form a chain that as immutable as B. Then, we defineCB={bi(x),∀i,x}. Transaction Fee for Abstracts In our system, instead of individual transac- tions, the consensus is only reached on the abstracts. Then, for many consensus algorithms, a transaction fee should be provided to the block propo sers, namely the miners, for them to include the abstract. The amount of the tr ansaction fee should not be fixed so that a market can be created between th e nodes and the miners. It can be achieved by introducing a new type of transac tions in which the receiver is the miner, i.e., in a transaction block bi(x), nodexcould create transactions in form of txm(vj,x→[miner]) = [vj,x,[miner],sn], where [miner] is a variable that equals to the proposer of the block Bi. A non-trivial problem for the transaction fee is that the sender of this transac tion does not know the receiver in advance, which hinders him from sending the pro of to the receiver. Hence, in the scope of this paper, the transaction fees are only feasible if the main chain uses BFT algorithms or algorithms that the block prop oser is determined before the block, e.g., [10,12,15]. Then, the sender will give the proof of this transaction to the corresponding node so that the a bstract would be included. Value Ownership and Proof Firstly, we define the ownership of values as the following. Definition 2 (Value Ownership). –The initial value ownership is agreed on the main chain, eith er by the initial value distribution in B1or value creation in Bk,k≥1. –We assume that node xstarted owning a value vjatBi′. Then, he will transit the ownership of this value to node yif he makes a transaction in a confirmed blockbi(x)and has not make any transaction of this value in any confirmed blocksbk(x),k∈[i′+1,i−1]. VAPOR 9 –If there are more than one transaction of the same value in one transaction block, it is a clear sign of an attempt of double spending. Hen ce, we forbid this by stating that if a value is transacted more than once by its owner in a confirmed block, then the owner of that value is NA. Then, we define the proof P(vj,Bi) as a subset of CB, which is essentially all confirmed transaction blocks that are considered in the second item of Def- inition 2, as well as all necessary public keys to verify them. The algor ithm Proof(vj,Bi,CB) can be used to get the proof P(vj,Bi), which is given in Ap- pendix A. Verification Algorithm Further, as defined in Subsection 3.2, a verification algorithm in a VCB should be able to determine the ownership when the p roof is given and output “Fail” if any input other than the correct proof is given. In Algorithm 1, we propose GetOwner (vj,Bi,p) that outputs O(vj,Bi) ifp= P(vj,Bi) and outputs ‘Fail’ for p/ne}ationslash=P(vj,Bi). Algorithm 1 Verification Algorithm GetOwner (vj,Bi,p) Get the block of initial distribution (creation) of value vjin the main chain: Bindex Setowneraccording to the initial distribution from the main chain. index++; whileaindex(owner) exists in Bindexdo ifbindex(owner) or the public key of ownerdoes not exist in pthen return Fail; ifMerkle root and signature do not match then return Fail; count←number of transactions of vjinbindex(owner); ifcount= 0then index++; else ifcount= 1then index++; owner←the receiver of the transaction of vj; else return Fail; ifindex> ithen ifAll data in pare blocks and all blocks have been checked then return owner; else return Fail; Thevalidityof GetOwner (vj,Bi,p)asanverificationalgorithmcouldbeeasily shown. First, it uses the same method as the second item in Definition 1 to check whether pconsists of the exact transaction blocks as P(vj,Bi) and any mismatch returns ‘Fail’. Then, since the algorithm use exactly the sam e rules as the definition of ownership to determined the owner, it returns O(vj,Bi) if p=P(vj,Bi). 10 Z. Ren and Z. Erkin 4.3 Validity of VAPOR Here,weprovethat VAPORisavalidVCB underRVOrulesandthe cons istency of the system is uncompromised even if RVO rules do not hold. Theorem 1. In VAPOR,the properties of a valid VCB will hold in the follow ing conditions. Properties Ownership Liquidity Authenticity Conditions RVO rules Synchrony — Due to space limitation, we only give an outline of the proof and provide the full proof in Appendix B. The Ownership could be proved by induction: for each owner of the value, he is always able to receive the proof of the value from a rational previous owner. Moreover, only the owner can transfer the value since the transaction only happens when the block is confirmed. The Liquid ity follows from the Synchronous Liveness property of the main chain. Then, the Authen- ticity follows from the Asynchronous Consistency of the main chain, which also guarantees the consistency of all confirmed transaction blocks. Then, Authen- ticity is proved as at each state, the values, owners, and proofs a re based on the confirmed transactions blocks in a deterministic and one-to-one ma pped fashion. The holding condition of each property in Theorem 1 provides a good in - sight on VAPOR and its differences from traditional blockchains. Firs t, even if RVO rules do not hold, e.g., a sender refuses to send the proof to th e receiver, it only causes a fail to prove the ownership of this exact value. The Liq uidity and Authenticity of the system are not violated and other values are no t corrupted. Second, the Ownership does not depend on synchrony. Hence, if a value is trans- ferred and the network lose synchrony for Liquidity, the proof of the value could still be delivered to the receiver if the sender is rational. 4.4 Features of VAPOR The most distinctive feature of VAPOR is that each node only needs t o acquire and keep the proofs of the values that it owns, i.e., at a state Bi, nodexonly needs to have P(vj,Bi),∀O(vj,Bi) =x. To efficiently record the proofs, we propose the following implementation: –The main chain is stored and updated according to the consensus alg orithm. –A node keeps a transaction block database of for all confirmed tra nsaction blocks that he has. –A node keeps a value ownership table that updates with the main chain and keeps track of the values, their owners, and the proofs that he k nows, which includes his own values. The proofs are simply pointers to the transa ction block database. VAPOR 11 Comparing to TCBs and ACBs, a transaction of multiple values need to be recorded as multiple transactions in VAPOR. However, for all these transactions plus all transactions included in the same transaction block, only one signature is required in VAPOR, which is in fact more efficient in storage. The comm u- nication is also efficient as transaction blocks are acquired directly fr om the sender of the value with point-to-point communication and guarant eed security under the RVO rules. Moreover, the receivers could inform the sen der about the transaction blocks that it already has to avoid overhead. Then, as a trade-off between storage and communication, a node can choose to not dele te the proofs of the already spent values. This means that they do not need to re -acquire some transaction blocks for future received values. 5 Extending VAPOR by Modifying the Verification Algorithm In Section 4, we introduced how transactions could be verified with t he verifica- tion algorithm GetOwner with the proof P(vj,Bi). In this section, we show the flexibility of this framework by providing examples of extended funct ionalities. More precisely, we will show that the functionalities of value division, f ast off- chain transactions, and value-related smart contracts can be ea sily achieved by simple modifications to the verification algorithms. 5.1 Value Division The functionality of value division can be achieved with a new type of tr ansac- tions called value division that has the form: [Divide:vsource→(vsource,1,Q(vsource,1)),...,(vsource,n,Q(vsource,n)). The index sourceforms a chain that can be traced back to the origin. Then, to validate a value divided from another value, we simply call GetOwner to check the owner of each value on the chain recursively from the origin. This new type of transactions can either be added by making modifications to GetOwner or defining another algorithm GetOwnerDV on the main chain that recursively calls GetOwner . We describe GetOwnerDV in Appendix C. 5.2 Fast Off-chain Payment In VAPOR, the confirmation of the transaction is dependent on the main chain, thus it essentially has the same latency as traditional blockchains. H owever, a fast off-chain payment solution like LN or Plasma [25,26] can also be de ployed in VAPOR. Brieflyspeaking,an off-chainpaymentscheme worksasfollo ws.Firstly, somevalue is lockedon the main chainasthe deposit forthe “fast pay mentchan- nel” to a particular receiver. Then, transactions can be made to th at receiver without confirmations on the main chain. The safety of the transac tions are 12 Z. Ren and Z. Erkin guaranteed by a mechanism for the receiver to take all deposit whe n the sender tries to cancel a transaction. However, this mechanism requires s ynchrony be- tween the receiver and the main chain. Then, there is a mechanism allo wing the sender to safely shut the off-chain payment channel at any time. In VAPOR, similar ideas can be implemented under the same synchrony assumption. A node can independently lock its values for a receiver a nd then makes off-chain transactions by signing them and sending signed tra nsactions to the receivers as proofs. Then, the verification scheme should be m odified to be ableto verifythese proofs.Thedetail ofthis schemewill be givenin A ppendix D. 5.3 Smart Contracts In the previous subsections, it is revealed that additional function alities can be easily achieved by changing the rules for verification, which is merely a mod- ification to GetOwner , or agreeing on new verification algorithms on the main chain. In fact, as long as values are transferred and there are int erested parties following RVO rules, smart contracts can be written in VAPOR as new v erifica- tion algorithms with one principle: only data that is against the value ow ners’ interest is required to be put on the main chain and other data can be safely moved off-chain to the corresponding value owners. We give an exam ple of such smart contracts, a betting game, in Appendix E. 6 Advantages of VAPOR It has been shown that in VAPOR, nodes do not necessarily need to r ecord the whole transaction set to allow secure value transfer. This fund amental dif- ference from traditional blockchains leads to the advantageous in throughput, decentralization, and flexibility. 6.1 Throughput The most straightforwardadvantageofVAPOR is the throughput becausenodes only need to acquire the proofs of their own values instead of the wh ole trans- action set, as stated in Subsection 4.4. However, this improvement is not trivial to quantify as it depends heavily on the networks and the transact ion patterns. Here, we theoretically analyze the throughput in terms of the tran saction cost C, defined as a combination of the expected bandwidth, computation , and stor- age resources required to communicate, validate, and store a tra nsaction in the whole network. Unlike traditional blockchains, the cost of an individual transaction in VA- POR is determined by the proof size, which is situational. Hence, we ca lculate Cby looking at the expected transaction blocks in a round that a node even- tually needs to acquire, which we denote by b. Then, we have C=O(b) since a transaction will be eventually acquired by bnodes on average. Let us consider a transaction block bi(x). It will eventually be acquired by node yif nodexholds VAPOR 13 a value at state Biand at a state Bj,j > inodeyreceives that value. In other words, for the set of values Vi(x) holding by node xat stateBi, if all other nodes will receive a value from Vi(x) sometime in the future, then VAPOR have no throughput gain over traditional blockchains. In all other cases, as long as there exists some nodes that will never acquire any value in Vi(x), then we have b < N and VAPOR has a throughput benefit. In [28], a concept of spontaneous sharding is proposed, which roug hly works as the following. When performing a transaction, a rational node will choose the value with the least transaction blocks to transmit among all values t hat he has. In other words, they tends to use the values for which the most pa rt of the proof is already known and validated by the receiver, e.g., the value that on ce owned by the receiver. As a result, some values will only cycle in a part of the network, namely a shard, instead of the whole network. Then, a node holding gvalues is equivalent to participating in gshards and bwill then equal to the expected size of the union of these shards. Then, it is shown in [28] that in many sce narios, we have C=O(b) =o(N), i.e., the throughput will scale out. Note that any group of frequent transacting nodes can decide to perform this o ptimization at any time to gain the throughput benefit, regardless of the rest of the network. Hence, since spontaneous sharding gives direct benefit to individua ls even if other nodes refuse to cooperate, the “the tragedy of the comm ons” [14] problem will not occur. We refer the readers to [28, Remark 2] for more disc ussion. 6.2 Decentralization In Section 1, we address the centralization problem due to the high p articipation threshold. In VAPOR, this problem is significantly mitigated due to the value centric principle: nodes only transmit and store the data needed fo r validation of their own values, which is mostly not the whole transaction set. For e xample, in traditional blockchains,for nodes who only own a few coins in a blockc hain, they still have to acquire and validate the whole chain to validate their own v alues and make transactions. In VAPOR, their cost of validating their own values and making transactions is O(1). 6.3 Flexibility As shown in Section 5, VAPOR enjoys benefits of easy modification, e xtension, and upgrading by simply agreeing on new verification algorithms on the main chain. However, this can be pushed one step further by allowing nod es to in- dividually choose the algorithms that they like to use. Then, hard for ks like Bitcoin/Bitcoin Cash or Ethereum/Ethereum Classic can be avoided. Instead, the forks will be “hidden” as some values might not be validated by som e users as they disagree with a certain rules. However, they could still agre e with the main chain and contribute to the security of the entire system. We c onsider this as an advantage of flexibility, as nodes are more freely to agree/dis agree with each other, without destroying the consistency of the whole syst em as long as they have the basic agreement. 14 Z. Ren and Z. Erkin 7 Related Works This work is mainly inspired and developed from [28]. However, it does ha s similarities to other studies if we view VAPOR in different perspectives. We explain the similarities and relationsof this work and other worksin this section. 7.1 Value Centric Principle The origin of describing value transfer systems by values (or altern atively called coins, notes, bills) can be dated back to some pioneering digital cash works like [7,8,23]. However, in these schemes, the notions of value and transa ction are interchangeable as a central authority is required to validate each transaction. Hence, Bitcoin, as well as most of its successors known as alt-coins , use TCBs that focus on the validity of individual transactions rather than th e value. The main difference from TCBs and VCBs can be clarified using the example o f the Simple-Payment-Verification (SPV) nodes in Bitcoin. SPV nodes could verify whether all related transactions of a value are validated by the mine rs and are on-chain, but they could not validate the authenticity of this value, i.e., could not detect double-spending. Chainspace [2] is a blockchain with sharding that uses a similar value-ce ntric idea for inter-shard transactions, i.e., each transaction should inc lude a “Trace” pointing back to the source of the value, so that the validators fro m the value- receiving shard only need to check the shards of the sources to pr event double spending. However, it has more redundancy as the value-centric id ea is used in a shard level instead of the node level, and thus has less throughput improvement comparing to VAPOR. 7.2 Off-Chain and DAG Techniques In the perspective of data structure, VAPOR has its similarities to m any off- chain systems like RSK [19] as data is stored off-chain and a main chain is used for the hash of the data. However, most off-chain systems c ompromise in decentralization as some trusted nodes are required to validate th e contents of the off-chain data. Also, comparing to the off-chain payment schem es like LN and Plasma [25,26], VAPOR essentially moves all proofs for values off-c hain. As a result, it is no longer necessary to use deposits to enforcing the c onsistency of the off-chain and on-chain values. Then, it is also similar to Hashgra ph [3] in the sense that node individually create their own transactions. Ho wever, in Hashgraph, all nodes eventually need the whole transaction set. 7.3 Sharding Recently, many sharding schemes have been proposed to divide the network into small shards. Then, the transactions in a shard do not need to be c ommunicated outsidetheshard.However,akeyproblemisthatthedoublespend ingprevention VAPOR 15 of inter-shard transactions relies on the security of shards inste ad of the whole network, which is a degradation in the security. Shards can be eithe r determined artificiallyby the networktopology[5] or at random[17,20], ordeter mined based on applications or users [1,2], to reduce the number of inter-shard transactions as well as the probability of malicious shards. However, our system g uarantees no degradationon securitysince essentially,the shardsarespont aneouslyformed by the value transfer patterns. In other words, all shards are s ecure for their own intra-shard transactions and there will be no inter-shard transa ctions. 7.4 Performance Comparison It is difficult to make fair throughput comparison between VAPOR and other systemsusingauniformstandard,e.g.,transactionpersecond(T PS),asschemes have different security assumptions and the throughput also depe nds on the net- work settings. Therefore, we use a theoretical approach to ana lyze and compare the throughput and security of VAPOR with a typical system of eac h kind, i.e., LN for off-chain schemes, PHANTOM for DAG, and Omniledger for sha rding schemes. We consider the transaction cost C(defined in Subsection 6.1) and the security Sof a transaction, which is defined as the amount of compromised nodes (corresponding resources for POW or POS) required to per form a double- spending attack. We present the results in Table 1. Schemes VAPOR LN PHANTOM Omniledger C O(b) O(1) O(N) O(d) S O(N)O(1) orO(N)O(N) o(N) Table 1. The cost and security of a transaction in VAPOR, LN, PHANTOM, and Omniledger for the whole network. Here bis the average transaction blocks of each state acquired by a node and dis size of the shard. The cost and security of VAPOR are given in Subsection 6.1 and Subse c- tion 4.3, respectively. For LN, note that this transaction is differen t from classi- cal notion of transactions as it relies on a deposit and the value would be locked until the channel is shut down. The security relies on the synchron y between the receiver and the system (explained in Appendix D), thus would be com promised if either one is compromised. PHANTOM uses a block DAG structure to remove the dependency of security on the throughput of a chain-struct ure blockchain. However, all nodes still need to eventually acquire all transactions and the sys- tem will not scale out. Omniledger reduces the cost to O(d) wheredis the shard size and promises a throughput benefit that is proportional to N/d. However, as Omniledger yields a random approach to keep the malicious nodes within each shard to be below 1/3, the security of the system becomes a non-t rivial function ofdandN, which is dominated by Nbut not explicitly stated in [17]. 16 Z. Ren and Z. Erkin 8 Conclusion In this paper, we address and formalize the fundamentals of a value -transfer sys- tem and the rationalityassumptions. The highlight of this workis that we clarify the redundancy in traditional blockchains for value-transfer and how this redun- dancy can be removed by using the rationality assumptions and VCBs . We hope that this work would set a theoretical framework for future block chain designs and inspire many theoretical studies on other basic concepts in bloc kchains, e.g., the rational assumptions in non-value-transfer blockchains. References 1. Rchain https://www.rchain.coop/platform 2. Al-Bassam, M., Sonnino, A., Bano, S., Hrycyszyn, D., Dane zis, G.: Chainspace: A sharded smart contracts platform. CoRR abs/1708.03778 (2017), http://arxiv.org/abs/1708.03778 3. Baird, L.: The swirld hashgraph consensus algorithm: Fai r, fast, byzantine fault tolerance(2016), http://www.swirlds.com/downloads/SWIRLDS-TR-2016-01 .pdf 4. Bentov, I., Pass, R., Shi, E.: Snow white: Provably secure proofs of stake. IACR Cryptology ePrint Archive 2016, 919 (2016) 5. Buterin, V.: On sharding blockchains. Sharding FAQ (2017 ), https://github.com/ethereum/wiki/wiki/Sharding-FAQ 6. Castro, M., Liskov, B.: Practical byzantine fault tolera nce. In: OSDI. vol. 99, pp. 173–186 (1999) 7. Chaum, D.: Blind signatures for untraceable payments. In : Advances in cryptology. pp. 199–203. Springer (1983) 8. Chaum, D., Fiat, A., Naor, M.: Untraceable electronic cas h. In: Conference on the Theory and Application of Cryptography. pp. 319–327. Sprin ger (1988) 9. Croman, K., Decker, C., Eyal, I., Gencer, A.E., Juels, A., Kosba, A., Miller, A., Saxena, P., Shi, E., Sirer, E.G., et al.: On scaling decentra lized blockchains. In: International Conference on Financial Cryptography and Da ta Security. pp. 106– 125. Springer (2016) 10. Eyal, I., Gencer, A.E., Sirer, E.G., Van Renesse, R.: Bit coin-NG: A scalable blockchain protocol. In: 13th USENIX Symposium on Networke d Systems Design and Implementation (NSDI 16). pp. 45–59. USENIX Associatio n (2016) 11. Eyal, I., Sirer, E.G.: Majority is not enough: Bitcoin mi ning is vulnerable. In: International Conference on Financial Cryptography and Da ta Security. pp. 436– 454. Springer (2014) 12. Gilad, Y., Hemo, R., Micali, S., Vlachos, G., Zeldovich, N.: Algorand: Scaling byzantine agreements for cryptocurrencies. In: Proceedin gs of the 26th Symposium on Operating Systems Principles. pp. 51–68. ACM (2017) 13. Guerraoui, R., Kneˇ zevi´ c, N., Qu´ ema, V., Vukoli´ c, M. : The next 700 BFT protocols. In:Proceedings ofthe5th European conference on Computers ystems. pp.363–376. ACM (2010) 14. Hardin, G.: The tragedy of the commons. Journal of Natura l Resources Policy Research 1(3), 243–253 (2009) 15. Kiayias, A., Russell, A., David, B., Oliynykov, R.: Ouro boros: A provably secure proof-of-stake blockchain protocol. In: Annual Internati onal Cryptology Confer- ence. pp. 357–388. Springer (2017) VAPOR 17 16. Kokoris-Kogias, E., Jovanovic, P., Gailly, N., Khoffi, I. , Gasser, L., Ford, B.: En- hancing bitcoin security and performance with strong consi stency via collective signing. CoRR abs/1602.06997 (2016),http://arxiv.org/abs/1602.06997 17. Kokoris-Kogias, E., Jovanovic, P., Gasser, L., Gailly, N., Ford, B.: Omniledger: A secure, scale-out, decentralized ledger. IACR Cryptolog y ePrint Archive https://eprint.iacr.org/2017/406.pdf 18. Kotla, R., Alvisi, L., Dahlin, M., Clement, A., Wong, E.: Zyzzyva: speculative byzantine fault tolerance. In: ACM SIGOPS Operating System s Review. vol. 41, pp. 45–58. ACM (2007) 19. Lerner, S.D.: Rsk: Bitcoin powered smart contracts (201 5), https://uploads.strikinglycdn.com/files/90847694-70 f0-4668-ba7f-dd0c6b0b00a1/RootstockWhitePaperv9-Ove rview.pdf 20. Luu, L., Narayanan, V., Zheng, C., Baweja, K., Gilbert, S ., Saxena, P.: A secure sharding protocol for open blockchains. In: Proceedings of the 2016 ACM SIGSAC Conference onComputer andCommunications Security.pp.17 –30. CCS ’16, ACM, New York, NY, USA (2016). https://doi.org/10.1145/297674 9.2978389 21. Miller, A., Xia, Y., Croman, K., Shi, E., Song, D.: The hon ey badger of BFT protocols. In: Proceedings of the 2016 ACM SIGSAC Conferenc e on Computer and Communications Security. pp. 31–42. ACM (2016) 22. Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash s ystem (2008), https://bitcoin.org/bitcoin.pdf 23. Okamoto, T., Ohta, K.: Universal electronic cash. In: An nual international cryp- tology conference. pp. 324–337. Springer (1991) 24. Pass, R.,Shi,E.: Hybridconsensus: Efficientconsensus i nthepermissionless model. IACR Cryptology ePrint Archive (2016), http://eprint.iacr.org/2016/917.pdf 25. Poon, J., Buterin, V.: Plasma: Scalable autonomous smar t contracts (2017), https://plasma.io/plasma.pdf 26. Poon, J., Dryja, T.: The bitcoin lightning network: Scal able off-chain instant payments. Technical Report (draft) (2015 ), https://lightning.network/lightning-network-paper.p df 27. Popov, S.: The tangle (2014), https://iota.org/IOTA_Whitepaper.pdf 28. Ren, Z., Erkin, Z.: A scale-out blockchain for value tran sfer with spontaneous sharding. CoRR abs/1801.02531 (2018),http://arxiv.org/abs/1801.02531 29. Sompolinsky, Y., Zohar, A.: Phantom: A scalable blockda g protocol (2018) 30. Sompolinsky, Y., Zohar, A.: Secure high-rate transacti on processing in bitcoin. In: International Conference on Financial Cryptography an d Data Security. pp. 507–527. Springer (2015) 31. Vukoli´ c, M.: The quest for scalable blockchain fabric: Proof-of-work vs. bft repli- cation. In: International Workshop on Open Problems in Netw ork Security. pp. 112–125. Springer (2015) 32. Wood, G.: Ethereum: A secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper 151(2014),http://gavwood.com/paper.pdf A Algorithm Proof(vj,Bi,CB) We define the proof of the ownership P(vj,Bi) as a subset of CBthat output by an algorithm Proof(vj,Bi,CB) shown in Algorithm 2. 18 Z. Ren and Z. Erkin Algorithm 2 Proof(vj,Bi,CB) Get the block of initial distribution (creation) of value vjin the main chain: Bindex Setowneraccording to the initial distribution from the main chain. index++ Proof={} whileaindex(owner) exists in Bindexdo ifMerkle root and signature do not match then return Proof Addbindex(owner) and the public key of ownertoProof count←number of transactions of vjinbindex(owner) ifcount= 0then index++ else ifcount= 1then index++ owner←the receiver of the transaction of vj. else return Proof ifindex> ithen return Proof B Proof for Theorem 1 Proof.Firstly, we prove Ownership by induction. It is clear that the first ow ner of any value vjwill have the proof of this value, which are basically all of his public key and his own confirmed transaction blocks until the block be fore the one that spends it. Then, assume that the t-th owner of vj, denoted by ot, has the proof P(vj,Bk) proving the ownership O(vj,Bk) =otat state Bk. Then, assume that the t+1-th owner, ot+1starts to own the value at state Bi, i.e.,O(vj,Bi−1) =ot,O(vj,Bi) =ot+1. Then, by the definition of proof, there exists a transaction in bi(ot) that send the value to ot+1. By the Rationality of Holding Value in RVO, otwould not make this transaction unless he would like to send this value. Then, by the Rationality of Sending Value in RVO, otwill take responsibility of giving proof P(vj,Bi) toot+1. Again, by the definition of proof,P(vj,Bi) is merely P(vj,Bk)∪{bl(ot) :k < l≤i}∪{public key of ot}, which can be independently provided by ot. Hence, we prove that in this case ot+1will eventually has the proof P(vj,Bi). Furthermore, it is clear that only the owner of a value could transfer it as a transaction must be includ ed in a block confirmed with the private key of the owner. Then, we prove Liquidity. To transact a value, the owner simply need s to put a transaction in a confirmed transaction block. Then the prope rty (Partial) Synchronous Liveness in Property 1 guarantees that the transa ction block can be confirmed as the abstract will be included in the main chain. At last, we prove Authenticity. This is actually guaranteed by the de sign of VAPOR. Firstly, the initial ownership of a value is unambiguous becaus e it is on the main chain which has Asynchronous Consistency in Property 1 . Then, the ownership transition is always determined by a confirmed block wh ich is immutable. Then, there are three possibilities for the number of tra nsactions of the same value in a confirmed block: 1) if there is no transactions of t hat value, VAPOR 19 then the ownership remains unchanged; 2) if there is one transact ion of that value, then the ownership is changed to the receiver; 3) if there ar e more than one transactions of that value, then the ownership becomes NA. Since all three possibilities result in unambiguous ownership, we proved Authenticity ./squaresolid C Verification Algorithm for Value Division GetOwnerDV Here we introduce GetOwnerDV in Algorithm 3. Note that in here, a minor mod- ification should be made on GetOwner so that the result will not be ‘Fail’ if redundant elements are detected in p. Algorithm 3 Verification Algorithmfor Divided Value GetOwnerDV (v[seq],Bi,p) Find all value division transactions and their correspondi ng states in p. Order the states by [ s1,s2,...]; j←the first entry of [ seq]; t←1; whilet≤the length of seq.do owner=GetOwner (vj,Bs1,p); Check if the corresponding value division transaction is in bst(owner) and the sum of the amount of the divided value equals to the amount of t he source value. Return ‘Fail’ if the check fails. t++,j= [j,next element in seq]; ifAll blocks in pare checked then return owner else return Fail D Off-chain Payment Scheme Our fast payment scheme contains two new type of transactions, two new types of message to the main chain, and a new verification algorithm GetOwnerFP . If nodexwants to make fast payment to node y, he simply performs the following: –Nodexmakes deposit transactions to lock up a number of values with in- dications that they could only be send to y, confirm the blocks, and send them to node yto initialize the fast payment. –When a fast payment of value vjis issued, node xsends a signed transaction ofvjto nodey, denoted by tx. Then, node ycan include this transaction in his own blocks at any time and confirm them to receive the value. –When node xwants to end the fast payment and unlock a value vk, he sends an unlock message to the main chain. –The unlock will succeed in Trounds if no objection message shows in the main chain. An objection message can be made by any node by sending tx to the main chain. 20 Z. Ren and Z. Erkin Then, in GetOwnerFP we define three new rules on checking the proofs for own- ership: 1. A value vjlocked by node xis no longer considered as owned by x, butNA indicating no owner. It will be reconsidered as owned by xif there is only one unlock message is on the main chain, assume that it is included in Bi, and there is no objection message included in Bk,i+1≤k≤i+T. 2. A value vjis transacted from node xto node yin state Biif it is locked by node xto send to node yat a state Bi′,i′< i, and there is a signed transaction by xincluded in block bi(y). There should not be a unlocking message for this value on the main chain that is not responded for mo re than Tblocks. Note that although a fast transaction is only confirmed when the blo ck is con- firmed, the transaction itself is completed as soon as the signed tra nsaction is received by node y, since node ycan then independently make the proof of him owning this value. Some drawbacks in existing off-chain payment schemes, e.g., LN, are : 1), the values in the transactions and deposit will be locked until the cha nnel is closed. Hence, it is a different type of transaction and can only be co nsidered as a supplement to the value transfer system. 2), the receiver shou ld have a certain synchrony, i.e., the receiver should be able to issue a transaction to the chain to take the deposit before it is refunded to the sender when he catch es the sender cheating. 3), the security of this scheme is not formally proved. A b ig advantage of the off-chain payment scheme in VAPOR is that node ycan spend vjas soon ashe ownsit, without requiringshutting downthe wholechannel, i.e., a ll deposit values been spend or unlocked. Moreover, we could use similar argum ents as the proofin Subsection 4.3 to provethe Ownershipproperty holds when the network is synchronous and the RVO rules apply. E Betting Game Here, we give a smart contract for on-chain betting. Node xand node ywould like to bet even or odd on the hash of block Bi. Then, we simply add a new type of transaction which is Bet: [vj,x,y,B i,sn]. The bet transaction will lock the value vjuntilBiwith one unlocking condition: another value with the same amount is bet by ybeforeBiwithxand the ownership will depend on the hash ofBi. Then, the verification algorithm is simply checking the lock transact ion, the ownership for both values, and the hash of Bi, i.e., if node xbet on even, then the ownership of both locked values will be node xat stateBiif the hash ofBiis even. However,the difficulty is to make sure that both node xand node ycould get the proofs of ownership and the locking message for both values. T his is a prob- lem since there is always one node in the betting would benefit from not sharing the proof and/or the locking message, which will cause a scenario sim ilar to Two Generals Problem. As a result, the verification algorithm must also ch eck for a VAPOR 21 confirmation send by one node on the main chain, which shows the agr eement for both nodes that both proofs are acquired. Without such confi rmation, the value will be unlocked at state Bito its original owner.
{ "id": "1810.12596" }
2105.10464
Pravuil: Global Consensus for a United World
Pravuil is a robust, secure, and scalable consensus protocol for a permissionless blockchain suitable for deployment in an adversarial environment such as the Internet. Pravuil circumvents previous shortcomings of other blockchains: - Bitcoin's limited adoption problem: as transaction demand grows, payment confirmation times grow much lower than other PoW blockchains - higher transaction security at a lower cost - more decentralisation than other permissionless blockchains - impossibility of full decentralisation and the blockchain scalability trilemma: decentralisation, scalability, and security can be achieved simultaneously - Sybil-resistance for free implementing the social optimum - Pravuil goes beyond the economic limits of Bitcoin or other PoW/PoS blockchains, leading to a more valuable and stable crypto-currency
http://arxiv.org/pdf/2105.10464v1
David Cerezo Sánchez
cs.CR, cs.DC, econ.GN, q-fin.EC
cs.CR
Pravuil: Global Consensus for a United World David Cerezo Sánchez david@calctopia.com 24th May 2021 Abstract Pravuil1is a robust, secure, and scalable consensus protocol for a permissionless blockchain suitable for deployment in an adversarial envi- ronment such as the Internet. Pravuil circumvents previous shortcomings of other blockchains: - Bitcoin’s limited adoption problem: as transaction demand grows, payment confirmation times grow much lower than other PoW blockchains - higher transaction security at a lower cost - more decentralisation than other permissionless blockchains - impossibility of full decentralisation and the blockchain scalability trilemma: decentralisation, scalability, and security can be achieved simul- taneously - Sybil-resistance for free implementing the social optimum - Pravuil goes beyond the economic limits of Bitcoin or other PoW/PoS blockchains, leading to a more valuable and stable crypto-currency Keywords : consensus, permissionless, permissioned, scalability, zero- knowledge, mutual attestation, zk-PoI 1 Introduction Athirdgenerationofblockchainshasbeendevelopedfeaturingthelatestadvances in cryptography and sharding to reach maximum performance and security in Internet settings: they usually make use of advances in BFT-like consensus protocols [ GK18,LLS+21] and collective signatures[ RGK19] to obtain 1000s of transactions per second. In this work, we introduce Pravuil 1, a robust, secure, and scalable consensus protocol for real-world deployments on open, permissionless environments that, unlike other proposals, remains robust to high adversarial power and adaptation while considering rational participants and providing strong consistency (i.e., no forks, forward-security, and instant transactions). Our protocol is also the 1In the Book of the Secrets of Enoch[ Pla26], an archangel “swifter in wisdom than the other archangels”, scribe and recordkeeper. 1arXiv:2105.10464v1 [cs.CR] 21 May 2021 first to integrate real-world identity on layer 1 as required by current financial regulations, obtaining Sybil-resistance for free: a very useful property considering the electrical waste produced by Bitcoin, its Achilles’ heel that this blockchain circumvents for the first time by obviating to pay the Price of Crypto-Anarchy [Cer19]. To achieve the desired goals, we introduce a new consensus protocol in which we prioritise robustness against attackers and censorship-resistance. We then incorporate zero-knowledge Proof-of-Identity [ Cer19] while maintaining an open, permissionless node membership mechanism enabling high levels of decentralisation. Finally, we will show a working system of the proposed design in an open-sourced Testnet at https://github.com/Calctopia-OpenSource. 1.1 Contributions In summary, we make the following contributions: •we propose a consensus protocol that remains robust, secure, and scalable among rational participants in an Internet setting •we prove liveness, safety, and censorship-resistance of our new consensus protocol •we discuss the underlying rationale of our design and prove all the advan- tages that it provides over previous blockchain designs •we provide an open-source implementation running on a Testnet 2 Related Literature Previous blockchain designs [ GK18,RGK19,BMC+15,LLS+21] deal with the different trade-offs of the scalability trilemma (security vs. scalability vs. decen- tralisation) and they don’t usually concern with the economic consequences of their design (e.g., the Price of Crypto-Anarchy) or the legal consequences of the lack of real-world identity as required by recent legislation (FATF’s Travel Rule). Previous designs of ByzCoin/OmniLedger/MOTOR ([ KKJG+16,KKJG+17, KK19]) proposed Proof-of-Work(PoW) as a Sybil-resistance mechanism: al- though their consensus protocol is more advanced and performant than Bitcoin, they would still pay for the Price of Crypto-Anarchy [ Cer19]. And although other blockchains (e.g., [ DGK+20]) provide methods to anonymise real-world identities, they fail to incorporate these privacy techniques on their consensus protocol as they keep on using Proof-of-Stake as a Sybil-resistance mechanism, thus they still pay the Price of Crypto-Anarchy [ Cer19], suffer from Bitcoin’s limited adoption problem [ HJS19] and exist within the same economic limits [Bud18]. 2 Bitcoin ByzCoin/MOTOR Pravuil Secure    Decentralised    Scalability 4   Real-world Identity 4 4  Free Sybil-resistance 4 4  Lawfulness 4 4  Unlimited adoption 4 4  No economic limitations 4 4  3 Background and Model 3.1 Prior Work Pravuil builds over ByzCoin[ KKJG+16], OmniLedger[ KKJG+17], and MOTOR [KK19]: in the next section 4, we extend these protocols to address issues that prevent their deployment in an adversarial environment such as the Internet. 3.2 Assumptions In this work, we assume the following model and definitions: Definition 1. (Strongly-consistent broadcast [RC06]). A protocol for strong consistent broadcast satisfies the following conditions except with negligi- ble probability: •Termination : If a correct party strongly-consistent broadcasts mwith tagID, then all correct parties eventually strongly-consistent deliver m with tagID. •Agreement : If two correct parties PiandPjstrongly-consistent deliver mandm0with tagID, respectively, then m=m0. •Integrity : Every correct party strongly-consistent delivers at most one payloadmwith tagID. Moreover, if the sender Psis correct, then mwas previously strongly-consistent broadcast byPswith tagID. •Transferability : After a correct party has strongly-consistent delivered mwith tagID, it can generate a string MIDsuch that any correct party that has not strongly-consistent delivered message with tag IDis able tostrongly-consistent deliver some message immediately upon processing MID. •Strong unforgeability : For anyID, it is computationally infeasible to generate a value Mthat is accepted as valid by the validation algorithm for completing IDunlessn2tcorrect parties have initialised instance IDand actively participated in the protocol. 3 Definition 2. (Partial synchronous model [DDS83, DLS88]). In a par- tially synchronous network, there is a known bound and an unknown Global Stabilisation Time (GST), such that after GST, all transmissions between honest nodes arrive within time . Definition 3. (n=3f+1 [FLM86]). The proportion of malicious nodes that an adversary controls accounts for no more than 1=3of the whole shard. The rest of the nodes are rational, that is, maximisers of their transaction rewards. Definition 4. (Round-adaptive adversary [PS16]). We assume a mildly- adaptive, computationally bounded adversary that chooses which nodes to corrupt at the end of every consensus round and has control over them at the end of the next round. Definition 5. (Strong Consistency [KKJG+16]).The generation of each block is deterministic and instant, with the following features: •There is no fork in a blockchain. By running a distributed consensus algorithm, state machine replication is achieved. •Transactions are confirmed almost instantly. Whenever a transaction is written into a block, the transaction is regarded as valid. •Transactions are tamper-proof ( forward security ). Whenever a transaction is written to a blockchain, the transaction and block cannot be tampered with and the block will remain on the chain at all times. Definition 6. (BLS [BLS01] and BDN [BDN18] signatures). Boneh- Lynn-Sacham and Boneh-Drijvers-Neven signatures are assumed secure. Definition 7. (Global PKI [ICA21]). Our blockchain design assumes a global PKI, not directly for consensus purposes, but as a node-admission and Sybil-resistance mechanism[Cer19]. Definition 8. (Permissionless network [SJS+21]).In a permissionless network: •Anyone can join a node without requiring permission from any party. •Any node can join or leave at any time. •The number of participating nodes varies at any time and is unpredictable. 4 Detailed Design Pravuil builds over ByzCoin[ KKJG+16], OmniLedger[ KKJG+17], and MOTOR [KK19]: ByzCoin[ KKJG+16] envisions a Bitcoin[ Nak09] protocol that uses strongly consistent consensus, scaling with multi-cast trees and aggregate Schnorr signatures. OmniLedger[ KKJG+17]addsshardingoverByzCoin[ KKJG+16], and 4 MOTOR[ KK19] strengthens the robustness of ByzCoin[ KKJG+16] for an open, adversarial network such as the Internet. Pravuil improves over previous works by using another source of randomness, drand[DRA21a], and by incorporating zero-knowledge Proof-of-Identity[ Cer19] as a Sybil-resistance mechanism into the first layer of the consensus protocol. 4.1 Goals To sum up, Pravuil has the following goals: •Robustness : the consensus round can only be disrupted by controlling the leader node. •Scalability : the protocol performs well among hundreds of nodes ( n= 600). •Fairness : the malicious leader can only be elected with a probability equal to the percentage of malicious nodes in the system (i.e., the adversary cannot always control the leader). We detail the extensions over a previous BFT protocol such as ByzCoin/MOTOR in order to obtain an improved blockchain-consensus algorithm. 4.2 Rotating Leader View-change protocols assume a predetermined schedule of leaders, making them susceptible to adversaries that compromise the next fleaders. To prevent this attack, our blockchain uses drand[ DRA21a ]: an efficient ran- domness beacon daemon that utilises bilinear pairing-based cryptography, t-of-n distributed key generation, and threshold BLS[ BLS01] signatures to generate publicly-verifiable, unbiasable, unpredictable, highly-available, distributed ran- domness at fixed time intervals. As described in its online specification[ DRA21c], drand uses the BLS12-381 curve, the Feldman[ Fel87] Verifiable Secret Sharing protocol and the Joint Feldman protocol[ GJKR99 ] for DKG generation; using threshold BLS signatures as a source of randomness is proven secure[ GLOW20 ] according to its security model[DRA21b]. Remark 9.In this work, we inherit all the previous security theorems from ByzCoin[KKJG+16], OmniLedger[KKJG+17], and MOTOR [KK19]. Theorem 10. (Robustness / Liveness). The adversary cannot predict nor bias the leader election. Proof.The unpredictability property follows from the unforgeability of the BLS[BLS01] signing algorithm, and the unbiasability property follows from the deterministic nature of the BLS[ BLS01] signing algorithm. The leader of view v is determined by the outcomes of drand’s public service, and all the nodes can publicly-verify its election when needed. Thus, the adversary cannot predict nor bias the leader election, preventing the adversary from breaking liveness. 5 Theorem 11. (Safety / Censorship-resistance). A round-adaptive adversary cannot always control the consensus decision. Proof.As the leader election is unpredictable (theorem 10), the adversary can only hope that one of its randomly compromised nodes gets chosen. Given that 1 3d is the probability that the adversary controls dconsecutive leaders, the adversary cannot control the leader forever since lim d!11 3d= 0 thus the adversary always controls the consensus decision. 4.3 Zero-Knowledge Proof-of-Identity In a previous work, we introduced zero-knowledge Proof-of-Identity[ Cer19] for biometric passports [ ICA21] and electronic identity cards to permissionless blockchains in order to remove the inefficiencies of Sybil-resistant mechanisms such as Proof-of-Work [ Nak09] and Proof-of-Stake [ KN12]. Additionally, attacks [RMD+20,AAM21] on PoW sharded permissionless blockchains are prevented with zk-PoI: an identity will be the same on all the shards, and the attacker can’t mine new identities for different shards as it’s possible on PoW blockchains. Although some could consider the latest zero-knowledge implementations fast enough, their implementations are still too experimental for production. For the first release, we will use the SGX implementation based on mutual attestation, which works as follows (more details on the original paper [Cer19]): Figure 4.1: Simplified overview of mutual attestation protocol. 6 An approximate picture of the worldwide coverage follows: Figure 4.2: Legend: 1) National identity card is a mandatory smartcard; (2) National identity card is a voluntary smartcard; (3) No national identity card, but cryptographic identification is possible using an ePassport, driving license and/or health card; (4) Non-digital identity card. 5 Discussion In this section, we discuss the economic rationale underpinning the unique features of this blockchain design that helps it to overcome previous shortcomings and achieve an improved blockchain tailored to real-world settings according to the experiences from the last decade (e.g., Bitcoin[Nak09]). 5.1 Overcoming Bitcoin’s Limited Adoption Problem In a recent paper[ HJS19], it is shown that a PoW payments blockchain (i.e., Bitcoin) cannot simultaneously sustain a large volume of transactions and a non-negligible market share: Proposition 12. (Adoption Problem [ HJS19]). Adoption decreases as demand rises (i.e., the adoption rate of a network, c, decreases in N). Moreover, the blockchain faces limited adoption, lim N!1c= 0: Even allowing dynamic PoW supply (i.e., by relaxing PoW’s artificial supply constraint) achieves widespread adoption only at the expense of decentralisation: 7 Proposition 13. (Decentralisation implies Limited Adoption [ HJS19]). PoW blockchains necessarily face either centralisation, lim N!1supV1; or limited adoption, lim N!1c= 0: The previous propositions expose that the lack of widespread adoption constitutes an intrinsic property of PoW payments blockchains: as transaction demands grow, fees increase endogenously. Attracted by this growth, more nodes join the validation process, expanding the network size and thus protracting the consensus process and generating increased payment confirmation times: only users insensitive to wait times would transact in equilibrium, and limited adoption arises. Moreover, this limitation cannot be overcome as it’s rooted in physics (i.e., network delay). As pointed out by the previous proposition, centralised blockchains overcome the limited adoption problem: for example, permissioned blockchains that remain secure on an open, adversarial network such as the blockchain proposed in this paper, enabling lower payment confirmation times when omitting PoW’s artificial supply constraint , Proposition 14. (Lower Payment Confirmation Times [ HJS19]). For any PoW protocol, there exists a permissioned blockchain that remains secure on an open, adversarial network (i.e., Pravuil), which induces (weakly) lower payment confirmation times. Additionally, omitting PoW’s artificial supply constraint facilitates timely service even for high transaction volumes: Proposition 15. (No Limited Adoption Problem [ HJS19]). In any permissioned equilibrium, widespread adoption can be obtained, lim N!1c P= minRP  (VP);1 : 5.2 Obtaining Higher Transaction Security At A Lower Cost In another recent paper[ BH21], it is shown that permissioned blockchains have a higher level of transaction safety than a permissionless blockchain, independent of the block reward and the current exchange rate of the crypto-currency. For a PoW permissionless blockchain, let Rbe the block reward in the corresponding crypto-currency, xthe associated exchange rate to fiat currency, wthe block maturation rate (e.g., for Bitcoin, R= 6;25;x= $60:000;w= 100), fbe the probability of detecting that blocks have been replaced, and plbe the value above which transactions are not safe, pl=fwRx: 8 Note that 51% attacks are becoming more common, specially for purely finan- cial reasons [ SSVK20]. For a permissioned blockchain, let Pibe the punishment applied to each node iif it participates in an attack, 2[0;1]be the probability that nodes that participated in an attack will be punished, and Pbe the value above which transactions are not safe, P=fX i2BPi; withBbeing the set of Nnodes with the lowest Pi. Typical punishments include confiscating all the funds deposited on the blockchain and banning them from the blockchain, among others. Proposition 16. ([BH21]). A permissioned blockchain that is safe in an open, adversarial environment (i.e., Pravuil) has a higher level of maximum value for transaction safety than a PoW permissionless blockchain if X i2BPi>wRx: Even with small values of will result in higher safety for larger transactions than PoW permissionless blockchains: Proposition 17. ([BH21]). For >0and high enough Pi’s, a permissioned blockchain that is safe in an open, adversarial environment (i.e., Pravuil) is more resilient than PoW permissionless blockchains whenever X i2BPi>wRx : Ultimately, the cost of providing incentives to the validating nodes not to participate in potential attacks (i.e., validating incentives such as block rewards) will be lower for permissioned blockchains. Proposition 18. ([BH21]). Suppose that pl>0and p>0, then at equi- librium the validator incentives in the permissioned blockchain that is safe in an open, adversarial environment (i.e., Pravuil) are lower than for the PoW permissionless. According to the model of this paper, in order to increase the transaction safety, we only need to need increase: •, a probability that reflects user’s trust in the system •Pi, a penalty that could also include legal action In general, the mere existence of credible penalties Piwith positive probability  is enough for the system to remain secure, without needing to exert punishments in the case of rational attackers. Additionally, note that these parameters are not economic parameters of the system, unlike the parameters for PoW permissionless blockchains. 9 5.3 An Empirical Approach to Blockchain Design Motivated by the abstract analysis from the previous sub-section 5.2, we use the numerical comparisons between crypto-currencies from the paper [ GAR18] to compare permissionless and permissioned blockchains in practice: BTCETHBCHLTCADAUSDT Mean Popularity 12478 9 Cost 1.33 21.662.664.33 52.83(*) Consistency 1.332.331.33 23.66 1 Functionality 25224.33 2 Performance 1.331.66 22.33 3 11.88(*) Security 444443.33 3.88 Decentralisation 53.334.333.663.33 1.33 Total 14.9918.3215.3216.722.65 13.66 Performance/Cost 0.280.410.460.71.79 10.77(*) (Perf*Sec)/Cost 1.131.661.842.797.18 3.332.99(*) Security/Cost 0.85 10.921.22.39 3.331.61(*) Table 1: Permissionless blockchains. (*): p < 0.05 XRPEOSXLMTRXMIOTA Mean Popularity 35611 10 Cost 4.66 54.66 5 54.84(*) Consistency 4.33 5444.66 Functionality 1.33 51.33 53.66 Performance 4.334.66 44.66 54.53(*) Security 2.333.33 43.33 3.66 3.33 Decentralisation 12.662.333.33 2.33 Total 17.9825.6520.3225.32 24.31 Performance/Cost 3.234.662.984.66 54.10(*) (Perf*Sec)/Cost 7.5215.5111.9415.51 18.3 13.76(*) Security/Cost 1.733.332.983.33 3.66 3(*) Table 2: Permissioned blockchains. (*): p < 0.05 Using two-samples t-tests assuming unequal variances, we compare the fol- lowing means between permissionless and permissioned blockchains, remarking that they are statistically significant: •Cost: permissionless blockchains are costlier (2.83) than permissioned blockchains (4.84). Please note that a higher cost score means that the blockchain is considered to have better costs (i.e., lower costs), and the 10 ranking obtained from this cost score must be reversed to be useful in the next rankings. •Performance : permissionless blockchains are less performant (1.88) than permissioned blockchains (4.53). •Performance/Cost : permissionless blockchains show worse performance regarding cost (0.77) than permissioned blockchains (4.10). •(Performance*Security)/Cost : permissionless blockchains show worse performanceandsecurityregardingcost(2.99)thanpermissionedblockchains (13.76). •Security/Cost : permissionless blockchains show worse security regarding cost (1.61) than permissioned blockchains (3). It’s clear from the empirical data that permissionless blockchains are considered worse than permissioned blockchains when considering cost, performance and security. 5.4 Achieving More Decentralisation Than Other Permis- sionless Blockchains In yet another recent publication [ BHMB21 ], it is noticed that permissioned blockchains could achieve more decentralisation than permissionless blockchains: real-world permissionless blockchains are quite centralised [ GBE+18], as there aren’t formal checks for the underlying centralisation. In order to obtain a more decentralised permissioned blockchain that is safe in an open, adversarial network (i.e., Pravuil), the node admission/gatekeeping function must be decentralised and opened: precisely, this ideal state is achieved with our zero-knowledge Proof-of-Identity [ Cer19], as previously explained in sub-section 4.3. 11 Figure 5.1: Comparing decentralisation (from [BHMB21]). 5.5 Overcoming The Scalability Trilemma The scalability trilemma postulates that a blockchain system can only at most have two of the following three properties: decentralisation, scalability, and security. Figure 5.2: Pravuil overcomes the Scalability Trilemma. 12 In Pravuil, decentralisation, scalability, and security can be achieved simulta- neously: •Decentralisation : as discussed in the previous sub-section 5.4, Pravuil can be more decentralised than other permissionless blockchains by using zero-knowledge Proof-of-Identity, as previously explained in sub-section 4.3. It also circumvents the impossibility of full decentralisation [Cer19]. •Scalability : Pravuil inherits the scalable Rotating-Subleader (RS) com- munication pattern from MOTOR [ KK19], specifically created to avoid the communication bottleneck experienced by classic BFT protocol when run over limited bandwidth networks. •Security : Pravuil is secure as previously proved in theorem 10 and theo- rem 11. 5.6 Obviating the Price Of Crypto-Anarchy of PoW/PoS Crypto-currencies In a previous paper [ Cer19], it was pointed out that the most cost-efficient Sybil- resistant mechanism is the one provided by a trusted national PKI infrastructure [Dou02] and a centralised social planner would prefer the use of National Identity Cards and/or ePassports in order to minimise costs: instead, permissionless blockchains are paying very high costs by using PoW/PoS as Sybil-resistant mechanisms. The Price of Crypto-Anarchy compares the ratio between the worst Nash equilibrium of the congestion game defined by PoW blockchains and the optimal centralised solution, quantifying the costs of the selfish behaviour of miners. Definition. (#26 from [Cer19]). LetNashCongestedEquil Sbe the set of strategies given as the solution of the optimisation problem of Theorem 25 from [Cer19], then the Price of Crypto-Anarchy is given by the following ratio: Price of Crypto-Anarchy =max s2NashCongestedEquil Cost (s) Cost (zk-PoI ) In practice, the real-world costs of Zero-Knowledge Proof-of-Identity are almost zero as the identity infrastructure is subsidised by governments. However, the situation for PoW/PoS blockchains is quite the opposite: •PoW blockchains: in 2018, Bitcoin, Ethereum, Litecoin and Monero con- sumed an average of 17, 7, 7 and 14 MJ to generate one US$ [ KT18], and in 2021 Bitcoin may be consuming as much energy as all data centers glob- ally [Dig21,dV21] at 100-130 TWh per year. Holders of crypto-currency ultimately experience the Price of Crypto-Anarchy as inflation from mining rewards, see next Table 3: 13 Name Reward per blockBlock time Blocks per dayPrice Yearly mining rewardYearly Inflation BTC 6,25 10 m 144 $50000 $18,061 B 4,12% ETH 2 13,2 s 6545 $3780 $16,425 B 1,76% DOGE 10,000 1 m 1440 $0,49 $2,575 B 4,06% LTC 12,5 2,5 m 576 $320 $840 MM 3,94% BCH 6,25 10 m 144 $1275 $418 MM 1,75% ZEC 3,125 75 s 1152 $301 $395 MM 11,84% XMR 1,02 2 m 720 $407 $109 MM 1,5% Table 3: Empirical Price of Crypto-Anarchy. •PoS blockchains: in theory, the costs are identical to the cost of PoW schemes, except that instead of electrical resources and mining chips, it takes the form of illiquid financial resources[ GG19] and in practice, Proof-of-Stake is not strictly better than Proof-of-Work as the distribution of the market shares between both technologies has been shown to be indistinguishable (Appendix 3, [EAK+17]). Bitcoin miners have earned a total of $26.75B as of April 2021: it’s not necessary to pay so much for Sybil resistance, instead, miners could be paid for other tasks (e.g., transaction fees). As previously discussed, obtaining Sybil-resistance for free is not only the key to overcome Bitcoin’s limited adoption problem (section 5.1) and to achieve more decentralisation than other permissionless blockchains (section 5.4), but also to go beyond the economic limits of Bitcoin as discussed in the next section 5.7. 5.7 Beyond the Economic Limits of Bitcoin In a paper about the economic limits of Bitcoin [ Bud18], it is pointed out that Bitcoin is prohibitively expensive to run because the recurring, “flow”, payments to miners for running the blockchain (particularly, the cost of PoW mining) must be large relative to the one-off, “stock”, benefits of attacking it. Let Vattackbe the expected payoff to the attacker, Pblockbe the block reward to the miner and representing the duration of the attack net of block rewards, then Pblock>vattack ; placing serious economic constraints to the practicality and scalability of the Bitcoin blockchain, a problem that seems intrinsic to any anonymous, decen- tralised blockchain protocol. Consequently, the author poses the open question of finding another approach to generating anonymous, decentralised trust in a 14 public ledger that is less economically expensive: indeed, the technical solution hereby presented4.3 that incorporates zero-knowledge Proof-of-Identity[ Cer19] is the technology that is both “scarce and non-repurposable”, affordable and not susceptible to sabotage attacks that could cause a collapse in the economic value of the blockchain that the author of [ Bud18] would seem meritorious to close said open question. Amorerecentpaper[ GG19]continuesthepreviouseconomicanalysis[ Bud18], extending it to PoS and permissioned settings. For the permissionless PoS setting, it finds that the costs are identical to the cost of PoW schemes, except that instead of electrical resources and mining chips, it takes the form of illiquid financial resources; however, zk-PoI[ Cer19] is free. For the permissioned case concerning this paper, if the block reward is set exogenously, it finds that a permissioned blockchain would have lower costs than permissionless PoW or PoS blockchains in the economic model of [Bud18]. 5.8 More Valuable and Stable Crypto-currencies A review of previous literature in economic research reveals the following in- teresting facts regarding the intricate relationship between PoW mining (i.e., hashrate, electricity and/or equipment costs) and crypto-currency prices: •Thereisapositiverelationshipbetweenmininghashrateandprice[ GPB+15, Hay16]: the causality is primarily unidirectional going from the price to the hashrate [ FK20], although mining incidents and political shocks that affect mining also negatively impact prices. •Bitcoin’s security is sensitive (elastic) to mining rewards and costs, al- though temporary mining cost and price shocks do not affect the long-run blockchain security [ CdKR21 ]: a 1% permanent increase in the mining reward increases the underlying blockchain security by 1.38% to 1.85% in the long-run; positive shocks to electricity prices in China have a negative impact on the hashrate in the short-run; a 1% increase in the efficiency of mining equipment increases the computing capacity between 0.23% and 0.83% in the long-run; in the short-run mining competition intensity has a statistically positive impact leading to expansion of mining capacity, but in the long-run, the relationship is reversed. •High fixed mining rewards are the source of the instability to reach an equilibrium between miners and users [ Iyi18]; instead, mining rewards should be adjusted dynamically. •The production of crypto-currency by miners is jointly determined with the price used by consumers [ PB18]: the equilibrium price depends on both consumer preferences (i.e., price increases with the average value of censorship aversion, and current and future size of the network) and the industrial organisation of the mining market (i.e., price increases with the number of miners and decreases with the marginal cost of mining). Price- security spirals amplify demand and supply shocks: for example, a sudden 15 demand shock provoked by a government banning the crypto-currency in a country would lead to price drops, itself leading to miners decreasing hashrate, further decreasing prices and the feedback loop continuing until a new equilibrium is reached in multiple rounds. In other words, Bitcoin’s security model embeds price volatility amplification. •In a PoW blockchain, it’s impossible to simultaneously achieve all the three following goals [ Pag20]: maximise crypto-currency price, blockchain’s security, and social welfare. Similar results can be found for PoS blockchains because they are substituting electricity and mining costs for illiquid and volatile financial resources [ GG19]. In general, the interdependencies can be described graphically as the following cycles and spirals: Figure 5.3: Interdependencies [CdKR21], with broken negative feedback loops. 16 Figure 5.4: Spirals [PB18], with broken negative feedback loops. However, we break most of the previous interdependencies and spirals with our strongly-consistent blockchain with free Sybil-resistance: •blockchain and transaction security are independent of blockchain mining capacity, mining costs and rewards, and price: once a transaction is instantly committed, it’s committed forever. •there aren’t price-security spirals for demand and supply shocks: changes in prices do not lead to changes in security. •as blockchain’s security is independent of price, it’s possible to maximise crypto-currency price and social welfare. Ultimately, our blockchain design leads to more valuable and stable crypto- currencies. 6 Implementation Pravuil has a Testnet deployed with a working implementation consisting of: •a blockchain layer in Go and Java, invoking drand [ DRA21a ] as described in this paper 4.2. •zero-knowledge Proof-of-Identity [Cer19] in Python and C. •mobile apps for Android (Typescript, Java) and iOS (Typescript, Objective- C, Swift). •secure smart contracts in Obliv-Java [Cer17]. All the code will be open-sourced at https://github.com/Calctopia-OpenSource, including future developments. 17 7 Conclusion In this work, we presented Pravuil, an improvement over previous blockchains that is suitable for real-world deployment in adversarial networks such as the Internet. Pravuil achieves this feat by: •unpredictably rotating leaders using drand [ DRA21a] to defend against adversaries and censorship attacks: drand is an Internet service that generates publicly-verifiable, unbiasable, unpredictable, highly-available, distributed randomness at fixed time intervals. •using for the first time zero-knowledge Proof-of-Identity [ Cer19] as a Sybil- resistancemechanismtoovercomeBitcoin’slimitedadoptionproblem[ HJS19] and to go beyond the economic limits of Bitcoin[ Bud18], delivering more decentralisation than other permissionless blockchains [BHMB21]. •based on the design of a blockchain layer that scales-out with strong consistency prioritising robustness over scalability. References [AAM21] Hafid Abdelatif, Senhaji Hafid Abdelhakim, and Samih Mustapha. A Tractable Probabilistic Approach to Analyze Sybil Attacks in Sharding-Based Blockchain Protocols, 2021. https://arxiv.org/ abs/2104.07215 . [BDN18] Dan Boneh, Manu Drijvers, and Gregory Neven. Compact Multi- Signatures for Smaller Blockchains. Cryptology ePrint Archive, Report 2018/483, 2018. https://eprint.iacr.org/2018/483 . [BH21] Yannis Bakos and Hanna Halaburda. Tradeoffs in Permissioned vs Permissionless Blockchains: Trust and Performance, 2021. https: //papers.ssrn.com/sol3/papers.cfm?abstract_id=3789425 . [BHMB21] Yannis Bakos, Hanna Halaburda, and Christoph Mueller-Bloch. When Permissioned Blockchains Deliver More Decentralization Than Permissionless, 2021. https://cacm.acm.org/magazines/ 2021/2/250073-when-permissioned-blockchains-deliver- more-decentralization-than-permissionless/fulltext . [BLS01] Dan Boneh, Ben Lynn, and Hovav Shacham. Short Signatures from the Weil Pairing. In Colin Boyd, editor, Advances in Cryptol- ogy — ASIACRYPT 2001 , pages 514–532, Berlin, Heidelberg, 2001. Springer Berlin Heidelberg. https://www.iacr.org/archive/ asiacrypt2001/22480516.pdf . [BMC+15]Joseph Bonneau, Andrew Miller, Jeremy Clark, Arvind Narayanan, Joshua Kroll, and Edward Felten. SoK: Research Per- spectives and Challenges for Bitcoin and Cryptocurrencies, 18 2015. https://www.ieee-security.org/TC/SP2015/papers- archived/6949a104.pdf . [Bud18] Eric Budish. The Economic Limits of Bitcoin and the Blockchain, 2018. https://www.nber.org/system/files/working_papers/ w24717/w24717.pdf . [CdKR21] Pavel Ciaian, d’Artis Kancs, and Miroslava Rajcaniova. Interde- pendencies between Mining Costs, Mining Rewards and Blockchain Security, 2021. https://arxiv.org/abs/2102.08107 . [Cer17] David Cerezo Sánchez. Raziel: Private and Verifiable Smart Con- tracts on Blockchains. Cryptology ePrint Archive, Report 2017/878, 2017. https://eprint.iacr.org/2017/878 . [Cer19] David Cerezo Sánchez. Zero-Knowledge Proof-of-Identity: Sybil-Resistant, Anonymous Authentication on Permissionless Blockchains and Incentive Compatible, Strictly Dominant Cryp- tocurrencies. Cryptology ePrint Archive, Report 2019/546, 2019. https://eprint.iacr.org/2019/546 . [DDS83] Danny Dolev, Cynthia Dwork, and Larry Stockmeyer. On the Minimal Synchronism Needed for Distributed Consensus, 1983. https://groups.csail.mit.edu/tds/papers/Stockmeyer/ DolevDS83-focs.pdf . [DGK+20]Ivan Damgård, Chaya Ganesh, Hamidreza Khoshakhlagh, Claudio Orlandi, and Luisa Siniscalchi. Balancing Privacy and Accountabil- ity in Blockchain Identity Management. Cryptology ePrint Archive, Report 2020/1511, 2020. https://eprint.iacr.org/2020/1511 . [Dig21] Digiconomist. Bitcoin may consume as much energy as all data centers globally, 2021. https://digiconomist.net/bitcoin-may- consume-as-much-energy-as-all-data-centers-globally . [DLS88] Cynthia Dwork, Nancy Lynch, and Larry Stockmeyer. Consensus in the Presence of Partial Synchrony, 1988. https://groups.csail. mit.edu/tds/papers/Lynch/jacm88.pdf . [Dou02] John Douceur. The Sybil Attack. In Proceedings of 1st In- ternational Workshop on Peer-to-Peer Systems (IPTPS) , Jan- uary 2002. https://www.microsoft.com/en-us/research/wp- content/uploads/2002/01/IPTPS2002.pdf . [DRA21a] DRAND. DRAND, 2021. https://drand.love . [DRA21b] DRAND. DRAND Security Model, 2021. https://drand.love/ docs/security-model . 19 [DRA21c] DRAND. DRAND Specification, 2021. https://drand.love/ docs/specification . [dV21] Alex de Vries. Bitcoin Boom: What Rising Prices Mean for the Network’s Energy Consumption, 2021. http://dx.doi.org/10. 1016/j.joule.2021.02.006 . [EAK+17]Abeer ElBahrawy, Laura Alessandretti, Anne Kandler, Romualdo Pastor-Satorras, and Andrea Baronchelli. Evolutionary dynamics of the cryptocurrency market, 2017. https://arxiv.org/abs/1705. 05334. [Fel87] Paul Feldman. A Practical Scheme for Non-Interactive Verifiable Secret Sharing. In Proceedings of the 28th Annual Symposium on Foundations of Computer Science , SFCS ’87, page 427–438, USA, 1987. IEEE Computer Society. https://www.cs.umd.edu/ ~gasarch/TOPICS/secretsharing/feldmanVSS.pdf . [FK20] Dean Fantazzini and Nikita Kolodin. Does the Hashrate Affect the Bitcoin Price?, 2020. https://doi.org/10.3390/jrfm13110263 . [FLM86] Michael Fisher, Nancy Lynch, and Michael Merritt. Easy impossibility proofs for distributed consensus problems, 1986. https://groups.csail.mit.edu/tds/papers/Lynch/ FischerLynchMerritt-dc.pdf . [GAR18] MartinGarriga, MaximilianoArias, andAlanDeRenzis. Blockchain and Cryptocurrency: A comparative framework of the main Archi- tectural Drivers, 2018. https://arxiv.org/abs/1812.08806 . [GBE+18]Adem Efe Gencer, Soumya Basu, Ittay Eyal, Robbert van Renesse, and Emin Gün Sirer. Decentralization in Bitcoin and Ethereum Networks, 2018. https://arxiv.org/abs/1801.03998 . [GG19] Joshua S. Gans and Neil Gandal. More (or less) economic limits of the blockchain, 2019. https://www.nber.org/system/files/ working_papers/w26534/w26534.pdf . [GJKR99] Rosario Gennaro, Stanislaw Jarecki, Hugo Krawczyk, and Tal Ra- bin. Secure Distributed Key Generation for Discrete-Log Based Cryptosystems. In Advances in Cryptology - EUROCRYPT ’99, International Conference on the Theory and Application of Cryp- tographic Techniques , volume 1592 of Lecture Notes in Computer Science, pages 295–310. Springer, 1999. https://link.springer. com/content/pdf/10.1007/s00145-006-0347-3.pdf . [GK18] Juan Garay and Aggelos Kiayias. SoK: A Consensus Taxonomy in the Blockchain Era. Cryptology ePrint Archive, Report 2018/754, 2018. https://eprint.iacr.org/2018/754 . 20 [GLOW20] David Galindo, Jia Liu, Mihai Ordean, and Jin-Mann Wong. Fully Distributed Verifiable Random Functions and their Application to Decentralised Random Beacons. Cryptology ePrint Archive, Report 2020/096, 2020. https://eprint.iacr.org/2020/096 . [GPB+15]Ifigeneia Georgoula, Demitrios Pournarakis, Christos Bilanakos, Dionisios Sotiropoulos, and George M. Giaglis. Using Time-Series andSentimentAnalysistoDetecttheDeterminantsofBitcoinPrices, 2015. https://papers.ssrn.com/sol3/papers.cfm?abstract_ id=2607167 . [Hay16] Adam S. Hayes. Cryptocurrency value formation: An empirical study leading to a cost of production model for valuing bitcoin, 2016. https://doi.org/10.1016/j.tele.2016.05.005 . [HJS19] Franz J. Hinzen, Kose John, and Fahad Saleh. Bitcoin’s Fatal Flaw: The Limited Adoption Problem, 2019. https://papers.ssrn.com/ sol3/papers.cfm?abstract_id=3334262 . [ICA21] ICAO. ICAO Public Key Directory (PKD), 2021. https://www. icao.int/Security/FAL/PKD/Pages/default.aspx . [Iyi18] Engin Iyidogan. An Equilibrium Model of Blockchain-Based Cryptocurrencies, 2018. https://papers.ssrn.com/sol3/papers. cfm?abstract_id=3152803 . [KK19] Eleftherios Kokoris-Kogias. Robust and Scalable Consensus for Sharded Distributed Ledgers. Cryptology ePrint Archive, Report 2019/676, 2019. https://eprint.iacr.org/2019/676 . [KKJG+16]Eleftherios Kokoris-Kogias, Philipp Jovanovic, Nicolas Gailly, Ismail Khoffi, Linus Gasser, and Bryan Ford. Enhancing Bitcoin Security and Performance with Strong Consistency via Collective Signing, 2016. https://arxiv.org/abs/1602.06997 . [KKJG+17]Eleftherios Kokoris-Kogias, Philipp Jovanovic, Linus Gasser, Nicolas Gailly, Ewa Syta, and Bryan Ford. OmniLedger: A Secure, Scale- Out, Decentralized Ledger via Sharding. Cryptology ePrint Archive, Report 2017/406, 2017. https://eprint.iacr.org/2017/406 . [KN12] Sunny King and Scott Nadal. PPCoin: Peer-to-Peer Crypto- Currency with Proof-of-Stake, 2012. https://www.peercoin.net/ whitepapers/peercoin-paper.pdf . [KT18] Max J. Krause and Thabet Tolaymat. Quantification of energy and carbon costs for mining cryptocurrencies, 2018. https://doi.org/ 10.1038/s41893-018-0152-7 . 21 [LLS+21]Yizhong Liu, Jianwei Liu, Marcos Antonio Vaz Salles, Zongyang Zhang, Tong Li, Bin Hu, Fritz Henglein, and Rongxing Lu. Building Blocks of Sharding Blockchain Systems: Concepts, Approaches, and Open Problems, 2021. https://arxiv.org/abs/2102.13364 . [Nak09] Satoshi Nakamoto. Bitcoin: A Peer-to-Peer Electronic Cash System, 2009. https://bitcoin.org/bitcoin.pdf . [Pag20] Emiliano Pagnotta. Decentralizing Money: Bitcoin Prices and Blockchain Security, 2020. https://papers.ssrn.com/sol3/ papers.cfm?abstract_id=3152803 . [PB18] Emiliano Pagnotta and Andrea Buraschi. An Equilibrium Valuation of Bitcoin and Decentralized Network Assets, 2018. https:// papers.ssrn.com/sol3/papers.cfm?abstract_id=3142022 . [Pla26] Rutherford H. Platt Jr. The Forgotten Books of Eden: Book of Secrets of Enoch, 1926. https://www.sacred-texts.com/bib/ fbe/fbe129.htm . [PS16] Rafael Pass and Elaine Shi. Hybrid Consensus: Efficient Consensus in the Permissionless Model. Cryptology ePrint Archive, Report 2016/917, 2016. https://eprint.iacr.org/2016/917 . [RC06] HariGovind V. Ramasamy and Christian Cachin. Parsimonious Asynchronous Byzantine-Fault-Tolerant Atomic Broadcast. Cryp- tology ePrint Archive, Report 2006/082, 2006. https://eprint. iacr.org/2006/082 . [RGK19] Mayank Raikwar, Danilo Gligoroski, and Katina Kralevska. SoK of Used Cryptography in Blockchain. Cryptology ePrint Archive, Report 2019/735, 2019. https://eprint.iacr.org/2019/735 . [RMD+20]Tayebeh Rajab, Mohammad Hossein Manshaei, Mohammad Dakhi- lalian, Murtuza Jadliwala, and Mohammad Ashiqur Rahman. On the Feasibility of Sybil Attacks in Shard-Based Permissionless Blockchains, 2020. https://arxiv.org/abs/2002.06531 . [SJS+21]Nicholas Stifter, Aljosha Judmayer, Philipp Schindler, Andreas Kern, and Walid Fdhila. What is Meant by Permissionless Blockchains? Cryptology ePrint Archive, Report 2021/023, 2021. https://eprint.iacr.org/2021/023 . [SSVK20] Savva Shanaev, Arina Shuraeva, Mikhail Vasenin, and Maksim Kuznetsov. Cryptocurrency Value and 51% Attacks: Evidence from Event Studies, 2020. https://doi.org/10.3905/jai.2019. 1.081. 22
{ "id": "2105.10464" }
1711.03028
Simplicity: A New Language for Blockchains
Simplicity is a typed, combinator-based, functional language without loops and recursion, designed to be used for crypto-currencies and blockchain applications. It aims to improve upon existing crypto-currency languages, such as Bitcoin Script and Ethereum's EVM, while avoiding some of the problems they face. Simplicity comes with formal denotational semantics defined in Coq, a popular, general purpose software proof assistant. Simplicity also includes operational semantics that are defined with an abstract machine that we call the Bit Machine. The Bit Machine is used as a tool for measuring the computational space and time resources needed to evaluate Simplicity programs. Owing to its Turing incompleteness, Simplicity is amenable to static analysis that can be used to derive upper bounds on the computational resources needed, prior to execution. While Turing incomplete, Simplicity can express any finitary function, which we believe is enough to build useful "smart contracts" for blockchain applications.
http://arxiv.org/pdf/1711.03028v2
Russell O'Connor
cs.PL
cs.PL
Simplicity: A New Language for Blockchains Russell O'Connor roconnor@blockstream.com 2017-12-13 Abstract Simplicity is a typed, combinator-based, functional language without loops and recursion, designed to be used for crypto-currencies and block- chain applications. It aims to improve upon existing crypto-currency lan- guages, such as Bitcoin Script and Ethereum's EVM, while avoiding some of the problems they face. Simplicity comes with formal denotational semantics de ned in Coq, a popular, general purpose software proof as- sistant. Simplicity also includes operational semantics that are de ned with an abstract machine that we call the Bit Machine. The Bit Ma- chine is used as a tool for measuring the computational space and time resources needed to evaluate Simplicity programs. Owing to its Turing incompleteness, Simplicity is amenable to static analysis that can be used to derive upper bounds on the computational resources needed, prior to execution. While Turing incomplete, Simplicity can express any nitary function, which we believe is enough to build useful \smart contracts" for blockchain applications. 0 License This work is licensed under a Creative Com- mons \Attribution 4.0 International" license. 〈https://creativecommons.org/licenses/by/4.0/deed.en 〉 1 Introduction Blockchain and distributed ledger technologies de ne protocols that allow large, ad-hoc, groups of users to transfer value between themselves without needing to trust each other or any central authority. Using public-key cryptography, users can sign transactions that transfer ownership of funds to other users. To prevent transactions from con icting with each other, for example when one user attempts to transfer the same funds to multiple di erent users at the same time, a consistent sequence of blocks of transactions is committed using a proof of work scheme. This proof of work is created by participants called miners. Each user veri es every block of transactions; among multiple sequences of valid blocks, the sequence with the most proof of work is declared to be authoritative. 1arXiv:1711.03028v2 [cs.PL] 13 Dec 2017 Bitcoin [20] was the rst protocol to use this blockchain technology to create a secure and permissionless crypto-currency. It comes with a built-in program- ming language, called Bitcoin Script [6, 22], which determines if a transaction is authorized to transfer funds. Rather than sending funds to a speci c party, users send funds to a speci c Bitcoin Script program. This program guards the funds and only allows them to be redeemed by a transaction input that causes the program to return successfully. Every peer in the Bitcoin network must exe- cute each of these programs with the input provided by the transaction data and all these programs must return successfully in order for the given transaction to be considered valid. A typical program speci es a public key and simply requires that a valid digital signature of the transaction for that key be provided. Only someone with knowledge of the corresponding private key can create such a signature. Funds can be guarded by more complex programs. Examples range from simpler programs that require signatures from multiple parties, permitting es- crow services [14], to more complex programs that allow for zero-knowledge contingent payments [19], allowing for trustless and atomic purchases of digital data. This last example illustrates how Bitcoin Script can be used to build smart contracts, which allow parties to create conditional transactions that are enforced by the protocol itself. Because of its Script language, Bitcoin is sometimes described as pro- grammable money. 1.1 Bitcoin Script Bitcoin Script is a stack-based language similar to Forth. A program in Bitcoin Script is a sequence of operations for its stack machine. Bitcoin Script has conditionals but no loops, thus all programs halt and the language is not Turing complete. Originally, these programs were committed as part of the output eld of a Bitcoin transaction. The program from the output being redeemed is executed starting with the initial stack provided by the input redeeming it. The program is successful if it completes without crashing and leaves a non-zero value on the top of stack. Later, a new option called pay to script hash (P2SH) [1] was added to Bitcoin. Using this option, programs are committed by specifying a hash of the source code as part of the output eld of a Bitcoin transaction. The input eld of a redeeming Bitcoin transaction then provides both the program and the initial stack for the program. The transaction is valid if the hash of the provided program matches the hash speci ed in the output being redeemed, and if that program executes successfully with the provided input, as before. The main e ect here is moving the cost of large programs from the person sending funds to the person redeeming funds. Bitcoin Script has some drawbacks. Many operations were disabled by Bit- coin's creator, Satoshi Nakamoto [21]. This has left Bitcoin Script with a few arithmetic (multiplication was disabled), conditional, stack manipulation, hash- 2 ing, and digital-signature veri cation operations. In practice, almost all pro- grams found in Bitcoin follow a small set of simple templates to perform digital signature veri cation. However, Bitcoin Script also has some desirable properties. All Bitcoin Script operations are pure functions of the machine state except for the signature-veri cation operations. These signature-veri cation operations re- quire a hash of some of the transaction data. Together, this means the pro- gram's success or failure is purely a function of the transaction data. Therefore, the person creating a transaction can know whether the transaction they have created is valid or not. Bitcoin Script is also amenable to static analysis, which is another desirable property. The digital-signature veri cation operations are the most expensive operations. Prior to execution, Bitcoin counts the number of occurrences of these operations to compute an upper bound on the number of expensive calls that may occur. Programs whose count exceeds a certain threshold are invalid. This is a form of static analysis that ensures the amount of computation that will be done isn't excessive. Moreover, before committing a program to an output, the creator of the program can ensure that the amount of computation that will be done will not be excessive. 1.2 Ethereum and the EVM Ethereum [31] is another crypto-currency with programmable transactions. It de nes a language called EVM for its transactions. While more expressive and exible than Bitcoin Script, the design of Ethereum and the EVM has several issues. The EVM is a Turing-complete programming language with a stack, random access memory, and persistent storage. To prevent in nite loops, execution is limited by a counter called gas, which is paid for in Ethereum's unit of account, Ether, to the miner of the block containing the transaction. Static analysis isn't practical with a Turing-complete language. Therefore, when a program runs out of gas, the transaction is nulli ed but the gas is still paid to the miner to ensure they are compensated for their computation e orts. Because of direct access to persistent storage, EVM programs are a function of both the transaction and the state of the blockchain at the point the transac- tion is inserted into the blockchain. This means users cannot necessarily know what the result of their transaction will be when they create it, nor can they necessarily know how much gas will be consumed. Users must provide enough gas to cover the worst-case use scenario and there is no general purpose algo- rithm that can compute that bound. In particular, there is no practical general purpose way to tell if any given program will run out of gas in some context either at redemption time or creation time. There have been some e orts to perform static analysis on a subset of the EVM language [5], but these tools are limited (e.g. they do not support programs with loops). Unlike Bitcoin, there are many instances of ad-hoc, one-o , special purpose programs in Ethereum. These programs are usually written in a language called 3 Solidity [12] and compiled to the EVM. These ad-hoc programs are regularly broken owing to the complex semantics of both Solidity and the EVM; the most famous of these failures were the DAO [8] and Parity's multiple signature validation program [26]. 1.3 A New Language In this paper, we propose a new language that maintains or enhances the desir- able properties that Bitcoin Script has while adding expressiveness. Our design goals are: •Create an expressive language that provides users with the tools needed to build novel programs and smart contracts. •Enable static analysis that provides useful upper bounds on the amount of computation required. •Minimize bandwidth and storage requirements and enhance privacy by removing unused code at redemption time. •Maintain Bitcoin's design of self-contained transactions whereby programs do not have access to any information outside the transaction. •Provide formal semantics that facilitate easy reasoning about programs using existing o -the-shelf proof-assistant software. A few of these goals deserve additional explanation: Static analysis allows the protocol to place limits on the amount of compu- tation a transaction can have, so that nodes running the protocol are not overly burdened. Furthermore, the static analysis can provide program creators with a general purpose tool for verifying that the programs they build will always t within these limits. Additionally, it is easy for the other participants in a contract to check the bounds on the smart contract's programs themselves. Self-contained transactions ensure that execution does not depend on the global state of the blockchain. Once a transaction's programs have been vali- dated, that fact can be cached. This is particularly useful when transactions are being passed around the network before inclusion in the blockchain; once included in the blockchain, the programs do not need to be executed again. Finally, formal semantics that work with proof-assistant software provide the opportunity for contract developers to reason about their programs to rule out logical errors and to help avoid scenarios like the DAO and Parity's multi- signature program failure. Like Bitcoin Script and the EVM, our language is designed as low-level language for executing smart contracts, not as a language for coding in directly. As such, we expect it to be a target for other, higher-level, languages to be compiled to. We call our new language Simplicity . 4 iden:A`As:A`B t :B`C compst:A`C unit:A`1 t:A`B injlt:A`B+Ct:A`C injrt:A`B+C s:AC`D t :BC`D casest: (A+B)C`Ds:A`B t :A`C pairst:A`BC t:A`C taket:AB`Ct:B`C dropt:AB`C Figure 1: Typing rules for the terms of core Simplicity. 2 Core Simplicity Simplicity is a typed combinator language. Each well-typed Simplicity expres- sion is associated with two types, an input type and an output type. Every expression denotes a function from its input type to its output type. 2.1 Types in Simplicity Types in Simplicity come in three avors. •The unit type, written as 1, is the type with one element. •A sum type, written as A+B, contains the tagged union of values from either the left type Aor the right type B. •A product type, written as AB, contains pairs of elements with the rst one from the type Aand the second one from the type B. There are no recursive types in Simplicity. Every type in Simplicity only contains a nite number of values; the number of possible values a type contains can be computed by interpreting the type as an arithmetic expression. 2.2 Terms in Simplicity The term language for Simplicity is based on Gentzen's sequent calculus [13]. We write a type-annotated Simplicity expression as t:A`Bwhereta Simplicity expression, Ais the expression's input type, and Bis the expression's output type. 5 The core of Simplicity consists of nine combinators for building expressions. They capture the fundamental operations for the three avors of types in Sim- plicity. The typing rules for these nine combinators is given in Figure 1. We can classify the combinators based on the avor of types they support. •The unitterm returns the singular value of the unit type and ignores its argument. •The injland injrcombinators create tagged values, while the case com- binator, Simplicity's branching operation, evaluates one of its two sub- expressions based on the tag of the rst component of its input. •The paircombinator creates pairs, while the take and drop combinators access rst and second components of a pair respectively. •The iden and comp combinators are not speci c to any avor of type. The identerm represents the identity function for any type and the comp combinator provides function composition. Simplicity expressions form an abstract syntax tree. The leaves of this tree are either iden orunitterms. The nodes are one of the other seven combinators. Each node has one or two children depending on which combinator the node represents. Precise semantics are given in the next section. Extensions to this core set of combinators is given in Section 4. 2.3 Denotational Semantics of Simplicity Before giving the semantics of Simplicity terms, we need notations for the values of Simplicity types. •We writehi:1for the singular value of the unit type. •We writeL(a) :A+Bwhena:Afor left-tagged values of the sum type. •We writeR(b) :A+Bwhenb:Bfor right-tagged values of the sum type. •We writeha;bi:ABwhena:Aandb:Bfor values of the pair type. We emphasize that these values are not directly representable in Simplicity because Simplicity expressions can only denote functions; we use these values only to de ne the functional semantics of Simplicity. Simplicity's denotational semantics are recursively de ned. For an expres- siont:A`B, we de ne its semantics JtK:A!Bas follows. 6 Jiden K(a):=a JcompstK(a):=JtK(JsK(a)) Junit K(a):=hi JinjltK(a):=L(JtK(a)) JinjrtK(a):=R(JtK(a)) JcasestKhL(a);ci:=JsKha;ci JcasestKhR(b);ci:=JtKhb;ci JpairstK(a):=hJsK(a);JtK(a)i JtaketKha;bi:=JtK(a) JdroptKha;bi:=JtK(b) We have formalized the language and semantics of core Simplicity in the Coq proof assistant [29]. The formal semantics in Coq are the ocial semantics of Simplicity, and for core Simplicity, it is short enough that it ts in Appendix A of this paper. Having semantics in a general purpose proof assistant allows us to formally reason both about programs written in Simplicity and about algorithms that analyze Simplicity programs. 2.4 Completeness Simplicity cannot express general computation. It can only express nitary func- tions, because each Simplicity type contains only nitely many values. However, within this domain, Simplicity's set of combinators is complete: any function between Simplicity's types can be expressed. Theorem 2.1 (Finitary Completeness) LetAandBbe Simplicity types. Letf:A!Bbe any function between these types. Then there exists some core Simplicity expression t:A`Bsuch that JtK=f. We have veri ed this theorem with Coq. This theorem holds because functions between nite types can be described, in principle, by a lookup table that maps inputs to outputs. In principle, such a lookup table can be encoded as a Simplicity expression that does repeated case analysis on its input and returns a xed-output value for each possible case. However, using this theorem to construct Simplicity expressions is not prac- tical. For example, a lookup table for the compression function for SHA-256 [24], which maps 768 bits to 256 bits, would be astronomical in size, requiring 2776 bits. To create practical programs in Simplicity, we need to take advantage of structured computation in order to succinctly express functions. 7 2.5 Example Programs The combinators of core Simplicity may seem paltry, so in this section we il- lustrate how we can construct programs in Simplicity. We begin by de ning a type for a bit, 2, as the sum of two unit types. 2:=1+1 We choose an interpretation of bits as numbers where we de ne the left- tagged value as denoting zero and the right tagged value as denoting one. dLhie2:= 0 dRhie2:= 1 We can write Simplicity programs to manipulate bits. For example, we can de ne the notfunction to ip a bit. not:2`2 not:=comp (pair iden unit ) (case(injr unit ) (injl unit )) By recursively taking products, we can de ne types for multi-bit words. 21:=2 22n:=2n2n For example, the 232type can represent 32-bit words. We recursively de ne the interpretation of pairs of words as numbers, choos- ing to use big-endian order. dha;bie22n:=dae2n2n+dbe2n We can write a half-adder of two bits in Simplicity. half-adder :22`22 half-adder :=case (drop(pair(injl unit )iden)) (drop(pair iden not )) We can prove the half-adder expression correct. Theorem 2.2 (Half Adder Correct) Leta;b:2be two bits. Then dJhalf-adder Kha;bie22=dae2+dbe2 We have proven this theorem in Coq. This particular theorem can be proven by exhaustive case analysis (there are only four cases) and equational reasoning using Simplicity's denotational semantics. We continue and de ne a full adder by combining two half adders. From there we can build ripple-carry adders for larger word sizes by combining full 8 adders from smaller word sizes. The interested reader can nd the Simplicity expressions for these full adders in Appendix B. Continuing, we can build multipliers and other bit-manipulation functions. These can be combined to implement more sophisticated functions. We have written the SHA-256 block compression function in Simplicity. Us- ing 256-bit arithmetic, we have also constructed expressions for elliptic curve operations over the Secp256k1 curve [9] that Bitcoin uses, and we have built a form of ECDSA signature validation [23] in Simplicity. To gain an understanding of the size of Simplicity expressions, let us examine our implementation of the SHA-256 block compression function, sha-256-block : 22562512`2256. Our Simplicity expression consists of 3 274 442 combinators. However, this counts the total number of nodes in the abstract syntax tree that makes up the expression. Several sub-expressions of this expression are dupli- cated and can be shared. Imagine taking the abstract syntax tree and sharing identical sub-expressions to create a directed acyclic graph (DAG) representing the same expression. Counting this way, the same expression contains only 1 130 unique typed sub-expressions, which is the number of nodes that would occur in the DAG representing the expression. Taking advantage of shared sub-expressions is critical because it makes the representation of typical expressions exponentially smaller in size. We choose to leave sub-expression sharing implicit in Simplicity's term language. This ensures that Simplicity's semantics are not a ected by how sub-expressions are shared. However, we do transmit and store Simplicity expressions in a DAG format. This DAG representation of expressions is also important when we consider static analysis in Section 3.3. Using our formal semantics of Simplicity in Coq, we have proven our imple- mentation of SHA-256 is correct. Theorem 2.3 (SHA-256 Correct) Leta:2256andb:2512. Let sha-256-block :22562512`2256be our Simplicity implementation of the SHA-256 block compression function. Let SHA256Block :22562512!2256be the SHA-256 block compression function. Then Jsha-256-block Kha;bi=SHA256Blockha;bi Our reference implementation of the SHA-256 compression function in Coq1 is taken from the Veri ed Software Toolchain (VST) project [3] where they use it as their reference implementation for proving OpenSSL's C implementation of SHA-256 correct [2]. If we combine our Coq proof with the VST project's Coq proof, we would get a formal proof that our Simplicity implementation of SHA-256 matches OpenSSL's C implementation of SHA-256. 1The type of the reference implementation for the SHA-256 compression function in Coq actually uses lists of 32-bit words. To simplify the presentation here, we have omitted the translation between representations of the compression function's inputs and outputs. 9 3 The Bit Machine One of the design goals for Simplicity is to be able to compute a bound on the computation costs of evaluating a Simplicity program. While the denotational semantics of Simplicity are adequate for determining the functional behavior of Simplicity programs, we need operational semantics to provide a measure of computational resources used. To do this, we create an abstract machine, called the Bit Machine, tailored for evaluating Simplicity programs. The Bit Machine is an abstract imperative machine whose state consists of two non-empty stacks of data frames. One stack holds read-only frames, and the other stack holds write-only frames. A data frame consists of an array of cells and a cursor pointing either at one of the cells or pointing just beyond the end of the array. Each cell contains one of three values: a zero bit, a one bit, or an unde ned value. The Bit Machine has a set of instructions that manipulate the two stacks and their data frames. Notionally, we will write a frame like in the following example. [010?1?1] This frame contains 7 cells. The ? character denotes a cell with an unde ned value. The 0and 1characters denotes cells with the corresponding bit value. The frame's cursor is pointing to the underscored cell. When a frame's cursor is pointing past the end of the array, we will write an underscore after the array's cells like the following. [010?1?1] Table 1 illustrates an example of a possible state of the Bit Machine. This example contains a read-frame stack that has four data frames and a write-frame stack that has two data frames. The top frame of the read-frame stack is called theactive read frame , and the top frame of the write-frame stack is called the active write frame . read frame stack write frame stack [1001 1??110101000 ] [11??1101 ] [0000] [ 111??] [] [10] Table 1: Example state for the Bit Machine The Bit Machine has ten instructions to manipulate its state, which we describe below. •nop: This instruction doesn't change the state of the machine. 10 •write (b): This instruction writes bit value bto the cell under the active write frame's cursor and advances the cursor by one cell. {The valuebmust be either 0or1or else the machine crashes. {The active write frame's cursor must not be beyond the end of the array or else the machine crashes. {The cell written to must have an unde ned value before writing to it or else the machine crashes. •copy (n): This instruction copies ncells from the active read frame, start- ing at its cursor, to the active write frame, starting at its cursor, and advances the active write frame's cursor by ncells. {There must be at least ncells between the active read frame's cursor and the end of its array or else the machine crashes. {There must be at least ncells between the active write frame's cursor and the end of its array and they all must have an unde ned value before writing to them or else the machine crashes. {Note that unde ned values can be copied. •skip(n): This instruction advances the active write frame's cursor by n cells. {This instruction is allowed to advance the cursor to the point just past the end of the array; however if nis large enough that it would advance it past this point, the machine crashes instead. •fwd(n): This instruction moves the active read frame's cursor forward by ncells. {This instruction is allowed to advance the cursor to the point just past the end of the array; however if nis large enough that it would advance it past this point, the machine crashes instead. •bwd(n): This instruction moves the active read frame's cursor backwards byncells. {If this instruction would move the cursor before the beginning of the array, the machine crashes instead. •newFrame (n): This instruction allocates a new frame with ncells and pushes it onto the write-frame stack, making it the new active write frame. {The cursor for this new frame starts at the beginning of the array. {The cells of the new frame are initialized with unde ned values. •moveFrame : This instruction pops a frame o the write-frame stack and pushes it onto the read-frame stack. 11 {The moved frame has its cursor reinitialized to the beginning of the array. {If this would leave the machine with an empty write frame stack, the machine crashes instead. •dropFrame : This instruction pops a frame o the read-frame stack and deallocates it. {If this would leave the machine with an empty read-frame stack, the machine crashes instead. •read : This instruction doesn't modify the state of the machine. Instead it returns the value of the bit under the active read frame's cursor to the machine's operator. {if the value under the active read frame's cursor is unde ned, or if it is past the end of its array, the machine crashes instead. The Bit Machine is deliberately designed to crash at anything resembling unde ned behavior. 3.1 Bit Machine Values We can use the Bit Machine to evaluate Simplicity programs on their inputs. First, we de ne how many cells are needed to hold the values of a given type. bitSize (1):= 0 bitSize (A+B):= 1 + max(bitSize (A);bitSize (B)) bitSize (AB):=bitSize (A) +bitSize (B) The unit type doesn't need any bits to represent its one value. A value of sum type needs one bit for its tag and then enough bits to represent either of its left or right values. A value of product type needs space to hold both its values. We precisely de ne a representation of values for Simplicity types as array of cells below: phiq1:= [] pL(a)qA+B:= [0][?]padl(A;B )paqA pR(b)qA+B:= [1][?]padr(A;B )pbqB pha;biqAB:=paqApbqB For the notation above, denotes the concatenation of arrays of cells and [b]ndenotes an array of ncells all containing b. 12 The padding for left and right values lls the array with sucient unde ned values so that the array ends up with the required length. padl(A;B):=max(bitSize (A);bitSize (B))bitSize (A) padr(A;B):=max(bitSize (A);bitSize (B))bitSize (B) Below are some examples of values represented as arrays of cells for the Bit Machine. We de ne the inverse of de2nto bebc2nthat maps numbers to the values that represent them. pL(b3c22)q22+2= [011] pR(b0c2)q22+2= [1?0] The array of cells contains a list of the tags from the sum types and that is about it. Notice that values of a multi-bit word type, 2n, have exactly ncells and the representation is identical to its big-endian binary representation. 3.2 Operational Semantics The operational semantics for Simplicity are given by recursively translating a Simplicity expression into a sequence of instructions for the Bit Machine. Figure 2 de nes /uni27EAt:A`B/uni27EB, which results in a sequence of instructions for the Bit Machine that evaluates the function JtK. We have formalized the Bit Machine in Coq and Figure 2's translation of Simplicity expressions into Bit Machine instructions. We have veri ed, with Coq, that our Bit Machine implementation of Simplicity respects Simplicity's denotational semantics. Theorem 3.1 (Correctness of Operational Semantics) Lett:A`Bbe any Simplicity expression. Let v:Abe any value of type A. Initialize a Bit Machine with •the value pvqAas the only frame on the read-frame stack with its cursor at the beginning of the frame, and •the value [?]bitSize (B)as the only frame on the write-frame stack with its cursor at the beginning of the frame. After executing the instructions /uni27EAt:A`B/uni27EB, the nal state of the Bit Machine has •the value pvqAas the only frame on the read-frame stack, with its cursor at the beginning of the frame, and •the value pJtK(v)qBas the only frame on the write-frame stack, with its cursor at the end of the frame. 13 /uni27EAiden:A`A/uni27EB:=copy (bitSize (A)) /uni27EAcompst:A`C/uni27EB:=newFrame (bitSize (B));/uni27EAs:A`B/uni27EB; moveFrame ;/uni27EAt:B`C/uni27EB; dropFrame /uni27EAunit:A`1/uni27EB:=nop /uni27EAinjlt:A`B+C/uni27EB:=write (0);skip(padl(B;C));/uni27EAt:A`B/uni27EB /uni27EAinjrt:A`B+C/uni27EB:=write (1);skip(padr(B;C));/uni27EAt:A`C/uni27EB /uni27EAcasest: (A+B)C`D/uni27EB:= match read with 8 >>>>>>< >>>>>>:0!fwd(1 + padl(A;B)); /uni27EAs:AC`D/uni27EB; bwd(1 + padl(A;B)) 1!fwd(1 + padr(A;B)); /uni27EAt:BC`D/uni27EB; bwd(1 + padr(A;B)) /uni27EApairst:A`BC/uni27EB:=/uni27EAs:A`B/uni27EB;/uni27EAt:A`C/uni27EB /uni27EAtaket:AB`C/uni27EB:=/uni27EAt:A`C/uni27EB /uni27EAdropt:AB`C/uni27EB:=fwd(bitSize (A));/uni27EAt:B`C/uni27EB; bwd(bitSize (A)) Figure 2: Operational Semantics for Simplicity using the Bit Machine. In particular, the Bit Machine never crashes during this execution. The fact that the Bit Machine never crashes means that during execution it never reads from an unde ned cell, nor does it ever write to a de ned cell. This means that, if one implements the Bit Machine on a real computer, one can use an ordinary array of bits to represent the array of cells and cells that are supposed to hold unde ned values can be safely set to any bit value. As long as this implementation only executes instructions translated from Simplicity and started from a proper initial state, the resulting computation will be the same as if one had used an explicit representation for unde ned values. 3.3 Static Analysis Using the Bit Machine, we can measure computational resources needed by a Simplicity program. For instance we can: •count the number of instructions executed by the Bit Machine. •count the number of cells copied by the Bit Machine. 14 extraCellBnd (iden:A`A):= 0 extraCellBnd (compst:A`C):=bitSize (B)+ max(extraCellBnd (s:A`B); extraCellBnd (t:B`C)) extraCellBnd (unit:A`1):= 0 extraCellBnd (injlt:A`B+C):=extraCellBnd (t:A`B) extraCellBnd (injrt:A`B+C):=extraCellBnd (t:A`C) extraCellBnd (casest: (A+B)C`D):=max(extraCellBnd (s:AC`D); extraCellBnd (t:BC`D)) extraCellBnd (pairst:A`BC):=max(extraCellBnd (s:A`B); extraCellBnd (t:A`C)) extraCellBnd (taket:AB`C):=extraCellBnd (t:A`C) extraCellBnd (dropt:AB`C):=extraCellBnd (t:B`C) cellBnd (t:A`B):=bitSize (A) +bitSize (B) +extraCellBnd (t:A`B) Figure 3: De nition of cellBnd . •count the maximum number of cells in both stacks at any point during execution. •count the maximum number of frames in both stacks at any point during execution. The rst two are measurements of time used by the Bit Machine, and the last two are measurements of space used by the Bit Machine. Using simple static analysis, we can quickly compute an upper bound on these sorts of resource costs. In this paper, we will focus on the example of counting the maximum number of cells in both stacks at any point during ex- ecution. Figure 3 de nes a function cellBnd that computes an upper bound on the maximum number of cells that are needed during execution. Theorem 3.2 (Static Analysis of Cell Usage) Lett:A`Bbe any Sim- plicity expression. Let v:Abe any value of type A. Initialize a Bit Machine as speci ed in Theorem 3.1. The maximum number of cells in both stacks of the Bit Machine at any point during the execution of /uni27EAt:A`B/uni27EBfrom this initial state never exceeds cellBnd (t:A`B). We have formalized the above static analysis and proven the above theorem in Coq. 15 These kinds of static analyses are simple recursive functions of Simplicity expressions, and the intermediate results for sub-expressions can be shared. By using a DAG for the in-memory representation of Simplicity expressions, we can transparently cache these intermediate results. This means the time needed to compute static analysis is proportional to the size of the DAG representing the Simplicity expression, as opposed to the time needed for dynamic analysis such as evaluation, which may take time proportional to the size of the tree representing the Simplicity expression. The Bit Machine is an abstract machine, so we can think of these sorts of static analyses as bounding abstract resource costs. As long as the abstract resource costs are limited, then the resource costs of any implementation of Simplicity will also be limited. These sorts of precise static analyses of resource costs are more sophisticated than what is currently available for Bitcoin Script. Notice that the de nition of cellBnd does not directly reference the Bit Ma- chine, so limits on the bounds computed by these static analyses can be imposed on protocols that use Simplicity without necessarily requiring that applications use the Bit Machine for evaluation. While we do use an implementation of the Bit Machine in our prototype Simplicity evaluator written in C, others are free to explore other models of evaluation. For example, the Bit Machine copies data to implement the idencombinator, but another model of evaluation might create shared references to data instead. 3.3.1 Tail Composition Optimization Tail call optimization is an optimization used in many languages where a proce- dure's stack frame is freed prior to a call to another procedure when that call is the last command of the procedure. The comp combinator in Simplicity behaves much like a procedure call, and we can implement an analogous optimization for the translation of Simplicity to the Bit Machine. Interested readers can nd this tail composition optimized translation, /uni27EAt:A`B/uni27EBtco o , de ned in Appendix C, along with a static analysis of its memory use. 3.4 Jets Evaluation of a Simplicity expression with the Bit Machine recursively traverses the expression. Before evaluating some sub-expression t:A`B, the Bit Ma- chine is always in a state where the active read frame is of the form r1pvqAr2 for some value v:Aand some arrays r1andr2, and where the cursor is placed at the beginning of the pvqAarray slice. Furthermore the active write frame is of the form w1[?]bitSize (B)w2 for some arrays w1andw2, and where the cursor is placed at the beginning of the [?]bitSize (B)array slice. 16 After the evaluation of the sub-expression t:A`B, the active write frame is of the form w1pJtK(v)qBw2 and where the cursor is placed at the beginning of the w2array slice. Taking an idea found in Urbit [32], we notice that if we recognize a familiar sub-expression t:A`B, the interpreter may bypass the BitMachine's execution of/uni27EAt:A`B/uni27EBand instead directly compute and write pJtK(v)qBto the active write frame. Following Urbit, we call such a familiar expression and the code that replaces it a jet. Jets are essential for making Simplicity a practical language. For our Block- chain application we expect to have jets for at least the following expressions: •arithmetic operations (addition, subtraction, and multiplication) from 8-bit to 256-bit word size, •comparison operations (less than, less than or equal to, equality) from 8-bit to 256-bit word size, •logical bitwise operation for 8-bit to 256-bit word sizes, •constant functions for every possible 8-bit word, •compression functions from hash functions such as SHA-256's compression function, •elliptic curve point operations for the Secp256k1 curve [9], and •digital signature validation for ECDSA [23] or Schnorr [28] signatures. We take advantage of the fact that the representation of the values used for arithmetic expressions in the Bit Machine match the binary memory format for real hardware. This lets us write these jets by directly reading from and writing to data frames. Jets have several nice properties: •Jets provide a formal speci cation of their behavior. The implementation of a jet must produce output identical to the output that would be pro- duced by the Simplicity expression being replaced. There is no possibility for an ambiguous interpretation of what a jet computes. •Jets cannot accidentally introduce new behavior or new side e ects be- cause they can only replicate the behavior of Simplicity expressions. To add new behavior to Simplicity we must explicitly extend Simplicity (see Section 4). •Jets are transparent when it comes to reasoning about Simplicity expres- sions. Jets are logically equal to the code they replace. Therefore, when proving properties of one's Simplicity code, jets can safely be ignored. 17 Naturally, we expect jetted expressions to have properties already proven and available; this will aid reasoning about Simplicity programs that make use of jets. Because jets are transparent, the static analyses of resource costs are not a ected by their existence. To encourage the use of jets, we anticipate discounts to be applied to the resource costs of programs that use jets based on the estimated savings of using jets. When a suitably rich set of jets is available, we expect the bulk of the computation speci ed by a Simplicity program to be made up of these jets, with only a few combinators used to combine the various jets. This should bring the computational requirements needed for Simplicity programs in line with existing blockchain languages. In light of this, one could consider Simplicity to be a family of languages, where each language is de ned by a set of jets that provide computational elements tailored for its particular application. 4 Integration with Blockchains Core Simplicity is language that does pure computation. In order to interact with blockchains we extend Simplicity with new combinators. 4.1 Transaction Digests The main operation used in Bitcoin Script is OPCHECKSIG which, given a public key, a digital signature, and a SigHash type [15], generates a digest of the transaction in accordance with the SigHash type and validates that the digital signature for the digest is correct for the given public key. This operation allows users to create programs that require their signatures for their transactions to be authorized. In core Simplicity we can implement, and jet, the digital signature validation algorithm. However, it is not possible to generate the transaction digest because core Simplicity doesn't have access to the transaction data. To remedy this, we add a new primitive combinator to Simplicity sighash :SigHashType`2256 where SigHashType := (1+2)2is a Simplicity type suitable for encoding all possible SigHash types. This combinator returns the digest of the transaction for the given SigHash type. Together with the Simplicity implementation of digital signature veri ca- tion, we can implement the equivalent of Bitcoin's OPCHECKSIG . We can add other primitives to Simplicity to access speci c elds of trans- action data in order to implement features such as Bitcoin's timelock oper- ations [30, 7]. While Simplicity avoids providing direct access to persistent storage, one could imagine an application where transactions contain data for transactional updates to a persistent store. Simplicity could support primitives 18 to read the details of these transactional updates and thereby enforce any set of programmable rules on them. 4.2 Merklized Abstract Syntax Tree Recall that when using P2SH, users commit to their program by hashing it and placing that hash in the outputs of transactions. Only when redeeming their funds does the user reveal their program, whose hash must match the committed hash. Pay to Merklized Abstract Syntax Tree , orP2MAST [17], enhances the P2SH idea. Instead of hashing a linear encoding of a Simplicity expression, we use the SHA-256's block compression function, SHA256Block :22562512!2256, to recursively hash Simplicity sub-expressions. This computes a Merkle root of Simplicity's abstract syntax tree that we denote by #( ) and de ne as #(iden):=SHA256Blockhtagiden;b0c2512i #(compst):=SHA256Blockhtagcomp;h#(s);#(t)ii #(unit):=SHA256Blockhtagunit;b0c2512i #(injlt):=SHA256Blockhtaginjl;h#(t);b0c2256ii #(injrt):=SHA256Blockhtaginjr;h#(t);b0c2256ii #(casest):=SHA256Blockhtagcase;h#(s);#(t)ii #(pairst):=SHA256Blockhtagpair;h#(s);#(t)ii #(taket):=SHA256Blockhtagtake;h#(t);b0c2256ii #(dropt):=SHA256Blockhtagdrop;h#(t);b0c2256ii #(sighash ):=SHA256Blockhtagsighash;b0c2512i where tagc:2256is an appropriate unique set of initial vectors per combinator. We use the SHA-256 hash of the combinator name for its tagvalue. When computing Merkle roots, like other kinds of static analysis, the inter- mediate results of sub-expressions can be shared. Bitcoin Script cannot share sub-expressions in this manner due to the linear encoding of Bitcoin Script programs. Another advantage of Merkle roots is that unused branches of case expres- sions can be pruned at redemption time. Each unused branch can be replaced with the value of its Merkle root. This saves on bandwidth, storage costs, and enhances privacy by not revealing more of a Simplicity program than necessary. Again, this is something not possible in Bitcoin Script. To enable redemption of pruned Simplicity expressions, we add two new combinators to replace the case combinator when pruning. s:AC`D h :2256 assertlsh: (A+B)C`Dh:2256t:BC`D assertrht: (A+B)C`D 19 These assertion combinators follow the same form as the case combinator, except one branch is replaced by a hash. The semantics of these combinators require that the rst component of their input be LorRas appropriate and then they evaluate the available branch. The h:2256values do not a ect the semantics; they instead in uence the Merkle root computation. #(assertlsh):=SHA256Blockhtagcase;h#(s);hii #(assertrht):=SHA256Blockhtagcase;hh;#(t)ii Notice that we use tagcasefor the tags of the assertions. During redemption, one can replace casestatements with appropriate assertions while still matching the committed Merkle root of the whole expression. #(casest) = #( assertls#(t)) = #( assertr #(s)t) As long as the assertions hold, the computation remains unchanged. If an assertion fails, because you pruned o a branch that was actually necessary, then the computation fails and a transaction trying to redeem funds in that manner is invalid. Because failure is now a possible result during evaluation, we add a combi- nator failto allow one to develop programs that use assertions. fail:A`B #(fail):=SHA256Blockhtagfail;b0c2512i When combined with the signature veri cation expression, one can build the equivalent of Bitcoin's OPCHECKSIGVERIFY operation to assert that a signature is valid. Degenerate assertions can also be used to enhance privacy by mixing entropy into Merkle roots of sub-expressions. Given t:A`Bthe expression comp (pair(injl iden )unit) (assertl (taket)h) :A`B is semantically identical to t, but mixes hinto its Merkle root computation. When used inside branches that are likely to be pruned, this prevents adversaries from e ectively grinding out Simplicity expressions to see if they match the hash of the missing branch. The Merkle root of an expression does not commit to its types. We use rst-order uni cation [27] to perform type inference on Simplicity expressions, replacing any remaining type variables with the unit type. Because the types of pruned branches are discarded, the inferred types may end up smaller than in the originally committed program. When this happens, the memory requirements for evaluation with the Bit Machine may also decrease. 20 4.3 Witness Values During redemption, the user must provide inputs, such as digital signatures and other witness data, in order to authorize a transaction. Rather than passing this input as an argument to the Simplicity program, we embed such witness values directly into the Simplicity expressions using the witness combinator. b:B witnessb:A`B Semantically, the witness combinator just denotes a constant function, which is something we can already write in core Simplicity. The di erence lies in its Merkle root computation. #(witnessb):=SHA256Blockhtagwitness;b0c2512i The valuebis not committed by the Merkle root. This allows the user to setwitness value at redemption time, without a ecting the expression's Merkle root. Users can use witness combinators at places where digital signatures are needed and at places where choices are made at redemption time. Using witness combinators enhances privacy because they are pruned away when they occur in unused branches. This leaves little evidence that there was an optional input at all. The amount of witness data allowed at redemption time is limited at com- mitment time because each witness data type is nite and there can only be a nite number of witness combinators committed. This limits the computa- tional power of Simplicity. For example, it is not possible to create a Simplicity program that allows hashing of an unbounded amount of witness data in order to validate a digital signature. However, it is possible to create a Simplicity program that allows a large, but bounded, amount of witness data to be hashed that is more than will ever be needed in practice. Thanks to pruning, only the code used to hash the amount of witness data that actually occurs need be provided at redemption time. Type inference determines the minimal type for witness values. This pre- vents them from being lled with unnecessary data. The witness combinator is not allowed to be used in jets. 4.4 Extended Simplicity Semantics In order to accommodate these extensions to core Simplicity, we need to broaden Simplicity's semantics. We use a monad, M, to capture the new e ects of these extensions. M(A):=Trans!A? This monad is a combination of an environment monad (also called a reader monad) with an exception monad. 21 This monad provides implicit access to a value of Trans type, which we de ne to be the type of transaction data for the particular blockchain. During evaluation, it is lled with the transaction containing the input redeeming the Simplicity program being evaluated. This is used to give semantics to the sighash and other similar primitives. The monad also adds a failure value to the result type, denoted by ?:A? This allows us to give semantics to assertions and fail. Given an expression t:A`B, we denote this extended semantics by JtKM: A!M(B). The core Simplicity semantics are lifted in the natural way so that JtKM(a) =e:Trans:JtK(a) holds whenever tis composed of only core Simplicity combinators. The extended set of combinators have the following semantics Jsighash KM(a):=e:MakeSigHash (a;e) JassertlshKMhL(a);ci:=e:JsKMha;ci(e) JassertlshKMhR(b);ci:=e:? JassertrhtKMhL(a);ci:=e:? JassertrhtKMhR(b);ci:=e:JtKMhb;ci(e) JfailKM(a):=e:? JwitnessbKM(a):=e:b where MakeSigHash (a;e) is a function that returns a hash of a given transaction ein accordance with the given SigHash type a. The operational semantics are also extended to support our new combinators by providing the Bit Machine with access to the transaction data and by adding an explicit crash instruction to support assertions and fail. We note that the e ects captured by our monad are commutative and idem- potent.2While Simplicity's operational semantics implicitly specify an order of evaluation, the extended denotational semantics are independent of evaluation order. This simpli es formal reasoning about Simplicity programs that use the extended semantics. That said, we expect the majority of Simplicity program's sub-expressions to be written in core Simplicity whose denotational semantics contain no e ects at all, making reasoning about them simpler still. 4.5 Using Simplicity Programs in Blockchains Simplicity programs are Simplicity expressions of type p:1`1, that may use any of our extended combinators. Users transact by constructing their Simplic- 2We use the terms `commutative' and `idempotent' in the sense of King and Wadler [16] as opposed to the traditional category theoretic de nition of an idempotent monad. 22 ity program and computing its Merkle root #( p). They have their counterparty create a transaction that sends funds to that hash. Later, when a user wants to redeem their received funds, they create a trans- action whose input contains a Simplicity program whose Merkle root matches the previous hash. At this point they have the ability to set the witness values and prune any unneeded branches from case expressions. The witness combi- nators handle the program's e ective inputs, so the program pis evaluated at the valuehi:1. No output is needed because the program can use assertions to fail in case of invalid witnesses. If the execution completes successfully, without failing, the transaction is considered valid. The basic signature program that mimics Bitcoin's basic signature program is composed of the following core Simplicity expressions checkSig :Signature(PubKey2256)`2 pubKey :A`PubKey where checkSig checks whether a given signature validates for a given public key and message hash, and pubKey returns a user's speci c public key. These expressions can be combined into a basic signature veri cation pro- gram. basicSigVerify bc:=comp (pair(witnessb) (pair pubKey (comp (witnessc)sighash ))) (comp (pair checkSig unit ) (case fail unit )) Other, more complex programs can be built to perform multi-signature checks, to implement sophisticated smart contracts such as zero-knowledge con- tingent payments, or to create novel smart contracts. 5 Results and Future Work In many ways, Simplicity is best characterized by what features it leaves out rather than what features it contains. •Simplicity has no state. Purely functional, expression-based languages facilitate equational reasoning about the semantics of expressions. For example, there are no concerns about aliased references to a global heap, so there is no need to work with separation logic or Hoare logic. •Simplicity has no named variables. Using combinators lets us avoid deal- ing with binders and environments for bound variables. This helps keep our interpreter and static analyses simple and further eases equational reasoning about Simplicity expressions. 23 •Simplicity has no function types and therefore no higher-order functions. While it is possible to compute upper bounds of computation resources of expressions in the presence of function types, it likely that those bounds would be so far above their actual needs that such analysis would not be useful. •Simplicity has no unbounded loops or recursion. It is possible to build smart contracts with state carried through loops using covenants [25], without requiring unbounded loops within Simplicity itself. Bounded loops, such as the 64 rounds needed by our SHA-256 implementation, can be achieved by unrolling the loop. Because of sub-expression sharing, this doesn't unreasonably impact program size. We do not directly write Simplicity, rather we use functions written in Coq or Haskell to generate Simplicity. These languages do support recursion and we use loops in these meta-languages to generate unrolled loops in Simplicity. Throughout this paper we have noted which theorems we have veri ed with Coq. Other proofs are under development. In particular, we plan to formally verify the denotational and operational semantics of the full Simplicity language, including assertions and blockchain primitives. To validate the suitability of Simplicity, we will be building example smart contracts in a test blockchain or sidechain [4] application using Simplicity. We also plan to use the VST project [3] to prove the correctness of our C implementation of the Bit Machine. This would let us formally verify that the assembly code generated by the CompCert compiler [18] from our C imple- mentation respects Simplicity's formal semantics. In particular, we would be able to prove that substituting jets, such as SHA-256, with fast C or assembly implementations preserves the semantics of Simplicity. Simplicity is designed as a low-level language interpreted by blockchain soft- ware. We anticipate higher-level languages will be used for development and compiled to Simplicity. Ivy [10] and the -State Authentication Language [11], are existing e orts that may be suitable for being compiled to Simplicity. If these higher-level languages come with formal semantics of their own, we will have the opportunity to prove correct the compiler to Simplicity for these lan- guages. For the time being, generating Simplicity with our Haskell and Coq libraries is possible. 6 Conclusion We have de ned a new language designed to be used for crypto-currencies and blockchains. It could be deployed in new blockchain applications, including sidechains [4], or possibly in Bitcoin itself. Simplicity has the potential to be used in any application where nitary programs need to be transported and executed under potentially adversarial conditions. Our language is bounded, without loops, but is expressive enough to repre- sent any nitary function. These constraints allow for general purpose static 24 analysis that can e ectively bound the amount of computational resources needed by a Simplicity program prior to execution. Simplicity has simple, functional semantics, which make formal reasoning with software proof assistants relatively easy. This provides the means for people who develop smart contract to formally verify the correctness of their programs. We have written several low-level functions in Simplicity such as addition, subtraction, and multiplication for various nite-bit words and formally veri ed their correctness. With these we have built mid-level functions such as elliptic curve addition and multiplication, ECDSA signature validation, and a SHA- 256 compression function. This is already sucient to create simple single and multi-signature veri cation programs in Simplicity. We have formally veri ed our SHA-256 compression function is correct and have plans to formally verify the remaining functions. 25 A Simplicity Semantics in Coq Below is the formal de nition of core Simplicity as expressed in Coq [29]. The Term type is the type of well-typed Simplicity expressions. The eval function provides the denotational semantics of well-typed Simplicity expressions. B Full Word Adders in Simplicity Below we recursively de ne Simplicity programs for ripple-carry full-adders for any 2n-bit word size. A full-adder takes two n-bit words and a carry-in bit as inputs and returns a carry-out bit and an n-bit word. full-adder n: (2n2n)2`22n full-adder 1:=comp (pair(take half -adder ) (drop iden )) (comp (pair(take(take iden )) (comp (pair(take(drop iden )) (drop iden )) half-adder )) (pair(case(drop(take iden )) (injr unit )) (drop(drop iden )))) full-adder 2n:=comp (pair(take(pair(take(take iden )) (drop(take iden )))) (comp (pair(take(pair(take(drop iden )) (drop(drop iden )))) (drop iden )) full-adder n)) (comp (pair(drop(drop iden )) (comp (pair(take iden ) (drop(take iden ))) full-adder n)) (pair(drop(take iden )) (pair(drop(drop iden )) (take iden )))) Theorem B.1 (Full Adder Correct) Letnbe a power of two. Let a;b:2n be twon-bit words. Let c:2be a bit. Then dxe22n+dye2n=dae2n+dbe2n+dce2 where Jfull-adder Khha;bi;ci=hx;yi 26 We have veri ed the above theorem in Coq. We have similarly de ned multiplication for 2n-bit words and proven its correctness theorem in Coq. C Tail Composition Optimization We de ne a variant of the translation of Simplicity to the Bit Machine, /uni27EA/uni27EB, to add a tail composition optimization (TCO). This optimization moves the dropFrame instruction earlier, potentially reducing the memory requirements for execution by the Bit Machine. This is analogous to the tail call optimization found in other languages. Our new de nition will be a pair of mutually recursive functions, /uni27EA/uni27EBtco o and/uni27EA/uni27EBtco on. The de nition of /uni27EA/uni27EBtco o is identical to that of /uni27EA/uni27EB, replacing /uni27EA/uni27EBby/uni27EA/uni27EBtco o , except for the /uni27EAcompst:A`C/uni27EBtco o clause which is given below. /uni27EAcompst:A`C/uni27EBtco o :=newFrame (bitSize (B)); /uni27EAs:A`B/uni27EBtco o ;moveFrame ;/uni27EAt:B`C/uni27EBtco on In the tail position of the comp combinator, we removed the dropFrame instruction and call /uni27EA/uni27EBtco oninstead. The de nition of /uni27EA/uni27EBtco onis given in Figure 4. We have formally veri ed in Coq the following correctness theorem for /uni27EA/uni27EBtco o . Theorem C.1 (Correctness of TCO Operational Semantics) Lett: A`Bbe any Simplicity expression. Let v:Abe any value of type A. Initialize a Bit Machine with •the value pvqAas the only frame on the read-frame stack with its cursor at the beginning of the frame, and •the value [?]bitSize (B)as the only frame on the write-frame stack with its cursor at the beginning of the frame. After executing the instructions /uni27EAt:A`B/uni27EBtco o , the nal state of the Bit Machine has •the value pvqAas the only frame on the read-frame stack with its cursor at the beginning of the frame, and •the value pJtK(v)qBas the only frame on the write-frame stack with its cursor at the end of the frame. In particular, the Bit Machine never crashes during this execution. The proof proceeds by establishing that the machine state transformation induced by executing the instructions /uni27EAt:A`B/uni27EBtco o ;dropFrame 27 /uni27EAiden:A`A/uni27EBtco on:=copy (bitSize (A));dropFrame /uni27EAcompst:A`C/uni27EBtco on:=newFrame (bitSize (B));/uni27EAs:A`B/uni27EBtco on; moveFrame ;/uni27EAt:B`C/uni27EBtco on /uni27EAunit:A`1/uni27EBtco on:=dropFrame /uni27EAinjlt:A`B+C/uni27EBtco on:=write (0);skip(padl(B;C));/uni27EAt:A`B/uni27EBtco on /uni27EAinjrt:A`B+C/uni27EBtco on:=write (1);skip(padr(B;C));/uni27EAt:A`C/uni27EBtco on /uni27EAcasest: (A+B)C`D/uni27EBtco on:= match read with 8 >>< >>:0!fwd(1 + padl(A;B)); /uni27EAs:AC`D/uni27EBtco on 1!fwd(1 + padr(A;B)); /uni27EAt:BC`D/uni27EBtco on /uni27EApairst:A`BC/uni27EBtco on:=/uni27EAs:A`B/uni27EBtco o ;/uni27EAt:A`C/uni27EBtco on /uni27EAtaket:AB`C/uni27EBtco on:=/uni27EAt:A`C/uni27EBtco on /uni27EAdropt:AB`C/uni27EBtco on:=fwd(bitSize (A));/uni27EAt:B`C/uni27EBtco on Figure 4: Operational semantics for Simplicity using the Bit Machine with TCO. and the instructions /uni27EAt:A`B/uni27EBtco on are identical. We would like an improved static analysis of the memory use of this TCO ex- ecution. Figure 5 de nes the static analysis cellBndtco(t:A`B) which bounds the memory use of the TCO execution. The static analysis becomes somewhat more intricate with the more complex translation. But we may proceed with con dence because we have a formal veri cation in Coq of the following theorem. Theorem C.2 (Static Analysis of Cell Usage with TCO) Lett:A`B be any Simplicity expression. Let v:Abe any value of type A. Initialize a Bit Machine as speci ed in Theorem C.1. The maximum number of cells in both stacks of the Bit Machine at any point during the execution of /uni27EAt:A`B/uni27EBtco o from this initial state never exceeds cellBndtco(t:A`B). The proof proceeds by establishing that the additional memory used by/uni27EAt:A`B/uni27EBtco o and/uni27EAt:A`B/uni27EBtco onin any machine state is no more than max(n1;n2) and max(n1m;n 2) respectively where hn1;n2i=extraCellBndtco(t: A`B) andmis the number of cells in the active read frame before executing /uni27EAt:A`B/uni27EBtco on. There is a possibility for a head composition optimization where the newFrame (n) instruction is delayed in order to potentially save memory. 28 It is unclear to us if this is worth the added complexity, so we have not pursued this yet. Acknowledgements Thank you to Shannon Appelcline for his help editing this paper. 29 extraCellBndtco(iden:A`A):=h0;0i extraCellBndtco(compst:A`C):= lethn1;n2i= extraCellBndtco(s:A`B) in lethm1;m2i= extraCellBndtco(t:B`C) in letb=bitSize (B) in hmax(b+n1;m1;b+m2);b+n2i extraCellBndtco(unit:A`1):=h0;0i extraCellBndtco(injlt:A`B+C):=extraCellBndtco(t:A`B) extraCellBndtco(injrt:A`B+C):=extraCellBndtco(t:A`C) extraCellBndtco(casest: (A+B)C`D):= lethn1;n2i= extraCellBndtco(s:AC`D) in lethm1;m2i= extraCellBndtco(t:BC`D) in hmax(n1;m1);max(n2;m2)i extraCellBndtco(pairst:A`BC):= lethn1;n2i= extraCellBndtco(s:A`B) in lethm1;m2i= extraCellBndtco(t:A`C) in hm1;max(n1;n2;m2)i extraCellBndtco(taket:AB`C):=extraCellBndtco(t:A`C) extraCellBndtco(dropt:AB`C):=extraCellBndtco(t:B`C) cellBndtco(t:A`B):= lethn1;n2i=extraCellBndtco(t:A`B) in bitSize (A) +bitSize (B) +max(n1;n2) Figure 5: De nition of cellBndtco. 30 References [1] G. Andresen. BIP16: Pay to script hash. Bitcoin Improve- ment Proposal, 2012. https://github.com/bitcoin/bips/blob/master/ bip-0016.mediawiki . [2] A. W. Appel. Veri cation of a cryptographic primitive: `-256. ACM Trans. Program. Lang. Syst. , 37(2):7:1{7:31, April 2015. [3] A. W. Appel. Veri able C. http://vst.cs.princeton.edu/download/ VC.pdf , July 2016. [4] A. Back, M. Corallo, L. Dashjr, M. Friedenbach, G. Maxwell, A. Miller, A. Poelstra, J. Tim on, and P. Wuille. Enabling blockchain innovations with pegged sidechains, 2014. https://www.blockstream.com/sidechains. pdf. [5] K. Bhargavan, A. Delignat-Lavaud, C. Fournet, A. Gollamudi, G. Gonthier, N. Kobeissi, N. Kulatova, A. Rastogi, T. Sibut-Pinote, N. Swamy, and S. Zanella-B eguelin. Formal veri cation of smart contracts: Short paper. InProceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security , PLAS '16, pages 91{96, New York, NY, USA, 2016. ACM. [6] bitcoinwiki. Script. https://en.bitcoin.it/w/index.php?title= Script&oldid=61707 , 2016. [7] BtcDrak, M. Friedenbach, and E. Lombrozo. BIP112: Checksequencever- ify. Bitcoin Improvement Proposal, 2015. https://github.com/bitcoin/ bips/blob/master/bip-0112.mediawiki . [8] V. Buterin. CRITICAL UPDATE Re: DAO Vul- nerability. https://blog.ethereum.org/2016/06/17/ critical-update-re-dao-vulnerability/ , June 2016. [9] Certicom Research. Standards for Ecient Cryptography 2: Recommended Elliptic Curve Domain Parameters. Standard SEC2, Certicom Corp., Mis- sissauga, ON, USA, September 2000. [10] Chain. Announcing ivy playground, May 2017. https://blog.chain. com/announcing-ivy-playground-395364675d0a . [11] A. Chepurnoy. -state authentication language, an alternative to bitcoin script. Poster Session at the 21st International Conference on Financial Cryptography and Data Security, April 2017. [12] Ethereum. Solidity Documentation: Release 0.4.14. https://media. readthedocs.org/pdf/solidity/develop/solidity.pdf , June 2017. 31 [13] G. Gentzen. Investigations into logical deduction. In M.E. Szabo, editor, The collected papers of Gerhard Gentzen , Studies in logic and the founda- tions of mathematics, chapter 3. North-Holland Pub. Co., 1969. [14] S. Goldfeder, J. Bonneau, R. Gennaro, and A. Narayanan. Escrow pro- tocols for cryptocurrencies: How to buy physical goods using bitcoin. http://fc17.ifca.ai/preproceedings/paper_122.pdf , April 2017. To appear in the proceedings of the 21st International Conference on Financial Cryptography and Data Security. [15] Bitcoin Developer Guide. Signature hash types, 2014. https://bitcoin. org/en/developer-guide#signature-hash-types . [16] D. J. King and P. Wadler. Combining Monads , pages 134{143. Springer London, London, 1993. [17] J. Lau. BIP114: Merkelized abstract syntax tree. Bitcoin Improve- ment Proposal, 2016. https://github.com/bitcoin/bips/blob/master/ bip-0114.mediawiki . [18] X. Leroy. Formal veri cation of a realistic compiler. Communications of the ACM , 52(7):107{115, 2009. [19] G. Maxwell. Zero-knowledge contingent payment, 2011. https://en. bitcoin.it/wiki/Zero_Knowledge_Contingent_Payment . [20] S. Nakamoto. Bitcoin: A peer-to-peer electronic cash system. http:// bitcoin.org/bitcoin.pdf , November 2008. [21] S. Nakamoto. misc changes. https://github.com/bitcoin/bitcoin/ commit/4bd188c4383d6e614e18f79dc337fbabe8464c82 , August 2010. https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@131 . [22] S. Nakamoto. Re: Transactions and Scripts: DUP HASH160 ... EQUALVERIFY CHECKSIG. https://bitcointalk.org/index.php? topic=195.msg1611#msg1611 , June 2010. [23] National institute of standards and technology. FIPS pub 186-4 federal information processing standards publication digital signature standard (dss). 2013. [24] National institute of standards and technology. FIPS 180-4, secure hash standard, federal information processing standard (FIPS), publication 180- 4. Technical report, DEPARTMENT OF COMMERCE, August 2015. [25] R. O'Connor. Covenants in elements alpha, 2016. Blog post, https:// blockstream.com/2016/11/02/covenants-in-elements-alpha.html . [26] Parity. The multi-sig hack: A postmortem, July 2017. https:// paritytech.io/blog/the-multi-sig-hack-a-postmortem.html . 32 [27] M. S. Paterson and M. N. Wegman. Linear uni cation. Journal of Com- puter and System Sciences , 16(2):158 { 167, 1978. [28] C. P. Schnorr. Ecient identi cation and signatures for smart cards. In Proceedings of CRYPTO '89 , 1989. [29] The Coq Development Team. The Coq Proof Assistant Reference Manual: Version 8.6. https://coq.inria.fr/refman/ , 2016. [30] P. Todd. BIP65: Op checklocktimeverify. Bitcoin Improvement Proposal, 2014. https://github.com/bitcoin/bips/blob/master/ bip-0065.mediawiki . [31] G. Wood. Ethereum: A secure decentralised generalised transaction ledger, 2014. http://gavwood.com/paper.pdf . [32] C. Yarvin, P. Monk, A. Dyudin, and R. Pasco. Urbit: A solid-state inter- preter, May 2016. http://media.urbit.org/whitepaper.pdf . 33
{ "id": "1711.03028" }
2206.05081
The Evolution Of Centralisation on Cryptocurrency Platforms
More than ten years ago the blockchain was acclaimed as the solution to overcome centralised trusted third parties for online payments. Through the years the crypto-movement changed and evolved, although decentralisation remained the core ideology and the necessary feature every new crypto-project should provide. In this paper we study the concept of centralisation in cryptocurrencies using a wide array of methodologies from the complex systems literature, on a comparative collection of blockchains, in order to define the many different levels a blockchain system may display (de-)centralisation and to question whether the present state of cryptocurrencies is, in a technological and economical sense, actually decentralised.
http://arxiv.org/pdf/2206.05081v2
Carlo Campajola, Raffaele Cristodaro, Francesco Maria De Collibus, Tao Yan, Nicolo' Vallarano, Claudio J. Tessone
physics.soc-ph, cs.CR, econ.GN, q-fin.EC
physics.soc-ph
The Evolution Of Centralisation on Cryptocurrency Platforms Carlo Campajola1,2,3, Raffaele Cristodaro2, Francesco Maria De Collibus2, Tao Yan2, Nicol `o Vallarano2,3, and Claudio J. Tessone2,3,* 1DLT Science Foundation, London, United Kingdom 2University of Zurich, Blockchain & Distributed Ledger Technologies, Department of Informatics, Z ¨urich, Switzerland 3UZH Blockchain Center, Z ¨urich, Switzerland *claudio.tessone@uzh.ch ABSTRACT More than ten years ago the blockchain was acclaimed as the solution to overcome centralised trusted third parties for online payments. Through the years the crypto-movement changed and evolved, although decentralisation remained the core ideology and the necessary feature every new crypto-project should provide. In this paper we study the concept of centralisation in cryptocurrencies using a wide array of methodologies from the complex systems literature, on a comparative collection of blockchains, in order to define the many different levels a blockchain system may display (de-)centralisation and to question whether the present state of cryptocurrencies is, in a technological and economical sense, actually decentralised. Introduction In the wake of the 2008 Great Financial Crisis, the whitepaper “Bitcoin: A Peer-to-Peer Electronic Cash System”1was published by the pseudonymous Satoshi Nakamoto. The paper began with a direct attack to the state of electronic payments on the internet: a critique on the central role of third parties to provide trust among users and the complete absence of non-reversible payments online. After describing the problem the paper proceeds to present Nakamoto’s solution, a relatively old2and up to then fringe technology: the blockchain, a distributed and decentralised ledger where information is maintained consistent across the network by a peer-to-peer consensus protocol and secured via cryptography. Bitcoin was the first and thus far most successful platform of what have become commonly known as “cryptocurrencies”, digital assets that rely on cryptographic security to solve the double-spending problem, typically through a decentralised ledger rather than a centralised authoritative server. Following Bitcoin’s success, many more cryptocurrency projects started, each one with its own specific quirk yet charac- terised by the same common goal: to build a decentralised payment system, available to anyone without the need of reciprocal trust (or a third party providing it). For this reason the proponents of Bitcoin and other cryptocurrencies typically call it a “truly democratic” form of money3, as opposed to the “tyrannical money” issued by governments. The main purpose of our study is to question whether the initial aspirations behind the creation of Bitcoin have been fulfilled. As pointed out by Taleb4, Bitcoin and the likes suffer from design problems that lead to intrinsic fragilities, which in turn can compromise their utility. In our work we investigate these fragilities: we perform a large scale comparative analysis of multiple cryptocurrency platforms, sourcing the data directly from the respective blockchains, and adopt methods from network and complex systems science to define and investigate the concept of decentralisation in cryptocurrencies systems. The blockchains we analyse are Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Dogecoin, Monacoin and Feathercoin. We analyse data ranging from the systems inceptions until December 2020, adopting state of the art methodologies5to transform the raw blockchain data into a meaningful dataset of economic transactions between “entities”. Entities are intended to be the closest possible representation of distinct economic agents on the blockchain: they can correspond to individuals, groups of individuals or businesses that operate in the system, coping with the pseudonymous nature of cryptocurrencies. The entities on the blockchain interact through transactions, i.e. by sending tokens to one another to exchange value. This interaction mechanism is naturally suitable for a network representation, which has been widely adopted in the literature6, where entities are mapped to nodes and directed links are established following the transactions flow. This provides a new perspective to study a cryptocurrency as an interconnected system of agents7of which we are able to quantitatively define and measure the centralisation. As an example, the emergence of a giant connected component8in the transaction networks of all the cryptocurrencies under study signals how all the users participate to the same economic community. Another interesting point is the detection of a core component9of the network, a subset of highly inter-linked nodes which keep the networkarXiv:2206.05081v2 [physics.soc-ph] 3 May 2023 Figure 1. (a) Total number of addresses appeared on blockchain as function of total number of identified entities. Each plot point corresponds to the totals measured on the same block, with weekly frequency. Axes are logarithmic and the dashed line is reference for y=x. (b) Average number of addresses per entity over time. together, taking a middle-men positioning in the networks. Moreover we are able to measure the wealth of entities and relate it to their position in the transaction networks. Similar analyses have been performed in the past for the “cumulative” network, i.e. the network containing all transactions that happened up to a given point in history6: we go beyond by splitting the time-frame in weekly time-windows, thus reducing the reciprocal impact of transactions spread far apart in time. It is indeed not particularly reasonable to consider in the same static network transactions which happened over 10 years apart. A similar approach in this respect has been recently taken for Bitcoin10, 11, and we generalise their analysis to six more platforms, providing an unprecedented quantitative overview of the crypto market. In the following section we describe the impact that the identification of entities has on the structure of the blockchain data and of transaction networks. We then focus on the networks and their global properties, such as the distribution of degrees and the identification of the network core, and then tackle the problem of mining power concentration and how it affects the distribution of wealths in the system. We conclude by discussing the results. For readability purposes the technical details about the data and methods are reported in the Materials and Methods section, following the discussion. Results Clustering matters. We begin by analysing the effect of applying address clustering on UTXO-based blockchain data. Figure 1a shows the relation between the number of entities, identified by adopting the heuristic address clustering logic described in the Materials and Methods section, and the number of addresses that have appeared on the blockchain. Each data point refers to the totals observed up to a given block, with weekly frequency, and time “flows” from the bottom left to the top right of the panel. The results show strong similarities across the six platforms considered: this consistency is expected, as all these platforms share the same architecture in the address management protocols. New addresses are continuously generated with each transaction, and more active entities will accumulate more addresses on average. It is interesting to notice that there are several “regimes” in Figure 1a, with the slope of the curve changing over time. We plot this slope, i.e. the average number of addresses per entity, as a function of time in Figure 1b. Three regimes can be identified in the history of these cryptocurrencies: an early stage where the average grows, a relatively stable period between 2014 and 2017, followed by a decline after 2018. Interestingly, the transition from one regime to the other is marked by two of the well-known “crypto bubbles”, in 2013 and 2017, that were possibly the drivers of these shifts12. The first saw the creation of multiple so-called “alt-coins”, alternative cryptocurrencies running on their own blockchains which aimed to capitalise on the large influx of funds in the ecosystem, a class which includes all non-BTC assets in our analysis. In the period between the bubbles the average number of addresses owned by entities stayed at a relatively high value: relatively few new participants were entering the system since public 2/14 Figure 2. Size of the largest Strongly Connected Component in UTXO-based cryptocurrencies. interest had declined after the bubble burst, which means that transactions (and thus address creation) were primarily involving pre-existing entities. The picture changed after the 2017-18 bubble, when cryptocurrencies entered the mainstream of financial assets, receiving serious consideration by markets and institutions and leading to the consolidation of major service providers like leading exchanges Coinbase, Binance, etc. Since then public attention for the crypto ecosystem has stayed high and a large number of new entities entered the system, most of the times controlling just one or two addresses since they wouldn’t use the blockchain to operate many transactions anymore. Indeed after 2018 blockchains started to experience congestion problems13, i.e. blocks reached capacity and thus adding new transactions to the blockchain became more costly. This created incentives to operate off-chain, mostly through service providers or so-called “layer 2” technologies like the Lightning Network14, thus reducing the average number of addresses per entity. We can then consider the effect that address clustering has on the structure of transaction networks. We measure the size of the largest Strongly Connected Component (SCC) in the address networks and compare it to the one in the entity networks, shown in Fig. 2 for the six cryptocurrencies of our analysis. Such a metric is essential to measure the fragmentation of the economy: if many nodes don’t belong to the largest SCC it is a significant sign of decentralisation, as it means that there are no bridges across different communities; on the other hand if the vast majority of nodes belongs to the largest SCC it signals that such bridges exist and that a token can travel from one side of the network to the other. It is clear the address networks do not show the so-called “giant component” (i.e. a SCC that spans the whole network), which would suggest that these economies are highly fragmented and decentralised; however the illusion becomes apparent as soon as one looks at entity networks, where the largest SCC spans almost the entire network for most of the time. We should stress out the emergence of a Giant Connected Component is a necessary yet not sufficient condition for the economy to be centralised: a disconnected economy composed of isolated communities which keep money from flowing around cannot be centralised as a whole. A notable outlier in this is Dogecoin, where the largest SCC seems to be of about the same size in both representations, spanning approximately half the network. This observation then provides evidence that address clustering is a necessary step to take to get meaningful results about the economic structure of cryptocurrencies, as the obfuscation of identities through multiple addresses significantly affects the observations. In the following we will only present results on the entity networks for UTXO-based cryptocurrencies, unless specified otherwise. Degree distributions. The degree of a node represents the number of counterparts that entity exchanges tokens with, and is typically considered a measure of importance within the network. What is particularly relevant is to consider the distribution 3/14 BTC LTC DOGE BCH FTC MONA ETH aMinimum 1.74 1.31 1.45 1.47 1.60 1.49 1.50 Maximum 10.99 5.84 3.83 9.89 4.81 7.69 3.42 1. Quartile 2.42 2.43 2.45 2.28 2.33 2.46 1.68 3. Quartile 2.93 3.08 3.09 2.94 3.18 3.21 1.81 Median 2.69 2.71 2.88 2.65 2.68 2.72 1.76 DPar Median 0.03 0.05 0.05 0.04 0.08 0.10 0.03 DBin Median 0.35 0.41 0.42 0.37 0.37 0.41 0.43 Table 1. Summary statistics on exponents of power-law fit of degree distribution on the weekly transaction networks. Figure 3. Assortativity coefficient for weekly transaction networks. of degrees, as its shape is a direct consequence of the way in which the networks form. The degree distribution has been shown to be strongly skewed, akin to a power-law Pareto type distribution, for many traditional economic and financial systems such as interbank markets15, corporate payments16and in experiments17. This has also been observed in several analyses of cryptocurrency networks of transactions that represent the whole history6, 18, and our results broadly agree with the literature on the much shorter weekly timescale we select. We estimate the maximum likelihood parameters of a Pareto distribution and a binomial distribution for the degrees, which would be consistent with the null hypothesis of a Barabasi-Albert-type network or an Erdos-Renyi random network respectively, and find that the former is a much better description of the data than the latter in all of our samples. While we do not find that either distribution properly fits the data - indeed a Kolmogorov-Smirnov test rejects both null hypotheses at the 20% level in the vast majority of weeks - we still find that the Kolmogorov-Smirnov distance is much lower for a Pareto-type distribution ( DParin Table 1) rather than a binomial ( DBin), hinting to the presence of fat tails. In Table 1 we report the statistics for the exponent aof a Pareto fit of the degree distribution, averaged over the whole sample. We find that in general the power-law exponent is between 2.5 and 3 for the UTXO-based cryptocurrencies - for which heuristic address clustering is available - and around 1.76 for Ether. This stark similarity across platforms points towards a scale-free structure of these transaction networks, with few hubs and large amounts of lowly connected nodes. This is further confirmed by computing the assortativity coefficient, which we report in Fig. 3. This is typically negative, with a tendency for smaller platforms like Monacoin and Feathercoin to show stronger disassortativity. This simple analysis is itself consistent with a strong centralisation in the flow of tokens, where the vast majority of transactions happens between low-degree nodes and large intermediaries like exchanges, custodians and service providers. Our observations largely agree with the evidence presented by11on the Bitcoin transaction network, where the authors find that most of on-chain transactions (excluding self-transactions, which we also exclude) involve exchanges. Core-periphery structure. Economic and financial networks often exhibit the so-called “core-periphery structure”9, 19, 20. This is a macroscopic property of the network, that presents a split between a minority of nodes (the “core”) with a strong connectivity between themselves and the remaining nodes of the network (the “periphery”) that are mostly connected to core nodes and have relatively few links to other peripheral nodes. We apply the core-periphery classification algorithm from21on 4/14 Figure 4. Fraction of nodes in the network core as a function of time. the weekly transaction networks time-series and then consider the size of the core group as a fraction of the total size of the network. We report this quantity for each weekly transaction network in Figure 4. We find that the relative size of the core has consistently decreased over time in all the analysed cryptocurrencies before 2018, and since then it has stabilised, excluding the particular cases of Monacoin and Feathercoin. The fact that the relative size of the core of these networks has been shrinking is further evidence that the cryptocurrency economy has been shifting towards a centralised model, becoming much closer to the traditional financial system that it criticised heavily in its early days. A marked core-periphery structure points towards the transformation of the blockchain ledger into a kind of “interbank market”, where few large intermediaries move funds on behalf of their many clients much like bank transfers and brokerage happen in traditional banking. Indeed a shrinking core corresponds to a bigger periphery, i.e. the vast majority of entities (up to 99.99% in the case of Bitcoin and Ethereum) is loosely connected to the rest of the network and relies on a small minority to intermediate transactions. This structure has been consolidating since 2018, consistent with our observations about the SCC and the amount of addresses per entity that we previously discussed. The exception here, represented by Monacoin and Feathercoin, is mostly due to the drop in popularity these two platforms have experienced after the burst of the 2018 crypto bubble. Monacoin has also suffered from attacks on its mining protocol22, and the market capitalisation of both coins has not recovered to its 2018 peak. The size of the core of both cryptocurrencies is extremely small (less than 5 nodes from 2018 onwards) but the total size of the network is also relatively small, with few hundreds of active entities, thus leading to the observed results. Mining concentration. An analysis of centralisation on cryptocurrency platforms would not be complete without reporting measures of mining power concentration. All blockchains in this study are based on the Proof-of-Work (PoW) consensus mechanism, where the right to add a new block to the blockchain is granted to whoever finds the solution to a cryptographic puzzle. These entities are typically called “miners”, and have an incentive to operate given by a coinbase transaction that mints new tokens attributed directly to the miner. The consistency of blockchain data relies on the assumption that mining power is distributed and decentralised: if at any point in time a single miner (or a pool of miners) holds more than 50% of the total computational power devoted to solving the PoW puzzle, the blockchain can be subjected to a so-called “51% attack” where the majority miner writes false information on the blocks (e.g. double spending transactions) without anybody being able to counteract, since the majority miner will always produce the longest chain with no opposition. A short-term “51% attack“ may lead to a huge decrease of confidence in a blockchain’s content; the persistence of such an attack could mean the end of a blockchain project. The Nakamoto index provides us with a measure of the system’s distance from a 51% attack: named after the pseudonymous author of the Bitcoin whitepaper, it is defined as the minimum number of miners that need to coordinate at any point in time to run a 51% attack. There have been several reports of hashing power centralisation on Bitcoin11, 23: based on blockchain data alone, we are able to estimate this index for all the analysed cryptocurrencies, and we show the result in Figure 5. We estimate the hashing power of miners by measuring the fraction of blocks they mine in a week, and then calculate the Nakamoto index over that same week. Miners are identified as the entities receiving the coinbase transaction: differently from other parts of this work, in Figure 5 we show results that are obtained using only the multiple inputs heuristic method for address clustering, in order to avoid merging too many pools and miners together. We report similar results for the combined heuristics in the 5/14 Figure 5. Nakamoto index estimated weekly for the analysed cryptocurrencies. Supplementary Information. The majority of analysed platforms shows worrying results. The most striking case is Ethereum, with a Nakamoto index that is almost never above 3 and in some weeks drops to 2: this is particularly concerning since Ethereum is used as the base protocol for many decentralised applications, including decentralised exchanges and other decentralised finance instruments which could introduce additional incentives for miners to coordinate in a 51% attack24, 25. The picture looks marginally better for Bitcoin and Litecoin, where the mining power appears relatively less centralised (although it still is very concentrated at times), while on Dogecoin, Feathercoin, Monacoin and Bitcoin Cash (after it forked from Bitcoin in August 2017) the Nakamoto index is always low, and at times even goes to 1, meaning a single miner could have (and maybe has) successfully run a 51% attack on some weeks. Our evidence qualitatively agrees with previously presented models23and evidence for Bitcoin11, where in the latter the authors had additional information available from deanonymisation services specific to Bitcoin, which we don’t have access to. Wealth inequality and spatial distribution. Our final analysis concerns the distribution of tokens among entities. We define as wealth the balance held by an entity (address or cluster of addresses) at a given point in time, representing the funds that they are entitled to spend according to the blockchain ledger. To avoid considering inactive wallets, our statistics only consider addresses or entities with non-zero balance. Clearly, if cryptocurrencies were used simply as a peer-to-peer payment system as implied by the Bitcoin whitepaper1(and many other whitepapers), the level of centralisation and inequality of wealths should not be very different from what is measured in traditional economic systems26. This is very far from what can be measured on the system we analyse. In Figure 6a we show the Gini coefficient of wealths, measured weekly on each cryptocurrency throughout our sample. This coefficient is a standard measure of economic inequality and is related to the area between the Lorenz curve - which plots the cumulative share of wealth as a function of the fraction of population owning that share - and the equality line - i.e. the straight 45 degrees Lorenz curve. A Gini coefficient of 0 means perfect equality, i.e. each individual has the same wealth, whereas a Gini coefficient of 1 means total inequality, with one individual owning everything. Remarkably, only Bitcoin in its early years has a Gini coefficient that is lower than the world average wealth inequality Gini coefficient (which is around 0.9, according to26). After 2012, for all the cryptocurrencies in our analysis the Gini index is basically indistinguishable from 1, meaning that the distribution of wealth is extremely unequal across active wallets. We want to stress that this is not due to having many zero-wealth entities in the sample, as we remove these before calculating the Gini coefficient. Finally, we characterise the spatial distribution of wealth on our transaction networks. To this end we calculate, for each weekly transaction network, the minimum distance that each node has from a miner. Miners are special entities in cryptocurrencies because they are the ones that generate new tokens, as every time they successfully solve the Proof of Work validation puzzle they are entitled to a reward that is created by the protocol. This means that all tokens start their “life” in a 6/14 Figure 6. Wealth inequality and spatial distribution. (a) Evolution of the Gini index of wealths in analysed cryptocurrencies. (b) Distribution of tokens as a function of distance from the miner. Plot points identify the mean fraction of wealth, averaged over time, that is held by nodes at a given distance from the nearest miner. Error bars give the 90% confidence band, i.e. in 90% of weeks the fraction of tokens held at a given distance is within the error bars. miner’s wallet and then diffuse from there into the rest of the economy, which is why they are a meaningful reference node to consider in transaction networks. We then proceed to calculate the amount of wealth that is held by nodes at the same distance from a miner, normalised by the total amount of cryptocurrency circulating, and then consider this quantity across all weeks in our sample. We plot the result in Figure 6b. The plot points represent the average wealth share owned by entities at a given distance from a miner, while the error bars show the 90% confidence band, i.e. the range of values within which the wealth share lies in 90% of weeks in our sample. We find remarkable similarities between the analysed cryptocurrencies: the average wealth share is a decreasing function of distance from miners, with a behaviour that is close to an exponential, and miners (at distance 0) are almost always the wealthiest nodes. The only platform where this doesn’t happen is Ethereum, where the largest wealth share is at a distance of 2 from miners. This is likely due to the difference in the accounting protocol between UTXO-based systems and Ethereum’s account-based system, but we lack conclusive evidence about this. What appears clear from our analysis though is that the largest fraction of wealth is held by relatively few entities - as summarised by the Gini coefficient - that are in the immediate vicinity of miners, with a tail that is quickly vanishing as distance grows. Discussion In this paper we have presented multiple evidences of the centralised nature of major cryptocurrencies, despite their statutory technological decentralisation. We described how the protocol of Bitcoin and similar UTXO-based blockchains works to preserve anonymity and how this can be partially reverse-engineered to cluster addresses that are likely belonging to the same entity, and how switching from a raw address-based description to an entity-based description radically changes the observations. In particular we found interesting dynamics in the evolution of the average number of addresses per entity, which is remarkably similar across platforms and experiences breakpoints in conjunction with large price movements. A first circumstantial evidence of the centralisation process comes from these dynamics, namely the decrease of the average number of addresses per entity after 2018, together with the consolidation of cryptocurrencies as popular speculative assets and the growth of large intermediaries. The result is consistent with a shift in the platforms usage, with new entities entering the system through centralised access points rather than independently. The introduction of weekly transaction networks allowed us to analyse the structural properties of cryptocurrency economies. We found further evidence of the importance of address clustering by measuring the size of the largest Strongly Connected Component (LSCC) of the networks: while on address networks the LSCC contains less than half of active addresses, when considering entities the LSCC includes almost all the nodes of the networks. We take this as a further sign that there are entities which control multiple addresses, acting as “bridges” between different sub-components of the economy. The networks we studied exhibit a fat-tailed degree distribution, with few entities participating in a large number of transactions each week while the vast majority only performs very few, and a negative assortativity coefficient, which constitutes further evidence 7/14 Blockchain BTC ETH BCH LTC DOGE MONA FTC Height 661386 12950000 664161 1969743 3927743 2212711 3491853 Date of collection 14.12.2020 03.08.2021 02.12.2020 23.12.2020 07.10.2021 07.01.2021 07.01.2021 Table 2. Summary information on data collection from public blockchains. of the existence of large intermediaries that centralise the flow of tokens27. Furthermore these networks exhibit a marked core-periphery structure, much like other trading networks from traditional economic and financial systems, and as time goes on the cores become increasingly smaller compared to the total size of the network. Finally we focused our analysis on the role of miners, which are particularly important actors in these systems as they hold the responsibility of keeping the ledger consistent. We find that in all the studied platforms the mining power, namely the estimated share of hashing rate that each miner holds, is worryingly concentrated in the hands of few entities to the point that the Nakamoto index often drops to few units, implying a high risk of a successful 51% attack on the blockchain. We also found that miners are typically the wealthiest entities in the system, and that the stark inequality in wealths is incompatible with the typical narrative of a decentralised, peer-to-peer payments system. Overall we argue that these economies have grown into something that is very different from what they were originally designed to be. The popular narratives, also seen in some mainstream media, that cryptocurrencies are a decentralised solution for payments where financial institutions hold no power over money creation and distribution, are largely false. Similar processes have been reported in second-layer solutions, such as the Lightning Network14, 28. As a matter of fact, we see that miners and intermediaries hold a huge power in these systems, both technically and economically speaking, which turns them into an unregulated financial sector, a new “shadow banking” system29. This unchecked concentration of power is potentially dangerous for the many retail investors that have holdings in cryptocurrency, and proper regulation regarding the activities and products that service providers can offer is overdue. Materials and Methods Data. Blockchain data for the seven cryptocurrencies of our analysis is sourced directly from the respective networks by running consensus nodes, collecting data at block heights reported in Table 2. The figures presented in the paper show results until the last date that is available for all blockchains, December 2, 2020. The blockchain protocols analysed in this study belong to two different families when it comes to their accounting standard: the Unspent Transaction Output (UTXO) standard and the account-based standard, the latter being specific of Ethereum alone in our sample, while all others belong to the former. In UTXO blockchains transactions are recorded as transfers of access rights to a certain amount of tokens, stored on an address: this is done by referencing one or more addresses currently owned by the transaction sender, and directing the related tokens to one or more addresses owned by the transaction receiver. Typically the first set of addresses is called the “input” of the transaction, while the second is its “output”. Outputs can only be used (“spent”) once as inputs to a transaction, hence the name of Unspent Transaction Output accounting. Ownership of addresses is proven by public-private key cryptography: in order to access funds from an address, the private key is needed to sign the transaction in a way that any other user can verify via the public key. The same entity can own any number of addresses, thus making tracing of transactions between entities more challenging, as there is no guarantee that a transaction involves addresses from one, two or many different entities. Multiple heuristic algorithms have been developed over the years to exploit common patterns in transactions input-output structures to cluster together addresses that are likely to belong to the same entity. We adopt multiple combinations of these algorithms in our analysis, and report the details below. In contrast to the UTXO model described above, the account-based blockchains use a different and perhaps more intuitive mechanism for exchanging amounts of cryptocurrencies and other cryptoassets. Instead of holding the private key that can unlock the unspent output for a new transaction where it will be used as input, account-based blockchains have their public key directly transformed as an address, and that address has a specific balance associated. There is then a reduced need to apply address clustering to account-based blockchains, since new addresses are not often created within the same wallet. The first and up to the time of writing most successful example of account-based blockchains is Ethereum, with its native cryptocurrency Ether30. Address clustering in UTXO blockchains. The entities, i.e. clusters of addresses, have been generated using the C++ library BlockSci, which is an open-source software package for blockchain analysis31. We combined multiple heuristic algorithms that are provided within the library to produce our own heuristic methods; we briefly summarise them below and direct the reader to BlockSci’s documentation1for further details. Most of the methods rely on the identification of change addresses , i.e. outputs 1https://citp.github.io/BlockSci/ 8/14 Ox48 0.1 Ox62 3 Ox22 5 Ox61 2.1 Ox11 0.5 Ox22 5 Ox89 9.5 Ox21 5 # block 25/03/14 01:36 Ox49 3 Ox21 5 Ox48 2 Ox32 4.5 Ox88 3 Ox33 0.2 Ox89 9.5 Ox31 9 Ox87 1.2x48 x49x21x62 x61 x22x89 x11x88x87 x33 x31 x32Blockchain AddressNetwork EntityNetworkParsing lutseeringFigure 7. Schematic representation of transaction networks construction. On the left, an archetypal UTXO blockchain block is represented, with coloured transaction input/outputs identifying clusters according to common heuristics. This is parsed through BlockSci into the middle representation, the transaction network at the addresses level, which is then further reduced to the entity network on the right when multiple addresses/nodes belonging to the same entity are merged. of a transaction that belong to the sender, to which excess input is directed. Indeed the protocol design imposes that the input value of a transaction exactly matches the output value plus the fee, which makes change addresses very common. The heuristic methods we adopted are the following: •Multiple inputs - if multiple addresses appear as inputs to the same transaction, they are likely to belong to the same entity that had to sign them all to create the transaction; • Reuse of an address - if an address appears as an input but also as an output, the address has been reused as change; •Optimal change: if the transaction has multiple inputs and the value of exactly one output is lower than any of the inputs, then it is likely the change. This is based on the argument that if a bigger output was the change, then one or more inputs would have not been needed to transfer the same amount to another wallet; •Creation of a new address - in case an output address is appearing for the first time on the blockchain, that address has likely been generated to be the change address; •Peeling chains - a transaction is considered a potential peeling chain if it includes one input and two outputs, and the chain is identified if one of the outputs is used as input to a future transaction with the same structure. In that case, the output that continues the chain is the change address. These chains are commonly seen when addresses with large UTXO values are spent in many smaller value transactions. Our main clustering methodology combines the above heuristics through logical operators that aim to reduce the chance that a false positive occurs. In particular we identify a change address only if all heuristics identify the same address as potential change, except for peeling chains which can never be compatible with other patterns by design. Hence a change address is identified if it is the only one that respects one of the following conditions: i) it is a reused input address; ii) it is a new address with a value smaller than any of the inputs; iii) it is the continuation of a peeling chain. If a change is identified, it is added to the same cluster to which the input addresses belong. A robustness analysis adopting a more conservative choice of clustering strategy is presented in the Supplementary Information. Transaction networks. We construct transaction networks to obtain a general representation of different blockchains. We choose a weekly aggregation to remove intraweek seasonalities, as we notice that the number of active entities and transactions is lower during weekends. We then consider all transactions between entities - i.e. removing self-transactions like change outputs - happening in a given week, adding the involved entities as nodes and connecting them through directed links from inputs to outputs. This process is summarised by Figure 7. Differently from previous literature on cryptocurrency transaction networks6, 18, we consider non-cumulative network representations, meaning that links represent only the transactions happening on that specific week, similarly to what is done in11at monthly aggregation. This allows us to obtain a more representative structure for the state of the economy, avoiding considering in the same way connections that may have happened years apart from each other. 9/14 Acknowledgments C.C. acknowledges support from the Swiss National Science Foundation grant #200021 182659. N.V . acknowledges support from the IOTA foundation. References 1.Nakamoto, S. Bitcoin: A peer-to-peer electronic cash system. Decentralized Bus. Rev. 21260 (2008). 2.Chaum, D. L. Computer Systems established, maintained and trusted by mutually suspicious groups (Electronics Research Laboratory, University of California, 1979). 3.Bollier, D. & Conaty, P. Democratic money and capital for the commons. In Commons Strategies Group Workshop Report, Berlin, Germany , 8–10 (2015). 4.Taleb, N. N. Bitcoin, currencies, and fragility. Quant. Finance 21, 1249–1255 (2021). 5.Fischer, J. A., Palechor, A., Dell’Aglio, D., Bernstein, A. & Tessone, C. J. The complex community structure of the bitcoin address correspondence network. Front. Phys. 9, 363 (2021). 6.Kondor, D., P ´osfai, M., Csabai, I. & Vattay, G. Do the rich get richer? an empirical analysis of the bitcoin transaction network. PloS one 9, e86197 (2014). 7.Newman, M. E., Barab ´asi, A.-L. E. & Watts, D. J. The structure and dynamics of networks. (Princeton university press, 2006). 8.Newman, M. E. Assortative mixing in networks. Phys. review letters 89, 208701 (2002). 9.Barucca, P. & Lillo, F. Disentangling bipartite and core-periphery structure in financial networks. Chaos, Solitons & Fractals 88, 244–253 (2016). 10.Bovet, A. et al. The evolving liaisons between the transaction networks of bitcoin and its price dynamics. arXiv preprint arXiv:1907.03577 (2019). 11.Makarov, I. & Schoar, A. Blockchain analysis of the bitcoin market. Tech. Rep., National Bureau of Economic Research (2021). 12.Huber, T. A. & Sornette, D. Boom, bust, and bitcoin: Bitcoin-bubbles as innovation accelerators. J. Econ. Issues 56, 113–136 (2022). 13.Brown, C., Chiu, J. & Koeppl, T. V . What drives bitcoin fees? using segwit to assess bitcoin’s long-run sustainability. J. Financial Mark. Infrastructures 9(2021). 14.Lin, J.-H., Marchese, E., Tessone, C. J. & Squartini, T. The weighted bitcoin lightning network. arXiv preprint arXiv:2111.13494 (2021). 15.Bargigli, L., Di Iasio, G., Infante, L., Lillo, F. & Pierobon, F. The multiplex structure of interbank networks. Quant. Finance 15, 673–691 (2015). 16.Sugiyama, K., Honda, O., Ohsaki, H. & Imase, M. Application of network analysis techniques for japanese corporate transaction network. In 6th Asia-Pacific Symposium on Information and Telecommunication Technologies , 387–392 (IEEE, 2005). 17.Tseng, J.-J., Li, S.-P. & Wang, S.-C. Experimental evidence for the interplay between individual wealth and transaction network. The Eur. Phys. J. B 73, 69–74 (2010). 18.De Collibus, F. M., Partida, A., Pi ˇskorec, M. & Tessone, C. J. Heterogeneous preferential attachment in key ethereum-based cryptoassets. Front. Phys. 568 (2021). 19.Borgatti, S. P. & Everett, M. G. Models of core/periphery structures. Soc. networks 21, 375–395 (2000). 20.Bardoscia, M., Battiston, S., Caccioli, F. & Caldarelli, G. Pathways towards instability in financial networks. Nat. communications 8, 1–7 (2017). 21.Lip, S. Z. A fast algorithm for the discrete core/periphery bipartitioning problem. arXiv preprint arXiv:1102.5511 (2011). 22.Saad, M., Njilla, L., Kamhoua, C. & Mohaisen, A. Countering selfish mining in blockchains. In 2019 International Conference on Computing, Networking and Communications (ICNC) , 360–364 (IEEE, 2019). 23.Alsabah, H. & Capponi, A. Pitfalls of bitcoin’s proof-of-work: R&d arms race and mining centralization. Available at SSRN 3273982 (2020). 10/14 24.Daian, P. et al. Flash boys 2.0: Frontrunning in decentralized exchanges, miner extractable value, and consensus instability. In2020 IEEE Symposium on Security and Privacy (SP) , 910–927 (IEEE, 2020). 25.Piet, J., Fairoze, J. & Weaver, N. Extracting godl [sic] from the salt mines: Ethereum miners extracting value. arXiv preprint arXiv:2203.15930 (2022). 26.Davies, J., Shorrocks, A. et al. Comparing global inequality of income and wealth. Inequal. Dev. World 49–73 (2018). 27.Campajola, C., D’Errico, M. & Tessone, C. J. Microvelocity: rethinking the velocity of money for digital currencies. arXiv preprint arXiv:2201.13416 (2022). 28.Lin, J.-H., Primicerio, K., Squartini, T., Decker, C. & Tessone, C. J. Lightning network: a second path towards centralisation of the bitcoin economy. New J. Phys. 22, 083022, DOI: 10.1088/1367-2630/aba062 (2020). 29.Aramonte, S., Huang, W. & Schrimpf, A. Defi risks and the decentralisation illusion. BIS Q. Rev. (2021). 30.Buterin, V . Ethereum white paper (2013). https://ethereum.org/en/whitepaper/. Online. Accessed 2022-05-12. 31.Kalodner, H. et al. Blocksci: Design and applications of a blockchain analysis platform. In 29th USENIX Security Symposium (USENIX Security 20) , 2721–2738 (USENIX Association, 2020). 11/14 Supplementary Information: Robustness to address clustering In this document we present additional results that complement the main text, changing the address clustering algorithm to an alternative strategy that tends to aggregate less. These results provide a robustness check against the relatively arbitrary choice of heuristic algorithms that are used to identify entities, and in particular to the potential critical point that our results in the main text are tainted by excessive aggregation of addresses under the Combined Heuristics (CH) strategy. For this reason we choose to present here the results adopting only the “Multiple Inputs” (MI) heuristic described in the main text, which follows the logic that if multiple addresses appear as inputs to the same transaction, they are likely to belong to the same entity that had to sign them all to create the transaction. In summary, our results are mostly qualitatively unchanged when changing the address clustering strategy. Here we highlight the key similarities and differences by referencing the tables and results from the main text in comparison to the ones presented in this Supplementary Information. •in Figure S1 we show the comparison between the size of the largest Strongly Connected Component of the Addresses network and the Entities network under the MI heuristic. We see that it is qualitatively similar to Figure 2 of the main text for all coins with the notable exceptions of Bitcoin and Bitcoin Cash. Here the SCC of the MI Entities network does not span the entire set of nodes, whereas the CH Entities did; •in Table S1 we report the equivalent of Table 1 in the main text for the MI Entities networks (except for ETH which is the same). We find that the fitted Pareto exponents are typically smaller and the fitted Pareto distributions are closer to the empirical ones according to the Kolmogorov-Smirnov distance, while the fitted binomials are typically worse fits, suggesting that degree distributions are even more fat-tailed in the case of MI Entities. Figure S2 shows the degree assortativity coefficient which we find to be slightly closer to 0 than what we see for the CH Entities, although it still is always negative; • The core size shown in Figure S3 is remarkably similar to the one shown in Figure 4 of the main text; •The Nakamoto index, which in the main text is shown for Entities identified through the MI heuristic, is much smaller in the case of CH Entities as shown in Figure S4. We chose to report the “safer” figure in the main text as the CH Entities might be subject to over-aggregation, which in this particular case would depict a more troublesome situation than the already worrying picture of Figure 5 in the main text. 12/14 Figure S1. Size of the largest Strongly Connected Component in UTXO-based cryptocurrencies. BTC LTC DOGE BCH FTC MONA ETH aMinimum 1.64 1.31 1.64 1.58 1.52 1.66 1.50 Maximum 4.93 3.66 3.36 4.93 5.67 3.97 3.42 1. Quartile 2.04 1.87 1.86 1.96 1.93 1.97 1.68 3. Quartile 2.46 2.52 2.33 2.43 2.76 2.21 1.81 Median 2.25 2.07 1.97 2.19 2.26 2.09 1.76 DPar Median 0.03 0.05 0.04 0.03 0.07 0.06 0.03 DBin Median 0.35 0.41 0.49 0.37 0.44 0.41 0.43 Table S1. Summary statistics on exponents of power-law fit of degree distribution on the weekly transaction networks. Figure S2. Assortativity coefficient for weekly transaction networks. 13/14 Figure S3. Fraction of nodes in the network core as a function of time. Figure S4. Nakamoto index estimated weekly for the analysed cryptocurrencies. 14/14
{ "id": "2206.05081" }
2007.14423
JugglingSwap: Scriptless Atomic Cross-Chain Swaps
The blockchain space is changing constantly. New chains are being implemented frequently with different use cases in mind. As more and more types of crypto assets are getting real world value there is an increasing need for blockchain interoperability. Exchange services today are still dominated by central parties which require custody of funds. This trust imposes costs and security risks as frequent breaches testify. Atomic cross-chain swaps (ACCS) allow mutual distrusting parties to securely exchange crypto assets in a peer-to-peer manner while preserving self-custody. Fundamental ACCS protocols leveraged the scripting capabilities of blockchains to conditionalize the transfer of funds between trading parties. Recent work showed that such protocols can be realized in a scriptless setting. This has many benefits to blockchains throughput, efficiency of swap protocols and also to fungibility and privacy. The proposed protocols are limited to assets transferable by either Schnorr signatures or ECDSA that are assuming the same elliptic curve parameters. In this work we present JugglingSwap, a scriptless atomic cross-chain swap protocol with a higher degree of interoperability. We weaken the assumptions about blockchains that can be included in the ACCS protocol, and only require that (1) a threshold variant exists to the underlying digital signature scheme and (2) it is based on the elliptic curve discrete logarithm problem (ECDLP). The fair exchange is achieved by a gradual release of secrets. To achieve this we use a new building block we call Juggling: a public key verifiable encryption scheme to transfer segments of secret shares between parties, which can also be of separate interest. Juggling is then tailored to a specific private key management system design with threshold signatures security.
http://arxiv.org/pdf/2007.14423v1
Omer Shlomovits, Oded Leiba
cs.CR
cs.CR
JugglingSwap: Scriptless Atomic Cross-Chain Swaps Omer Shlomovits, Oded Leiba KZen Research Abstract. The blockchain space is changing constantly. New chains are being implemented frequently with di erent use cases in mind. As more and more types of crypto assets are getting real world value there is an increasing need for blockchain interoperability. Exchange services today are still dominated by central parties which require custody of funds. This trust imposes costs and security risks as frequent breaches testify. Atomic cross-chain swaps (ACCS) allow mutual distrusting parties to se- curely exchange crypto assets in a peer-to-peer manner while preserving self-custody. Fundamental ACCS protocols [40,29] leveraged the script- ing capabilities of blockchains to conditionalize the transfer of funds between trading parties. Recent work [42,36] showed that such proto- cols can be realized in a scriptless setting. This has many bene ts to blockchains throughput, eciency of swap protocols and also to fungi- bility and privacy. The proposed protocols are limited to blockchains supporting either Schnorr or ECDSA signatures that are sharing the same elliptic curve parameters. In this work we present JugglingSwap , a scriptless atomic cross-chain swap protocol with a higher degree of interoperability. We weaken the assumptions about blockchains that can be included in the ACCS proto- col, and only require that (1) a threshold variant exists to the underlying digital signature scheme and (2) it is based on the elliptic curve discrete logarithm problem (ECDLP). The fair exchange is achieved by a grad- ual release of secrets. To achieve this we use a new building block we callJuggling : a public key veri able encryption [15] scheme to transfer segments of secret shares between parties, which can also be of separate interest. Juggling is then tailored to a speci c private key management system design with threshold signatures security. 1 Introduction 1.1 Background The problem of fair exchange is how two mutually distrusting parties can jointly exchange digital assets such that each party receives the other party's input or neither does. There exist a variety of fair exchange protocols in the literature, all with their own speci cations and system model. We divide fair exchange protocols to three categories:arXiv:2007.14423v1 [cs.CR] 28 Jul 2020 2 Omer Shlomovits, Oded Leiba {Trusted Third Party: fair exchange becomes trivial if both parties can agree on a mutual trusted third party. The parties will send the trusted party the digital assets. The trusted party will verify correctness and redistribute to the counterparty. To make it a more scalable solution there is a line of research to design optimistically fair protocols, such that the trusted third party gets involved only in case of disputes which are assumed to be rare [6,30,38]. {Gradual Release of Secrets: This method achieves partial fairness such that one party can get advantage over the other party but this advantage is polynomially bounded. The idea is to enable each party to release their secret bit by bit in alternation [14]. {Monetary Penalties: parties are incentivized to complete the protocol fairly, and if one party receives its output but aborts before the other party does, the cheating party will have to pay a penalty [25,32,33]. Focusing on blockchains, fair exchange is a precursor for escrow protocols with cryptocurrencies [25], markets, auctions, games [32] and atomic cross-chain swaps (ACCS). An ACCS is a task in which multiple parties wish to exchange digital assets from possibly distinct blockchains, in such a manner where all parties receive their desired output from another party, or neither does. In this paper we consider speci cally the two-party setting. Blockchains are decentralized by nature, therefore a core challenge is to design protocols without a single point of failure in the form of a trusted third party which takes full custody of users' funds. Early ACCS protocols leveraged the blockchain itself as a decentralized trusted party that can lock and release funds according to pre-programmed rules. The rst successful atomic cross-chain swap construction is credited to TierNolan [40]. It leverages Bitcoin-like script for cre- ating conditional transactions by the two exchanging parties: each party locks its funds such that the counterparty can spend them by using the preimage of an agreed hash value. When one party spends a transaction, it reveals the secret to the other party which can use it to spend the other conditional trans- action on the other blockchain. There is also a timeout after which the funds can be refunded if not redeemed by the counterparty. Such conditional spending is termed Hashed Timelock Contract (HTLC) and has been speci ed and ex- tended in [43] and [46]. Herlihy in [29] has formalized the theory of such atomic cross-chain swaps. Poelstra [42] has introduced the notion of scriptless scripts and described how to achieve atomic swaps without the need of explicit scripting within transactions. Instead, Schnorr signatures [44] are used: the spending of a transaction reveals a secret merely by the unlocking signature itself, and only to the counterparty. This has many bene ts to blockchains throughput, eciency of swap protocols and also to fungibility and privacy. Malavolta et al. [36] has extended this technique to ECDSA. The latter two studies have opened the door for scriptless atomic cross-chain swaps for a variety of existing blockchains. However, they are still limited to blockchains which support either Schnorr or ECDSA signatures that share the same elliptic curve parameters, namely - the same group generated from the same xed generator. JugglingSwap: Scriptless Atomic Cross-Chain Swaps 3 1.2 Our Contribution Our solution, the JugglingSwap ACCS protocol, is based on gradual release of secrets. We observe that there are two ways to transfer value in a blockchain: {A transaction backed by a digital signature. {A transfer of a secret key. To the best of our knowledge, all existing exchange methods use the rst method. The rst method naturally has more constraints to it: either it depends on the scripting capabilities of the underlying blockchain [29,40,46] or on speci c mechanics of the underlying signature scheme [42,36]. The second method is purely cryptography-dependent with small variance between blockchains and thus can t and be reused for many chains architectures. The vast majority of blockchains tie funds to key pairs of an elliptic curve group where the elliptic curve discrete logarithm problem (ECDLP) is considered hard. Exchanging between two chains in that case comes down to encrypting the secret key with the other party's public key. The two problems that arise: 1. When one party transfers a secret key to a second party it does not lose knowledge of this secret key. The transfer is like a "copy" whereas in a transaction based swap the transfer is like a "cut": the sending party loses access to the funds. The undesired result is that both sending and receiving parties can use the secret key at the end of the transfer. 2. The exchange is not fair. The rst to send the encryption will risk the other party to not complete the protocol. We address these issues in the following way: rst, we add a layer of threshold cryptography for secret key management. The cross-chain interoperability re- mains and we get better security. We start our protocol assuming that each of the two trading parties, the owners , has a joint two-out-of-two (f2;2g) address with the same centralized provider . Second, we introduce and use a new building block we call Juggling : a novel veri able encryption [15] construction for transferring segments of a discrete logarithm. It allows a prover to encrypt a secret in parts and prove that each resulting ciphertext is indeed an encryption of a segment of a secret key of some known public key, under some known encryption key. Combining these two building blocks, the ACCS protocol goes as follows: 1. The two owners and the provider generate two f3;3gaddresses: one on each of the two blockchains. Each party keeps a local secret key share. 2. Each owner deposits funds into the f3;3gaddress of its source blockchain. 3. The two owners start executing two interleaving Juggling protocols, in order to achieve a partial fair exchange of their respective secret shares of the twof3;3gaddresses. In other words - they gradually release their secret shares, segment by segment. Eventually both owners hold 2 shares of their counterparty'sf3;3gaddress and only 1 share of their own f3;3gaddress. 4. Each owner co-signs with the provider in order to withdraw the funds from the counterparty's f3;3gaddress to its own wallet. 4 Omer Shlomovits, Oded Leiba During the execution of the Juggling protocol (step 3), in case one party decides to cheat, the maximal advantage is to be one segment ahead. For small enough segment bit size this is acceptable. The provider's role can theoretically be played by a trusted execution environment (TEE). The resulting ACCS protocol is scriptless. The blockchain footprint of our method is between one to two regular transactions on each blockchain. Therefore, it o ers similar bene ts as the ACCS protocols in [42,36] in terms of improved blockchain throughput and more ecient swaps (cheaper than their script-dependant alter- natives), as well as in fungibility and privacy. On top of that, because Juggling is applicable on arbitrary groups, JugglingSwap has weak assumptions on the participating blockchains: it only requires that (1) a threshold variant exists for the underlying signature algorithm and (2) it is based on ECDLP. Therefore, the set of pairs of blockchains supported by our protocol strictly contains the set of possible pairs by prior art, so it o ers a higher degree of interoperability. Finally, We believe that the Juggling protocol can be of separate interest and used as a building block for other constructions as well. 1.3 Related Work Gradual Release of Secrets: The notion of partial fairness, originated in [9,21], was proposed as a way to overcome the impossibility result of perfect fairness in a setting without a trusted third party [17]. Several protocols, such as [12,19], were built on top of this security notion. Previous works are mainly focused on bit by bit release of either the secret itself or a digital signature from the secret and are not generalizable to elliptic curves DLog. Our protocol is aimed for gradually releasing a ciphertext encrypting an EC-DLog, where the encryption correctness is publicly veri ed for every segment and segment size is con gurable. Crypto Asset Exchange: Several types of exchange methods exist, most of them are used in practice today. In centralized-custodial exchanges (e.g. [2]), the exchange is a trusted third party. Funds are deposited to the exchange platform, trading is done within the platform and nally the funds can be withdrawn to a private wallet. From the moment of the deposit and until the withdrawal the funds are owned by the exchange which at any moment can be hacked, stop working or become malicious and steal all the funds currently held by the plat- form. Centralized but non-custodial trading systems (e.g. [4]) are platforms that guar- antee security before and after the trade but not in the middle: after funds have been sent to the system by the user and before they are returned, the user must trust the trading platform, which again can be hacked, su er denial of service (DoS) or become malicious and steal the funds. The presence of such a single point of trust clearly does not match well the decentralized nature of blockchain technology. Another form of exchange is decentralized exchanges (or "DEXes", e.g. [1,5]). JugglingSwap: Scriptless Atomic Cross-Chain Swaps 5 These are trustless platforms that settle trades on the blockchain. They can suf- fer from security issues such as frontrunning and transaction reordering [7,18]. The on-chain trading makes scalability another issue. Lastly, as they typically utilize smart contracts, they are limited to support only the assets of the speci c blockchain the contracts are deployed on. Tesseract [8] is using Intel SGX enclave as a trusted execution engine to provide a better trusted centralized custodial exchange. The problem with this method is that SGX can su er from security vulnerabilities as shown recently [47]. Ar- wen's [28] protocol o ers centralized non-custodial approach based on building blocks that are used in the Lightning network protocol [43], namely an escrow service with o -chain trading and on-chain settlement. The problems with this protocol are the same as the problems with the Lightning network, for exam- ple: (1) limited capacity, (2) an exchange needs to have many coins tied up to escrow channels, (3) ts only blockchains with speci c features such as expiry time transactions and (4) requires a new implementation for every blockchain added. 2 Preliminaries Here we provide high level informal de nitions for Threshold Signatures, Veri- able Encryption and Bulletproofs range proofs. For a more detailed treatment we refer to the original papers. 2.1 Threshold Signatures LetS=(Key-Gen, Sign, Ver) be a signature scheme. Following [24] A ft;ng- threshold signature scheme TSforSis a pair of protocols (Thresh-Key-Gen, Thresh-Sign) for the set of parties P1;:::;Pn. Thresh-Key-Gen is a distributed key generation protocol used by the players to jointly generate a pair ( Q;x) of public/private keys on input a security parameter 1. At the end of the protocol, the private output of party Piis a valuexisuch that the values ( x1;:::;xn) form aft;ng-threshold secret sharing of x. The public output of the protocol contains the public key Q. Public/private key pairs ( Q;x) are produced by Thresh-Key- Gen with the same probability distribution as if they were generated by the Key- Gen protocol of the regular signature scheme S. Thresh-Sign is the distributed signature protocol. The private input of Piis the value xi. The public inputs consist of a message mand the public key Q. The output of the protocol is a value sig2Sign(m;x). The veri cation algorithm for a threshold signature scheme is, therefore, the same as in the regular centralized signature scheme S De nition 1. We say that a (t;n)-threshold signature scheme TS=(Thresh- Key-Gen,Thresh-Sign) is unforgeable, if no malicious adversary who corrupts at mostt1players can produce, with non-negligible (in ) probability, the signature on any new (i.e., previously unsigned) message m, given the view of 6 Omer Shlomovits, Oded Leiba the protocol Thresh-Key-Gen and of the protocol Thresh-Sign on input messages m1;:::;mkwhich the adversary adaptively chose. This is analogous to the notion of existential unforgeability under chosen message attack as de ned by [26]. Notice that now the adversary does not just see the signatures of kmessages adaptively chosen, but also the internal state of the corrupted players and the public communication of the protocols. We call the special case of t=n, namely a protocol which allows a group of signers to produce a short, joint signature on a common message where all participants are required to be honest, a multi-signature . 2.2 Veri able Encryption Loosely speaking, veri able encryption [15] for a relation Ris a protocol that allows a prover to convince a veri er that a given ciphertext is an encryption under a given public key of a value !such that (;!)2R for a given . Let (Gen, Enc, Dec) be a public key encryption scheme, and let (pk ;sk) be a key pair. A veri able encryption scheme proves that a ciphertext encrypts a plaintext satisfying a certain relation R. The relationRis de ned by a generator algorithm G0which on input 1outputs a description = [R;W,] of a binary relation RonW. We require that the sets R;Wandare easy to recognize (given ). For2, an element !2W such that ( ;!)2R is called a witness for . The idea is that the encryptor will be given a value , a witness !for, and then encrypts !yielding a ciphertext . After this, the encryptor may prove to another party that decrypts to a witness for . In carrying out the proof, the encryptor will of course need to make use of the random coins that were used by the encryption algorithm: we denote by Enc'(pk, m) the pair ( ,coins ), where is the output of Enc(pk ;m) andcoins are the random coins used by Enc to compute . In such a proof system, the (honest) veri er will output 0 or 1, with 1 signifying accept. We require that the proof system is sound, in the sense that if a veri er accepts a proof, then with overwhelming probability, indeed decrypts to a witness for . However, it is convenient, and adequate for many applications, to take a more relaxed approach: instead of requiring that decrypts to a witness, we only require that a witness can be easily reconstructed from the plaintext using some ecient reconstruction algorithm. Such an algorithm recon takes as input a public key pk, a relation description = [R;W,], an element 2, and a message m 2Mpk[frejectg, and outputs !2W[frejectg. De nition 2. A proof system (P;V), together with mutually compatible encryp- tion scheme (Gen;Enc;Dec ), relation generator G0, and reconstruction algo- rithmrecon , form a veri able encryption scheme, if Correctness, Soundness and Special honest-veri er zero knowledge properties hold as de ned in [15]. 2.3 Bulletproofs Range Proofs Range proofs are proofs that a secret value, which has been encrypted or commit- ted to, lies in a certain interval. Range proofs do not leak any information about JugglingSwap: Scriptless Atomic Cross-Chain Swaps 7 the secret value, other than the fact that they lie in the interval. Bulletproofs [13] can be used as an ecient instantiation of range proofs and work on Pedersen commitments [41]. Formally, let group element Vbe a Pedersen commitment to valuevusing randomness r. The proof system will convince the veri er that v2[0;::;2n1]. Bulletproofs are based on Inner Product Argument and main- tain perfect completeness, perfect special honest veri er zero-knowledge, and computational witness extended emulation, de ned in [13]. 3 The Juggling Protocol 3.1 Speci cation and De nitions LetGbe an elliptic curve group of prime order qwith base point (generator) G. PartyPiknows discrete log (DLog) xisuch thatQi=xiG. De nition 3. m-Segmentation of xis the division of xtomsegments [x]kjm k=1 such thatx=P kfk[x]kwherefk= 2(k1)lfor segment length in bits l. De nition 4. We say that a proof is a proof of correct encrypted k-segment if it is a publicly veri able zero knowledge proof for encryption scheme fGen;Enc; Decg, public key Y, value, relationR, ciphertext ckand parameters k;m such thatck=Enc(Y;[x]k)is the encryption of [x]kusing public key Y, where [x]kis thek'th segment of m-Segmentation of a witness !=xsuch that (;!)2R. De nition 5. A proof system (P;V), together with mutually compatible encryp- tion scheme (Gen;Enc;Dec )and parameter mis aSegmented-Veri able En- cryption (S-VE) if (a) it is a VE for witness !and (b) the witness can be m-Segmented such that for each segment kthe prover can prove correct encrypted k-segment for the same witness !. De nition 6. Juggling protocol is S-VE implementation where the witness is an elliptic curve DLog and segment encryptions and proofs are being released serially. It is assumed that there exists a PKI such that all public keys are registered. If it is not the case, all participants will add a setup phase for key pairs generation and registration. 3.2 Auxiliary Proofs All proofs are for public EC parameters G;q;G . Proof of EC-DDH membership: This is a proof of membership that a tuple is an Elliptic Curve Decisional Die Hellman (DDH) tuple: ( G;xG;yG;xyG ). This proof is an adaptation of the proof in [16] for elliptic curves. Proof for the following relation: the witness is !=x, the statement is = (G1;H1;G2;H2). The relationRoutputs 1 if H1=xG1andH2=xG2. The protocol works as follows: 8 Omer Shlomovits, Oded Leiba 1. The prover sends a1= G1anda2= G2to the veri er with 2RZq 2. The veri er sends a random challenge e2RZq 3. The prover responds with r= xe 4. The veri er checks that a1=rG1+eH1anda2=rG2+eH2 See [16] for the formal proof. Proof of correct encryption: This is a proof of knowledge that a pair of group elementsfD;Egform a valid homomorphic ElGamal encryption ("in the exponent") [45] using public key Y. Speci cally, the witness is != (x;r), the statement is = (G;Y;D;E ). The relationRoutputs 1 if D=xG+rY,E=rG. 1. The prover chooses s1;s2, computes A1=s1G;A 2=s2Y;A 3=s2Gand sends to the veri er T=A1+A2;A3. 2. The veri er picks a challenge e. 3. The prover computes z1=s1+exandz2=s2+er. 4. The veri er accepts if z1G+z2Y=T+eDandz2G=A3+eE. Proof of correct encryption of DLog: This is a version of the previous proof where we also know public key Qand want to prove that fD;Egis ho- momorphic ElGamal encryption that encrypts the DLog of Q, speci cally. This is a proof for the following relation: the witness is != (x;r), the statement is = (G;Y;Q;D;E ). The relationRoutputs 1 if Q=xG,D=xG+rY,E=rG. To prove this the prover needs (a) to prove knowledge of the DLog of Qin base Gand (b) to prove that ( G;E;Y;DQ) is a DDH tuple. The proof can be optimized by using the same challenge as follows: 1. The prover chooses s1;s2, computes A1=s1G;A 2=s2Y;A 3=s2Gand sendsA1;A2;A3to the veri er. 2. The veri er picks a challenge e. 3. The prover computes z1=s1+exandz2=s2+er. 4. The veri er accepts if z1G=A1+eQandz2G=A3+eEandz2Y= A2+e(DQ). The protocols can become non-interactive using Fiat-Shamir transform. Both Constructions: proof of correct encryption and proof of correct Encryption of DLog are Sigma protocols [27] with straight forward security proofs. We provide the proofs in Appendix A. 3.3 Construction We observe that S-VE can be implemented using an encryption scheme with homomorphic properties. We choose homomorphic ElGamal encryption as the base encryption scheme [45]. Figure 1 shows a sequence diagram of the protocol. JugglingSwap: Scriptless Atomic Cross-Chain Swaps 9 1.Key Generation: For EC parameters G;q;G and security parameter every party chooses randomy2Zqfor secret key and computes Y=yGfor public key. All public keys are registered. 2.Encryption: Upon input ( x;Q;Y ) whereQ;Y are public keys and xis a secret key such thatQ=xGthe encryptor (interchangeably will be called the prover, depends on operation) divides xtomequal segments (last seg- ment can be padded with zeros). The segments [ x]kjm k=1should be small enough to allow extraction of [ x]kfrom [x]kGin polynomial time in the security parameter. (a) For every segment k: the encryptor computes the homomorphic El- Gamal encryption : fDk;Ekg=f[x]kG+rkY; rkGgfor random rk. (b) The encryptor publishes Dkjm k=1together with mBulletproofs ([13], non-interactive zero knowledge range proofs) proving that every Dk is a Pedersen commitment [41] with value smaller than 2l(*). (c) The encryptor publishes E=P kfkEkand plays the prover in proof of correct encryption of DLog (3.2) with witness ( x;P kfkrk) and statement ( G;Y;Q;D;E ), whereD=P kfkDk. (d) An encryption for a segment [ x]kwill be full once the encryptor pub- lishesEkof this segment together with a proof of correct encryption (3.2). 3.Decryption: Given a secret key y, for every pairfDk;Ekg, [x]kcan be decrypted by extracting [ x]kfromDkyEk= [x]kGusing algorithm for break- ing DLog. After all msegments are decrypted x=P kfk[x]kcan be reconstructed. (*) Except to the MSB segment which is tightly bounded to the lmost signi cant bits of q. Juggling Scheme 3.4 Security Analysis In this section we show that the construction is following the speci cations. Lemma 1. If DDH is hard relative to G, then the scheme fKey Generation, Encryption, Decryption gis CPA-secure encryption scheme. Proof sketch: ElGamal encryption in the exponent, like standard ElGamal en- cryption is CPA-secure under DDH [31,45]. fDk;Ekgis ElGamal encryption in 10 Omer Shlomovits, Oded Leiba for in rp  RangeProof.Prove( )     ProofOfCorrectEncryptionOfDLog.Prove(( ), ( )) , , , rp assert RangeProof.V erify(rp ,, )  assert ProofOfCorrectEncryptionOfDLog.V erify( , ( )) for in assert ProofOfCorrectEncryption.V erify( , ( )) DLog( )for in ProofOfCorrectEncryption.Prove(( ), ( )) , Fig. 1. The Juggling protocol sketch . Here Pis the encryptor/prover, and Vis the decryptor/veri er. Proofs and encryptions are being released serially by P, where after each iteration they are being veri ed and decrypted by V. Note: when both parties ful ll both roles (each encrypting its own secret), these itera- tions can interleave: the rst party receiving the k'th segment will then send back its own k'th segment. JugglingSwap: Scriptless Atomic Cross-Chain Swaps 11 the exponent with randomness rk. Because the randomness rkis changed for every encryption k2f1;::;mgthe di erent encryptions are unrelated. Lemma 2. The proof system fP;VginEncryption protocol together with ho- momorphic ElGamal encryption scheme is a proof of correct encrypted k-segment of DLog of Q, with parameters k, m, Y and security parameter . Proof sketch: The proof system consists of 2 m+ 1 proofs given in a speci c order and correspond to gradual release of the ciphertext: 1.mBulletproofs. 2. Proof of correct encryption of DLog. 3. Proof of correct encryption for rst segment 4. ... 5. Proof of correct encryption for the m'th segment the order of the last mproofs can be di erent and it is easy to show that it does not e ect security. The security proof shows that only m+ 2 proofs are needed to proof correct encrypted k-segment. Speci cally, for segment kthere is no use for the m1 proofs of correct encryption for the other segments. Correctness: This part of the proof is where we need range proofs, which are ef- ciently instantiated by Bulletproofs. To intuitively understand why, let us rst describe a possible attack and why bulletproofs can mitigate it. Proof of correct encryption for the k'th segment proves to the veri er that fDk;Ekgis homo- morphic ElGamal encryption using public key Y. The general proof of correct encryption proves to the veri er a statement about the shifted sum (P kfk) of theDk's andEk's. Namely, thatfD;Egis Homomorphic ElGamal encryption ofxunder public key Y. A simple attack would be to encrypt biased segments such that the shifted sum will remain the same but each segment encryption will be decrypted wrong. W.l.o.g let us change only two segments: for segment kto encrypt the point vk=ukG= [x]kG+bkG= [x]kG+f1 kGand for segment k+1 to encrypt the point vk+1=uk+1G= [x]k+1G+bk+1G= [x]k+1Gf1 k+1G. After decryption, value extraction and segment summation the result would remain the same and equal to xbut both segment encryptions fDk;Ekg;fDk+1;Ek+1g would have extracted to wrong values. In particular the k'th segment will be extracted to [ x]k+f1 k6= [x]k. The implication of such attack is that if a prover aborts in the middle of the gradual release, then the decryptor will remain with nothing while it was expected that it will have all the already published segments of the secret. We now show how assuming Bulletproof security prevents this spe- ci c attack and then generalize it to all possible changes to encrypted segments [x]kjm k=1. In our attack there are four cases: one case where both uk;uk+1are in range [0;:::;2l1] and three cases where at least one of uk;uk+1are not in the range [0;:::;2l1]. For the last three cases it is easy to see that at least one Bulletproof range proof will not verify with high probability. For the rst case in order for the proof of correct Encryption of DLog to pass we require the sum bkfk+bk+1fk+1=nq, to equal a multiple of q, the order of the curve. Every 12 Omer Shlomovits, Oded Leiba option other than n= 0 andbk=bk+1= 0 will result in at least one of bk;bk+1 out of range [0 ;:::;2l1] with high probability. We are now ready to generalize this argument: Claim 1. For anyksegment ciphertext not in the form [ x]k+bkwithbkinde- pendent of [ x]kveri cation will pass with negl() probability. Proof: Assuming correctness of mbulletproofs, proof of correct encryption of DLog and proof of correct encryption of ksegment, if the k'th ciphertext is of di erent form it means that at least one other segment must encrypt an ad- ditional compensating element in the k'th segment to cancel the change. This additional element would have cause the range proof for this segment to fail with probability 1negl(). Claim 2. For anyksegment ciphertext in the form [ x]k+bk, ifbk6= 0 veri - cation will pass with negl() probability. Proof: The following must hold:P kbkfk=nqIfbk6= 0 for some kat least one of the bk's will lead to uk= [x]k+bk>2l. Assume to the contrary that for allk:bk<2l[x]kandq=P kbkfk. Combining this equations we get x<P k2lfkq. We assume for simplicity that the most signi cant segment of qis all-ones. Usually this will restrict the secret key to a very small number such that for random secret key there is negligible probability that the equation will hold. If the secret key is not chosen randomly or if we want to make the prob- ability lower we can simply use secret keys with most signi cant bit xed and equal to 0 (This will not e ect security, see discussion in [34] on using secret key x<q= 3). This can be also proven in Encryption time by providing a range proof onfD;Eg. Now the most signi cant segment can be range proofed to be in the range [0;:::;2l11] such that 2ml1+Pm1 k=12lfkqis negative and therefore assuming bulletproof security, this is possible with only negl() probability. Soundness: Soundness comes from the soundness of proof of correct encryp- tion of DLog. There exist algorithm Athat givenQand two transcripts of this proof with two di erent challenges e6=e0outputs!=xsuch thatQ=xG. This is enough because algorithm A0for soundness of the proof of correct encrypted k-segment of DLog Qcan useAand output the k'th segment of the result. Special honest veri er ZK: All three types of proofs: bulletproof, proof of cor- rect encryption of DLog and proof of correct encryption have the special HVZK security property, meaning there exist a simulator Sthat can output computa- tional indistinguishable distribution by calling the special HVZK simulators of the underlying relevant proofs. Theorem 1. Assuming DDH is hard in Gconstruction 3.3 is a Juggling protocol according to de nition 6 in the random oracle model. Proof sketch: The proofs of correct encryption combined form a VE of witness x and DLog relation ( Q;x)2RifQ=xG. The prover cannot change witness from the range proof to the proof of correct encryption of DLog since otherwise the prover would have broken the binding property of Dkas a commitment, which JugglingSwap: Scriptless Atomic Cross-Chain Swaps 13 is equivalent to nding the DLog of Ywhich assume to be hard. Same is true for changing witness from proof of correct encryption of DLog to the proofs of correct encryption . Property 2 of S-VE de nition holds because Lemma 2 is true for allkin the m-Segmentation of x. Assuming DDH is hard: The encryption scheme is CPA secure (lemma 1) and bulletproof is zero knowledge range proof ([13] De nition 13). 4 Atomic Cross-Chain Swap Protocol 4.1 Background Without many exceptions, all blockchains today are using a digital signature algorithm that has an existing variant for threshold signing. Most dominant are ECDSA and Schnorr based signatures (including EdDSA) [11,34,20,23,35,37,22]. In addition BLS signatures show great promise for the blockchain use case [10]. A wallet is a user interfacing software that generates and manages private keys, constructs and signs messages (transactions) for the relevant cryptocurrencies. Our wallet design is based on ft;ng-Thresh-Key-Gen and ft;ng-Thresh-Sign with minimal amount of participants. We aim to t it to a simple client-server communication model and therefore take t=n= 2. For the fair exchange pro- tocol we will need a f3;3gthreshold signature scheme. We assume that multiple cryptocurrencies are supported by this wallet. 4.2 Roles and Network We de ne two roles: owner andprovider . The owner is the end user who owns the funds in the account and holds one secret share of the secret key. The provider is another share holder of the secret key but does not provide funds to the shared account. Its role is to provide the additional security in the system aiding and enabling the owner to generate keys and transact in distributed fashion. From network perspective, one provider is connected to many owners which to- gether maintain the provider, for example paying its cost in transaction fees. The provider can run on any machine: from a Trusted Execution Environment (TEE) to a machine operated by an incentivized human operator. Multiple providers can compete for owners. Access to a full node can be done either by both parties locally or outsourced to a number of other parties. 4.3 Setup The provider and owner will run f2;2g-Thresh-Key-Gen. Public keys are used to generate blockchain addresses. It is assumed that two parties, P1andP2, that are sharing the same provider (both run f2;2g-Thresh-Key-Gen with the provider) wish to conduct an exchange between two assets on two di erent chains. In de- tails, each party Piholds funds (i.e. tokens) on the blockchain they wish to swap 14 Omer Shlomovits, Oded Leiba from,bi, in an inputf2;2g-address we denote Api in. The amount of funds held by each party should be at least the amount they wish to swap, denoted as ci. Each party Piwould also have a withdraw address we denote Api out, on the blockchain they wish to swap to, b3i. This address is not necessarily generated in advance and can be generated later as the protocol progresses, but for sake of simplicity we de ne it in the setup phase. Note: we provide a description in terms of addresses but an exact description holds with respect to unspent transaction outputs (UTXOs). The amounts and maker/taker roles are matched by a public matching engine. 4.4 The Protocol 1. PartyP1(P2) runs Juggling.KeyGen to create a decryption/encryption key pairy1andY1(y2andY2). The parties then exchange each other's public (encryption) keys Y1andY2. 2.P1;P2;Srunf3;3g-Thresh-Key-Gen: The output is public key pk1and secret shares xp1 1;xp2 1;xs 1to each party. We call Qi 1thelocal public key of partyiifxi 1is the elliptic curve DLog of Qi 1.pk1is used to derive addressa1in blockchain b1. 3.P1;P2;Srunf3;3g-Thresh-Key-Gen again with outputs pk2;xp1 2;xp2 2;xs 2 andQi 2for the local public keys. pk2is used to derive address a2in blockchain b2. 4.P1(P2) runsf2;2g-Thresh-Sign with the provider to transfer from Ap1 in(Ap2 in) an amount of c1(c2) tokens to a1(a2). The provider Swill broadcast the two signed transactions to the two blockchains simultaneously. 5.P1andP2runJuggling.Encryption with inputsfxp1 1;Qp1 1;Y2gandfxp2 2; Qp2 2;Y1grespectively. Encryption is done with segmentation enabled: P1 andP2runJuggling.Encryption up to step (d). If one of the previous steps failed - abort. Repeat for k2f1;:::;mg: (a)P1sendsEk(encryption of [ xp1 1]k) and corresponding proof of correct encryption. (b)P2andSverify proof of correct encryption (aborts if false) and decrypt the segment encryption. P2andSsend backE0 k(encryption of [xp2 2]k) and corresponding proof of correct encryption. (c)P1andSverify proof of correct encryption (abort if false) and de- crypt the segment 6. After decryption is done P1(P2) andSrunf3,3g-Thresh-Sign to sign the withdraw transaction which empties a2(a1) intoAp1 out(Ap2 out). The transaction can now be broadcast by either SorP1(P2). JugglingSwap: Scriptless Atomic Cross-Chain Swaps 15 {3,3}-Thresh-Key-Gen {3,3}-Thresh-Key-Genpublic key to derive address in blockchain public key to derive address in blockchain depositTx buildT ransaction(blockchain = , from = , to = )Each : broadcast(signedDepositTx1 , blockchain = ) broadcast(signedDepositTx2 , blockchain = )Each : Juggling.KeyGen() {2,2}-Thresh-Sign(depositTx ) {2,2}-Thresh-Sign(depositTx2) signedDepositTx1 signedDepositTx 2 Fig. 2. The Atomic Swaps protocol sketch - part 1 16 Omer Shlomovits, Oded Leiba Juggling.Enc( )Each : assert Juggling.V erify( ) Juggling.Dec( ) assert Juggling.V erify( ) Juggling.Dec( ) Each : {3,3}-Thresh-Sign(withdrawTx1)withdrawTx buildT ransaction(blockchain = , from = , to = ) {3,3}-Thresh-Sign(withdrawTx2)for   Each : injectSignatureAndBroadcast(withdrawTx , signature = , blockchain = ) Fig. 3. The Atomic Swaps protocol sketch - part 2 JugglingSwap: Scriptless Atomic Cross-Chain Swaps 17 5 Analysis In this section we give informal discussion on security aspects of the protocol. First, we show correctness of the scheme. Second, we show that the protocol guarantees robustness against malicious adversaries and in particular we show that users of the underlying f2;2g-key management infrastructure do not need to make any additional security assumptions when conducting a swap. Finally, we discuss practical aspects such as cost and privacy. 5.1 Use of Juggling The security of the scheme relies on the security of Juggling scheme: The protocol consists basically of two interleaving Juggling protocols, where the two trading parties are switching the roles of the encryptor and the decryptor. Key generation is done as part of the creation of f3;3g-addresses. Encryptor Piencrypts its secret share of the f3;3g-public key with Y3i. The segmentation property of the encryption together with the publicly veri able proofs are taking care of the partial fairness of the exchange: if segment kis false both parties P1;P2 will either have the same amount of already decrypted segments or one of the parties will have one less decrypted segment. Assuming small segments and that the protocol stopped at a stage where extraction of the rest of the secret share is possible, both parties will need the same resources to get the full secret share. We discuss later the case where one party aborts very early in the protocol such that full extraction is not possible. After all encrypted segments were transferred to the other party and decrypted, thef3;3g-addresses are e ectively degenerated into f2;2g-addresses between the provider Sand the counterparty which is the new owner. The owner can eventually spend from these addresses using the f3;3g-Thresh-Sign algorithm by contributing its own secret share created at the key generation phase and the counterparty's secret share it has successfully decrypted, together with the provider's secret share. 5.2 The Role of the Provider The provider Scan serve as a PKI because it is a centralized authority used by all owners to derive public keys. This can be strengthened in several ways. For example: assuming Spublic key is known to all, Scan generate a certi cate for everyf2;2g-address that it takes part in generating. This certi cate can be checked by the participating parties in a swap as well as by an external matching engine. Furthermore, The provider can be decentralized (i.e. broken into multiple signing parties) or run on a TEE. Upon detection of a awed segment encryption by one of the parties, Scan revoke the party from using the swap service or even from the wallet service. A provider may be nancially incentivized and charge fees for providing the 18 Omer Shlomovits, Oded Leiba additional security and enabling the fair exchange protocol. The provider is trusted for: 1. Availability. 2. Fair submission of deposit transactions - in step 4 in the protocol the provider is required to submit both deposit transactions which fund a1anda2, or none in case one of the owners did not send its own transaction. If assumption (1) is not satis ed, the protocol would not be able to progress and in most scenarios both parties' funds would be kept locked. In particular, if the provider would interact in a f3;3g-Thresh-Sign with one party but not with the other, then the latter would have its funds locked but the one which was able to get the signature has actually succeeded to complete the trade and got the counterparty's deposit. If assumption (2) is not satis ed, one party might lock funds by having its deposit transaction submitted by the provider and con- rmed, while the other party has aborted and did not stake anything. We should also wrap within this same assumption the requirement that the provider will not collude with a party to revert an uncon rmed deposit transaction, which would lead to the same described situation. Since the input addresses created by f2;2g-Thresh-Key-Gen with the provider, it is able to prevent speci cally such attempt. However, it is important to highlight that in terms of potential outcomes for the dishonest provider: the provider can freeze funds but it cannot steal funds. The latter means that it cannot extract secret keys nor trick participants to move funds to an arbitrary address of its choice. Also note that violations of the afore- mentioned trust assumptions can be publicly veri able - an owner may accuse a provider by presenting a transcript of the threshold key generation protocols and optionally the Juggling gradual release protocol, so that an external ob- server of the relevant blockchains can witness that only one deposit or withdraw transaction has been submitted. That way the provider can be held accountable for denying service from the owner. Combined with the economical incentive potential for an honest behavior, these points may give further justi cation for the trust assumptions. 5.3 Adversary Model Our goal is to not add additional assumptions on adversarial behavior on top of what we already assume for a f2;2g-wallet design with an owner and a provider, namely: (1) the provider can stop the service, (2) the provider cannot steal secret keys. The rst assumption is dealt outside the scope of this paper: we assume that each party has a recovery method for f2;2g-addresses, independent of the provider, to reclaim the full secret key. In our protocol, the provider is assumed to be trusted for the speci c points detailed in Section 5.2, namely, availability and fair submission of deposit transactions which preserve the aforementioned adversarial behavior limitations (and is not trusted for anything else e.g., for integrity). The owners P1;P2can possibly turn malicious at any point. In case JugglingSwap: Scriptless Atomic Cross-Chain Swaps 19 one of the owners P1;P2become malicious, the publicly veri able nature of the encryption is used to catch the bad actor. The provider Scan play the role of one of the parties. Without loss of generality, say that Splays the role of (or colludes with) P2. In such a case, note that P1will not start the Juggling protocol (i.e. the gradual release secret exchange protocol) until it veri es a con rmed transaction transferring the expected amount ( c2) into the expected addressa2on the destination blockchain b2.P1has participated in the creation of this speci c address through the f3;3g-Thresh-Key-Gen algorithm. Therefore, the provider Swill be able to get P1's secret share only if it has funded a2with sucient funds which are redeemable by P1. This is equivalent to the honest case where a counterparty P2doesn't collude with the server and deposits the needed funds. Lastly, a malicious party may try to withdraw both of the deposits from a1and a2. W.l.o.g. say it is P2. Here,P1has a secret share xp1 2it has contributed to the secondf3;3g-Thresh-Key-Gen, which is required for a successful f3;3g-Thresh- Sign and is not revealed to any other party (even not through the Juggling protocol's gradual release). So even when the provider colludes with P2, they will not be able to withdraw funds from a2withoutP1's cooperation. 5.4 Practical Aspects It is important to note that unlike other ACCS protocols, in this protocol we do not make any assumptions on the blockchains in the trade. This means that in the general case either both parties completed the trade or that both parties did not complete the trade: there is no going back and the funds will stay locked. If the blockchains used have a time lock mechanism it can smoothly be plugged in the protocol: Sand the parties will sign funding transactions with time locks such that once they are published if one party decides to go back both parties will get the refund after the time locks are over. In terms of interoperability, the protocol enables swaps between popular ECDSA blockchains, e.g. Bitcoin and Ethereum, and emerging EdDSA blockchains such as Facebook's Libra, Algorand and Tezos1. This is not possible with existing scriptless ACCS protocols [42,36] that require both blockchains to use one of Schnorr or ECDSA signature schemes that share the same elliptic curve group generated by the same xed generator. The footprint of the protocol on the blockchain is two standard transactions on b1and two standard transactions on b2. The cost of the protocol is two standard transactions for every party. Using the scheme to swap assets on the same blockchain or using it twice to complete the pathb1!b2!b1will result in a mixing solution. 1Tezos does have support for ECDSA under the curve Secp256k1 as in Bitcoin and Ethereum, but exchanging into an address of a di erent signing algorithm may not be ideal in terms of wallets and tools support. 20 Omer Shlomovits, Oded Leiba 6 Implementation As a proof of concept we show an atomic swap between Bitcoin and Ethereum. For key management system we implemented Lindell's [34] f2;2gECDSA key generation and signing protocols (protocols 3 :1 and 3:2 in [34]) for Elliptic curve Secp256k1. This is the digital signature scheme and elliptic curve used by both Bitcoin and Ethereum. Our code abstracts both the elliptic curve layer and the digital signature layer such that other types of elliptic curves and digital sig- natures can be plugged in easily. We tested it with curve25519 and library we wrote for multi party Schnorr signatures based on [39]. We usedm= 32 segments of l= 8 bits for the 256 bit keys. We used brute-force to nd the DLogs which is not optimal and in practice one of known protocols that can achieve 2l=2time should be used. We implemented the fair exchange protocol for the case where the provider is not allowed to play P1orP2. This allows to relax the requirement on the of f3;3g addresses and use only f2;2g-Thresh-key-generation and Signing. The cryptog- raphy layer is written in Rust. The wrapping communication layer between the parties and their blockchain nodes are written in JavaScript (Node.js). It is open source and can be found in [3]. 6.1 Future Work We plan to add support for more blockchains: connecting other types of elliptic curves and threshold signature algorithms to the system. For threshold-ECDSA we will switch to a newer protocol [23] with support for f3;3gaddresses. We wish to run experiments to set up optimal system parameters (i.e. optimal bit lengthl) and to measure performance. References 1. 0x: Powering Decentralized Exchange. https://0x.org/ . Accessed July 2020. 2. Binance: Cryptocurrency Exchange. https://www.binance.com . Accessed July 2020. 3. JugglingSwap: Scriptless Atomic Cross-Chain Swap Protocol Based on Threshold Signatures. https://github.com/KZen-networks/JugglingSwap . Accessed July 2020. 4. ShapeShift: Cryptocurrency Exchange. https://shapeshift.io . Accessed July 2020. 5. Uniswap: Automated Liquidity Protocol. https://uniswap.org/ . Accessed July 2020. 6. N. Asokan, M. Schunter, and M. Waidner. Optimistic protocols for fair exchange. In Proceedings of the 4th ACM conference on Computer and communications security , pages 7{17, 1997. 7. I. Bentov, L. Breidenbach, P. Daian, A. Juels, Y. Li, and X. Zhao. The cost of decentralization in 0x and EtherDelta. http://hackingdistributed.com/2017/ 08/13/cost-of-decent/ , 2017. Accessed July 2020. JugglingSwap: Scriptless Atomic Cross-Chain Swaps 21 8. I. Bentov, Y. Ji, F. Zhang, L. Breidenbach, P. Daian, and A. Juels. Tesseract: Real-time cryptocurrency exchange using trusted hardware. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security , pages 1521{1538, 2019. 9. M. Blum. How to exchange (secret) keys. AcM Transactions on computer systems (Tocs) , 1(2):175{193, 1983. 10. D. Boneh, M. Drijvers, and G. Neven. Compact multi-signatures for smaller blockchains. In International Conference on the Theory and Application of Cryp- tology and Information Security , pages 435{464. Springer, 2018. 11. D. Boneh, R. Gennaro, and S. Goldfeder. Using level-1 homomorphic encryption to improve threshold dsa signatures for bitcoin wallet security. In International Conference on Cryptology and Information Security in Latin America , pages 352{ 377. Springer, 2017. 12. E. F. Brickell, D. Chaum, I. B. Damg ard, and J. van de Graaf. Gradual and veri able release of a secret. In Conference on the Theory and Application of Cryptographic Techniques , pages 156{166. Springer, 1987. 13. B. B unz, J. Bootle, D. Boneh, A. Poelstra, P. Wuille, and G. Maxwell. Bulletproofs: Short proofs for con dential transactions and more. In 2018 IEEE Symposium on Security and Privacy (SP) , pages 315{334. IEEE, 2018. 14. P. Camacho. Fair exchange of short signatures without trusted third party. In Cryptographers Track at the RSA Conference , pages 34{49. Springer, 2013. 15. J. Camenisch and V. Shoup. Practical veri able encryption and decryption of discrete logarithms. In Annual International Cryptology Conference , pages 126{ 144. Springer, 2003. 16. D. Chaum and T. P. Pedersen. Transferred cash grows in size. In Workshop on the Theory and Application of of Cryptographic Techniques , pages 390{407. Springer, 1992. 17. R. Cleve. Limits on the security of coin ips when half the processors are faulty. InProceedings of the eighteenth annual ACM symposium on Theory of computing , pages 364{369, 1986. 18. P. Daian, S. Goldfeder, T. Kell, Y. Li, Z. Xueyuan, I. Bentov, L. Breidenbach, and A. Juels. Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges. arXiv preprint arXiv:1904.05234 , 2019. 19. I. B. Damg ard. Practical and provably secure release of a secret and exchange of signatures. In Workshop on the Theory and Application of of Cryptographic Techniques , pages 200{217. Springer, 1993. 20. J. Doerner, Y. Kondi, E. Lee, and A. Shelat. Secure two-party threshold ECDSA from ECDSA assumptions. In 2018 IEEE Symposium on Security and Privacy (SP), pages 980{997. IEEE, 2018. 21. S. Even, O. Goldreich, and A. Lempel. A randomized protocol for signing contracts. Communications of the ACM , 28(6):637{647, 1985. 22. B. Ford, N. Gailly, L. Gasser, and P. Jovanovic. Collective Edwards-Curve Digital Signature Algorithm. Technical report, Internet-Draft draft-ford-cfrg-cosi-00. txt. IETF Secretariat, 2017. 23. R. Gennaro and S. Goldfeder. Fast multiparty threshold ECDSA with fast trustless setup. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security , pages 1179{1194, 2018. 24. R. Gennaro, S. Jarecki, H. Krawczyk, and T. Rabin. Robust threshold DSS signa- tures. In International Conference on the Theory and Applications of Cryptographic Techniques , pages 354{371. Springer, 1996. 22 Omer Shlomovits, Oded Leiba 25. S. Goldfeder, J. Bonneau, R. Gennaro, and A. Narayanan. Escrow protocols for cryptocurrencies: How to buy physical goods using bitcoin. In International Con- ference on Financial Cryptography and Data Security , pages 321{339. Springer, 2017. 26. S. Goldwasser, S. Micali, and R. L. Rivest. A digital signature scheme secure against adaptive chosen-message attacks. SIAM Journal on computing , 17(2):281{ 308, 1988. 27. C. Hazay and Y. Lindell. Ecient secure two-party protocols: Techniques and constructions . Springer Science & Business Media, 2010. 28. E. Heilman, S. Lipmann, and S. Goldberg. The arwen trading protocols. In Inter- national Conference on Financial Cryptography and Data Security , pages 156{173. Springer, 2020. 29. M. Herlihy. Atomic cross-chain swaps. In Proceedings of the 2018 ACM symposium on principles of distributed computing , pages 245{254, 2018. 30. Q. Huang, D. S. Wong, and W. Susilo. The construction of ambiguous optimistic fair exchange from designated con rmer signature without random oracles. Infor- mation Sciences , 228:222{238, 2013. 31. J. Katz and Y. Lindell. Introduction to modern cryptography . CRC press, 2014. 32. R. Kumaresan, T. Moran, and I. Bentov. How to use bitcoin to play decentral- ized poker. Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security , pages 195{206, 2015. 33. Y. Lindell. Legally-enforceable fairness in secure two-party computation. In Cryp- tographers Track at the RSA Conference , pages 121{137. Springer, 2008. 34. Y. Lindell. Fast secure two-party ECDSA signing. In Annual International Cryp- tology Conference , pages 613{644. Springer, 2017. 35. Y. Lindell and A. Nof. Fast secure multiparty ECDSA with practical distributed key generation and applications to cryptocurrency custody. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security , pages 1837{1854, 2018. 36. G. Malavolta, P. Moreno-Sanchez, C. Schneidewind, A. Kate, and M. Ma ei. Anonymous multi-hop locks for blockchain scalability and interoperability. In NDSS , 2019. 37. G. Maxwell, A. Poelstra, Y. Seurin, and P. Wuille. Simple schnorr multi-signatures with applications to bitcoin. Designs, Codes and Cryptography , 87(9):2139{2164, 2019. 38. S. Micali. Simple and fast optimistic protocols for fair electronic exchange. In Proceedings of the twenty-second annual symposium on Principles of distributed computing , pages 12{19, 2003. 39. S. Micali, K. Ohta, and L. Reyzin. Accountable-subgroup multisignatures. In Pro- ceedings of the 8th ACM conference on Computer and Communications Security , pages 245{254, 2001. 40. T. Nolan. Alt chains and atomic transfers. https://bitcointalk.org/index. php?topic=193281.0 , 2013. Accessed July 2020. 41. T. P. Pedersen. Non-interactive and information-theoretic secure veri able secret sharing. In Annual international cryptology conference , pages 129{140. Springer, 1991. 42. A. Poelstra. Scriptless scripts. https://download.wpsoftware.net/bitcoin/ wizardry/mw-slides/2017-03-mit-bitcoin-expo/slides.pdf , 2017. Accessed July 2020. 43. J. Poon and T. Dryja. The bitcoin lightning network: Scalable o -chain instant payments, 2016. JugglingSwap: Scriptless Atomic Cross-Chain Swaps 23 44. C.-P. Schnorr. Ecient signature generation by smart cards. Journal of cryptology , 4(3):161{174, 1991. 45. B. Schoenmakers and P. Tuyls. Practical two-party computation based on the conditional gate. In International conference on the theory and application of cryptology and information security , pages 119{136. Springer, 2004. 46. B. Sean and D. Hopwood. Hashed Time-Locked Contract transactions. https: //github.com/bitcoin/bips/blob/master/bip-0199.mediawiki , 2017. Accessed July 2020. 47. J. Van Bulck, M. Minkin, O. Weisse, D. Genkin, B. Kasikci, F. Piessens, M. Sil- berstein, T. F. Wenisch, Y. Yarom, and R. Strackx. Foreshadow: Extracting the keys to the intel fSGX gkingdom with transient out-of-order execution. In 27th fUSENIX gSecurity Symposium ( fUSENIX gSecurity 18) , pages 991{1008, 2018. A Security for Auxiliary Proofs Here we provide security proofs that the auxiliary proofs from section 3.2 are secure. A.1 Proof of Correct Encryption: { Completeness: z1G+z2Y=s1G+exG+s2Y+erY=A1+A2+e(xG+ rY) =T+eD.z2G=s2G+erG=A3+eE { Special Soundness: Given two transcripts fT;A 3;e;z 1;z2gand fT;A 3;e0;z0 1;z0 2git is easy to extract rfrome;e0;z2;z0 2and thexfrom e;e0;z1;z0 1. { Special HVZK : Given the statement G;Y;D;E ande, choose random z22 Zqand compute A3=z2GeE. Choose random z12Zq, and compute T=z1G+z2YeD. A.2 Proof of Correct Encryption of DLog: { Completeness: z1G=s1G+exG =A1+eQ,z2G=s2G+erG=A3+eE, z2Y=s2Y+erY=A2+eQ+erYeQ=A2+e(DQ) { Special Soundness: Given two transcripts fA1;A2;A3;e;z 1;z2gand fA1;A2;A3;e0;z0 1;z0 2git is easy to extract rfrome;e0;z2;z0 2and thexfrom e;e0;z1;z0 1. { Special HVZK : Given the statement G;Y;Q;D;E ande, choose random z22Zqand compute A3=z2GeE,A2=z2Ye(DQ). Choose random z12Zq, and compute A1=z1GeQ.
{ "id": "2007.14423" }
2007.06201
The Blockchain Based Auditor on Secret key Life Cycle in Reconfigurable Platform
The growing sophistication of cyber attacks, vulnerabilities in high computing systems and increasing dependency on cryptography to protect our digital data make it more important to keep secret keys safe and secure. Few major issues on secret keys like incorrect use of keys, inappropriate storage of keys, inadequate protection of keys, insecure movement of keys, lack of audit logging, insider threats and non-destruction of keys can compromise the whole security system dangerously. In this article, we have proposed and implemented an isolated secret key memory which can log life cycle of secret keys cryptographically using blockchain (BC) technology. We have also implemented a special custom bus interconnect which receives custom crypto instruction from Processing Element (PE). During the execution of crypto instructions, the architecture assures that secret key will never come in the processor area and the movement of secret keys to various crypto core is recorded cryptographically after the proper authentication process controlled by proposed hardware based BC. To the best of our knowledge, this is the first work which uses blockchain based solution to address the issues of the life cycle of the secret keys in hardware platform. The additional cost of resource usage and timing complexity we spent to implement the proposed idea is very nominal. We have used Xilinx Vivado EDA tool and Artix 7 FPGA board.
http://arxiv.org/pdf/2007.06201v1
Rourab Paul, Nimisha Ghosh, Amlan Chakrabarti, Prasant Mahapatra
cs.CR, cs.AR
cs.CR
The Blockchain Based Auditor on Secret key Life Cycle in Reconfigurable Platform Rourab Paul Computer Science & Engineering, Siksha ’O’ Anusandhan (Deemed to be University), Odisha, India rourabpaul@soa.ac.inNimisha Ghosh Computer Science & IT, Siksha ’O’ Anusandhan (Deemed to be University), Odisha, India nimishaghosh@soa.ac.inAmlan Chakrabarti School of IT, University of Calcutta Kolkata, India achakra12@yahoo.comPrasant Mahapatra Dept. of Computer Science University of California, USA pmohapatra@ucdavis.edu Abstract —The growing sophistication of cyber attacks, vulner- abilities in high computing systems and increasing dependency on cryptography to protect our digital data make it more important to keep secret keys safe and secure. Few major issues on secret keys like incorrect use of keys, inappropriate storage of keys, inadequate protection of keys, insecure movement of keys, lack of audit logging, insider threats and non-destruction of keys can compromise the whole security system dangerously. In this article, we have proposed and implemented an isolated secret key memory which can log life cycle of secret keys cryptographically using blockchain (BC) technology. We have also implemented a special custom bus interconnect which receives custom crypto instruction from Processing Element (PE). During the execution of crypto instructions, the architecture assures that secret key will never come in the processor area and the movement of secret keys to various crypto core is recored cryptographically after the proper authentication process controlled by proposed hardware based BC. To the best of our knowledge, this is the first work which uses blockchain based solution to address the issues of the life cycle of the secret keys in hardware platform. The additional cost of resource usage and timing complexity we spent to implement the proposed idea is very nominal. We have used Xilinx Vivado EDA tool and Artix 7 FPGA board. Index Terms —Blockchain, FPGA, Key Memory, Secret Key Life Cycle I. I NTRODUCTION The security of a crypto system depends on three primary keys. Symmetric Key : is used to encrypt bulk data in symmet- ric key algorithms like AES, TDES, DES etc. Private Keys : of public-private key pair used in Asymmetric Key Cryptography such as RSA, Diffie Helmen etc. Private key is used for signature generation and key exchange process. Hash Key : is used to check integrity and authenticity of transactions and data with algorithms like SHA-3. Increasing volume of secret key and data protected by those keys makes the cryptographic key management relevant in current research trend [1]. There are several threats causes compromised key. In this article we have discussed about few major threats. A. Storage In many sense, processor based architectures are flexible but it can be exposed to software threats like cache attack[2], bus snooping [3], memory disclosure attack [4] etc. hence the storage of secret keys should be separated form software area and it should be isolated from any physical connection of processor.B. Insecure Movement A security processor allows key movements between several cores like Key Memory, RNG, Hash, Symmetric Key and Asymmetric Key core. All these key movement to the key memory and from the key memory should be authenticated and secured. These transactions of key mainly suffers two issues. AThe buses used for these movements can be snooped by software attacks. BThe request of key can be issued from some compromised IP placed inside the architecture. To overcome attack-A the most effective solutions are bus encryption [3], or partition of software area from these buses [5]. Attack-B can be prevented by verifying the signature of the requestee IP. To the best of our knowledge we did not find any similar solution in hardware platform. C. Non-destruction Once the signature of requestee IP is verified, the key should be released to the proper destination. Except the pre-master key, other keys should be destroyed securely. This removal of key should be logged cryptographically and should non- traceable. D. Audit Logging The secret keys of a security processor is the most sensitive data. The creation, deletion and the movement of secret key should be logged and audited cryptographically otherwise it will be difficult to identify a compromise for forensic investigation. E. Incorrect use of keys The generated master keys are for specific purposes. Hash core can not use encryption key and vice versa. If the keys are used for something else, the proper protection action should be taken. The main contribution of this article are stated below: This article proposes a security processor architecture which is partitioned in three separated areas such as processor area, crypto area, and confidential area. This architecture assures that secret key memory is isolated form processor area. The architecture proposes a blockchain based auditor to monitor secret key lifecycles. The architecture pre- vents insecure movement, unauthorized key request, non- destruction issued and incorrect use of keys.arXiv:2007.06201v1 [cs.CR] 13 Jul 2020 The proposed security processor can execute 21 custom crypto instructions as shown in Table II. Custome Bus InterconnectInput Address(3:0)Output Address(3:0) RNG_op Buff Hash_opBuff Hash_key En_keyRNG_done Buff_rd Hash_doneBuff_wr Hash_key_rdy En_key_rdy Hash_in Hash_in_rdy pub_en_in pub_en_in_rdypub_op pub_op_rdy0 0 1 1 2 2 3 3 4 Fig. 1: Custom Bus Interconnect input Addroutput AddrBus RSA RNGHASH ENC MKM Buff Operation (5 down to 0) Source IP Addr (3 down to 0)Dest IPs (3 down to 0)Bus SelBuf cap Bus cap Fig. 2: Control Word Register II. A RCHITECTURE In this architecture we have partitioned three areas such as(i)processor area, (II) crypto area and (iii)confidential area. The whole architectural details is stated in [6]. The partitioned and isolated confidential area to store secret keys assures that the secret key never come in the processor area because the processor area is very much vulnerable for various software threats. The main contribution of the proposed article is to add a special private blockchain to audit the movement of secret keys. Each secret key movement is authenticated and registered cryptographically. To adopt blockchain, we have designed the data path controller (DPC), custom bus interconnect (CBI), buffer and a Signature Checker (SC) core. The architecture can exe- cute 21 crypto instructions divided in 5 categories as shown in Table II. All these proposed instructions are executed byDPC andCBI . As instructed by the TLS white pa- per [7], the architecture processes instructions for pre master key generation ,master key generation ,hash and encryption process. For the proposed blockchain process we have created a new category named as common purpose . The details of other instructions are not described because of page restriction. It is to be noted that blockchain data is written in main memory which can be accessed by the PE. A. Custom Bus Interconnect The proposed custom bus interconnect (CBI) is a junction through which various crypto cores and the buffer which is created as gateway of Master Key Memory (MKM) can communicate. Various paths of crypto cores andbuffer are controlled by 4 bits input and 4 bit output addresses. Input- output address pins are controlled by data path controller (DPC) IP. In our current version of design, we have 4 inputs coming from buffer , output of hash , output of RNG and output of RSA . The 5 outputs of CBI are connected with PE DMA Bus Inter ConnectLocal MemoryPE Bus Inter connectIP2 IPn DMA AES BlockSHA 3 BlockBus StreamerRNG Master Key MemoryProcessor Area Confidential AreaCrypto Area Data Cipher HashShared MemoryJunctionPath Controller MKM 3 RSA En-Pre master Key2 B u FTimer Signature Checker BC dataFig. 3: System Architecture buffer , key of AES , key of hash and key of RSA block. The synchronization signals of input cores and output cores are also taken care of by CBI . The fig. 1 shows the synchro- nization signals such as RNG _done ,Buff _rd,Hash _done , Buff _rdy,Hash _key_rdy andEn_key_rdy. The CBI is combination of MUX and DE-MUX where MUX’s output is connected with DEMUX’s input. The input address and output address pins are the selecting inputs of MUX and DE-MUX respectively. B. Data Path Controller The proposed data path controller (DPC) is a slave IP ofPE. The PE can send 21instructions by Application Peripheral Interface (API) call for various crypto operations of TLS protocol. The data path controller maintains a control word register to execute the 21 instructions as shown in Table II. The PE can communicate DPC by AXI bus through PE bus interconnect . In the current version of hardware, DPC has 16 bits control word to control various crypto cores placed in the crypto area. The data path and binaries for all proposed instructions are shown in II. As shown in fig. 2, the 11th bit is set to logic 1to enable the custom bus interconnect , otherwise it will be logic 0to disable the said interconnect. The 16th to 13th bits are used to select the input address. If the input address is0000 , RNG will be selected. It will be 0001 ,0010 and0011 to select Buff ,Hash andPubEn core respectively. The 12th and 9th bit is to address outputs. The output address will be 0000 , 0001 ,0010 ,0011 and0100 to select the Buff ,Hash _Key , En_key,Hash _InandPub_en_incore. The 6th to 1st bit ofcontrol word register (CWR) are used to enable different hardware blocks such as RSA ,RNG ,Hash ,Enc,MKM andBuff . The PE directly can write to CWR to control the data path of the hardwares placed in the crypto area . C. Buffer The proposed buffer is a gateway to write or read keys to the MKM . This buffer can accommodate data ,timestamp from timer IP,prehash from Signature Checker , read/write operation, signature of data and the system status. The TABLE I: Comparison Results #key storageIncorrect useInsecure movement DestructionAudit log Propo sedkey memory    X [5] 2011key memory X X X  [8] 2010key memory X X X  [6] 2018key memory X X X  [9] 2019main memory X X  X [3] 2009main memory X  X  [2] 2015cache memory  X X  [10] 2007main memory X X X  X=possible, =not possible system status comes from the enable ports and ready ports of all the existing IPs including crypto cores. Instruction-1 writes 384bit random number from RNG to the data portion ofBuffer . Similarly instruction 9, 17 and 18 can write 512 bit data from KECCAK and 1024 bits from RSA respectively. D. Signature Checker TheSignature Checker (SC) consists two main parts such as KECCAK hash and RSA block to verify signature of the IPs requested to read or write to MKM . This IP receives the signature from buffer . The signature is the encrypted hash of data. The SCfirst decrypt it by the RSA block with the public key of requestee IP. The requestee IP is addressed by the source IP address available in CWR . After that SC gets the hash of data. The data is already available in the buffer . If the hash of buffer data is matched with the decrypted data by RSA then the requested transaction will be granted by SC. III. I MPLEMENTATION & R ESULTS The proposed architecture is implemented in Artix-7 (csg324-100t)FPGA using Vivado Tool. The additional hard- wares added to the original architecture to protect the keys form major threats as stated in Table I are SC,buffer and theCBI . The signature checker consist of a KECCAK and RSA-1024 which cost 4188 and 31008 slices respectively. The base architecture without blockchain consumes 50k logic cells. The architecture with blockchain to protect severe key threats consumes 95k logic cells which is around 45% of the total logic cells available in Artix-7 FPGA. As shown in Table I articles [5], [8] and [6] proposed dedicated secret key memories which are completely isolated from processor area to prevent software threats but this architecture does not prevent incorrect use, insecure movement and non-destructions issues of keys. If any spoofing IPs or dishonest probes already exist inside the architectures of [5], [8] and [6] and try to read secret key stored in dedictaed key memory, the system will allow the key transaction to those malicious nodes. Though the dedicated key memories proposed in these article are physically isolated but can not prevent said incorrect and insecure movement of secret keys. Articles [5], [8] and [6] do not have any facility to investigate the key movement andTABLE II: Instructions Implemented in Proposed Architecture # Instruction Flow FunctionCWR (hex)Bus Inter Connect 1PE Send Re-Seed PE to RNGSend new seed to RNG from PE.R- -NG needs seed to generate rand. no. 0010 AXIRNG2 Gen RND RNG to BuffEnable RNG to Generate Random Number, and write RND in data portion of Buffer 0050 CustomMaster by3RNG Write Block Gen to BuffBlock Generation for Write Operation on MKM from RNG. Buff reads, time stamp fromtimer IP,prehash from Signature Checker , write operation the system status, source & dest. IP ID 0091 CustomPre4Re-Key RSA PE to RSA PE writes pub key of server to RSA 0020 AXI 5PE Get En-RNG RSA to PE Encrypt RND using server pub key XXXX AXI 6PE Send Rands in HashPE to Hash by DMAPE sends server random number and client random number to Hash XXXX AXIMaster Key7Hash Read Block Gen to BuffBlock Generation for Read Operation from MKM by Hash. Buff reads , time stamp fromtimer IP,prehash from Signature Checker , read operation, the system status, source & dest. IP ID 11C1 Custom 8Get M-Key Hash Buff to Hash read master key to generate four keys 1149 Custom 9 Gen Keys Hash to Buff Write keys to Buff 2049 Custom 10Hash Write Block Gen Hash to BuffBlock Generation for write Operation to MKM 20C9 CustomEncryption11En Read Block Gen to BuffBlock Generation for Read Operation from MKM by En. Buff reads , time stamp fromtimer IP,prehash from Signature Checker , read operation, the system status, source & dest. IP ID 12C1 Custom 12Get EN Key from Buff Buff to En Read En. key from buffer 1245 DMA 13 GEN EN Shared to SharedAES block reads plaintext form SM & write cypher to SM using DMA XXXX Custom 14Hash Read Block Gen to Buff Same as Instruction 7 11C1 Custom 15Get Key Hash Buff to Hash Same as Instruction 8 1149 CustomHash 16 GEN Hash Shared to SharedKECCAK block reads plaintext form SM & write digest to SM using DMA XXX DMA 17Hash of Buff load Buff to Hash1st step of signature: load Buff data to Hash input 1341 Custom 18Hash to Buff Hash Op to Buff2nd step of signature: load hash output to buffer 2049 Custome19PubEn of Buff Buff to PubEn3rd step of signature: load buffer in PubEn input 1461 CustomSignatur20PubEn to BuffOutput of public key encrypted data to buffer4thstep of signature: load encrypted da- ta of PubEn to buffer which is the signa- ture of buffer data in 1st step 3061 Custom 21 Verify Sig Buff to MKMif signature matched buffer data sent to MKM 1XX3 Custom to prevent non-destruction issue. Amazon Web Server [9] is one of the most recent software based key management archi- tecture which can audit and investigate tracking of secret keys, but it cannot prevent the insecure movement and incorrect use of key. It does not have any signature checking facility on the key request. In our architecture we have introduced dedicated secret key memory which is physically isolated from processor area. Any read write operation on this secret key memory named as Master Key Memory (MKM) is blockchain based. We have observed the usual operations on MKM are related with RNG ,HASH , and AES block. The Public andPrivate keys of all these crypto IPs are already generated in offline by an automatic script during the RTL development. The pre master key is generated by RNG which needs to be written in MKM through buffer as shown in Table II instructions 2, 3, and 17 to 21. Instruction 2 writes random number generated by RNG into buffer. The buffer also stores the public keys of RNG (Source IP) and MKM (Destination). The buffer includes timestamp form TIMER IP, and stores all the current status of Done andEnable pin of available IPs in the proposed design. The instructions 17 to 21 generate signature of the write operation on MKM byRNG . TABLE III: Summery of Trade-off Partition Path SC Base Memory Controller RSA KECCAK Design Slice 0 76 31008 4188 50223 BRAM 7.5 0 0 0 32 Clock 2 2 3048 24 NA latency 20 ns 10 ns 86us 67.2 ns NA Feature / roleprevent SW attackscontrol crypto instrcutionsprevent insecure movment & incorrect use of keys; audit logimplements basic hw for secuirty processor NA=Base desgn consists of diferent hardwares having different latency & clock This signature will also be stored in buffer . This signature will be verified by the Signature Checker IP placed inside Confidential Area as stated in fig.3. If the signature is matched then the pre master key generated by RNG will be written in MKM , otherwise the transaction will be discarded form the buffer . The other read write requests on MKM are (ii)read pre master key byHASH t to generate master key (Instruction 7 and 8)(ii)write masterkeys inMKM (Instruc- tion 9 and 10). (iii)read master key form MKM byhash (Instruction 14 and 15)and (iv) read master key formMKM byAES (Instruction 11 and 13). All these read write opera- tions follows Instruction 17 and 21 for authentic checking of the requestee. The verification process of signature checker IP using the buffer data with system status, timestamp, signature and the pre hash prevents incorrect use and insecure movement of keys. The MKM also delete the keys which are already read to address non-destruction issue. The partitioned memory for secret keys prevents software attacks. The timing diagram of instruction 17, 18 and 19, 20 is shown in fig. 4 and fig. 5 respectively. Table III shows the trade off of latency and resource usage with security features. Fig. 4: Timing Overhead of Instruction 17 & 18 Fig. 5: Timing Overhead of Instruction 19 & 20IV. C ONCLUSIONS This article proposes a hardware blockchain with a parti- tioned and dedicated secret key memory which prevents most of the software attacks, insecure key movement, incorrect use, non-destruction use secret key. Apart from this, if breach of keys occurs in the system, the hardware blockchain can investigate previous key transactions. To the best of our knowledge, the FPGA based blockchain to prevent threats stated in Table I is never explored. The additional hardware adopted for blockchain is very nominal in-terms of resource usage and throughput. REFERENCES [1] Cryptomathic White Paper Rob Stubbs. Selecting the right key management system. Workshop COSADE, , pages –, Feb 2019. [2] Patrick Simmons. Security through amnesia: A software- based solution to the cold boot attack on disk encryption. InProceedings of the 27th Annual Computer Security Applications Conference , ACSAC ’11, pages 73–82, New York, NY , USA, 2011. ACM. [3] X. Chen, R. P. Dick, and A. Choudhary. Operating system controlled processor-memory bus encryption. In 2008 Design, Automation and Test in Europe , pages 1154–1159, March 2008. [4] L. Guan, J. Lin, B. Luo, J. Jing, and J. Wang. Pro- tecting private keys against memory disclosure attacks using hardware transactional memory. In 2015 IEEE Symposium on Security and Privacy , pages 3–19, May 2015. [5] Michael Grand, Lilian Bossuet, Bertrand Le Gal, Guy Gogniat, and Dominique Dallet. Design and implementa- tion of a multi-core crypto-processor for software defined radios. In Reconfigurable Computing: Architectures, Tools and Applications - 7th International Symposium, ARC 2011, Belfast, UK, March 23-25, 2011. Proceed- ings, pages 29–40, 2011. [6] Rourab Paul. Partitioned security processor architecture on fpga platform. IET Computers and Digital Techniques , 12:216–226(10), September 2018. [7] E. Rescorla T. Dierks. The transport layer security (tls) protocol version 1.2. 2008. [8] L. Gaspar, V . Fischer, F. Bernard, L. Bossuet, and P. Cotret. Hcrypt: A novel concept of crypto-processor with secured key management. In 2010 International Conference on Reconfigurable Computing and FPGAs , pages 280–285, Dec 2010. [9] Assaf Namer Maitreya Ranganath. How to use aws secrets manager to securely store and rotate ssh key pairs. Advanced (300), AWS Secrets Manager, Security, Identity, and Compliance , 18 Sept, 2019. [10] K. Harrison and S. Xu. Protecting cryptographic keys from memory disclosure attacks. In 37th Annual IEEE/IFIP International Conference on Dependable Sys- tems and Networks (DSN’07) , pages 137–143, 2007.
{ "id": "2007.06201" }
2310.13900
Private Proof of Solvency
The Private Proof of Solvency is a groundbreaking solution in the realm of Proof of Solvency, offering a secure, efficient, and privacy-preserving method for crypto custody providers such as centralized cryptocurrency exchanges or enterprise custody providers. By leveraging the inherent state concept of every blockchain and pioneering cryptographic techniques like zkp, our approach ensures businesses can prove their reserves without revealing their transactions, addresses, or the total amount of liabilities.
http://arxiv.org/pdf/2310.13900v1
Hamid Bateni, Keyvan Kambakhsh
cs.CR, cs.CE
cs.CR
Private Proof of Solvency Hamid Bateni (hamid@europe.com), Keyvan Kambakhsh (keyvankambakhsh@gmail.com) Nobitex Labs Abstract The ”Private Proof of Solvency” project is a groundbreaking solution in the realm of Proof of Solvency, offering a secure, efficient, and privacy-preserving method for crypto custody providers such as centralized cryptocurrency exchanges or enterprise custody providers. By leveraging the inherent state concept of every blockchain and pioneering cryptographic techniques, our ap- proach ensures businesses can prove their reserves without revealing their transactions, addresses, or the total amount of liabilities . Contents 1 Introduction 1 2 Proof of Liability 2 2.1 Commitment . . . . . . . . . . 2 2.2 Merkle Tree . . . . . . . . . . . 2 2.3 Leaves Structure . . . . . . . . 3 2.4 Proof Statement . . . . . . . . . 4 3 Proof of Reserve 4 3.1 Ethereum . . . . . . . . . . . . 5 3.1.1 World State and MPT . 6 3.1.2 GetProof Method . . . . 6 3.1.3 Eth Balance Proof . . . 7 3.1.4 ERC20 Balance Proof . 8 3.2 Bitcoin . . . . . . . . . . . . . . 8 3.2.1 UTXO and ChainStat . 8 3.2.2 Bitcoin Proof Statement 9 4 Proof of Solvency 9 5 Future Works 10 5.1 Contract . . . . . . . . . . . . . 10 5.2 Custodian Scoring Platform . . 10 5.3 User Credit . . . . . . . . . . . 11 1 Introduction Crypto custody providers currently face the challenge of maintaining numerous addresses for user assets. Conventional methods to cre- ate a proof of reserve require the consolidationof these assets into single or multiple known wallet addresses. Our innovative approach eliminates this process by utilizing the inher- ent state concept of every blockchain. The state, achieved by processing blockchain transactions on the blockchain pro- tocol nodes, holds data such as the balance associated with an address. For instance, Ethereum maintains this state in the Merkle Patricia data structure, while Bitcoin employs a LevelDB database with a key-value struc- ture that keeps the active Unspent Transac- tion Outputs (UTXOs). In Bitcoin terms, the balance represents the total active UTXOs an address holds. Our project introduces a novel process for businesses to provide proof of reserve: 1. Create a proof of liabilities tree based on user data on the business database. 2. Sign a message with the private key of the addresses they want to prove reserve with. 3. Provide these messages as private input for our Zero-Knowledge Proof (ZKP) circuit. 4. Submit the output to a contract and an- nounce their new submission for check- ing.arXiv:2310.13900v1 [cs.CR] 21 Oct 2023 Private Proof of Solvency By leveraging ZKP, businesses can prove their reserves without the need to reveal their trans- actions, addresses, or the total amount of lia- bilities, thereby maintaining privacy while en- suring the integrity of the process. In essence, the ”Private Proof of Solvency” project offersa robust, privacy-preserving solution that sig- nificantly enhances the Proof of Solvency pro- cess for crypto custody providers, paving the way for a more secure financial ecosys- tem. 2 Proof of Liability The first step in the proof of solvency process involves the proof of liabilities. This step aims to demonstrate the total amount of liabilities, or obligations, that exist. Liabilities in this context refer to the balances that the custody provider owes to its customers[2] 2.1 Commitment A commitment in the field of cryptography refers to a binding agreement to a chosen piece of information. Once this agreement is made, it becomes irreversible and unalterable. Es- sentially, it’s akin to sealing a message in an envelope - the message cannot be changed once it is sealed. In cryptographic terms, a commitment scheme allows an entity to commit to a cho- sen value, while keeping it hidden from others. It’s designed to be both binding and hiding. Binding ensures that once the commitment is made, it cannot be changed. Hiding ensures that until the reveal, no information about the committed value is leaked. For the Proof of Solvency process, we use a cryptographic commitment to demonstrate the existence and integrity of the liabilities. This is where we introduce the Merkle Tree as our commitment scheme. The root of the Merkle Tree serves as the commitment to all liabilities, and each leaf node of the tree rep- resents an individual liability. The Merkle Tree is an efficient and se- cure method for verifying liabilities. Us- ing this structure, we can provide proof of the existence and integrity of liabilities with- out revealing the actual liabilities until neces- sary. This approach strikes a balance between transparency and privacy, which is crucial for crypto custody providers. In the following sec- tions, we will discuss the structure and prop-erties of the Merkle Tree in more detail. 2.2 Merkle Tree A Merkle Tree is a tree in computer science in which every leaf node is labeled with the cryp- tographic hash of a data block, and each non- leaf node is labeled with the cryptographic hash of the labels of its child nodes. The value of a non-leaf node is determined by the hash of its children nodes, and this continues recur- sively until the tree’s root is achieved. This structure is particularly effective be- cause it allows for efficient and secure verifica- tion of the contents of large data structures. The Merkle Tree allows us to verify data with a significantly smaller subset of the total in- formation.[7] In the scenario of Proof of Solvency, we use the Merkle Tree as our cryptographic commit- ment. The root of the Merkle Tree acts as a commitment to all liabilities, and each leaf in the tree corresponds to a liability. This allows 2 Private Proof of Solvency for an efficient and secure way to prove the existence and integrity of liabilities. By using a Merkle Tree, we can provide a proof path for any given leaf node (liability) up to the root. This path, also known as the Merkle path, allows anyone to verify that a specific liability is part of the tree. They can do this by recomputing the hashes from the leaf up to the root and comparing it with the root hash. This approach is particularly use- ful because it allows for verification without needing access to all data points, providing a balance between transparency and data effi- ciency. In the following sections, we will delve deeper into the leaf structure of the Merkle Tree and how we can use it to create proof statements. 2.3 Leaves Structure Until now, we have discussed how we can com- mit to a list of data by using a hash tree, specifically, a Merkle tree. Now let’s delve into the structure of the data we are committing to. In our commitment to data via a Merkle tree, each leaf (except the last right leaf) con- tains key-value pairs of data: User 1 Leaf •User Identifier •Network Identifire: –Asset 1: amount –Asset 2: amount •Network Identifier: –Asset 3: amount –Asset 4: amount The ’User Identifier’ is a unique identifier for each user. The ’Asset Identifier’ refers to the identifier for each asset. For exam- ple, in the Ethereum network, we consider thezero address as the identifier for ETH, and for each token, we consider their token address as the identifier. The ’amount’ is the balance the user holds of that specific asset according to the business database that wants to prove their liabilities amount. This approach to committing to our liabil- ities is similar to other proof of solvency ap- proaches. However, traditionally, committing to our liabilities in this way would require us to make our total liabilities public. To prove the correctness of the sum, we would need to enlist the help of an auditor firm or use Zero- Knowledge Proofs (ZKP). But in doing so, we would have to reveal our total liabilities. The approach we’re introducing allows the total liabilities to remain private. Let’s ex- plain how this is achieved by discussing the last right leaf of our Merkle tree: Last Right Leaf: •Network Identifier: –Asset 1 ID: Total Balance user1 + ... + user10000 –Asset 2 ID: user1 + ... + user10000 •Network Identifier: –Asset 3 ID: user1 + ... + user10000 –Asset 4 ID: user1 + ... + user10000 The Total Balance is the sum of the bal- ances of all users for a specific asset (Asset1: user1 balance + user2 balance + ...). We then use a ZKP protocol to create a circuit and leverage the characteristic of veri- fiable computation to prove that the total sum in the last right leaf is calculated correctly by adding previous leaves related attributes and that there is no negative balance in any leaf. So now, we commit to a liabilities tree that includes all of our user liabilities. We also hold the total amount we commit to and have 3 Private Proof of Solvency a proof for the correctness of the entire tree and calculation, without revealing the total amount of our liabilities. This allows us to maintain privacy while still proving our sol- vency. 2.4 Proof Statement In this section, we will discuss the entire proof statement of our proof of liabilities process. In simple terms, we’ve developed a com- mitment tree with a specific leaf structure that allows us to make the following proof state- ment: ”I know a Merkle tree with a public root and nodes, the leaves of which contain data about my user balances. The last right leaf in this tree contains data about the total sum of my liabilities per asset.” There are two important aspects of this proof statement: •I have a Zero-Knowledge Proof (ZKP) for this tree that demonstrates that the data in the last leaf is calculated cor- rectly and that there is no negative bal- ance in any leaf. This ZKP proof allows me to verify the integrity and correct- ness of the total liabilities without hav- ing to reveal the actual amounts.[6]•My users can download the snapshot re- lated to their balances from the website and also get the path to verify that their balances are included in the total liabili- ties. This allows users to independently confirm that their balances have been taken into account in the proof of liabil- ities. Based on this approach, as a business, I only need to publish the Merkle root and nodes, not the leaf data. With the ZKP, I prove that my total obligations are included in the last right leaf without having to make this data public. This maintains the privacy of the to- tal liabilities while still allowing users and au- ditors to verify the correctness of the proof of liabilities. In the Proof of Solvency section, we will revisit the last right leaf and discuss how it aids us in maintaining the privacy of the total liabilities while enabling efficient and correct verification. Note: In implementation, it is advisable to use a Merkle Sparse Tree. This reduces some complexity and makes the circuit pro- cess more efficient. 3 Proof of Reserve In the context of a cryptocurrency business, Proof of Reserve involves demonstrating that the business holds enough cryptocurrency assets to cover the balances it owes to its customers. Proof of Reserve is a method by which a business can demonstrate that it holds the necessary reserves to meet its obligations. Currently, the most common approach in- volves revealing an address and moving funds to that address, and then proving ownership of the address by signing a message or pre- announcing the address before transferring funds. However, there are several problems with this approach: As a business dealing with a large num-ber of users, maintaining numerous crypto addresses can be cumbersome. Aggregat- ing all funds into one or a few known ad- dresses for the proof of reserve incurs signifi- cant costs. All of the business’s addresses be- come publicly known, affecting security and privacy. Third parties could potentially track all transactions and discover important data that could impact the business’s security. To achieve a private proof of reserve, we have identified two potential approaches, each with their own pros and cons: 4 Private Proof of Solvency With the introduction of EIP-7503[1], we realized that the basic idea of the EIP could be used to achieve our goal. Instead of trans- ferring funds to a burnt address and privately proving a burn, we could transfer funds to a multiplication of a point on the elliptic curve for which we know the private key of the ref- erence point. After the transfer, we can cre- ate a proof that we’re transferring funds to a multiplication of the reference point (desti- nation point = reference-point ∗gs). Since no one knows ’s’, our destination address remains private, and we can create a proof using the transaction root in a block that we’ve done that. However, there are some issues with this approach: •a. The business still needs to transfer their funds to prove their reserve. •b. In Solidity, we only have access to the last 256 block hashes, which makes proof generation difficult. We then came up with the idea of using the state of each blockchain instead of privately proving a specific transaction. This approach solves the problems of the previous approach but it’s tricky and differs from one blockchain to another. In the following sections, we will discuss how we can use the state to create such a proof in Ethereum and then in Bitcoin. Proof of Reserve involves two key steps: 1. Demonstrating ownership of an address: This step involves proving that a partic- ular address used in the Proof of Reserve process is indeed owned by the business. This is important to ensure that the as- sets being accounted for in the Proof of Reserve are actually controlled by the business and not by a third party. 2. Proving a specific balance in the owned address: Once ownership of the address is established, the next step is to prove that this address holds a specific balance of a particular asset. This confirms thatthe business holds the necessary reserves to meet its obligations. We will discuss the proof of address ownership in the Proof of Solvency section. In the follow- ing section, we will explore how we can prove that a specific address has at least a minimum balance. 3.1 Ethereum Ethereum is a public blockchain protocol that uses an account-based model for its account- ing system. This model is a key aspect of Ethereum’s architecture and allows for a wide range of financial transactions and applica- tions. The protocol distinguishes between two types of accounts: externally owned accounts (EOAs) and contract accounts. EOAs are controlled by private keys and are used for simple transactions. Contract accounts, on the other hand, are governed by their internal code and are used to create smart contracts. Ethereum also introduced the concept of a Virtual Machine (VM), specifically the Ethereum Virtual Machine (EVM). The EVM is a runtime environment that executes smart contracts on the Ethereum network. These smart contracts are self-executing contracts with the terms of the agreement directly writ- ten into lines of code. These features make Ethereum an incred- ibly powerful platform for a wide range of decentralized applications, including but not limited to financial applications. In addition to its account-based model and the Ethereum Virtual Machine (EVM), Ethereum employs a data structure called the Merkle Patricia Tree (MPT) to manage the state of the entire blockchain network. The World State, a crucial component of Ethereum’s architecture, is represented by the MPT, enabling the efficient storage and re- trieval of account information, balances, and smart contract data. The MPT is a key data structure that enhances the integrity and se- curity of the Ethereum blockchain by provid- 5 Private Proof of Solvency ing a tamper-evident way to organize and up- date the state of the network, allowing for rapid verification and validation of transac- tions and contracts. This combination of the MPT and the EVM forms the backbone of Ethereum’s decentralized ecosystem, facilitat- ing the creation and execution of complex, se- cure, and transparent applications.[8] 3.1.1 World State and MPT The World State in Ethereum is the global state of the Ethereum system, which is com- posed of many smaller objects known as ac- counts. Each account is a data structure that contains four fields: the nonce, balance, stor- ageRoot, and codeHash. The nonce is a scalar value equal to the number of transactions sent from this address, the balance is a scalar value equal to the number of Wei owned by this ad- dress, the storageRoot is a 256-bit hash of the root node of a Merkle Patricia tree, and the codeHash is the hash of the EVM code of this account. The Merkle Patricia Trie (MPT) is a cryp- tographic data structure that maps keys to values. In the context of Ethereum, the MPT is used to map addresses to account states. It is a modified version of the Patricia Trie and the Merkle tree, hence the name. The MPT has three types of nodes: leaf nodes, extension nodes, and branch nodes. Leaf nodes and extension nodes are sim- ilar in that they both contain a path and a value. The difference lies in what the value represents. In a leaf node, the value is the account state, whereas in an extension node,the value is the hash of the next node. Branch nodes contain 17 items. The first 16 items point to other nodes in the trie, and the 17th item contains the value of the account state if a key ends at this node. The root hash of the MPT, which is a cryptographic hash of all the data in the trie, is stored in the header of each block. This allows for quick and efficient verification of data. By using the MPT, Ethereum can effi- ciently store the entire state of the system and quickly retrieve, update, or verify any part of it. This is crucial for maintaining the integrity and performance of the Ethereum network. 3.1.2 GetProof Method The Ethereum JSON-RPC API provides an eth getProof method, a function employed by Ethereum execution nodes. This method re- quires an address, an array of storage keys, and a block identifier as arguments, subse- quently returning an object encompassing in- formation about the account and its storage. The returned data includes the account’s balance, nonce, storage hash, and code hash, complemented by a list of nodes (in Recur- sive Length Prefix, or RLP, form) that form the proof of the specified account and its stor- age.[4] This proof essentially comprises a subset of the Merkle Patricia Trie (MPT) necessary for verifying the account’s data. It encom- passes the MPT nodes along the path from the root to the account node, and to the stor- age nodes if storage keys were specified. Us- ing this proof, the correctness of the account’s data and its inclusion in the state of the spec- ified block can be independently verified. 6 Private Proof of Solvency The path within the MPT is determined by the account’s address, which is employed as the key in the trie. The path to the key is a sequence of nibbles (half-bytes) derived from the key. Proof verification involves commencing at the root node of the MPT and following the path specified by the key. Each step involves comparing the node’s hash against the ex- pected hash in the proof. If all hashes cor- respond and the path leads to the expected account data, the proof is validated. This mechanism allows for the verification of an account’s state at a specific block with- out requiring access to the entire Ethereum state, a feature that significantly enhances the scalability and efficiency of the Ethereum net- work. 3.1.3 Eth Balance Proof Building upon the information from the previ- ous sections, we understand that an Ethereum address is mapped to specific data in the Ethereum World State via the Merkle Patri- cia Trie (MPT). The balance of an account is one such data point that is mapped. To prove that a specific address holds at least a minimum amount of Ether, we can de- sign a Zero-Knowledge Proof (ZKP) circuit in the following manner: Our circuit will have two public inputs: •The minimum amount •The block rootAnd several private inputs: •MPT Proof path •Account Data •Block Header Data The circuit for proving the eth minimum balance should follows this flow: 1- Hash the account data 2- Insert the hash into the MPT path 3- Verify the MPT path 4- Insert the calculated root as the state root alongside the other block header data 5- Calculate the block hash based on the block header data 6- Compare the calculated block hash with the public block root. If they match, it means we have correctly proved the data of an ac- count in a specific block 7- In the final step, check if the balance in the account data is greater than or equal to the public minimum amount. After executing all steps in our ZKP cir- cuit, we can prove that a we know a specific address holds at least a minimum Ether bal- ance without revealing the address itself to other people. To implement the described flow in the ZKP circuit, certain specific functions in our zkp circuit need to be implemented. These include the Keccak hash function, Recursive Length Prefix (RLP) encoding, and MPT ver- ification. The Keccak hash function is a cryp- tographic hash function that is used in Ethereum for various purposes, including cal- culating the block hash and the hashes of ac- count data and MPT nodes. Implementing this function in the circuit is crucial for veri- fying the MPT path and the block hash. Recursive Length Prefix (RLP) encoding is a space-efficient object serialization scheme used in Ethereum. It’s used to encode the block header data and the account data. Im- plementing RLP encoding in the circuit allows us to handle these data structures properly. 7 Private Proof of Solvency Lastly, MPT verification is necessary to check the validity of the proof path in the MPT. This involves following the path spec- ified by the account’s address and checking the hashes at each node against the expected hashes in the proof. 3.1.4 ERC20 Balance Proof While the Ether balance proof involves veri- fying the state MPT for a specific address we want to prove, the ERC20 balance proof in- volves an additional step: verifying the con- tract storage for the key related to our ad- dress. ERC20 tokens are implemented as smart contracts on the Ethereum platform. The balance of ERC20 tokens for each address is stored in the contract’s storage, not in the ac- count state as in the case of Ether. Therefore, to prove an ERC20 balance, we must access and verify the contract’s storage. The contract’s storage is a separate MPT where each key-value pair is a mapping of an address to its balance. To prove a specific ERC20 token balance, we first need to gen- erate a proof for the contract storage. This can be done using the eth getProof method by providing the key related to the specific address we want to prove. This will return a proof that can commit to the value of the token balance for that address. Once we have this contract storage proof, we then verify the state MPT for the con- tract address, not the address we want to prove. This involves hashing the contract ac- count data, inserting the hash into the MPT path, verifying the MPT path, and checking if the calculated balance in the contract storage proof matches the public minimum amount.In summary, the key difference for ERC20 balance proof is the addition of verifying the contract storage via its own MPT, and using the contract address to verify the state MPT. This allows us to prove that a specific address holds at least a minimum ERC20 token bal- ance without revealing the address itself, pro- viding a privacy-preserving proof of reserve for ERC20 tokens. 3.2 Bitcoin Bitcoin, the first decentralized cryptocur- rency, was introduced in 2009 by an individual or group known as Satoshi Nakamoto. It op- erates on a peer-to-peer network where trans- actions are verified by network nodes through cryptography and recorded on a public ledger known as blockchain. Unlike Ethereum’s account-based model, Bitcoin uses an Unspent Transaction Out- put (UTXO) model for its accounting system. In this model, transactions output a certain number of bitcoins, which can be spent by future transactions. Each UTXO represents a chain of ownership encoded in the Bitcoin blockchain, and the sum of these UTXOs rep- resents a user’s total bitcoin balance. Bitcoin nodes maintain a database of ac- tive UTXOs, also known as the chain state. This database is crucial for verifying new transactions, as it allows nodes to check whether the UTXOs a transaction wants to spend are indeed valid and have not been spent yet. By only keeping track of unspent bitcoins, the UTXO model simplifies transac- tion verification and improves the scalability of the Bitcoin network.[5] 3.2.1 UTXO and ChainStat At the heart of Bitcoin’s operation is the Un- spent Transaction Output (UTXO) model. In this model, each transaction begins with in- puts that are references to previous transac- tion outputs and ends with outputs that spec- ify a new Bitcoin amount and a new owner. These outputs then become the inputs of fu- 8 Private Proof of Solvency ture transactions, forming a chain of owner- ship. Transaction types in Bitcoin, such as Pay-to-Public-Key-Hash (P2PKH) and Pay- to-Script-Hash (P2SH), govern the conditions under which these UTXOs can be spent. The Chain State in Bitcoin is a key-value database that maintains a record of all active UTXOs. With the arrival of every new block, spent UTXOs are removed, and new UTXOs are added to the Chain State. This dynamic update of the Chain State ensures that it ac- curately reflects the current state of all trans- actions. The balance of a Bitcoin address is deter- mined by the total amount of bitcoins in the UTXOs that the address owns. Each full node in the Bitcoin network inde- pendently maintains the Chain State. Every node computes its own Chain State by apply- ing all transactions from the blockchain start- ing from the genesis block. This decentralized approach ensures that every node has a com- plete and independent verification of the state of all transactions, contributing to the security and robustness of the Bitcoin network. However, this also means that the Chain State is not directly included in the block header and varies from node to node, making it challenging to create a proof of reserve that commits to a specific number of active UTXOs owned by an address. In the next section, we will discuss a solution to this challenge.3.2.2 Bitcoin Proof Statement The first approach to proving a Bitcoin balance might be to adopt the idea from EIP7503. This would involve transferring a specific amount of Bitcoin in a transaction, and then privately proving the transaction and the amount. This approach is feasible but involves operational costs, making it less than ideal. A more efficient approach might involve the following steps: 1. Announce that the platform intends to commit to its Bitcoin balances up to a specific block. 2. Download the entire Chain State for that block from a Bitcoin node. This Chain State includes every active UTXO at the time of the block. 3. Insert every UTXO from the Chain State as a leaf in a Merkle tree. This process converts the Chain State into a structure that allows for efficient proofs. 4. Publish the root of the Merkle tree. Anyone can then verify the correctness of the published root with the help of a Bitcoin node and some additional code. With this approach, we now have a Merkle tree representing all active UTXOs at a spe- cific block. As a business, we know which UTXOs belong to our addresses. We can then create a Zero-Knowledge Proof (ZKP) circuit to prove that we know some leaves (UTXOs) that belong to a specific address and prove their paths in the Merkle tree. This approach allows us to commit to a specific number of active UTXOs owned by an address without revealing the address it- self, providing a privacy-preserving proof of reserve for Bitcoin addresses. 4 Proof of Solvency Proof of Solvency is a method by which a cryptocurrency platform can demonstrate that it has 9 Private Proof of Solvency sufficient funds (assets) to cover its obligations (liabilities), without revealing sensitive details about its customers or its own operations. This provides a level of transparency and trust for the platform’s users, while maintaining privacy.[3] Proof of solvency constitutes a crucial as- pect of trust in digital asset platforms. It con- sists of two main components: Proof of Liabil- ities and Proof of Reserves. Proof of Liabili- ties asserts the total obligations a business has to its customers, while Proof of Reserves con- firms the total assets the business holds. We have discussed various approaches to achieve private proofs for both components, and now, we aim to combine these to achieve a Private Proof of Solvency. Let’s explore the whole picture for achiev- ing private Proof of Solvency: Initially, a business commits to its liabil- ities. This involves creating a Merkle tree of all customer balances and publishing the root of this tree. the business creates a Zero- Knowledge Proof (ZKP) that attests to the correctness of the liabilities tree. The busi- ness also provides an infrastructure that al- lows users to verify that their liabilities have been correctly included in the tree. In the next step the business proves its re-serves using one of the methods we introduced earlier. This involves creating a proof for each of the business’s addresses. Lastly, the business integrates these proofs in a ZKP circuit to show that the total re- serves are at least equal to the total liabilities. This involves comparing the total balance of specific addresses with the balance of the last right leaf in the liabilities tree. These inputs are kept private in the circuit, with the only public data being the block root and the root of the liabilities tree. By successfully completing this process, the business achieves a private Proof of Sol- vency. This demonstrates that the business has sufficient reserves to cover all its liabilities without revealing any sensitive information, such as individual customer balances or busi- ness addresses. This approach not only en- hances the privacy of customers and the busi- ness but also bolsters trust in the platform by providing a verifiable proof of solvency. 5 Future Works In the Future Works section, we will discuss potential enhancements and applications of the methods presented in this paper. We aim to inspire further exploration in the field of privacy and trust in digital asset platforms. 5.1 Contract One potential area for future work involves the creation of a smart contract for storing the historical data of a business’s Proof of Sol- vency. This contract would allow businesses to announce new rounds of Proof of Solvency, set the root of the Proof of Liabilities tree and its associated proof, and also submit proofs related to the Proof of Reserves. It would also perform a final check of solvency, ensur- ing that the total reserves are at least equalto the total liabilities. This could provide a transparent and verifiable record of a busi- ness’s solvency over time, enhancing trust in the platform. 5.2 Custodian Scoring Platform Based on the protocol introduced in this pa- per, we could also develop a platform for scor- ing custodian service providers. This plat- form would evaluate custodians based on their Proof of Reserves, the frequency of their sol- 10 Private Proof of Solvency vency periods, their historical record of sol- vency, and other relevant factors. Such a plat- form could provide users with a transparent and objective way to evaluate the trustwor- thiness of different custodians, aiding in their decision-making process. 5.3 User Credit Currently, the Proof of Solvency protocol is fo- cused on businesses, but it could be extended to users as well. With some modificationsto the protocol and collaboration from busi- nesses, users could create private proofs that they hold at least a minimum balance in the custody of a specific business during their last submitted Proof of Solvency round. Users could also create proofs for historical balances, such as proving that they had at least a mini- mum balance for the last five submitted Proof of Solvency rounds by a specific business. This could provide users with a privacy-preserving way to demonstrate their financial stability and creditworthiness. References [1] Hamid Bateni , Keyvan Kambakhsh. Eip7503. 2023. [2] Vitalik Buterin. Having a safe cex: proof of solvency and beyond. 2022. [3] Nic Carter. Nic’s por, wall of fame. 2023. [4] Kamil Jezek. Ethereum data structures. 2021. [5] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system. 2008. [6] Maksym Petkus. Why and how zk-snark works: Definitive explanation. 2019. [7] WikiPedia. Merkle tree. [8] DR. GAVIN WOOD. Ethereum: A secure decentralised generalised transaction ledger. 11
{ "id": "2310.13900" }
1811.06667
Evolutionary Game for Consensus Provision in Permissionless Blockchain Networks with Shard
With the development of decentralized consensus protocols, permissionless blockchains have been envisioned as a promising enabler for the general-purpose transaction-driven, autonomous systems. However, most of the prevalent blockchain networks are built upon the consensus protocols under the crypto-puzzle framework known as proof-of-work. Such protocols face the inherent problem of transaction-processing bottleneck, as the networks achieve the decentralized consensus for transaction confirmation at the cost of very high latency. In this paper, we study the problem of consensus formation in a system of multiple throughput-scalable blockchains with sharded consensus. Specifically, the protocol design of sharded consensus not only enables parallelizing the process of transaction validation with sub-groups of processors, but also introduces the Byzantine consensus protocols for accelerating the consensus processes. By allowing different blockchains to impose different levels of processing fees and to have different transaction-generating rate, we aim to simulate the multi-service provision eco-systems based on blockchains in real world. We focus on the dynamics of blockchain-selection in the condition of a large population of consensus processors. Hence, we model the evolution of blockchain selection by the individual processors as an evolutionary game. Both the theoretical and the numerical analysis are provided regarding the evolutionary equilibria and the stability of the processors' strategies in a general case.
http://arxiv.org/pdf/1811.06667v1
Zhengwei Ni, Wenbo Wang, Dong In Kim, Ping Wang, Dusit Niyato
cs.GT, cs.CR, cs.DC
cs.GT
arXiv:1811.06667v1 [cs.GT] 16 Nov 2018Evolutionary Game for Consensus Provision in Permissionless Blockchain Networks with Shards Zhengwei Ni∗, Wenbo Wang∗, Dong In Kim†, Ping Wang‡and Dusit Niyato∗ ∗School of Computer Engineering, Nanyang Technological Uni versity, Singapore 639798 †School of Information and Communication Engineering, Sung kyunkwan University (SKKU), Suwon, Korea 16419 ‡Department of Electrical Engineering & Computer Science, Y ork University, Toronto, Canada ON M3J 1P3 Abstract —With the development of decentralized consensus protocols, permissionless blockchains have been envision ed as a promising enabler for the general-purpose transaction-d riven, autonomous systems. However, most of the prevalent blockch ain networks are built upon the consensus protocols under the crypto-puzzle framework known as proof-of-work. Such prot o- cols face the inherent problem of transaction-processing b ottle- neck, as the networks achieve the decentralized consensus f or transaction confirmation at the cost of very high latency. In this paper, we study the problem of consensus formation in a system of multiple throughput-scalable blockchains with s harded consensus. Specifically, the protocol design of sharded con sensus not only enables parallelizing the process of transaction v alidation with sub-groups of processors, but also introduces the Byza ntine consensus protocols for accelerating the consensus proces ses. By allowing different blockchains to impose different leve ls of processing fees and to have different transaction-generat ing rate, we aim to simulate the multi-service provision eco-systems based on blockchains in real world. We focus on the dynamics of blockchain-selection in the condition of a large populatio n of con- sensus processors. Hence, we model the evolution of blockch ain selection by the individual processors as an evolutionary g ame. Both the theoretical and the numerical analysis are provide d regarding the evolutionary equilibria and the stability of the processors’ strategies in a general case. Index Terms —Permissionless blockchains, sharding, ELAS- TICO, evolutionary game I. I NTRODUCTION The past decade has witnessed the fast development of the blockchain technologies, especially as the decentrali zed immutable ledger database (i.e., cryptocurrencies) in the FinTech sector. Most of the studies on blockchains have been focused on the development in cryptocurrencies and the related domains [1]. However, in recent years, more focus about blockchain applications is also put upon the domain of self-organization in general-purpose decentral ized systems [2]. Given the decentralized consensus achieved by the blockchain network, smart contracts [3] are deployed in the form of general-purpose scripts/functions and store d on each consensus node (i.e., processor)1in the network. Following the order prescribed by the consensus about the blockchain states, each smart contract is executed in a repl i- cated manner and thus guarantees to produce a uniform output across the network. Thanks to the technical maturation of smart contracts, blockchains are now envisioned as an enabl er for self-organization in wireless networks and decentrali zed 1We use the two terms, i.e., node and processor, interchangea bly.Service Providers Service Hosting Peers(Mobile ) ClientsBlockchainRegistration and Service Negotiation (1)Data/Computation Offloading(2) Service Delivery(3) (4) (6) (5) Operations in the form of smart contract Interactions between entities (including data flow) Fig. 1. A generic framework of blockchain-based self-organ ization in a service system of three parties. All the deals are settled in a sequence of smart contracts: (1) service requesting by the clients, (2) access granting by the providers, (3) requesting service hosting (e.g., auc tion for computa- tion/storage/utility offloading) by the providers, (4) set tlement of the hosting requests, (5) delivery negotiation between hosting peers a nd clients and (6) service completion and payment settlement upon proofs of de livery. cyber-physical systems. More specifically, existing studi es, e.g., autonomous access control [4] and service provision [ 5], employ blockchains as an integrator to channel the services upon demands as well as audit the operations of different parties in the system. A generic paradigm for blockchain-based self-organizatio n in networking applications is described by Figure 1 from the perspective of blockchain users. With the embedded cryp- tographic functionalities (e.g., asymmetric keys [2]) and the automated transactions based on smart contracts, blockcha ins are ready to provide the overlaid/virtual channels of secur ed data/service/payment delivery among trustless parties in the system [2]. As illustrated in Figure 1, this is achieved by encapsulating the controlling rules into smart contracts a nd the data (e.g., control signals) into blockchain transacti ons. In particular, when blockchain networks are implemented with permissionless consensus protocols, it is possible to real ize the scheme of network management in a purely decentralized manner. Furthermore, when the blockchain maintenance is delegated to groups of nodes with dedicated storage and computing power, we have the blockchain as a Platform as a Service (PaaS) in a similar way to that in the context of cloud computing. Nevertheless, although permissionless blockchains provi de a promising approach to transaction-driven automation for network control problems, most of the existing permis- sionless consensus protocols are based on Proof-of-Work (PoW) [1] and sacrifice the efficiency, i.e., transaction- processing throughput, for a higher level of consensus se- curity [2]. For example, the popular Ethereum network [6] with a framework of Tuning-complete smart contracts can only support less than 20 Transactions Per Second (TPS). As a result, these blockchains cannot satisfy the low-laten cy requirements in most of the networking applications and services such as access handing-off between groups of road side units in vehicular-to-infrastructure communication . To guarantee controller response in milliseconds, throughpu t- scalable protocols such as ELASTICO [7] are proposed to support both open access as in permissionless networks and low latency as in consortium distributed systems [8]. In bri ef, the throughput-scalable blockchain networks adopt the PoW - based crypto-puzzle design for node-identity verification and the classical Byzantine Fault-Tolerant (BFT) protocols (e .g., practical BFT [9]) for distributed transaction ordering. F urther- more, the concept of sharding is adopted from the distribute d database [10] to enable the parallelization of transaction pro- cessing. Thus, the blockchain network is able to increase th e TPS as the number of consensus processors increases. In this paper, we investigate the scenario of general-purpo se PaaS based on permissionless blockchains using sharding- based consensus protocols. In particular, we study the prob - lem of consensus provision at the node level for multiple blockchains. Noting that the decentralized processors in a blockchain network are trustless, we assume that the pro- cessors are rational (i.e., profit-driven) and non-malicio us. Namely, the independent and homogeneous processors partic - ipate in the consensus processes of parallel blockchains an d dedicate their resources in exchange for the optimal consen sus rewards, i.e., the transaction fees collected from the clie nts. For ease of exposition, we use the ELASTICO protocol [7] to exemplify the approach of system analysis for consensus participation. Without limiting the blockchains to any spe cific service provision system, we essentially study a general ca se of eco-system formation for self-organization with blockcha ins. Then, by formulating the behaviors of consensus nodes as an evolutionary game, we provide a series of analytical result s regarding the equilibrium states and their stability in the evolution of the eco-system. II. P RELIMINARIES OF SHARDED BLOCKCHAINS A. Protocol Fundamentals of ELASTICO Blockchain networks with sharding protocol partition the processing processors inside into smaller BFT committees. Each committee processes a disjoint set of transactions, wh ich is called shard here. Thus, the tasks of transaction process- ing are divided into multiple groups and done in parallel. Blockchains with shards overcome the fundamental scalabil ity limits of many popular blockchain systems, e.g., Bitcoin [1 0]. The transaction processing rate is able to scale almost line arly with the number of processors in the network, which ensures that the requirements of real-time resource-access manage ment systems can be met. Now, we briefly introduce how ELASTICO [7] works. ELASTICO proceeds in loosely-synchronized epochs, each ofwhich processes a set of transactions. According to [7], in e ach epoch, one processor mainly executes 5 procedures: 1) The processor is first required to solve PoW puzzles based on the concatenation of a public random seed, its own public key and Internet protocol (IP) address. This procedure allows other processors to verify the identity of the processor. In addition, the processor is randomly assigned to a committee based on the last few bits of its PoW solution. For example, assuming a total number of 22= 4committees, if the last 2 bits of the PoW solution is “01”, the processor will be assigned to committee 2 if this committee is not full. However, since the target committee to assign to may be full, the processor may need to solve more than one PoW puzzle. 2) Once a processor is accepted by the network and as- signed to a committee, it will discover and establish point-to-point connections with other committee peers following an algorithm of decentralized randomness generation described in [7, Section 3.3]. 3) Then, an authenticated Byzantine agreement protocol, e.g., practical BFT (PBFT) [9], is run within a committee to agree on the set of transactions (i.e. shard) allocated to it. Since different committees work in parallel, the net- work latency only depends on the number of processors in one committee rather than the entire network. 4) Once an agreement is reached in each committee, all the results will be merged. Then, the final result is broadcast to the network. 5) Finally, a scheme described in [7, Section 3.6] is exe- cuted by a global committee to randomly generate a new random seed for the next epoch. B. Average Epoch Time for ELASTICO As per the experimental results given by [7], the epoch time, i.e., the duration of one epoch, is mainly dominated by two parts, committee formation time and consensus time. 1) Average committee formation time: Committee forma- tion time is the time used for randomly dividing processors into different committees. This time is mainly due to the cos t of solving PoW puzzles. We assume that there are totally nprocessors in the blockchain network. They are divided into2scommittees, with a fixed number of cprocessors in each committee. Thus, n= 2sc. As we mentioned previously, one processor needs to solve more than one PoW puzzle if the originally assigned committee is full. The problem of calculating the total number of the required PoW solutions is equivalent to the extended coupon collector problem [11] . The expected number of PoW solutions is given in [7, Section 10.1]. When cis fixed, it has a superlinear relationship with n, which means that the expected number of PoW puzzles solved by one processor is increasing with n. In other words, when the number of processors per committee is fixed, if there are more processors in the blockchain network, one processo r is expected to solve more PoW puzzles. In this paper, the expected number of PoW puzzles solved per processor is defined as a continuously differentiable and monotonically increasing function of n,f(n), and we have f(0) = 0 . Assume that given a fixed puzzle difficulty, the average time for solv ing one PoW puzzle is T. Then, the average committee formation time can be expressed as Tf(n). 2) Average consensus time: The consensus time is deter- mined by the intra-committee agreement for the given shard and the inter-committee agreement for the final result. It is mainly due to the network latency, which is usually caused by the propagation delay of physical links, the forwarding latency of gateways, and the queueing and processing delays of intermediate nodes. In ELASTICO, we can observe that most of communications among processors are limited within the individual committees, so for a given committee size, th e time to reach consensus remains almost constant for differe nt network sizes. As [7, Figure 1] shows, the consensus require s 103 seconds for 400 processors and 110 seconds for 800 processors. Hence, we can think the consensus time is only dependent on the committee size c, which is denoted by g(c). C. Average Reward and Cost in ELASTICO In this subsection, we quantitatively model the average reward and cost of one processor per epoch in ELASTICO. 1) Average reward: The processor receives a payment by adding new transaction records into the blockchain. We assume that the transaction records are generated by the users with a rate µ, and the price per transaction is set as r. Thus, the average reward of one processor per epoch is µr(Tf(n)+g(c))/n. 2) Average cost: The cost of one processor is dominated by the energy used for solving PoW puzzles. We assume that the cost of getting one PoW solution is ςon average. Thus, the average cost of one processor per epoch is ςf(n). III. S YSTEM MODEL AND PROBLEM FORMULATION A. Payoff Functions We consider Nindividual processors organizing themselves intoMblockchain networks built upon ELASTICO. That is, the processors choose to participate in one of the blockchai n networks to receive their revenue. We assume that the pro- cessors have identical computing power and the average time for solving one PoW puzzle of fixed difficulty is T. We also assume that all blockchain networks adopt the same parameter of committee size c. We use the subscript ito denote other parameters for the ith blockchain network. Without loss of generality, the index of one blockchain network is determined by µiriin a descending order. That is, µ1r1≥ ··· ≥µMrM>0. The vector of population fractions of the blockchain networks is denoted by x= [x1,...,x M]⊤, where [·]⊤is the notation of transpose. Thus, xis in an(M−1)- simplex, i.e., X={x∈RM +:/summationtextM i=ixi= 1}. We call xstate vector (orstate ) andXstate space . According to Section II, the expected payoff per unit time (i.e., second) of a processor in the ith blockchain network can be expressed as ui(x) =µiri(Tf(Nxi)+g(c)) Nxi+˜τ−ςf(Nxi) Tf(Nxi)+g(c),0≤x≤1, (1)where˜τ >0can be regarded as the share taken by network operators (e.g., the boosting nodes). By defining αi=µiri/N, τ= ˜τ/N , andh(xi) =ςf(Nxi)/(Tf(Nxi) +g(c)),ui(x) can be simplified as ui(x) =αi xi+τ−h(xi),0≤x≤1. (2) We can easily obtain that h(xi)is monotonically increasing withxiandh(0) = 0 . B. Dynamical System Formulation In this process, some processors may switch from one blockchain network to another, causing a change of x. Since the payoff of the processor is dependent on x, other proces- sors may also adjust their choice of consensus participatio n accordingly to choose new blockchain networks. Hence, in this paper, we study population fractions of the blockchain networks as a dynamical system. The state vector at time t is denoted by x(t) = [x1(t),...,x M(t)]⊤, and we define x0=x(0)as the initial state. At time t, the rate at which the population fraction of ith blockchain network grows is dxi(t) dt, and we define ˙x(t) =/bracketleftBig dx1(t) dt,...,dxM(t) dt/bracketrightBig⊤ . We assume that all the processors are bounded rational and self - interested, so the forces regulating the state vector are fr om the difference of payoffs. That is, the processors always sw itch from a blockchain network with low payoff to one with high payoff. Since the payoffs at time tare determined by x(t), ˙x(t)can be described by a function of x(t), here defined as ϕ(·) :X →RM. Thus, this dynamical system is described by the following ordinary differential equations (ODEs): ˙x(t) =ϕ(x(t)),∀t∈R, i= 1,...,M. (3) Specially, we adopt the following replicator equations [12 ]: ϕi(x) =xi(ui(x)−¯u(x)), (4) where¯u(x) =/summationtextM i=1xiui(x), which can be regarded as the average payoff. Notice that here we ignore time tsinceϕ(·) is autonomous, that is, does not depend explicitly on time. W e can easily find/summationtextM i=1ϕi(x) = 0 , so that if x0∈ X, we always havex(t)∈ X for anyt∈R. We are interested in how the vector of population fractions, i.e., state vector, changes with time for different initial states. Usually, it is described by a function ξ(·,x0) :T→ X , where Tis an open interval containing t= 0, such that ξ(0,x0) = x0, and∀t∈T, d dtξ(t,x0) =ϕ(ξ(t,x0)). (5) The function ξ(·,x0)is called a solution of (3). IV. A NALYSIS OF THE GAME A. Uniqueness of Solutions for Different Initial Points In this subsection, we show that ∀x0∈ X , we have a unique solution ξ(·,x0). It means that once the initial state is determined, how the population fractions evolve over tim e is totally determined. It is stated in the following theorem . Theorem 1. Forϕ(·) :X →RMdescribed in (4)and∀x0∈ X, the system (3)has a unique solution. Proof. We can obtain that ∂ϕi(x) ∂xi= (1−2xi)/parenleftbiggαi xi+τ−h(xi)/parenrightbigg −(xi−x2 i)/parenleftBigg αi (xi+τ)2+dh(x) dx/vextendsingle/vextendsingle/vextendsingle/vextendsingle x=xi/parenrightBigg −M/summationdisplay j=1,j/negationslash=ixj/parenleftbiggαj xj+τ−h(xj)/parenrightbigg , (6) ∂ϕi(x) ∂xj=−xi/parenleftbiggαj xj+τ−h(xj)/parenrightbigg +xixj/parenleftBigg αj (xj+τ)2+dh(x) dx/vextendsingle/vextendsingle/vextendsingle/vextendsingle x=xj/parenrightBigg . (7) (6) and (7) indicate that∂ϕi(x) ∂xiand∂ϕi(x) ∂xjexist and are continuous in X. Hence, ϕ(x)is Lipschitz continuous in X. By the Picard-Lindel¨ of theorem [12, Theorem 6.1], we obtai n Theorem 1. B. Existence of Equilibria Mathematically, an equilibrium (a.k.a., rest point orcritical point ) under a solution mapping ξis a state vector x∈ X such that ξ(t,x) =xfor allt∈R[12, Definition 6.4]. In our model, it means that if the vector of population fractions is at an equilibrium, this population distribution will remai n the same, which implies that there are no “job-hoppings” in the blockchain networks. In addition, according to [12, Propos ition 6.3], if the vector of population fractions finally converge s over time, it will converge to an equilibrium. Now, we are ready to give all the possible equilibria. Based on whether there are any processor, we can divide the considered blockchain networks into two specific sets, i.e. , theworking blockchain set W={i:xi>0}and the resting blockchain set ¯W={i:xi= 0}. A state is an equilibrium if and only if ϕ(x)vanishes at this state. For a givenW={i1,...,i|W|}, it means that ui1(x) =···=ui|W|(x). (8) Theoretically, there are totally 2M−1possibleW. However, for some values of W, there may not be any equilibria. Now we give the conditions that a given Whas at least one equilibrium. Consider a field K={(a,b) :a,b >0,a 1+τ−h(1)≤b≤ a τ} ⊂R2, and a function K(·) :K →[0,1]such that K(ˆa,ˆb) is the solution for the equation ˆa x+τ−h(x) =ˆb. (9) Notice that when K(ˆa,ˆb)is continuous and monotonically increasing with ˆaand decreasing with ˆb. Then, we give the following theorem.Theorem 2. For a given set of working blockchains W={i1,...,i|W|}, ifαi1 1+τ−h(1)<αi|W| τand /summationtext|W|−1 j=1K/parenleftBig αij,αi|W| τ/parenrightBig <1, a unique equilibrium exists. Otherwise, there is no equilibrium. Proof. First, we show ifαi1 1+τ−h(1)<αi|W| τand /summationtext|W|−1 j=1K/parenleftBig αij,αi|W| τ/parenrightBig <1, a unique equilibrium exists. Sinceαi1≥ ··· ≥ αi|W|, ifαi1 1+τ−h(1)<αi|W| τ, we must have/parenleftBig αij,αi|W| τ/parenrightBig ∈ K,j= 1,...,|W|−1, and 0≤K/parenleftBig αij,αi|W| τ/parenrightBig <1, j= 1,...,|W|−1. (10) Notice that K/parenleftBig αi|W|,αi|W| τ/parenrightBig = 0. In addition, since for j= 2,...,|W|, αij 1+τ−h(1)≤αi1 1+τ−h(1)<αi|W| τ≤αij τ, (11) we have 0< K/parenleftbigg αij,αi1 1+τ−h(1)/parenrightbigg ≤1, j= 2,...,|W|.(12) Obviously the following holds K/parenleftbigg αi1,αi1 1+τ−h(1)/parenrightbigg = 1. (13) Thus, |W|/summationdisplay j=1K/parenleftbigg αij,αi1 1+τ−h(1)/parenrightbigg >1. (14) Since/summationtext|W| j=1K/parenleftBig αij,αi|W| τ/parenrightBig <1andK(ˆa,ˆb)is continuous and monotonically decreasing with ˆb, there must exist a unique ¯b∈/parenleftBigαi1 1+τ−h(1),αi|W| τ/parenrightBig such that |W|/summationdisplay j=1K/parenleftbig αij,¯b/parenrightbig = 1, (15) and the population fraction of the ijth blockchain network is indeedK/parenleftbig αij,¯b/parenrightbig . Whenαi1 1+τ−h(1)≥αi|W| τ.∀xi1,xi|W|∈(0,1], we can easily obtain that αi|W| xi|W|+τ−h/parenleftbig xi|W|/parenrightbig <αi|W| τ ≤αi1 1+τ−h(1)≤αi1 xi1+τ−h(xi1). (16) Hence, there are no equilibria in this case. Finally, it is obvious that whenαi1 1+τ−h(1)<αi|W| τand /summationtext|W|−1 j=1K/parenleftBig αij,αi|W| τ/parenrightBig ≥1,ui1(x) =···=ui|W|(x)>0 will lead to/summationtext|W| j=1xij>1. Hence, there are no equilibria in this case. C. Asymptotic Stability of the Equilibria Among all the equilibria, we are especially interested in those which are “robust”. That means, all sufficiently small perturbations of the equilibrium induce a backward movemen t. The mathematical definition of asymptotic stability in a dy- namical system can be found in [12, Definitionn 6.5]. We assume that x∗is an equilibrium and let Jϕ x∗be the M×MJacobian matrix of ϕ(·)at the state x∗. Then,Jϕ x∗ can be expressed as Jϕ x∗= ∂ϕ1(x) ∂x1∂ϕ1(x) ∂x2...∂ϕ1(x) ∂xM∂ϕ2(x) ∂x1∂ϕ2(x) ∂x2...∂ϕ2(x) ∂xM............ ∂ϕM(x) ∂x1∂ϕM(x) ∂x2...∂ϕM(x) ∂xM /vextendsingle/vextendsingle/vextendsingle/vextendsingle/vextendsingle/vextendsingle/vextendsingle/vextendsingle/vextendsingle/vextendsingle x=x∗,(17) where∂ϕi(x) ∂xiand∂ϕi(x) ∂xj,j/ne}ationslash=iare given in (6) and (7), respectively. According to [13, Theorem 8.4.3], x∗is asymptotically stable if the real part of every eigenvalue o f Jϕ x∗is negative, and it is unstable if any eigenvalue of Jϕ x∗ has a positive real part. Based on our observations of Jϕ x∗, we can obtain the following lemma. Lemma 1. For a given set of working blockchains W= {i1,...,i|W|}and its corresponding equilibrium x∗ W,∀k∈ ¯W,λk=αk τ−αi|W| xi|W|+τ+h/parenleftbig xi|W|/parenrightbig is one eigenvalue of Jϕ x∗. Proof. From (6) and (7), we can obtain that ∀k∈¯W, ∂ϕk(x) ∂xk/vextendsingle/vextendsingle/vextendsingle/vextendsingle xk=0 =αk τ−M/summationdisplay j=1,j/negationslash=kxj/parenleftbiggαj xj+τ−h(xj)/parenrightbigg =αk τ−/parenleftBigg αi|W| xi|W|+τ−h/parenleftbig xi|W|/parenrightbig/parenrightBigg =λk.(18) In addition, when xk= 0,∀˜k/ne}ationslash=k, we have ∂ϕk(x) ∂x˜k= 0. (19) We can observe that the matrix Jϕ x∗ W−λkIM×Mhas its elements of kth row all equal to 0, where IM×Mis the M×Midentity matrix. Thus, det/parenleftBig Jϕ x∗ W−λkIM×M/parenrightBig = 0, wheredet(·)is the determinant. Hence, λkis an eigenvalue ofJϕ x∗ W. Based on the Lemma 1, we can further obtain Theorems 3. Theorem 3. For a given set of working blockchains W= {i1,...,i|W|}and its corresponding equilibrium x∗ W, if∃k∈ ¯W, andλk≥0, this equilibrium is not asymptotically stable. Proof. From Lemma 1, we know that λkis an eigenvalue of Jϕ x∗ W. According to [13, Theorem 8.4.3], Jϕ x∗ Whas at least one non-negative eigenvalue, so x∗ Wis not asymptotically stable. Then, we can obtain the following corollaries.Corollary 1. A set of working blockchains W= {i1,...,i|W|}with|W|=whas a corresponding equilibrium. IfW /ne}ationslash= [1,w]∩N, this equilibrium is not asymptotically stable. Proof. SinceW /ne}ationslash= [1,w]∩N, there must exist a positive integerlsuch that l≤wandl∈¯W. Clearly, λl≥0. According to Theorem 3, we have this corollary. Corollary 2. If the set of working blockchains [1,w]∩Nhas a corresponding equilibrium, for any positive integer rsuch that r < w , the set of working blockchains [1,r]∩Nmust have a corresponding equilibrium, which is not asymptotically st able. Proof. It is easy to obtain α1 1+τ−h(1)<αw τ≤αr τ, (20) and r−1/summationdisplay j=1K/parenleftBig αj,αr τ/parenrightBig ≤r−1/summationdisplay j=1K/parenleftBig αj,αw τ/parenrightBig ≤w−1/summationdisplay j=1K/parenleftBig αj,αw τ/parenrightBig <1. (21) Hence, according to Theorem 2, the set of working blockchains [1,r]∩Nmust have an equilibrium. We denote this equilibrium by x∗ [1,r]∩N, with Jaco- bian matrix Jϕ x∗ [1,r]∩N. Let/summationtextr j=1K(αj,¯br) = 1 and/summationtextw j=1K(αj,¯bw) = 1 . Clearly, ¯br<¯bw. Sincew /∈[1,r]∩N, according to Lemma 1,αw τ−¯bris an eigenvalue of Jϕ x∗ [1,r]∩N. Sinceαw τ>¯bw>¯br, according to Theorem 3, x∗ [1,r]∩Nis not asymptotically stable. Theorem 4. Letw∗= max{w:α1 1+τ−h(1)< αw τ,/summationtextw−1 j=1K/parenleftbig αj,αw τ/parenrightbig <1}. Then, only the corresponding equilibrium of the set of working blockchains [1,w∗]∩Nhas probability to be asymptotically stable. Proof. According to Corollaries 1 and 2, all the other equilib- ria are not asymptotically stable. Then, we must have Theore m 4. V. P ERFORMANCE EVALUATION In this section, we provide the numerical analysis of the pop - ulation dynamics of ELASTICO. We assume four blockchain networks, for which α1= 0.7,α2= 0.5,α3= 0.3, and α4= 0.1. In addition, we set τ= 0.01andh(x) = ln(1+ x). In this condition, from our analysis in Section IV-B, we can easily obtain xe1= [0.4225,0.3148,0.1975,0.0652]⊤ andxe2= [0.4499,0.3369,0.2132,0]⊤are two equilibria. By calculating the eigenvalues of Jacobian matrix of ϕ(·)at the state xe1, we can find that xe1is asymptotically stable. Meanwhile, according to Corollary 2, we can see that xe2is not asymptotically stable. We show the population dynamics from an initial point x0= [0.4498,0.3369,0.2132,0.001]⊤, which is a very small deviation from xe2. From Figure 2, we can observe that, in- stead of moving backward to its neighboring equilibrium xe2, 0 5 10 15 20 25 30 35 4000.050.10.150.20.250.30.350.40.45 Fig. 2. The population dynamics for four blockchain network s, from the initial point x0= [0.4498,0.3369,0.2132,0.001]⊤. 0 1 2 3 4 5 612345678910 Fig. 3. The payoff dynamics for four blockchain networks, fr om the initial pointx0= [0.4498,0.3369,0.2132,0.001]⊤. the state moves away from this area and settles down over time toward the new equilibrium xe1. This observation coincides with our analysis given in the previous paragraph. Then, in Figure 3, we show the dynamics of payoff for each blockchain network. We can observe that at the beginning, since there ar e only a few processors in the fourth blockchain, the payoff per second of one processor is much higher than other three blockchains. However, as more and more processors move to the fourth blockchain, the payoff for the fourth blockchain decreases while those for the other three blockchains incre ase. Finally, they reach an equilibrium and all the blockchains h ave the same expected payoff. Finally, we show how the asymptotically stable equilibrium changes with the prices. We set α1= 0.7κ,α2= 0.5κ,α3= 0.3κ, andα4= 0.1κ, whereκvaries from 0.5to1.5. Figure 4 shows that, as the prices increase, the population fraction s of blockchain networks with higher prices increase while thos e of blockchain networks with lower prices decrease. VI. C ONCLUSION In this paper, we have investigated the process of eco-syste m formation for a large population of consensus nodes to join one consensus process from multiple permissionless, shard ed blockchains. In particular, we have considered the scenari o of multiple blockchains adopting the ELASTICO protocol, whic h combines the proof-of-work puzzle and the Byzantine fault- tolerant agreement protocol to achieve both open access and low transaction-processing latency. We have considered a g en-0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.50.050.10.150.20.250.30.350.40.45 Fig. 4. The asymptotically stable equilibrium for α1= 0.7κ,α2= 0.5κ, α3= 0.3κ, andα4= 0.1κ, whereκchanges from 0.5to1.5. eral scenario where different blockchains may provide diff er- ent transaction fees and have different transaction-gener ating rates. We have studied the blockchain-selection behaviors of the independent, bounded-rational consensus nodes with identical computational power. The behaviors of blockchai n selection by the consensus nodes have been formulated as an evolutionary game based on replicator dynamics. We have provided a series of analytical and numerical results, whic h reveal the consensus-formation mechanism in a permissionl ess network of blockchains for multiple service provision. REFERENCES [1] F. Tschorsch and B. Scheuermann, “Bitcoin and beyond: A t echnical survey on decentralized digital currencies,” IEEE Communications Sur- veys Tutorials , vol. 18, no. 3, pp. 2084–2123, third quarter 2016. [2] W. Wang, D. T. Hoang, Z. Xiong, D. Niyato, P. Wang, P. Hu, an d Y . Wen, “A survey on consensus mechanisms and mining managem ent in blockchain networks,” arXiv preprint arXiv:1805.02707 , 2018. [3] K. Christidis and M. Devetsikiotis, “Blockchains and sm art contracts for the internet of things,” IEEE Access , vol. 4, pp. 2292–2303, May 2016. [4] K. Kotobi and S. G. Bilen, “Secure blockchains for dynami c spectrum access: A decentralized database in moving cognitive radio networks en- hances security and user access,” IEEE Vehicular Technology Magazine , vol. 13, no. 1, pp. 32–39, Mar. 2018. [5] N. Herbaut and N. Negru, “A model for collaborative block chain-based video delivery relying on advanced network services chains ,”IEEE Communications Magazine , vol. 55, no. 9, pp. 70–76, 2017. [6] V . Buterin, “Ethereum: A next-generation smart contrac t and decen- tralized application platform,” Ethereum Foundation, Tec h. Rep., 2014. [Online]. Available: https://github.com/ethereum/wiki /wiki/White-Paper [7] L. Luu, V . Narayanan, C. Zheng, K. Baweja, S. Gilbert, and P. Saxena, “A secure sharding protocol for open blockchains,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communicatio ns Security . New York, NY , USA: ACM, 2016, pp. 17–30. [8] M. Vukoli´ c, “The quest for scalable blockchain fabric: Proof-of-work vs. bft replication,” in Open Problems in Network Security: IFIP WG 11.4 International Workshop , Zurich, Switzerland, Oct. 2015, pp. 112–125. [9] M. Castro and B. Liskov, “Practical byzantine fault tole rance and proactive recovery,” ACM Trans. Comput. Syst. , vol. 20, no. 4, pp. 398– 461, Nov. 2002. [10] K. Croman, C. Decker, I. Eyal, A. E. Gencer, A. Juels, A. K osba, A. Miller, P. Saxena, E. Shi, E. G¨ un Sirer, D. Song, and R. Wat tenhofer, “On scaling decentralized blockchains,” in Financial Cryptography and Data Security: International Workshops on BITCOIN, VOTING and WAHC , Christ Church, Barbados, Feb. 2016, pp. 106–125. [11] D. J. Newman, “The double dixie cup problem,” The American Mathe- matical Monthly , vol. 67, no. 1, pp. 58–61, 1960. [12] J. W. Weibull, Evolutionary game theory . MIT press, 1997. [13] N. Lebovitz, Ordinary Differential Equations , ser. Mathematics Series. Brooks/Cole, 1999.
{ "id": "1811.06667" }
1806.11399
A Rolling Blockchain for a Dynamic WSNs in a Smart City
Blockchain is one of the most popular topics for discussion now. However, most experts still see this technology as only part of Bitcoin, other crypto-currencies or money transfer systems. Often, new solutions, proposed by young researchers, are blocked by reviewers, only because these solutions can not be used for Bitcoins. However, Blockchain technology is more universal and can be used also in other areas, for example, in IoT, WSN and mobile devices. This paper considers the implementation of Blockchain technology in sensor networks as an element of IoT. The concept of "Rolling Blockchain" was proposed, which can be used to build WSN with the participation of Smart Cars, as nodes of the network. The order of block formation and structure in the chain is proposed and a mathematical model is created for it. We estimate the optimal number of WSN nodes, the number of connections between nodes, for specified network reliability values, was performed.
http://arxiv.org/pdf/1806.11399v1
Sergii Kushch, Francisco Prieto-Castrillo
cs.CR
cs.CR
IEEE INTERNET OF THI NGS JOURNAL (J -IOT), MANUSCRIPT ID 1 A Rolling Blockchain for a Dynamic WSNs in a Smart City Sergii Kushch, Senior Member, IEEE, Francisco Prieto -Castrillo Abstract —Blockchain is one of the most popular topics for discussion now. However, most experts still see this technology as only part of Bitcoin, other crypto -currencies or money transfer systems. Often, new solutions, proposed by young researchers, are blocked by reviewers, only because these solutions can not be used for Bitcoins. However, Blockchain technology is more universal and can be used also in other areas, for example, in IoT, WSN and mobile devices. This paper considers the implementation of Blockchain technology in sensor networks as an element of Io T. The concept of "Rolling Blockchain" was proposed, which can be used to build WSN with the participation of Smart Cars, as nodes of the network. The order of block formation and structure in the chain is proposed and a mathematical model is created for i t. We estimate the optimal number of WSN nodes, the number of connections between nodes, for specified network reliability values, was performed. Index Terms —Blockchain; Wireless Sensor Network, Distributed network, Rolling Blockchain; Internet of Things, Smart City ——————————  —————————— 1 INTRODUCTION HE essence of Blockchain (BC) technology is the secure, distributed storage of any kind of information. BC can store data on transactions; on who, to whom and what amount of money has been transferred (cryptocurrencies, bank transac- tions). Currently, this is the main area in which Blockchain is used. However, attempts are being made to apply it in other areas, for example, to record cargo during transportation, to manage "smart cities", create "smart contracts", and for the Internet -of- Things (IoT) and Wirele ss Sensor Networks (WSN) etc. [1], [2], [3], [4], [5], [6], [7], [8] . BC was conceived as a system that is completely protected from the substitution of information in existing blocks of the chain. This property makes us look for ways of using the BC techn ology as a method of protecting the information that is transmitted from various sensors and mobile devices. This also implies its storage, without any possibility of substituting part or all of the information. With respect to cryp- tocurrency, BC is the ma instay of Bitcoin's [9], [10] financial strength. It guarantees that information about money transfers between all the system participants is recorded during the entire period of the existence of the Bitcoin system. BC is structured as a chain of blocks that contains infor- mation, consequently all the blocks of a chain are connected with each other. A block is filled with a group of records, and new blocks are always added to the end of the chain, apart of containing n ew information, new blocks duplicate the infor-mation contained in the previously created structural units of the system. Construction of BC chains occurs on the basis of three main principles - distribution, openness and protection [11], [12 ]. Us- ers of the system form a computer network. At the same time, each computer stores a copy of each of the blocks. This struc- ture is provided by the interaction of "miners" who solve com- plex, expensive mathematical tasks. To solve them, it is neces- sary to spend both ma terial resources (electricity, specialized "farms" for "mining"), and also the hardware capabilities for complex mathematical calculations known as Proof -of-Work (POW) [13]. The results of mining are collected in the BC and as the length of the chain incre ases with time, its reliability in- creases. Also, with time, the complexity of the problem solved by the "miners" increases with the chain. All this requires an increase in both the computing power of "farms" and in the volume of devices that store the enti re chain. However, using BC on mobile devices, for example, in a smart sensor network, poses problem that makes using BC im- possible; this is because the sensors do not have the computa- tional resources to perform POW. Another well -known problem is that of WSNs nodes, due to the limited volume of node batteries, have a limited period of opera tion and as a consequence the entire network is limited. In [14], [15], [16], [17], [18] , it is shown that dependence on ener- gy consumption is created by: the algorithm of operation (time of work, sleep, awake), the use of MAC -protocols, the amount of tran smitted, received and processed information, data acqui- sition from sensors, and some other parameters. In the case of using POW, which is known as a very resource -intensive and energy -intensive task, the autonomous work of the nodes will be significantly r educed. In addition, the standard structure of BC requires a complete connection between all elements of the network but this is not always possible and energetically advantageous. ———————————————— S. Kushch, is with the Security and Trust research unit of the Bruno Kessler Foundation, via Sommarive, 18, Povo, 38123,TN, Italy E-mail: kushch@yaros.co , skushch@fbk.es Francisco Prieto -Castrillo with Media Laboratory, Massachusetts Institute of Technology, Cambridge, MA 02139 -4307, USA; Harvard T.H. Chan School of Public Health, Harvard, University, Boston, MA 02115, USA; University of Salamanca, BISITE Research Group, Edificio I+D+i, 37008, Salamanca, Spain E -mail: fprieto@hsph.harvard.edu , fprie- to@mit.edu , franciscop@usal.es . T 2 IEEE TRANSACTIONS O N JOURNAL NAME, MAN USCRIPT ID All these works provide key insights into the problem of network resilience , diffusion and consensus from different per- spectives. But, according to the authors, a model of BC for de- vices with limited resources, for full and partially connected BC, is still missing. Therefore, in this paper we make an analy- sis of the conditions un der which using BC in distributed sensor networks and IoT devices is possible. The question at issue is how to design BC without POW with a partial connectivity while maintaining robustness to failures and attacks. To this end, we developed several network models. The paper is organized as follows. In Section 2 we formulate the problem. The results obtained in the study are presented in Section 3. Finally, we present the conclusions obtained from our research and discuss the possibilities for future work in Sec- tion 4. 2 Problem formulation Blockchain can be conceived as chains of separated ele- ments which are interconnected by hashing. There are three key factors in this process: a) which structure of blocks and chain is used, b) how the network is built, c) how consensus can be achieved. We elaborate on these elements below. 2.1 Network structure The approach proposed in this work is to build a closed private BC network with unchanged complexity. The number of new blocks per minute is set by a constant valu e. The entire database is stored on the server. At the same time, the server is the node for the distributed P2P network of servers which uses a BC to account for the information received from the local sensor networks. This will ensure that the stored inf ormation remains unchanged, making its storage and recovery more secure in the event of an attack on a separate data server. n2n1 n6 n3n5 n4n2n1 n6 n3n5 n4 n2n1 n6 n3n5 n4n2n1 n6 n3n5 n4S3 S4S1 S2 chain 1 1 23456 chain 2 1 23456 chain 3 1 23456 chain 4 1 23456 1234 Full BC Fig. 1. A general network structure. The total network consists of local segments. Each segment has its own server for storin g local BC. A distributed network of servers (which is marked -S1,..,S4) also stores a common BC consisting of local fragments. An examples of such a networks can be: a power distribution company uses a network of smart meters and sensor s for power consumption control, to account the use of electricity and monitor the status of the network; network that controls many medical devices (including portable), which are grouped into sub-clusters (eg within the same department of the hospital); WSN which monitors traffic on highway routes and consists of several segments etc. (Fig.1). At the same time, these sensors and counters are combined into a local sensor network for each city. The servers of this or- ganization in different cities will also be combined into a peer - to-peer network. It is in this network that a complete BC of all local sensor networks is stored. This will for example, avoid attacks on critical infrastructure by substituting information about the load in local networks, which c an lead to power out- ages throughout the network. n2n1n6 n3n5 n4 t 0 1 2 3 4 5 6 n1 0 01 012 0123 01234 012345 0123456 n2 0 01 012 0123 01234 012345 0123456 n3 0 01 012 0123 01234 012345 0123456 n4 0 01 012 0123 01234 012345 0123456 n5 0 01 012 0123 01234 012345 0123456 n6 0 01 012 0123 01234 012345 0123456 BC 0 01 012 0123 01234 012345 0123456 Fig. 2. Structure of the 6 -element distributed network. The table shows the step -by-step formation of the chain. Blockchain is stored in each node of the chain. Consider one segment of such a network consisting of six nodes. Fig.2 illustrates this example. In this case, each new block of information is forwarded to all nodes and BC is built in parallel on all the elements of the system. S.KUSHCH ET AL.: A ROLLING BLOCKCHAIN FOR A DYNAMIC WSNS IN A SMART CITY 3 a) b)n2n1n6 n3n5 n4 t012 3 4 5 6 n1 001012 0122 01222 012222 0123456 n2 001012 0123 01234 012344 0123444 n3 000002 0123 01234 012344 0123456 n4 000012 0123 01234 012345 0123455 n5 000000 0000 01234 012345 0123456 n6 001011 0123 01233 012345 0123456 0123456 BC t 012 3 4 5 n1 001012 0122 01222 012222 0122226 n2 001012 0123 01234 012344 0123444 n3 000002 0123 01234 012344 0123446 n4 000000 0123 01234 012345 0123455 n5 000000 0000 00004 000045 0000456 n6 001011 0113 01133 011335 0113356 01234566 BC Fig. 3. The structure of a chain for the six iterations. During each iteration, information from the "active" node is sent to the " neighbors" which evaluate and give permission to write it to the end of the chain. The remaining nodes retain the previous state: a) a node sends a renewed BC to its neighbors, b) a node sends only one transaction which is added to the local BC of its neighbors. It is considered that after the failure of one node the system be- comes inoperative. However, in real conditions, the system can continue to work, but some of its parameters may change. In these circumstances, we can say that the failure of one or more nodes leads to the trans formation of a fully connected network to a partially connected network. Also, this situation is possible if the network was attacked and some connections or nodes are unavailable or compromised. Consider the principle of chain formation. Each node con- tains a list that indicates: the list of nearest "neighbors", the node’s activation time (sensor interrogation, formation of the BC block), and the order of sending the block to "neighbors". The use of such a list will solve at least two problems: it wi ll optimize the time of sleep -awake -work, it will use the mini- mum -necessary power for sending -receiving information to and from neighbors. Also, it should be borne in mind that time of inclusion of each step differs from the time of inclusion of the remain ing nodes and must satisfy the inequality: Tn1< Tn2<∙∙∙<Tnm. The Blockchain is constructed as follows: step 0, all nodes record the genesis block 0, step 1 - node 1 creates block 1 and send it to its neighbors. The inaccessible nodes repeat their pre- vious state, etc. If a node is a failure node and sends a rejection to one of its neighbors, in this case it will be able to restore its state on the basis of consensus with its neighbors. As shown by tables a) and b) under Fig.3 - the rows represent nodes and the columns - the time points (iterations). The two BC building var- iants are possible. First, the node that created the block, adds it to the BC in its own memory, and then sends the BC to its neighbors for valida- tion. After the validation, the next step is to - send a confirma- tion that the BC is correct, after this confirmation the neighbors rewrite the renewed BC in their memory (the table a) of Fig.3. Furthermore, after creating the block, the node sends only this block for v alidation. Then adds it to the end of the BC. The neighbors add one too (table b) in Fig.3. We see that the second method is more advantageous in terms of energy efficiency, as demonstrated above. The process of BC validation is as follows: after forming t he chain, the nodes produce an element -by-element verification of the final chain. If a block written in the chain of each node is confirmed (was written in) by more than 51% of the nodes at each iteration, such a block is written in the resultant BC. How- ever, a possible situation is that there is a partial connection of nodes, and it is impossible to achieve 51% confirmation for some blocks. In this case, some blocks may be lost. The analy- sis of the number of lost blocks, depending on the number of connect ions in the distributed network, is presented by the au- thors in [19] 2.2 The structure of the chain In this section, we discuss the structure of the chain that we propose to use for resource -constrained devices. The issues of constructing a distributed net work structure were widely con- sidered in [20], [21], [22] . In this work, we propose to use a chain consisting of several parts. Each part contains a limited number of generated blocks. Their number depends on the pa- rameters and capabilities of the devices used in the IoT net- work. Below, we consider the proposed version of the block structure in more detail. Notice, that the memory for storing BC is limited. Modern modules offered by manufacturers of IoT devices are usually limited from 1 to 8 MB of memory, most of which is used for storing the software that manages this device. Therefore, we are limited in the volume of BC (amount of blocks), which can be stored by each node. The number of blocks stored by each node is limited by n, after which the n -1 bloc ks are removed from all nodes. Only the n block remains as the “zero” block (genesis block) for the next cycle. In this case, the full BC will be as follows(Fig.4): 4 IEEE TRANSACTIONS O N JOURNAL NAME, MAN USCRIPT ID Time_bb Id_dev Hash_prev Hash_cur data Id_dev_1, … Id_dev_nTime_start_1, … Time_start_ntime_step_1, … Time_step_ndata_1, data_2, …, data_n data Fig. 4. The structure of Blockchain creating in the conditions of limited memory of WSN nodes. The notation "Bn (B0) New cycle1" indicates that the block Bn is a zero block for the next cycle, etc. The number of blocks in the chain depends on the paramet ers of the "worst" memory device in the network, since the stored chain in each cycle should fit the available memory. 2.3 Block structure Below, we consider the structure of each block in detail (Fig.5). ... ...B0 B1 ... Bn-1Bn (B0) New cycleBn+1 (B1) ...Bm-1 Bm Bn+2(B2) ... B0B1 BnBn (B0)for new cycleBn+1 (B1) of new cycle...Delete blocks B0-Bn-1Bn+m B0 for next cycleoperation “delete” Fig. 5. General structure of the block. The top part of the figure shows the general block structure.. The bottom part shows the subb lock "data" (the transactions block It should be taken into account that each node can have sev- eral different sensors. Therefore, it is necessary to identify each sensor and the measurement time. If several measurements made over a period of time by each sensor (multi -segment transaction), are recorded in the block, a time stamp "step" must be added to show the time interval between measurements. In addition, given that the information transmitted by the sensors can be "closed", it is encrypted using cryptographic algorithms. This function is provided by modern IoT modules. In this case, the size of the Data block is set automatically, depending on the number of transactions. 2.4 Blockchain formation There are two options for building this system: 1) When the node memory is "clearing", and only the last block remains (as B0 for the next cycle); 2) When only the first block is deleted from the stored chain, and a new block is recorded in the empty space that has been unallocated in the memory. For example, the block B0 is delet- ed and the block n+1 is recorded at the end of the circuit. Block B1 is deleted - the n+2 block is recorded at the end of the chain. The system is scalable, the order of block formation by de- vices depends on the assigned id number. There is no possibility of random block creation. If a node that is ou tside of the queue offers to add a block to the chain, it is simply ignored. Also, each new block is checked for compliance with the remaining nodes, in order to prevent t he substitution of information. S.KUSHCH ET AL.: A ROLLING BLOCKCHAIN FOR A DYNAMIC WSNS IN A SMART CITY 5 EndStart Save FullChain on a server n,m,B0 i=1,mDelete: Bjj=1,m f(B)=ΣBi i=nF(B)=f(B)+Bn+j + EndStart n,m,B0 f(B)=ΣBii=1,nSave FullChain on a serverj=1,m Delete: from Bk-nto Bk-1 - a) b) Fig. 6. The flowchart of block formation in a chain: a) when a predetermined number of blocks is removed; b) when blocks are re- moved step -by-step. Given that this is a closed network, the identification of de- vices is done by comparing them with the list of authorized de- vices. The suggestion is that this list should be recorded on a separate, protected part of the flash memory of each node. The list is continuously updated in case of a disconnection or the replacement of the f aulty device. The flowchart of BC for- mation in a network has the following form (Fig.6). 2.5 Segmented network. Problem formulation To use the model proposed above, it is necessary that the number of WSN nodes be fixed at each particular time. This can be done by dividing the network to segments (Fig.7). An example of such a network can be WSN of a smart city, where nodes 1 -2-3-4 are stationary, and nodes c1 -c12 can be, for example, smart cars. Thus, the centers of the subnets are sta- tionary nodes. At ea ch particular time, each subnet contains a fixed number of nodes. Also, each subnet builds its own part of the block, which is sent to the server. Nodes that are elements of several subnets retain the last block of the previous element of the chain for ver ifying the next element of the neighboring sub- net. The server stores all the elements of the chain in a single blockchain. However, in this case there arises the problem of estimating the optimal number of elements of each subnet and the number of connecti ons between its nodes for a given level of reliability. This will be discussed in the next section . 1C1 C2 C32 C4C5 C7 C63 C8C9 C11 C104 C12 Fig. 7. The structure of WSN separation on a sub -segment when using mobile nodes. 2.5 Mathematical model Mathematically, the structure of the complete chain is: 6 IEEE TRANSACTIONS O N JOURNAL NAME, MAN USCRIPT ID 𝐹=⋃𝐵𝑖∞ 𝑖=0 Then, the part of the chain that will be removed from the memory of the node in each cycle will be as follows: 𝑓𝑑𝑒𝑙=⋃𝐵𝑖,𝑛=𝑐𝑜𝑛𝑠𝑡𝑛−1 𝑖=0 Here n - the number of nodes in the local netwo rk. The general function will have the form of a matrix consist- ing of n columns and m rows. For example, the matrix for 5 nodes, with end -to-end num- bering of blocks, will have the following form for the m itera- tions: Each of these is the sum of blocks in a chain for one cycle without taking into account the genesis block B0. 𝐹= ( 𝐵11𝐵12…𝐵1(𝑛−1)𝐵1𝑛 𝐵21𝐵22…𝐵2(𝑛−1)𝐵2𝑛 ⋮⋮⋱⋮⋮ 𝐵𝑚1𝐵𝑚2…𝐵𝑚(𝑛−1)𝐵𝑚𝑛) . (1) Then, the analytic expression, which describes the structure of the complete chain, will have the form of (2). 𝐹=𝐵0⋃𝐵𝑖,𝑗,𝑆=[𝑖=1…𝑛,𝑗=1…𝑚] 𝑖,𝑗∈𝑆 . (2) where the notation is as follows: j - an amount of elements in each row of matrix (1); n - number of the elements in the row; i – number of rows. Also, it should be borne in mind that the el- ements 𝐵𝑖𝑛=𝐵(𝑖+1)1. 3 MAIN RESULTS In this section, we consider the implementation of the proposed method for Blockchain formation. Fig. 8. The principle of building Blockchain for WSN, which consists of sub -segments, for mobile nodes. Our procedure works as follows. First we create a linear arrangem ent of sensors as shown in Fig.8. Fig. 9. Probability of finding a connected path between A and B as a function of the number of nodes “n” and the number of edges “L”. The dashed blue line represents the limit 0.7Lmax for n=10 (and Lmax=45) . S.KUSHCH ET AL.: A ROLLING BLOCKCHAIN FOR A DYNAMIC WSNS IN A SMART CITY 7 In this Fig. 9 we plot the probability of finding a connected path between A and B as a function of the number of nodes “n” and the number of edges “L”. It is computed using a random graph model where the connection probability between two randomly chosen nodes is “p” = Lmax/L, where Lmax=n(n -1)/2. Each curve ranges L from 1 to Lmax for each n. The dashed blue line represents the limit 0.7Lmax for n=10 (and Lmax=45) which is the minimum connectivity threshold found in [19]. Fig. 10. Probability of finding a connected path between A and B as a function of the number of nodes “n” and the number of edges “L”. The dashed blue line represents the limit 0.7Lmax for n=10 (and Lmax=45) . These represent fixed sensors along the way. Then we augment the sensor set by randomly spreading additional sensor over the area so that we reach a target sensor density. Each fixed sensor can transmit/receive signals within a radius (see circles in Fig.8). Therefore we create a network consisting of the union of the complete graphs of sensors lying inside each line sensor radius. Then we randomly remove links and check if a path between the start and the end line nodes can stil l be built. We did Monte Carlo tests to numerically find the probability of finding a path when a portion of the links were randomly removed for different node densities. In Fig.10 we show the results of this analysis. Here we analyse the length of alterna tive shortest paths compared to the length AB paths along the horizontal line. As it can be noticed, when we increase the level of attack (proportion of links removed) the network is resilient to provide alternative paths until its break down. At this poin t no alternative paths are possible. As expected, in sparse scenarios (low sensor density) this break down occurs at smaller attack intensities. 4 SUMMARY AND DISCUSSIO N The findings outlined in this article can be applied to at least two fields: Wireless Sensor Networks and the Internet of Things. Clearly, this contribution is just a first step in the understanding of short and partially connected BC. The simulation resul ts showed that with increasing attack density (increasing the number of lost connections and nodes) the network remains stable and the Blockchain can be built. It should be noted that some of the blocks (information from blocked nodes) can be lost. The num ber of lost blocks depends on the density of the sensors and the intensity of the attack. It should be taken into account that the reliability of such a network depends on the number of nodes at each moment of time in each separate sub -segment. Also, the m inimum value of nodes is found, which should participate in the construction of the chain, in order to avoid network interruption. However, the results of the work clearly show the possibility of constructing "a Rolling Blockchain", using mobile nodes when the the start and the end of the route are given. The problem still needs further elaboration in order to foster more robust implementations. For instance, we neglected the issues of security analysis and protection against hacking of the proposed method. In addition, the issue of having to use the Merkle tree for this type of network and chain has been left open. In future works we will research other topological models and how the use of the Merkle tree in the proposed algorithm, will affect the resource of the node batteries and what the ratio - increasing the stability/power consumption of the node is profitable for using in long Blockchchains. We will also consider the problem of calculating the optimal size of the memory used, on the basis of the elem ents available in the network, in order to optimize their performance. 8 IEEE TRANSACTIONS O N JOURNAL NAME, MAN USCRIPT ID 5 Acknowledgments This research was partially supported by the Regional government of Provincia Autonoma di Trento (Italy) and Bruno Kessler Foundation (Italy) under the Secure Blockchain -based Application project. REFERENCES [1] A. Chakravorty , T . Wlodarczyk, and C. Rong, “Privacy preserving data analytic for smart homes,” 2013 IEEE Security and Privacy W orkshop, pp. 23 –27, May 2013. [2] H. Menashri and G. Baram, “Critical infrastructu res and their interdependence in a cyber -attack the case of the U.S,” Military and Strategic Affairs, vol. 7 no.1, pp. 99 –122, 2015. [3] N. Komninos, E. Philippou, and A. Pitsillides, “Survey in smart grid and smart home security: Issues, challenges and counte rmeasures,” IEEE Communica- tions Surveys and Tutorials , vol. 16, no.4,pp. 1933 –1954, 2014. [4] R. Roman, J. Zhou, and J. Lopez, “On the features and challenges of security and privacy in distributed internet of things, ”Computer Networks, vol. 57, no.10, pp. 2 266–2279, 2013. [5] S. Seebacher and R. Schritz, “Blockchain technology as an enabler of service systems: A structured literature review ,”Springer International Publishing, Cham, pp. 12 –23, 2017. [6] R. Dahlberg, T . Pulls, and R. Peeters, “Efficient sparse Merkle trees: Caching strategies and secure (non -) membership proofs,”Cryptology ePrint Archive, Report 2016/683, A vailable online at: http://eprint.iacr.org/2016/683, vol. Report 2016/683, 2016. [7] A. Dorri, S. S. Kanhere, R. Jurdak, and P . Gauravaram, “Blockchain for iot se- curity and privacy: The case study of a smart home,” 2017 IEEE International Conference on Pervasive Computing and Communications W orkshops (PerCom W orkshops), pp. 618 –623, 2017. [8] M. Swan, “Blockchain. blueprint for a new economy ,” OReilly Media, 1st edi- tion, p. 152, 2015. [9] S. Nakamoto, “Bitcoin: a peer -to-peer electronic cash system,”A vailable Online at: www .bitcoin.org, p. 9., 2011. [10] J. Garay , A. Kiayias, and N. Leonardos, “The bitcoin backbone protocol: Analy- sis and applications,” Advances in Cryp tology -EUROCRYPT 2015, Springer, pp. 281 –310, 2015. [11] S. Amini, F . Pasqualetti, and H. Mohsenian -Rad, “Dynamic loadaltering attacks against power system stability: Attack models and protection schemes,” IEEE Transactions on Smart Grid, vol. PP no.99, pp. 1 –1, 2016. [12] S. Sicari, A. Rizzardi, L. A. Grieco, and A. Coen -Porisini, “Security , privacy and trust in internet of things: The road ahead,” Comput. Networks, vol. 76, pp. 146–164, 2015. [13] A. Gervais, G. O. Karame, K. Wst, V . Glykantzis, H. Ritzdorf, and S. Capk un, “On the security and performance of proof of work blockchains,”Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Secu- rity , V ienna, Austria, October 24 -28, 2016, pp. 3 –16,, 2016. [14] G. Anastasi, M. Conti, M. D. Francesco, and A. Passarella, “Selforganizing architecture for information fusion in distributed sensor networks,” Int. J. Dis- trib. Sens. Networks, 2015, p. 537568, 2009. [15] J. Hwang, D. H. C. Du, and E. Kusmierek, “Energy efficientorganization of mobile sensor networks,”The I nternational Journal of Parallel, Emergent and Distributed Systems, vol. 20, pp. 221 –233, 2005. [16] M. Cardei and D. Z. Du, “Improving wireless sensor network lifetime through power aware organization,”Wireless Networks, vol. 11, pp. 333 –340, 2005. [17] W . Heinzelm an, A. C. A., and H. Balakrishnan, “Energy -efficient communica- tion protocol for wireless sensor networks,”Proceedings of the 33rd Annual Hawaii International Conference on System Sciences, pp. 1 –10, 2000. [18] A. Iranli, M. Maleki, and M. Pedram, “Energy -efficient strategies for deploy- ment of a two -level wireless sensor network,” Proceedings of SLPED, pp. 233 – 238, 2005. [19] F . Prieto -Castrillo, S. Kushch, and J. Corchado, “Distributed sequential consen- sus in networks. analysis of partially -connected blockchains with uncertainty ,” Complexity , 2017. [20] C. Decker and R. W attenhofer, “Bitcoin -ng: A scalable blockchain protocol,” A fast and scalable payment network with Bitcoin Duplex Micropayment Chan- nels, vol. Stabilization, Safety , and Security of Distributed Systems - 17th Inter- national Symposium, pp. 3 –18, 2015. [21] I. Eyal, A. E. Gencer, E. G. Sirer, and R. van Renesse, “Bitcoinng: A scalable blockchain protocol,”13th USENIX Symposium on Networked Systems De- sign and Implementation (NSDI16), 2016. [22] C. Decker and R. W attenhofer, “Information propagation in the bitcoin net- work,” IEEE P2P 2013 Proceedings, pp. 1 –10,, 2013. Sergii Kushch has got Bachelor's Degree in Radio Engineering at the Electronic Technolo- gies Faculty of Cherkasy Engineering and Technological Institute in 1998. In 1999 he has got a diploma of Radio Engineer. The ar- ea of his research was statistical Radio Engi- neering. In 2009 Sergii Kushch has got Mas- ter's Degree in Radio Engineering at the Fac- ulty of Electronic Technologies of Cherkasy State Te chnological University. The title of his diploma thesis was "Synthesis of statistical pattern recognition algorithms of signals that have been taken against a background of non -Gaussian noise". In 2009 he was invited to PhD school which he success finished in 2012. The title of his thesis was "Methods of multivariate realization the components of computer systems". Since 2012 he worked at Cherkasy State Technological University on the positions of lecturer, Sr. lecturer and Associate professor of Department of Computer Sci- ence and Information Security. He published a number of scientific papers in international and national journals and took part in interna- tional and national conferences. Currently, he works as researcher in Foundation Bruno Kessler, Italy i n Security and Trust research unit with modification Blockchain technology for an increasing protection personal information EU citizens. Francisco Prieto Castrillo With a back- ground in theoretical physics, Francisco Prie- to Castrillo has worked in many, seemingly distant fields; statistical physics, artificial in- telligence, smart energy networks and seis- mic engineering. The backbone of his in- volvement in all these activities is his enthu- siasm for the analysis of the self -organization phenomena in complex systems. This in- cludes the way a structure resists an earth- quake or the patterns of collective social behaviour. Francisco Prieto Castrillo is a researcher in the BISITE group at Uni- versity of Salamanca. His former position was as postdoctoral re- searcher a t the New England Complex Systems Institute (NECSI), a centre which has been instrumental in the development of complex adaptive systems. Currently he is affiliated to MIT and to Harvard University. At MIT he collaborates with the Alex “Sandy” Pentland’s Human Dynamics Laboratory in the MIT - MediaLab. At the Harvard T. H. Chan School of Public Health, he analyses different problems related to social sciences using data mining techniques, machine learning and complex systems .
{ "id": "1806.11399" }
1802.10091
Blockchain platform with proof-of-work based on analog Hamiltonian optimisers
The development of quantum information platforms such as quantum computers and quantum simulators that will rival classical Turing computations are typically viewed as a threat to secure data transmissions and therefore to crypto-systems and financial markets in general. We propose to use such platforms as a proof-of-work protocol for blockchain technology, which underlies cryptocurrencies providing a way to document the transactions in a permanent decentralised public record and to be further securely and transparently monitored. We reconsider the basis of blockchain encryption and suggest to move from currently used proof-of-work schemes to the proof-of-work performed by analog Hamiltonian optimisers. This approach has a potential to significantly increase decentralisation of the existing blockchains and to help achieve faster transaction times, therefore, removing the main obstacles for blockchain implementation. We discuss the proof-of-work protocols for a few most promising optimiser platforms: quantum annealing hardware based on D-wave simulators and a new class of gain-dissipative simulators.
http://arxiv.org/pdf/1802.10091v1
Kirill P. Kalinin, Natalia G. Berloff
quant-ph
quant-ph
Blockchain platform with proof-of-work based on analog Hamiltonian optimisers Kirill P. Kalinin1and Natalia G. Berlo 2;1 1Department of Applied Mathematics and Theoretical Physics, University of Cambridge, Cambridge CB3 0WA, United Kingdom and 2Skolkovo Institute of Science and Technology Novaya St., 100, Skolkovo 143025, Russian Federation (Dated: March 1, 2018) The development of quantum information platforms such as quantum computers and quantum simulators that will rival classical Turing computations are typically viewed as a threat to secure data transmissions and therefore to crypto-systems and nancial markets in general. We propose to use such platforms as a proof-of-work protocol for blockchain technology, which underlies cryptocur- rencies providing a way to document the transactions in a permanent decentralised public record and to be further securely and transparently monitored. We reconsider the basis of blockchain encryp- tion and suggest to move from currently used proof-of-work schemes to the proof-of-work performed by analog Hamiltonian optimisers. This approach has a potential to signi cantly increase decentral- isation of the existing blockchains and to help achieve faster transaction times, therefore, removing the main obstacles for blockchain implementation. We discuss the proof-of-work protocols for a few most promising optimiser platforms: quantum annealing hardware based on D-wave simulators and a new class of gain-dissipative simulators. Blockchain technology with its digital currency, Bit- coin, was originally introduced about ten years ago [1] and was quickly followed by the development of many other cryptocurrencies. Bitcoin was the rst decen- tralised electronic payment system operated by an open peer-to-peer network where a nancial transaction hap- pens directly between two willing parties without the need for a trusted intermediary such as banks or other nancial institutions. The deployment and enhancement of blockchain technology may completely transform the existing nancial system in the next few years. The world leading nancial institutions started investing in startups based on blockchain technologies, exploring its novel ap- plications and opportunities. The major banks are estab- lishing a framework for using the blockchain technology in the nancial markets [2]. The acceptance of bitcoin in Japan together with a recently established Crypto Valley in Switzerland are the rst signs that cryptocurrencies become recognised on the governing level. In principle, all industries that serve as intermedi- aries for processing nancial transactions will have to adapt and compete with the blockchain alternatives. The blockchain will capture various aspects of our lives in- cluding non- nancial applications such as the implemen- tation of a decentralised platform for the Internet of Things, health records and notary, loyalty payments in the media industry, private securities. IBM and Samsung are now developing a new platform called ADEPT (Au- tonomous Decentralised Peer To Peer Telemetry) based on the blockchain that will keep a trusted record of all the messages exchanged between smart devices in a distributed network. Nasdaq is implementing private equity exchange on top of Blockchain with a goal to create a more secure, ecient system to trade stocks [3]. DocuSign, a company that specializes in electronic contracts, just unveiled a joint idea with Visa to use blockchain to track car rentals and reduce paperwork. Microsoft develops Azure Blockchain to allow the devel-opers and customers to create private, semi-private, pub- lic and consortium blockchain networks with a single click on the Azure's cloud platform, thereby enabling them to distribute blockchain products. Moreover, the majority of all possible applications can be realised on the same blockchain by using the "smart contracts", which are computer programs that can automatically execute the terms of a contract [4]. When a precon gured condition in a smart contract among participating entities is met, the parties involved in the contractual agreement can au- tomatically make the contractual payments in a trans- parent manner. Companies like ethereum and Codius are already enabling Smart contracts using blockchain technology and many companies which operate using blockchain technologies are beginning to support Smart contracts. Many cases where assets are transferred only after meeting certain conditions, which require lawyers to create a contract and banks to provide escrow ser- vices, can be replaced by Smart contracts. Ethereum is already powering a wide range of early applications by using Smart contracts in areas such as governance, autonomous banks, keyless access, crowdfunding and - nancial derivatives trading. The investments attracted by main cryptocurrencies caused an increased interest in understanding the struc- ture and technological capabilities of the platform. The blockchain consists of a publicly accessible database of all transactions that are arranged into blocks of a cer- tain length in the order preserved by a distributed ledger (so shared across multiple sites), see Fig. 1. The decen- tralisation of the blockchain is currently insured by the distributed computational powers (computational nodes) verifying all the transactions and agreeing about what blocks should be on the blockchain, so there is no spe- ci c computer responsible for a particular transaction. In order to validate the transaction of a particular block, one can wait until several newer blocks are added to the blockchain which will automatically validate all of thearXiv:1802.10091v1 [quant-ph] 27 Feb 2018 2 previously created blocks. A major technical obstacle, that prevents Visa and other payment systems to be replaced by digital cryp- tocurrencies for daily transactions, is the transaction con- rmation time which is dependent on the processing time of each new block in a blockchain. In bitcoin, the func- tions of an intermediary, i.e. the "trust", is based on the amount of work performed. On one hand, it has to be hard enough for an ordinary CPU to process it in- stantaneously (therefore the complexity of the work is controlled and at the moment is limited to ten minutes on average to process each block added to a blockchain). On the other hand, for routine everyday transactions the time spent per block has to be much shorter than that. This con icting requirement prevents all of the ex- isting cryptocurrencies from becoming a real electronic payment system that can be used for routine nancial transactions. Another problem is the violation of de- centralisation. The 70% of the cryptocurrencies with the highest capitalisation are already controlled by a few major computational nodes. Such centralised hubs of power make it impossible for a new computational node to join the system unless it matches the huge computa- tional power of centralized nodes. Possible solutions of these problems are seemingly mutually exclusive: short- ening of the processing time has to be accompanied by restrictions on such processing for modest computational powers, but not to lead to computational centraliza- tion! However, we argue in this paper that a concep- tually di erent scheme of blockchain processing which relies on using recently emerged analog Hamiltonian op- timizers (AHO) and quantum simulators may be capable of ful lling these requirements and revolutionarizing the blockchain technology. We also argue that the modern capabilities of such optimizers are already sucient to implement a proof-of-work to record a public history of transactions by solving NP-hard problems that are com- putationally impractical for conventional classical com- puters and CPUs, but can be easily solved on the pur- pose built analog Hamiltonian and quantum simulators. Moreover, our approach does not concentrate on a partic- ular cryptocurrency such as bitcoin and we do not limit ourselves to blockchain technology, but we rather focus on a hard computational problem that can be used as proof-of-work in future versions of any cryptocurrencies or other technologies based on proof-of-work principle. Our paper is organised as follows. In Section 1, we give an overview of blockchain technology and the way it drives cryptocurrency payment systems. In Section 2, we discuss two classes of hard optimization (NP-hard) problems, namely quadratic unconstrained binary op- timisation (QUBO) and constant modulus constrained quadratic continuous optimization (QCO). These prob- lems are the type of problems that can be solved by AHO/quantum simulators faster than by classical com- puter. We discuss the D-Wave simulators based on super- conducting cubits and recently emerged gain-dissipative simulators, including polariton, trapped photon conden- FIG. 1: Blockchain generation by computational nodes in Bit- coin cryptocurrency. The block is added to a blockchain with an average interval of ten minutes and it contains approx- imately 4000-5000 transactions. The output of each block serves as the name for the next block, thus forming a chain. sates, and atomic multi-mode QED (quantum electro- dynamics). In Section 3, we propose how QUBO and QCO solved by analog simulators can be used in a blockchain technology as a new generation of proof-of- work protocol, which ensures much better decentralisa- tion compared to the existing protocols and provides a greater transaction rate. Finally, we conclude in Section 4. 1. BLOCKCHAIN AND PROOF-OF-WORK PRINCIPLE Adding each new block of transactions to the blockchain requires solving a computationally demand- ing problem, i.e. proof-of-work (POW). POW concept was originally developed to prevent junk mails by requir- ing the sender to solve a moderately hard computational problem to allow for the message to be delivered [5]. In the blockchain, POW concept is implemented by compu- tational nodes that perform complex mathematical cal- culations and are rewarded for this by cryptocoins. This is often the only way for cryptocoins to enter the system, and hence the computational nodes are called miners and the process of performing the computations is called min- ing. The usual POW problems are based on a function H, called hash function, which maps an arbitrary sized input data to a xed size output (called hash) and is designed to be hard to invert, i.e. the hash ycan be easily com- puted from the initial data xby calculating y=H(x) but nding xfrom a given yis computationally hard. The inversion of the hash function requires an exponen- tially growing computational time of an order of O(2n) wherenis the hash size, but when xis found the valida- tion of the transaction could be easily done by computing H(x) and comparing the result with the hash y. Every transaction in the block has a hash associated with it and each block in the blockchain is identi ed by its block header hash (see Supplementary Material for the full list of parameters included in it). The mining diculty for adding new block, which is represented by the diculty target value, is dynamically 3 controlled and regularly adjusted by a moving average giving an average number of blocks per hour xed in order to compensate the increasing computational power and varying interest in running nodes involved in mining. In bitcoin, the diculty target value is updated every 2016 blocks in order to target the desired block interval accurately, which is now set to be ten minutes. This rate is chosen as an ad hoc tradeo : the time which is too short would decrease the stability of the blockchain (more forks and longer forks in the blockchain tree would require an increased bandwidth between nodes); the time which is too long would increase the con rmation time of transactions. Other cryptocurrencies have di erent times per block, e.g. Litecoin has a 2.5 minutes block time. Centralisation problems. The initially supposed global decentralisation of the bitcoin and other cryptocurrencies is now under risk since the computational nodes tend to unite in computational pools followed by emergence of major cryptocurrencies with highest capitalisation on the market, i.e. bitcoin and etherium, which are con- trolled by 5-7 di erent parties. The network remains de- centralised but with a few centralised hubs. This in turn leads to a high entry barrier for a new potential min- ing party since it has to compete with the computational rate of centralised hubs, which will make the system even more centralised in the nearest future. For a brief review of security issues and other problems including energy consumption, storage of the information, please see the Supplementary Material. In the next Section we discuss the type of hard prob- lems that can be solved { mined { faster on specially built alternatives to classical computers, namely, analog Hamiltonian optimisers/quantum simulators. We pro- pose to put such problems and such solvers at the core of POW schemes that the agents need to solve in order to add each new block of transactions to the blockchain. 2. HARD COMPUTATIONAL PROBLEMS AND THEIR SOLVERS FOR BLOCKCHAIN POW At the heart of Richard Feynman's idea of quantum simulator lied the proposal of using one well-tunable quantum system to simulate another quantum system [6]. To design such quantum simulator [7], one needs to map the variables of the desired Hamiltonian of the system into the elements (spins, currents etc.) of the simulator, tune the interactions between them, prepare the simu- lator in a state that is relevant to the physical problem of interest, and perform measurements on the simula- tor with the required precision. In the past decade, this original meaning of quantum simulator has been widened and modi ed to include the platforms that intend to solve classical optimization problems faster than classical com- puter for a given problem size (in terms of the number of variables, and therefore, the dimensionality of the func- tion to be optimized). Various physical systems have been proposed and realised as such simulators to a vari-ous extent [8]. Among those are systems that use essen- tially quantum processes for their operation (e.g. entan- glement and superpositions) such as trapped ions [9, 10] or superconducting qubits [11], for others although the quantum processes are crucial in forming the state of the system such as Bose-Einstein condensates, the sys- tem behaves as a classical system, e.g ultracold atoms in optical lattices [12{15], network of optical parametric oscillators (OPOs) [16, 17], coupled lasers [18], polariton condensates [19], multimode cavity QED [20] and photon condensates [21]. These systems emulate spin Hamilto- nians such as Ising, XY or Heisenberg (so called nvec- tor models). Hardness of the problem depends on the number of nodes (eg. bits, qubits), on the ability to con- trol couplings between the elements and the overall con- nectivity of the system. The existence of universal spin Hamiltonians has been established. Universality means that all classical n-vector models with any range of in- teractions can be reproduced within such a model, and certain simple Hamiltonians such as 2D Ising model on a square lattice with transverse elds are universal [22]. Indeed, such problems are NP-hard for a general matrix of couplings { the number of operations grows as an ex- ponential function with the matrix size. This suggests that one can formulate a spin Hamiltonian (Ising, XY or Heisenberg) for which the global minimum can be found by a simulator optimized for solving such problems much faster than on classical computer. Finding the optimal solution of the general nvector model for a suciently large size may be suitable for a POW protocol. Here we discuss two of such prob- lems as the system requirements for simulators men- tioned above designed to solve these problems. First of these is the quadratic unconstrained binary optimisation (QUBO) problem which is an optimization formulation of a max-3-cut problem for vector z2CNwith compo- nentszi;i= 1;NandNNreal symmetric matrix Q maxzHQz;subject to zi2f 1;1g; (1) and, second, quadratic continuous optimisation (QCO) problem maxzHQz;subject tojzij= 1: (2) QUBO is a discrete version of QCO for which the decision variables are constrained to lie on the unit circle,which is a continuous domain. The Ising model minX i<jJijsisjsubject to si2f 1;1g(3) and XY model minX i<jJijsisjsubject to si= (cosi;sini); (4) are trivially mapped into QUBO and QCO, respectively, 4 by associating the "spins" siandsiwithz(viazi= cosi+isinifor the XY model, and zi2f 1;1gfor the Ising model) and the coupling strengths Jijbetween the spins with the matrix elements of Q. These problems are known to be strongly NP-hard in general and, therefore, even for medium-sized instances are dicult to solve on a classical computer [23]. The time required to nd the solution depends on the matrix structure: its size, number of zero entries (sparsity), the way the elements are generated, whether it is positive- de nite or inde nite matrix etc. The algorithms for solv- ing these problems on a classical computer can be divided into three types: exact methods that nd the optimal so- lution to the machine precision, approximate algorithms that guarantee that the solution will be found within some approximation ratio and heuristic algorithms where suitability for solving a particular problem comes from empirical testing [24]. Exact methods typically involve a tree search of a general branch-and-bound nature and the exponential worst-case runtime. They can be used to solve a limited range of problems for small or sparse matrices. The heuristic algorithms such as simulated an- nealing, genetic and evolution algorithms can deliver a good, but suboptimal (and possibly infeasible) point in a short amount of time [25]. Approximate algorithms nd an approximate solution { an optimal value of zHQz, which is at least a constant times the true optimal value. Such constant is called a "performance guarantee" of the algorithm. Both QUBO and QCO are known to be APX-hard problems [26] meaning that there is no polynomial-time approximation algorithm that gives the value of the objective function that is arbitrarily close to the optimal solution (unless P = NP). For these prob- lems, therefore, the perfomance guarantee is bounded by a constant and no approximate algorithms can be de- vised to do better. The approximate algorithms are typ- ically based on some form of semide nite programming relaxation (SDP). The achieved performance guarantee depends on the structure of the matrix. For instance, for positive semide nite Qwith the elements of the same sign the performance guarantee of SDP methods can be as high as2 min0 1cos0:878 [27], however, if the assumption about the sign of elements is relaxed the performance guarantee becomes 0.537 for QUBO and =4 for QCO [23] . An approximation algorithm on a more general inde nite matrix will yield even worse approx- imate. Furthermore, the task of nding an approxima- tion for maximizers zinstead of the approximation to the objective function zHQzeasily becomes non-computable [28]. The best classical computational algorithms capable of nding the solution of the QUBO/QCO problems for a general matrix Qare limited to very modest sizes. For instance, for N= 200 with only 30% nonzero elements the state-of-the art algorithms would take on average 80 minutes to solve QUBO [29]. Since the spin Hamiltonian models are straightfor- wardly mapped into QUBO and QCO, it is natural that analog/quantum simulators based on condensed matterquantum systems have architecture most suitable for solving such problems. Below we consider the most promising platforms for solving QUBO or QCO. Quantum Annealers. D-Wave is a rst commer- cially available quantum annealer that is built on su- perconducting qubits with programmable couplings and speci cally designed to solve QUBO problems (Eq. 1) [30]. By specifying the interactions Jijbetween qubits, a desired QUBO problem is solved by quantum annealing process [31]. Adiabatic (slow) transition in time from an initial state of a specially prepared "easy" Hamiltonian to the objective Ising Hamiltonian guarantees that the system remains in the ground state, which gives the nal energy that corresponds to the optimal solution of the QUBO problem. First benchmarks on random QUBO problems were performed on a "D-Wave One" and "D-Wave Two" ques- tioning the fact of quantum speedup of annealer [32]. It was demonstrated that although the D-wave One sim- ulator (with 128 qubits) is a true quantum annealer it is not yet competitive with classical computing technol- ogy. No speedup was found for problems of sizes ranging from 8 to 512 qubits. Later, it was shown [33], that for carefully crafted problems with rugged energy landscapes that are dominated by large and tall barriers, the quan- tum annealer can o er a signi cant runtime advantage over a classical version of simulated annealing. For some problems with sizes involving nearly 1000 binary vari- ables, quantum annealing was up to 108times faster than classical simulated annealing (SA) or Quantum Monte- Carlo (QMC) methods running on a single core CPU. The quantum speedup was not claimed again since a va- riety of heuristic classical algorithms can solve most in- stances of problems structured on Chimera architecture of D-Wave computers more eciently [34]. These results do not exclude a possible quantum speedup for some other problems that can be speci - cally created to suit the machine's abilities and which will bene t from quantum anealing. With the last commer- cially available D-Wave machine released in 2017, quan- tum annealers may nally outperform all classical algo- rithms. For evaluation of the new 2000-qubit D-Wave QPU a new synthetic problem class was proposed [35] with more emphasis on creating computational hardness through frustrated global interactions. Such frustration creates meaningful diculty for general heuristic algo- rithms that are unaware of the planted problem class. The D-Wave team claimed the 2000Q could nd solu- tions up to 2600 times faster than any known classical algorithm [35]. This time the D-Wave simulator was com- peting with the state-of-the-art CPU implementations of SA, QMC, support vector machine classi cation al- gorithm, and Selby's CPU implementation of Hamze-de Freitas-Selby algorithm, making the competition much stronger than it was in [33]. Three orders of magnitude speedup over software solvers, reported for pure anneal- ing time (computation time), translates into a 30 times speedup in total wall clock time including programming 5 and readout necessary for D-Wave machine. One of the major limitations of D-wave simulators is that each qubit can be connected to maximum of six other qubits and thus N2qubits are needed for encod- ingN-variable problem. The next generation of D-Wave quantum computer is expected to be announced in 2018 with new powerful capabilities such as reverse annealing and virtual graphs. These features are expected to en- able signi cant performance improvements over the cur- rent D-Wave simulators by giving users increased control of the QPU and will probably make the fact of a quantum speedup even more clear. OPO-based simulators. Network of coupled optical parametric oscillators (OPOs) is an alternative physical system for solving the Ising problem ([36] and references therein). A scalable optical processor with electronic feedback was realized for solving Ising problem with up to 100 spins and 10,000 spin-spin connections [36]. In this Coherent Ising Machine (CIM), the ground state of the Ising Hamiltonian corresponds to an oscillation mode with the minimum network of degenerate OPOs loss. The fully programmable connections between any two spins is a signi cant di erence of this model compared to the D- Wave simulator. The rst promising signs of speedup of CIM have been reported recently [37], however, the fun- damental computational power of OPO Ising machines or the time required to program thousands of connec- tions and to readout of the nal state have not been fully explored. Gain-Dissipative Simulators. We de ne gain- dissipative simulators as the optimisers based on a driven-dissipative physical system. The principle of their operation depends on the gain (pumping) mechanism. As the gain exceeds some threshold a coherent state of mat- ter emerges maximising the state occupation and there- fore solving QUBO or QCO [19]. These are novel sys- tems and their potential as analog simulators has been very recently demonstrated [19{21, 38]. These platforms could be referred to as quantum simulators due to the quantum-statistical nature of the formation of the coher- ent state (e.g. Bose-Einstein condensate) during which a large fraction of bosons occupies the lowest quantum state and the macroscopic quantum phenomena emerges. These systems enjoy a quantum speed-up which is asso- ciated with the stimulated process of condensation i.e. an accelerated relaxation to the global ground quan- tum state. However, after the condensate formation the system behaves classically as non-commutativity of eld operators becomes insigni cant in the large num- ber of particles regime. To distinguish these platforms from quantum computers/quantum simulators that rely on entanglement and quantum superposition, we refer to them as "analog Hamiltonian simulator/optimizer" (AHO). The search for the solution of QUBO or QCO is via a bottom-up approach which has an advantage over classical or quantum annealing techniques, where the global ground state is reached through either a tran- sition over metastable excited states or via tunnelling be-tween the states in time that depends on the size of the system. Di erent AHOs rely on di erent quasi-particles as the basis for bit/qubit and vary by scalability, cou- pling control, connectivity and the accuracy with which the result can be read, etc. The microscopics of various systems we present below can be quite di erent, but the governing principle for solving QCO is based on the rep- resentation of each "spin" indexed by iand centered at the position xiby the wavefunction ( jxxij) exp[ii], where is the wavefunction of an isolated condensate centered at the origin. At the condensation threshold the phase di erences between the individual wavefunc- tions maximize the total number of particles given by M Z X i (jxxij) exp[ii] 2dx =NZ 2dx+X j<iJijcos(ij); (5) whereJij=R [ (jxxij) (jxxjj)+c:c]dx. Since the rst term on the right hand side does not depend on the phases, the maximization of Mis equivalent to minimiza- tion of Eq. (4), and, therefore, to nding the solution to QCO. We conclude that such gain-dissipative platforms solve QCO at the condensation threshold [19]. To under- stand the formation dynamics of such driven-dissipative system one can replace the spatially dependent conden- sate pro le centered at xiby a complex function i(t) with the dynamics described by a rate equation [39] _ i= ( i e ivij ij2iUj ij2) i+X jJij j;(6) where i e is the e ective gain given by the di erence between the slowly increasing function of pumping and a constant linear dissipation at site i,virepresents the blue shift due to the external potential applied at the sitei,corresponds to the nonlinear losses that allow for gain saturation and therefore, for a steady state at the condensation threshold, and Udescribes the strength of nonlinear interactions at the site i. If one writes iin terms of the density i(t) and phase i(t) using i=piexp[ii(t)] and separates real and imaginary parts of Eq. (6) then the resulting equations yield 1 2_i= ( i e i)i+X jJijpijcosij+i(7) _i=viUiX jJijpjpisinij+i; (8) whereij=ijand we included a small density and phase perturbations i(t) andi(t) that respectively rep- resent the spontaneous and stimulated scattering during the condensation process, incorporate classical and quan- tum e ects and disappear at the condensation threshold. It follows from Eqs. (7-8) that the gradient ow to the 6 Jij FIG. 2: A general scheme for a gain-dissipative simulator. The condensates are pumped in a two-dimensional lattice with interaction strengths Jijbetween the adjacent vertices. The nal phase con guration minimizes the XY orIsing Hamiltonians depeding on a particular physical system. solution of QCO is realised if all iare the same, which is achieved by adjusting i e during the condensate for- mation. At the condensate threshold the steady state is achieved with _ i= 0 and _i== const, where is the chemical potential of the system. To drive the system to such a state the adjustment of the pumping of the indi- vidual nodes has to be accompanied by the adjustment of the external potentials vi[40]. Next we discuss the the actual physical platforms rep- resenting the gain-driven analog Hamiltonian optimizers. Polariton graph optimizers. Polariton graph op- timizers are based on exciton-polariton condensates ar- ranged at a particular graph geometry and are used for solving QCO (Eq. 2). Exciton-polaritons (or polaritons) are the composed light-matter quasi-particles formed in the strong exciton-photon coupling regime in semicon- ductor microcavities [41]. At low densities these quasi- particles are bosons and condense above some thresh- old of pumping intensity forming a single coherent state. Polariton condensates can be imprinted into any two- dimensional graph by spatial modulation of the pumping laser. Such two-dimensional graphs of condensates in- herit high exibility in engineering any geometrical con- guration of nodes. By controlling the excitation density, the pro le of the pump, the graph geometry and the sep- aration distance between the lattice sites, one can control the couplings between the sites and realise various phase con gurations between individual condensates. At the condensation threshold the phase di erences, ij, be- tween condensates at di erent nodes indexed by iandj establish the minimum of the XY model (4) and, there- fore, solve QCO [19, 39]. Polariton graphs are easily scalable and the graphs that consist of 45 and 100 nodes have already been realised [19]. The coupling strengths Jijin (Eq. 4) and so the elements of Qin (Eq. 2) are controlled by the graph geometry and go beyond the next neighbour interactions [42]. Photon-based simulators. Photon condensates as the elements (bit/qubit) of AHO for solving QCO can be created by generating variable potentials for light withinan optical high- nesse microcavity [43]. The long pho- ton lifetime enables the thermalization of photons and the demonstration of a microscopic photon condensate in a single localized site. The investigation of e ective photon-photon interactions as well as the observed tun- nel coupling between sites makes the system a promising candidate for AHO. The scalability of hundreds of con- densates has been already demonstrated [43] suggesting that thermo-optic imprinting provides a new approach for variable microstructuring in photonics. QED-based simulators. A realization of a multi- mode cavity QED (quantum electrodynamics) system [44] paves a way to a QED-based AHO thanks to the strong, tunable-range, and local interactions between Bose-Einstein condensates trapped within the cavity. While single-mode cavities provide strong but in nite- range photon-mediated interactions among intracavity atoms, it was experimentally shown in [44] that local couplings can be created using multimode cavity QED. Moreover, atom-atom couplings may be tuned from short range to long range which reduces the sparseness of ma- trixQand therefore increases the potential complexity of the problem. The XY model has been previously simulated by other physical systems: ultra cold atomic optical lattices [45] and coupled photon lasers network [38], which was also proposed for solving QCO. We have not discuss here other universal fully quantum platforms such as based on superconducting qubits [46] or trapped ions [47] as their potential for solving QUBO and QCO is not fully explored. 3. LAYING OUT ANALOG HAMILTONIAN SIMULATORS ON A BLOCKCHAIN. In the previous section we considered several possible analog Hamiltonian simulators that start being compared to classical state-of-the-art algorithms for solving the global optimization problems such as QUBO and QCO. These platforms, have either demonstrated a speedup, or have a potential to achieve this in the nearest future. Figure 3 illustrates the schematics of the POW protocols that can be based on solving QUBO or QCO problems using the currently available analog Hamiltonian simula- tors. The recipe for building a blockchain based on such sim- ulators is essentially the same for all types of simulators. The input for each block will include among other pa- rameters (like timestamp, previous block id, etc.) a pa- rameter that is speci c for each type of simulator. In case of the simulators considered here, this additional param- eter is a matrix of coupling strengths Jij(the elements of matrixQ). The ways of controlling and modifying the coupling strengths are system dependent, for instance, by changing the distance, pumping intensity and the hight of the trap barrier in gain-dissipative simulators. The cou- pling matrix has to be formed depending on the block 7 content, so nobody can prepare a coupling matrix in ad- vance and solve it in order to approve a particular block. For instance, the numerical expression of the order of transactions together with the amount of each transac- tion could be used to form this matrix. The output of the block consists of the problem optimizers: the result- ing "spins" sior phasesi, that can be further encoded and serve as a next block's name. Verifying whether the block belongs to the chain or not can be done for instance by checking that the value of the objective function zHQz for the found optimizers zis larger (better) than the one found by a classical approximation or heuristic algorithm. Next we explicitely construct the matrix Q. Suppose that a blockchain consists of blocks with capacity of X transactions per block. Depending on the capabilities of a particular simulator/optimizer a di erent range of cou- pling strengths Jijcan be realised (for instance, a polari- ton graph optimizer can achieve the coupling strengths between2eV to 2eV [48]). Based on the platform we de ne a hash function H0(x) =ythat maps a trans- actionxinto an output ywherey2[minJij;maxJij]: To generate the coupling matrix Qof sizeNNand sparsity (100D)% we need to map the block content intom=N(N1)D=200 non-zero matrix elements. If X=m, each transaction is hashed into a non-zero ma- trix element directly using H0. IfX > m a necessary number of transactions has to be hashed together (by a di erent hash Hthat returns the same size of the out- put as input) before mapping using H0is performed. If X < m then the required number of non-zero elements is generated by rst hashing all transaction individually, then adding the hashes of their pairs, and so on until the required number of elements mis reached. For instance, for bitcoin, the amount of transactions per block is X5000. The most recent D-Wave sim- ulator has a coupling matrix of size N2000 which is quite sparse with D1% which gives about 20000 non-zero matrix elements. We ll the rst 5000 elements by hashing each of 5000 individual transactions, than by hashing the hashes of the pairs of the rst, second and Proof-of-Work based on Superconducting Qubits (D-Wave)Optical Parametric Oscillators(Coherent Ising Machine)Gain-Dissapative Simulatoron polariton condensatesGain-Dissapative Simulatoron photon condensatesGain-Dissapative Simulatoron QEDQuadratic UnconstrainedBinary Optimisation (QUBO)Quadratic Continiuous Optimisation (QCO)Simulators that minimise Ising HamiltonianSimulators that minimise XY Hamiltonian FIG. 3: The scheme shows that the Proof-of-work protocol can be realised for solving the QUBO or QCO problems on purposely built quantum simulators based on superconduct- ing qubits, OPO-s, polaritons, photons, QED.third transactions with all the rest. Finally, we note that not only the transaction should be mapped to the coupling matrix, but the other header parameters of the block as well (timestamp, the previous block's id, see Suppl. Mat. for a full list of parameters). 4. CONCLUSIONS In this article, we propose to use the analog Hamilto- nian optimisers as a basis for a proof-of-work protocols. Such simulators are capable of outperforming classical computers on the timescale of seconds or less as compared to hours or more, which o ers straightforward bene ts. In a particular case of blockchain technology, such op- timisers will allow a faster veri cation process reducing the time interval between blocks which will signi cantly decrease the con rmation time of transaction to the or- der comparable to Visa and even beyond, and a possible new generation of digital cash will be applicable on day- to-day basis. A speci c achievable timescale depends on the nature of simulator and the type of the problem. In case of a commercially available D-Wave machine, for in- stance, proof-of-work will take tens of milliseconds. Con- sequently, the analog simulators considered in this article will make possible for a blockchain to be operated at a maximum synchronisation speed between the nodes. One can think about quantum simulators/analog Hamiltonian optimizers as the computational black boxes with approximately the same "hashing power" which is higher than the power of any classical computer. Dis- tributing such blackboxes between 20-50 independent nodes would make the system much more decentralised than any other existing platforms of current blockchain technology. The proof-of-work protocol based on ana- log Hamiltonian simulators would allow better scalability by making faster the processing of databases (sharding implementation) while current proof-of-work schemes do not support it due to security issues. Supplementary material The block header. The block header consists of the bitcoin version number, the hash of the previous block header, the hash of all the hashes of all the transactions in the block (the Merkle Root), the timestamp, the di- culty target (the precision of calculation needed to meet the required level of POW in under ten minutes) and a random 32-bit integer number called 'nonce' (the value that is altered by the miners to try di erent permutations to achieve the diculty level required). Bitcoin security. The security of bitcoin is based on the two cryptographic protocols that prevent it from being stolen or copied. The rst is the POW that is required to write trans- actions to the bitcoin digital ledger. If a majority of computations are done independently, the honest chain 8 will grow faster and outpace any competing chains since all the new blocks have to be added to the longest chain. To modify a past block, an attacker would have to redo the POW of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. The probability of a slower attacker catching up dimin- ishes exponentially as subsequent blocks are added. So it's not possible to change the information about any transactions in the blocks that has been already incorpo- rated in the blockchain. Moreover, nobody can prepare a malicious block in advance, since the result of the hash function will depend on the previous block's hash. This is why a malicious node has to compete in a computational power with the whole network of peers in real time with the only chance to win by exceeding the total power of all other nodes. Thus, the higher total computation power of the distributed network of nodes ensures the safety of the blockchain from creating an alternative history of transactions by a particular malicious node. Bitcoin has another cryptographic security feature to ensure that only the owner of cryptocoins can spend them which is based on an elliptic curve digital signature algo- rithm (ECDSA). It is based on assumption that nding the discrete logarithm in a cyclic subgroup of a random elliptic curve over a nite eld is infeasible [49]. Following this signing algorithm, the coin owner generates two ran- dom numbers for each transaction: a private key which only the owner knows and a public key which is revealed to the network. Only the owner is able to produce valid signatures based on these keys since the public key can be easily generated from the private key but not the other way around. In this scenario, the owner signs the hash of the transaction with the private key, and everyone else is able to validate the signature with the available public key by looking at the given signature and transaction. In this way, a signature can be used to verify that the owner possesses the private key and therefore has the right to spend the bitcoin, without revealing the actual private key. Security Issues. Knowing the two main security fea- tures of bitcoin leaves one with the two possibilities to prevail over the bitcoin's system: either controlling more than 50% of the computational power on the network or cracking the cryptographic signature scheme. For the latter case, the only way to cheat ECDSA is to calculate the private key using the public key, which is extremely hard problem with classical computers though its exact complexity class is not known. Quantum computers run- ning the Shor's algorithm for number factorization [50] pose a risk to the encryption schemes such as RSA, and therefore to cryptocurrencies in particular. However, to break the relevant RSA codes (say RSA-1024) requires 105qubit quantum computer which is beyond the cur- rent capabilities of about 50 qubits [51]. At present, there are suggestions of countermeasures that can be taken to protect bitcoin from a possible fu- ture attack of quantum computers. Examinations of how quantum computers could undermine and even exploitbitcoin security protocols have been recently discussed in [52]. Another proposal [53] positions transmission of quantum cryptographic keys between a remitter and a receiver of the eponomous named cryptocurrency, qBit- coin, where the exchanging qBitcoins requires a transmis- sion network in place that can send and receive bits of quantum information, qubits. The alternative signature schemes that are believed to be quantum safe, are also discussed, and thus qBitcoin security may rely on a quan- tum digital signature in future. Quantum-cryptographic improvements to the current cryptographic schemes that may be widely used in digital currencies were suggested as well [54{56]. Energy consumption. In a PoW system, large amounts of electricity are required in order to power the com- puting hardware: the bitcoin's current annual electricity consumption is about 30 TWh which is close to consump- tion of such countries as Ireland, Buhrain, Slovak Repub- lic, Oman, Morocco. The bitcoin miners spend around $50;000 per hour on electricity which is equivalent to $450 million per year. Storage problem . Up to now, bitcoin supports about 5-7 tps with a 1 megabyte block limit. Assuming the unlimited block size and 300 bytes per bitcoin transac- tion on average, it would require nearly 0.5 gigabytes per bitcoin block, every ten minutes on average to reach an equivalent capacity of Visa transaction volume of aver- age order of2000 tps (56,000 tps at peak) or Paypal of the order of200 tps (600 tps at peak). Continuously, that would be over hundred terabytes of data per year. Clearly, achieving Visa-like capacity on the Bitcoin net- work is not feasible today since this amount of data has to be stored not in one place but in all the nodes con- stituting the decentralised computational network. To x the issue with the con rmation time and the num- ber of possible transactions per second, bitcoin lightning network has been proposed, however, one of the conse- quences of its implementation could be further unwanted centralisation [57]. Alternative to proof-of-work: proof-of-stake. In POW miners invest computing power competing for a chance to add next block to a Blockchain and win a reward for doing so. To decrease the energy demands, an alterna- tive to POW known as the proof-of-stake (POS) scheme was suggested making the entire mining process virtual: individual computational nodes reach consensus about each next block by betting their money. The stakehold- ers who will form the next block are randomly selected from a pool of validators with respect to the size of stake they have, and once the block is added to a Blockchain, a reward proportional to the stake is given. Betting on the wrong or the malicious block is to be punished by the system, which is, in case of etherium's POS suggested protocol the entire invested stake may be lost [58]. For a blockchain to be secure, the means of selecting a stakeholder to make a block must be truly random. Ouroboros introduced the randomness into the leader election process by way of a secure, multiparty imple- 9 mentation of a coin- ipping protocol which is realised in Cardano cryptocurrency [59]. [1] Nakamoto, S. Bitcoin: A peer-to-peer electronic cash sys- tem (2009). [2] Kelly, J. Nine of World's Biggest Banks Join to Form Blockchain Partnership. Thomson Reuters (2015). [3] Chain kEnterprise Blockchain Infrastructure (2016). [4] Szabo, N. Smart contracts: building blocks for digi- tal markets. EXTROPY: The Journal of Transhumanist Thought , 16 (1996). [5] Dwork, C. & Naor, M. Pricing via processing or combat- ting junk mail. I Annual International Cryptology Confer- ence, 139-147 (1992). [6] Feynman, R. R. Simulating physics with computers. Int. J. Theor. Phys. 21, 467 (1982). [7] Bloch, I., Dalibard, J. & Nascimbene, S. Quantum simu- lations with ultracold quantum gases. Nat. Phys. 8, 267 (2012). [8] Georgescu, I. M., Ashhab, S. & Nori, F. Quantum simu- lation. Rev. Mod. Phys. 86, 153 (2014). [9] Kim, K. et al. Quantum simulation of frustrated Ising spins with trapped ions. Nature 465, 590-593 (2010). [10] Lanyon, B.P. et al. Universal digital quantum simulation with trapped ions. Science 334, 57 (2011). [11] Corcoles, A. D. et al. Demonstration of a quantum error detection code using a square lattice of four supercon- ducting qubits. Nature Commun. 6, 6979 (2015). [12] Lewenstein, M., Sanpera, A., Ahu nger, V., Damski, B., Sen, A. & Sen, U. Ultracold atomic gases in optical lat- tices: mimicking condensed matter physics and beyond. Advances in Physics 56(2) , 243-379 (2007). [13] Sa man, M., Walker, T.G. & Molmer, K. Quantum infor- mation with Rydberg atoms. Rev. Mod. Phys. 82, 2313 (2010). [14] Simon, J., Bakr, W.S., Ma, R., Tai, M.E., Preiss, Ph. M. & Greiner, M. Quantum simulation of antiferromagnetic spin chains in an optical lattice. Nature 472, 307-312 (2011). [15] Esslinger, T. Fermi-Hubbard physics with atoms in an optical lattice. Annu. Rev. Condens. Matter Phys. 1, 129-152 (2010). [16] Utsunomiya, S., Takata, K. & Yamamoto, Y. Mapping of Ising models onto injection-locked laser systems. Opt. Express 19, 18091(2011). [17] Marandi, A., Wang, Z., Takata, K., Byer, R.L. & Ya- mamoto, Y. Network of time-multiplexed optical para- metric oscillators as a coherent Ising machine. Nat. Phot. 8, 937-942 (2014). [18] Nixon, M., Ronen, E., Friesem, A. A. & Davidson, N. Observing geometric frustration with thousands of cou- pled lasers. Phys. Rev. Lett. 110, 184102 (2013). [19] Berlo , N. G et al. Realizing the classical XY Hamil- tonian in polariton simulators. Nat. Mat. 16(11) , 1120 (2017). [20] Vaidya, D. V. et al . Tunable-range, photon-mediated atomic interactions in multimode cavity QED. Phys. Rev. X 8(1), 011002 (2018). [21] Dung, D. et al. Variable potentials for thermalized light and coupled condensates. Nat. Phot. 11(9) , 565 (2017). [22] Cuevas, G. D. & Cubitt, T. S. Simple universal mod-els capture all classical spin physics. Science 351, 1180 (2016). [23] Zhang, S. & Huang, Y. Complex quadratic optimization and semide nite programming. SIAM J. Optim. 16, 871 (2006). [24] Dunning, I., Gupta, S. & Silberholz, J. What Works Best When? A Systematic Evaluation of Heuristics for Max- Cut and QUBO. To appear in INFORMS Journal on Computing, (2018). [25] Kochenberger, G. et al . The unconstrained binary quadratic programming problem: a survey. J Comb Op- tim28, 5881 (2014). [26] Papadimitriou, C. H. & Yannakakis, M. Optimization, approximation, and complexity classes. J. Comput. Syst. Sci.43(3) , 425440 (1991). [27] Goemans, M. X. & Williamson, D. P. Approximation al- gorithms for Max-3-Cut and other problems via complex semide nite programming. J. Comput. Syst. Sci. 68(2) , 442470 (2004). [28] Dr Anders Hansen; private communication. [29] Krislock, N., Malick, J. & Roupin, F. BiqCrunch: a semide nite branch-and-bound method for solving bi- nary quadratic problems. ACM Trans. on Math. Software 43, (2017). [30] Johnson, M. W. et al. Quantum annealing with manu- factured spins. Nature 473(7346) , 194-198 (2011). [31] Kadowaki, T. & Nishimori, H. Quantum annealing in the transverse Ising model. Phys. Rev. E 58(5) , 5355 (1998). [32] Steiger, D. S., Heim, B., Ronnow T. F. & Troyer, M. Performance of quantum annealing hardware. In Electro- Optical and Infrared Systems: Technology and Applica- tions XII ; and Quantum Information Science and Tech- nology 9648 , 964816(2015). [33] Denchev, V. S. et al. What is the computational value of nite-range tunneling? Phys. Rev. X 6(3), 031015 (2016). [34] Zintchenko, I., Hastings, M. B. & Troyer, M. From Local to Global Ground States in Ising Spin Glasses. Phys. Rev. B91, 024201 (2015). [35] King, J. et al. Quantum annealing amid local ruggedness and global frustration. arXiv preprint arXiv:1701.04579 (2017). [36] McMahon, P. L. et al. A fully-programmable 100-spin co- herent Ising machine with all-to-all connections. Science 354(6312) , 614-617 (2016). [37] Yamamoto, Y. et al. Coherent Ising machines: optical neural networks operating at the quantum limit. NPJ Quantum Information 3(1), 49 (2017). [38] Nixon, M., Ronen, E., Friesem, A. A. & Davidson, N. Observing geometric frustration with thousands of cou- pled lasers. Phys. Rev. Lett. 110, 184102 (2013). [39] Lagoudakis, P. G. & Berlo , N. G. A polariton graph simulator. New J. Phys. 19, 125008 (2017). [40] Kalinin, K. P. & Berlo , N. G. A synchronised oscillator network in a driven-dissipative system, in preparation (2018). [41] Weisbuch, C., Nishioka, M., Ishikawa, A. & Arakawa, Y. Observation of the coupled exciton-photon mode split- 10 ting in a semiconductor quantum microcavity. Phys. Rev. Lett.69, 3314 (1992). [42] Kalinin, K., Lagoudakis, P. G. & Berlo , N. G. Exotic states of matter with polariton chains. arXiv preprint arXiv:1710.02304 (2017). [43] Dung, D. et al. Variable potentials for thermalized light and coupled condensates. Nat. Phot. 11(9) , 565 (2017). [44] Vaidya, V. D. et al . Tunable-range, photon-mediated atomic interactions in multimode cavity QED. Phys. Rev. X8(1), 011002 (2018). [45] Struck, J. et al. Quantum simulation of frustrated clas- sical magnetism in triangular optical lattices. Science 333(6045) , 996-999 (2011). [46] Boixo, S. et al . Characterizing quantum supremacy in near-term devices. arXiv preprint arXiv:1608.00263 (2016). [47] Britton, J. W. et al. Engineered two-dimensional Ising in- teractions in a trapped-ion quantum simulator with hun- dreds of spins. Nature 484, 489 (2012). [48] Silva, M. et al. Measure the heisenberg interaction in a polariton dyad. IEEE Lasers and Electro-Optics Europe &European Quantum Electronics Conference , 2017. [49] Johnson, D., Menezes, A. & Vanstone, S. The elliptic curve digital signature algorithm (ECDSA). Int. J. Inf. Security 1(1), 36-63 (2001). [50] Shor, P. W. Algorithms for quantum computation: Dis- crete logarithms and factoring. In Foundations of Com- puter Science ,Proceedings., 35th Annual Symposium, Ieee, 124-134 (1994). [51] Castelvecchi, D. Quantum cloud goes commercial. Nature 543(7644) , 159-159 (2017). [52] Aggarwal, D., Brennen, G. K., Lee, T., Santha, M. & Tomamichel, M. Quantum attacks on Bitcoin, and how to protect against them. arXiv preprint arXiv:1710.10377 (2017). [53] Ikeda, K. qBitcoin: A peer-to-peer quantum cash system. arXiv preprint arXiv:1708.04955 (2017). [54] Farhi, E., Gosset, D., Hassidim, A., Lutomirski, A. & Shor, P. Quantum money from knots. arXiv preprint arXiv:1004.5127v1 (2010). [55] Jogenfors, J. Quantum Bitcoin: An anonymous and dis- tributed currency secured by the no-cloning theorem of quantum mechanics. arXiv preprint arXiv:1604.01383v1 (2016) [56] Kiktenko, E.O. et al. Quantum-secured blockchain. arXiv preprint arXiv:1705.09258v2 (2017). [57] Fyookball, J. Mathematical proof that the lightning net- work cannot be a decentralized bitcoin scaling solution, https://medium.com/@jonaldfyookball/mathematical- proof-that-the-lightning-network-cannot-be-a- decentralized-bitcoin-scaling-solution-1b8147650800 [58] Etherium. A next-generation smart con- tract and decentralized application platform, https://github.com/ethereum/wiki/wiki/White-Paper [59] Kiayias, A., Russell, A., David, B. & Oliynykov, R. Ouroboros: A provably secure proof-of-stake blockchain protocol. Ann. Int. Crypt. Conf. , 357-388 (2017). [60] Northup, T. E. & Blatt, R. Quantum information trans- fer using photons. Nat. Phot. 8, 356 (2014). [61] So, A. M. C., Zhang, J. & Ye, Y. . On approximating complex quadratic optimization problems via semide - nite programming relaxations. Math. Program. 110(1) , 93-110 (2007). [62] Pardalos, P. M. & Vavasis, S. A. Quadratic programmingwith one negative eigenvalue is NP-hard. J. Global Op- tim.1(1), 15-22 (1991).
{ "id": "1802.10091" }
1906.11946
LApps: Technological, Legal and Market Potentials of Blockchain Lightning Network Applications
Following in the footsteps of pioneer Bitcoin, many altcoins as well as coloured coins have been being developed and merchandised adopting blockchain as the core enabling technology. However, since interoperability and scalability, due to high and capped (in particular cases) transaction latency are deep-rooted in the architecture of blockchain technology, they are by default inherited in any blockchain based applications. Lightning Network (LN) is one of the supporting technologies developed to eliminate this impediment of blockchain technology by facilitating instantaneous transfers of cryptos. Since the potentials of LN is still relatively unknown, this paper investigates the current states of development along with possible non-monetary usage of LN, especially in settlement coloured coins such as securities, as well as creation of new business models based on Lightning Applications (LApps) and microchannel payments as well as micro-trades. The legal challenges that may act as impediment to the adoption of LN is also discussed.
http://arxiv.org/pdf/1906.11946v1
Mahdi H. Miraz, David C. Donald
cs.CR
cs.CR
THE CHINESE UNIVERSITY OF HONG KONG FACULTY OF LAW Research Paper No. 2019 -04 LApps: Technological, Legal and Market Potentials of Blockchain Lightning Network Applications Mahdi H. Miraz David C. Donald This is a pre -print of the article accepted for oral presentation at and inclusion in the proceedings of the 3rd International Conference on Information System and Data Mining (ICISDM2019) , proceedings to be published by ACM in the International Confer ence Proceedings Series. The ACM Digital Library link to the final published version of the article will be provided once the article is published. LApps: Technol ogical, Legal and Market Potentials of Blockchain Lightning Network Applications Mahdi H. Miraz The Chinese University of Hong Kong Sha Tin Hong Kong m.miraz@ieee.org David C. Donald The Chinese University of Hong Kong Sha Tin Hong Kong dcdonald@cuhk.edu. hk ABSTRACT Following in the footsteps of pioneer Bitcoin, many altcoins as well as coloured coins have been being developed and merchandised adopting blockchain as the core enabling technology. However, since interoperability and scalability, due to high and capped (in particular cases) transaction latency are deep -rooted in the architecture of blockchain technology , they are by default inherited in any blockchain based applications . Lightning Network (LN) is one of the supporting technologies developed to eliminate this impediment of blockchain technology by facilitating instantaneous transfers of cryptos. Since the potentials of LN is still relatively unknown, this paper investigates the current states of deve lopment along with possible non-monetary usage of LN, especially in settlement coloured coins such as securities, as well as creation of new business models based on Lightning Applications (LApps) and microchannel payments as well as micro -trades. The lega l challenges that may act as impediment to the adoption of LN is also discussed. CCS Concep ts • Applied computing → Electronic commerce → Digital cash • Applied computing → Electronic commerce → Electronic funds transfer • Applied computing → Law, social and behavioral sciences • Networks → Network protocols → Application layer protocols → Peer -to-peer protocols. Keywords Blockchain; Atomic Swap; Lightning Network; Cross -chain Trading; Cryptocurrencies; Cross -listing; Wallet-to -Wallet Transfer; On-Chain; Off -Chain; Layer 2; H ashed Timelock Contracts (HTLC); Payment Channels; State Channels; Coloured Coins; DAO; ICO; DApps; LApps. 1. INTRODUCTION Despite several successful new and experimental applications of blockchain [1] technology , including the conceiving Bitcoin, there are few inbred limitations that caveat the outright utilisation of the technology . Lack of interoperability amongst various chains and restrained scalability by high transact ion latency due to decentralised consensus approach and network architectural limitations are the prominent ones [2]. For instance, hitherto Bitcoin can process 7 transactions per second (TPS) and Ethereum has the capacity of 15 TPS. While Ripple has a capacity of 1500 TPS, it is far lower tha n that of Visa which is 24,000 [3] and if demand increases it is likely to go down due to increased network congestions and augmented load on the consensus process. At least, this has been the case for Bitcoin and Ethereum: An “unconfirmed” Bitcoin transaction might take a minimum of 10 minutes on an average to get “confirmed” if pulled into the next availab le “candidate” block, otherwise the process can take up to several days. Due to increasing popularity of DApps (Decentralised Apps) , DAOs (Decentralised Autonomous Organization) and ICO’s (Initial Coin Offering), the waiting time in Ethereum network is als o exponentially rising. Off-chain scaling, such as lightning n etwork (LN) [4,5], can play a vital r ole in this regard. In off-chain scaling [4,6,7,8,9,10,11], a second layer, also known as layer 2 or payment channel, enables unlimited instantaneous transactions to take place between two parties. When the channel is closed, only the netted result of the transactions is broadcast to the network for consensus. LN thus directly holds the promises of eliminating the scalability problem of blockchain while atomic swaps powered by a LN possess the potential of enabling smo other interoperability. The rest of the paper briefly describes the fundamental principle that serves as the foundation for LN . The paper then evaluates the feasibility of its application in exchanging and settling of coloured coins – real world assets represented on the Bitcoin (or more widely any blockchain) networks such as securi ties, bonds, futures, shares and other commodities. The paper also discusses the creation of new non-monetary business models laid on the foundation of LN – mainly utilising Lightning Applications (LApps) and LN empowered micropayment provisions. 2. FUNDAMENT ALS OF LIGHTNING NETWORK 2.1 Preamble A Lightning Network is a second layer Hashed Timelock Contract (HTLC) based smart contract enabling bi -directional payment channels built on top of a base layer of blockchain such as Bitcoin. LN effectuates secure routing of payments or transactions of coloured coins across multiple peer -to-peer (P2P) payment channels enabling transactions between two parties who are not directly connected by any point -to-point channel. Thus, by off - loading the transactions away from the base layer, LN engineers instantaneous transfers of assets , cryptocurrencies or other crypto assets with near -zero transaction fees. The concept of lightning network was first revealed in December 2015 by Joseph Poon and Thaddeus Dryja [4], however, it took almost two years to undertake a series of successful implementations of interoperable test transactions on Bitcoin core network in December 2017. Let us consider that Alice and Bob would like to establish a LN payment channel for transacting Bitcoins ( BTCs ) amongst themselves. The first step is creating a multisignature wallet which can be accessed by both of them using their respective private keys. After the wallets is created, they then need to make a deposit , the “funding transaction”, a certain amount of BTC (for example 10 BTC) each into the multisignature wallet they have created. A “commitment transaction” is then required to enable the transfer of funds using LN. For instance, Alice wants to send 2 BTC to Bob, she will simply need to transfer ownership of 2 BTC to bob having the new balance sheet (Alice owns 8 BTC while Bob now owns 12 BTC) signed by the private respective private keys of both parties. They can now conduct unlimited transac tions between them by redistributing the funds of the shared wallet. The transfer of ownership right s is bi -directional and can be performed an unlimited number of times before the channel is closed by either party. In this scenario, the funds are actually distributed at the time of closing the channel and initial as well as final balance are then broadcasted to the peers of the base blockchain for consensus approach as normally performed in any base layer transactions. Thus, the outcome of netted multiple LN transactions is recorded on the blockchain as a single transaction. In fact, the commitment transaction fundamentally allocates the funding transactions as per the current allocation and therefore comprises two asymmetric transactions. In case of Alice, these are: one that pays Bob straightaway and the other that is a revocable but time-locked output , which ultimately pays Alice. The later can be revoked by Bob if he knows the revocation key. Similarly, Bob’s commitment transaction will be the converse. Let us consider the case where Alice is connected with Bob using one LN payment channel while Bob is connected to Trudy by another channel. This will enable Alice to indirectly transfer her coins to Trudy via Bob without needing any dedicated channel betwe en them. With the widespread adoption of LN, such indirect channel will automatically increase in scope. However, a routing algorithm will be required to find an optimal route from the source to the destination. LN adopts an onion style routing approach without comprising the privacy where the intermediate nodes only know the next hop address rather than both the next hop and the final destination addresses as in traditional routing algorithms. As of 15:06:40 GMT+0800 (Hong Kong Standard Time) on Thursday 31st January 2019, the number of total number of “reachable” Bitcoin nodes w as 10,527 with an average of 10,301 in the last 24 hours1, while the number of LN enabled nodes was 5,788 with 23,021 channels of a total network capacity (for LN transfers) of 618.51 BTC . However, the number of “active” LN enabled nodes was only 2,8702. So far, there have been several variant implementations of the originally proposed LN , following recommendations from other developers of the Bitcoin community. The three major implementations are: Blockstream’s “c-lightning” implementation in C , Lightning Labs’ Golang ’s implementation of “Lightning Network Daemon (LND)” and ACINQ’s Scala implementation of “eclair”. A complete updated list can be found at GitHub.3 All three of these have been prove n interoperable by real LN transfers. Ethereum’s Raiden Network is also an example of off -chain scaling similar to LN. 2.2 Basic Algorithm Initially, Alice’s commitment transaction is A1 with a revocation key of RA1 which is only known by Alice. Similarly, Bob’s 1 https://bitnode s.earn.com/dashboard/ 2 https://1ml.com/statistics commitment transaction is B1 with a revocation key of RB1 which is only known by Bob. Let us assume Alice wants to send Bob 2 BTC (initially she had 10 BTC). 1. Alice generates a new Bob’s transaction B2 allocating 8 BTC to Alice and 12 BTC to Bob. 2. Alice then signs B2 with her private key and transmit it to Bob. 3. Once received, Bob signs B2 and temporarily keeps it 4. Bob generates a new Alice’s transaction A2 allocating 8 BTC to Alice and 12 BTC to Bob. 5. Bob then signs A2 with his private key and transmit it to Alice. 6. Once received, Alice signs A2 and temporarily keeps it 7. Alice shares RA1 invalidating A1; A1 can now be deleted 8. Bob shares RB1 invalidating B1; B1 can now be deleted Algorithm 1: Basic LN Algorithm, developed based on the original LN proposal by Poon and Dryja [ 4]. 2.3 Major Advantages Although the primary intension of developing LN was to facilitate instantaneous payments over Bitcoin networks, it brings many other advantages such as : • Since LN is the enabler of off -chain atomic cross -chain swaps [2], all the benefits atomic swap can offer are imput ed to LN including those of sidechains . • Off-chain scaling such as LN will help cryptocurrencies to compete with fiat currencies to s ome extent. • Off-loading some transactions away from the base layer of chain will shorten the processing queue of “unconfirmed” transactions which will result in reduc ed on-chain transaction fees. • Improved privacy is another key advantage of LN as the transactions are not recorded on the base DLT. Onion style nested routing approach adds an extra layer of privacy as t he intermediate hops can only see the next hop’s address, without revealing the final destination address. • Merchants of commodities such as online shops or food outlets can open a LN Channel and receive instant payments. • Since the transaction fee is near -zero, LN effectively works as a micropayment channel. • LN based LApps possess great potentials to lead the creation of new ventures and innovative business models. • LN actuate micro -trading of cryptocurrencies and other crypto assets. • LN has the potentials of being used in the settlement of non- monetary coloured coins such as securities. 2.4 Major Impediments Considering the fact that off-chain scaling technology such as LN is still in its infancy, there are many i mpediments to overcome 3 https://github.com/bcongdon/awesome -lightning -network before it is widely and eff ectively adopted . Thus far, the major constrains of this technology are as follows: • LN is considered to be a “resource hog” since both the Bitcoin and LN nodes need to be run on the same server. This requires extremely high computational power as well as considerable amount of time for new installations, especially due to the time require d for synchronisation of the blockchain, currently sized at 196.56 GB.4 • Although LN enabled transactions are instantaneous compared to on-chain transactions , it is still very slow compared to fiat payment systems such as Visa or Master . • If at any time either party drops or goes offline, the channel will be closed and settled . • Off-chain scaling is not yet supported in many altcoins . • LN is created as a separate layer (lay er 2) on top of the base blockchain layer ; therefore, it doesn’t inherit the security features of blockchain. Considering the fact that the technology is still not highly proved to be secure, the supporting networks limit the amount of the currency to be traded. • Crypto systems without smart contract support cannot facilitate off-chain scaling . • Implementing off-chain scaling requires extensive programming skill. • LN, in its current form, is highly vulnerable to distributed denial of service ( DDoS ) [12] and other cyber -attacks [13]. In fact, LN already faced a DDoS o n the 20 March 2018 that sent approximately 200 nodes offline , which is roughly 20% of the total available LN nodes prior to the attack. • LN is not light-weight and is highly interdependent on complex technological configuration. Configuring cluster of servers , as seen in traditional e-commerce or in banking for redun dancy, is very complex in the current design of LN. Therefore, LN for business application are not redundant and susceptible to single point of failure (SPF). • Implementing LN in any dynamic cloud environment will demand significant workaround of the curren t design. 3. APPLICATIONS OF LIGHTING NETWORK IN NON- MONETARY TRANSACTIONS AND FUTURE ADOPTION TRENDS Lightning network technology is still a new concept - provisionally developed and implemented with limited scope. The number and capacity of lightning transactions taking place at this moment is still very small. However, introduction of LN is gaining popularity as it solves some of the problems associated with blockchain technologies, in particular with Bitcoin blockchain. Currently there are only a few crypto systems that support both HTLC and the specialised programming functions which are the minimum technological requirement s to adopt LN. However, they are expected to implement these features in the future, which will highly determine the direction of LN’s adoption trends. Rauchs et al. [14] describes LN as an example of an “interfacing” Digital Ledge r Technology (DLT) system that “opportunistically ” implements the elemental functionalities provided by a DLT technical configuration , which could be adjusted to take advantage of another or even multiple base DLTs. This feature of LN not only 4 https://www.blockchain.com/en/charts/blocks -size enables off -chain atomic cross -chain swaps [2], but also materialises the notion of decentralised exchanges , as each LN node having channels linked to multiple b lockchain networks can act as a decentralised exchange. Since nodes in the LN act as a money transmitter, there is a debate whether registration as a money transfer is a legal requirement. However, the laws related to money transmission differ across various countries, even sometimes among states of a country , such as in the US. Laws of many countries or states even lack clarity on whether the law for fiat currencies can be applied to cryptos. In fact, the nodes of LN do not acquire real ownership of the funds while being transmitted . Therefore, they cannot possibly nobble. Effectiveness of applying money transfer law in this case thus may not justify its intention to protect consumers. In fact, such inter -blockchain interoperability , i.e. atomic swaps will help boost liquidity of crypto assets arising in these chains by enabling transfer of assets formulated on one chain into assets formulated on another chain . Such swaps could include settlement of securities transactions . For legal certainty , the current governance approach of standard framework ag reements applied in international swap transactions can also be used for atomic swaps , with very little adjustment necessary once the framework is set in place. From a regulatory viewpoint, swaps and/or transfers present the problem that they could traverse geographic boundaries of political entities or legal jurisdictions . Such transnational activity is harder to regulate and monitor by the regulatory bodies or similar government agencies of any jurisdiction . Secrecy is added to this regulator y difficulty. Due to the implantation of an onion style routing approach, even if LN channels created by other users are used to facilitate a transaction or swap, and only the final netted balance is broadcasted to the base blockchain network for consensus , the intermediate transfers or swaps remain private. No one but the transacting parties knows the actual transaction details. This feature of LN can contribute to the rise of illicit markets. LN-powered atomic swaps ha ve the potentials of eliminating legacy crypto exchanges by deploying direct transfers as well as decentralised exchanges. This could make monitoring and regulation more difficult. Since the intermediate transactions are not recorded even by the transacting parties, the inspection of chain coding is less likely to be sufficient. Therefore, the future adoption models of crypto assets is highly dependent on how regulatory and legal provisions are adjusted in different jurisdictions . In parallel with the pervasive application of blockchain techn ologies [15,16], LN even holds the promise to widen the current scope of adoption, especially LN could potentially play a role in settlement of securities transfers [17] or of other coloured coins - bringing the direct and transparent holdi ng of assets back to organis ed markets [18]. LN c ould thus contribute t o higher transparency leading to better corporate governance. LN enabled off -chain atomic cross -chain swaps [ 2] could also play an important role in facilitating cross -listing o n blockchain based securities exchanges. As per the current cross -listing models, one company can list its security in multiple exchanges [19]; the emerging concept of sidechain could be adapted for this purpose. A sidechain , also known as childchain in Ardor platform, is a ‘loosely’ joined independent blockchain, attached to another (i.e. parent ) blockchain utilising the “two -way peg” approach. This enables crypto assets from the parent blockchain to b e securely moved and used in the sidechains , at an agreed rate, with the option to move back to the original (i.e. parent) chain. Analogous to making micro -payments for any commodity, Micro - trades of cryptocurrencies (as in Foreign Exchange) or other coloured coins such as shares and securities, can also be feasible using LN. Despite the development of the various LN testbeds, seamless multi-asset conversion is still limited by its technical design. Therefore, adoption of such trade is foreseeable but subje ct to the maturity of the technology. In terms of using LN for American Call Options or for any other scenarios where significant changes in the traded value of the assets may happen within the trade windows , with current technological limitations of HTLC s, it is still problematic. This is primarily because traders can take unfair advantage of the current contracts if a rate changes in their favour. However, if LN aims to handle such trades, either carefully designed modification of the technology or development of a legal mechanism will be req uired [20]. As the LN technology has existed in operable form for just around one year and is still being used in restricted manner, we consider this still to be a r esearch and development (R&D) phase . However, as LN technology matures, its more concrete utilisation of the technology in various applications is expected, especially for transfer and fungibility of digital assets. 4. DRIVERS OF FUTURE BUSINESS MODELS Among all the benefits of LN as described in section 2.2, following two are currently the enablers of new business models and innovation: 1. Lightning Applications (Lapps) and 2. Micropayment Channel 4.1 Lightning Applications (LA pps) One of the major drawbacks of Bitcoin, compared to other Blockchain 2.0 implementation such as Ethereum, is not being “turing -complete” and thus having “no” support for smart contract s. However, implementation of off -chain scaling via LN Bitcoin blockchain can now support lightning a pplications (LApps) – similar to decentralised applications (DApps). This is made possible primarily due to off -chain transactions and multisignature features of LN. Combined with near -zero transaction fees, micropayment facilities and instant fund transfer, many business use -cases are being developed . 4.2 Micropayment Channel A micropayment, as the name implies, facilitates financial transactions of a very small amount, usually using online f acilities. In the 1990s, many micropayment channels were implemented but could not gain mass popularity , mostly due to limited use of the Internet. Utilising emerging e -commerce technologies, the concept of micropayment again came into highlight. In 2010s, the ecommerce industry has seen a second generation of micropayment. In fact, the success of a micropayment system highly depends on the capability of offering extremely low 5http://bitcoinist.com/lightning -network -black -swan -cryptograffiti transaction fees. Since LN can offer near -zero transaction fees, it is considered to be an enabler of micropayment channels. To help promote micropayment by LN, a tiny artwork named “Black Swan” has been auctioned and sold by a user to the lowest bidder for 1 milli-satoshi i.e. $0.000000037 - the lowest possible amount that could be transferred by Bitcoin LN5. If not the lowest, this is certainly close to being the lowest price ever paid in an auction . 4.3 Applications and Adoption Trends of Lightning Network in E -Commerce Until LN was implemented, the use-cases for Bitcoin end users was extremely limited to financial activities – mainly managing and funding wallets as well as exchanges. LN widens the scope and holds promises to further create new business models empowered by instant payments, even at m icro level with near -zero transaction fees. This will thus help significantly lower threshold of entry barriers for new businesses. Examples of such implementations include platforms for monetising digital content s at micro level , international mobile mess aging services , in-game micro -payments , receiving tips, Lightning Jukebox, Gambling, Lightning Point -of- Sale (PoS) for non -virtual stores, Bitcoin -payable Twitter Bot that facilitates receiving payments for like, share (retweets) and follows are few to mention. Lightning App Directory provides a comprehensive list of applications based on LN.6 5. CONCLUDING REMARKS By raising the limitations inherent in the two major failures of any blockchain -based financial application , interoperability and scalability, this paper argues that a second layer solution such as lightning network, powered by HTLC and smart contract, has potential f or addressing these limitations. The paper then discusses prospective usage of lighting networ ks in the clearing and settlement of coloured coins and securities . The paper also discusses future adoption trends of lightning networks and thus the creation of new business models utilis ing this technology . Legal and regulatory aspects of LN are discussed and f uture research directions projected. 6. REFERENCES [1] Mahdi H. Miraz and Maaruf Ali, "Blockchain Enabled Enhanced IoT Ecosystem Security ", in proceedings of the International Conference on Emerging Technologies in Computing 2018 (iCETiC '18), Part of the Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering (LNICST), vol. 200, London, UK, 2018, pp. 38- 46. Available: https://link.springer.com/chapter/10.1007/978-3 -319-95450 - 9_3 [2] Mahdi H. Miraz and David C. Donald, "Atomic Cross -chain Swaps: Development, Trajectory and Potential of Non- monetar y Digital Token Swap Facilities ", Annals of Emerging Technologies in Computing (AETiC), vol. 3, no. 1, pp. 42 -50, DOI: 10.33166/AETiC.2019.01.005 , January 2019. Avail able: http://aetic.theiaer.org/archive/v3/v3n1/p5.html [3] Richard MacManus, "Blockchain speeds & the scalability debate" , Blocksplain, February 2018. Available: https://blocksplain.com/2018/02/28/transaction-speeds/ [4] Joseph Poon and Thaddeus Dryja, "The Bitcoi n Lightning Network: Scalable Off -Chain Instant Payments ", Lightning 6 https://dev.lightning.communi ty/lapps/ Network, White Paper DRAFT Version 0.5.9.2, January 14, 14 January 2016. Available: https://lightning.network/lightning -network -paper.pdf [5] Marco Conoscenti, Antonio Vetrò, Juan Carlos De Martin, and Federico Spini, "The CLoTH Simulator for HTLC Payment Networks with Introductory Lightning Network Performance Results ", Information, vol. 9, no. 9, September 2018, 223. Available: https://www.mdpi.com/2078- 2489/9/9/223 [6] Pavel P rihodko, Slava Zhigulin, Mykola Sahno, Aleksei Ostrovskiy, and Osuntokun Olaoluwa, "Flare: An Approach to Routing in Lightning Network ", Bitfury White Paper, pp. 1-40, July 2016. Available: https://bitfury.com/content/downloads/whitepaper_flare_an_ approach _to_routing_in_lightning_network_7_7_2016.pdf [7] Christian Decker and Roger Wattenhofer, "A Fast and Scalable Payment Network with Bitco in Duplex Micropayment Channels ", in Proceedings of the International Symposium on Stabilization, Safety, and Security of Distributed Systems (SSS 2015), Part of Lecture Notes in Computer Science (LNCS), vol. 9212, Cham, Switzerland, 2015, pp. 3- 18. Available: https://link.springer.com/ch apter/10.1007/978-3 -319-21741 - 3_1 [8] Andrew Miller, Iddo Bentov, Ranjit Kumaresan, Christopher Cordi, and Patrick McCorry, "Sprites and State Channels: Payment Network s that Go Faster than Lightning ", arXiv, November 2017. Available: https://arxiv.org/pdf/170 2.05812 [9] The Raiden Network. Raiden Network. Available: https://raiden.network [10] Conrad Burchert, Christian Decker, and Roger Wattenhofer, "Scalable Funding of Bitcoi n Micropayment Channel Networks ", in Proceedings of the International Symposium on Stabilization, Safety, and Security of Distributed Systems (SSS 2017), Part of Lecture Notes in Computer Science (LNCS), vol. 10616, Cham, Switzerland, 2017, pp. 361- 377. Available: https://link.springer.com/chapter/10.1007/978- 3- 319-69084 -1_26 [11] Rami Khalil and Arthu r Gervais, "Revive: Rebalancing Off - Blockchain Payment Networks ", in Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS '17), Dallas, Texas, USA, 2017, pp. 439- 453. Available: https://dl.acm.org/citation.cfm?id=31340 33 [12] Ahmed S. Abu Daia, Rabie A. Ramadan, and Magda B. Fayek, "Sensor Networks Attacks Classifications and Mitigation ", Annals of Emerging Technologies in Computing (AETiC), vol. 2, no. 4, DOI: 10.33166/AETiC.2018.04.003, pp. 28 -43, October 2018 . Available: http://aetic.theiaer.org/archive/v2/v2n4/p3.html [13] Junaid Chaudhry, Kashif Saleem, Paul Haskell -Dowland, and Mahdi H. Miraz, "A Survey of Distributed Ce rtificate Authorities in MANETs ", Annals of Emerging Technologies in Computing (AETiC), vol. 2, no. 3, pp . 11-18, July 2018, DOI: 10.33166/AETiC.2018.03.002. Available: http://aetic.theiaer.org/archive/v2/v2n3/p2.html [14] Michel Rauchs et al., "Distributed Ledger Technology Systems: A Conceptual Framework ", The Cambridge Centre for Alternative Finance (CCAF), Judge Business School, Cambridge, UK, August 2018. Available: https://www.jbs.cam.ac.uk/faculty - research/centres/alternative- finance/publications/distributed - ledger -technology -systems/#.W4YWH- gzZhE [15] Mahdi H. Miraz and Maaruf Ali, "Applications of Blockchain T echnology beyond Cryptocurrency ", Annals of Emerging Technologies in Computing (AETiC), vol. 2, no. 1, pp. 1 -6, DOI: 10.33166/AETiC.2018.01.001, January 2018. Available: http://aetic.theiaer.org/archive/v 2/v2n1/p1.pdf [16] Md Mehedi Hassan Onik, Mahdi H. Miraz, and Chul -Soo Kim, "A Recruitment and Human Resource Management Technique Using Blockchain Technology for Industry 4.0" , in Proceeding of Smart Cities Symposium (SCS -2018), Manama, Bahrain, pp. 11 -16, DOI : 10.1049/cp.2018.1371 , 22-23 April 2018. Available: https://ieeexplore.ieee.org/document/8643177 [17] Mahdi H. Miraz and David C. Donald, "Application of Blockchain in Booking and Registration Systems of Securities Exchanges ", in proceedings of the IEEE Intern ational Conference on Computing, Electronics & Communications Engineering 2018 (IEEE iCCECE '18), Southend, United Kingdom, 16- 17 August 2018. [18] David C. Donald and Mahdi H. Miraz, " Restoring Direct Holdings and Unified Pricing to Securities Markets with Distributed Ledger Technology ", Manuscript on file with authors . [19] David C. Donald, "Networked Securities Markets: From Cross-Listing to Direct Connection ", in The Research Handbook on Asian Financial Law, Doug Arner et al., Eds.: Edward Elgar, 2019. [20] Paul H. Madore, "Bitcoin: Developer Explains Why a Multi- Asset Lightning Network Might Not Work" , CNN, December 2018. Available: https://www.ccn.com/bitcoin - dev-explains -why -a-multi-asset -lightning -network -might - not-work/
{ "id": "1906.11946" }
2102.08107
Interdependencies between Mining Costs, Mining Rewards and Blockchain Security
This paper studies to what extent the cost of operating a proof-of-work blockchain is intrinsically linked to the cost of preventing attacks, and to what extent the underlying digital ledger security budgets are correlated with the cryptocurrency market outcomes. We theoretically derive an equilibrium relationship between the cryptocurrency price, mining rewards and mining costs, and blockchain security outcomes. Using daily crypto market data for 2014-2021 and employing the autoregressive distributed lag approach - that allows treating all the relevant moments of the blockchain series as potentially endogenous - we provide empirical evidence of cryptocurrency price and mining rewards indeed being intrinsically linked to blockchain security outcomes.
http://arxiv.org/pdf/2102.08107v1
Pavel Ciaian, d'Artis Kancs, Miroslava Rajcaniova
econ.GN, cs.IT, math.IT, q-fin.EC, q-fin.TR
econ.GN
1 Interdependencies between Mining Costs, Mining Rewards and Blockchain Security1 Pavel Ciaian European Commission, Joint Research Centre (JRC) Via E. Fermi 2749, 21027 Ispra, Italy e-mail: pavel.ciaian@ec.europa.eu d'Artis Kancs (corresponding author) European Commission, Joint Research Centre (JRC) Via E. Fermi 2749, 21027 Ispra, Italy e-mail: d'artis.kancs@ec.europa.eu Miroslava Rajcaniova Slovak University of Agriculture in Nitra (SUA) and University of West Bohemia (UWB) Tr. Andreja Hlinku 2, 949 76 Nitra, Slovakia e-mail: miroslava.rajcaniova@uniagr.sk 1 The authors gratefully acknowledge financial support received from the Slovak Research and Development Agency under the contract No. APVV -18-0512 and VEGA 1/0422/19. The authors would like to thank two anonymous referees for excellent suggestions as well as participants of the International Conference on Macroeconomic Analysis and International Finance as well as seminar participants at the European Commission for comments and useful suggestions. The conceptual framework of this paper is based on Ciaian et al. (2021). The authors are solely responsible for the content of the paper. The views expressed are purely those of the authors and may not in any circumstances be regarded as stating an official position of the European Commission. 2 Interdependencies between Mining Costs, Mining Rewards and Blockchain Security Abstract This paper studies to what extent the cost of operating a proof -of-work blockchain is intrinsically linked to the cost of preventing attacks , and to what extent the underlying digital ledger’s security budgets are correlated with the cryptocurrency market outcomes. We theoretically derive an equilibrium relationship between the cryptocurrenc y price , mining rewards and mining costs, and blockchain security outcomes . Using daily crypto market data for 2014 –2021 and employ ing the autoregressive distributed lag approach – that allows treating all the relevant moments of the blockchain series as potentially endogenous – we provide empirical evidence of cryptocurrenc y price and mining rewards indeed being intrinsically linked to blockchain security outcomes. Keywords : Cryptocurrenc y, ARDL , blockchain, proof -of-work, security budget , institutional governance technology , network externalities JEL codes : D82, E42, G12, G15, G18, G29. 3 1 Introduction Blockchain – a distributed network of anonymous record -keeping peers (miners) – is an inherently ‘trustless’ ledger . In the proof -of-work (PoW) blockchain, the trust problem among non-trusting parties is solved by requiring miners to pay a cost (in form of computing capacity ) to record transaction information on a chain of block s and requiring that other record -keepers (miners) validate those blocks . Mining incentives are ensured via rewards for a correct and secure record keeping – the reward for every block is allocated to the miner that first solves the computational problem (hash function) by using guess and check algorithms based on the new and previous blocks of transactions. Cryptocurrency price shocks and hence changes in mining rewards (in a fiat currency denomination ) affect mining incentives for the ledger record -keepers and hence the underlying ledger’s security . Blockchain users – who value the network security – in turn adjust their crypto coin portfolio exercising in such a way upward or downward pressure on cryptocurrency ’s price (see Figure s 2 and 3 ). The literature suggests that these interdependencies between cryptocurrency’s value , mining costs and blockchain security may contribute to the extreme volatil ity of cryptocurrency return (Ciaian et al. 2021 b; Pagnotta 2021 ). The present paper studies these interdependencies between mining costs, mining rewards and blockchain immutability . We attempt to answer the following questions. T o what extent the cost of operating blockchain s is intrinsically linked to the cost of preventing attacks ? How closely interrelated are the digital ledger’s record -keeping security budgets (measured by mining rewards in a fiat currency nomination) of cryptocurrencies with the cryptocurrency market outcomes? We focus on the proof -of-work blockchain, which is a particularly interesting blockchain to study as the involved physical resource expenditures provide a distinct advantage in achieving consensus among distributed miners . Our results suggest that the cryptocurrenc y price and mining rewards are indeed intrinsically linked to blockchain securi ty outcomes , the elasticity of mining rewards being higher than that of mining costs with respect to the network security equilibrium. The previous literature has mostly studied b lockchain security concerns from a crypto -coin user perspective (see Lee 2019, for a survey). It has found that crypto -coin users value the underlying ledger security , they internalize and price the risk of a blockchain attack that could compromise the ability to e xchange crypto -coins for goods. Blockchain users who engage in on-chain transactions – only the on -chain transactions are secured by the mining rewards – value security measured by the amount of computational power committed to the blockchain ; ceteris pari bus they prefer more computing power being committed to the ledger. There is little empirical evidence , however, available in the literature about the i nterdependencies between mining costs, mining rewards and blockchain security . Moreover, there is confusion in the 4 literature that the blockchain security would be an embedded property of the underlying institutional governance’s technology . Our main contribution to the literature is formally establish ing a link between the probabili ty distribution over security outcomes depend ing permanently on the underlying distribution of cryptocurrency market outcomes and providing a supporting empirical evidence . The paper s most closely related to ours are from the theoretical literature on the blockchain mining and security (Iyidogan 2020 ; Pagnotta 202 1; Ciaian et al. 2021a ). In particular, our paper is related to the emerg ing literature on the economic properties and implications of blockchains (Abadi and Brunnermeier 2018 ; Budish 2018 ; Biais et al. 201 9). This literature studies coordination among miners in a blockchain -based system and show s that while the strategy of mining the longest chain is in fact an equilibrium, there are other equilibria in which the blockchain forks, as observed empirically. Whereas Abadi and Brunnermeier (2018 ) place most of the focus on coordination among users ; record -keepers' payo ffs are determined by users' actions, and a global games re finement of the game played among users puts more discipline on exactly how and when a fork may occur , in Biais et al. (2019) forks occur for several reasons and are interpreted as causing instability ; record -keepers' payo ffs when forking depend exogenously on the number of record -keepers who c hoose a given branch of the fork. Budish (2018) studies the costs of incentivizing honesty for cryptocurrency blockchains . Cong and He (201 9) focus mostly on the issue of how ledger transparency leads to a greater scope for collusion between users of the system. An alternative perspective studied in the literature is the collusion between the blockchain's record -keepers rather than between users , which show s that collusion can occur only when entry of record -keepers is constrained. Our results complement the findings of this emergent literature by quantifying how the probability distribution over security outcomes permanently depend s on the underlying distribution of cryptocurrency market outcomes . Due to the extremely high cryptocurrenc y volatility , also the PoW -blockchain security budget is exposed to high volatility and may result in a series of low-security equilibriums and high -security equilibriums. In contrast, t he physical resource cost to write on the blockchain – the cost of operating the PoW -blockchain – is only weakly cointegrated with the strength of the network security . This cointegration relation ship is geographically differenced – it is more significant for the world global mining leader China than for other world regions. The mining cost effect seems to trigger a downward pressure on the extensive margin of mining more in North America and Europe than in China, where the increasing intensive margin of mining more than offsets the negative effects on the network hash rate and hence the blockchain security. The ARDL estimates for the speed of adjustment of the PoW -blockchain security suggest that after temporary shocks to crypto markets any disequilibria is corrected and the security equilibrium revert s back to mean in the long -run. 5 The paper proceeds as follows. First, we provide a background literature overview about the PoW -blockchain (section 2). Second, we establish a theoretical relationship between the cost of proof -of-work, cryptocurrency market outcomes and blockchain security outcomes (section 3). Third, we estimate empirically the derived structural PoW -blockchain security relationships for crypto currencies that rely on application -specific integrated circuits (ASICs), such as Bitcoin . We use daily Bitcoin data for 2014 –2021 and employ an autoregressive distributed lag approach that allows treating all the relevant moments of the blockchain series as potentially endogenous (section s 4 and 5 ). To examine the extent to which this relationship is contingent upon exogenous price shocks, the role of the cryptocurrenc y mining reward and the proof -of- work cost for each of the respective moments is estimated after accounting for the information embedded i n the lags of the entire distribution of blockchain security outcomes . The main results are presented in section 6. They suggest that the cryptocurrenc y price , mining rewards and mining costs are intrinsically linked to blockchain security outcomes. The fi nal section concludes. 2 The record -keeping of digital transaction s 2.1 Blockchain and the proof -of-work Blockchain is a distributed alternative to centralized transaction -recording and record -keeping system s by enabling trustworthy interactions , recording transactions among non -trusting parties and storing interaction records . The underlying ledger that creates and stores records of transactions is a digital chain of blocks , where information is recorded sequentially in data structures known as ‘blocks ’ stored into a public database ('chain') . Being distributed, blockchain is run by a peer-to-peer network o f nodes (computers) who collectively adhere to an agreed distributed validation algorithm ( protocol ) to ensure the validity of transactions. A distributed network of anonymous record -keeping peers (miners) with free entry and exit is inherently ‘trustless’ and thus requires a trust -enhancing mechanism . To solve t he trust problem among non -trusting parties , miners are obliged to pay a cost (in form of computing power for blockchain ) to record transaction information and requiring that future record -keepers (miners) validate those reports. Under a well -functioning institutional governance technology, blockchain is immu table, me aning that once data have been recorded on the blockchain, it cannot be altered. The key preconditions for a well-functioning market are accuracy and security of transaction s and enforcing property rights and contracts. In traditional centralized institutional governance systems, usually , state or other type of centralized authority ( intermediary ) guarantees the transfers of ownership, ensures transfers of possession s, guarantees the security of property rights and contract enforcement. The honest behavior of the centralized intermediary is incentivized through monopoly rents. A comparative advantage of distributed institutional 6 governance systems such as blockchain is the ability to achieve and enforce a uniform view (agreement ) among non -trusting parties with divergent interests and incentives on the state of transactions in a cost -efficient and consensus -effective way. Blockchain security algorithms make it possible for distributed record -keepers to ensure that the network rules are being followed, i.e. all other record -keepers disregard any chain containing a block that does not conform to the network rules. The correctness and security is incentivized via physical resource costs : proof -of-work (PoW) makes it costly to extend invalid chains of blocks (Davidson, De Filippi and Potts 2016; Cong and He 201 9).2 Given it s cost-efficie ncy and consensus -effective ness advantages , blockchain’s potential applications go far beyond the creation of decentralized digital currencies, it can be used to achieve consensus of virtually any type of records or transactions, particularly of those related to property rights, transfer of property rights and contract execution (Davidson, De Filippi and Potts 2016). Blockchain technology has the potential to serve as an irreversible and tamper - proof public record repository for documents, contracts, properties, and assets as well as it can be used to embed and digitally store information and instructions with a wide range of applications. For instance, smart c ontracts (self -executing actions in the agreements between two or multiple parties), smart properties (digitally recorded ownership of tangible and intangible assets) or decentralized autonomous organizations (DAOs) (Atzori 201 7). Such a system might susta in various activities spanning from financial transactions, identity management, data sharing, medical recordkeeping, land registry up to supply chain management and smart contract execution and enforcement. Blockchains can also record obligations; distrib uted ledgers could be used in the fintech space to track consumers' transaction s and credit histories (e.g. Davidson, De Filippi and Potts 2016; Nascimento, Pólvora and Sousa -Lourenço 2018) . In the same time , ensuring a transaction correctness and security may be more cha llenging for distributed digital ledgers than for traditional centralized ledgers (Abadi and Brunnermeier 2018) .3 First, because digital goods are non-rival and non -excludab le, which unlike t raditional private goods do not prevent a double spending. Second, the security budget of distributed ledgers is endogenous and fluctuate s over time (in a fiat currency nomination – see Figure 1 ), implying that the underlying institutional governance technology may become vulnerable to attacks during cryptocurrency’s low -price low -security -budget periods. Hence, marinating the correctness and security of transaction s may become a challenge especially in periods of low security budget. Indeed , a number of cryptocurrency -blockchains with a comparably small 2 There are two main types of validation mechanism – proof -of-work (PoW) and proof -of stake (PoS) – with each having different incentive scheme in achieving consensus. This paper focuses on the PoW linked to Bitcoin which is the largest and most popular cry ptocurrency. 3 A strong security of information in the context of a distributed ledgers implies immutable records of transactions, including ownership rights and smart contracts. 7 security budget of preventing attacks have experienced successful majority (hash rate )4 attacks in recent years, e.g. Bitcoin Gold, Ethereum Classic.5 2.2 Blockchain mining The blockchain mining consists of nodes (called miners or record -keepers ) of a distributed network competing for the right to record sequentially information about new transactions to the digital ledger. In the case of PoW, miners have to solve a computationally challenging problem in order to record information and validate o thers' records on the ledger (in intervals of around ten minutes in Bitcoin ). Solving the computational problem (puzzle) is energy intensive and thus costly. First, miners have to invest in a computing capacity ; these costs are fixed and independent of the success rate. Second, miners have to incur variable costs, such as energy (and time) for the computationally -intense mining process, and rental expenses for the location of the mining equipment. On the revenue side, mining incentives are ensured via rewar ds for a correct and secure record keeping. The reward for every block is allocated to the miner that first solves the computational problem (hash function), by using guess and check algorithms based on the new and previous blocks of transactions. The winning miner broadcasts both the new block of transactions and the solution to the computational problem to the entire decentralized network; all other network participants “ express their acceptance of the [new] block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash ” (Nakamoto 2008). The miner's computing capacity is the main mining input, its performance is measured in a hash rate, which measures the speed at which a given mining machine o perates. Usually, the hash rate is expressed in hashes per second (h/s). For example, a mining machine operating at a speed of 100 hashes per second makes 100 guesses per second. Thus, the hash rate measures how much computing capacity blockchain is deploy ing to continuously solve the computational problem and generate/record blocks. Given that a mining computer has to make many guesses to solve the computational problem; higher hash rate allows a miner to have higher number of guesses per second, thus incr easing his/her chance to first solve the computational problem and receive the reward. The computational problem to be solved by miners adjusts endogenously, depending on the number of network participants and the aggregate blockchain computing capacity it is adjusted to become more difficult or less difficult. Bitcoin’s mining (hashing) difficulty algorithm is designed to adjust after every 2 016 blocks (approximately every 14 days) to maintain an 4 The hash rate measures the speed at which a given mining machine operates. The hash rate is expressed in hashes per second (h/s) (or number of guesses per second), which measures how much computer capacity a cryptocurrency network is devoted to solve the computational problem and generate/record blocks. 5 For example, Bitcoin Gol d, a hard fork of Bitcoin, was subject to several double -spending attacks in 2018 causing a price reduction (in USD) by around 40%. Similarly, Ethereum Classic also experienced a double -spend attack in 2019 and 2020 also leading to its price decrease. 8 interval of approximately 10 -minutes between blocks. When t he aggregate blockchain computing capacity increases, the computation problem difficulty adjusts upwards (i.e. the required hash rate to ‘mine’ a block increases), whereas in periods of a low mining network participation, it decreases. The adjustment in th e mining difficulty level is done for the purpose to compensate / counterbalance changes in the aggregate blockchain computing capacity employed by miners (Joudrey 2019; BitcoinWiki 20 21). The network hash rate also determines the security and stability o f the underlying blockchain institutional governance technology (Figure s 2 and 3 ). The physical resource cost to write on the PoW -blockchain – the cost of operating the blockchain – is intrinsically linked to the cost of preventing attacks.6 Higher hash rate implies stronger security, because any dishonest miner (attacker) would need to employ more resources ( computing capacity ) to attack the institutional governance technology of blockchain.7 In the context of creating and maintaining distributed ledgers of information, a strong security implies immutable records of transactions, including ownership rights and smart contracts. 2.3 Digital goods and decentralized ledgers vis -à-vis physical goods and centralized legers Correctness and security . The system security reflects the probability of an attack; security is paramount to any financial or non -financial network since transfers of ownership and enforcement of property rights require verifications, and it should be difficult for an at tacker to manipulate historical or/and new records. In a centralized system, a specific trusted agent assumes such responsibility. In blockchain, however, verification and updates to the system ledger rely on self -selected non -cooperating agents – miners. In cryptocurrencies such as Bitcoin, the reward to successful miners includes transaction fees and a predetermined number of newly minted bitcoins, which role is to incentivize miners to devote computing capacity for block validation and thus to provide th e system’s security. The probability of an attack is driven by the balance of a computing power between potential attackers and honest miners. Greater 6 For illustration purpose, an example of a majority attack and gain from double -spending as provided by Van Valkenburgh (2018) could look as follows: An attacking miner with the majority computing power compiles a secret (private) version of the Bitcoin bl ockchain. At the same time the attacking miner sends, for example, 100 Bitcoins to a Bitcoin exchange, sells them and sends the received money (dollars) to his/her bank account. This Bitcoin transaction is incorporated into the public blockchain run by hon est miners. The exchange observes the transaction on the public (honest) blockchain, thus assumes it has the 100 Bitcoins and initiates money transfer to the attacker’s bank account. However, the attacker does not send the 100 Bitcoins to the exchange in h is/her own secret blockchain version. Once the attacker receives the money to his/her bank account, the private version of the Bitcoin blockchain can be broadcasted to the network. Because the attacker has more computing power than the rest of the network combined, the attacker private chain will be longer (more cryptographic problems solved) and the rest of the network will recognize this new blockchain as the valid one. According to the new reorganized chain, the exchange that accepted the 100 Bitcoins fo r money no longer has those 100 Bitcoins as well as it lost their dollar value of Bitcoins which were sent to the attacker bank account. In contrast, the attacker has both the 100 Bitcoins and the dollar value of 100 Bitcoins (Van Valkenburgh 2018). 7 Different types of blockchain attacks include selfish mining, the 51% attack, Domain Name System (DNS) attacks, distributed denial -of-service (DDoS) attacks, consensus delay (due to selfish behavior or distributed denial -of-service attacks), blockchain forks, orphaned and stale blocks, block ingestion, smart contract attacks, and privacy attacks. 9 number of (honest) miners and more computing capacity imply smaller probability of a successful attack (F igure 2). Compared to traditional centralized ledgers, ensuring a transaction correctness and security may be more challenging for distributed digital ledgers like Bitcoin, because digital goods are non-rivalry and non -excludability which compared to tradi tional private goods do not prevent a double spending, and the security budget of distributed ledgers is endogenous and fluctuates over time (i.e. if the value mining rewards changes in a fiat currency nomination). Miners react to expected profit incentive s by adjusting their computing capacity. For example, low expectations of a cryptocurrencies price would induce reducing computing capacity devoted to mining, thus rendering the network more vulnerable and potentially further magnifying the cryptocurrency’ s price decrease. Due to miners’ rational responses, the realization of pessimistic cryptocurrency’s market outcomes also implies that a cryptocurrency’s security can severely worsen resulting in a low -security equilibrium and lowering the network’s life expectancy as measured by the average time until a successful attack (Pagnotta 202 1). Double -spending attacks are one of the largest security concerns among blockchain users. Cryptocurrencies that have a relatively small security budget of preventing attack s have experienced a number of successful majority hash rate attacks in recent years. For example, Bitcoin Gold, a hard fork of Bitcoin, experienced a sequence of double -spending attacks in May 2018. Its price measured in USD at the end of that month was 4 0% lower. Ethereum Classic also experienced a double -spend attack and several deep block reorganizations, following a 50% decline in its price and hash rate in January 2019. Double -spending attack is also possible when the blockchain in question handles as sets other than currency. For example, a financial institution that loses money on a trade may wish to reverse the history of transactions including that trade. Competition and costs. Blockchain differs from centralized legers (e.g. notary offices, cadastr al offices, banks) along several dimensions of the market structure, competition being one of them. Typically, centralized ledgers are managed by monopolists (e.g. central banks) that extract distortionary rents from the ledger's users, because the entry i s not free and switching between legers is costly for users. Traditional centralized record -keeping systems provide incentives to record honestly by monopoly profits and the fear to lose the future monopoly rents (Abadi and Brunnermeier 2018). In contrast, distributed record -keeping system allow for competition: there is a free entry (every miner can write on the ledger, subject to network rules) and switching between ledgers (e.g. ‘forks’) is costless for users.8 The blockchain market structure with free entry and fork competition eliminates the rents that a monopolist would extract in an identical market and eliminates the inefficiencies arising from switching costs in 8 For example, a hard fork preserves all of the data in the parent blockchain: e.g. Bitcoin Gold and Bitcoin Cash in the case of hard forks of Bitcoin. 10 centralized record -keeping systems (Huberman, Leshno, and Moallemi 201 9). There is also competition between a potential attacker and all honest miners. Incentives to record honestly – that are provided through the imposition of a physical resource cost to write on the blockchain – make it costly for a potential attacker to distort the ledger . Free entry and competition ensure that distributed ledgers can be more efficient and transactions less costly than centralized ledgers. Blockchain miners can enter freely, meaning that any agent who wishes to write on the ledger may do so by following a n agreed set of rules. However, free entry of anonymous record -keepers is ‘trustless’ and thus requires a trust - enhancing mechanism. Public blockchains typically solve the trust problem by forcing record - keepers to pay a physical resource cost to record in formation and requiring that future record - keepers validate those reports. In the case of the proof -of-work (PoW), miners have to solve a computationally challenging problem in order to record information and validate others' reports. The physical resource cost to write on the blockchain is the main the cost of operating a blockchain. Compared to distortionary rents of centralized ledgers, in distributed blockchain - based record -keeping systems, welfare losses stem mainly from the waste of computational resources, computing and electricity costs of mining. Enforcing the execution of transactions by a cryptographic code ensures a significant reduction of transaction costs. According to Huberman, Leshno, and Moallemi (201 9), the physical resource costs of compe ting non - cooperating miners are significantly lower than monopoly rents of centralized ledgers. Hence, an important cost advantage of the blockchain technology compared to centralized record - keeping systems consists of avoiding centralized intermediaries (e.g. a notary, cadastral office, banks) and the associated rents. Network externalities. Digital distributed ledgers such as blockchain are subject to network externalities, which are not present under centralized ledgers. When miners engage in the minin g of blockchains, both positive and negative network externalities related to the blockchain security emerge . The positive network externality suggests higher blockchain security as the number of miners increases , because each additional node strengthens the chain’s security, by making it more difficult for any individual miner to launch an attack or to guess who will be the winning miner (Waelbroeck 2018). The negative network externality occurs because each individual miner invests in the mining -computing power, which increases both the individual miner’s marginal income though al so mining costs, as the difficulty of the computational problem increases in the number of miners and their computing power (“hash - power”). Subsequently , higher difficulty of mining reduces the incentives for mining and increases the concentration of mining activities, as miners are l earning by mining , resulting in reduc ed blockchain security (Parra -Moyano, Reich and Schmedders 2019). When many small miners enter the blockchain network, likely, the positive network externality will dominate and the blockchain security outcomes will be superior compared to a highly skewed distribution of 11 computing power across miners (few mining pools having a large share of the total network hash rate). Individual non -cooperating agents do not internalize these network externalities when making their optimal decisions. Blockchain users (agents who engage in transactions) take the price and security levels as given and, unlike the central planner, do not internalize the impact of their decisions on mining costs. Similarly, miners do not internalize the effect of their hash rate choice on the blockchain security. For equilibria that display high security levels, given the decreasing security gains f rom a mining investment, the part that miners fail to internalize is decreasing. In contrast, the part that blockchain users fail to internalize is not decreasing, because marginal mining costs are not decreasing (Pagnotta 202 1). Fourth, being a distribute d institutional governance technology for creating and maintaining distributed ledgers of information, it is different from a centralized institutional governance. According to Davidson, De Filippi and Potts (2016), blockchain provides a new “institutional technology” or a “governance technology”. “[Blockchain can be understood] as a revolution (or evolution) in institutions, organization and governance ” (Davidson, De Filippi and Potts 2016). Compared to traditional centralized intermediaries, digital rules are enforced by a distributed network of interconnected non -trusting parties. Trustworthily interactions between non-trusting parties are executed and recorded on a distributed network by eliminating the need for a centralized intermediary. A consensus mechanism ensures that the true history is recorded on the ledger, rejecting fraudulent records. The build -in validation processes in the PoW consensus algorithm and the use of cryptographic signatures and hashes ensures the network governance, disincentivizes dishonest nodes to insert fake or malformed transactions in the blockchain, and ensures the trustworthiness of transactions among no n-trusting parties on blockchain. The computationally established trustworthiness of the institutional governance technology ensures accuracy in establishing, delineating and protecting ownership rights (i.e. it allows owners to exercise ownership rights i n terms of use, transfer, or exploitation of assets); it can execute and enforce contracts (through smart contracts); and it can encompass various types of organizations through DAOs (e.g. firms, venture capital funding, non -profit organization). Followin g North (1990), institutions are “ the rules of the game in a society ” and includes both formal rules such as laws and informal constraints such as “ codes of conduct, norms of behavior, and conventions ”. Formal rules are enforced by state, while informal ru les are enforced by the members of the relevant group (North 1990; Kingston and Caballero 2009; Greif and Kingston 2011). According to Hodgson (2006) “ institutions are systems of established and embedded social rules that structure social interaction s”. Fr om this point of view, blockchain is a type of distributed (informal) institution with digitally embedded rules of the game – defined within the validation algorithm and enforced through a decentralized 12 network of participants – that structure digitally re corded interactions between agents. According to Davidson, De Filippi and Potts (2016) “[blockchain is] an ‘institutional technology’, a governance technology for making catallaxies, or rule -governed economic orders. Blockchains thus compete with firms, ma rkets and economies, as institutional alternatives for coordinating the economic actions of groups of people, and may be more or less efficient depending upon a range of conditions (behavioural, cultural, technological, environmental, etc). ” Fifth, signifi cant changes in the global technological development (e.g. new/faster technologies become available) or macroeconomic environment, require adjustments in the institutional governance – either by a central authority or endogenously. Technological changes un derlying digital institutional governance systems are considerably faster compared to traditional institutional governance systems. In traditional centralized record -keeping systems, the frequency of important technological changes and the required institu tional governance adjustments is low; the key role in adjusting institutions to changes in the external environment plays the centralized intermediary . In digital self -enforcing record -keeping systems, the frequency of technological changes and the require d institutional governance adjustments is high; the institutional governance is adjusted endogenously. For example, the blockchain network governance employs the PoW consensus algorithm and uses cryptographic signatures and hashes. The institutional govern ance technology of Blockchain is frequently adjusted (every 14 days) to changes in the technological development (e.g. growth of the mining processor computing speed) or macroeconomic environment (e.g. significant increase in the cryptocurrency’s value and hence mining rewards in a fiat currency denomination) by adjusting mining incentives for the network record -keepers (Dollar and Kraay 2003; Hodgson 200 6; Glaeser et al. 2004; Kingston and Caballero 2009; Greif and Kingston 2011). Blockchain provides a particularly interesting case to study, as the institutional governance system (i.e. the security of the enforcement of property rights and contracts) is determined endogenously by the underlying governance technology . Whereas t raditional centralized institutional governance systems often are path-dependent and face many impediments to bring about evolutionary developments (e.g. interest group pressure, bargaining and political conflict between interest groups) which makes them less sensitive to economic changes (North 1990; Kingston and Caballero 2 009; Greif and Kingston 2011) , the flexibility in institutional adjustment of digital distributed ledgers allow them to adopt and accommodate changing market conditions such as integrating and stimulating the growth of new technologies and "non -tangible" i nnovations . Institutional rigidity (neutrality) could be desirable in certain situations particularly when underlying factors (e.g. economic crisis, political crisis, civil conflicts, wars) pressure towards lower -quality institutions , but not in others ( uni-directional institutional change towards its improvement is desirable, not vice versa ). Hence , it is important 13 to understand the interdependencies between mining costs, mining rewards and blockchain security . 3 Conceptual Framework 3.1 The model We want to determine theoretically the equilibrium relationship s between blockchain security, cryptocurrency market outcomes and resources devoted to the blockchain mining . Building on the mining model s of Thum (2018) and Budish (2018) and considering the PoW of the most popular cryptocurrenc ies as example , we model a rational miner i that decid es on the quantity of computing capacity , mit (e.g. expressed by the number of computer operations) , to devote for mining each block t (represented in block time measured in 10 minute interval which is the average time needed to mine a block in blockchain ). The mining output is measured in capacity of blockchain security units. The probability of miner i winning the contest (i.e. the right to generate a new block and collect reward) depends on his/her computing capacity devoted for each block relative to the computing capacity of other miners . Previous studies assume that the probability of winning the contest and validating a block is independent of the miner size: 𝑚𝑖𝑡/(𝑚𝑖𝑡+∑ 𝑚𝑗𝑡𝑛𝑡 𝑗≠𝑖), where nt is the total number of miners and ∑ 𝑚𝑗𝑡𝑛𝑡 𝑗≠𝑖 is the total blockchain computing capacity of other miners devoted to the block t (e.g. Cocco and Marchesi 2016; Thum 2018) . However, Parra - Moyano , Reich and Schmedders (2019) show that the probability of relatively bigger miners winning the mining contest is higher than that of relatively smaller miners because t here is a “learning" effect when mining a particular block with larger mining computers learn ing faster than smaller mining computers . To account for the learning by mining , we assume the following transformation of the probability for a miner winning a block : 𝑒𝑚𝑖𝑡𝛾 /(𝑒𝑚𝑖𝑡𝛾 +∑ 𝑒𝑚𝑗𝑡𝛾𝑛𝑡 𝑗≠𝑖), where 𝛾 is a transformation parameter (with 0<𝛾≤0), which implies that the ratio of odds between big and small miners (mining computers ) of winning a block increases with the miner s’ size, mit, while keeping the ratio of miner ’ size between miners fixed . The purchase price of one unit of a computer equipment of a given efficiency, 𝜀, is denoted by 𝑞𝑡. The successful miner receives rew ard ptRt, where Rt is cryptocurrency quantity and pt is the cryptocurrency price per one unit expressed in monetary values (e.g. US dollar). Miner i chooses computing capacity , mit, for a given computer efficiency, 𝜀, so that to maximize the present discounted value of the flow of profits over the infinite time horizon : (1) 𝜋𝑖=∑(1 1+𝜌)𝑡 (𝑒𝑚𝑖𝑡𝛾 𝑒𝑚𝑖𝑡𝛾 +∑ 𝑒𝑚𝑗𝑡𝛾𝑛𝑡 𝑗≠𝑖𝐸(𝑝𝑡)𝑅𝑡−𝑐𝑡𝑚𝑖𝑡−𝑞𝑡𝐼𝑖𝑡)−𝐹 𝑡 Subject to 𝑚𝑖𝑡+1 units of computing capacity : 14 (2) 𝑚𝑖𝑡+1=(1−𝛿)𝑚𝑖𝑡+𝐼𝑖𝑡 where ct denotes variable costs per computer operation (e.g. energy cost), E(pt) is the expected cryptocurrency price , 𝛿 is depreciation rate, 𝐼𝑖𝑡 is investment in computer equipment , F are one-time fixed costs (e.g. building – see Garratt and van Oordt 2020 ), and 𝜌 is a discount rate for time preference . Deviations from the expected price are random shocks, ν, with an expected value of zero: E(pt) = pt*, where pt = pt* + ν. We assume a rational price expectation framework of Muth (1961) in which miners base their cryptocurrency price formation on all the available information at the time when making their decision s on the investment in mi. Miners are identical, risk -neutral, non -cooperative and profit -driven agents that invest accor ding to the anticipated real value of block rewards. Maximi zing miner i’s profits for the given blockchain computing capacity of all other miners yields the following o ptimal conditions : (3) −𝑞𝑡+1 1+𝜌𝜆𝑡+1=0 (4) 𝛾𝑚𝑖𝑡𝛾−1𝑒𝑚𝑖𝑡𝛾 ∑ 𝑒𝑚𝑗𝑡𝛾𝑛𝑡 𝑗≠𝑖 (𝑒𝑚𝑖𝑡𝛾 +∑ 𝑒𝑚𝑗𝑡𝛾𝑛𝑡 𝑗≠𝑖)2𝐸(𝑝𝑡)𝑅𝑡−𝑐𝑡+1 1+𝜌(1−𝛿)𝜆𝑡+1=𝜆𝑡 (5) 𝑚𝑖𝑡+1=(1−𝛿)𝑚𝑖𝑡+𝐼𝑖𝑡 where 𝜆𝑡 is a shadow price for a unit of computer resources . Assuming a steady state equilibrium with 𝑚𝑖𝑡=𝑚𝑖𝑙, 𝑅𝑡=𝑅𝑙, 𝐸(𝑝𝑡)=𝐸(𝑝𝑙), 𝑞𝑡=𝑞𝑙, and 𝑛𝑡=𝑛𝑙 for 𝑡≠𝑙 and a symmetric equilibrium with mit = mjl, the equilibrium computing capacity per miner can be derived from equations (3) to (5) as follows: (6) 𝑚𝑡=[𝛾(𝑛𝑡−1) 𝑛𝑡2𝐸(𝑝𝑡)𝑅𝑡 𝑐𝑡+(𝜌+𝛿)𝑞𝑡]1 1−𝛾 Rewriting equation (6) in terms of the total blockchain computing capacity devoted to mining, 𝑛𝑡𝑚𝑡∗, yields the mining equilibrium : (7) 𝑛𝑡𝑚𝑡=(1 𝑛𝑡)1+𝛾 1−𝛾[𝛾(𝑛𝑡−1)𝐸(𝑝𝑡)𝑅𝑡 𝑐𝑡+(𝜌+𝛿)𝑞𝑡]1 1−𝛾 Equation (7) implies that the total blockchain computing capacity increases in the relative gain from mining, 𝐸(𝑝𝑡)𝑅𝑡/(𝑐𝑡+(𝜌+𝛿)𝑞). The mining equilibrium implies that the blockchain computing capacity devoted to mining fluctuates with the cryptocurrency price. This model feature reflects the intuition that, ceteris paribus, higher nominal reward or higher cryptocurrency price induces miners to invest in more computing capacity . The opposite is true when agents anticipate the value of cryptocurrency to be low, miners have little incentive to invest in computational resources, and the security of the network is low. Second , the mining equilibrium (7) implies that the total blockchain computing capacity increases at a decreasing rate in the level (intensity) of competition, (𝑛𝑡−1)/𝑛𝑡2. 15 Third, equation (7) implies that miners have incentives to revert to the equilibrium level of the blockchain computing capacity as a response to cryptocurrency price shocks because otherwise miners would experience losses. We follow Abadi and Brunnermeier (2018) and assume a free entry equilibrium where miners enter until profits are driven to zero. In the blockchain system, miners don’t compete in prices but in capacity, similar to Cournot -type firms. An increase in the processing power of competing miners results in the expansion of the total blockchain computing capacity . In the presence of network externalities, free entry of miners serves to pin down the strength of the security. Using equations (5) and (6), it is possible to derive the equilibrium number of miners, nt, depending on mining return s, variable costs , fixed costs and the level (intensity) of competition, (𝑛𝑡−1)/𝑛𝑡2: (8) 𝑛𝑡=𝐸(𝑝𝑡)𝑅𝑡/(𝜌𝐹+(𝑐𝑡+𝛿𝑞𝑡)[𝛾(𝑛𝑡−1) 𝑛𝑡2𝐸(𝑝)𝑅 𝑐𝑡+(𝜌+𝛿)𝑞𝑡]1 1−𝛾) Fixed costs are related to credit constraint and rigi dities to increase capacity related to financing the entry costs into the mining . Equations (3) to (7) define the equilibrium behavior of honest miners by pinning down the level of computer resources they would allocate for mining at a given level of reward and competition from other miners. The total blockchain computing capacity devoted to the blockchain mining, 𝑛𝑡𝑚𝑡, determines the security of blockchain . As discussed above, the more challenging is the computational mining puzzle to solve, the safer and more stable is the institutional governance technology because it becomes more costly for a potentially dishonest miner to conduct an attack. Such an attack may adversely affect the perception of cryptocurrency by its users reducing their trust and hence valuation of the cryptocurrency . If the reduction of the trust is large , it may cause a collapse in the economic value (price) of cryptocurrency . As equation (7) implies, the blockchain computing capacity for mining and hence the hash rate of the network would reduce , which might eventually lead to a collapse of blockchain. Thus, the security of the PoW blockchain depend s on the size of mining reward received by miners which also determines the total blockchain computing capacity determined in equation (7). 3.2 Blockchain security and a ttacks The probability of a (successful) attack on blockchain is reflected in the underlying ledger’s security , it is inversely related the blockchain ’s security budget. This probability is driven by the balance of computing power between an attacker and honest miners. As noted by BitcoinWiki (20 21), “Bitcoin's security model relies on no single coalition of miners 16 controlling more than half the mining intensity ”.9 A miner who controls more than 50% of the total blockchain computing capacity could exercise attack on blockchain that involves the addition of blocks that are somehow invalid or reverse previous accepted transactions (“majority attack” ). Either the blocks contain outright fraudulent transactions, or they are added somewhere other than the end of the longest valid chain. A successful majority attacker could prevent (for the time that the attacker controls mining) confirmation of new transactions (e.g. by producing empty blocks) and rev erse own transactions which potentially allows double - spending thus affecting all transactions that share the history with reversed transactions (BitcoinWiki 20 21). In our model, to control a majority power, equation (7) implies that an attacker must control more than 50% of the total blockchain computing capacity , 𝐴𝑛𝑡𝑚𝑡, where A > 1. If we assume that the attack takes the duration equal to s block time, then the attacker’s costs10 are 𝑠𝐴(𝑐𝑛𝑡𝑚𝑡+𝑞𝑡𝑛𝑡𝐼𝑡)−(1−𝜃)𝑞𝑛𝑡𝑚𝑡 and the mining reward during the attack is sptRt, where 𝜃 (0≤𝜃≤1) represents the proportion of the mining technology , mt, that can be recovered (reused, resoled, repurposed) after the attack .11 The first term of the attacker’s costs, 𝑠𝐴(𝑐𝑡𝑛𝑡𝑚𝑡+𝑞𝑛𝑡𝐼𝑡), includes energy and investment co sts, while the second term, (1− 𝜃)𝑞𝑛𝑡𝑚𝑡, represents the loss related to the part of mining technology that cannot be recovered after the attack. To des -incentivize and deter attacks on blockchain , the cost of an attack must be greater than the potential gain from an attack. Using the optimal condition (5), this implies the following incentive compatibility condition for blockchain against attack s: (9) 𝑠𝐴𝑛 𝑚∗[(𝑐𝑡+𝑞𝑡𝛿)−(1−𝜃)𝑞𝑡]≥(1−∆)𝑠𝐸(𝑝𝑡)𝑅𝑡+𝑉𝐴(∆) where ∆ (0≤∆ ≤1) is the proportional decrease in the price of cryptocurrency after the attack and VA is the expected payoff of the attack which is dependent on ∆ and is equal to the sum of gains, 𝑉𝑡(∆), obtained over the duration of attack s with 𝑉𝐴(∆)=∑𝑉𝑡(∆)𝑠 .12 The payoff from the attack, VA, can represent the gain from a cryptocurrency double -spending or other type of gains (e.g. gain from a short sale of cryptocurrency , gain in cryptocurrency future markets from price fluctuation caused by the attack). Using equation (6), the incentive compatibility condition (9) can be rewritten as: 9 Although Bit coin has not suffered from a majority attack, a number of Altcoins were subject to successful attacks in the past. For example, this was the case of the Bitcoin hard fork (Bitcoin Gold) in May 2018 (stealing $18 million worth of Bitcoin and other cryptos ) , Ethereum Classic (ETC) in January 2019 (double spending to over 200,000 ETC worth around $1.1 million), and Verge (XVG) was attacked several times in 2018 (with the biggest attack extracting about 35 million of XVG) (ViewNodes 2019). 10 According to Crypt o51 (202 1), the theoretical cost of a 51% attack on Bitcoin is $ 413,908 per one hour. 11 Note that if Bitcoin does not collapse after the attack, the mining equipment can be reused in continuing mining Bitcoin. 12 Note that in the steady state situation as sumed in the incentive compatibility condition (9), implies that the discount rate ρ cancels out with 𝑉𝑡(∆)=𝑉𝑙(∆) for 𝑡≠𝑙. 17 (10) {[𝐸(𝑝𝑡)𝑅𝑡]𝛾 1−𝛾−(1−∆) 𝛽}𝑠𝐸(𝑝𝑡)𝑅𝑡≥𝑉𝐴(∆) 𝛽 where 𝛽=𝐴𝑛𝑡[(𝑐𝑡+𝑞𝛿)−(1−𝜃)𝑞][𝛾(𝑛𝑡−1) 𝑛𝑡21 𝑐𝑡+(𝜌+𝛿)𝑞𝑡]1 1−𝛾 Consider an attack where the only gain, VA, is double spending . The attacker acquires 𝑋 units of crypto coins which (s)he double spends during the attack by exchanging them for the standard fiat currency . This implies that the gain from attack is 𝑉𝐴(∆)=𝐸(𝑝𝑡)𝑋−∆𝐸(𝑝𝑡)𝑋. After the attack , the attacker keeps the value of (double spent) X cryptocurrency in the standard fiat currency, 𝐸(𝑝𝑡)𝑋, but lose s partially or fully (value of ) cryptocurrency acquired for the attack, ∆𝐸(𝑝𝑡)𝑋. If ∆ is sufficiently small (i.e. cryptocurrency does not collapse after the attack), then the system is vulnerable to the double -spending attack. However, if ∆=1 there is no gain from double -spending attack because the double spending attacker loses exactly as much value as (s)he gains from double spen ding. That is, 𝑉𝐴(∆)=0 and equation (10) collapses to [(𝛾(𝑛𝑡−1)/𝑛𝑡2)(𝐸(𝑝𝑡)𝑅𝑡/𝑐𝑡+(𝜌+𝛿)𝑞𝑡)]1/(1−𝛾)=𝑚𝑡≥0. If ∆ is sufficiently large, then the attack can sabotage the blockchain and lead to its complete collapse if ∆=1. In this case , the motivation of the attacker may be other than the gain (profit) from double spending (e.g. adversary power interested to damage the cryptocurrency which could include a competing centralized intermediary , a competing cryptocurrency, or other entity) (Budish 2018) . In line with Abadi and Brunnermeier (2018); Budish (2018) , equation (10) implies that the equilibrium block reward to miners must be sufficiently large relative to the one -off gain fr om the attack. Given that the gain from the attack, 𝑉𝐴(∆), is unknown (e.g. in the case of the double spending attack , X an thus 𝑉𝐴(∆)=𝐸(𝑝𝑡)𝑋−∆𝐸(𝑝𝑡)𝑋 could be large for ∆<1) and its value might be substantial , the equilibrium mining intensity need s to be larger than the one implied by equation (7) in order to deter an attack . This is induced by the fact that the payoff from the blockchain attack, VA, does not affect the economic behavior (incentives ) of honest miners in allocat ing their computing capacity for mining (i.e. VA does not enter in equation (7)). 3.3 Testable hypotheses From equations (7) -(10), we can derive three empirically testable hypotheses: • Mining reward h ypothesis : Security outcomes of the PoW -blockchain and the cryptocurrency price. When agents anticipate the value of cryptocurrency to be low, miners have little incentive to invest in computational resources, and the security of the network is low. The opposite is true when agents anticipate the value of cryptocurrency to be high. Ceteris paribus , the blockchain security is sensitive (elastic) to the mining reward. • Mining cost h ypothesis : The physical resource cost to write on the PoW -blockchain is intrinsically linked to the cost of preventing attacks; the security of blockchain is 18 structurally linked to the ledger’s security budget and mining costs . Ceteris paribus, the blockchain security is sensitive (elastic) to mining costs. • Mean -reverting hypothesis : The mean -reverting behavior of the PoW -blockchain security implies that temporary cryptocurrency price shocks and mining cost shocks do not affect the long -run blockchain security. Ceteris paribus, the PoW -blockchain security reverts back to mean in the long -run. 4 Estimation strategy 4.1 Empirical PoW blockchain security model The theoretical analysis established interdependencies between blockchain security, cryptocurrency market outcomes and resources devoted to the blockchain mining. Equation (7) implies that the security ( measured by the allocated computing capacity ) of the PoW - blockchain depend s on mining rewards, the intensity of miners’ competition, mining costs, discount rate and the computer equipment cost-efficiency. In this section , we assess empirically the interdependencies between mining costs, mining rewards and the PoW -blockchain security outcomes on cryptocurrency market outcomes and mining resources. For the sake of tractability, i t is useful to apply a logarithmic transformation to equation (7), which yields the following equilibrium relationship : (11) 𝑦𝑡=𝑏0+𝛽𝑥𝑡+𝑢𝑡 where y represents the dependent variable – the PoW blockchain security ( computing capacity devoted to mining), 𝛽 is a vector of coefficients to be estimated, x is a vector of explanatory covariates – mining reward s, 𝑝𝑡𝑅𝑡, the number of miners, 𝑛𝑡, the intensity of miners’ competition, (𝑛𝑡−1)𝑛𝑡2⁄, the cost of mining (including the discount rate ), 𝑐𝑡+(𝜌+𝛿)𝑞𝑡 and the com puter equipment efficiency, 𝜀𝑡, and 𝑢𝑡 is an error term . The expected signs of coefficients for the mining reward and the intensity of miners’ competition in equation (11) are expected to be positive ( number of miners and mining reward effects in Figure 2). The sign of coefficient associated with the cost of mining (energy costs and discount rate) is expected to be negative (mining cost effect in Figure 3). The computer equipment cost-efficiency coefficient is expected to have a positive relationship with the blockchain computing capacity , because everything else constant, higher computing efficiency implies that less energy is needed to achieve a certain computing hash rate. Our primary interest is on coeff icients associated with the mining reward and the cost of mining : the first coefficient measure s the elasticity of the PoW -blockchain security (mining network hash rate) with respect to the mining reward ( Mining reward hypothesis ) and the second one with t he mining costs (Mining cost hypothesis ). They reflect the level of endogeneity of the security of the PoW - blockchain with respect to cryptocurrency market outcomes. 19 4.2 Estimation issues The estimation of interdependencies between mining costs, mining rewards and blockchain security determined in equation (11) is subject to several econometric issues. The first aspect to consider is the problem of endogeneity. The endogeneity issue is particularly relevant for distributed digital ledger series , as the security outcomes of the PoW -blockchain can be determined con currently with the cryptocurrency mining reward . For example, when distributed agents anticipate the value of cryptocurrency to be low, miners are not motivated to invest in computational resources, and the security of the blockchain would be low. In that case, crypto -coin users do not wish to accumulate large real balances, and the resulting market valuation for cryptocurrency would be low. The opposite would be true if the value of cryptocurrency is expected to be high. To address the endogeneity problem , we rely on the Autoregressive Distributed Lag (ARDL) methodology that is being increasingly used for studying cryptocurrencies (e.g. Bouoiyour and Selmi 2015) and financial markets more generally (e.g. Stoian and Iorgulescu 2020) . The ARDL bounds testing approach developed by Pesaran and Shin (1999 ) is particularly appropriate for estimat ion of the blockchain security equilibrium relationship (11) as it enables to model the long - and short -run relationships simultaneously and has several ad vantages over the standard cointegration methods . A key advantage for our analysis is that t he ARDL approach allows treating all the relevant moments of blockchain series as potentially endogenous. As noted by Pesaran and Shin (1999, p. 16), t he use of ARDL is well suitable to address the endogeneity problem : ‘‘appropriate modification of the orders of the ARDL model is sufficient to simultaneously correct for residual serial correlation and the problem of endogenous regressors ’’. In the contex t of cryptocurrencies , another important advantage is that the ARDL approach permits different number of lags for each series. Contrary to other cointegration techniques (see Engle and Granger, 1987; Phillips and Ouliaris, 1990 ; Johansen, 1991) , the ARDL methodology does not require testing for the order of integration ; it can be applied irrespective of whether the regressors are purely I(0), purely I(1) or mutually cointegrated variables (Pesaran et al., 2001). However, as point ed out by Ouattara (2004) , if I(2) variables are present in the data, the computed F statistics of Pesaran et al. (2001) become invalid. To make sure that none of the variables is integrated of order I(2) or beyond, we investigate the integration status of the series by using the augmented Dickey –Fuller (ADF) test, the Dickey –Fuller GLS test (DF -GLS) and Phillips –Perron (PP) test. In order to find the appropriate number of lags for the series we follow the Akaike Information Criterion. Accordingly, the role of the cryptocurrency mining reward and the proof -of-work cost for each of the respective moments can be estimated after accounting for the information embedded in the lags of the entire distribution of blockchain security outcomes. 20 Second, t here is also a potential errors -in-variables problem because part of the series is obtained from primary non -harmonized data sources and it is not straightforward to judge the reliability of these series . This concerns mainly the series that are not recorded on blockchain, (e.g. mining cost data). Indeed, the mining unit cost s time series for different world regions are collected by using different sampling methodologies and different weights. These issues can be partially addressed by first differen cing the data . Nevertheless , part of potential errors - in-variables issues remain. To address the remaining potential errors -in-variables , we create alternative proxies for the dependent variable – blockchain security – and key explanatory variable s – mining competition – and estimate these otherwise identical mining models for robustness . The robustness check s results d o not indicate any abnormal deviations in the estimated coefficients when cointegrating alternative proxies for the critical series. 4.3 Econometric strategy The ARDL procedure involves two steps. First, we check for the existence of a long -run relationship by comparing the calculated F -statistic with the critical value tabulated by Pesaran et al. (2001). We begin with t he general form of an ARDL( p, q) model: (12) 𝑦𝑡=𝑏0+∑ 𝜙𝑦𝑡−1+∑ 𝛽𝑖𝑥𝑡−1+𝑢𝑡𝑞 𝑖=0𝑝 𝑖=1 where y represents the dependent variable – security ( computing capacity ) of mining , x is a vector of independent variables – mining rewards, intensity of miners’ competition, energy costs, discount rate and the com puter equipment efficiency, b0 is the intercept, p is the number of optimal lags of the dependent variable and q represent the number of optimal lags of each explanatory variable. Pesaran et al. (2001) proposed two types of critical values for a given significance level . The first type assumes that all variables in the model are I(1), whereas the second one assum es that all series are I(0). If the computed F statistic is below the lower bound, the null hypothesis of no long-run relationship fails to be rejected . In such case , an ARDL model in first differences without an error correction term should be estimated. If the F-statistic lies between the two bounds, the result is inconclusive. And finally, i f the computed F-statistic exceeds the upper bound, the null hypothesis of no cointegration is rejected . In this case , the error correction model to be estimated is: (13) ∆𝑦𝑡=𝑏0+𝛼(𝑦𝑡−1−𝜃𝑥𝑡)+∑ 𝜓𝑦𝑖∆𝑦𝑡−𝑖+𝑝−1 𝑖=1∑ 𝜓𝑥𝑖∆𝑥𝑡−𝑖+𝑢𝑡𝑞−1 𝑖=0 where θ represent the long-run coefficients, ∆ is the first difference operator , ψ are short -run multipliers and α shows the speed of adjustment of the dependent variable to a short -term shock. It measures how quickly the blockchain security adjusts to deviations from the equilibrium ( Mean -reverting hypothesis ). 21 4.4 Specification tests Following the standard approach in the literature ( Pesaran et al. 2001 ), we apply a set of diagnostic tests, as the validity of ARDL results is based on the assumption of normally distributed error terms, no serial correlation, heteroscedasticity and stability of the coefficients. The empirically estimable model specification s and the number of lags is determined based on the results from diagnostic tests , i.e. Breusch -Godfrey LM test and Durbin’s alternative test for autocorrelation, Breusch -Pagan/Cook -Weisberg test for heteroscedasticity, normality testing and cumulative sum test for the parameter stability. 5 Data In empirical estimations, we use Bitcoin daily data for the period 27/12/2014 – 10/01/2021. The details of data series used in estimations and their sources are reported in Table 1. All time- series are transformed in a log -form in the estimations, implying that the estimated coefficients can be interpreted as elasticities. Table 2 provides a descriptive statistic of the data used. The construction of dependent and explanatory variables is explained in the following. Our principal data source is blockchair.com that contains records for the entire Bitcoin mining history starting from 2009 until latest transactions in 2021 . For each b lock successfully mined, blockchair.com contains 36 block -specific characteristics: block_id, hash, time, median_time, size, stripped_size, weight, version, version_hex, version_bits, merkle_root, nonce, bits, difficulty, chainwork, coinbase_data_hex, tran saction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu, fee_per_kwu_usd, cdd_total, generation, generation_usd, reward, reward _usd, miner. We aggregate single blocks into daily mining output, to align with the rest of the data. 5.1 Dependent variable The dependent variable is the PoW -blockchain security. According to the theoretical model, the ledger security reflects the probability of an attack ; a high security implies that it should be difficult for an attacker to manipulate historical or/and new records. The probability of an attack is determined by the balance of the computing power between poten tial attackers and honest miners. More (honest) miners and higher computing capacity imply smaller probability of a successful attack (Figure 2). In the empirical analysis, we measu re the blockchain computing capacity devoted to mining by hash rate , it is expressed in average daily hashes per second. According to CoinMetrics, there are several drawbacks with the hash rate index.13 The most important one relates to the random 13 https://coinmetrics.io/coin -metrics -state-of-the-network -issue -49 22 block generation process, because of which the implied hash rate tends to f ollow an oscillating pattern. On the one hand, there is randomness as to whether or not a contract would settle at the top or bottom of an oscillation, which could significantly impact the outcome of a transaction . On the other hand, the hash rate can be manipulatable by large miners that control significant portions of the network hash rate. To circumvent these issues, we use difficulty as an alternative proxy for measuring the blockchain computing capacity . The alternative dependent variable mining difficulty measure s the effort required to mine a new block on the blockchain. Both proxies for the network security – hash rate and difficulty – have been extracted from bitinfocharts.com (see Table 1). Both series were verified against data from blockchair.com . 5.2 Explanatory covariates Mining reward . PoW -blockchain m ining incentives are ensured via rewards for a correct and secure record keeping. The reward for every block is allocated to the miner that first solves the computational problem (hash function), by using guess and check algorithms based on the new and previous blocks of transactions. The mining reward of distributed ledgers is endogenous and fluctuates over time (in a fiat currency nomination – see Figure 1 ), implying that the underlying institutional governance technology may be contingent on the mining reward. In the empirical analysis, t he variable mining reward is measured as the average daily value of the reward per block calculated by dividing the total mining reward per day (in US dollars) by the total number of blocks per day. Both variables – the total mining reward /day and the total number of blocks /day – have been extracted from blockchair.com (see Table 1). Proof-of-work costs . Free entry and competition ensure that distributed ledgers can be more efficient and transactions less costly than cent ralized ledgers. As determined in the theoretical model (section 3), blockchain miners can enter freely, meaning that any agent who wishes to write on the ledger may do so by following an agreed set of rules. However, free entry of anonymous record -keepers is ‘trustless’ and thus requires a trust -enhancing mechanism. PoW - blockchains solve s the trust problem by forcing record -keepers to pay a physical resource cost to record information and requiring that future record -keepers validate those reports. The physical resource cost to write on the blockchain is the main the cost of operating a distributed digital ledger and forms the PoW -blockchain ’s security budget. In the empirical analysis, we construct a separate resource cost proxy for each global world region to measur e the v ariable mining unit costs . According to Ciaian et al. (2021 b), electricity costs account for 94 -97 percent of variable mining costs of PoW blockchains . Hence, we use electricity prices in Europe ( electricity Europe ), China ( electricity China ) and North America (electricity N. America ) to measure a region -specific cost of mining . These series have been constructed from three distinct sources: European Electricity Index (epexspot.com ), Chengdu's Usage Price Electricity for Industry (ceicdata.com ) and Electricity Price in North America 23 (reports.ieso.ca ) (see Table 1) . To address potential errors -in-variables issues, we construct alternative proxies for measuring the variable mining unit costs and estimate these otherwise identical mining models for robustness. As regards the fixed costs of mining, the mi ning equipment efficiency is proxied with the most efficient mining hardware available in each time period measured by the energy efficiency of the hardware (see Table 6 for an overview) . This approach follows closely the literature (Zad e and Myklebost 2018; CBEI 20 21). We proxy the discount rate with the US 10 -year treasury constant maturity rate ( 10-year-treasury ). The 10-Year Treasury Constant Maturity Rate (DGS10) is extracted from fred.stlouisfed.org (see Table 1). Number of miners . The total number of blockchain miners affects the blockchain security both directly and indirectly via n etwork externalities (see Figure s 2 and 3 ). When miners engage in the mining of blockchains, two types of opposite network externalities of the blockc hain security arise, one positive and one negative. The positive network externality implies that the blockchain security is increasing with the number of miners, because each additional node reinforces the chain’s security, by making it harder for any ind ividual miner to launch an attack or to guess who will be the winning miner (Waelbroeck 2018). The negative network externality occurs because each individual miner invests in the mining -computing power, which increases both the individual miner’s marginal income though also mining costs, as the difficulty of the computational problem increases in the number of miners and their computing power (“hash -power”). Increasing the difficulty of mining reduces the incentives for mining and – in the presence of lear ning by mining – increases the concentration of mining activities, reducing in such a way the blockchain security (Parra -Moyano, Reich and Schmedders 2019). When many small miners enter the blockchain network, likely, the positive network externality will dominate and the blockchain security outcomes will be superior compared to a highly skewed distribution of computing power across miners (few mining pools having a large share of the total network hash rate). In the empirical analysis, we compute the total number of miners from the blockchair.com (see Table 1) . Note that using B lockchair data we are able to distinguish between the total number of active miners and successful miners in every period. Although, the two series are correlated, their moments are different – the speed of adjustment to exogenous input and output price shocks is different between the two series. Distinguishing between the total number of active miners and successful miners is an important innovation compared to previous studies, Parra - Moyano, Reich and Schmedders (2019) is the only study we are aware of that uses a comparable decomposition technique. Competition intensity . As discussed in section 2 and derived in the theoretical model , PoW - blockchain -based distributed record -keeping system s allow for competition: there is a free entry (every miner can write on the ledger, subject to network rules) and switching between 24 ledgers (e.g. ‘forks’) is costless for users.14 There is also competition between a potential attacker (s) and all honest miners. Incentives to record honestly make it costly for a potential attacker to distort the ledger. In the empirical analysis, we consider two alternative proxies for the competition intensity – Herfindahl -Hirschman index ( hhi) and normalized Herfindahl - Hirschman index ( hhi normalised ) – in order to account for the unequal distribution of the blockchain computing capacity between different miners . Both Herfindahl -Hirschman concentration indices are computed based on the number of miners and the network hashrate . Both series – the total number of active miners and the network hashrate – have been extracted from blockchair.com (see Table 1). 6 Results Before proceeding with the ARDL bounds testing we determine the order of integration of the variables . The test results summarized in Table 4 indicate that there are no variable s integrated of the second order , which validates the use of the ARDL approach. Table 3 summarizes the three estimated mining models with alternative specification of explanatory variables and for each of the 3 model s we include 2 sub-models with alternative measur es of the PoW -blockchain security , i.e. hash rate and difficulty . The three estimated mining models differ by the proxy measuring the computer intensity. Model 1 use s competition intensity variable, (𝑛𝑡−1)𝑛𝑡2⁄, as derived in equation (7), whereas models 2 and 3 use the two alternative proxies for competition intensity: the Herfindahl -Hirschman index ( hhi) and the normalized Herfindahl -Hirschman index ( hhi normalised ), respectively. The rest of variables are uniform across all estimated mining models. 6.1 Mining reward and PoW -blockchain security The m ining reward hypothesis says that, c eteris paribus, the blockchain security is sensitive (elastic) to the mining reward. The long-run ARDL estimat es tend to confirm a structural relationship between the mining reward and security outcomes of the PoW -blockchain (Table 4). This holds for both security variables measuring the blockchain computing capacity , hash rate and difficulty , and across all estimated models. The estimated elasticities of the mining reward variable range from 1.38 to 1.85, indicating an elastic response in the blockchain computing capacity to permanent change s in the mining reward : 1% permanent increase in the mining reward increases the underlying blockchain security by 1.38% to 1.85% in the long - run. Hence, our estimates fail to reject the mining reward hypothesis : the PoW -blockchain security is overly sensitive (elastic) to the cryptocurrency mining reward. A change in the payoff from mining causes more than proportionate change in the PoW -blockchain security. 14 For example, a hard fork preserves all of the data in the parent blockchain: e.g. Bitcoin Gold and Bitcoin Cash in the case of hard forks of Bitcoin. 25 As discussed in section 2 and derived in the theoretical model, given that mining costs are incurred in standard fiat currencies in most cases (e.g. US dollar, Euro), the value of the mining reward fluctuates with the price of cryptocurrency ,15 which in turn affects the mining reward and mining incentives. Thus, if the expected cryptocurrency price decreases, lower mining incentives reduce the equilibrium computer mining capacity and hence the cryptocurrency security. Our estimates also imply that the reverse is valid in the case of a cryptocurrency price increase. As regards th e short -run estimates for the m ining reward , they are less significant across the estimated ARDL models than the long-run results and the estimated elasticity is rather small (Table 5). A 1% positive shock in the Bitcoin mining reward (the third lag) decreases the blockchain computing capacity in the short -run by between 0.01% and 0.02%. Generally, also the short -run estima tes tend to support the mining reward hypothesis : although an inverse relationship is found in our data , the security outcomes of the PoW -blockchain shows sensitivity to the Bitcoin mining reward even in the short -run. This negative relationship between the mining reward and mining intensity could be a result of other short -run effects such as mining optimization across cryptocurrencies , i.e. switching mining to other cryptocurrencies (e.g. to Bitcoin cash) when the rela tive price of Bitcoin to cryptocurrencies decreases.16 This short -run inverse relationship could also be caused by secondary spiral effects induced by Bitcoin price changes – decrease (increase) – as suggested by Kroll, Davey and Felten (2013), through the subsequent loss (gain) of confidence (trust) in Bitcoin when Bitcoin mining intensity decreases (increases) which might further reduce (increase) the Bitcoin price. 6.2 Proof -of-work cost and blockchain security The m ining cost hypothesis says that, c eteris paribus, the blockchain security is sensitive (elastic) to mining costs. To capture a region -specific cost of mining, we have constructed distinct electricity price variables for Europe, China and the North America. The long-run estimates for the p roof-of-work cost are less significant across the estimated ARDL models than mining reward results and the estimated elasticity shows a substantial variation across world mining regi ons (Table 4). In line with the m ining cost hypothesis , the estimated impact of variable mining unit cost s is negative and statistically significant for North 15 Note that the change in Bitcoin price is the main factor deriving the change in the value of mining reward because according to the algorithm the quantity of mining reward in Bitcoins, Rt, changes (halves) only approximately every 4 years, whereas Bitcoin price changes daily. 16 There is some evidence of asymmetric change in Bitcoin and altcoin prices: shocks to altcoins prices tend to be greater than Bitcoin price shocks (Reiff 2018; Cheikh, Zaied a nd Chevallier 2020). This implies that the relative prices of Bitcoin to altcoins are inversely related with the Bitcoin price changes which may incentivize miners to shift some Bitcoin computer capacity to mining altcoins when Bitcoin price increase, and shift back the computer capacity to Bitcoin mining when Bitcoin price declines. Note that the shift in mining between different cryptos is less relevant for ASIC mining hardware, commonly used for Bitcoin mining, which is more efficient in mining specific cryptocurrencies (specific cryptographic hash algorithm) and cannot be used for mining other types of cryptocurrencies. 16 https://www.vox.com/2019/6/18/18642645/bit coin-energy -price -renewable -china 26 America and Europe. In contrast , the long-run estimat es for the global mining leader China – 71.70 % of the g lobal Bitcoin hash rate are c oncentrated in China (Song and Aste 2020 ) – suggest a statistically significant and positive relationship between the proof -of-work cost and the security of the PoW -blockchain . This result is contrary to the theoretical predictions and requires some explanation. One explanation for these geographically differentiated results could be that the intensive margin of mining is larger in China, where all major mining pools are concentrated . Given that variable mining costs are lower in China than in Europe and North America, positive shocks to electricity prices may actually increas e the global share of Chinese miners. Indeed , our estimates capture other long -term behavioral effects of miners induced by a permanent change in electricity prices such as shifting mining location to places with cheaper energy (e.g. to remote regions of C hina, from mainland Europe to Iceland to harvest geothermal power).17 Such long -term behavioral effects may actually increase the blockchain computing capacity , if the energy cost savings more than offset the price increase. Further, these results may also reflect the fact that the mining input cost data (which are location -specific ) are less reliable than the mining reward data, which are publicly available for every single historical cryptocurrency transaction. The short -run results for the variable mining unit costs and security outcomes of the PoW - blockchain are available for China, they cannot be examined for North America and Europe due to the estimated ARDL specifications (Table 5). In line with the theoretical model in equation (7), positive shocks to electricity prices in China have a statistically significant and negative impact on the blockchain computing capacity of the PoW -blockchain in the short -run. This result co ntrasts long-run estimate s, where a permeant increase in electricity prices in China led to an increase in the mining intensity suggesting that other structural changes in miners’ behavior might take place when the cost changes are permanent. Thus , our short -run PoW cost estimates tend support the mining cost hypothesis that the security outcomes of the PoW -blockchain is sensitive to mining costs. In the long -run, however, structural shifts and relocation of mining farms – to reduce mining operating costs – may take place and offset the short -run mining cost effect. Overall, these ARDL bounds testing results suggest that the blockchain security is sensitive to proof-of-work cost s. However, we cannot provide a definite and robust answer to the m ining cost hypothesis . Instead , these results call for further analysis using more disaggregated location -specific mi ning cost data . Indeed, looking into p roof-of-work costs and blockchain security outcomes using geographically disaggregated data offers a promising avenue for the future research. 17 https://www.vox.com/2019/6/18/18642645/bitcoin -energy -price -renewable -china 27 A further variable capture mining costs in ou r model is the hardware efficiency . In line with the theoretical model, the hardware efficiency variable has a statistically significant positive impact on the blockchain computing capacity in all estimated models. The ARDL results imply that an increase in the efficiency of mini ng equipment (decrease in the input units of the computing capacity per security output unit) leads to an upgrade of security outcomes of the PoW -blockchain in the long -run. The estimated elasticities vary between 0. 23 and 0.8 3, implying that a 1% permanen t increase in the efficiency of mining equipment increases the blockchain computing capacity in the long -run by between 0.23% and 0.8 3%. Hence, the PoW - blockchain mining security is dependent of the mining technology available in each given point of time.18 6.3 Competition and network externalities The theoretical mining model in (7) implies that the total blockchain computing capacity increases at a decreasing rate in the level (intensity) of competition. Our long-run estimates suggest that the miners’ competition intensi ty (number of miners , competition intensity ) has a negative impact on security outcomes of the PoW -blockchain ; all long-run estimates are significant ly different from zero in Table 4. These results suggest that a permanent increase in the competition intensity exercises a downward pressure on the blockchain computing capacity in the long -run. As discussed in Section 2, digital distributed ledgers such as blockchain are subject to a number of network externalities. When new miners enter the blockchain mining, two types of direct network externalities related to the blockchain security arise, one positive and one negative. The positive network externality implies that the blockchain security is increasing with the number of miners, because each additional node reinforces the chain’s security . In line with the previous literature (Waelbro eck, 2018), t he negative network externality occurs because each individual miner invests in the mining -computing power, which increases both the individual miner’s marginal income though also mining costs, as the difficulty of the computational problem in creases in the number of miners and their computing capacity (“hash - power”). Increasing the difficulty of mining reduces the incentives for mining and – in the presence of learning by mining – increases the concentration of mining activities, which in turn reduc es the blockchain security . Our estimate s suggest that the negative network externality dominates of the positive network externality. Our results are in line with th ose of Parra - Moyano, Reich and Schmedders (2019) who find that the probability of winning a mining contest increases with the miner size. This motiv ates miners to join mining pools to increase 18 The short -run effects of electricity prices, hardw are efficiency , 10-year-treasury and alternative proxies for competition intensity cannot be examined due to the ARDL specifications, as no lags of these dependent variables entered the model. 28 their probability to win the mining contest and receive reward .19 Indeed , our competition proxy variable s are constructed based on the observed number of miners but not on the number of members within mining pools . And since a greater competition may imply fewer miners (because many individual miners join mining pools) , the implied actual long -run relationship between the competition intensity and mining intensity may become negative. In the short -run, the mining competition intensity has a statistically positive impact on the blockchain computing capacity in all estimated models. These results also indicate that in the short -run, the competition among miners encourages deployment of more mining capacity in line with the model derived in equation (7). While in the short -run the miners’ competition leads to expansion of the blockchain mining capacity , in the long -run the inverse relationship is valid indirectly suggesting reduced competition level as individual miners have the incentive to join mining pools. 6.4 Dynamics and the mean -reverting of the blockchain security The m ean-reverting hypothesis says that, c eteris paribus, the PoW -blockchain security reverts back to mean in the long -run. The estimates of the error correction term – which measure the speed of adjustment of the short -run dynamics of mining to the long -run equilibrium path – are statistically significant across all models. The error correction terms vary between -0.002 and -0.009 , imply ing that between 0.2 0% and -0.90% of the long -run disequilibrium in mining intensity is corrected by the short -run adjustment on the same day. In other words, the disequilibrium corrects at a n average speed of convergence of between 0.2 0% and 0.9 0% per day. In terms of the duration, any deviation from the long -run equilibrium is corrected in around 109 to 447 days. These results provide support for the m ean-reverting hypothesis saying that in response to shocks and short -run deviations security outcomes of the PoW -blockchain revert back to the equilibrium security level in the long -run. The lagged dependent variable ( proxied by hash rat e and difficulty ) is statistically significant in all estimated mining models. The coefficient estimates vary between -0.03 and -0.47. The relatively high values of these coefficients indicate that the temporary shocks in the mining computing capacity disappear over time relatively fast: in around 2 to 29 days. These results support the mean-reverting hypothesis that the security outcomes of the PoW -blockchain are sensitive to Bitcoin market outcomes in the short -run to fluctuation s with instant shocks disappear ing over a short time period (within few days) . The 10-year-treasury variable, which is a proxy for the discount rate, has a statistically significant positive effect on the blockchain computing capacity . This result suggests that that the 10-year-treasury actually captures a miner investment competition effect , i.e. miner s 19 Other benefit of joining mining pools is that it creates a st eady stream of income, rather than greater income but at lower frequency (i.e. due to lower odd of winning the mining contest) with individual mining (Liu and Wang 2017). 29 perceive it as an alternative investment asset. As far as cryptocurrency is perceived as an investment asset, shocks to competing investment asset returns (including 10-year-treasury ) are expected to impact positively miners’ choices to invest in the mining of cryptocurrency . Our results confirm that miners perceiv e cryptocurrency to be competing for investment with other financial assets and thus need to generate a competitive return. The return arbitrage among alternative potential investment opportunities implies a positive price relationship between cryptocurrency and alternative financial assets (Murphy 2011; Ciaian et al. 2018 , Ciaian et al. 2021a ). Thu s, the positive coefficient associated with the 10-year-treasury variable implies that miners are motivated to invest in more computing capacity for mining when the returns to financial assets increase. 7 Discussion and concluding remarks The present paper has studied the i nterdependencies between mining costs, mining rewards and blockchain security . We have attempted to answer the following questions. T o what extent the cost of operating blockchain s is intrinsically linked to the cost of preve nting attacks ? To what extent the digital ledger’s record -keeping security budgets (measured by mining rewards in a fiat currency nomination) of cryptocurrencies are correlated with the cryptocurrency market outcomes? In this paper, we have focused on the proof -of-work (PoW) blockchain, which is a particularly interesting blockchain to study as the involved physical resource expenditures provide a distinct advantage in achieving consensus among distributed miners . First, we have theoretically derive d an equilibrium relationship between cryptocurrenc y price , mining rewards and mining costs, and blockchain security outcomes . Second, u sing daily Bitcoin data for 2014 –2021 and employ ing the autoregressive distributed lag approach – that allows treating all the relevant moments of the blockchain series as potentially endogenous – we have provide d empirical evidence about interdependencies between mining costs, mining rewards and blockchain security . Our resu lts suggest that the cryptocurrenc y price and mining rewards are intrinsically linked to blockchain security outcome s. In contrast, t he physical resource cost to write on the blockchain – the cost of operating the PoW -blockchain – is only weakly cointegrated with the strength of the network security; the ARDL results for mining costs are geographically differentiated, implying heterogen eities in variable mining costs across global world mining regions . Our main contribution to the literature is formally establishing a link between the probability distribution over security outcomes that permanently depend on the underlying distribution of cryptocurrency market outcomes and providing a supporting empirical evidence . Our results complement findings of this emergent literature by quantifying how the probability distribution over security outcomes permanently depend s on the unde rlying distribution of cryptocurrency market outcomes . Due to the extremely high cryptocurrenc y return volatility, the PoW -based 30 blockchain security budget is exposed to high volatility and may result in a series of low- security equilibriums and high -secur ity equilibriums. References Abadi, J., and M. K. Brunnermeier , 2018, Blockchain Economics. NBER Working Paper 25407, National Bureau of Economic Research. Atzori, M. , 2017, Blockchain Technology and Decentralized Governance: Is the State Still Necessary? . Journal of Governance and Regulation 6, 45 -62. Biais, B., C. Bisiere, M. Bouvard, C. Casamatta, 2019 , The Blockchain Folk Theorem, Review of Financial Studies , 32, 1662 –1715 . BitcoinWiki , 2021, “Difficulty in Mining.” BitcoinWiki, https://en.bitcoinwiki.org/ Bouoiyour J. and R. Selmi, 2015 , What Does Bitcoin Look Like? . Annals of Economics and Finance 16, 449 -49. Budish, E. , 2018 , The Economic Limits of Bitcoin and the Block. NBER Working Paper No. 24717, National Bureau of Economic Research. CBEI , 2021, CBECI SHA -256 Mining Equipment List. http://sha256.cbeci.org Ciaian, P., Rajcaniova, M. and Kancs, D. , 2018 , Virtual relationships: Short - and long -run evidence from BitCoin and altcoin markets. Journal of International Financial Markets, Institutions & Money 52, 173–195. Ciaian, P., Kancs, D. and Rajcaniova, M. , 2021a, The Price of BitCoin: GARCH Evidence from High Frequency Data , Journal of Investment Strategies , forthcoming. Ciaian, P., Kancs, D. and Rajcaniova, M. , 2021 b, The economic dependency of the Bitcoin security , European Commission, Applied Economics , forthcoming . Cocco L. and M. Marchesi , 2016 , Modeling and Simulation of the Economics of Mining in the Bitcoin Market. PLoS ONE 11, 1-31. Cong, L.W. and Z. He , 2019, Blockchain Disruption and Smart Contracts. Review of Financial Studies 32, 1754 -1797, https://doi.org/10.1093/rfs/hhz007 Crypto51 , 2021, PoW 51% Attack Cost. Crypto51, https://www.crypto51.app/ Davidson, S., P. De Filippi and J. Potts , 2016 , Economics of Blockchain. SSRN Electronic Journal . http://dx.doi.org/10.2139/ssrn.2744751 Dollar, D. and A. Kraay , 2003 , Institutions, trade, and growth. Journal of Monetary Economics 50, 133–162. 31 Engl e, R.F. and C.W.J. Granger, 1987 , Co-integration and Error Correction: Represen tation, Estimation, and Testing . Econometrica 55, 251 -276. Garratt, Rodney and van Oordt, Maarten R.C. , 2020 , Why Fixed Costs Matter for Proof -of- Work Based Cryptocurrencies , Staff Working Paper 2020 /27, Bank of Canada, Ottawa, Ontario, Canada . Glaeser, E.L., R. La Porta, F. Lopez -de-Silanes and A. Shleifer , 2004 , Do Institution s cause Growth? Journal of Economic Growth 9, 271-303. Greif, A. and Kingston, C. , 2011 , Institutions: Rules or Equilibria? In Schofield, N. and Caballero, G. (eds.), Political Economy of Institutions, Democracy and Voting , Berlin , Springer, 13 -43. Hodgson, G.M. , 2006 , What Are Institutions? Journal of Economic Issues 40, 1-25. Huberman, G., Leshno, J. and Moalleni, C. , 2019, Monopoly Without a Monopolist: An Economic Analysis of the Bitcoin Payment System . AEA Papers and Proceedings 109, 93 - 96. Iyidogan, E. , 2020 , An Equilibrium Model of Blockchain -Based Cryptocurrencies, SSRN Electronic Journal http://dx.doi.org/10.2139/ssrn.3152803 Johansen, S ., 1991 , Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models. Econometrica 59, 1551 -1580. Joudrey, S. , 2019 , Hash Rate vs. Hash Power. hedgetrade.com/hash -rate-vs-hash-power/ Kingston, C. and G. Caballero , 2009 , Comparing Theories of Institutional Change. Journal of Institutional Economics 5, 151-180. Kroll, J.A., I.C. Davey and E.W Felten , 2013, The Economics of Bitcoin Mining or, Bitco in in the Presence of Adversaries, in Proceedings of the Workshop on the Economics of Information Security (WEIS ). Lee J.,H. , 2019 , Systematic Approach to Analyzing Security and Vulnerabilities of Blockchain Systems, Working Paper 2019 -05, Sloan School of Management, MIT. Li, X. and C.A Wang , 2017 , The technology and economic determinants of cryptocurrency exchange rates: The case of Bitcoin . Decision Support Systems 95, 49-60. Nakamoto, S. , 2008 , Bitcoin: A Peer -to-Peer Electronic Cash System. https://bitcoin.org/bitcoin.pdf Muth, J.F. , 1961 , Rational Expectations and the Theory of Price Movements. Econometrica 29, 315-335. Murphy, J.J. , 2011 , Intermarket Analysis: Profiting from Global Market Relationships . 115. John Wiley & Sons. 32 Nascimento S., P olvora A. and Sousa -Louren co J., 2018 , Blockchain4EU: Blockchain for Industrial Transformations.” EUR 29215, Luxemburg: Publication Office of the EU. North, D. , 1990 , Institutions, institutional change and economic performance . Cambridge University Press, Cambridge Pagnotta E. S. , 2021, Decentralizing Money: Bitcoin Prices and Blockchain Security . Review of Financial Studies https://doi.org/10.1093/rfs/hhaa149 Parra -Moyano, J. , Reich, G. and Schmedders, K. , 2019 , Urns Filled with Bitcoins: New Perspectives on Proof -of-Work Mining. SSRN E-Journal : https://ssrn.com/abstract=3399742 Pesaran, M.H., Shin, Y. , 1999 , An autoregressive distributed lag modelling approach to cointegration analysis”. In: Strom, S. (Ed.), Econometrics and Economic Theory in the 20th Century: Cambridge University Press, Cambridge. Pesaran, M. H., Shin, Y . and Smith, R ., 2001 , Bounds testing approaches to the analysis of level relationships . Journ al of Applied Econometrics 16, 289-326. Phillips, P. C. B. and S. Ouliaris , 1990 , Asymptotic Properties of Residua l Based Tests for Cointegration. Econometrica 58 , 165–193. Stoian, A. and F. Iorgulescu, 2020 , Fiscal policy and stock market efficiency: An ARDL Bounds Testing approach, Economic Modelling 90, 406 -416. Song Y.D. and Aste T. , 2020 , The Cost of Bitcoin Mining Has Never Really Increased. Frontiers in Blockchain 3 , 565497. doi:10.3389/fbloc.2020.565497 Thum, M. , 2018 , The Economic Cost of Bitcoin Mining. CESifo Forum 19, 43-45. Van Valkenburgh, P ., 2018 , What is a 51% attack, and what can a successful attacker do? https://coincenter.org/entry/what -is-a-51-attack -and-what -can-a-successful -attacker -do-1 ViewNodes , 2019 , The History of 51% Attacks and the Implications for Bitcoin. https://medium.com/hackernoon/the -history -of-51-attacks -and-the-implications -for-bitcoin Waelbroeck, P. , 2018 , An Economic Analysis of Blockchains. CESifo Working Paper Series No. 6893. Zade, M. and J. Myklebost , 2018 , Bitcoin and Ethereum Mining Hardware, Mendeley Data http://dx.doi.org/10.17632/4dw6j3pxz5.1 . 33 Figure 1. Bitcoin price and aggregate security spend , USD Source: coinmetric.com and studio -glass -node. Notes: Bitcoin’s cumulative miner revenue – Thermocap – is calculated by taking the running sum of daily miner revenue in USD . Market cap italization to Thermocap provides an indicat ion of the B itcoin’s current market value compared to the aggregate amount spent to secure the network. Note that, due to lags in the adjustment of mining investment, Thermocap is relatively slow moving and does not have the same level of volatility as the market cap italization . Figure 2. Interdependenc ies between bitcoin price and blockchain security Source: Conceptual framework (section 3). Mining reward effect Increases blockchain security (+) users value blockchain security probability of successful attacksblock -reward in fiat currency intensive margin + extensive margin difficulty to mine a new block↑ Bitcoin price immutability of blockchain↓ attack chance ↑ ledger security↑ mining reward ↑ computing capacity ↑ hash rate 34 Figure 3. Interdependenc ies between proof -of-work cost and blockchain security Source: Conceptual framework (section 3). Table 1. Data sources Variable Unit Description of variable Source Dependent variable hash rate Hash/second Total computing capacity bitinfocharts.com difficulty Average difficulty per day Mining difficulty bitinfocharts.com Explanatory variables mining reward USD per block Mining reward per block (reward_usd/ no_bl_total ) blockchair.com PoW cost: electricity Europe EUR/MWh European Electricity Index www.epexspot.com PoW cost: electricity China USD/kWh Chengdu's Usage Price Electricity Industry, USD www.ceicdata.com PoW cost: electricity N. America CAD/MWh Electricity price in North America ieso.ca hardware efficiency J/Giga hash Mining equipment efficiency – Bitcoin mining hardware generation ( the most efficient device in each period) Constructed based on: Zad e and Myklebost (2018), CBEI (2019) number of miners No Number of miners, 𝑛𝑡 blockchair.com competition intensity Index Competition intensity computed (𝑛𝑡−1)𝑛𝑡2⁄ hhi Index Herfindahl -Hirschman index computed based on 𝑛𝑡 and hashrate hhi normalised Index Normalised Herfindahl - Hirschman index computed based on on 𝑛𝑡 and hashrate 10-year-treasury % 10-Year Treasury Constant Maturity Rate (DGS10) fred.stlouisfed.org Mining cost effect Reduces blockchain security ( –) variable cost in fiat currency probability of successful attacks immutability of blockchainblock -reward in fiat currency intensive margin + extensive margin difficulty to mine a new block↑ mining costs ↑ attack chance ↓ ledger security↓ mining profits ↑ computing capacity ↓ hash rate 35 Table 2. Descriptive statistics of used data Variable Obs Mean Std. Dev. Min Max Dependent variable hashrate 2207 40.612 6.475 25.442 52.332 difficulty 2207 24.028 6.923 9.581 32.709 Explanatory variables mining_reward 2207 9.954 2.387 -0.692 14.713 PoW cost: electricity Europe 2207 3.961 0.981 -6.908 5.429 PoW cost: electricity China 2207 -2.506 0.067 -2.402 -2.409 PoW cost: electricity N. America 2207 2.809 2.177 -6.908 6.010 hardware efficiency 2207 0.172 3.090 -3.219 6.552 number of miners 2207 3.068 0.934 0.000 3.984 competition intensity 2207 -3.301 1.089 -6.908 -1.497 hhi 2207 -1.851 0.770 -2.608 0.000 hhi normalised 2207 -2.173 0.946 -3.176 0.000 10-year-treasury 2207 0.893 0.229 0.315 1.428 Table 3. Specification of empirical models Dependent variable: hashrate Dependent variable: difficulty M1.1 M2.1 M3.1 M1.2 M2.2 M3.2 Dependent variable hashrate X X X difficulty X X X Explanatory variables mining reward X X X X X X PoW cost: electricity Europe X X X X X X PoW cost: electricity China X X X X X X PoW cost: electricity N. America X X X X X X hardware efficiency X X X X X X number of miners X X X X X X competition intensity X X hhi X X hhi normalised X X 10-year-treasury X X X X X X Table 4. Estimation results: long -run interdependencies Dependent variable: hashrate Dependent variable: difficulty M1.1 M2.1 M3.1 M1.2 M2.2 M3.2 mining reward 1.398 *** 1.428 *** 1.379 *** 1.703 *** 1.848 *** 1.845 *** PoW cost: electricity Europe -0.236 ** -0.331 ** -0.340 ** -0.137 * -0.155 * -0.183 * PoW cost: electricity China 1.716 ** 1.206 ** 2.568 ** 1.238 * 2.857 * 3.108 * PoW cost: electricity N. America -0.132 ** -0.214 ** -0.240 ** -0.061 * -0.120 * -0.142 * hardware efficiency 0.839 *** 0.546 *** 0.650 *** 0.494 *** 0.237 *** 0.372 *** number of miners -1.154 *** -2.824 *** -2.487 *** -2.112 *** -4.027 *** -3.393 *** competition intensity -1.143 *** -1.257 *** hhi -3.596 ** -5.756 *** hhi normalised -2.285 *** -4.595 *** 10-year-treasury 2.204 ** 4.869 ** 5.994 * 2.556 * 5.675 ** 7.364 * Error correction term hash rate ( -1) -0.009 *** -0.008 *** -0.007 *** difficulty ( -1) -0.003 ** -0.004 ** -0.002 ** Speed -of-adjustment (days) 109 121 135 317 350 447 Notes: Speed -of-adjustment is calculated based on the error correction rate. ***significant at 1% level, **significant at 5% level, *significant at 10% level. Empty cells indicate absence of a variable in the respective model. 36 Table 5. Estimation results: short -run interdependencies Dependent variable: hashrate Dependent variable: difficulty M1.1 M2.1 M3.1 M1.2 M2.2 M3.2 Δ dependent variable ( -1) -0.444 *** -0.441 *** -0.446 *** 0.192 *** 0.214 *** 0.202 *** Δ dependent variable ( -2) -0.469 *** -0.452 *** -0.431 *** -0.146 *** -0.148 *** -0.148 *** Δ dependent variable ( -3) -0.317 *** -0.293 *** -0.291 *** -0.039 *** -0.034 *** -0.034 *** Δ dependent variable ( -4) -0.230 *** -0.196 *** -0.203 *** -0.075 *** -0.071 *** -0.073 *** Δ dependent variable ( -5) -0.164 *** -0.143 *** -0.152 *** -0.058 ** -0.057 *** -0.056 *** Δ dependent variable ( -6) -0.099 ** -0.096 *** -0.092 *** -0.053 ** -0.047 *** -0.049 ** Δ dependent variable ( -7) -0.074 ** -0.064 ** -0.064 ** -0.061 ** -0.057 ** -0.051 ** Δ mining reward -0.019 *** -0.017 *** -0.017 *** -0.001 *** -0.001 *** -0.001 *** Δ mining reward ( -1) -0.020 ** -0.034 ** -0.016 ** -0.003 ** -0.002 * -0.002 * Δ mining reward ( -2) 0.001 * 0.001 * 0.001 * Δ mining reward ( -3) -0.014 * -0.015 -0.013 * Δ mining reward ( -4) -0.015 -0.015 -0.015 Δ PoW cost: electricity China -1.258 *** -1.319 *** -1.181 *** Δ number of miners 0.002 ** 0.003 ** Δ number of miners ( -1) 0.077 0.076 Δ number of miners ( -2) 0.092 0.094 Δ competition intensity 0.010 ** 0.001 ** Δ competition intensity ( -1) 0.063 ** 0.033 * Δ competition intensity ( -2) 0.041 * 0.033 constant 0.292 ** 0.350 ** 0.383 ** 0.046 ** 0.074 ** 0.103 ** Notes: ***significant at 1% level, **significant at 5% level, *significant at 10% level. Empty cells indicate either absence of a variable in the respective model or the coefficient or the variable is not selected in the estimation; Δ is difference. Table 6. Development of the PoW mining hardware efficiency Type Hardware name Date J/Th CPU ARM Cortex A9 3 Oct 2007 877,193 GPU ATI 5870M 23 Sep 2009 264,550 FPGA X6500 FPGA Miner 29 Aug 2011 43,000 ASIC Canaan AvalonMiner B1 1 Jan 2013 9,351 ASIC KnCMiner Jupiter 5 Oct 2013 1,484 ASIC Antminer U1 1 Dec 2013 1,250 ASIC Bitfury BF864C55 3 Mar 2014 500 ASIC RockerBox 22 Jul 2014 316 ASIC ASICMiner BE300 16 Sep 2014 187 ASIC BM1385 19 Aug 2015 181 ASIC PickAxe 23 Sep 2015 140 ASIC Antminer S9-11.5 1 Jun 2016 98 ASIC Antminer R4 1 Feb 2017 97 ASIC Ebang Ebit 10 15 Feb 2018 92 ASIC 8 Nano Compact 1 May 2018 51 ASIC Antminer S17 9 Apr 2019 36 ASIC Antminer S19 Pro 23 Mar 2020 30 Source: Song and Aste (2020)
{ "id": "2102.08107" }
2201.11370
An IoT Blockchain Architecture Using Oracles and Smart Contracts: the Use-Case of a Food Supply Chain
The blockchain is a distributed technology which allows establishing trust among unreliable users who interact and perform transactions with each other. While blockchain technology has been mainly used for crypto-currency, it has emerged as an enabling technology for establishing trust in the realm of the Internet of Things (IoT). Nevertheless, a naive usage of the blockchain for IoT leads to high delays and extensive computational power. In this paper, we propose a blockchain architecture dedicated to being used in a supply chain which comprises different distributed IoT entities. We propose a lightweight consensus for this architecture, called LC4IoT. The consensus is evaluated through extensive simulations. The results show that the proposed consensus uses low computational power, storage capability and latency.
http://arxiv.org/pdf/2201.11370v1
Hajar Moudoud, Soumaya Cherkaoui, Lyes Khoukhi
cs.NI, cs.CR
cs.NI
An IoT Blockchain Architecture Using Oracles and Smart Contracts: the Use-Case of a Food Supply Chain Hajar Moudoudy, Soumaya Cherkaoui, Lyes Khoukhiy Department of Electrical and Computer Engineering, Universit ´e de Sherbrooke, Canada yUniversity of Technology of Troyes, France fhajar.moudoud, soumaya.cherkaoui g@usherbrooke.ca, lyes.khoukhi@utt.fr Abstract —The blockchain is a distributed technology which allows establishing trust among unreliable users who interact and perform transactions with each other. While blockchain technology has been mainly used for crypto-currency, it has emerged as an enabling technology for establishing trust in the realm of the Internet of Things (IoT). Nevertheless, a naive usage of the blockchain for IoT leads to high delays and extensive computational power. In this paper, we propose a blockchain architecture dedicated to being used in a supply chain which comprises different distributed IoT entities. We propose a lightweight consensus for this architecture, called LC4IoT. The consensus is evaluated through extensive simulations. The results show that the proposed consensus uses low computational power, storage capability and latency. Keywords —Blockchain; Internet of Things (IoT); Consensus; Supply chain. I. I NTRODUCTION With the rapid rise of smart devices, smart homes, smart cities, and smart everything, the Internet of Things (IoT) has gained popularity among users [1][2]. IoT can be defined as a group of interconnected things or devices, in a private or a public network, sharing data to provide a service such as automation or monitoring. However, in order to fully take advantage of the IoT paradigm, several problems should be ad- dressed [3]. These problems include particularly, security and privacy issues, especially when private and business-related information are collected and shared among different entities. Another set of related problems are integrity, trustworthiness, and non-repudiation of the data shared among the different entities [4]. For example, in a smart hospital, the subject will receive treatment based on data provided by sensors; but could we trust the information provided by these sensors? Blockchain (BC) has been proposed as a solution to over- come these problems [5]. Because it is decentralized, BC eliminates the need of having a third party verify data integrity, trustworthiness and non-repudiation. Also, BC does not have a single point of failure. BC is a distributed technology that allows transaction verification by members which could be dishonest. It is an immutable ledger (chain) that maintains a continuously growing set of data records called blocks. Data records store information about each transaction performed bythe users. Once a valid block is gathered, it is connected to the last block of the chain. BC uses cryptography signatures, public/private keys, and a consensus mechanism for appending any new block into the chain. A consensus corresponds to a protocol that establishes an agreement among independent entities about the state of the BC. The ability of BC to reach consensus among dishonest distributed peers provides a high system availability and security for IoT systems involving numerous entities. Still, the computing power needed to run the BC is somehow in- compatible with the restrictive features of several IoT systems [6] [7]. For example, IoT endpoints generally have limited resources; they are power-constrained with limited computing energy, storage, and bandwidth. There have been several works that tried to address the challenges of using BC in an IoT context [8]. However, most of these works, if not all, display shortcomings in one or several of the following aspects; openness, lightweight consensus, use of smart contracts, and Oracles. We define openness as the capacity of non-members of BC to access stored data. For example, when using an architecture such as the one proposed in [9], only members of the BC can access data, which can restrict access to information that can be of interest to the public in general. A consensus for IoT BC should be non compute-intensive; in other words, lightweight. This aspect has not been addressed in several works [10][11]. Smart contracts implement a formal model to provide a division of labour between stakeholders, which can be useful for implementing rules and policies. Smart contracts are absent in several works like [12]. An Oracle is a third- party agent who verifies data that cannot be reached or fetched directly by the BC [13]; in other terms, data that comes from the physical world (e.g., sensor data). This aspect has not been addressed in many works [14][15]. In this paper we propose a secure architecture that over- comes the challenges of using BC in an IoT context, that ensures openness, uses a lightweight consensus for IoT (LC4IoT), smart contracts, and Oracles. To accurately illus- trate the architecture, a food supply chain use-case will be adopted throughout the paper. Still, the concepts presented inarXiv:2201.11370v1 [cs.NI] 27 Jan 2022 this paper are well suited for other types of IoT applications. The remainder of this paper is organized as follows. In section II, we present the proposed architecture. Section III details LC4IoT used in the architecture. Section IV studies the performance of LC4IoT in comparison with the consensus used by the Bitcoin architecture. In section V , we give an overview of some proposed BC IoT architectures. Finally, section VI concludes the paper. II. FOOD SUPPLY BLOCKCHAIN The food supply chain system includes multiple stakehold- ers such as farmers, distributors, retailers, and consumers (see Fig. 1). These stakeholders can be located in different regions, with produce possibly transiting between several countries before arriving at a consumer. Due to the lack of trust and transparency among tiers, produce tracing becomes challenging. In this context, BC ability to permanently record data and provide real-time access to information could help overcoming the problem of produce traceability. The proposed architecture involves four tiers: overlay IoT network, smart farm, Oracle’s network, and Cloud. Thereafter, we define each tier of the architecture. A. Overlay network We introduce a peer-to-peer overlay network including supply chain members. The overlay network forms a dis- tributed network involving multiple stakeholders. This peer- to-peer network is built on top of the supply chain system, enabling stakeholders connected to it to communicate. All members of the supply chain are initialized at the beginning of communication and identified by a public key. A new member is accepted in the overlay network if she is approved by a quorum. A “quorum” is the minimal number of members required to reach an agreement. All members of the overlay network have a list of approved member keys stored in their local storage. We use smart contracts to ensure that rules and policies are respected by parties in the overlay network. In this architecture we use smart contracts in two ways; first, they are applied by a third party who offers transparency and efficiency, second, they are implemented to govern operations between stakeholders. B. Smart farm The smart farm is comprised of IoT devices, proxy nodes, storage and BC. In general, BC has three main ledger types: public, consor- tium, and private BC [16]. In a public BC, everyone can join the network and all BC members are responsible for transaction validation. The consortium BC is different in that, it is partly decentralized; only some members oversee the consensus determination. Generally, consortium BC is built by several organizations. Lastly, private BC restricts access to network members only. Private BC is implemented by a single company or an organization. In the proposed architecture we use a public/private BC. The private BC is used to store private Fig. 1: Food supply chain overlay network information of the smart farm. The public BC is used for tracking produce, and for providing information to the general public. Fig. 2 illustrates the smart farm BC architecture. IoT sensors are responsible for gathering data from the field in a smart farm (e.g. RFID tags for cattle). Since IoT devices have limited computing power and energy, we use proxy nodes to outsource computing. The imparting of information between the smart farm IoT devices is referred to as a transaction. Every produce is identified by a public key that changes with every transaction. Data are stored centrally in designated storage, while transactions are recorded in the private/public BC. C. Oracle network In the food supply chain, data is generally collected from sensors scattered across multiple locations. We use Oracles to check the veracity of sensor data. For example, an Oracle can inform whether the temperature inside a refrigerated track transporting produce has come above a certain threshold during the transportation journey. To verify data, an Oracle Oineeds to compare received data xfrom a sensor with fetched data yby the Oracle (see Eq. 1). Oi(x) =( 1ifOi:verify (x;y) ==True 0otherwise:(1) In our architecture, multiple Oracles can be used. The Oracles’ network is able to divide the approval process for data veracity among multiple parties. We define the Oracles’ network data verification process as follows: Mout ofN multi-signature transaction should be reached among Oracle parties. A transaction is valid when Mout ofNOracles sign it, that is, the sum is greater than a threshold (Eq.2). 8Oi;Oi2f0;1g!f0;1gk;1iM; MX i=1Oi(x) (2) Fig. 2: Smart farm architecture based on BC Thevalue depends on the number of active Oracles and the fault tolerance of the system. Where Mis the number of active Oracles in the network and kis a security parameter. D. Cloud Cloud stores raw data received from the Oracles’ network. Data is either publicly accessible, ensuring data transparency or has limited access to preserve the privacy of stakeholders. Each member of the food supply chain allocates a Cloud space for personal usage, linked with a Cloud public key CPk . This process guarantees that data is correctly routed and the source is identified. We propose using a private BC in the Cloud to store data hash, enabling data trustworthiness and non-repudiation. In BC, the hash function is the algorithm used to write a new transaction through the mining process [17]. It maps data and generates a summary; the unique fingerprint substitutes an input string from arbitrary to a fixed size. The hash enables data integrity by comparing the hash value along with some additional inputs, like timestamp and previous block hash. BC uses the SHA-256 secure hash algorithm, which provides almost a unique and fixed size of 256 bits (32 bytes), requiring low computing power. III. LIGHTWEIGHT CONSENSUS In this section, we explain the transaction verification pro- cess and how off-chain storage is performed in the proposed architecture. Also, we detail LC4IoT. A. Transaction verification In order to append a new transaction in BC, miners need to verify some conditions. This verification process is divided into three steps: 1) First, miners verify the sender’s signature to validate transaction authenticity. This digital signature authen- ticates the sender, using the public key stored in the transaction. 2) Second, miners check if the public key is predefined; which means, the sender public key has a stored trans- action in the BC. Otherwise, it is a genesis transaction (see section C). 3) Third, miners verify the Oracles’ network signatures.If all conditions are validated, data is then transferred to the verified transaction pool for mining. B. Data transfer off-chain The BC could be used as a mediator for data transfer. Generally, there are two methods used to store data within BC; first, data is sent within a transaction, it is the case with Bitcoin [18], or, data is stored in smart contracts, it is the case with Ethereum [19]. Both approaches submit a transaction in the BC. Nevertheless, the BC block size is limited. To solve this problem, several proposals have been put forward. A trivial solution consists in increasing the block size. For example, Bitcoin Cash [20] upgraded the block size from 1 MB to 8 MB. Still, this solution may affect the operation of nodes and tends to be more expensive. For our architecture, we store raw data off-chain and metadata on-chain, to improve latency and system scalability. In this section, we outline how data transfer is performed in BC. We explain mining steps in the case where Alice wants to transfer 5GB of data to Bob. Let Alice be a member of the BC, which means that her public key exists in a previous block of the chain. First, Alice will store the 5GB of data in the Cloud. Alice is identified by the triple ( Pk,Prk,a) wherePkis the distributed public key, Prk is the secret private key, and ais the address where she stored data. Since block size in BC is limited, Alice will only store metadata on-chain and the actual data off-chain. Alice will share the private key with Bob and encrypt metadata with the public key. Once the transaction is created, Alice will sign it using the private key. A node in the network will verify the state of the transaction, by verifying the signature, public key of both the sender and the receiver. Afterwards, the transaction is sent to the verified transaction pool. A node in the network can also act as a miner. Miners of the network choose a transaction form the pool and build a block. Different miners could pick the same transaction. Miners in the network will attempt to reach a consensus to append a block. The first miner who reaches a consensus will broadcast the new block to other miners. The transaction becomes a permanent part of the ledger, Bob can now have access to the address where Alice has stored data with her private key. C. Lightweight consensus for IoT (LC4IoT) We propose LC4IoT algorithm that integrates the use of Oracles for block appending in the BC. In step 1, nodes in the network fetch a random transaction Tkfrom the verified transaction pool and try to create a new block Bi+1. To simplify, we admit that every block contains only one transaction. Every transaction has the following arguments, Tk(Pk;CPk;O i:sig;metadata ), wherePkis the public key of the data provider, CPk is the Cloud public key, Oi:sig is the Oracles signature and metadata is the metadata that we want to store. The output of the algorithm will be a new block that contains the transaction. In step 2, the algorithm verifies if the stored signature in the transaction belongs to the Oracles’ network or not. If the provided signature does not belong to the list of the Oracles’ network, the algorithm returns False. Otherwise, the algorithm verifies if the transaction is a storing transaction or a genesis transaction. To store a transaction, miners should calculate the times- tampTSand the hash of the previous block (step 14). Finally, in steps 15 to 16, the algorithm return the new block Bi+1, which contains the hash of the previous block, transaction and the hash of the new block. To ensure the system liveness, which means the growth of the system, we will use PBFT [21] consensus for genesis transaction. This consensus handles ffaulty members of the network. If the sum of stakeholders Siin the overlay network is superior to a min 3f+ 1 we accept the demand. For a genesis transaction, the system allocates a new public key to the requester, which will be stored in a new block. IV. PERFORMANCE ANALYSIS In this section, we provide a quantitative performance eval- uation of LC4IoT. First, we conduct a simulation to evaluate the computing power and time consumed by the proof of work consensus. Second, we assess LC4IoT: computational power, memory footprint, and latency. A. Proof of work evaluation The proof of work is the consensus algorithm that secures the network by demanding to the requester some work. An example of BC that uses the proof of work consensus is Bitcoin [22]. To reach an agreement among users, each node of the network calculates a hash value called “Nonce” in the block header. Miners in the network will try to estimate a secret value, then embed it in the block. All information inside the block header will be combined, next inputted to a SHA- 256 hash function. The first miner who will reach a hash function output less than a threshold can add the new block to the chain. The new block is then broadcast to network users. In Bitcoin, a valid block hash requires that it starts with several zeros, which refer to difficulty level, adjusted to limit block generations. Currently, the difficulty reached by the Bitcoin is /tildelow18 zeros [23]. Since we cannot choose the hash value of a block, miners try several combinations to solve this puzzle. To demonstrate the drawbacks of the proof of work consensus, we implement a proof of work using JavaScriptAlgorithm 1 Block appending algorithm Input8Tk2T,8Bi2B,8Oi2O; Output New blockBi+1; 1:Initialize: 2:Tk: A transaction from the verified transaction pool. 3:Bi: The last appended block in the blockchain B. 4:Oi: Oracle, 5:m: The number of Oracles in the network 6:j= 0 7:whilejmjjTk:output (2)6=Oj:sigdo 8:j j+ 1 9: 10:end while 11:ifj=m+ 1 12:Return False 13:else 14: whilei0jj 15: Bi:Ti:outputs (2) ==Tk:outputs (o)do 16: 17:i i1 18: end while 19: ifi= 0then 20:Tk GenesisTransaction (Tk) 21: update transaction pool 22: else 23:TS date:gettime () 24:Bi+1:H CalH (i1;Bi:H;TS;T k) 25:Bi+1 Bi+1(Bi:H;TS;T k;Bi+1:H) 26:Return B i+1 27: end if 28:end if Fig. 3: Proof of work evaluation enabling change of difficulty. We simulate the appending of one block on Intel machine Core™ i7-8550U CPU @ 1.80 GHz 2.00 GHz with 16.0 RAM. Fig. 3 shows the results of processing time and computational power. Simulation result proves that we cannot use a proof of work consensus in the context of the food supply chain. Fig. 4: computational power evaluation B. Performance evaluation In this section, we evaluate LC4IoT in contrast to the proof of work consensus. In our experiments, we fixed the difficulty variable to 4 for the proof of work. We use the following evaluation metrics: computational power, memory footprint and processing time. We run the simulation 3 times to add 10 blocks into the BC and record CPU evolution during the time. Fig. 4 shows the results of computational power used by both consensuses. Localmax annotation refers to the consensus execution peak. As we mentioned before, we separate transaction verification from block appending, Oracles network oversees transactions, whereas miners append blocks to the ledger. To quantify the advantages of this design decision, we perform simulation while we alter the number of blocks to add to the BC; simulation results are presented in Fig. 5. Some BC mining algorithms are memory intensive; RAM footprint required by consensus is higher than system avail- ability. By comparing the memory usage of both consensuses, we display the need for a high-powered computer to perform mining and solve the complex puzzle for the proof of work. Even if proof of work algorithm makes memory requirements seem secondary in comparison with the high-computational power consumed, a lot of RAM usage will make mining run more slowly; leading to an increase in the delay. LC4IoT algorithm improves block verification process and entails a low memory growth rate of 0:362% per block. The delay metric, shown in Fig. 6, refers to the time consumed by the algorithm to append blocks into the ledger. In Fig. 6 the delay evaluation of the proof of work and LC4IoT are illustrated. As evidenced by the figure, the proof of work delay increases with the number of blocks to add in the BC. The proof of work consumes 7.81s to append 10 blocks, while LC4IoT only needs 0.139s for the same number of blocks. V. R ELATED WORK Various works have been conducted for using BC in the IoT context. Fern ´andez-Caram ´es et al. reviewed the state of the art of BC and IoT applications and evaluated the limitations of BC usage for IoT applications [8]. Likewise, BC who implements smart contracts were used for several purposes. Choi et al. utilized BC smart contracts to secure the control of IoT sensors [15]. Novo et al. proposed a distributed IoT Fig. 5: Memory evaluation Fig. 6: Delay evaluation architecture based on BC smart contracts to ensure access management. This architecture uses a proof of concept con- sensus [9] and private BC to secure information. Yet, using a private BC may restrict access to information with a general interest for users. Michelin et al. designed a SpeedyChain framework based on BC, allowing smart vehicles to share data in a secure matter [12]. Liu et al. presented a BC framework ensuring data integrity [14]. Further, BC has helped the supply chain overcoming its limitations such as transparency, relia- bility and integrity. Tian et al. in [24] proposed a conceptual framework for agricultural produce traceability using BC and Radio-Frequency Identification (RFID) technology. The BC stores information provided by the RFID technology to help track produce. Korpela et al. in [25] studied the requirement for supply chain integration with the BC. This investigation proposed the usage of Cloud applications to achieve inter- operability in the supply chain. However, both proposals in [24] and [25] do not take into consideration the high number of transactions managed by BC. The supply chain conveys a high volume of communications and requires real-time access to information. A conventional BC needs from seconds to minutes to append a block into the chain. As an example, for Bitcoin BC, block generation takes 10 minutes [26]. Several BC consensuses require high computational power, which is not suitable for the constrained nature of IoT sensors. In their work, Su et al. developed and implemented a supply chain based on BC technology, using Ethereum consensus [10]. Pass et al. proposed a fruitChain protocol using the proof of work consensus [11]. Both the proof of work consensus and the Ethereum consensus need high computing resources for block appending. Dorri et al. proposed a lightweight scalable blockchain (LSB) that reduces the delay for appending data to the BC [27]. In [27], however, the proposed BC architecture does not address how external data outside the network is accessed. VI. C ONCLUSION Blockchain (BC) establishes trust among different parties who could be dishonest, enabling data sharing in a secure matter. The use of BC in an IoT context may offer several ben- efits like trustworthiness and data non-repudiation. However, the constrained nature of IoT sensors is incompatible with the high computational power needed for the BC. In this paper, we presented a secure IoT BC architecture whose usage was illus- trated for the use case of a food supply chain. The proposed architecture uses an Oracles’ network and smart contracts, ensuring produce traceability and system openness. Further, we proposed using a lightweight consensus for IoT (LC4IoT), which reduces computational power, storage capability, and latency. Simulation results highlighted the effectiveness of the proposed consensus. ACKNOWLEDGEMENT The authors would like to thank the Natural Sciences and Engineering Research Council of Canada, as well as FEDER and GrandEst Region in France, for the financial support of this research. REFERENCES [1] E. D. Ngangue Ndih and S. Cherkaoui, “On Enhancing Technology Coexistence in the IoT Era: ZigBee and 802.11 Case,” IEEE Access , vol. 4, pp. 1835–1844, 2016. [2] A. Rachedi, M. H. Rehmani, S. Cherkaoui, and J. J. P. C. Rodrigues, “IEEE Access Special Section Editorial: The Plethora of Research in Internet of Things (IoT),” IEEE Access , vol. 4, pp. 9575–9579, 2016. [3] E. D. Ngangue Ndih, S. Cherkaoui, and I. Dayoub, “Analytic Modeling of the Coexistence of IEEE 802.15.4 and IEEE 802.11 in Saturation Conditions,” IEEE Communications Letters , vol. 19, no. 11, pp. 1981– 1984, Nov. 2015. [4] A. Aris, S. F. Oktug, and T. V oigt, “Security of Internet of Things for Reliable Internet of Services,” p. 36. [5] M. Conoscenti, A. Vetr `o, and J. C. D. Martin, “Blockchain for the Internet of Things: A systematic literature review,” in 2016 IEEE/ACS 13th International Conference of Computer Systems and Applications (AICCSA) , Nov. 2016, pp. 1–6. [6] Q. I. Sarhan, “Internet of things: a survey of challenges and issues,” International Journal of Internet of Things and Cyber- Assurance , vol. 1, no. 1, p. 40, 2018. [Online]. Available: http://www.inderscience.com/link.php?id=10011246 [7] E. D. N. Ndih and S. Cherkaoui, “Chapter 17 - Simulation methods, techniques and tools of computer systems and networks,” in Modeling and Simulation of Computer Networks and Systems , M. S. Obaidat, P. Nicopolitidis, and F. Zarai, Eds. Boston: Morgan Kaufmann, Jan. 2015, pp. 485–504. [8] T. M. Fern ´andez-Caram ´es and P. Fraga-Lamas, “A Review on the Use of Blockchain for the Internet of Things,” IEEE Access , vol. 6, pp. 32 979–33 001, 2018. [9] O. Novo, “Blockchain Meets IoT: An Architecture for Scalable Access Management in IoT,” IEEE Internet of Things Journal , vol. 5, no. 2, pp. 1184–1195, Apr. 2018. [10] S. Su, C. M. University, K. Wang, C. M. University, H. Kim, and C. M. University, “SmartSupply: Smart Contract Based Validation for Supply Chain Blockchain,” p. 6. [11] R. Pass and E. Shi, “FruitChains: A Fair Blockchain,” in Proceedings of the ACM Symposium on Principles of Distributed Computing - PODC ’17. Washington, DC, USA: ACM Press, 2017, pp. 315–324.[12] R. A. Michelin, A. Dorri, R. C. Lunardi, M. Steger, S. S. Kanhere, R. Jurdak, and A. F. Zorzo, “SpeedyChain: A framework for decoupling data from blockchain for smart cities,” arXiv:1807.01980 [cs] , Jul. 2018. [13] J. Adler, R. Berryhill, A. Veneris, Z. Poulos, N. Veira, and A. Kastania, “Astraea: A Decentralized Blockchain Oracle,” arXiv:1808.00528 [cs] , Aug. 2018. [14] B. Liu, X. L. Yu, S. Chen, X. Xu, and L. Zhu, “Blockchain Based Data Integrity Service Framework for IoT Data,” in 2017 IEEE International Conference on Web Services (ICWS) , Jun. 2017, pp. 468–475. [15] S. S. Choi, J. W. Burm, W. Sung, J. W. Jang, and Y . J. Reo, “A Blockchain-based Secure IoT Control Scheme,” in 2018 International Conference on Advances in Computing and Communication Engineer- ing (ICACCE) , Jun. 2018, pp. 74–78. [16] Z. Zheng, S. Xie, H. Dai, X. Chen, and H. Wang, “An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends,” in2017 IEEE International Congress on Big Data (BigData Congress) , Jun. 2017, pp. 557–564. [17] N. Bozic, G. Pujolle, and S. Secci, “A tutorial on blockchain and applications to secure network control-planes,” in 2016 3rd Smart Cloud Networks Systems (SCNS) , Dec. 2016, pp. 1–8. [18] S. Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System,” p. 9. [19] D. G. Wood, “ETHEREUM: A SECURE DECENTRALISED GENER- ALISED TRANSACTION LEDGER,” p. 32. [20] “Bitcoin Cash - Peer-to-Peer Electronic Cash.” [Online]. Available: https://www.bitcoincash.org/ [21] Z. Zheng, S. Xie, H. Dai, X. Chen, and H. Wang, “An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends,” in2017 IEEE International Congress on Big Data (BigData Congress) , Jun. 2017, pp. 557–564. [22] A. Gervais, G. O. Karame, K. W ¨ust, V . Glykantzis, H. Ritzdorf, and S. Capkun, “On the Security and Performance of Proof of Work Blockchains,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security , ser. CCS ’16. New York, NY , USA: ACM, 2016, pp. 3–16. [23] Blockchain.com, “Blocks mined on 12/04/2019,” https: //www.blockchain.com/btc/blocks/, 2019. [24] “An agri-food supply chain traceability system for China based on RFID amp;amp; blockchain technology,” in 2016 13th International Conference on Service Systems and Service Management (ICSSSM) , Jun. 2016, pp. 1–6. [25] K. Korpela, J. Hallikas, and T. Dahlberg, “Digital Supply Chain Transformation toward Blockchain Integration,” Jan. 2017. [Online]. Available: http://scholarspace.manoa.hawaii.edu/handle/10125/41666 [26] I. Eyal, A. E. Gencer, E. G. Sirer, and R. van Renesse, “Bitcoin-NG: A Scalable Blockchain Protocol,” p. 16. [27] A. Dorri, S. S. Kanhere, R. Jurdak, and P. Gauravaram, “LSB: A Lightweight Scalable BlockChain for IoT Security and Privacy,” arXiv:1712.02969 [cs] , Dec. 2017.
{ "id": "2201.11370" }
2001.07091
Blockchain Consensus Algorithms: A Survey
In recent years, blockchain technology has received unparalleled attention from academia, industry, and governments all around the world. It is considered a technological breakthrough anticipated to disrupt several application domains. This has resulted in a plethora of blockchain systems for various purposes. However, many of these blockchain systems suffer from serious shortcomings related to their performance and security, which need to be addressed before any wide-scale adoption can be achieved. A crucial component of any blockchain system is its underlying consensus algorithm, which in many ways, determines its performance and security. Therefore, to address the limitations of different blockchain systems, several existing as well novel consensus algorithms have been introduced. A systematic analysis of these algorithms will help to understand how and why any particular blockchain performs the way it functions. However, the existing studies of consensus algorithms are not comprehensive. Those studies have incomplete discussions on the properties of the algorithms and fail to analyse several major blockchain consensus algorithms in terms of their scopes. This article fills this gap by analysing a wide range of consensus algorithms using a comprehensive taxonomy of properties and by examining the implications of different issues still prevalent in consensus algorithms in detail. The result of the analysis is presented in tabular formats, which provides a visual illustration of these algorithms in a meaningful way. We have also analysed more than hundred top crypto-currencies belonging to different categories of consensus algorithms to understand their properties and to implicate different trends in these crypto-currencies. Finally, we have presented a decision tree of algorithms to be used as a tool to test the suitability of consensus algorithms under different criteria.
http://arxiv.org/pdf/2001.07091v2
Md Sadek Ferdous, Mohammad Jabed Morshed Chowdhury, Mohammad A. Hoque, Alan Colman
cs.DC
cs.DC
1 Blockchain Consensus Algorithms: A Survey Md Sadek Ferdous, Member, IEEE, Mohammad Jabed Morshed Chowdhury, Mohammad A. Hoque, Member, IEEE , and Alan Colman F Abstract —In recent years, blockchain technology has received unpar- alleled attention from academia, industry, and governments all around the world. It is considered a technological breakthrough anticipated to disrupt several application domains touching all spheres of our lives. The sky-rocket anticipation of its potential has caused a wide-scale exploration of its usage in different application domains. This has resul- ted in a plethora of blockchain systems for various purposes. However, many of these blockchain systems suffer from serious shortcomings related to their performance and security, which need to be addressed before any wide-scale adoption can be achieved. A crucial component of any blockchain system is its underlying consensus algorithm, which in many ways, determines its performance and security. Therefore, to address the limitations of different blockchain systems, several existing as well novel consensus algorithms have been introduced. A systematic analysis of these algorithms will help to understand how and why any particular blockchain performs the way it functions. However, the existing studies of consensus algorithms are not comprehensive. Those studies have incomplete discussions on the properties of the algorithms and fail to analyse several major blockchain consensus algorithms in terms of their scopes. This article fills this gap by analysing a wide range of consensus algorithms using a comprehensive taxonomy of properties and by examining the implications of different issues still prevalent in consensus algorithms in detail. The result of the analysis is presented in tabular formats, which provides a visual illustration of these algorithms in a meaningful way. We have also analysed more than hundred top crypto-currencies belonging to different categories of consensus al- gorithms to understand their properties and to implicate different trends in these crypto-currencies. Finally, we have presented a decision tree of algorithms to be used as a tool to test the suitability of consensus algorithms under different criteria. Index Terms —Blockchain, Distributed Consensus, Proof of Work, PoW, Proof of Stake, PoS, Delegated Proof of Stake, DPoS. 1 I NTRODUCTION In the last few years, blockchain has received wide-spread attention among the industry, the Government, and aca- demia alike. This interest has been piqued by the success M. S. Ferdous is with Shahjalal University of Science and Technology, Sylhet 3114, Bangladesh and Imperial College London, London SW7 2AZ, U.K. E- mail: sadek-cse@sust.edu. Mohammad Jabed Morshed Chowdhury is with La Trobe University, Mel- bourne, Victoria-3086, Australia. E-mail: m.chowdhury@latrobe.edu.au. Mohammad A. Hoque is with University of Helsinki, 3835 Helsinki, Helsinki Finland. E-mail: mohammad.a.hoque@helsinki.fi. Alan Coleman is with Swinburne University of Technology, Hawthorn, Australia. E-mail: acolman@swin.edu.au.of Bitcoin [1] that was introduced in 2008. While crypto- currencies have emerged as the principal and the most pop- ular application of blockchain technology, many enthusiasts from different disciplines have identified and proposed a plethora of applications of blockchain in a multitude of application domains [2], [3]. The possibility of exploiting blockchain in so many areas has created huge anticipation surrounding blockchain systems. Indeed, it is regarded as one of the fundamental technologies to revolutionise the landscapes of the identified application domains. A blockchain system is, fundamentally, a distributed system that relies on a consensus algorithm that ensures agreement on the states of certain data among distributed nodes. A consensus algorithm is the core component that directly dictates how such a system behaves and the per- formance it can achieve. Distributed consensus has been a widely studied research topic in distributed systems, however, with the advent of blockchain, it has received renewed attention. A wide variety of crypto-currencies targeting different application domains has introduced an array of unique requirements that can only be satisfied by their corresponding consensus mechanisms. This fact has fuelled the need not only to examine the applicability of existing consensus algorithms in newer settings, but also to innovate novel consensus algorithms. Consequently, several consensus algorithms have emerged, each of which pos- sesses interesting properties and unique capabilities. As the characteristics of various types of blockchain systems are fundamentally dependent on the consensus algorithms they use, a systematic analysis of existing con- sensus algorithms is required. It is necessary to examine, compare, and contrast these algorithms. There have a been a number of attempts aiming to fulfil this goal can be found in [4], [5], [6], [7], [8], [9], [10]. In particular, the works carried out by Cachin et al. [4] and Bano et al. [5] are noteworthy as they represent the pioneer works in this scope. Cachin et al., in their work, have explored different aspects of distributed systems and consensus and focused on consensus algorithm deployed in blockchain systems that are not to open to the public. On the other hand, the focus of the work by Bano et al. is more general in the sense they have explored consensus algorithms used both in public as well as private systems. Another exceptional work is by Wang et al. [6] in which the authors have presented a comprehensive survey of different aspects of consensus, mining, and blockchains in a detailed fashion. However, all these works have some major shortcom-arXiv:2001.07091v2 [cs.DC] 7 Feb 2020 2 ings. For example, the factors upon which the consensus algorithms have been analysed are not comprehensive. Importantly, a wide range of consensus algorithms and their internal mechanisms utilised in many existing crypto- currencies have not been considered at all. In addition, all of these studies have failed to capture the practical interrela- tion between blockchain systems (mostly crypto-currencies) and their corresponding consensus algorithms. All in all, there is a pressing need for a study that analyses a wide range of existing consensus algorithms and the blockchain systems in a practical-oriented way and synthesises this analyses into a conceptual framework in a concise yet com- prehensive manner. The principal motivation of this article is to fill in this gap. Contributions. The main contributions of the article are presented below: A novel taxonomy of consensus properties, capturing different aspects of a consensus algorithm, has been cre- ated. In this taxonomy, consensus algorithms have been categorised in two major categories: incentivised and non-incentivised algorithms, which have been again sub-divided as per different considerations. Consensus algorithms belonging to each sub-category analysed together using the taxonomy of consensus properties. The analysis of each sub-category has been summarised in tabular formats so as to visually represent it in a comprehensible way. For each category (and the sub-category, if any), the cor- responding blockchain systems (predominantly crypto- currencies) have been analysed as well. The ana- lysis result has been presented in a concise fashion, which can be used to understand the inter-relation between these systems and their underlying consensus algorithms. The major issues in each category of consensus al- gorithm have been examined in detail, and their im- plications have been further analysed. Over hundred crypto-currencies, belonging to different consensus algorithms, have been examined to under- stand their different properties. These properties then have been utilised to analyse and identify different trends among these crypto-currencies. Finally, a decision tree of consensus algorithms have been presented. This tree can be utilised to test the suit- ability of a consensus algorithm under certain criteria. In short, with these contributions, this article represents one of the most comprehensive studies of blockchain consensus algorithms as of now. Structure. In Section 2 we present a brief background on dis- tributed consensus, highlighting its different components, types and properties. Section 3 outlines a brief presentation on blockchain covering its different aspects such as types, properties, layers. A taxonomy of consensus algorithms and their underlying properties is presented in Section 4. Section 5 and Section 6 analyse different incentivised consensus algorithm whereas Section 7 examines the different non- incentivised consensus algorithms. Finally, we conclude in Section 8 with a detailed discussion on different issues involving the analysed consensus algorithms and the cor-responding crypto-currencies. 2 B ACKGROUND : DISTRIBUTED CONSENSUS Consensus mechanisms in distributed systems have been a well studied research problem for nearly three decades. Such mechanisms enable consensus to be achieved regard- ing a shared state/data among a set of distributed nodes. The need for a shared state originated the notion of replic- ated database systems in order to ensure resilience against node failures within a network. Such database systems ensure that data is not lost when one or more nodes fail to function in an excepted fashion. The notion of the replicated database can be generalised with the concept of State Machine Replication (SMR) [11]. The core idea behind SMR is that a computing machine can be expressed as a deterministic state machine . The machine accepts an input message, performs its predefined computa- tion, and might produce an output/response. These actions essentially change its state. SMR conceptualises that such a state machine, with an initial state, can be replicated among different nodes. If it can be ensured that all the participating nodes receive the same set of input messages in the exact same order (the phenomenon known as atomic broadcast ), then each node would be able to evolve the states of its state machine individually in exactly the same fashion. This can guarantee consistency and availability regarding the state of the machine (as well as data it holds) among all (applicable) nodes even in the presence of node failures. Once this occurs, it can be said that a distributed consensus has emerged among the participating nodes. It is imperative that a protocol is defined to ensure timely dissemination and atomic broadcast of input messages among the nodes and, in many ways, dictates how a distributed consensus is achieved and maintained. Hence, such a protocol is aptly called a consensus protocol. Designing and deploying a consensus protocol is a chal- lenging task as it needs to consider several crucial issues such as resiliency against node failures, node behaviour, network partitioning, network latency, corrupt or out-of- order inputs, and so on [7]. Schneider pointed out that there are two crucial requirements to reach and maintain consensus among distributed nodes. The first requirement is a deterministic state machine. The second requirement is aconsensus protocol to disseminate inputs in a timely fashion and to ensure atomic broadcast among the participating nodes. At the same time, the consensus protocols must ensure the properties of the atomic broadcast [12], [13], [4], [5]. The properties of atomic broadcast in distributed consensus is illustrated in Table 1. One way to achieve the design goals of such a protocol is to make certain assumptions under which the protocol is proved to function properly. These assumptions influence the critical characteristics of a consensus protocol. Next, we explore two sets of widely-used assumptions for any distributed consensus protocol. The first set of assumptions are about the underly- ing networking type. Dwork et al. categorised three types of networks exhibiting different properties: synchronous, asynchronous, and partially/eventually synchronous [22]. The latency involved in delivering a message to all nodes 3 PropertiesNote ValidityThis guarantees that if a message is broadcast by a valid node, it will be correctly included within the consensus protocol. AgreementThis is to guarantee that if a message is de- livered to a valid node, it will ultimately be delivered to all valid nodes. IntegrityThis is to ensure that a message is broadcast only once by a valid node. Total OrderThis is to ensure that all nodes agree to the order of all delivered messages. Table 1: Atomic broadcast Properties of Distributed Con- sensus Protocols. Properties Note Safety/ Con- sistencyA consensus protocol is considered safe (or con- sistent) only when all nodes produce the same valid output, according to the protocol rules, for the same atomic broadcast. Liveness/ availabilityIf all non-faulty participating nodes produce an output (indicating the termination of the pro- tocol), the protocol is considered live. Fault ToleranceIt exhibits the network’s capability to perform as intended in the midst of node failures. Table 2: Properties of Distributed Consensus Protocols. in a synchronous network is bound by some time denoted as. On the other hand, the latency in an asynchronous network cannot be reliably bound by any . Finally, in a par- tially/eventually synchronous network, it is assumed that the network will eventually act as a synchronous network, even though it might be asynchronous over some arbitrary period of time. The second set of assumptions is about the different properties of a consensus protocol. According to [7], a con- sensus protocol should have the following three properties; namely consistency, availability, and fault tolerance. These properties are elaborated in Table 2 A well-known theorem, by Fischer, Lynch and Paterson [23], called FLP Impossibility has shown that a deterministic consensus protocol cannot satisfy all three properties described above in an asynchron- ous network. It is more common to tend to favour safety and liveness over fault tolerance in the domain of distributed system applications. A related theorem is the CAP theorem [24], which states that a shared replicated datastore (or, more generally, a replicated state machine) cannot achieve both consistency and availability when a network partitions in such a way that an arbitrary number of messages might be dropped. In addition to the above assumptions, there are two major fault-tolerance models within distributed systems: crash failure (or tolerance) and Byzantine failure [5], [7], [4]. The crash failure model deals with nodes that simply fail to respond due to some hardware or software failures. It may happen any time without any prior warning, and the corresponding node remains unresponsive until further actions are taken. Byzantine failure, on the other hand, deals with nodes that misbehave due to some software bugs or because of the nodes being compromised by an adversary. This type of failure was first identified and formalised by Leslie Lamport in his seminal paper with a metaphoricalByzantine General’s problems [14]. A Byzantine node can behave maliciously by arbitrarily sending deceptive mes- sages to others, which might affect the security of distrib- uted systems. Hence, such nodes are mostly relevant in application with security implications. To handle these two failure models, two corresponding major types of consensus mechanisms have emerged: Crash- tolerant consensus and Byzantine consensus [4]. Next, we briefly discuss each of them, along with their associated properties. 1)Crash-tolerant consensus: Algorithms belonging to this class aim to guarantee the atomic broadcast (total or- der) of messages within the participating nodes in the presence of certain number of node failures. These algorithms utilise the notion of views or epochs, which imply a certain duration of time or events. A leader is selected for each epoch who takes decisions regard- ing the atomic broadcast, and all other nodes comply with its decision. In case a leader fails due to a crash failure, the protocols elect a new leader to function. The best known algorithms belonging to this class can continue to function if the following condition holds: t < n= 2where tis the number of faulty nodes and n is the total number of participating nodes [4]. Examples of some well-known crash-tolerant consensus protocol are: Paxos [15], [16], Viewstamped Replication [17], ZooKeeper [18], and Raft [19]. 2)Byzantine consensus: This class of algorithms aim to reach consensus amid of certain nodes exhibiting Byz- antine behaviour. Such Byzantine nodes are assumed to be under the control of an adversary and behave un- predictably with malicious intent. Similar to any crash- tolerant consensus protocol, these protocols also utilise the concept of views/epochs where a leader is elected in each view to order messages for atomic broadcast, and other honest nodes are assumed to follow the in- structions from the leader. One of the most well-known algorithms under this class is called Practical Byzantine Fault Tolerant (PBFT), which can achieve consensus in the presence of a certain number of Byzantine nodes under an eventual synchronous network assumption [20]. The tolerance level of PBFT is f < n= 3, where fthe number of Byzantine nodes and ndenotes the number of total nodes participating in the network [4]. As we will explore later, PBFT algorithms have been widely utilised in different blockchain systems. 3 B ACKGROUND : BLOCKCHAIN In this section, we present a brief introduction to the block- chain technology and it related terminologies. At the centre of the blockchain technology is the blockchain itself stored by the nodes of a P2P network. A blockchain is a type of distributed ledger consisting of consecutive blocks chained together following a strict set of rules. Here, each block is created at a predefined interval, or after an event occurs, in a decentralised fashion by means of a consensus algorithm. Within each block, there are transactions by which a value is transferred in case of crypto-currencies or a data is stored for other blockchain systems. The consensus algorithm guar- 4 antees several data integrity related properties (discussed below) in blockchain. Even though the terms blockchain and DLT (Distributed Ledger Technology) are used inter-changeably in the literat- ure, there is a subtle difference between them which is worth highlighting. A blockchain is just an example of a particular type of ledger, there are other types of ledger. When a ledger (including a blockchain) is distributed across a network, it can be regarded as a Distributed Ledger. Since the blockchain technology has been introduced with Bitcoin, it will be useful to understand how Bitcoin works. In Section 3.1, we discuss a brief primer of Bitcoin and its associated terminologies. Then, we describe differ- ent properties and types of blockchains in Section 3.2 and Section 3.3 respectively. Finally, we present the concept of blockchain layers in Section 3.4. 3.1 Bitcoin The Bitcoin network consists of nodes within a P2P (Peer- to-Peer) network. Each node needs to download the Bitcoin software to connect to the network. There are different types of nodes in the network, with miner nodes and general nodes being the major ones. A general node is mostly used by users to transfer bitcoin in the network, whereas a miner node is a special node used for mining bitcoins (see below). Each user within a node needs to utilise wallet software to create identities. An identity in the Bitcoin network con- sists of a private/public key pair, and a bitcoin address is derived from the corresponding public key. A sender needs to know such an address of the receiver to transfer any bitcoin. Bitcoin is transferred between two entities using the notion of a transaction where the sender utilises a wallet software for this purpose. This transaction is propagated to the network, which is collected by all miner nodes. Each miner node combines these transactions into a block and then engages in solving a cryptographic puzzle, with other miners, in which it tries to generate a random number which satisfies the required condition (the random number must be less than a target value called the difficult target ). When a miner successfully solves the puzzle, that miner is said to have generated a valid block which is then propagated in the network. The Bitcoin protocol generates a certain amount of new Bitcoins for each new valid block and rewards the miner for its effort in creating the block. Other miners validate this newly mined block and then add it to the blockchain. Each new block refers to the last block in the chain, which in turn refers to its previous block, and so on. The very first block in the chain, known as the genesis block , however, has no such reference. The decentralised nature of this mining process might result in multiple valid blocks generated by different miners and propagated at the same time in the network. All of them are added to the blockchain and they refer to the same last block in the chain. Consequently, multiple branches emerge from the same blockchain. This is a natural phenomenon in blockchain and is aptly known as fork. The fundamental goal of the corresponding consensus protocol is to resolve this fork so that only one branch remains and other branches are discarded. The consensus algorithm utilised in Bitcoin follows a simple rule: it lets the branches grow. As soon asFigure 1: Block Generation Process of Bitcoin A Each miner collects transactions that are broadcast in the network and uses her hashpower to try to generate a block via repeated invocation of a hash function on data. The data consists of the transactions that she saw fit to include, the hash of the previous block, her public key address, and a nonce. B When a miner succeeds in generating a block, mean- ing that the hash of her block data is smaller than the current difficulty target, she broadcasts her block to the network. C The other miners continue to extend the blockchain from this new block, only if they find that this block is valid, i.e., it refers the hash of the previous block of the longest chain and meets the current difficulty target. D The block reward (newly minted coins) and the fees from the transactions go to the miner’s public address. This means that only the miner can spend those by signing with her corresponding private key. E The difficulty level readjusts according to the mining power of the participates, by updating the hash target value every 2016 blocks ( 2 weeks) so that blocks get generated once every 10 minutes on average. F The block reward starts at 50 coins and halves in every 210, 000 blocks, i.e., about every 4 years. one branch grows longer than the others (more specifically, the total cumulative computational effort of one branch ex- ceeds the others), all miners select the longest branch (or the branch with the highest computational effort), discarding all other branches. Such a branch is known as the main branch and other branches are known as orphan branches. Only the miners in the main branch are entitled to receive their Bitcoin rewards. When a fork is resolved across the network, a distributed consensus emerges in the network. The frequency of Bitcoin block generation depends on the difficulty parameter, which is adjusted after 2016 blocks. The protocol adjusts the difficulty parameter in such a way that a block is generated in every 10 minutes on average. However, the Bitcoin reward is halved after every 210;000 blocks, or approximately after every 4years. At the initial stage, the reward for generating a valid block had been 50Bitcoins, which was halved to 25Bitcoins in 2012 and 12:5Bitcoins in 2016 . The next halving will occur in 2020 where the reward will be reduced to 6:25bitcoins per block. This geometric reduction in every four years underlines a maximum total supply of 21million of Bitcoins. It is expected that this supply will be exhausted in the year of 2140 when the rewarded bitcoin will be infinitesimally small for each block. The process of Bitcoin protocol is presented in Figure 1. 3.2 Properties of blockchain A blockchain exhibits several properties that make it a suitable candidate for several application domains [25]. The properties are discussed below. 5 Distributed consensus on the chain state : One of the crucial properties of any blockchain is its capability to achieve a distributed consensus on the state of the chain without being reliant on any trusted third party. This opens up the door of opportunities to build and utilise a system where states and interactions are verifiable by the miners in public blockchain systems or by the authorised entities in private blockchain systems. Immutability and irreversibility of chain state : Achieving a distributed consensus with the participa- tion of a large number of nodes ensures that the chain state becomes practically immutable and irreversible after a certain period of time. This also applies to smart- contracts and hence enabling the deployment and exe- cution of immutable computer programs. Data (transaction) persistence : Data in a blockchain is stored in a distributed fashion, ensuring data persist- ence as long as there are participating nodes in the P2P network. Data provenance : The data storage process in any blockchain is facilitated by means of a mechanism called the transaction. Every transaction needs to be digitally signed using public key cryptography, which ensures the authenticity of the source of data. Combin- ing this with the immutability and irreversibility of a blockchain provides a strong non-repudiation instru- ment for any data in the blockchain. Distributed data control : A blockchain ensures that data stored in the chain or retrieved from the chain can be carried out in a distributed manner that exhibits no single point of failure. Accountability and transparency : Since the state of the chain, along with every single interactions among participating entities, can be verified by any authorised entity, a blockchain promotes accountability and trans- parency. 3.3 Blockchain type Depending on the application domains, different blockchain deployment strategies can be pursued. Based on these strategies, there are predominantly two types of block- chains, namely Public and Private blockchain, as discussed below: Public blockchain : A public blockchain, also known as theUnpermissioned or permissionless Blockchain , allows anyone to participate in the blockchain to create and validate blocks as well as to modify the chain state by storing and updating data through transactions among participating entities. This means that the blockchain state and its transactions, along with the data stored is transparent and accessible to everyone. This raises privacy concerns for particular scenarios where the privacy of such data needs to be preserved. Private blockchain : A private blockchain, also known as the Permissioned Blockchain , has a restrictive notion in comparison to its public counterpart in the sense that only authorised and trusted entities can participate in the activities within the blockchain. By allowing only authorised entities to participate in activities within the blockchain, a private blockchain can ensure the privacyof chain data, which might be desirable in some use- cases. 3.4 Blockchain Layers There are several components in a blockchain system whose functionalities range from collecting transactions, propagat- ing blocks, mining, achieving consensus and maintaining the ledger for its underlying crypto-currencies, and so on. These components can be grouped together according to their functionalities using different layers similar to the well-known TCP/IP layer. In fact, there have been a few suggestions to design a blockchain system using a layered approach [26], [27]. The motivation is that a layered design will be much more modular and easier to maintain. For example, in case a bug is found in a component of a layer in a blockchain system, it will only affect the functionalities of that corresponding layer while other layers remain unaf- fected. For example, David et al. [27] suggest four layers: consensus, mining, propagation, and semantic. However, we believe that the proposed layers do not reflect the proper grouping of functionalities. For example, consensus and mining should be part of the same layer as mining can be considered an inherent part of achieving consensus. In addition to this, some blockchain systems might not have any mining algorithms associated with it. In this paper, we, therefore, will define four layers (Figure 2): network, consensus, application, and meta-application. The function- alities of these layers are briefly presented below. Meta-Application Layer: The functionalities of the meta- application layer in a blockchain system (see Figure 2) is to provide an overlay on top of the application layer to exploit the semantic interpretation of a blockchain system for other purposes in other application domains. For example, Bitcoin has been experimented to adopt in multiple application domains, such as DNS like decentralised naming system (Namecoin [28]), decentralised immutable time-stamped hashed record (Proof of Existence [29]), and decentralised PKI (Public Key Infrastructure), such as Certcoin [30]. Application Layer: The application layer (in Figure 2) defines the semantic interpretation of a blockchain system. An example of a semantic interpretation would be to define a crypto-currency and then set up protocols for how such a currency can be exchanged between different entities. Another example is to establish protocols to maintain a state machine embodying programming capabilities within the blockchain, which can be exploited to create and deploy immutable code (the so-called smart contract ). The applic- ation also defines the rewarding mechanism, if any, in the blockchain system. Consensus Layer: The consensus layer, as presented in Fig- ure 2, is responsible for providing the distributed consensus mechanism in the blockchain that essentially governs the order of the blocks. A critical component of this layer is the proof protocol (e.g., proof of work and proof of stake) that is used to verify every single block, which ultimately is used to achieve the required consensus in the system. Network Layer: The components in the network layer are responsible for handling network functionalities which in- clude joining in the underlying P2P network, remaining 6 ConsensusOrphanedbranchXXOrphanedbranchMainbranchCrypto-currencySMART Contracte-VotingPKIEscrowingCasinoDNSNetworkLayerConsensusLayerApplicationLayerMeta-ApplicationLayer Figure 2: Blockchain Layers in the network by following the underlying networking protocol, disseminating the current state of the blockchain to newly joined nodes, propagating and receiving transactions and blocks and so on. 4 C ONSENSUS TAXONOMY &PROPERTIES With the introduction and advancement of different block- chain systems, there has been a renewed interest in distrib- uted consensus with the consequent innovation of different types of consensus algorithms. These consensus algorithms have different characteristics and functionalities. In this section, we first distinguish between two major types of consensus and then present a taxonomy of their properties. Later, in Section 5 and 6, we explore numerous crypto currencies and discuss incentivised consensus algorithms. Similarly, we focus on non-incentivised consensus and the blockchain applications in Section 7. Consensus mechanisms used by the various blockchain systems can be classified based on the reward mechanism that participating nodes might receive. Therefore, we first classify the consensus mechanisms in blockchain systems into two categories: incentivised and non-incentivised al- gorithms. Incentivised Consensus. Some consensus algorithms re- ward participating nodes for creating and adding a new block in the blockchain. Such algorithms belong to this category. These algorithms are exclusively used in public Consensus propertiesStructural propertiesBlock & reward propertiesSecurity propertiesPerformance propertiesFigure 3: Taxonomy of consensus properties. blockchain systems and the reward provided acts as an incentive for participating nodes to behave accordingly and to follow the corresponding consensus protocol rigorously. Non-incentivised Consensus. Private blockchain systems deploy a type of consensus algorithms that do not rely on any incentive mechanism for the participating nodes to create and add a new block in the blockchain. Such algorithms belong to this category. With the absence of any reward mechanism, these nodes are considered trusted as only authorised (allowed) nodes can participate in the block creation process of the consensus algorithm. 4.1 Consensus properties Each consensus algorithm has different characteristics and serves different purposes. To compare these disparate groups of consensus algorithms, we need to define eval- uation criteria. In this section, we present this evaluation criteria in the form of taxonomies of consensus proper- ties. These properties have been collected from existing researches, such as [5], [4], and compiled as a taxonomy in this work. The taxonomy is presented in Figure 3. According to this taxonomy, a consensus mechanism has four major groups of properties: Structural ,Block & reward ,Security and Perform- ance properties. Each of these properties is briefly discussed below. 4.1.1 Structural properties Structural properties define how different nodes within a blockchain network are structured to participate in a con- sensus algorithm. These properties can be sub-divided into different categories as illustrated in Figure 4. We briefly describe each of these categories below. Node types: It refers to different types of nodes that a consensus algorithm is required to engage with to achieve its consensus. The types will depend on the consensus algorithm which will be presented in the subsequent section. Structure type: It refers to the ways different nodes are structured within the consensus algorithm using the concept of a committee. The committee itself can be of two types: single and multiple committees. Each of these committees is described below. Underlying mechanism: It refers to the specific mechan- ism that a consensus algorithm deploys to select a particular node . The mechanism can utilise lottery, the age of a particular coin or a voting mechanism. A lottery can 7 Structural propertiesNode typeStructure typeSingleTypeOpenCloseFormationImplicitExplicitConfigurationStaticDynamicMultipleTopologyFlatHierarchichalConfigurationStaticDynamicUnderlying mechanismLotteryProbabilisticRandomisedVotingSingleMultipleCoin-age Figure 4: Taxonomy of structural properties. utilise either a cryptography based probabilistic mech- anism or other randomised mechanisms. In a voting mechanism, voting can be carried out either in a single or multiple rounds. The coin-age, on the other hand, utilises a special property, which depends on how long a particular coin has been owned by its owner. Next, we explore different types of voting committees for existing consensus algorithms. Single committee. A single committee refers to a spe- cial group of nodes among the participating nodes which actively participate in the consensus process by producing blocks and extending the blockchain. Each single committee can have different properties. Next, we briefly explore these properties. Committee type: A committee can be open or close. A committee is open if it is open to any participating nodes or closed if it is restricted to a specific group of nodes. Committee formation: A committee can be formed either implicitly or explicitly. An implicit formation does not require the participating nodes to follow any additional protocol rules to be in the committee, whereas an explicit formation requires a node to follow additional protocol steps to be a part of the committee. Committee configuration: A committee can be con- figured in a static or a dynamic fashion. – Static: In a static configuration, the members of the committee are pre-selected and fixed. No new mem- bers can join and participate in the consensus process. – Dynamic: In a dynamic configuration, the committee members are defined for a time-frame (known as epoch), after which new members are added, and old members are removed based on certain sets of criteria. In such a committee, nodes are selected using a voting mechanism where voting is carried either in a single or multiple rounds. Some consensus al- Block & Reward propertiesGenesis dateBlock rewardTo tal su p p lyBlock timeFigure 5: Taxonomy of block & reward properties. gorithms, however, do not specify any specific time- frame, and hence, members can join or leave any time at will. Nodes in such configuration are selected using a lottery mechanism which utilises either a cryptography based probabilistic mechanism or other randomised mechanisms. Multiple committee. It has been observed that the time it takes to achieve consensus in a single committee tends to increase as the number of the member starts to increase [5], thereby reducing performance. To alleviate this problem, the concept of multiple committee has been introduced, where each committee consists of different validators [5]. A multiple committee can have different properties. Next, we explore two properties. Topology: It refers to the way different committees are organised. For example, the topology can be flat to indicate that different committees are at the same level or can be hierarchical where the committees can be considered in multiple layered levels. Committee configuration: In addition, like a single committee, the multiple committees can be configured in a static or dynamic way. 4.1.2 Block & reward properties Properties under this category can be utilised as quantitat- ive metrics to differentiate different crypto-currencies. The properties are (Figure 5): genesis date, block reward, total supply, formula, and block creation time. These proper- ties do not necessarily characterise different consensus al- gorithm directly, however, most of them (except the genesis date) have a direct and indirect impact on how consensus is achieved in a particular crypto-currency based blockchain system. For example, block reward incentivises miners to act accordingly by solving a cryptographic puzzle, which is then ultimately used to achieve consensus. The properties are described below: Genesis date represents the timestamp when the very first block was created for a particular crypto-currency. Block reward represents the reward a node receives for creating a new block. Total supply represents the total supply of a crypto- currency. Block time represents the average block creation time of a crypto-currency. 4.1.3 Security properties A consensus algorithm must satisfy a number of security properties as shown in (Figure 6) and are described below: Authentication: This implies if nodes participating in a consensus protocol need to be properly verified/au- thenticated. 8 Security propertiesAuthenticationNon-repuditationCensorship reistanceAttack vectorsAdversary toleranceSybil protectionDoSNothing At Stake (NAS)BribingLong-rangeAccumulationGrindingCartel Figure 6: Taxonomy of security properties. Non-repudiation: This signifies if a consensus protocol satisfies non-repudiation. Censorship resistance: This implies if the correspond- ing algorithm can withstand against any censorship resistance. Attack vectors : This property implies the attack vectors applicable to a consensus mechanism. Here, we present a set of attack vectors that are applicable to any con- sensus algorithm. The other attack vectors presented in Figure 6 are applicable to a specific class of consensus algorithm. Therefore, we will discuss them in the up- coming sections, when we explore such algorithms. – Adversary tolerance: This signifies the maximum byzantine nodes supported/tolerated by the respect- ive protocol. – Sybil protection: In a Sybil attack [34], an attacker can duplicate his identity as required in order to achieve illicit advantages. Within a blockchain sys- tem, a sybil attack implicates the scenario when an adversary can create/control as many nodes as re- quired within the underlying P2P network to exert influence on the distributed consensus algorithm and to taint its outcome in her favour. – DoS (Denial of Service) resistance: This implies if the consensus protocol has any built-in mechanism against DoS attacks. 4.1.4 Performance properties The properties belonging to this group can be utilised to measure the quantitative performance of a consensus protocol. A brief description of each property is presented below with its illustration in Figure 7 Fault tolerance: signifies the maximum faulty nodes the respective consensus protocol can tolerate. Performance propertiesFault toleranceThroughputScalabilityLatencyEnergy consumptionFigure 7: Taxonomy of performance properties. Throughput: implies the number of transactions the protocol can process in one second. Scalability: refers to the ability to grow in size and functionalities with- out degrading the performance of the original system [31]. Latency (Finality): refers to ” the time it takes from when a transaction is proposed until consensus has been reached on it” [5]. It is also known as finality. Energy consumption: indicates if the algorithm (or the utilising system) consumes a significant amount of energy. 5 I NCENTIVISED CONSENSUS : POW & P OS In this section, we explore different incentivised consensus algorithms. Such algorithms can be grouped in three major categories: Proof of Work (PoW), Proof of Stake (PoS), and Hybrid Consensus. Among them, this section discusses PoW and PoS algorithms in Section 5.1 and Section 5.2 re- spectively. For readability, hybrid algorithms are presented in Section 6. 5.1 Proof of Work (PoW) A Proof of Work (PoW) mechanism involves two different parties (nodes): prover (requestor) and verifier (provider). The prover performs a resource-intensive computational task intending to achieve a goal and presents it to a verifier or a set of verifiers for validation that requires significantly less resource. The core idea is that the asymmetry, in terms of resource required, between the proof generation and validation acts intrinsically as a deterrent measure against any system abuse. Within this aim, the idea of PoW was first presented by Dwork and Naor in their seminal article in 1993 [33]. They put forward the idea of use PoW to combat email spamming. According to their proposal, an email sender would be required to solve a resource-intensive mathem- atical puzzle and attach the solution within the email as a proof that the task has been performed. The email receiver would accept an email only if the solution can be success- fully verified. Within the blockchain setting, a similar concept has been adopted. Each PoW mechanism is bound to a threshold, known as the difficulty parameter in many blockchain sys- tems. The prover would carry out the computational task in several rounds until a PoW is generated that matches the required threshold, and every single round is known as a single proof attempt. PoW has been the most widely-used mechanism to achieve a distributed consensus among the participants 9 regarding the block order and the chain state. In particu- lar, a PoW mechanism in a blockchain serves two critical purposes: A deterrent mechanism against the Sybil Attack . In PoW, every mining node would require a significant monetary investment to engage in a resource-intensive PoW mechanism during the block creation process. To launch a Sybil attack, the monetary investment of an attacker will be proportional to the number of Sybil identities, which might outweigh any advantage gained from launching a Sybil attack. The PoW mechanism is used as an input to a function which ultimately is used to achieve the required distrib- uted consensus when a fork happens in a blockchain [44]. We differentiate between three major classes of PoW consensus mechanisms: Compute-bound PoW, Memory-bound PoW and Chained PoW. Each of these is explored in the following sections. 5.1.1 Compute-bound PoW ACompute-bound PoW , also known as CPU-bound PoW , employs a CPU-intensive function that carries out the re- quired computational task by leveraging the capabilities of the processing units (e.g., CPU/GPU), without relying on the main memory of the system. These particular charac- teristics facilitate the scenario in which the computation can be massively optimised for faster calculation using Application-specific Integrated Circuit (ASIC) rigs. This has drawn criticisms among the crypto-currency enthusiasts as general people cannot participate in the mining process with their general purpose computers, and the mining process is mostly centralised among a group of mining nodes. Hashcash by Back et al. [45] is the earliest example to leverage a PoW mechanism in practical systems. Similar to the proposal of Dwork and Naor in [33], Hashcash is also designed to combat spams. In this scheme, the email sender would require to generate a SHA-1 hash with a certain prop- erty using as the input a number of information including recipient’s email address and date. The property dictates that the generated hash must have at least 20 bits of leading zeroes. Generating an SHA-1 hash with this property would require the senders to engage in several proof attempts in a pseudo-random fashion. Once the hash is generated, it is added within the email header. The verification on the recipient’s side is rather trivial, which requires comparing a newly generated hash using the required information with the supplied hash. If they match, it proves that the email sender has engaged in the required amount of computa- tional work. The effectiveness of this approach of fighting spams depends on the hypothesis that spammers rely on the revenue model requiring a mere amount of cost to send a single email. When they would need to engage in such a computationally intensive task for sending every single email, the aggregated associated cost might heavily affect their profit margin and thus deter them from spamming. Nakamoto consensus is the compute-bound PoW con- sensus algorithm leveraged in Bitcoin. It is based on the approach of Hashcash, modified to be applied within theblockchain setting. As discussed in Section 3.1, all mining nodes (miners) compete with each other to generate a valid block by finding a solution smaller than the difficulty target. Similar to the idea of HashCash, the miners need to engage in several proof attempts, until the solution is found. In each of these proof attempts, each miner generates a hash using either the SHA-256 or SHA-256d (a double hashing mechanism using SHA-256) algorithm and checks if the generated hash is smaller than the difficulty target. The effect of this distributed engagement is that forks happen, and then the Nakamoto consensus algorithm is utilised to resolve the fork and to achieve a network-wide distributed consensus. The reader is referred back to Section 3.1 (and Figure 1) for a brief description of Nakamoto consensus. Currently, there are many crypto-currencies that utilise the Nakamoto consensus algorithm. Table 3 shows the top 10 of such currencies according to their market capitalisation as rated by CoinGecko1(a website which tracks different activities related to crypto-currencies) as of July 24, 2019. The table also presents their Block and reward properties as presented in Figure 5. It is to be noted that information regarding the properties in Table 3 for these (and other subsequent) currencies has been collected by consulting their corresponding whitepapers, websites and introductory announcements on Reddit website2. 5.1.2 Memory-bound PoW To counteract the major criticism of compute-bound PoWs allowing the utilisation of ASIC-based rigs for the mining purpose (see Section 5.1.1), memory-bound PoWs have been proposed. A memory-bound PoW requires the algorithm to access the main memory several times and thus ultimately binds the performance of the algorithm within the limit of access latency and/or bandwidth as well as the size of memory. This restricts ASIC rigs based on a memory-bound PoW to have the manifold performance advantage over their CPU/GPU based counterparts. In addition, the profit margin of developing ASIC with memory and then building mining rigs with them is not viable as of now for these classes of PoWs. Because of these, memory-bound PoWs are advocated as a superior replacement for compute-bound PoWs in de-monopolising mining concentrations around some central mining nodes. There is a large variety of consensus algorithms be- longing to this class, unlike the consensus algorithms of compute-bound PoW which are largely based on Hashcash. These algorithms can be further categorised as follows: Cryptonight; Scrypt and its variants; Equihash; Ethhash/D- agger; Neoscript; and Timetravel. We now describe each of these different types of memory-bound PoW consensus algorithm. 1) C RYPTONIGHT .Cryptonight is a class of PoW consensus algorithms that, in principle, is a memory-hard hash func- tion [32]. It utilises the Keccak hashing function [46] intern- ally and relies on a 2MB scratchpad residing on the memory of a computer. The scratchpad is extensively used to per- form numerous read/write operations at pseudo-random 1. https://www.coingecko.com/ 2. https://www.reddit.com/ 10 Table 3: Top ten crypto-currencies that utlise Nakamoto consensus algorithm. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Bitcoin/Bitcoin Cash [69] [70]03.01.2009 12.5 21 10m Syscoin [71] 16.08.2014 80.04659537 888 1m Peercoin [72] 19.08.2012 55.17265345 2000 10m Counterparty [73] 01.02.2014 All currency in circulation 2.6m - Emercoin [75] 11.12.2013 Smooth emission 41 10m Namecoin [76] 19.04.2011 12.50000000 21 10m Steem Dollars [77] 04.06.2016 Smooth emission Unlimited 3s Crown [78] 08.09.2014 1.8 42 1m XP 24.08.2016 2220 NA Omni (Mastercoin) [79] 31.07.2013 16.71249999 Omni 0.6 20s addresses within that scratchpad. In the final step, the desired hash is generated by hashing the entire scratchpad. Its reliance on a large scratchpad on the memory of a system makes it resistant towards FPGA and ASIC mining as the economic incentive to create FPGA, and ASIC mining hardware might be too low for the time being. As such, Cryptonight introduces the notion of so called Egalitarian proof of work [32] or proof of equality, which enables anyone to join in the mining process using any modern CPU and GPU. One prominent property of the coins belonging to this class is that all of them support stronger sender-receiver privacy by facilitating anonymous transactions. Current currencies utilising Cryptonight according to Coingeko as of July 24, 2019 is presented in Table 4. Like Table 3, Table 4 also presents their Block and reward prop- erties as presented in Figure 5. 2) S CRYPT AND ITS VARIANTS .Scrypt is a password based key driving function (KDF) that is currently used in many crypto-currencies [47]. A KDF is primarily used to gen- erate one or more secret values from another secret key and is widely used in password hashing. Previous key deriving functions such as DES-based UNIX Crypt-function, FreeBSD MD5 crypt, Public-Key Cryptography Standards#5 (PKCS#5), and PBKDF2 do not impose any specific hard- ware requirements. This enables any attacker launch attacks against those functions using specific FPGA or ASIC en- abled hardware, the so-called custom hardware attacks [48]. Scrypt has been designed to counteract this threat. Toward this aim, one of the core characteristics of Scrypt is its reliance on the vast memory of a system, making it difficult to perform using FPGA and ASIC enabled cus- tom hardware. In the underneath, Scrypt utilises Salsa20/8 Core [49] as its internal hash function. A simplified version of Scrypt is used in the corresponding crypto-currencies, which is much faster and easier to implement, and can be performed using any modern CPU and GPU. Hence, anyone can join in the mining process for crypto-currencies using this function. However, the ever-increasing price of crypto- currencies has incentivised miners to produce custom ASIC hardware for some crypto-currencies utilising Scrypt in recent times. An example of such hardware that can be used to mine different Scrypt crypto-currencies is Antminer L3+ [50]. To tackle this issue of exploiting ASIC for mining, sev- eral Scrypt variants have been proposed: Scrypt-N/ScryptJane/Scrypt Chacha and Scrypt-OG, each providing particu- lar advantages over others. Scrypt-N and Scrypt Chacha rely on SHA256 and ChaCha [52] as their internal hash functions, respectively, whereas Scrypt Jane utilises a combination of different hash functions. All of them support progressive and tunable memory requirements, which can be adjusted after a certain period. This is to ensure that custom ASIC hardware is rendered obsolete once the memory require- ment is changed. Finally, Scrypt-OG (Optimised for GPU) is optimised to be eight times less memory intensive than Scrypt [51]. Table 5 shows the top 10 currencies, which either use Scrypt or one of its variants, as per their market capitalisa- tion according to CoinGecko as of July 24, 2019. 3) E QUIHASH Equihash is one of the recent PoW algorithms that has been well received in the blockchain community [55]. It is a memory-bound PoW that requires to find a solu- tion for the Generalised Birthday problem using Wagner’s algorithm [56]. Equihash has been designed to decentralise the mining procedure itself, similar to other memory-bound approaches. However, so far, very small portions of such algorithms have succeeded. One of the crucial reasons for this is that their underlying time-memory complexity trade- off is largely constant. This means that reducing memory requirement in these algorithms have little effect on their corresponding time complexity. Wagner’s solution has a steep time-memory complexity trade-off, reducing memory increases time complexity sub- stantially. This premise has been exploited by Equihash to ensure that mining is exclusively proportional to the amount of memory a miner has. Thus, it is more suitable for a gen- eral purpose computer, rather than any ASIC-enabled hard- ware which can only have relatively small memory in order to make their production profitable for the mining process. Due to this reason, it has been claimed that Equihash can support ASIC resistance, at least for the foreseeable future. In addition, the verification is extremely lightweight and even can be carried out in resource-constrained mobile devices. Table 6 shows the eight currencies which utilise Equihash according to CoinGecko as of July 24, 2019. 4) E THASH (DAGGER -HASHIMOTO )/D AGGER .Ethash is a memory-bound PoW algorithm introduced for Ethereum with the goal to be ASIC-resistant for a long period of time [58]. It was previously known as Dagger-Hashimoto algorithm [59] because of its utilisation of two different algorithms: Dagger [60] and Hashimoto [60]. 11 Table 4: Top ten crypto-currencies that utilise Cryptonight, with Bytecoin being the first to use this algorithm. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million) Block Time Monero 18.04.2014 4.86930501 Starting at M= 2641 infinite supply2.0m Bytecoin 04.07.2012 666.76 184.46 billion 2.0m Aeon 06.06.2014 5.48 Starting at M= 2641, infinite supply.4.0m Boolberry 17.05.2014 4.85 18.5 Million 2.0 Karbowanec 30.05.2016. 8.83 Starting with 10 Million, in- finite supple4.0m Fantomcoin 06.05.2014 smooth emission, 50% coins will be emitted in 6 years and block reward decreases with a similar Starting at M= 2641infinite supply 1.0m Dashcoin fork of Bytecoin05.07.2014 1.55 2.0m QuazarCoin 08.05.2014 smooth emission 2.0 BipCoin 20.08.2016 smooth emission 2.0 Cannabis Industry Coin16.10.2016 70.00000000 21 M 2.0 Table 5: Top ten crypto-currencies using Scrypt. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Litecoin [80] 13.10.2011 25.00 84 million 2.5m Verge [82] 15.02.2016 730.00 16.5 billion 0.5m Bitmark [83] 13.07.2014 (no longer monitored after 2016)27.58 million 2.0m Dogecoin [84] 06.12.2013 10000.00 Total supply NA GameCredits [85] 01.06.2015 fixed (12.5 coins) 84 million 1.5m Einsteinium [86] 01.03.2014 2 2.9 billion 1.0m Voxels [87] 03.11.2015 smooth emission 2.1 billion 2.5m Viacoin [88] 18.07.2014 0.63 23 million 0.5m Hempcoin [89] 9.03.2014 smooth emission 2.5 billion 1.0m Table 6: Crypto-currencies utilising Equihash algorithm. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Zcash [90] 28.10.2016 10 21 million 2.5m Bitcoin Gold [91] 24.10.2017 12.5 21 million 10m Komodo [92] 15.10.2016 3 200 million 1m Zclassic [93] 6.11.2016 12.5 21 million 2.5m ZenCash [94] 30.05.2017 7.5 21 million 2.5m Hush [95] Genesis date 11.25 21 million 2.5m BitcoinZ [96] 10.09.2017 12500.00 21 billion 2.5m VoteCoin [97] 31.08.2017 125 2.2 billion 2.5m Dagger is one of the earliest proposed memory-bound PoW algorithm which utilises Directed Acyclic Graph (DAG) for memory-hard puzzle solving with trivial verific- ation that requires less memory to be used in resource con- strained devices. However, the Dagger algorithm is proven to be vulnerable towards a shared memory hardware ac- celeration attack, as discussed in [61]. That is why it has been dropped as a PoW candidate for Ethereum. Hashimoto algorithm, on the other hand, relies on the delay incurred for reading data from memory as the limiting factor and thus, is known as an I-O bound algorithm. Ethash combines these two algorithms to be ASIC- resistant and functions as follows. Ethash depends on a large pseudo-random dataset, which is recomputed during each epoch. Each epoch is determined by the time it takes to generate 30,000 blocks in approximately five days. This dataset is essentially a directed acyclic graph and hence, iscalled DAG. During the DAG generation process, a seed is generated at first, which relies on the length of the chain. The seed is then used to compute a 16 MB pseudo-random cache. Then, each item of the DAG is generated by utilising a certain number of items from the pseudo-random cache. This entire process enables the DAG to grow linearly with the growth of the chain. Then, the latest block header and the current candidate nonce are hashed using Keccak (SHA- 3) hash function, and the resultant hash is mixed and hashed several times with data from the DAG. The final hashed digest is compared to the difficulty target and accepted or discarded accordingly. Every mix operation in Ethash requires to have a read in a pseudo-random fashion from the DAG, which is randomly accessed from the memory. This serves two purposes: The read operation is limited by the speed of the memory access bandwidth, which is thought to be 12 theoretically optimal, and thus, more optimisation is less likely. Even though the mixing circuitry can be built within an ASIC, the bottleneck would still be the memory access delay. That is why Ethash is thought to be suitable for use on commodity computing capacity with good powerful GPUs. To achieve the same level of performance, an ASIC would require to accommodate as large memory as a general purpose computer providing a financial disincentive. There are currently two currencies utilising Ethereum according to coingecko as of July 24, 2019 [62]. Even though Dagger algorithm is proven not to be ASIC resistant, it is being used in 6 currencies [63]. All of these are presented in Table 7. 5) N EOSCRYPT .NeoScrypt, an extension of Scrypt, is a key derivation function that aims to increase the security and performance on CPUs and GPUs while being strong ASIC resistant [146]. Internally it utilises a combination of Salsa 20/20 [49] and ChaCha 20/20 [52] along with Blake2s [74]. Its constructions impose larger memory segment size, and hence, larger temporal buffer requirements. This makes it 1.25 times more memory intensive than Scrypt. The motiva- tion is that this higher requirement of memory will act as a deterrent towards building ASICs for NeoScrypt. Currently, there are 10 currencies utilising NeoScrypt according to Coingecko as of 18 July, 2019 [147] which are presented in Table 8. 5.1.3 Chained PoW A chained PoW utilises several hashing functions chained together in a series of consecutive steps. Its main motiv- ation is to ensure ASIC resistance, which is achieved by the underlying mechanisms by which the corresponding hashing functions are chained together. In addition to this, the PoW algorithms belonging to this series aim to ad- dress one particular weakness of any compute-bound and memory-bound PoW algorithm: their reliance on a single hashing function. With the advent of quantum computing, the security of a respective hashing algorithm might be adversely affected, which undermines the security of the corresponding blockchain system. If this happens, the old algorithm needs to be discarded, and a new quantum res- istant hashing algorithm needs to be incorporated to the respective blockchain using a mechanism called hard-fork. A hard-fork is a mechanism by which a major update is enforced in a blockchain system. This is quite a disruptive procedure that has negative effect on any blockchain system. In such scenarios, a chained PoW algorithm would continue to function until all its hashing functions are broken. There are several chained PoW algorithms that are cur- rently available. 1) X11/X13/X15. X11 is a widely-used hashing algorithm in many crypto-currencies. In X11, eleven hashing algorithms are consecutively carried our one after another. The hash- ing algorithms are blake, bmw, groestl, jh, keccak, skein, luffa, cubehash, shavite, simd, and echo . One advantage of X11 is that it is highly energy effi- cient: GPUs computing X11 algorithm requires approxim- ately 30% less wattage and remains 3050% cooler incomparison to Scrypt [54]. Even though the algorithm has been designed in such a way that it can only be used with CPUs and GPUs, the economic incentives have allowed the creation of ASIC to be used during the mining process. It has different variants where the number of chained hashing functions differs. For example, X13 utilises 13 hash- ing functions, and X15 utilises 15 hashing functions. Table 9 presents the top 10 crypto-currencies utilising these three algorithms, as per their market capitalisation as of July 24, 2019 according to CoinGecko. 2) Q UARK .Quark PoW algorithm relies on six different hashing functions: BLAKE [74], Blue Midnight Wish [64], Grøstl [65], [140], JH [66], Keccak and Skein [67]. These functions are implemented in mixed series with nine steps [138]. Within these nine steps, three functions are randomly applied in three steps depending on the value of a bit. The main motivations of mixing these six functions in nine steps are as follows: To alleviate the risk of a compromised system in light of its underlying single hashing algorithm being broken. To impose restrictions so that Quark can only be mined using CPUs while making it difficult to mine using GPUs and ASICs, because of the usage of ASIC- resistant mechanisms (e.g. Keccak). However, it did not take long before ASIC mining hardware for Quark appeared in the market, so that this could be mined using a GPU and ASIC [68]. However, the profitability and performance of such hardware are not obvious. The currencies utilising Quark according to CoinGecko as per July 24, 2019 [139] are presented in Table 10. 3) L YRA 2RE. Lyra2RE is a class of chained PoW which util- ises five hash functions: BLAKE, Keccak, Lyra2,[13] Skein, and Grøstl. It has been developed by the developers of Vertcoin, a currency based on Lyra2RE. It was designed to be CPU friendly, however, it was discovered in 2015 that the majority of the hashing power utilised for mining VertCoin in its network was facilitated by a botnet stealing CPU cycles from a large number of infected computers. This motivated the Vertcoin developers to release Lyra2REv2, which utilises six hash functions, BLAKE, Keccak, Cube- Hash, Lyra2, Skein, and Blue Midnight Wish with GPU only PoW. Currently, there are only three currencies utilising Lyra2REv2 according to CoinGecko as of 31 December 2017 which are presented in Table 11. 4) M AGNIFICENT 7.Magnificent 7 (M7) is a class of chained PoW which utilises seven hash functions to generate the candidate hash during the mining process of Cryptonite coin (not to be confused with the Cryptonight PoW al- gorithm) [143]. The utilised hash functions are SHA-256, SHA-512, Keccak, RIPEMD, HAVAL, Tiger and Whirlpool. Internally, the header of the candidate block sequentially hashed by the corresponding functions and then multiplied to generate the final hash, which is then compared against the difficulty threshold. Even though it a not memory- bound PoW, it has been claimed that the multiplication operation enables it to run on a general purpose CPU easily, however, makes it difficult to run on GPUs and ASICs [143]. Even so, there are is at least one GPU miner available 13 Table 7: Crypto-currencies utilising Ethash algorithm. The block rewards are in the corresponding currencies. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Ethereum [98] 30.07.2015 2 infinite supply 10-20s Ethereum Clas- sic [99]30.07.2015 3.88 10-20s Ubiq [100] 28.01.2017 6 NA 88s Shift [101] 01.08.2015 1 infinite supply 27s Expanse [102] 13.09.2015 4 31.4 Million 1.0m DubaiCoin- DBIX [103]27.03.2017 6 Total supply 1.5m SOILcoin [104] 03.10.2015 3.0 Total supply 52s Krypton [105] 15.02.2016 0.25 2.67 Million 1m 44s Table 8: Crypto-currencies utilising NeoScrypt and Timetravel 10 algorithms. The block rewards are in the corresponding currencies. Currency Algorithm Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Red Pulse [106] 17.10.2017 NA 1.36 Billion NA Feathercoin [107] NeoScrypt 16.04.2013 40 336 Million 1.0m GoByte [108] NeoScrypt 17.11.2017 3.71 31.8 Million 2.5m UFO Coin [109] NeoScrypt 03.01.2014 625 4 Billion 1.5m Innova [110] NeoScrypt 19.10.2017 2.64 1.29 Million 2m Vivo [88] NeoScrypt 20.08.2017 4.5 1.1 Million 2m18s Desire [113] NeoScrypt Genesis date 10.45 1.17 Million 2.5m Orbitcoin [114] NeoScrypt 28.07.2013 0.5 3.77 Million 6.0m Phoenixcoin [115] NeoScrypt 08.05.2013 12.5 98 Million 1.5m Bitcore [116] Timetravel 10 April 24, 2017 3.13 21 Million 2.5m Table 9: Crypto-currencies utilising X11/X13 algorithms. The block rewards are in the corresponding currencies. Currency Algorithm Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Dash [117] X11 January 19, 2014 1.55 22 Million 2.5m Stratis [118] X13 August 09, 2016 NA NA NA Cloakcoin [119] X13 Genesis date 496.00 4.5 Million 1.0m Stealthcoin [120] X13 July 04, 2014 NA 20.7 Million 1.0m DeepOnion [121] X13 July 13, 2017 4 18.9 Million 4m HTMLcoin [122] X15 September 12, 2014 NA 90 Billion 1.0m Regalcoin [123] X11 September 28, 2017 NA 7.2 Million NA Memetic [124] X11 March 05, 2016 NA NA NA ExclusiveCoin [125] X11 June 12, 2016 NA NA NA Creditbit [126] X11 November 02, 2015 NA 100 Million 1.0m Table 10: Crypto-currencies utilising Quark algorithm. The block rewards are in corresponding currencies. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Quark [67] July 21, 2013 1 247 Million 0.5s PIVX [128] NA 5 NA 1.0m MonetaryUnit [129] July 26, 2014 18 1 Quadrillion 0.67m ALQO [130] October 30, 2017 3 NA 1m Bitcloud [131] August 15, 2017 22.5 200 Million 6.5m Zurcoin [132] NA 12.5 NA 0.75m AmsterdamCoin [133] November 01, 2015 10 84 Million 1.0m Animecoin [134] NA NA NA NA Table 11: Crypto-currencies utilising Lyra2RE algorithm. The block rewards are in corresponding currencies. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Vertcoin [135] January 10, 2014 25 84 Million 2.5m Monacoin [136] January 01, 2014 25 105 Million 1.5m Crypto [137] April 30, 2015 NA 65.8 Million 0.5m for M7 [144]. Its performance, though, is not known. The corresponding information for Cryptonite is presented in Table 12.5.1.4 PoW Limitations PoW (Nakamoto) consensus algorithm has been widely accoladed for its breakthrough in the distributed consensus 14 Table 12: Information regarding Cryptonite utilising M7 algorithm. Currency Genesis date (dd.mm.yyyy)Block reward Total supply (Million)Block Time Cryptonite July 28, 2014 Dynamic 1:84Billion 1 Minute 010203040506070802017-02-10…2017-03-27…2017-05-11…2017-06-25…2017-08-09…2017-09-23…2017-11-07…2017-12-22…2018-02-05…2018-03-22…2018-05-06…2018-06-21…2018-08-05…2018-09-19…2018-11-03…2018-12-18…2019-02-01…2019-03-18…2019-05-02…2019-06-16…Estimated TWh per YearMinimum TWh per Year Figure 8: Bitcoin energy consumption over the last years. paradigm, starting with Bitcoin. It had laid down the foundation for the subsequent advancement, which resul- ted in different PoW algorithms and crypto-currencies as discussed in the earlier sections. Even so, there are some significant limitations. Next, we briefly discuss these limita- tions: Energy consumption: Each PoW algorithm needs to consume electricity to compute the hash. As the dif- ficulty of the network starts to increase, so does the energy consumption. The amount of consumed energy is quite significant when calculated over the whole net- work consisting of ASIC/GPU mining rigs all around the world. Digiconomist3website tracks the electricity consumption of Bitcoin and Ethereum. According do it, the energy consumption of Bitcoin and Ethereum are around 40 TWh (Tera-Watt Hour) and 10 TWh, respectively. Their energy consumption graphs for the last one year are presented in Figure 8 [148] and Figure 9 [149]. Figure 9: Ethereum energy consumption over the last year. 3. https://digiconomist.net/To put this into perspective, we present Figure 10, whose data has been collected from [148]. This figure illustrates Bitcoin’s energy consumption relative to the electricity consumption of different countries. For ex- ample, the electricity consumed by Bitcoin in a year could power up 6;770;506 American households and is much more than what Czech Republic consumes in a year [148]. The utilisation of this huge amount of electricity has raised the question of sustainability of PoW-based crypto-currencies. Figure 10: Bitcoin energy consumption relative to different countries. Mining centralisation: With the ever-increasing diffi- culty rate, miners within a PoW-based crypto-currency network need to upgrade the capability of their AS- IC/GPU mining rigs to increase their chance of cre- ating a new block. Even so, it becomes increasingly difficult for a single miner to join in the mining process without substantial investment in the mining rigs. The consequence is that the economies of scale phenomenon strongly impacts the PoW algorithms. The economies of scale in economic theory is the advantage a pro- ducer can gain by increasing its output [150]. This happens because the producer can spread the cost of per-unit production over a larger number of goods, which increases the profit margin. This analogy also applies to PoW mining as explained next. A mining pool can be created where the mining resources of different miners are aggregated to increase the chance of creating a new block. Once a mining pool receives a reward for creating the next block, the reward is then proportionally divided among the participating miners. Unfortunately, this has led to the centralisation problems where block creations are limited among a handful of miners. For example, Figure 11 illustrates the distribution of network hashrate among different miners in Bitcoin [152]. As evident from the figure, only five mining pools control the 75% of hashrate of the 15 whole network. There is a fear that they could collude with each other to launch the 51% attack to destabilise the whole bitcoin network. Known Blocks. Relayed By count BTC.com 74 Unknown 41 F2Pool 39 Poolin 38 AntPool 37 SlushPool 27 BTC.TOP 26 ViaBTC 16An estimation of hashrate distribution amongst t he largest mining pools The graph below shows the market share of the most popular bitc oin mining pools. It should only be used as a rough estimate and for various reasons will not be 100% accurat e. A large portion of Unknown blocks does not mean an attack on the network, it simply means we have been una ble to determine the origin.24 hours - 48 hours - 4 DaysBitcoin Hashrate Distribution - Blockchain.info https://www.bloc kchain.com/en/pools?timespan=48hours 1 of 1 27/07/2019, 10:08 pm Figure 11: Bitcoin hashrate distribution of mining pools. Tragedy of commons: Many PoW algorithms suffer an economic problem called the Tragedy of the commons . In economic theory, the tragedy of the commons occurs when each entity rushes to maximise its profit from a depleting resource without considering the well-being of all that share the same resource [151]. This situation occurs in a crypto-currency if it is deflationary in nature with limited supply, e.g. Bitcoin. It has been argued when the reward of creating a new block in Bitcoin will reach nearly zero; the miners will have to solely rely on the transaction fees to cover their expenses. This might create an unhealthy competition among the miners to include as many transactions as possible, just to maximise one’s profit. The consequence of this is that transaction fees will keep decreasing, which might lead to a situation that miners cannot make enough profit to continue the mining process. Eventually, more and more miners will leave the mining process, which might lead toward 51% attacks or other scenarios that de-stabilise the Bitcoin network. Absence of penalty: All PoW algorithms (both com- pute and memory bound) are altruistic in nature in the sense that they reward behaving miners, however, do not penalise a misbehaving miner. One example is that a miner can collude with a group of miners (a phenomenon known as selfish mining ) to increase its profitability in an illegitimate way [153]. In addition, a miner can engage in Denial-of-Service attack by just not forwarding any transaction or block within the network. Furthermore, such malicious miners can join forces to engage in the spawn-camping attack, in which they launch DoS attacks simultaneously over and over again to render the network useless for the corres- ponding crypto-currency [156]. A penalty mechanism would disincentivize any miner to engage in any type of malicious misbehave.5.1.5 Analysis In this section, we summarise the properties of different PoW algorithms in Table 13, Table 14 and Table 15 utilising the taxonomies presented in Section 4. In these tables, a ‘’ symbol is utilised to indicate if a particular property is supported by the corresponding algorithm. For other prop- erties, explanatory texts have been used for any particular property. As presented in Table 13, different types of PoW al- gorithms share exactly similar characteristics. In these al- gorithms, they are mainly two types of nodes: clients and miners. Miners are responsible for creating a block using a randomised lottery mechanism. Conversely, clients are the nodes that are responsible for validating each block as well as utilised to transact bitcoin between different users. Committees in these algorithms represent the set of miners, exhibiting the property of a single open committee structure where anyone can join as a miner. The respective committee is formed implicitly in a dynamic fashion, indicating any miner can join or leave whenever they wish. As per Table 14, none of the algorithms requires any node to be authenticated to participate in the algorithm. All of them have strong support for non-repudiation in the form of digital signature as part of every single transaction. These algorithms have a high level of censorship resistance, which means that it will be difficult for any regulatory agency to impose any censorship on these algorithms. As for the attack vector, each PoW algorithm requires every miner node to invest substantially for mining hardware in order to participate in these consensus algorithms. This feature, thus, acts as a deterrent against any Sybil or DoS attack in any PoW algorithm. The adversary tolerance is based on the assumption that PoW suffers from 51% attacks, and thus, adversary nodes need to have less than 50% of the total hashing power of the network. According to Table 15, these algorithms have low throughput, and unfortunately, do not scale properly. Fur- thermore, most of the algorithms require a considerable time to reach finality, and their energy consumption is consider- ably high, as explained in Section 5.1.4. The fault tolerance in these algorithms is 2f+ 1like any BFT algorithm, implying they can achieve consensus as long as more than 50% of nodes function correctly. 5.2 Proof of Stake To counteract the limitations of any PoW algorithm, another type of consensus algorithm, called Proof of Stake (PoS) has been proposed. The earliest proposal of a PoS algorithm can be found on the bitcointalk forum in 2011 [154]. Soon after, several projects started experimenting with the idea. Peercoin [72], released in 2012, was the first currency to utilise the PoS consensus algorithm. The core idea of PoS evolves around the concept that the nodes who would like to participate in the block creation process must prove that they own a certain number of coins at first. Besides, they must lock a certain amount of its currencies, called stake , into an escrow account in order to participate in the block creation process. The stake acts as a guarantee that it will behave as per the protocol rules. The node escrows its stake in this manner is known as the 16 Table 13: Structural properties of PoW consensus algorithms. Single committeeNode typeType Formation ConfigurationMechanism Clients & Miners Open Implicit Dynamic Lottery, Randomised Table 14: Security properties of PoW consensus algorithms. Attack VectorsAuthentication Non-repudiationCensorship resistance Adversary tolerance Sybil protection DoS Resistance x High 2f+ 1 Table 15: Performance properties of PoW consensus algorithms. Fault tolerance Throughput Scalability Latency Energy consumption 2f+ 1 Low Low Medium-High High stakeholder, leader, forger, or minter in PoS terminology. The minter can lose the stake, in case it misbehaves. In essence, when a stakeholder escrows its stake, it implicitly becomes a member of an exclusive group. Only a member of this exclusive group can participate in the block creation process. In case the stakeholder gets the chance to create a new block, the stakeholder will be rewarded in one of the two different ways. Either it can collect the transaction fees within the block, or it is provided a certain amount of currencies that act as a type of interest against their stake. It has been argued that this incentive, coupled with any punitive mechanism, can provide a similar level of security of any PoW algorithm. Moreover, it can offer several other advantages. Next, we explore a few benefits of a PoS mech- anism [156]. Energy Efficiency: A PoS algorithm does not require any node to solve a resource-intensive hard crypto- graphic puzzle. Consequently, such an algorithm is extremely energy efficient compared to their PoW coun- terpart. Therefore, a crypto-currency leveraging any PoS algorithm is likely to be more sustainable in the long run. Mitigation of Centralization: A PoS algorithm is less impacted by the economies of scale phenomenon. Since it does not require to build up a mining rig to solve any resource-intensive cryptographic puzzle, there is no way to maximise gain by increasing any output. Therefore, it is less susceptible to the centralisation problem created by the mining pool. Explicit Economic Security: A carefully designed pen- alty scheme in a PoS algorithm can deter any misbe- having attack, including spawn-camping. Anyone en- gaging in such attacks will lose their stake and might be banned from any block creation process in the fu- ture, depending on the protocol. This eventually can strengthen the security of the system. Initial supply: One of the major barriers in a PoS algorithm is how to generate the initial coins and fairly distribute them among the stakeholders so that they can be used as stakes. We term this barrier as the bootstrap problem. There are two approaches to address the bootstrap problem: Pre-mining: A set of coins are pre-mined, which are then sold before the launch of the system in an IPO(Initial Public Offering) or ICO (Initial Coin Offering). PoW-PoS transition: The system starts with a PoW system to fairly distribute the coins among the stake- holders. Then, it slowly transitions towards the PoS system. Reward process: Another important aspect is the re- warding process to incentivise the stakeholder to take part in the minting process. Unlike any PoW, where a miner is rewarded with new coins for creating a valid block, there is no reward for creating a valid block. Instead, to incentivise a minter, two types of reward mechanisms are available within a PoS algorithm: Transaction Fee: The minter can collect fees from the transactions included within the minted block. Interest rate: A lower interest rate is configured, which allows the currency to inflate over time. This interest is paid to the minter as a reward for creating a valid block. Selection process: A crucial factor in any PoS algorithm is how to select the stakeholder who can mint the next block. In a PoW algorithm, a miner is selected based on who can find the resource-intensive desired hash. Since PoS does not rely on hind such a hash as the mechanism to find the next block, there must be a mechanism to select the next stakeholder. Currently, there three different approaches to Proof of Stake: Chained, BFT, and Delegated. CHAINED POS.The general idea of a chained PoS is to deploy a combination of PoW and PoS algorithms chained together to achieve any consensus. Because of this, there can be two types of blocks, PoW and PoS blocks, within the same blockchain system. To accomplish this, the cor- responding algorithm relies on different approaches to se- lect/assign a particular miner for creating a PoW block or select a set of validators for creating a PoS block in different epochs or after a certain number of blocks created. In general, a chain based PoS can employ any of the following three different approaches to select the miner/stakeholder: Randomised PoW Mining: A miner who can solve the corresponding cryptographic PoW puzzle is selected in a random fashion. Randomised Stakeholder Selection: A randomised PoS util- ises a probabilistic formula that takes into account the 17 staked currencies and other parameters to select the next stakeholder. The other parameters ensure that a stakeholder is not selected only based on the number of their staked coins and act as a pseudo-random seed for the probabilistic formula. Coin-age based selection. A coin-age is defined as the holding period of a coin by its owner. For example, if an owner receives a coin from a sender and holds it for five days then the coin-age of the coin can be defined as five coin-days. Formally, coinage=coinholdingperiod Algorithms belonging to this class select the stake- holder using staked coins of the stakeholders and their corresponding coin-age. In general, a chained PoS algorithm favours towards availability over consistency when network partition occurs, as per the CAP theorem. BFT P OS.BFT PoS is a multi-round PoS algorithm. In the first step, a set of validators are pseudo-randomly selected to propose a block. However, the consensus regarding commit- ting this block to the chain depends on the >2=3quorum of super-majority among the validators on several rounds. It inherits the properties of any BFT consensus, and as such, it tolerates up to 1=3of byzantine behaviour among the nodes. In general, a BFT PoS algorithm favours towards con- sistency over availability when network partition occurs, within the setting of CAP theorem. DELEGATED PROOF OF STAKE .Delegated Proof of Stake (or DPoS in short) is a form of consensus algorithm in which reputation scores or other mechanisms are used to select the set of validators [184]. Even though it has the name Proof of Stake associated with it, it is quite different from other PoS algorithms. In DPoS, users of the network vote to select a group of delegates (or witnesses) who are responsible for creating blocks. Users utilise reputations scores or other mechanisms to choose their delegates. Delegates are the only entities who can propose new blocks. For each round, a leader is selected from the set of delegates who can propose a block. How such a leader is chosen depends on the respective system. The leader gets rewards for creating a new block, and is penalised and de-listed from the set of validators if it misbehaves. The delegates themselves compete with each other to get included in the validator list. In such, each validator might offer different levels of incentives for the voters who vote for it. For example, if a delegate is selected to propose a block, it might distribute a certain fraction of its reward among the users who have selected it. Since the number of validators is small, the consensus finality can be fast. Next, we explore several crypto-currencies or mechan- isms that use the above mentioned PoS approaches. 5.2.1 Chained PoS Next, we present two examples of a chained PoS algorithm to illustrate how this approach has been applied in practice. 1) P EERCOIN (PPC OIN).Peercoin is the first crypto- currency to formalise the notion of PoS by utilising a hybridPoW-PoS protocol [174]. The Peercoin protocol is based on the assumption that coin-age can be leveraged to create a PoS algorithm which is as secure as any PoW algorithm while minimising the disadvantages associated with a PoW algorithm. Peercoin protocol recognises two different kinds of blocks: PoW blocks and PoS blocks, within the same block- chain. These blocks are created by two separate entities: miners and minters. Miners are responsible for creating PoW blocks, similar to Bitcoin whereas minters are respons- ible for creating PoS blocks. Irrespective of the last block type, the next block either can be a PoW block or a PoS block, and these entities compete with each other to create the next block [175]. Miners compete with other miners to find a valid PoW block that matches the PoW difficulty target, similar to Bitcoin. Similarly, minters compete among themselves to find a valid PoS block that matches the PoS difficulty target (similar to a PoW algorithm but requires much less computation). As soon as any PoW or PoS block is found, it is broadcast to the network, and other nodes validate it. Within a PoS block, a minter utilise their holding coins as a stake, and the minter is rewarded approximately 1% per annum based on the coin-age of the staked coins. The reward is paid out for each block in a newly created special transaction called the coinstake transaction. Each coinstake transaction consists of the number of staked inputs and a kernel , containing the hash that meets the PoS difficulty. The hash itself is calculated over a small space and hence not computationally intensive at all. It utilises the number of staked inputs and a probabilistic variable, whereas the difficulty condition is calculated utilising the coin-age of the staked inputs as well as a difficulty parameter. This parameter is adjusted dynamically to ensure that one block is created in 10 minutes. In other words, the valid kernel depends on the coin-age of the staked inputs, and the higher the coin-age, the higher is the probability to match the difficulty. The coinstake transaction is paid to the minter, which contains the coins staked along with the reward. Once a PoS block is added to the chain, the coin-age of the staked coins is reset to zero. This indicates that all the stacked coins are consumed. This ensures that the same coins cannot be used over and over again to create a PoS block within a short period of time. The main chain in Peercoin is selected based on the highest total coin-age consumed in all blocks. That means, if a PoW block and PoS block are received simultaneously as the next block by a node, the algorithm dictates the PoS block to be selected over the PoW block. The block reward for a PoW block in Peercoin decreases and will cease to be significant after a certain period of time. It is currently used for the coin generation and distribution purpose and will be completely phased out in the future [205]. It has no role whatsoever on securing the network, which is largely based on the PoS algorithm. Once the PoW algorithm is phased out, it is suggested that the energy consumption of Peercoin will be significantly low while providing similar security as any PoW algorithm. Peercoin is highly regarded for formalising the first alternative mechanism to PoW, however, it suffers from all the attack vectors of PoS, as presented in Section 5.2.4. Two 18 other coins Black and Nxt removes age from the equation in order to avoid the exploitation of the system by the dishonest entities having a significant amount of coins. 2) CASPER FFG. Casper the Friendly Finality Gadget (CFFG) is a PoW-PoS hybrid consensus algorithm proposed to replace the Ethereum’s PoW consensus algorithm [181]. In fact, CFFG provides an intermediate PoS overlay on top of its current PoW algorithm so that Ethereum is transformed to a pure PoS protocol called Casper the Friendly Ghost (CTFG) described below (Section 5.2.2). The PoS layer requires the participation of validators. Any node can become a validator by depositing some Eth- ereum’s native crypto-currency called Ether to a designated smart-contract, which acts as a security bond. The network itself will mostly consist of PoW miners who will mine blocks according to its current PoW algorithm. However, the finalisation/check-pointing of blocks will be carried out by PoS validators. The check-pointing/finalisation is the process to ensure that the chain becomes irreversible up to a certain block and thus, short and low range attacks (particular types of PoS only attacks presented in Section 5.2.4) as well as the 51% attack cannot be launched beyond the check-pointing block. The check-pointing occurs every 50 blocks, and this interval of 50 blocks is called an epoch [158]. The finalisation process requires two rounds of voting in two successive epochs. The process is as follows. In an epoch, the validators vote on a certain checkpoint c(a block). A super-majority (denoted as +2=3) occurs when more than 2=3of the valid- ators vote for the checkpoint c. In such a case, the checkpoint is regarded as justified . If in the next epoch, ( +2=3) of the validators vote on the next checkpoint c0(a block which is a child of the block belonging to C),c0is considered justified whereas cis considered finalised. A checkpoint created in this manner for each epoch is assumed to create a checkpoint tree where c0is a direct child of c. The process can be summarised in the following way: +2=3Votec! Justify c!+2=3Votec0!Finalize cand Justify c0 Once a checkpoint is finalised, the validators are paid. The payment is interest-based and is proportional to the number of ethers deposited. If it occurs that there are two checkpoints, it signifies that a fork has occurred. This can only happen when a validator or a set of validators has de- viated from the protocol. In such cases, a penalty mechanism is imposed in which the deposit of the violating validator(s) is destroyed. In essence, CGGF is a combination of Chained and BFT consensus mechanisms with strong support for availability over consistency. Its properties ensure that block finalisation occurs quickly, and the protocol is mostly secure against all PoS attacks except the cartel formation attack (a particular type for PoS only presented in Section 5.2.4). However, it is to be noted that this consensus mechanism has not been implemented yet. Therefore, it is yet to be seen how it performs in reality. 5.2.2 BFT PoS In this section we describe three notable BFT PoS algorithms that have had significant uptake in practice: Tendermint, CTFG and Ouroboros.1) T ENDERMINT .Tendermint is the first to showcase how the BFT consensus can be achieved within the PoS setting of blockchain systems [178], [179], [180]. It consists of two major components: a consensus engine known as Tender- mint Core and its underlying application interface, called theApplication BlockChain Interface (ABCI). The Tendermint core is responsible for deploying the consensus algorithm, whereas the ABCI can be utilised to deploy any blockchain application using any programming language. The consensus algorithm relies on a set of validators. It is a round-based algorithm where a proposer is chosen from a set of validators. In each round , the proposer proposes a new block for the blockchain at the latest height. The proposer itself is selected using a deterministic round-robin algorithm, which ultimately relies on the voting power of the validators. The voting power, on the other hand, is proportional to the security deposit of the validators. The consensus algorithm consists of three steps (pro- pose, pre-vote, and pre-commit) in each round bound by a timer equally divided among the three steps, thus making it a weakly synchronous protocol. These steps signify the transition of states in each validator. Figure 12 illustrates the state transition diagram for each validator. At the beginning of each round, a new proposer is chosen to propose a new block. The proposed block needs to go through a two-stage voting mechanism before it is committed to the blockchain. When a validator receives the proposed block, it val- idates the block at first, and if okay, it pre-votes for the proposed block. If the block is not received within the propose timer or the block is invalid, the validator submits a special vote called Prevote nil . Then, the validator waits for the pre-vote interval to receive pre-votes from the super- majority (denoted as +2=3) of the validators. A +2=3pre- votes signifies that the super-majority validators have voted for the proposed block, implying their confidence on the proposed block and is denoted as a Polka in Tendermint terminology. At this stage, the validator pre-commits the block. If the validator does not receive enough pre-votes for the proposed block, it submits another special vote called Precommit nil . Then, the validator waits for the pre-commit time-period to receive +2=3pre-commits from the super- majority of the validators. Once received, it commits the block to the blockchain. If +2=3pre-commits not received within the pre-commit time-period, the next round is initiated where a new proposer is selected, and the steps are repeated. To ensure the safety guarantee of the algorithm, Tender- mint is also coupled with locking rules. Once a validator pre-commits a block after a polka is achieved, it must lock itself onto that block. Then, it must obey the following two rules: it must pre-vote for the same block in the next round for the same blockchain height, the unlocking is possible only when a newer block receives a polka in a later round for the same blockchain height. With these rules, Tendermint guarantees that the con- sensus is secure when less than one-third validators exhibit byzantine behaviour, meaning conflicting blocks will never be committed at the same blockchain height. In other words, Tendermint guarantees that no fork will occur under this as- sumption. Since Tendermint favours safety over availability, 19 Propose Pre-Vote Nil Pre-commit Nil Propose BlockNew Height Wait for pre- commits from +2/3Propose BlockCommit New Round Wait for pre-vote from +2/3Valid block No +2/3 pre-vote for block +2/3 pre-vote for block+2/3 pre-commit for blockNo +2/3 pre-commit for blockInvalid block or not received in time Figure 12: Tendermint consensus steps. it has one particular weakness. It requires 100% uptime of its+2=3(super-majority) validators. If more than one-third (+1=3) are validators are offline or partitioned, the system will stop functioning [178]. In such cases, out-of-protocol steps are required to tackle this situation. Unlike PoW or other PoS algorithms that come with defined reward mechanisms and crypto-currency applica- tions, the latest version of Tendermint more likely acts as the consensus plugin, which can be retro-fit to other blockchain systems. For example, Tendermint has been integrated with a private instantiation of Ethereum in a Hyperledger project called Burrows [209]. That is why there is no reward/pun- ishment mechanism defined in Tendermint. However, it can be easily introduced in the application layer via the ABCI. For example, a reward mechanism can be introduced for the proposer and the validator to motivate them to engage in the consensus process. A node can become a validator by bonding a certain amount of security deposit. The deposit is destroyed, in case the corresponding validator misbehaves, and thus acts as a deterrent for the validator to launch any attack in the network. Together with the consensus algorithm and a carefully designed reward and punishment mechanism, all PoS attacks can be effectively handled. 2) C ASPER THE FRIENDLY GHOST (CTFG). CTFG is a pure BFT PoS algorithm that aims to transform Ethereum to a PoS-only blockchain system in the future [182]. As described above, CFFG is geared towards a gentle transition from a PoW to a PoS model for Ethereum, where CTFG will take control of the consensus mechanism ultimately. CTFG is based upon a rigorous formal model called Correction by Construction (CBC) that utilises the GHOST (Greedy Heaviest-Observed Subtree) primitive as its con- sensus rule during fork [183]. The idea is that the CTFG protocol will be partially specified at the initial stage along with a set of desired properties. Then, the rest of the protocol is dynamically derived in such a way that it satisfies the de- sired properties - hence the name correction by construction. This is in contrast to the traditional approach for designing a protocol where a protocol is fully defined at first, and then it is tested to check if it satisfies the desired properties [156]. To achieve this, CTFG introduces a safety oracle, acting as an ideal adversary, which raises exceptions when a fault occurs and also approximates the probability of any futurefailure. Based on this, the oracle can dynamically fine-tune the protocol as required to evolve it towards its completion. Similar to CFFG, CTFG also requires a set of bonded validators that will bond ethers as a security deposit in a smart-contract. However, unlike any other PoS mechanisms, the validators will bet on the block, which has the highest probability to be included in the main chain according to their own perspective. If that particular block is included in the main chain, the validators receive rewards for voting in favour of the block. Otherwise, the validators receive certain penalties. Like any PoW algorithm, CTFG favours availability over consistency. This means that blocks are not finalised in- stantly, like Tendermint. Instead, as the chain grows and more blocks are added, a previous block is considered impli- citly final. A major advantage of CTFG over Tendermint is that it can accommodate dynamic validators. This is because the finality condition in Tendermint requires that its block interval is short, which in turn demands a relatively lower number of pre-determined validators. Since CTFG does not rely on any instant finality, it can theoretically accommodate a higher number of dynamic validators. CTFG is currently is the most comprehensive proposal which addresses all PoS attack vectors. However, it is to be noted that this is just a proposal at the current stage. There- fore, its performance in real settings is yet to be analysed. 3) O UROBOROS .Ouroboros is a provably secure PoS al- gorithm [185], [186] utilised in the Cardano platform [187]. Cardano is regarded as third-generation blockchain system supporting smart-contract and decentralised application without relying on any PoW consensus algorithm. In Ouroboros, only a stakeholder can participate in the block minting process. A stakeholder is any node that holds the underlying crypto-currency of the Cardano platform called Ada . Ouroboros is based on the concept of epoch , which is essentially a predefined time period. Each epoch consists of several slots. A stakeholder is elected for each slot to create a single block, meaning a block is created in each slot. The selected stakeholder is called a slot leader and is elected by a set of electors . An elector is a specific type of stakeholder which has a certain amount Ada in its disposal. In each epoch, the electors select the set of stakeholders for the next epoch using an algorithm called Follow the 20 Satoshi (FTS). The FTS algorithm relies on a random seed to introduce a certain amount of randomness in the elec- tion process. A share of the random seed is individually generated by all electors who participate in a multiparty computation protocol. Once the protocol is executed, all electors posses the random seed, constructed with all of their shares. The FTS algorithm utilises the random seed to select a coin for a particular slot. The owner of the coin is then elected as the slot leader. Intuitively, the more coins a stakeholder possesses, the higher is its probability of being selected as the slot leader. Ouroboros is expected to provide a transaction fee based reward to incentivise stakeholders to participate in the minting process. However, the details are in the process of being finalised. It has been mathematically proven to be secure against almost all PoS attack vectors except the cartel formation [185]. Nevertheless, how it will perform once deployed is yet to be seen. 5.2.3 DPoS There are several mechanisms deployed by different crypto- currencies under the general category of DPoS. Next, we present a few prominent approaches of some well-known DPoS based crypto-currencies. Our analysis of these crypto- currencies are summarised in Table 16. 1) EOS. EOS is the first and the most widely known DPoS crypto-currency and smart-contract platform as of now [188]. With the promise of greater scalability and higher transactions per second than Ethereum, it raised 4 billion USD in the highest ever ICO event to date [190]. Initial EOS currency was created on the Ethereum platform, and later migrated to their own blockchain network. The DPoS consensus algorithm of EOS utilises 21validators, also known as Block Producers (BPs). These 21validators are selected with votes from EOS token (currency) holders. The number of times a particular BP is selected to produce a block is proportional to the total votes received from the token holders. Evey DPoS currency must create an initial supply before the network is operational. This supply is used to select 21 BPs (with voting) as well as to reward the BPs for creating blocks, and thus, securing the network. EOS had an initial supply of 1Billion EOS tokens with an annual inflation of 5%. Among the inflated currencies, 1%is used to reward the block producers, whereas the rest of the 4%are kept for future R&D for EOS [191]. Currently, an EOS block is created in 0:5s. Blocks in EOS are produced in rounds where each round consists of 21 blocks [192]. At the beginning of each round, 21 BPs are selected. Next, each of them gets a chance to create a block in pseduo-random fashion within that particular round. Once a BP produces a block, other BPs must validate the block and reach into a consensus. A block is confirmed only when ( +2=3) majority of the BPs reach the consensus regarding the validity of the block. Once this happens, the block and the associated transactions are regarded as confirmed or final, so no fork can happen. 2) T RON .Tron is another popular DPoS based crypto- currency [193]. With an initial supply of 99Billion Tron tokens (represented with TRX ), it is another smart-contract supported blockchain platform, very similar to Ethereumand EOS in functionality. Its consensus mechanism utilises 27validators, known as Super Representatives (SRs) [194]. The SRs are selected in every six hours with votes by TRX holders who must freeze a certain amount of TRX to vote for an SR. The deposits amount can be frozen back after three days once the voting is cast [195]. A block in Tron is created in every 3s for the corresponding SR receives a reward of 32 TRX. Another important feature of Tron is that there is no in-built inflation mechanism in the protocol, which implies that the total supply will remain constant throughout its lifespan. 3) T EZOS .Tezos is, like EOS and Tron, a smart-contract plat- form which utilises a variant of DPoS consensus algorithm [196]. With a block reward of 16XTZ (Tezos currency) and block creation time of 60s, Tezos does not require any pre- defined number of stakeholders (or Bakers as defined in Tezos) [197]. This differs Tezos from other DPoS currencies. Instead, the consensus mechanism utilises a dynamic range of stakeholders where anyone holding a substantial amount of XTZ can be a stakeholder. This limits general users to participate in the consensus mechanism. To rectify this problem, Tezos provides a mechanism by which anyone can delegate their XTZ to someone so that it can accumulate the required number of XTZ to be a baker. In return, the baker would return a certain proportion of their received block reward to the delegating party. Tezos started with an initial supply of 765 Million XTZ tokens. It relies on an annual inflation of 5:51% and the inflated currencies are used to reward the bakers. 4) L ISK.Lisk is a unique DPoS blockchain platform which, enables the development of DApps using JavaScript [200]. Another unique feature of Lisk is its ability to accommodate and then to operate with multiple blockchains, known as sidechains along with a central blockchain called mainchain . Each sidechain can be deployed and maintained by a particular application provider, which needs to be synced with the mainchain as per the Lisk’s protocol rule. In this way, different applications can leverage different sidechains simultaneously without burdening off the mainchain. Even though the responsibility of maintaining a sidechain relies on the particular application provider, the mainchain must be maintained with the Lisk DPoS consensus protocol, which utilises 101delegates [201]. Only these delegates can produce a block. These delegates are selected using votes from Lisk currency (denoted with LSK ) owners, where each holder has 101 votes. The weight of each vote is proportional to the amount of LSK owned by the respective owner. The selection of delegates happens before a round, where each round consists of 101 block generation cycle. Thus, in a round, each delegate is randomly selected to create a block. It has a block creation time of 10seconds and block reward of 5LSK. Started with an initial supply of100million LSK, Lisk has a current supply of 132million with an annual inflation of 5:65% . 5) A RK.Ark is yet another DPoS based blockchain platform [202]. It utilises 51delegates to create 51blocks in each round [203]. With a block creation time of 8s, each round lasts for 408s. Each delegate receives 2ARK (the native currency of the ARK platform) for creating a block. It had 21 an initial supply of 125 million. With an annual inflation of5:55, the supply was around 142 million (as of June 2019). Like other DPoS blockchains, the delegates in Ark are also selected with votes by Ark currency owner, where the weight of each is proportional to the amount of ARK owned by the voter. 5.2.4 Limitations of PoS Even though the variants of different PoS algorithms offer several significant advantages, there are still a few disad- vantages in these classes of algorithms. We explore these disadvantages below. Collusion: If the number of validators is not large enough, it might be easier to launch a 51% attack on the corresponding consensus algorithm by colluding with other validators. Wealth effect: The sole reliance on coin-wealth in a consensus algorithm or for the selection of validators creates an environment where people with a large por- tion of coins can exert greater influence. In addition to these disadvantages, there have been a few other attack vectors identified for the PoS algorithms: Nothing-at-stake (NAS) attack [157]: During a block- chain fork, an attacker might attempt to add its newly created block in all forked branches to increase their probability to add their block as the valid block. Such scenario is unlikely to occur in any PoW algorithm. This is because a miner would need to share their resources in order to mine at different branches. This would eventually decrease their chance of finding a new block because of the resources shared in multiple branches. Since it does not cost anything for a minter in a PoS algorithm to add blocks in multiple parallel branches, the attacker is motivated to do so. Applying a penalty for such misbehaviour could effectively tackle this problem. Bribing (short-range, SR) attack [157], [176]: In this attack, an attacker tries to double spend by creating a fork. An example of this attack would be as follows. The attacker pays to a seller to buy a good. The seller waits for a certain number of blocks (e.g., six blocks) before the good is delivered to the attacker. Once delivered, the attacker forks the main chain at the block (e.g., six blocks back, which is relatively short and hence the name) in which the payment was made. Then, the at- tacker bribes other minters to mint on top of the forked branch. As long as the bribed amount is lower than the price of the delivered good, it is always profitable for the attacker. The colluding minter has nothing to lose if it is coupled with the nothing-at-stake attack on their part but can gain from the bribery. Again, it can be tackled by introducing a penalty mechanism for all misbehaving parties. Long-range (LR) attack [157]: In this attack, the attacker attempts to build an alternative blockchain starting from the earliest blocks if the attacker can collude with the majority of the stakeholders. The motivation might be similar to double spending or related issues provid- ing advantages to the attacker as well as the colluded stakeholders. As explained above, the colluded stake- holder has nothing to lose if it can be coupled with thenothing-at-stake attacks. Check-pointing is one of the methods by which it can be tackled. The check-pointing codifies a certain length of the blockchain to make it immutable up to that point, and thereby undermining the attack. This is because the attacker cannot fork the blockchain before that check-point. Coin-age accumulation (CAC) attack [157], [176]: The PoS algorithms that rely on the uncapped coin-age parameter are susceptible to this attack. In this attack, the attacker waits for their coins to accumulate enough coin-age to exploit the algorithm for launching double spends by initiating a fork. This attack can be tackled by introducing a cap on the coin-age which minimises the attack vector. Pre-computing (PreCom) attack [157], [155]: A pre- computing attack, also known as Stake-grinding attack, would allow an attacker to increase the probability of generating subsequent blocks based on the information of the current block. If there is not enough randomness included in the PoS algorithm, the attacker can attempt to pre-compute subsequent blocks by fine-tuning in- formation of the current block. For a particular set of information (e.g., a set of transactions), if the attacker finds that the probability of minting a few subsequent blocks is less than desired, the attacker can update the set of transactions to increase their probability of determining the next few blocks. It can be effectively tackled by introducing a secure source of randomness in the algorithm. Cartel formation (CAF) attack [158]: In economic the- ory, an oligopoly market is dominated by a small set of entities having greater influence or wealth than other entity. They can collude with one another by forming a cartel to control price or reduce competition within the market. It has been argued that ” Blockchain architecture is mechanism design for oligopolistic markets. ” [159] which affects both PoW and PoS algorithms. Such a cartel can launch 51% attacks on the PoS algorithm or exploit the stakes to monopolise the PoS algorithm. 5.2.5 Analysis In this section, we summarise the properties of different PoS algorithms utilising the taxonomies and PoS attack vectors in Table 17, Table 18, Table 19 and Table 20. Like before, a ‘ ’ symbol has been utilised to indicate if the corresponding algorithm supports a particular property, and the ‘X’ symbol signifies that the particular property is not supported. The ‘-’ symbol implies that the property is not applicable, whereas the symbol ‘?’ indicates that no information has been found for that particular feature. For other properties, explanatory texts have been used as well. From Table 17, only chained algorithms are based on multiple committee utilising a flat topology with a dynamic configuration. These algorithms also use a probabilistic lot- tery to select a minter. Conversely, other PoS algorithms, ex- cept Tendermint, are based on the single committee having an open type and explicit formation with a dynamic config- uration and mostly rely on voting mechanisms. Tendermint uses a closed committee with a static configuration. As per Table 18, none of the algorithms, except Tender- mint requires any node to be authenticated to participate 22 Table 16: Comparison of DPoS Currencies with ‘-’ signifying not applicable. Currency Genesis date (dd.mm.yyyy)Initial supply Inflation Current supply (23.05.2019)Block reward Block Time Validator nos EOS 01:07:2017 1Billion 5% 1:04Billion 1% of inflated currency divided among 21 validators0:5s 21 Tron 28:08:2017 99Billion - 99Billion 32TRX 3s 27 Tezos 30:06:2018 765Million 5:51% 795Million 16XTZ 60s Not pre- defined Lisk 24:05:2016 100Million 5:67% 132Million 5LSK 10s 101 Ark 21:03:2017 125Million 5:55% 142Million 2ARK 8s 51 in the algorithm. All of them have strong support for non- repudiation in the form of digital signature as part of every single transaction. These algorithms have a high level of censorship resistance, as do all PoW algorithms. As for the attack vector, each PoS algorithm requires every miner node to invest substantially to participate in this algorithm. This feature, thus, acts as a deterrent against any Sybil or DoS attack in any PoS algorithm. The adversary tolerance for Chained systems can be calculated using this formula: min(2f+ 1;3f+ 1) = 3 f+ 1. This is because a chained algorithm utilises both PoW and PoS algorithms and thus needs to consider the adversary tolerance for both of them. We consider the minimum of these two ( 3f+ 1). The supported adversary tolerance for other algorithms is 3f+1 except BFT Ouroboros whose adversary tolerance is 2f+ 1. According to Table 20, all BFT, and DPoS algorithms have considerably high throughput, low latency, and high scalability. Their energy consumption is negligible. How- ever, the chained algorithms have a comparatively lower throughput, lower scalability, and higher latency with re- spect to their BFT and DPoS counterparts. The fault toler- ance of chained and BFT algorithms is 2f+ 1 like any BFT algorithm, implying they can achieve consensus as long as more than 50% of nodes function properly. However, DPoS algorithm requires a 3f+ 1fault tolerance. Table 19 outlines a comparison of additional attack vec- tors with symbols representing the usual semantics. CTFG, Tentermint, and Ouroboros have mitigation mechanisms against these attack vectors. However, Casper FFG, and any DPoS algorithms cannot successfully defend against the cartel formation attack. Peercoin, on the other hand, has mechanism against this cartel formation attack, unfor- tunately, suffers from all other attack vectors. Finally, a comparison of the selected DPoS crypto- currencies is presented in Table 16. 6 I NCENTIVISED CONSENSUS : BEYOND POWAND POS Some consensus algorithms take a different approach in which they do not solely rely on any PoW or PoS mech- anism. Instead, they use an approach in which a PoW/- PoS mechanism is combined with another approach. We consider such algorithms as hybrid algorithms which are presented in Section 6.1. Other approaches adopt a more drastic approach in which they do not leverage any type PoW/PoS algorithm whatsoever. Such algorithms aretagged as N-POS/POW (to symbolise Non-PoS/PoW) al- gorithms and discussed in Section 6.2. 6.1 Hybrid Consensus In this section, we outline a new breed of consensuses algorithms that combine either a PoW or PoS algorithm or both with another novel algorithm or mechanism, thus creating a hybrid mechanism. 1) P ROOF OF RESEARCH (POR). Proof of research is a hybrid approach that combines proof-of-stake with the proof-of-BOINC [160]. BOINC stands for Berkeley Open Infrastructure for Network Computing [162]. It is a grid computing platform widely used by scientific researchers in different domains by allowing them to exploit the idle computing resources of personal computers around the world. With the proof-of-BOINC, a researcher has to prove his contribution for the BOINC research work. The PoR mechanism is leveraged by Gridcoin [160], [161], a crypto-currency that can be earned by anyone by sharing their computing resources with the BOINC pro- ject. The mechanism by which PoS and Proof-of-BOINC are tied together for the PoR is explained next [161]. The PoS mechanism is similar to the traditional PoS algorithm. Anyone can become a minter, known as Investor in Gridcoin terminology, by owning a certain amount of Gridcoin and participating in the minting process. In addition to this, other users, known as Researchers in Gridcoin terminology, can also participate in the minting process. Interestingly, an investor can also be a researcher and thus, can increase their amount of grid coin earned. For this, a researcher installs the BOINC software and registers a project from the BOINC whitelist with his email address. The researcher is assigned a unique cross project identifier (CPID) and starts downloading the work share. Once the computation is completed, the researcher returns the result with a credit recommendation for the completed workload. The recommendation is compared with that of another researcher, and the minimum credit is rewarded. This workload credit data is stored in the header of each block and the researcher is rewarded with the corresponding amount of Gridcoin. To summarise, the consensus mechan- ism is mostly dominated by the PoS mechanism with Proof- of-BOINC acts as a reward mechanism for sharing unused computing resources available to the researchers. Hence, its security is similar to that of the traditional PoS algorithm. 2) S LIMCOIN ’SPROOF -OF-BURN (POB).The Proof-of-Burn is a consensus algorithm proposed by Ian Stewart as an 23 Table 17: Comparing structural properties of PoS Consensus Algorithms. Single committee Multiple committee Consensus /SystemNode typeType Formation Configuration Topology ConfigurationMechanism Chained (PeerCoin)Clients, Miners & Minters- - - Flat Dynamic Probabilistic lottery Chained (CFFG)Clients, Miners & Validators- - - Flat Dynamic Probabilistic lottery BFT (Tendermint)Clients & ValidatorsOpen (Close) Explicit Dynamic (Static) - - Voting BFT (CTFG) Clients & ValidatorsOpen Explicit Dynamic - - ? BTFG (Ouroboros)Clients, Electors & StakeholdersOpen Explicit Dynamic Voting DPoS Clients & ValidatorsOpen Explicit Dynamic - - Voting Table 18: Comparing security properties of PoS Consensus Algorithms. Attack Vectors Consensus /SystemAuthentication Non-repudiationCensorship resistance Adversary tolerance Sybil protection DoS Resistance Chained (PeerCoin)X High 3f+ 1 Chained (CFFG)X High 3f+ 1 BFT (Tendermint)(In close type), X (In open type)High 3f+ 1 BFT (CTFG) X High 3f+ 1 BFT (Ouroboros)X High 2f+ 1 DPoS X High 3f+ 1 Table 19: Comparison of additional attack vectors protection among PoS Consensus Algorithms ConsensusnSystem Nothing-at-Stake Bribing Long-range Coin-age Pre-computing Cartel formation Chained (PeerCoin) X X X X X Chained (Casper FFG) X BFT (Tendermint) BFT (CTFG) BFT (Ouroboros) DPoS X Table 20: Comparing performance properties of PoS Consensus Algorithms. ConsensusnSystem Fault toleranceThroughput Scalability Latency Energy consumption Chained (PeerCoin, CFFG)2f+ 1 Medium Medium Medium Medium BFT (Tendermint, CTFG, Ouroboros)2f+ 1 High High Low Low DPoS 3f+ 1 High High Low Low alternative to PoW [163]. In PoW, miners need to invest in building a mining rig in order to participate in the mining process. In PoB, miners need to burn their coins in order to participate in the mining process. Burning coins mean that sending coins to an address without the private key and thus never usable. Thus, burning coins is an analogous idea to the investment for building a mining rig. The amount of burning has a positive correlation with the possibility of being selected for mining the next block. This is similar to the PoW system, where the miners increasingly invest in modern equipment to maintain the hash power, as the incentive decays with the complexity. Slimcoin is a crypto-currency which utilises the idea ofPoB in combination with PoW and PoS [164], [165], thus creating a hybrid consensus mechanism. Algorithmically, their idea is similar to the chained PoS algorithm of Peercoin as presented in in Section 5.2.1 with additional PoB mech- anism sandwiched in between PoW and PoS algorithms. The PoW is used to generate the initial coin supply using the mechanism of Bitcoin. When the system has sufficient amount of money supply, it plans to switch to a hybrid of PoW and PoS mechanism similar to Peercoin where PoB will be used to select the miner. As this happens, the minters will need to burn their accumulated coins in order to be eligible to participate in the PoS minting process. Since PoB 24 algorithm is mostly used for minter selections, it has hardly any effect on the security of the system. Hence, its security and other properties are mostly similar to that of Peercoin. 3) P ROOF OF STAKE -VELOCITY (POSV). One of the major limitations of coin-age based PoS is that there is no incentive (or lack of penalty thereof) for the minters to be online to participate in the staking process. This is because that the coin-age increases linearly over time, without the need for the stakeholders to be online and participate in the staking process. They can, therefore, choose to participate for a short period and then collect the reward and may go offline again. The lack of participants may facilitate attacks at a certain time. To counteract this problem, a crypto-currency called Reddcoin proposed a novel hybrid algorithm called Proof of Stake-Velocity (PoSV) [166], [168]. The central to the PoSV is the idea of a mechanism called the velocity of stakes coupled with any traditional PoS algorithm. Conceptually, the velo- city of stake mirrors the notion of the velocity of money, a terminology from Economics implying the frequency of money flow within the society [169]. Indeed, the velocity of stakes evolves around the idea of increasing the flow of stakes during the PoS consensus mechanism [167]. This (the flow of stakes) can be achieved if the minters are encour- aged to actively participate in the consensus mechanism by staking their crypto-currency, instead of holding their coins offline. This process in a way will also increase the overall security of the system and counteract the lack of participant issue in PoS. To facilitate this PoSV introduces a non-linear coin- ageing function in which the coin-age of a particular coin is gained much faster in the first few days and weeks than the gain in later weeks. For example, it has been estimated that minters who stake their coins every two weeks or less, can earn up to 20% more than people who do not participate in the staking process [167]. Such incentives encourage the minters to increase the velocity of stakes in the whole network. Note that PoSV is similar to any PoS mechanism along with its properties and hence, not explored in detail here. 6.2 N-POS/POW The consensuses algorithms presented in this category do not rely any way on either PoW or PoS algorithms. Instead, they rely on completely novel mechanisms. Therefore, we call them N-POS/PoW algorithms for the convenience of group naming. 1) P ROOF -OF-COOPERATION (POC). The Proof-of- Cooperation is a consensus algorithm introduced by the FairCoin crypto-currency [170], [171]. This consensus algorithm relies on several special nodes known as Certified Validating Nodes (CVNs). CVNs function similar to the way validators act in a DPoS consensus algorithm as utilised by EOS or Tron crypto-currencies, as they are nodes which can create blocks in Faircoin using the PoC consensus algorithm. However, unlike any DPoS validators, each CVN node is authenticated by their corresponding Faircoin identifier as well as trusted following a set of community-based rules and technical requirements [171]. The community rules state that a candidate node willing to be a CVN mustparticipate in Faircoin community activities by performing some tasks. Examples of these tasks are running a local node or contributing to any technical or management issue related to Faircoin which must be confirmed by at least two active members of the community. Besides, the candidate node must follow a set of technical requirements such as 24/7 network availability and a special cryptographic hardware used for signature generation. With the involvement of CVNs selected in the previously discussed manner, the core mechanism for PoC consensus algorithm is briefly discussed next. Blocks in Faircoin are created in a round-robin fashion in every three minutes of epoch by one of the CVNs. To create a new block, a CVN needs to be selected using a deterministic voting mechanism individually carried out by every single CVN in the network. The steps of this mechanism are: Each CVN finds the CVN, which has created a block furthest in the chain by traversing backwards through the chain. Next, it is checked if the found CVN has been active recently in the network by looking for its signature in the last few blocks. If so, this CVN will be selected as the next CVN. Then, each node creates a data set consisting of the hash of the last block, the ID of the selected CVN for the next block, and its own CVN ID, which is then signed by the specified cryptographic hardware. The created dataset, along with the signature, is then propagated through the network. The selected CVN receives this dataset along with their signature from multiple CVNs and verifies each signa- ture. As soon as the selected CVN finds that more than 50% CVNs have selected it to be the next block creator, it can be certain that its turn is next at the end of the current epoch, i.e., three minutes. The selected CVN adds all pending transactions into a new block, along with all the received signatures, and propagates the block in the network. Upon receiving the block, other CVNs verify the block by checking the if the CVN who created the block is actually the one selected as the block creator as well as validating all signatures in it and its transactions. If the verification is successful, the block is added to the blockchain and the same mechanism continues. 2) P ROOF OF IMPORTANCE (POI).PoS gives an unfair advantage to coin hoarders. The more coins they keep in their accounts, the more they earn. This means the rich get richer and everyone has an incentive to save coins instead of spending them. To solve these issues NEM has introduced a novel consensus mechanism called “Proof of Importance (PoI)” [172]. It functions similarly to PoS: nodes need to ’vest’ an amount of currency to be eligible for creating blocks and are selected for creating a block roughly in proportion to some score. In Proof-of-stake, this ’score’ is one’s total vested amount, but in PoI, this score includes more variables. All the nodes that have more than 10000 XEM (the correspond- ing crypto-currency of XEM) are theoretically given equal positive importance and with 9B XEM coins there can be maximum 900Ksuch nodes. However, the actual number of such nodes and their importance vary with time and their 25 amount of transaction in XEM. The calculations borrow from the math of network clus- tering and page ranking. At a high level, the primary inputs are: Net transfers: how much has been spent in the past 30 days, with more recent transactions weighted more heavily. Vested amount of currency for purposes of creating blocks. Cluster nodes: accounts that are part of interlinked clusters of activity are weighted slightly more heavily than outliers or hubs (which link clusters but not part of them). In NEM, the importance of an account depends only on the net transfers of XEMs from that account. To be considered for the importance estimation at a certain block height, h, a node must have transferred at least 100 XEMs during the last 30days or 43;200 blocks. The “importance score” addresses two primary criticisms of proof-of-stake. One risk is that people hoard many coins as possible and reap the rewards from block creation. This concentrates wealth while discouraging transactions. The importance score means that hoarding will result in a lower score while spreading XEM around will increase it. Being a merchant pays better than having a hoard. 6.3 Analysis In this section, we summarise the properties of different Hy- brid and N-Pow/PoS algorithms utilising the taxonomies in Table 21, Table 22, Table 23 and Table 24. Like before, ‘-’ signifies that the corresponding property is not applicable for the respective consensus algorithm, ‘?’ indicates that the information the property has not been found, a ‘ ’ is used to indicate an algorithm satisfies a particular property and ‘X’ is used to imply the reverse (not satisfied). Table 21 presents the comparison of structural properties for the corresponding consensus algorithms. Among them, PoR and PoB depend on a multiple committee formation with a flat topology and dynamic configuration. Conversely, PoSV and PoI use an open single committee with a dynamic configuration, and probabilistic lottery as their underlying mechanism. PoC has an implicit, open, and dynamic single committee, which relies on voting mechanism. All these algorithms have an adversary tolerance of 3f+1with the support of non-repudiation, Sybil protection, DoS resistance, and high censorship resistance as reported in Table 22. Entities in PoB, PoSV , and PoI do no require to be authenticated while PoC entities must be authenticated, and researchers in PoR need to be authenticated. However, other entities in PoW can remain non-authenticated, as indicated with the ‘X’ symbol in the table. All of them except PoC and PoI have 3f+ 1 adversary tolerance because of their usage of PoS algorithms. We have not found any regarding adversary tolerance for PoC and PoI. Table 23 presents the comparison of some additional attack vectors for the Hybrid algorithms. As evident from the table, since these algorithms utilise PoS as one of their consensus algorithms, they suffer from the similar limita- tions of any PoS algorithm. For example, none of them has any guard against most of these additional attack vectors.The only exception is PoB which is because of its use of Peercoin like functionality, can resist the cartel formation attack. The comparison of the performance properties for these algorithms is presented in Table 24. All of them have 2f+ 1 fault tolerance except PoC and PoI as we have not found any information fault tolerance for PoC and PoI. In terms of Scalability, Latency and Energy, every algorithm except PoB exhibits similar characteristics: they have high throughput, consume low energy, and have low latency, meaning they reach finality quickly. Because of its reliance on PoW, PoB has low scalability, low latency, and also consume meidum energy. In terms of throughput, PoR, PoSV and PoI have high throughput, whereas PoC has a low throughput and PoB has a medium throughput. Finally, a comparison of the selected Hybrid and N- PoW/PoS crypto-currencies is presented in Table 25. 7 N ON-INCENTIVISED CONSENSUS In this section, we present non-incentivised consensus algorithms that are used in private blockchain systems well-suited for non-crypto-currency applications. These al- gorithms are mostly based on classical consensus algorithms with special features added for their adoption for the corres- ponding blockchain systems. One of the major initiatives within the private blockchain sphere is the Hyperledger project, which is an industry- wide effort [206]. Founded by the Linux Foundation, it is a consortium of some of the major tech vendors of the world. It provides an umbrella to facilitate the development of different types of open source projects utilising private blockchains with a specific focus to address issues involving business and governmental use-cases. Currently, there are six major projects within Hyperledger: Hyperledger Fabric [207], Hyperledger Sawtooth [208], Hyperledger Burrow [209], Hyperledger Iroha [210] and Hyperledger Indy [211]. Each of them is analysed below with a brief introduction. 7.1 Hyperledger Fabric Hyperledger Fabric is the first major private blockchain system that originated from the Hyperledger ecosystem [207]. It has been designed with strong privacy in mind to ensure that different businesses organisations, including governmental entities, can take advantage of a blockchain system in different use-cases. A crucial capability of Fabric is that it can maintain multiple ledgers within its ecosystem. This is a useful feature, which separates Fabric from other blockchain systems consisting of only one ledger in each of their domains. A key strength of Fabric is its modular design and pluggable features. For example, Fabric is not dependant on a particular format of ledger data, which is useful in several use-cases. In addition, the consensus mechanism is fully pluggable. Therefore, different types of consensus algorithms can be used in different situations. As part of its consensus process, Fabric utilises a special entity called Orderer, which is responsible for creating a new block and extending the ledger by adding the block in the appropriate order. In addition, there are other entit- ies known as endorsers. Each endorser is responsible for 26 Table 21: Comparing structural properties of Hybrid and N-POS/POW Consensus Algorithms. Single committee Multiple committee Consensus /SystemNode typeType Formation Configuration Topology ConfigurationMechanism PoR Clients (Researchers) & Minters- - - Flat Dynamic Probabilistic lottery PoB Clients, Miners & Minters- - - Flat Dynamic Probabilistic lottery PoSV Clients & MintersOpen Implicit Dynamic Probabilistic lottery PoC Clients & CVNs Open Explicit Dynamic - - Voting PoI Clients & transaction partnersOpen Implicit Dynamic - - Probabilistic lottery Table 22: Comparing security properties of Hybrid and N-POS/POW Consensus Algorithms. Attack VectorsConsensus Authentication Non-repudiationCensorship resistanceAdversary tolerance Sybil protection DoS Resistance PoR X/ High 3f+ 1 PoB X High 3f+ 1 PoSV X High 3f+ 1 PoC High ? PoI X High ? Table 23: Comparison of additional attack vectors protection for Hybrid and N-POS/POW Consensus Algorithms Consensus /SystemNothing-at-Stake Bribing Long-range Coin-age Pre-computing Cartel formation PoR X X X X X X PoB X X X X X PoSV X X X X X X Table 24: Comparing performance properties of Consensus Algorithms of Hybrid and N-POS/POW. Consensus Fault toleranceThroughput Scalability Latency Energy PoR 2f+ 1 High Medium Low Low PoB 2f+ 1 Medium Low Medium Medium PoSV 2f+ 1 High Medium Low Low PoC ? LoW (10.6 TPS [173]) Medium Low LoW PoI ? High Medium Low Low Table 25: Hybrid & Non-PoW/PoS currencies Currency Genesis date (dd.mm.yyyy)Block reward Total supply Consensus Block Time Gridcoin 24 Mar 2016 Minting 42 Million PoR, PoS 1 minute Slimcoin May 2014 50-250 coins 133 Million PoB, PoW, PoS 1.5 minutes Reddcoin January 20, 2014Block reward 2.8 Billion PoSV 1 minute Faircoin 6th of March, 2014.Block reward 5.3 Million PoC Depends on Time-weight Parameter Burst 11 August 2014 Reduces at a fixed rate of 5 percent each month204 Million PoC 4 minutes NEM March 31st, 2015transaction fees only + node rewards899 Million PoI 1 minute validating and endorsing a transaction where it checks if an entity is allowed to perform a certain action in a ledger encoded within the transaction. Other participating entities are general users who create transactions. All the entities, including the Orderer(s) and the endorsers, are registered and authenticated via a Fabric specific special entity called Membership Service Provider (MSP). The MSP is responsible for managing the identities of all participants in the ledger.Using this identity layer, it is possible to create security policies that dictate which entities can perform what actions within a specific ledger. A simple flow of a consensus process in Fabric is illustrated in Figure 13. The number of Orderer can be increased to distribute the ordering service. Currently, it supports SOLO and Kafka. A SOLO ordering service consists of just one single orderer and hence, cannot provide any type of fault tolerance. That 27 A All required entities are registered in the MSP . B A channel with a ledger is initiated. In addition, a policy is created containing the endorsement criteria as well as other security and privacy criteria. C A chaincode (smart-contract written either in Java or Go) is deployed in the ledger. D When an entity wishes to invoke certain functions in the chaincode to read data from the ledger or to write data into the ledger, it submits a transaction proposal to all the required endorsers as dictated in the policy. E Each endorser validates the proposal, executes the chaincode and returns a proposal response consisting of other ledger data. F The proposal, its response, and other ledger data are encoded as a transaction and sent to the Orderer. G The Orderer creates a block using the transaction and returns the block to the endorsers. H Each endorser validates the block and, if validated, extends the ledger by attaching the new block. This essentially updates the state of the ledger. Figure 13: A simple flow of a consensus process in Fabric. is why it is not recommended to utilise the SOLO model in the deployed system and has only been provided for initial testing. On the other hand, the Kafka Orderer utilises a Kafka cluster for deploying distributed Orderers. Kafka is a distributed streaming platform with a pub-sub archi- tecture [212] and is coupled with Zookeeper, a distributed coordination service [213]. At this point, the Kafka Orderer is the only recommended setting for achieving consensus in Fabric. An SBFT (Simplified Byzantine Fault Tolerance) based consensus algorithm is currently being developed and is to be released soon. 7.2 Hyperledger Sawtooth Hyperledger Sawtooth, initially developed by Intel, is a software framework for creating distributed ledgers suitable for a variety of use cases [208]. Sawtooth utilises a novel consensus algorithm called Proof-of-Elapsed-Time (PoET), which depends on Intel SGX (Software Guard Extension). Intel SGX is a new type of Trusted Execution Environment (TEE) integrated into the new generation of Intel processors. SGX enables the execution of code within a secure enclave inside the processor, whose validity can be verified using a remote attestation process supported by the SGX. PoET, similar to the Nakamoto consensus algorithm in Bitcoin, relies on the concept of electing a leader in each round to propose a block to be added in the ledger. The difference is that the Nakamoto algorithm and its variants select a leader by a lottery mechanism, which utilises com- puting power to generate a proof, as described previously. However, PoET solely relies on the Intel SGX capability to elect a leader. During each round, every validator node in the network, requests for a wait time from a trusted function in the SGX enclave. The validator that is assigned the shortest waiting time is elected as the leader for that round. The winning validator then can propose a block,consisting of a series of transactions from the defined trans- action family. Other validators can utilise a trusted function supported by SGX to assess whether a trusted function has assigned the shortest time to the winning validator, and the winning validator has waited the specified amount of time. Furthermore, other validators verify the validity of the block before it is included in the ledger. The inclusion of the PoET as a consensus algorithm enables Sawtooth to achieve massive scalability as it does not need to solve a hard, computationally intensive cryptographic puzzle. In addition, it allows Sawtooth to be used not only for a permissioned ledger, but also for a public ledger. 7.3 Hyperledger Burrow Hyperledger Burrow is a private (permissioned) deploy- ment of the Ethereum platform [209]. It has been created and then deposited to the Hyperledger code-base by Monax Industries Limited [214]. The core component in Burrow is a permissioned version of the EVM (Ethereum Virtual Machine) to ensure that only authorised entities can execute code. Two additional components have been added: Byz- antine fault-tolerant Tendermint protocol [179], [221] and the RPC gateway. The Tendermint consensus falls under the category of a Byzantine Fault Tolerance (BFT) algorithm, which can be used to achieve consensus even under the Byzantine behaviour of a certain number of nodes as presented in Section 5.2.2. Burrow depends on several validators, which are known (authorised) entities with the duty to validate each block utilising the Tendermint consensus algorithm. This al- gorithm allows consensus to be achieved in Burrow with 1/3 nodes exhibiting Byzantine behaviour, either acting maliciously or having been down due to network or system failure. Since Burrow utilises the EVM, a wide-range of smart- contracts and DApps (Decentralised Applications) could be deployed. Using the Tendermint algorithm with a set of known validators allows Burrow to scale at a much faster rate than Ethereum while preserving the privacy of transactions by allowing only known entities to participate in the network. 7.4 Hyperledger Iroha Hyperledger Iroha is a private blockchain system initially developed by Soramitsu, Hitachi, NTT Data, and Colu and is currently hosted by Linux foundation under the Hyperledger Project [210], [215]. Iroha aims to create a simple blockchain infrastructure which can be incorporated into any system which requires a blockchain architecture underneath to function. The major emphasis while design- ing Iroha is on a simpler construction with a strong focus on mobile-friendly application development using a novel consensus mechanism called YAC (Yet Another Consensus) [215], [216]. One fundamental different of Iroha from other Hyperledger project is its fine-grained permission control mechanism which allows defining permissions for all relev- ant commands, queries, and even joining in the network. The core architecture consists of several components [216], [219]. A brief description of its major components is presented below: 28 Troii represents the entry point of any application to the Iroha network. It utilises gRPC (gRPC Remote Pro- cedure Calls [218]), an open source RPC framework, to interact with different peers and entities within the blockchain network. Model represents how different entities are represented within the system and defines the mechanism to inter- act with them. Network provides the network functionalities required to maintain the P2P network and to propagate transac- tions in the network. Consensus facilitates the functionalities related to achieving consensus in the network using the YAC consensus protocol, a practical byzantine fault-tolerant algorithm (discussed below). Simulator provides a mechanism to simulate the effects of transactions on the chain by creating a temporary snapshot of the chain state. Validator allows the validation of transactions by veri- fying its formats and signature along with the veri- fication of business rules and policies involved in the transactions. There are two types of validations in Iroha: –Stateless validation checks for transaction formats and signature. –Stateful validation checks the business rules and policies, e.g., if a certain action is allowed by an entity. Synchroniser is a part of the consensus component and is responsible for synchronising the chain to a new or disconnected node. Ametsuchi is the storage component of Iroha and is used to store the blocks and the chain state known as World State View (WSV). These components are used by three core entities within the architecture [216]: Clients are applications that they can query data from the allowed Iroha chain as well as can perform certain actions, called commands, by which the state of the chain is updated. For each of these, clients need to interact with the peer. Peers are nodes that have the following two functional- ities: –To maintain a copy of the ledger. Applications can thus interact with a peer to query a chain or to submit transactions to update the chain. –To participate in the consensus process by maintain- ing its address, identity and trust as a single entity in the network. Ordering service node(s): Like Fabric, ordering service nodes are responsible for ordering transactions and creating a proposal of a block. With these components and entities, a flow of transac- tions in Iroha is briefly presented in Figure 14 [216]. 7.5 Hyperledger Indy Hyperledger Indy is a private blockchain system purpose- fully built for providing an ecosystem for blockchain-based self-sovereign identity [211], [222]. The concept of Self- Sovereign Identity has been initially promoted by the Sovrin foundation [223], a non-profit international entity consistingA A client prepares and sends a transaction to a peer using Troii. B The peer performs stateless validation to the trans- action and forwards the transaction to the ordering service using an ordering gate. C The ordering service combines and orders transac- tions from different peers in a transaction proposal which is then broadcast to the peers. D Each peer performs a stateful validation of the pro- posal using the simulator and creates a block con- sisting of only verified transactions. Each peer signs the block, generates a hash of the proposed block and finally, creates a tuple containing the hash and the signature. Such a tuple is called a vote. The block and the vote are then internally sent to the consensus gate to initiate the YAC mechanism. E The YAC mechanism in each peer prepares an ordered list of voting peers utilising the hashes created in the previous step. The first peer in the list is regarded as the leader and is responsible for aggregating votes from other voting peers. F After aggregating all votes from the voting peers, the leader computes the supermajority (usually 2/3rd) of votes for a certain hash (signifying a block). G Once a supermajority for a proposed block is achieved, the leader propagates a commit message for this particular block to all voting peers. H Each voting peer verifies the commit message and adds the block to the blockchain. Figure 14: A flow of transactions in Iroha . of several private organisations to promote the notion of Self-sovereign Identity. The Indy project is closely associated with the Sovrin foundation focusing on materialising this notion of a self-sovereign identity system as a public identity utility. Currently, Indy consists of the following two major com- ponents: Indy-plenum : Plenum is the underlying distributed ledger (blockchain) construct of the Indy platform. Like any distributed ledger, the Plenum ledger is fundament- ally an ordered log of transactions. In addition, it consists of several nodes, among which a single or a few chosen ones act as the leader responsible for ordering the trans- actions. The nodes execute a consensus protocol which utilises a three-phase commit to reach agreement among themselves regarding the order of the transactions. Indy-SDK : This provides the required software APIs and tools to enable other software to interact with the Plenum ledger. It hides all the intricate internals from the users of the platform so that the platform can be utilised without even knowing the complexities of the ledger and its asso- ciated consensus protocol. The consensus protocol utilised in Indy is called RBFT (Redundant Byzantine Fault Tolerance) [224]. Like any other byzantine fault tolerance protocol, it relies on 3f+ 1 nodes (a participant in the consensus protocol) in order to handle fbyzantine nodes [224], [225]. For example, it requires 29 four deployed nodes in order to handle a single byzantine node. Each participating node in RBFT deploys two (or more) protocol instances, aptly called Master and Backup protocol instance, each of which is executed in parallel. A separate primary node (also called a leader) is selected from the master and the backup protocol instance. The leader is responsible for ordering the transactions. Its performances, i.e., latency and throughput, are periodically observed by the other instances. If its performance degrades, a different leader is selected from the backup instance. Indy maintains a number of ledgers for different pur- poses, unlike many other blockchain systems which employ a solo ledger. For example, separate ledgers are maintained for node maintenance, for identity transactions and so on. Clients (users via their appropriate software interfaces) can interact with these ledgers via different nodes for updating the ledger via transactions and for reading from the ledger via queries. A fine-grained permission mechanism can be used to dictate which client has to write permissions, how- ever, any client can read from the ledger. Once a node receives a transaction from a client, it per- forms some validation and then broadcasts the transaction to other nodes in the network. When the transaction reaches enough nodes, the primary node starts a new consensus round using a three-phase commit mechanism. In the end, all nodes agree to the order proposed by the primary node and add the transaction into the corresponding ledger. 7.6 Analysis In this section, we analyse the non-incentive consensus pro- tocols against the criteria selected before. Block and reward properties are not considered as they are not relevant for non-incentivised consensus protocols. We use the notation ‘’ to indicate an algorithm satisfies a particular property and the notation ‘-’ to indicate that there is no informa- tion regarding that specific property. For other properties, explanatory texts are added. STRUCTURAL PROPERTIES .Tn Table 26, we present the comparison of structural properties among the non- incentivised consensus algorithms discussed in this section. As evident from the table, different algorithms use different types of nodes, and all algorithms are based on single com- mittee with closed committee type and explicit committee formation. Only YAC relies on a dynamic configuration which utilises the reputations of the nodes from previous interactions; all others have the static configuration. Voting is the predominantly used underlying mechan- ism, which is utilised by Tendermint Burrow, YAC, and RBFT, whereas PoET relies on a lottery mechanism. Fabric currently utilises the ordering services by the orderer. In the future, it might utilise SBFT, which leverages the voting mechanism. SECURITY PROPERTIES .The comparison of security prop- erties among the non-incentivised consensus algorithms is presented in Table 27. All algorithms support non- repudiation via digital signature and have a significantly low censorship resistance. This is because the identities of all participating nodes are known. In case any node starts misbehaving, because of an attacker taking control of thatnode, it can be easily identified, and proper actions can be taken. The same logic applies for the Sybil protection and towards DoS resistance. Being mostly based BFT algorithms, all algorithms, except PoET, have 3f+ 1 adversarial tol- erance. It has been found that PoET has an adversarial tolerance of  log log n log n [220], where nis the number of nodes. PERFORMANCE PROPERTIES .The comparison of perform- ance properties among the non-incentivised consensus al- gorithms is presented in Table 28. All algorithms can provide a good throughput and do not require to consume any significant amount of energy. PoET, utilising a lottery mechanism, can be scaled with a large number of valid- ators, however, this will increase the latency (finality) of transactions [217]. All other algorithms employing a voting mechanism cannot be scaled with a large number of val- idators, providing low latency for the transactions. Fabric, YAC, and RBFT provide a 2f+ 1 fault tolerance, whereas the information regarding the fault tolerance for PoET and Tendermint Burrow is not specified formally. 8 D ISCUSSION As per our analysis in different sections, it is clear that PoW consensus algorithms have major limitations, specifically in terms of power consumption and scalability. Many regard PoS, and it is variant DPoS, to be the most suitable altern- atives. To understand the applications of these algorithms in public blockchain systems, we have analysed the top 100 crypto-currencies, as reported on CoinMarketCap4as of 18 July, 2019. In the first analysis, we have calculated the number of consensus algorithms used in these (top 100) crypto- currencies. The distribution of consensus algorithms is presented in Figure 15 . As per our analysis, PoW is still the most widely used ( 57% ) consensus algorithms to date, whereas DPoS is the second most with 11% , and PoS is the third most with 6%used consensus algorithms. All other consensus algorithms represent the remaining 26% . This means that, even though many consider that PoS and DPoS are the best alternatives to PoW, their adoption is still far behind PoW. To investigate it further, we have analysed a year- wise distribution of the genesis dates of different crypto- currencies. It is to understand if there is any inclination towards an alternative consensus algorithm over PoW in recent years. The distribution is illustrated in Figure 16, which represents a surprising observation: PoW is still the most widely used algorithms for crypto-currencies which have been created in recent years. For example, the numbers of crypto-currencies created with PoW algorithms in last three years (2017, 2018 & 2019) are 11,19and4respectively, in comparison to 4,2and2for PoS and DPoS combinedly. This implies that PoW is still the most popular consensus algorithm among the crypto-currency community. A deeper investigation reveals another insight though. The top 100 list retrieved from Coinmarketcap also contains crypto-tokens generated on top of any smart-contract platform such as Ethereum, EOS and Tron with majority tokens are built on 4. https://coinmarketcap.com/ 30 Table 26: Comparing structural properties of Consensus Algorithms of Hyperledger Systems. Single committee Consensus /SystemMechanism Node typeType Formation Configuration Fabric Ordering/Voting (SBFT) Client (Regular peer), En- dorsing peer & OrdererClose Explicit Static PoET Lottery Client, Transaction processor & ValidatorClose Explicit Static Tendermint Burrow Voting As Tendermint (3) Close Explicit Static YAC Voting Client, Peer & Ordering Ser- vice nodeClose Explicit Dynamic RBFT Voting Client & Node Close Explicit Static Table 27: Comparing security properties of Consensus Algorithms of Hyperledger Systems. Attack VectorsConsensus Non-repudiation Censorship resistanceAdversary tolerance Sybil protection DoS Resistance Fabric Low 3f+ 1 PoET Low  log log n log n Tendermint Burrow Low 3f+ 1 YAC Low 3f+ 1 RBFT Low 3f+ 1 Table 28: Comparing performance properties of Consensus Algorithms of Hyperledger Systems. Consensus Fault tolerance Throughput Scalability Latency Energy Fabric 2f+ 1 Good Medium Low Low PoET - Good Good Medium Low Tendermint Burrow - Good Medium Low Low YAC 2f+ 1 Good Medium Low Low RBFT 2f+ 1 Good Medium Low Low top of Ethereum. Most of these tokens have emerged after 2016 with Ethereum utilising PoW . This could be the reason why the most recent crypto-currencies have been found to utilise PoW. Another indication of PoW domination over other al- gorithms is the market-cap distribution of their correspond- ing crypto-currencies. The distribution is presented in Table 29 and illustrated in Figure 17. Not surprisingly, PoW cur- rencies with a market-cap of around 221 Billion USD have a massive 93% dominance over other currencies. DPoS and PoS currencies are the nearest rivals with a market-cap of around 6Billion USD and dominance of only 3%for each group. Table 29: Market capitalisation of major consensus al- gorithms in top 100 Crypto-currencies Consensus Algorithms Market-cap (USD) PoW 221;238;526;412 DPoS 6;483;606;020 PoS 6;287;224;485 PoW+PoS 2;436;683;929 Proof of Authority 572;188;935 Proof of Activity 274;066;240 From our investigation, it is clearly evident that PoW algorithm, even with its major limitations, is still the most popular consensus algorithm to be utilised in different crypto-currencies. Currencies which utilise PoW algorithms consume a significant amount of energy as illustrated in Section 5.1.4. Besides, they have a reduced throughput (in terms of transaction number) compared to PoS and DPoScurrencies. For example, the reported TPS (Transactions Per Second) for Bitcoin and Ethereum are 7and1525, respect- ively [226], while DPoS currencies EOS has a reported and estimated TPS of 50 and 4000 respectively [226] and Tron has a claimed TPS of 2000 [227]. Clearly, DPoS currencies have better performance, at least in terms of TPS, over any PoW currency. Therefore, one might ask the underlying reason behind this counter-intuitive trend of PoW being the most popular consensus algorithm. We have identified a few reasons behind this as presented below: Bitcoin is the most dominant crypto-currency in terms of market-cap. As of 18 July, it has a market cap of around 171Billion USD. In addition to this, its different forked variants (Bitcoin Cash5and Bitcoin Satoshi Vision6) also have a combined market-cap of 8Billion USD. If we exclude Bitcoin and its variants, we have a slightly different distribution of market-cap, as illus- trated in Figure 18. Here, the market-cap percentage of PoW algorithm is reduced from 93% to71% percent, which is still significant in comparison to DPoS and PoS, its nearest rivals. PoW has the first-mover advantage because of Bit- coin and Ethereum, both being the pioneer in their respective domain. Bitcoin has been the first successful crypto-currency, while Ethereum is the first blockchain- based smart-contract platform. Other crypto-currencies, being motivated by their success, might have adopted the approach of utilising PoW as their corresponding consensus algorithm. 5. https://www.bitcoincash.org/ 6. https://bitcoinsv.io/ 31 PoW58%DPoS9%PoS8%PoW+PoS4%Proof of Activity (PoA)1%Delegated Byzentine Fault Tollerance (dBFT)3%Practical Byzentine Fault Tollerance (PBFT)2%Loop Fault Tolerance (LFT)1%XRP Ledger Protocol1%Stellar Consensus Protocol (SCP)1%Tangle1%VBFT (verifiable random function)1%Proof of authority2%Proof-of-Service (PoS)1%Other1%POI1%Proof of retrivility1%BFT3%Proof-of-Believability (PoB)1%Other10% PoWDPoSPoSPoW+PoSProof of Activity (PoA)Delegated Byzentine Fault Tollerance (dBFT)Practical Byzentine Fault Tollerance (PBFT)Loop Fault Tolerance (LFT) XRP Ledger ProtocolStellar Consensus Protocol (SCP)TangleVBFT (verifiable random function)Proof of authorityProof-of-Service (PoS)OtherPOIProof of retrivilityBFTProof-of-Believability (PoB) Figure 15: Consensus algorithms in Top 100 Crypto-currencies Another strong argument in favour of PoW is its un- derlying security. The number of miners is far greater in Bitcoin than the number of validators in PoS and DPoS. This implies a better decentralisation in Bitcoin than PoS or DPoS. For example, EOS has only 21 valid- ators, while Tron has 27 validators. The probability of collusion among these validators is far greater than that of any popular PoW currency. For this reason, many in the blockchain community have been doubtful of the security of any PoS/DPoS currency. However, there is a counter argument against this. Because of the mining centralisation issue ( highlighted in Section 5.1.4), many point out that a PoW algorithm might also be prone to centralisation. Therefore, a PoW currency might also suffer from collusion attack. With the dominance of PoW over other consensus al- gorithms, one might wonder what lies ahead and might ask if there will be any shift of balance among the consensus algorithms. We believe that we will most definitely experi- ment with a shifting of balance in the near future. In this regard, the PoS transformation process of Ethereum will be a crucial factor. The proposed Ethereum PoS consensus mechanisms, both CFFG and CTFG, are highly regarded by the academics and industrial enthusiasts for their strong guarantee of security. With their strong focus on economic incentive and game-theoretic based approach, it is believed that their security will be as close as PoW and much better than any current PoS/DPoS algorithm can provide. In par- ticular, the number of validators will be much higher than any number leveraged in the current PoS/DPoS algorithms.However, it is yet to be seen how they will perform once deployed in real-life settings. The existence of numerous algorithms and wide vari- ations in their properties impose a major challenge to com- prehend them properly. In particular, it is often difficult to test the suitability of a particular algorithm under certain criteria. A visual tool would be a great help in this regard. Towards this aim, we present a decision tree in Figure 19, which can be used to determine the suitable consensus algorithms under certain criteria in different scenarios. For example, such a decision tree diagram can be leveraged to select a particular consensus algorithm while design- ing/developing a new blockchain system. The tree utilises five critical criteria to achieve its goal: incentives, energy consumption, scalability, security (with respect to adversary tolerance), and ASIC-resistance. If the system needs to incentivise the miner/validating nodes, then proof-of-work(PoW) and proof-of-stake (PoS) con- sensus are appropriate choices. Because of their underlying incentives mechanisms, the primary applications of these consensus algorithms are public crypto-currencies. On the other hand, a private blockchain network usually does not rely on any crypto-currencies to motivate or incentivise any validators to run the blockchain network. In addition to incentives, energy consumption is another determining factor in choosing appropriate consensus algorithms. PoW- type algorithms consume high energy, whereas PoS al- gorithms and their derivatives consume a moderate amount of energy. PoW-types algorithms are very slow as of now and can process only a limited number of transactions. 32 PoWDPoSdBFTPoW + PoS02468101214161820 20092010201120122013201420152016201720182019PoWPoSDPoSProof of ActivitydBFTProof of AuthorityPoW + PoS Figure 16: Year-wise distribution of consensus algorithms in Top 100 Crypto-currencies 93%3%1%0%0%0%3%3%PoWDPoSPoW+PoSProof of ActivitydBFTProof of AuthorityPoS Figure 17: Percentage of market capitalisation of consensus algorithms in top 100 Crypto-currencies However, compromising a popular PoW-based blockchain network is very difficult, and therefore, they are more secure than their counterparts. PoW-based algorithms can also be classified based on computational complexity. As discussed earlier, ASIC is a specialised hardware, designed and used to solve hash-based computational problems. ASIC is ex- pensive and hinders common people from participating in the blockchain network. Therefore, memory-based PoW has been designed. Now it is widely used in different crypto-currencies. Non-incentivised consensus algorithms are mostly used in private blockchain systems. They con- sume a very low amount of energy compared to other types of consensus algorithms and are also very scalable. That means the miners can verify the transactions and create blocks really fast. However, a comparatively low number ofvalidating nodes makes these algorithms more vulnerable to attacks. For clarity, we provide a few examples to utilise the decision tree diagram presented in Figure 19. If an incentiv- ised algorithm is required for a highly scalable blockchain system that aims to consume low energy DPoS and BFT derivatives such as Tendermint, CTFG, and Ouroboros are the preferred options. However, they will have moderate security as described earlier. On the other hand, if security is of the highest priority, PoW algorithms are more suitable. In this scenario, there are two options: memory-bound or CPU bound. If ASIC resistance is desired, one should opt for memory-bound PoW algorithms. However, in such a case, one has to sacrifice scalability, and such algorithms will consume high energy. 33 71%11%4%0%2%1%11%14%PoWDPoSPoW+PoSProof of ActivitydBFTProof of AuthorityPoS Figure 18: Percentage of market capitalisation excluding Bitcoin and its variants Note that this is just an example of how such a diagram can be developed using our selected four criteria. Other criteria can be utilised to generate a different diagram which might be suitable for other specific scenarios. Whenever such a diagram is to be developed, the tables (Table 13, Table 14, Table 15, Table 17, Table 18, Table 19, Table 20, Table 21, Table 22, Table 23, Table 24, Table 26, Table 27 and Table 28) utilised to compare different consensus algorithms against the defined properties in the taxonomy will be crucial as the these tables will provide the required template by which such a diagram can be created. 9 C ONCLUSION With the popularisation of crypto-currencies, and block- chain in general, there has been a renewed interest in the practical implications of different distributed consensus al- gorithms. Most of the existing systems struggle to properly satisfy the need for any wide-scale real-life deployment as they have serious limitations. Many of these limitations are due to the underlying consensus algorithm used in a partic- ular system. Therefore, in the quest to create more suitable practical blockchain systems, the principal focus has been on distributed consensus. This has led to the explorations; either existing consensus algorithms have been exploited or novel consensus mechanisms have been introduced. The ultimate consequence of this phenomenon is a wide-range of consensus algorithms currently in existence. To advance the knowledge of this domain, it is essential to synthesise these consensus algorithms under a systematic study, which is the main motivation of this article. Even though there have been several similar works, this is the first paper to introduce a taxonomy of properties desirable for a consensus algorithm and then utilise that taxonomy to analyse each algorithm in a detailed fash- ion. In addition, different consensus algorithms have been grouped into two major categories: Incentivised and Non- incentivised consensus algorithms. An incentivised con- sensus algorithm, exclusively utilised by public blockchain systems and crypto-currencies, relies on incentives for the participants in order to motivate them to behave as inten- ded. On the other hand, in any non-incentivised algorithm,the participants are considered as trusted, and hence, it is assumed that no incentives are required to ensure intended behaviour. As such, these algorithms are mostly used in the private blockchain sphere. We have again grouped incentiv- ised algorithms into three major sub-categories: PoW (Proof of Work), Proof of Stake (PoS) and consensus algorithms beyond PoW and PoS. A PoW algorithm relies on computational complexit- ies or memory size/performance to solve a cryptographic puzzle. There are three major approaches followed by PoW consensus algorithms: i) a compute-bound PoW leveraging the capabilities of the processing unit, ii) a memory-bound PoW which is more reliant on the size and performance of the main memory, and iii) a chained PoW utilises a num- ber of hashing algorithms executed consecutively one after another. Blockchain systems utilising such a mechanism has special nodes, called miner nodes, who are responsible for solving this puzzle and creating a new and valid block and extending the chain by appending this block in the existing chain. The probability to solve this puzzle depends on a network parameter, called difficulty, which is adjusted automatically after a certain period of time. As more miners participate in the network, the network parameters are adjusted in such a manner that requires more computa- tional power to mine a new block. As the corresponding systems become more popular, it attracts more miners, which increases the security of the system. However, the increased computational power results in more energy being consumed. Apart from this, PoW systems generally have a low throughput and do not scale properly. PoS algorithms and their corresponding mechanisms have been analysed in greater detail in Section 5.1. To alleviate the major issues of PoW, Proof of Stake (PoS) has been proposed. In PoS, the nodes who would like to participate in the block creating process are called minters, and they need to own and lock a certain amount of the corresponding crypto-currency, called stake. Such a stake is used to ensure that the minters will act as required since they will lose their stakes when acting maliciously. PoS has several variants: Chained PoS, BFT PoS and DPoS. The core idea of a chained PoS is to leverage a combination of PoW and PoS algorithms chained together to achieve consensus. 34 Consensus algorithm Yes High LowNo LowLow HighMedium Medium High Yes NoMediumIncentivised Energy Scalable Security AISC ResistantRBFT SBFT YAC PoET Burrow Chained PoW Memory Bound PoW (e.g, Cryptonight, Scrypt, and NeoScrypt consensus) Chained PoW (e.g, X11/X13/X15, Quark, and Lyra2RE consensus)CPU -Bound PoW (e.g, Nakamoto consensus)DPoS Tendermint CTFG OuroborosLow PoR PoSV PoC PoIMedium MediumLow Medium Figure 19: Decision tree to choose appropriate consensus algorithms BFT PoS uses a multi-round PoS mechanism in which a validator (minter) is selected, from a set of validators, by the agreement of super-majority quorum among other val- idators. On the other hand, DPoS selects a minter, from a set of minters, using votes from other clients of the network. PoS algorithms are generally fast and scalable, having high throughput. However, they also need to consider several other attack vectors such as Nothing-at-stake, bribing, long- range attack, cartel formation, and so on. Detailed analysis of different aspects of PoS algorithms has been presented in Section 5.2. There are also some Hybrid consensus algorithms that combine the mechanisms of PoW and/pr PoS with another novel algorithm. Proof of Research, Proof of Burn, Proof of Stake-Velocity are examples of such an algorithm. Again, there are mechanisms that are novel and have no reliance on PoW/PoS whatsoever. Proof of Cooperation and Proof of Importance are examples of such novel algorithms. The discussion and analysis of these consensus algorithms have been presented in Section 6. Finally, there are also a few non-incentivised consensusalgorithms which are exclusively utilised in private block- chain systems. Hyperledger is the leading private block- chain foundation under which different private blockchain systems such as Hyperledger Fabric, Hyperledger Sawtooth, Hyperledger Burrow, Hyperledger Iroha, Hyperledger Indy, and so on. These systems rely on different other consensus mechanisms such as SBFT, PoET, Tendermint Burrow, YAC, and RBFT. Key characteristics of these consensus algorithms are high throughput and low latency with acceptable scalab- ility. Also, the algorithms require that every entity that participates in the network must be properly authenticated. A detailed analysis of these algorithms has been presented in Section 7. Our analysis in Section 8 suggests that PoW, with its many disadvantages, still is the most dominant in terms of market capitalisation (indicating its adoption) and crypto- currency in the world. As discussed earlier, DPoS and PoS algorithms, PoW’s closest rivals, aim to tackle many of PoW’s limitations. However, their adoption is still limited. In addition to this analysis, we have presented an exemplary 35 decision tree-based figure which can be utilised to filter out or select consensus algorithms that fit certain criteria. Such a figure will be a useful tool for any who would like to test the suitability of a certain consensus algorithm under certain criteria. There is one issue that must be highlighted before we conclude this article. The principal focus of this article has been to explore and synthesise the consensus algorithms available in different blockchain systems. However, there are other distributed ledger systems, which do not rely on any blockchain-type structure. Instead, they utilise other structures to represent their respective ledgers. Examples of two such prominent crypto-currencies are IoTA7and NANO8. Both of their ledgers are based on DAG (Directed Acyclic Graph), a specific type of directed graph with no cycle. However, IoTA uses a novel consensus algorithm called Tangle [229] while NANO utilises a representative based consensus mechanism [228]. These two systems have received significant attention because of their fee-less struc- ture and fast transaction rates. However, we do not consider these systems any further as they are out of scope for this article. We plan to investigate such novel systems in the future in a different exploration. There is high anticipation among the blockchain enthu- siasts that blockchain technology will disrupt many existing application domains. However, to unlock its true potential, a blockchain system must adopt a suitable consensus that can enable it to satisfy its intended properties. This is because a consensus algorithm is the core component of any block- chain system, and it dictates how a system behaves and the performance it can achieve. However, as our analysis in this article suggests, an ideal consensus algorithm is still elusive as almost all algorithms have significant disadvantages in one way or another with respect to their security and performance. Until a consensus algorithm finds the correct balance between these crucial factors, we might not see the wide-scale adoption as many crypto-currency enthusiasts are hoping. REFERENCES [1] Nakamoto, Satoshi “Bitcoin: A peer-to-peer electronic cash system”. 2008. [online] Available: https://bitcoin.org/bitcoin.pdf. [2] Pilkington, Marc “11 Blockchain technology: principles and applic- ations”. Research handbook on digital transformations, 225, 2016. [3] Crosby, Michael and Pattanayak, Pradan and Verma, Sanjeev and Kalyanaraman, Vignesh and others “Blockchain technology: Bey- ond bitcoin”. Applied Innovation, 2(6-10), p. 71, 2016. [4] Cachin, C., and Vukoli, M. “Blockchains Consensus Protocols in the Wild”. arXiv preprint arXiv:1707.01873, 2017. [5] Bano, S., Sonnino, A., Al-Bassam, M., Azouvi, S., McCorry, P ., Meiklejohn, S., and Danezis, G. “Consensus in the Age of Block- chains.”. arXiv preprint arXiv:1711.03936, 2017. [6] Wang, W., Hoang, D.T., Hu, P ., Xiong, Z., Niyato, D., Wang, P ., Wen, Y. and Kim, D.I. “A survey on consensus mechanisms and mining strategy management in blockchain networks”. IEEE Access, 7, pp.22328-22370, 2019. [7] Baliga, A. “Understanding Blockchain Consensus Models”. April, 2017. [Online] Available: https: //www.persistent.com/wp-content/uploads/2017/04/ WP-Understanding-Blockchain-Consensus-Models.pdf. 7. https://www.iota.org/ 8. https://nano.org/en[8] Sankar, Lakshmi Siva and Sindhu, M and Sethumadhavan, M “Survey of consensus protocols on blockchain applications” 4th International Conference on Advanced Computing and Commu- nication Systems (ICACCS). IEEE, 1–5, 2017. [9] Seibold, Sigrid and Samman, George “Consensus: Immutable agreement for the Internet of value”. https://assets.kpmg.com/content/dam/kpmg/pdf/2016/06/ kpmgblockchain-consensus-mechanism.pdf KPMG. 2016. [10] Mukhopadhyay, Ujan and Skjellum, Anthony and Hambolu, Oluwakemi and Oakley, Jon and Yu, Lu and Brooks, Richard. “A brief survey of cryptocurrency systems.” In Proceedings of the 14th annual conference on privacy, security and trust (PST). IEEE, 745– 752, 2016. [11] Schneider, F. B. “Implementing fault-tolerant services using the state machine approach: A tutorial”. ACM Computing Surveys (CSUR), 22(4), 299-319, 1990. [12] C. Cachin, R. Guerraoui, and L. Rodrigues. “Introduction to Reliable and Secure Distributed Programming”. (Second Edition). Springer, 2011. [13] V . Hadzilacos and S. Toueg. “Fault-tolerant broadcasts and related problems.”. In S. J. Mullender, editor, Distributed Systems (2nd Ed.). New York, 1993. [14] Lamport, L., Shostak, R., and Pease, M. “The Byzantine generals problem”. ACM Transactions on Programming Languages and Systems (TOPLAS), 4(3), 382-401, 1982. [15] Lamport, L. “The part-time parliament”. ACM Transactions on Computer Systems, 16(2):133169, May 1998. [16] Lamport, L. “Paxos made simple”. SIGACT News, 32(4):5158, 2001. [17] B. M. Oki and B. Liskov. “Viewstamped replication: A new primary copy method to support highly- available distributed sys- tems”. In Proc. 7th ACM Symposium on Principles of Distributed Computing (PODC), pages 817, 1988. [18] P . Hunt, M. Konar, F. P . Junqueira, and B. Reed. “ZooKeeper: Wait- free coordination for internet- scale systems”. In Proc. USENIX Annual Technical Conference, 2010. [19] D. Ongaro and J. K. Ousterhout. “In search of an understandable consensus algorithm”. In Proc. USENIX Annual Technical Confer- ence, pages 305319, 2014. [20] M. Castro and B. Liskov. “Practical Byzantine fault tolerance and proactive recovery”. ACM Transactions on Computer Systems, 20(4):398461, Nov. 2002. [21] Bessani, A., Sousa, J., and Alchieri, E. E. “State machine replication for the masses with BFT-SMaRt”. In 44th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), pp. 355-362, June 2014. [22] C. Dwork, N. Lynch, and L. Stockmeyer “Consensus in the presence of partial synchrony”. Journal of the ACM (JACM), 35(2):288323, 1988. [23] M. J. Fischer, N. A. Lynch, and M. S. Paterson. “Impossibility of distributed consensus with one faulty process”. Journal of the ACM (JACM), 32(2):374382, 1985. [24] Brewer, E. A. “Towards robust distributed systems.”. In PODC (Vol. 7), July 2000. [25] M. J. M. Chowdhury and M. S. Ferdous and K. Biswas and N. Chowdhury and A. S. M. Kayes and M. Alazab and P . Watters “A Comparative Analysis of Distributed Ledger Technology Plat- forms”. IEEE Access, 7:167930-167943, 2019. [26] Iot, Joi “The Fintech Bubble”. 2018 [Online] Available: https: //joi.ito.com/weblog/2016/06/14/-the-fintech-bu.html. June 14, 2016. Accessed on May 12, 2019 [27] Xiao, David “The Four Layers of the Blockchain”. 2018 [Online] Available: https://medium.com/@coriacetic/ the-four-layers-of-the-blockchain-dc1376efa10f. June 22, 2016. Ac- cessed on April 12, 2019 [28] Namecoin. 2018 [Online] Available: https://namecoin.org/. Accessed on May 20, 2019. [29] Proof of Existence. 2018 [Online] Available: https:// proofofexistence.com. Accessed on May 20, 2019. [30] Fromknecht, C., Velicanu, D., and Yakoubov, S. CertCoin: A NameCoin Based Decentralized Authentication System. May 14, 2014. 6.857 Unpublished class project. 2018 [On- line] Available: http://courses.csail.mit.edu/6.857/2014/files/ 19-fromknecht-velicann-yakoubov-certcoin.pdf. Accessed on May 20, 2019. [31] Ferdous, Md Sadek and Biswas, Kamanashis and Chowdhury, Mohammad Jabed Morshed and Chowdhury, Niaz and Muthukku- 36 marasamy, Vallipuram ”Integrated platforms for blockchain enable- ment”. Advances in Computers, Elsevier, 2019. [32] Seigen, Max Jameson, Tuomo Nieminen, Neocortex and Antonio M. Juarez “CryptoNight Hash Function”. March, 2013. [Online] Available: https://cryptonote.org/cns/cns008.txt. [33] Dwork, Cynthia and Naor, Moni “Pricing via processing or com- batting junk mail”. Annual International Cryptology Conference, 139–147, 1992. [34] Douceur, J. R. “The sybil attack”. In International workshop on peer-to-peer systems (pp. 251-260), 2002. [35] Bentov, Iddo and Lee, Charles and Mizrahi, Alex and Rosenfeld, Meni “Proof of Activity: Extending Bitcoin’s Proof of Work via Proof of Stake [Extended Abstract]”. SIGMETRICS Perform. Eval. Rev., Volume 43, issue 3. [36] Andrew Miller, Yu Xia, Kyle Croman, Elaine Shi, and Dawn Song. “The Honey Badger of BFT Protocols.” In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (CCS ’16). ACM, New York, NY, USA, 31-42. DOI: ht- tps://doi.org/10.1145/2976749.2978399 [37] Athanasios N. Nikolakopoulos and John D. Garofalakis. “NCDawareRank: a novel ranking method that exploits the decom- posable structure of the web.” In Proceedings of the sixth ACM international conference on Web search and data mining (WSDM ’13). ACM, New York, NY, USA, 143-152. [38] Stefan Dziembowski, Sebastian Faust, Vladimir Kolmogorov and Krzysztof Pietrzak “Proofs of Space”. Cryptology ePrint Archive, Report 2013/796. [Online] Available: https://eprint.iacr.org/2013/ 796 [39] Ren, Ling and Devadas, Srinivas “Proof of Space from Stacked Ex- panders” Proceedings, Part I, of the 14th International Conference on Theory of Cryptography - Volume 9985, 2016 [40] Sunoo Park, Krzysztof Pietrzak, Albert Kwon, Jo ¨e l Alwen and Georg Fuchsbauer and Peter Ga ˇzi “SpaceMint: A Cryptocurrency Based on Proofs of Space” Cryptology ePrint Archive, Report 2015/528 [Online] Available: https://eprint.iacr.org/2015/528 [41] Hamza Abusalah and Jo ¨el Alwen and Bram Cohen and Danylo Khilko and Krzysztof Pietrzak and Leonid Reyzin “Beyond Hell- man’s Time-Memory Trade-Offs with Applications to Proofs of Space” Cryptology ePrint Archive, Report 2017/893 [Online] Available: https://eprint.iacr.org/2017/893 [42] Weichbrodt, Nico and Kurmus, Anil and Pietzuch, Peter and Kapitza, R ¨udiger “Computer Security ESORICS 2016” Pages 440– 457 Springer International Publishing [43] Brasser F, M ¨uller U, Dmitrienko A, Kostiainen K, Capkun S, Sadeghi A-R “Software Grand Exposure: SGX Cache Attacks Are Practical” In proceedings of the 11th USENIX Workshop on Offensive Technologies (WOOT 17) USENIX Association [44] Keir Finlow-Bates “A Lightweight Blockchain Consensus Pro- tocol”. August, 2017. [Online] Available: http://www.chainfrog. com/wp-content/uploads/2017/08/consensus.pdf. [45] Back, Adam Hashcash-a denial of service counter-measure. 2002. [46] Bertoni, Guido and Daemen, Joan and Peeters, Micha ¨el and Van Assche, Gilles “Keccak” In Annual International Conference on the Theory and Applications of Cryptographic Techniques pp. 313–314, 2013. [47] Percival, C. and Josefsson, S. “The scrypt Password-Based Key Derivation Function”. [Online] Available: https://tools.ietf.org/ html/rfc7914 August, 2016. [48] “Wikipedia entry on Custon Hardware Attack”. [Online] Avail- able: https://en.wikipedia.org/wiki/Custom hardware attack Accessed on 21 May, 2019. [49] Bernstein, Daniel J “The Salsa20 family of stream ciphers” New stream cipher designs pp. 84–97, Springer, 2008. [50] “SThe Scrypt Mining Algorithm: Everything You Need to Know”. [Online] Available: https://www.easypc.io/crypto-mining/ scrypt-hardware/ Accessed on 21 May, 2019. [51] Buntinx, JP “Scrypt vs X11 vs SHA-256”. [Online] Avail- able: https://themerkle.com/scrypt-vs-x11-vs-sha-256/ March 23, 2017. [52] Bernstein, Daniel J ChaCha, a variant of Salsa20 “New stream cipher designs” Vol. 8, pp. 3–5, 2008. [53] “Announcement of Aiden - Scrypt-OG crypto-currency”. [On- line] Available: https://bitcointalk.org/index.php?topic=558414.0 Accessed on July 24, 2019. [54] “Cryptocurrency Mining Hash Algorithms”. http://www. bitcoinlion.com/cryptocurrency-mining-hash-algorithms/ [On- line] Available: July 24, 2019. Accessed on July 24, 2019.[55] Biryukov, Alex and Khovratovich, Dmitry “Equihash: Asym- metric proof-of-work based on the generalized birthday problem”. Ledger(2). 2017. [56] Wagner, David “A generalized birthday problem”. Cryptor(2442). pages 288–303. 2002. [57] “Crypto-currencies utilising Equihash”. [Online] Available: https: //www.coingecko.com/en?hashing algorithm=Equihash Ac- cessed on July 24, 2019. [58] “Ethash”. [Online] Available: https://github.com/ethereum/ wiki/wiki/Ethash Accessed on July 24, 2019. [59] “Dagger-Hashimoto”. [Online] Available: https://github.com/ ethereum/wiki/blob/master/Dagger-Hashimoto.md Accessed on July 24, 2019. [60] Buterin, Vitalik “Dagger: A Memory-Hard to Compute, Memory- Easy to Verify Scrypt Alternative”. http://www.hashcash.org/ papers/dagger.html Accessed on July 24, 2019. [61] Lerner, Sergio “Ethereum Dagger PoW function is flawed”. [Online] Available: https://bitslog.wordpress.com/2014/01/17/ ethereum-dagger-pow-is-flawed/ 17 January, 2017. Accessed on July 24, 2019. [62] “Crypto-currencies utilising Ethash”. [Online] Available: https:// www.coingecko.com/en?hashing algorithm=Ethash Accessed on July 24, 2019. [63] “Crypto-currencies utilising Dagger”. [Online] Available: https: //www.coingecko.com/en?hashing algorithm=Dagger Accessed on July 24, 2019. [64] Gligoroski, Danilo and Klima, Vlastimil and Knapskog, Svein Johan and El-Hadedy, Mohamed and Amundsen, Jørn “Cryp- tographic hash function blue midnight wish” In Proceedings of the 1st International Workshop on Security and Communication Networks pp. 1–8, 2009 [65] Gauravaram, Praveen and Knudsen, Lars R and Matusiewicz, Krystian and Mendel, Florian and Rechberger, Christian and Schl ¨affer, Martin and Thomsen, Søren S “Grøstl-a SHA-3 candid- ate” Dagstuhl Seminar Proceedings 2009 [66] Wu, Hongjun “The hash function JH” Submission to NIST (round 3) Vol. 6, 2011 [67] “Quark Coin”. [Online] Available: http://www.quarkcoins.com/ Accessed on July 24, 2019. [68] “First Impressions from the Baikal Mini Miner ASIC”. [Online] Available: https://cryptomining-blog.com/tag/ quark-asic-miner/ July 24, 2019 Accessed on July 24, 2019. [69] “Bitcoin”. [Online] Available: http://www.bitcoin.org/ Accessed on April 24, 2019. [70] “Bitcoin Cash”. [Online] Available: https://www.bitcoincash. org/ Accessed on July 24, 2019. [71] “Syscoin”. [Online] Available: http://syscoin.org/ Accessed on July 24, 2019. [72] “Peer Coin”. [Online] Available: https://peercoin.net Accessed on July 24, 2019. [73] “Counterparty”. [Online] Available: https://counterparty.io Accessed on July 24, 2019. [74] Aumasson, Jean-Philippe and Neves, Samuel and Wilcox-OHearn, Zooko and Winnerlein, Christian “BLAKE2: simpler, smaller, fast as MD5” International Conference on Applied Cryptography and Network Security. pp. 119–135, 2013. [75] “Emercoin. [Online] Available: https://emercoin.com/ Accessed on July 24, 2019. [76] “Namecoin”. [Online] Available: https://namecoin.org/ Accessed on July 24, 2019. [77] “Steem Dollars”. [Online] Available: https://steem.io/ Accessed on July 24, 2019. [78] “Crown”. [Online] Available: https://crown.tech/ Accessed on July 24, 2019. [79] “Ommi (Mastercoin)”. [Online] Available: http://www. omnilayer.org/ Accessed on July 24, 2019. [80] “Litecoin”. [Online] Available: http://www.omnilayer.org/ Accessed on July 24, 2019. [81] “Bitconnect”. [Online] Available: https://bitconnect.co/ Ac- cessed on May 24, 2019. [82] “Verge”. [Online] Available: https://vergecurrency.com Accessed on July 20, 2019. [83] “Bitmark”. [Online] Available: https://bitmark.com/ Accessed on July 20, 2019. [84] “Dogecoin”. [Online] Available: http://dogecoin.com/ Accessed on July 20, 2019. 37 [85] “Gamecredit)”. [Online] Available: https://gamecredits.com/ Accessed on July 20, 2019. [86] “Einsteinnium”. [Online] Available: https://www.emc2. foundation/ Accessed on July 20, 2019. [87] “Voxels”. [Online] Available: http://thevoxel.com/ Accessed on July 20, 2019. [88] “Viacoin”. [Online] Available: https://viacoin.org/ Accessed on July 10, 2019. [89] “Hempcoin”. [Online] Available: http://hempcoin.org/ Ac- cessed on July 10, 2019. [90] “Zcash”. [Online] Available: https://z.cash/ Accessed on July 10, 2019. [91] “Bitcoin Gold”. [Online] Available: https://bitcoingold.org/ Accessed on July 10, 2019. [92] “Komodo”. [Online] Available: https://komodoplatform.com/ en Accessed on July 10, 2019. [93] “Zclassic”. [Online] Available: http://zclassic.org/ Accessed on July 10, 2019. [94] “ZenCash”. [Online] Available: https://zensystem.io/ Accessed on July 10, 2019. [95] “Hush”. [Online] Available: https://myhush.org/ Accessed on July 10, 2019. [96] “bitcoinz”. [Online] Available: https://btcz.rocks/en/ Accessed on July 10, 2019. [97] “Vote Coin”. [Online] Available: https://votecoin.site/ Accessed on July 10, 2019. [98] “Ethereum”. [Online] Available: https://www.ethereum.org/ Accessed on July 10, 2019. [99] “Ethereum Classic”. [Online] Available: https://ethereumclassic. github.io/ Accessed on July 10, 2019. [100] “Ubiq”. [Online] Available: https://ubiqsmart.com/ Accessed on July 10, 2019. [101] “Shif”. [Online] Available: http://www.shiftnrg.org/ Accessed on July 10, 2019. [102] “Expanse”. https://www.expanse.tech/ Accessed on July 10, 2019. [103] “DubaiCoin”. [Online] Available: http://www.arabianchain. org/ Accessed on July 10, 2019. [104] “SOILcoin”. [Online] Available: https://github.com/Soilcoin Accessed on July 10, 2019. [105] “Krypton”. [Online] Available: http://krypton.rocks/ Accessed on July 10, 2019. [106] “Red Pulse”. [Online] Available: https://www.red-pulse.com/ landing Accessed on July 10, 2019. [107] “Feathercoin”. [Online] Available: https://www.feathercoin. com/ Accessed on July 10, 2019. [108] “GoByte”. [Online] Available: https://gobyte.network/ Accessed on July 10, 2019. [109] “UFO Coin”. [Online] Available: https://ufocoin.net/ Accessed on July 10, 2019. [110] “Innova”. [Online] Available: https://innovacoin.info/ Accessed on July 10, 2019. [111] “rowdCoin”. [Online] Available: http://crowdcoin.site/ Accessed on July 10, 2019. [112] “Vivo”. [Online] Available: https://www.vivocrypto.com/ Accessed on July 10, 2019. [113] “Desire”. [Online] Available: https://www.desire-crypto.com/ Accessed on July 10, 2019. [114] “Orbitcoin”. [Online] Available: https://www.orbitcoin.org/ Accessed on July 10, 2019. [115] “Phoenixcoin”. [Online] Available: http://phoenixcoin.org/ Accessed on July 10, 2019. [116] “Bitcore”. [Online] Available: https://bitcore.cc/ Accessed on July 10, 2019. [117] “Dash”. [Online] Available: https://www.dash.org/ Accessed on July 10, 2019. [118] “Stratis. [Online] Available: https://stratisplatform.com/ Accessed on July 10, 2019. [119] “Cloakcoin”. [Online] Available: https://www.cloakcoin.com/ Accessed on July 10, 2019. [120] “Stealthcoin”. [Online] Available: https://www.stealthcoin. com/ Accessed on July 10, 2019. [121] “DeepOnion”. [Online] Available: https://deeponion.org/ Accessed on July 10, 2019. [122] “HTMLcoin”. [Online] Available: https://htmlcoin.com/ Accessed on July 10, 2019.[123] “Regal Coin”. [Online] Available: https://regalcoin.co/ Accessed on July 10, 2019. [124] “Memetic”. [Online] Available: https://memetic.ai/ Accessed on July 10, 2019. [125] “Exclusive Coin”. [Online] Available: https://exclusivecoin. pw/ Accessed on July 10, 2019. [126] “Creditbit”. [Online] Available: https://www.creditbit.org/ Accessed on July 10, 2019. [127] “Quark”. [Online] Available: http://www.qrknet.info/ Ac- cessed on July 10, 2019. [128] “PIVX”. [Online] Available: https://pivx.org/ Accessed on July 10, 2019. [129] “MonetaryUnit”. [Online] Available: https://www. monetaryunit.org/ Accessed on July 10, 2019. [130] “ALQO”. [Online] Available: https://alqo.org/ Accessed on July 10, 2019. [131] “Bitcloud”. [Online] Available: https://bit-cloud.info/ Ac- cessed on July 10, 2019. [132] “Zurcoin”. [Online] Available: http://zurcoin.org/ Accessed on July 10, 2019. [133] “AmsterdamCoin”. [Online] Available: https://amsterdamcoin. com/ Accessed on July 10, 2019. [134] “Animecoin”. [Online] Available: https://github.com/ testzcrypto/Animecoin/releases/tag/0.8.3.2 Accessed on July 10, 2019. [135] “Vertcoin”. [Online] Available: https://vertcoin.org/ Accessed on July 10, 2019. [136] “Monacoin”. [Online] Available: https://monacoin.org/ Accessed on July 10, 2019. [137] “Crypto”. [Online] Available: http://tailflick.wixsite.com/ official-crypto Accessed on July 10, 2019. [138] “Quark Coin Wiki”. [Online] Available: http://coinwiki.info/ en/Quark Accessed on July 10, 2019. [139] “Crypto-currencies utilising Quark”. [Online] Available: https: //www.coingecko.com/en?hashing algorithm=Quark Accessed on July 10, 2019. [140] “Lyra2RE-A new PoW algorithm for an ASIC-free future”. [Online] Available: https://vertcoin.org/wp-content/uploads/ 2017/10/Vertcoin Lyra2RE Paper 11292014.pdf Accessed on July 10, 2019. [141] “Wikipedia entry on Vertcoin”. [Online] Available: https://en. wikipedia.org/wiki/Vertcoin Accessed on July 10, 2019. [142] “Crypto-currencies utilising Lyra2RE”. [Online] Available: https: //www.coingecko.com/en?hashing algorithm=Lyra2RE Accessed on July 10, 2019. [143] “Wiki entry on M7”. [Online] Available: http://cryptonite.info/ wiki/index.php?title=M7 PoW Accessed on July 10, 2019. [144] “CudaMiner - a multi-threaded GPU miner for Cryptonite”. [Online] Available: https://github.com/MiniblockchainProject/ CudaMiner Accessed on July 10, 2019. [145] “Bitcore announcement on Bitcointalk”. [Online] Available: https://bitcointalk.org/index.php?topic=1883902.0 Accessed on July 10, 2019. [146] Doering, John “NeoScrypt, a Strong Memory Intensive Key De- rivation Function”. http://phoenixcoin.org/archive/neoscrypt v1.pdf [Online] Available: July 26, 2014. Accessed on July 10, 2019. [147] “Crypto-currencies utilising NeoScrypt”. [Online] Avail- able: https://www.coingecko.com/en?hashing algorithm= NeoScrypt Accessed on July 10, 2019. [148] “Bitcoin energy consumption”. [Online] Available: https: //digiconomist.net/bitcoin-energy-consumption Accessed on July 10, 2019. [149] “Ethereum energy consumption”. [Online] Available: https:// digiconomist.net/ethereum-energy-consumption Accessed on July 10, 2019. [150] “Wikipedia entry on Economies of scale”. [Online] Available: https://en.wikipedia.org/wiki/Economies ofscale Accessed on July 10, 2019. [151] “Wikipedia entry on Tragedy of the commons”. [Online] Avail- able: https://en.wikipedia.org/wiki/Tragedy ofthe commons Accessed on July 10, 2019. [152] “Bitcoin hashrate distribution”. [Online] Available: https:// blockchain.info/pools Accessed on July 10, 2019. [153] Eyal, I. and Sirer, E.G. “Majority is not enough: Bitcoin mining is vulnerable”. International Conference on Financial Cryptography and Data Security pages 436–454. March, 2014. 38 [154] QuantumMechanic “Proof of stake instead of proof of work”. [Online] Available: https://bitcointalk.org/index.php?topic= 27787.0 July 11, 2011. Accessed on May 11, 2019. [155] “Proof of Stake FAQ”. [Online] Available: https://github.com/ ethereum/wiki/wiki/Proof-of-Stake-FAQ Accessed on August 5, 2019. [156] Choi, Jon “Ethereum Casper 101”. [Online] Available: https: //medium.com/@jonchoi/ethereum-casper-101-7a851a4f1eb0 Oc- tober 22, 2017. Accessed on July 10, 2019. [157] “Proof of Stake versus Proof of Work”. [Online] Available: http://bitfury.com/content/5-white-papers-research/ pos-vs-pow-1.0.2.pdf September 13, 2015. Accessed on August 5, 2019. [158] “Consensus Compare: Casper vs. Tendermint”. [Online] Available: https://blog.cosmos.network/ consensus-compare-casper-vs-tendermint-6df154ad56ae November 16, 2017. Accessed on July 10, 2019. [159] Zamfir, Vlad “The History of Casper - Chapter 4”. [Online] Available: https://medium.com/@Vlad Zamfir/ the-history-of-casper-chapter-4-3855638b5f0e December 12, 2016. Accessed on July 10, 2019. [160] “Gridcoin”. [Online] Available: https://github.com/ gridcoin-community/Gridcoin-Wiki/wiki Accessed on June 22, 2019. [161] “Gridcoin Whitepaper. [Online] Available: https://gridcoin. us/assets/img/whitepaper.pdf Accessed on 24 June, 2019. [162] “Wikipedia entry on Berkeley Open Infrastructure for Network Computing (BOINC)”. [Online] Available: https://en.wikipedia.org/wiki/Berkeley Open Infrastructure forNetwork Computing Accessed on 21 June, 2019. [163] “Proof of Burn”. [Online] Available: https://en.bitcoin.it/wiki/ Proof ofburn Accessed on 21 June, 2019. [164] “Slimcoin”. [Online] Available: http://slimco.in/ Accessed on 24 June, 2019. [165] “Slimcoin Whitepaper”. [Online] Available: https://www.doc.ic.ac.uk/ ids/realdotdot/crypto papers etc worth reading/proof ofburn/slimcoin whitepaper.pdf Accessed on 24 June, 2019. [166] “Reddcoin”. [Online] Available: https://www.reddcoin.com/ Accessed on 24 June, 2019. [167] “Reddcoin Whitepaper. [Online] Available: https://www. reddcoin.com/papers/PoSV .pdf Accessed on 24 June, 2019. [168] “Reddcoin Wiki”. [Online] Available: https://wiki.reddcoin. com/Proof ofStake Velocity (PoSV) Accessed on 24 June, 2019. [169] “The Velocity of Money for Beginners”. [On- line] Available: https://www.joshuakennon.com/ the-velocity-of-money-for-beginners/ Accessed on 25 June, 2019. [170] “Faircoin Crypto-currency”. [Online] Available: https: //fair-coin.org Accessed on 24 June, 2019. [171] “Faircoin Whitepaper, Version 1.2”. [Online] Available: https:// fair-coin.org/sites/default/files/FairCoin2 whitepaper V1.2.pdf July, 2018. Accessed on 24 June, 2019. [172] “NEM Technical Reference, Version 1.2.1”. [Online] Avail- able: https://nem.io/wp-content/themes/nem/files/NEM techRef.pdf February 23, 2018. Accessed on 24 June, 2019. [173] “Faircoin FAQ”. [Online] Available: https://fair-coin.org/en/ faircoin-faqs Accessed on 24 June, 2019. [174] King, Sunny and Nadal, Scott “PPCoin: Peer-to-Peer Crypto- Currency with Proof-of-Stake”. [Online] Available: https: //peercoin.net/assets/paper/peercoin-paper.pdf August 19, 2012. Accessed on May 5, 2019. [175] “Peercoin discussion forum, discussion#3043”. [Online] Available: https://talk.peercoin.net/t/ ppc-switching-between-pos-and-pow/3043 November 4, 2014. Accessed on May 5, 2019. [176] Bentov, Iddo and Gabizon, Ariel and Mizrahi, Alex “Crypto- currencies without proof of work”. International Conference on Financial Cryptography and Data Security pages 142–157. 2016 [177] “Decred Platform”. [Online] Available: https://decred.org/ Accessed on June 23, 2019. [178] “Tendermint introduction”. [Online] Available: http://tendermint.readthedocs.io/projects/tools/en/master/ introduction.html Accessed on July 30, 2019. [179] Kwon, Jae “Tendermint: Consensus without Mining”. [Online] Available: https://tendermint.com/static/docs/tendermint.pdf 2014. Accessed on July 30, 2019.[180] “Tendermint wiki”. [Online] Available: https://github.com/ tendermint/tendermint/wiki/Byzantine-Consensus-Algorithm Accessed on July 30, 2019. [181] Buterin, Vitalik and Griffith, Virgil “Casper the Friendly Finality Gadget”. [Online] Available: https://github.com/ethereum/ research/blob/master/papers/casper-basics/casper basics.pdf Accessed on August 1, 2019. [182] Zamfir, Vlad “Casper the Friendly Ghost-A Correct-by- Construction Blockchain Consensus Protocol”. [Online] Avail- able: https://github.com/ethereum/research/blob/master/ papers/CasperTFG/CasperTFG.pdf Accessed on August 1, 2019. [183] Sompolinsky, Y. and Zohar, A. “Secure high-rate transaction processing in bitcoin”. International Conference on Financial Cryp- tography and Data Security pp. 507-527. January, 2015. [184] JP Buntinx “What is Delegated Proof-of-Stake?”. [Online] Avail- able: https://themerkle.com/what-is-delegated-proof-of-stake/ April 20, 2017. Accessed on August 1, 2019. [185] Kiayias, A., Russell, A., David, B., and Oliynykov, R. “Ouroboros: A provably secure proof-of-stake blockchain protocol”. Annual International Cryptology Conference pp. 357-388. August, 2017. [186] “OUROBOROS PROOF OF STAKE ALGORITHM”. [Online] Available: https://cardanodocs.com/cardano/proof-of-stake/ Accessed on August 2, 2019. [187] “Cardano Platform”. [Online] Available: https://www. cardanohub.org/en/home/ Accessed on August 2, 2019. [188] “EOS Platform”. [Online] Available: https://eos.io/ Accessed on 24 May, 2019. [189] “EOS Whitepaper”. [Online] Available: https://github.com/ EOSIO/Documentation/blob/master/TechnicalWhitePaper.md Accessed on 24 May, 2019. [190] Kim, Jonathan “EOS Raises Record-Breaking $4 Billion from Crowdsale”. [Online] Available: https://cryptoslate.com/ eos-raises-record-breaking-4-billion-from-crowdsale/ 29 May, 2018. Accessed on 24 May, 2019. [191] “What is EOS? Most Comprehensive Guide Part 2”. [Online] Available: https://blockgeeks.com/guides/what-is-eos-part-2/ Accessed on 24 May, 2019. [192] Rosic, Ameer “What is EOS Blockchain: Beginners Guide”. [On- line] Available: https://blockgeeks.com/guides/eos-blockchain/ Accessed on 24 May, 2019. [193] “Tron Platform”. [Online] Available: https://tron.network/ Accessed on 24 May, 2019. [194] “Tron Whitepaper”. [Online] Available: https://tron.network/ static/doc/white paper v20.pdf Accessed on 24 May, 2019. [195] “TRONs Consensus, “How it works””. [On- line] Available: https://medium.com/@TRONNews/ trons-consensus-how-it-works-6fd231b63715 11 November, 2018. Accessed on 24 May, 2019. [196] “Tezos Platform”. [Online] Available: https://tezos.com/ Accessed on 24 May, 2019. [197] Goodman, L.M. “Tezos Whitepaper”. [On- line] Available: https://tezos.com/static/white paper-2dc8c02267a8fb86bd67a108199441bf.pdf 2 September, 2014. Accessed on 24 May, 2019. [198] Arluck, Jacob “Liquid Proof-of-Stake”. [Online] Available: https://medium.com/@TRONNews/ trons-consensus-how-it-works-6fd231b63715 31 July, 2018. Accessed on 24 May, 2019. [199] Arluck, Jacob “Overview of Tezos Economics Model”. [Online] Available: https://www.infinitystones.io/tezos/ Accessed on 24 May, 2019. [200] “Lisk Platform”. [Online] Available: https://lisk.io/ Accessed on 1 June, 2019. [201] “Lisk Whitepaper”. [Online] Available: https://github.com/ slasheks/lisk-whitepaper/blob/development/LiskWhitepaper.md Accessed on 1 June, 2019. [202] “Ark Platform”. [Online] Available: https://ark.io/ Accessed on 1 June, 2019. [203] “Ark Whitepaper”. [Online] Available: https://ark.io/ Whitepaper.pdf Accessed on 1 June, 2019. [204] Ateniese, Giuseppe and Bonacina, Ilario and Faonio, Antonio and Galesi, Nicola “Proofs of Space: When Space Is of the Essence”. In proceedings of 9th International Conference on Security and Cryptography for Networks: , SCN 2014, Amalfi, Italy, September 3-5, 2014. 39 [205] “Peercoin discussion forum, discussion#2524”. [Online] Avail- able: https://talk.peercoin.net/t/the-complete-guide-to-minting/ 2524 June 15, 2014. Accessed on May 5, 2019. [206] “Hyperledger”. [Online] Available: https://www.hyperledger. org/ Accessed on July 10, 2019. [207] “Hyperledger Fabric”. [Online] Available: https://www. hyperledger.org/projects/fabric Accessed on July 10, 2019. [208] “Hyperledger Sawtooth”. [Online] Available: https://www. hyperledger.org/projects/sawtooth Accessed on July 10, 2019. [209] “Hyperledger Burrow”. [Online] Available: https://www. hyperledger.org/projects/hyperledger-burrow Accessed on July 10, 2019. [210] “Hyperledger Iroha”. [Online] Available: https://www. hyperledger.org/projects/iroha Accessed on July 10, 2019. [211] “Hyperledger Indy”. [Online] Available: https://www. hyperledger.org/projects/hyperledger-indy Accessed on July 10, 2019. [212] “Apache Kafka”. [Online] Available: https://kafka.apache.org Accessed on July 10, 2019. [213] “Apache Zookeeper”. [Online] Available: https://zookeeper. apache.org/ Accessed on July 10, 2019. [214] “Monax Industries Limited”. [Online] Available: https: //monax.io/ Accessed on July 10, 2019. [215] “Iroha Codebase”. [Online] Available: https://github.com/ hyperledger/iroha Accessed on July 10, 2019. [216] Palanivel, C. “Hyperledger Iroha - Architecture, Functional/Logical Flow & Consensus(YAC) Mechanism”. [Online] Available: https://www.linkedin.com/pulse/ hyperledger-iroha-architecture-functionallogical-chandrasekaran/ April 30, 2018. Accessed on July 10, 2019. [217] “Hyperledger Architecture, Volume 1”. [Online] Avail- able: https://www.hyperledger.org/wp-content/uploads/2017/ 08/Hyperledger Arch WG Paper 1Consensus.pdf August, 2017. Accessed on July 10, 2019. [218] “gRPC”. [Online] Available: https://grpc.io/ Accessed on July 10, 2019. [219] “Iroha Documentation”. [Online] Available: https://iroha. readthedocs.io/en/latest/index.html Accessed on July 10, 2019. [220] Chen, L., Xu, L., Shah, N., Gao, Z., Lu, Y., & Shi, W. “On Se- curity Analysis of Proof-of-Elapsed-Time (PoET)”. In International Symposium on Stabilization, Safety, and Security of Distributed Systems, pp. 282-297, November, 2017. [221] “Burrow Codebase on Github”. [Online] Available: https: //github.com/hyperledger/burrow Accessed on July 10, 2019. [222] Ferdous, M.S., Chowdhury, F. and Alassafi, M. “In Search of Self-Sovereign Identity Leveraging Blockchain Technology”. IEEE Access, 7, pp.103059-103079, 2019. [223] “Sovrin Foundation”. [Online] Available: https://sovrin.org/ Accessed on March 27, 2018. [224] Aublin, P . L., Mokhtar, S. B., and Quma, V . “Rbft: Redundant byzantine fault tolerance”. In IEEE 33rd International Conference on Distributed Computing Systems (ICDCS), 2013, pp. 297-306, July 2013. [225] “Iroha Consensus Discussion”. [Online] Available: https://github.com/hyperledger/indy-plenum/blob/master/ docs/main.md Accessed on July 10, 2019. [226] Dogan, T. “Who Scales It Best? Blockchains’ TPS Ana- lysis”. [Online] Available: https://hackernoon.com/ who-scales-it-best-blockchains-tps-analysis-pv39g25mg Accessed on July 27, 2019. [227] O’Neal, S. “Who Scales It Best? Inside Block- chains Ongoing Transactions-Per-Second Race”. [On- line] Available: https://cointelegraph.com/news/ who-scales-it-best-inside-blockchains-ongoing-transactions-per-second-race. January 22, 2019. Accessed on July 27, 2019. [228] LeMahieu, C. “Nano: A Feeless Distributed Cryptocurrency Network”. [Online] Available: https://nano.org/en/whitepaper. Accessed on July 27, 2019. [229] Popov, S. “The Tangle”. [Online] Available: https: //assets.ctfassets.net/r1dr6vzfxhev/2t4uxvsIqk0EUau6g2sw0g/ 45eae33637ca92f85dd9f4a3a218e1ec/iota1 43.pdf. April 30, 2018. Accessed on July 27, 2019.
{ "id": "2001.07091" }
2012.14481
A Survey on Vulnerabilities of Ethereum Smart Contracts
Smart contract (SC) is an extension of BlockChain technology. Ethereum BlockChain was the first to incorporate SC and thus started a new era of crypto-currencies and electronic transactions. Solidity helps to program the SCs. Still, soon after Solidity's emergence in 2014, Solidity-based SCs suffered many attacks that deprived the SC account holders of their precious funds. The main reason for these attacks was the presence of vulnerabilities in SC. This paper discusses SC vulnerabilities and classifies them according to the domain knowledge of the faulty operations. This classification is a source of reminding developers and software engineers that for SC's safety, each SC requires proper testing with effective tools to catch those classes' vulnerabilities.
http://arxiv.org/pdf/2012.14481v1
Zulfiqar Ali Khan, Akbar Siami Namin
cs.CR
cs.CR
1 A Survey on Vulnerabilities of Ethereum Smart Contracts Zulfiqar Ali Khan and Akbar Siami Namin Department of Computer Science Texas Tech University zulfi.khan, akbar.namin@ttu.edu Abstract Smart contract (SC) is an extension of BlockChain technology. Ethereum BlockChain was the first to incorporate SC and thus started a new era of crypto-currencies and electronic transactions. Solidity helps to program the SCs. Still, soon after Solidity’s emergence in 2014, Solidity-based SCs suffered many attacks that deprived the SC account holders of their precious funds. The main reason for these attacks was the presence of vulnerabilities in SC. This paper discusses SC vulnerabilities and classifies them according to the domain knowledge of the faulty operations. This classification is a source of reminding developers and software engineers that for SC’s safety, each SC requires proper testing with effective tools to catch those classes’ vulnerabilities. Index Terms Smart Contract, Ethereum, EVM, vulnerabilities, Solidity, tools I. I NTRODUCTION BlockChain is the most significant development to promote crypto-currencies. There are variations of BlockChain. Ethereum BlockChain, also known as Ethereum Virtual Machine (EVM) allows various unknown individuals to join hands and work together under a digital agreement known as a SC. Contracts require rules, but in this case, a programming language called Solidity embeds the rules within the SC itself. SC does not contain any ”main” method, so it’s not self-executable. SC is deterministic. This constraint generates the same output when any node of the Ethereum network executes the SC. Nodes can be users, or nodes can be miners responsible for validating SCs by solving a mathematical puzzle. The mathematical puzzle should generate the same result on all nodes, and this validation process follows the consensus protocol. Once the mining process completes, its owner uploads the SC on the BlockChain. If the contract does not fit according to Ethereum rules, miners discard it. This process might follow the re-submission of SC. Thus the consensus protocol becomes a method for developing trust among the parties. The trust is that there exists no error or fraud. But once the owner uploads the SC, it becomes immutable. Thus an unsafe SC can shatter the trust. Hackers can misuse it, causing considerable losses to the SC account holders. Therefore it is necessary to identify the vulnerabilities of SC before one uploads the SC on the BlockChain. This survey research paper focuses on 20 vulnerability patterns. We have also provided the Solidity code corresponding to each vulnerability. We have used the context of SC’s faulty operation for the classification of vulnerabilities. For brevity reasons, we have skipped the mitigation techniques. II. M OTIVATION Previous research work has created several taxonomies related to vulnerabilities of SCs. The typical approach is to categorize the vulnerabilities based upon EVM, BlockChain, and Solidity associated issues as discussed in [1]. The above three are broader classes and give less information to the readers about the code’s internal drawback. Similarly, the survey in [2] classifies the SC vulnerabilities in the context of EVM and Solidity. Other significant survey grouped the vulnerabilities based upon layering [3] like application layer, data layer, and consensus layer. Furthermore, the work in [4] used NIST Bugs Framework for the classification. However, SC introduced new kinds of vulnerabilities [3] not common in traditional programming paradigms. We are the first to classify SC’s security issues according to the vulnerable operation’s domain knowledge. A good understanding of vulnerabilities requires coding examples along with description. Work in [2], [3] also provided coding examples, but we address a different set of vulnerabilities. It is worth mentioning that the most relevant survey on the SC attacks with vulnerable SC code is available in [5], published in 2017. Since then, the Solidity programming language has undergone major changes. In this survey paper, we replicate vulnerabilities in Solidity code using the “solc” compiler version 5.0. The key contributions of this survey paper are: – A classification of the SC vulnerabilities according to the domain knowledge. – A description of SC vulnerabilities through updated sample code. – A discussion of twenty SC vulnerabilities along with twenty-four SC vulnerability detection tools. – A discussion on the regeneration of deprecated Var vulnerability (section IV-D2).arXiv:2012.14481v1 [cs.CR] 28 Dec 2020 2 Fig. 1. Classification of Ethereum SC vulnerabilities into seven categories. The remainder of this paper is organized as follows: section III presents our classification of SC’s vulnerabilities. Section IV presents the description of SC vulnerabilities with respect to domain knowledge along with some sample code. Section V lists the testing tools developed for SCs. Section VI concludes the paper and highlights the future research directions. III. A C LASSIFICATION OF SC’ SVULNERABILITIES BASED ON DOMAIN KNOWLEDGE SCs are susceptible to coding threats. One research classifies the vulnerabilities into security, functional, operational, and developmental categories [6]. These categories do not necessarily reflect any knowledge specific to SC. Our research classifies the vulnerabilities using the domain knowledge of operations performed by vulnerable SC. For instance, SCs communicate with each other by invoking methods. This inter-SC communication operation can pave the way for several coding irregularities like reentrancy, denial of service, mishandled exception, and so on. In the same way, other SC specific operational knowledge helped us to create vulnerability categories like Contractual, Arithmetic, Gas Related, Transactional, Randomization and Deprecated vulnerabilities. The domain knowledge-based classification provides (i) more knowledge about the cause of vulnerability (as compared to previous taxonomies discussed above) and (ii) we can drill down to the specific instructions (in some cases). For instance, in case of inter-contractual vulnerabilities, we can infer that call is behind this vulnerability. Due to space limits, we have excluded randomization and deprecated vulnerabilities from the discussion. Figure 1 depicts our classifications of SC’s vulnerabilities. As shown in Figure 1, the SC’s vulnerabilities are grouped into 1) inter-contractual, 2) contractual, 3) integer bugs, 4) gas related, 5) transnational, 6) deprecated, and 7) randomization vulnerabilities. IV. D ESCRIPTIONS OF SC V ULNERABILITIES A. Inter-Contractual Vulnerabilities Listing 11shows an example of inter-contractual communication between ModifiedBank andModifiedMalicious SCs using call modified from [7] in the context of a bank and an attacker. call can also generate reentrancy attack. Solidity provides send ,transfer , and call functions for contract-wide Ether transfers along with an external payable fallback function (FF) at the receiving SC. FF is an anonymous function, which retrieves the transferred Ether in the global state variable msg.value . Transferring Ether incurs gas charges. send andtransfer can compensate for 2300 [1] amount of gas which is sufficient only for executing FF not linked to state changes. call can transfer entire gas, which can initiate reentrancy attack, as discussed below: 1pragma solidity ˆ0.5.1; 2contract ModifiedMalicous{ 3 ModifiedBank mb; 4 constructor (address payable addressOfBank, uint amount) public { 1This paper lists the EVM opcodes in capital letters and references the Solidity functions and contents of Listings in this font . 3 Fig. 2. The reentrancy cycle, (Solidity-like) code modified from [7], [12]. 5 mb=ModifiedBank(addressOfBank); 6 mb.withdraw(amount); 7 } 8 function ()external payable { mb.withdraw( msg.value );} 9} 10contract ModifiedBank{ 11 mapping (address =>uint )bal; 12 //more 13 function withdraw( uint _amount) public returns (bytes memory message) { 14 if(bal[ msg.sender ]>= _amount){ 15 (bool success, bytes memory returnsMessage) = msg.sender .call .value (_amount)()); 16 bal[ msg.sender ]-=_amount; 17 /*more */}} 18 function ()external payable {}} Listing 1. Example Solidity Code of Reentrancy, modified from [7]. 1) Reentrancy: Reentrancy is a devastating attempt to deprive the investors of their precious cash. Even though the reentrancy attack (or the DAO attack [8]) did not knock out the newly born SC technology, but created a stir in the Ethereum community. Reentrancy problem soon became an exciting topic of discourse among the BlockChain researchers because of two reasons: its inherent characteristics (discussed below) and the enormity of Ether flown out from SC as a result of it. Reentrancy problem occurs when an attacker reenters the SC repeatedly. This reentrance sparks of multiple issues like fueling out the entire gas of the victim, hijacking of the victim’s SC , execution of two functions at the same time and undue transfer of funds from victim’s SC to the attacker’s account. Developmental issues coupled with the built-in implicit invoking nature of FF provide a stimulus for this attack. There are several variants of this type of attacks like same or cross-function reentrancy ( [9]), “Single-entrancy” ( [10]), and the state-of-the-art reentrancy attacks discussed in [11]. Reentrancy is a repeated operation and the statements execute in a cycle as shown in Figure 2. As discussed above, Listing 1 tries to simulate the banking application. However, the banking contract provides only the withdraw(...) method with a flaw. The attacker ModifiedMalicious exploits this flaw to drain the Ether from the bank into its own account. Listing 1 demonstrates how the ModifiedMalicious contract exploits the flaw in line#16. Firstly, the attacker’s SC ModifiedMalicious calls the ModifiedBank SC’swithdraw method in line#6 to retrieve balance amount from her SC account. As the SC ModifiedBank executes line#15 (using call ) for transferring, the action results in the voluntary invoking of the costly FF of the attacker in line#8. It is costly because the FF in line#8 is not empty and contains the code to invoke the withdraw method of ModifiedBank in line#8. This process repeats until the bank or the attacker reaches out of gas state. However, in the meantime attacker may drain handsome amount from the bank because the debit process never deducts her balance, i.e., line#16 never executes. 2) Denial of Service (Unexpected throw) :Denial of Service occurs due to various reasons. External functions may contain broken linkage due to the use of throw (deprecated). Listing 2 (excerpted from [5]) shows the contracts (i.e., MKotET1 , MKotET1_1 ). Both are related to a game to acquire the throne of KingofEther . The throne’s price is the money required by current king to leave the throne along with some processing fee to the SC’s owner. However both the contracts suffer from Denial of Service vulnerability. MKotET1 (starting from line#1) exhibits Denial of Service threat using transfer in line#7 andMKotET1_1 (starting from line#12) displays Denial of Service threat using call in line#17. MKotET1 andMKotET1_1 usetransfer andcall respectively to deliver Ether to SC MMallory (starting from line#22), which contains a risky FF, 4 in line#23, which reverts in line#24, throwing an exception unconditionally. Both transfer andcall fail to deliver Ether to ‘MMallory’ due to the revert in line#24. 1 contract MKotET1{ 2 address payable emperor; uint public rewardPrice = 500; 3 //declarations for MfindCrownPrice( ) & MNRewardPrice( ) 4 function ( ) external payable { 5 require (msg.value >= rewardPrice); 6 uint MCrownPrice = MfindCrownPrice(); 7 emperor. transfer (MCrownPrice); 8 emperoror = msg.sender ;//Unreachable 9 rewardPrice= NRewardPrice();//Unreachable 10 /*more */}//MKotET1 ends 11 //modified KotET using Call 12 contract MKotET1_1{ 13 // some declarations 14 function ( ) external payable { 15 require (msg.value >= rewardPrice); 16 uint MCrownPrice = MfindCrownPrice( ); 17 (bool success,) = emperor. call .value (MCrownPrice)(""); 18 require (success);//throw if !success 19 emperor= msg.sender ;//Unreachable 20 rewardPrice = NewRewardPrice();//Unreachable 21 /*more */}//MKotET1_1 ends 22 contract MMallory { 23 function ( ) external payable { 24 revert ( ); } }//MMallory ends Listing 2. KingOfEtherThrone threat variants:Transfer, Call [5]. 3) Mishandled Exception: Mishandled Exception [13] is a frequently occurring threat [14] and appears by other names in the surveyed literature such as “ Unchecked send ”, “Unchecked External Call ”, and “ Exception Disorders .” Exceptions are run-time errors. One of the well-known exceptions in the Ethereum network is the out-of-gas exception. However, when a SC invokes an untrusted external function, a programmer must take extra care. For instance, sending Ether, implicitly invokes the FF of another SC. FF may fail and the reason might not be the out-of-gas exception [15]. In Solidity, we can use transfer ,send , and call for sending Ether to another SC. If an exception occurs in the callee, transfer propagates the exception in the caller’s SC, which is safe. APIs like call ,send , and delegatecall return false and the execution continues [16]. Thus, if the programmer skips the checking of the false returned value, execution would continue resulting in an inconsistent state [17]. Surveyed literature argues that the owner deliberately does not throw an exception if the send operation fails. This attitude may result in exceeding the call-depth stack (i.e. CDS, which is a deprecated vulnerability) [5], [18]. MMallory contract in Listing 3 undo the transfer of Ether to itself. The payable directive facilitates the importing of Ether, as discussed in section IV-B under frozen Ether vulnerability. However, anybody sending Ether to MMallory will suffer from exception due to revert in line#2. 1 contract MMallory{ 2 function ()external payable {revert (); }} Listing 3. ’revert’ in line#2, causes mishandled exception [5] to the caller. 4) Gasless send [13]: send is associated with a fixed gas stipend of 2300 [12], which is enough to execute an empty FF. If the FF modifies the state of the SC, then the required gas can increase beyond 2300. This costly FF results in an out-of-gas exception [5]. Costly FF can be due to the developer’s mistake instead of a malicious activity [19]. In other words, if the “gas used” is high, an exception occurs, and the malicious miner may keep the untransferred amount. 1 contract Sender { 2 function pay( uint val, address payable _recv) public { //_recv points to contract Receiver 3 if(_recv. send (val)){ } else { } }} 4 contract Receiver { 5 uint public TotalBal = 0;//state variable 6 function ()external payable { 7 TotalBal = TotalBal + msg.value ; } } Listing 4. Receiver SC’s FF is costly: alters ’TotalBal’, line#7, [20]. But in some cases, the malicious SC owner may keep the non-transferred amount and miner only gets his fee. call mitigates this threat but transfers all gas which causes reentrancy. Listing 4 shows two SCs, Sender line#1 and Receiver line#4 modified from [5]. Sender transfers funds to Receiver using send in line#3 but Receiver retrieves the Ether using a costly FF in line#6. Transfer increments the state variable TotalBal in line#7. But transfer in line#3 becomes a threat as send uses 2300 amount of gas, which is not enough to execute a costly FF. 5 5)call Transfers All Gas: At the bytecode level, Solidity’s send andtransfer translate into CALL (EVM bytecode). CALL executes the FF of the calling SC and can fail due to insufficient gas. It consists of four stack arguments: 1) the amount of gas required for the transaction, recipient’s address, 2) the amount of Ether to be transferred , 3) size, and 4) the location of input data along with the size and location of return data [21], [22]. call can provide the stimulus for reentrancy attack by forwarding all the gas [6]. However, implicit call statements are also possible. Listing 5 shows the code modified from [23]. Line #7 uses call implicitly, which is vulnerable; the first parameter is the Ether value, while the second parameter is the argument of f(..) . 1 contract test1 { 2 function f(int x)public payable returns (int){return x;} } 3 contract test2 { 4 function testA( address _add1) public { 5 test1 a = test1 (_add1); 6 uint amount = 500; 7 a.f. value (amount)(2);//vulnerable 8 a.f. value (amount);//non-vulnerable 9 } } Listing 5. test2 : implicit CALL sends amount to f(), in line#7 [23]. B. Contractual Vulnerabilities Contractual bugs impact the SC itself. Both the attacker and owner exploit them for causing harm to the SC users. The owner can design the SC to prevent leakage (or transfer) of any Ether, thus turning the SC into a black hole. However, the worst happens when an attacker uses the unprotected selfdestruct command to destroy the SC. The attacker enjoys the balance of the account if the attacker changes the ownership of SC before destroying it. 1) Frozen Ether: Also known as “ Locked Money ” [6] or “ be no black hole ” [24]. The frozen Ether threat deprives the SC account holders of Ether worth millions of dollars, as in the case of parity wallet SC. One atypical impact of the above exploits resulted after the accidental killing of the library SC, which provided an external route to Ether in parity Wallet SC (and to other multisigWallet -like SCs [25]). Apart from the accidental execution of suicide command, which the hobbyist confessed of doing in his issue# 6995 on Github [26], there could be coding loopholes in the SC, which can prevent exporting of Ether from the SC. Programmatically, exporting Ether weakness applies to SCs, which lack statements like call ,send , ortransfer , which move the funds outside the SC, along with the presence of payable directive in the SC, which on the other hand facilitates importing of Ether. To summarize, “frozen Ether” vulnerability occurs when: 1) SC permits inbound Ether traffic but shuts the outbound Ether traffic. Reference [25] labels such SCs as greedy. FF handles inbound Ether traffic but call ,send andtransfer handle outbound Ether traffic. Listing 6 uses a SC modified from [24], which shows the freezing Ether vulnerability because the SC contains a method having payable directive in line#2 but does not contain program paths leading to CALL, DELEGATECALL, or SELFDESTRUCT opcodes: 1 contract ModifiedBitway{ 2 function ( ) external payable { } } Listing 6. payable directive creates an Ether receiving FF in line#2. 2) Wallet SC relies on another SC or library. The library SC provides functions to support the Wallet, for instance, the library can provide function for transferring Ether. But if the library SC eventually kills herself by executing selfdestruct command or some other SC (or an attacker) accidentally (or deliberately) kills the library SC, then it would close the doors of Ether extraction from the wallet SC. Listing 7, modified from [27], shows the use of delegatecall in line#4 to load the code from the address 0xNewLibrary , line#2, containing the library’s withdraw() method. 1 contract testDC{ 2 address _nl = 0xNewLibrary; 3 function withdrawM() { 4 _nl. delegatecall (msg.data ); } } Listing 7. withdrawM() uses library through hardcoded address(line#2) and delegatcall (line#4) using that address [27]. 2) Self-Destructible: selfdestruct (previously known as suicide ) allows a SC to destroy itself by releasing the Ether of account holders. SC uses this alternative in emergencies. Research conducted by [25] terms a SC suicidal (i.e. vulnerable for SELDESTRUCT opcode) if the SC does not correctly guard the selfdestruct command. Attacker requires two things to kill a SC: (1) reaching into the conditional statement enclosing the selfdestruct statement, and (2) attaining the ownership of SC. selfdestruct causes unresponsiveness [8] of the SC resulting in “Denial of Service.” selfdestruct deletes the SC’s code permanently [28], [29]. All the SC’s funds would transfer to the account associated with SC. This transfer will not trigger 6 FF [28]. A beneficiary can be an existing account or the account may not exist. In the latter case, the destruction process creates the account and charges fees for it [21]. Contract MDiscontinue in Listing 8 provides a TerminateMe function to destroy the contract with unprotected selfdestruct (i.e., without any ifblock) in line#6, modified from [30]: 1contract MDiscontinue{ 2 address payable owner; 3 constructor ()public { 4 owner = msg.sender ; } 5 function TerminateMe() public { 6 selfdestruct (owner);}}//suicidal Listing 8. selfdestruct , line#6, without any guard, suicidal SC [30]. 3) Stealing Ether: Stealing Ether vulnerability (or Unsecured Balance) surfaces when the SC initializes the owner field indirectly as in line#4 of Listing 9 in a function other than the constructor. The use of a function for initialization of owner address (as in line#3) can lead to a problematic situation. This situation is similar to parity SC, which doomed the multi-signature SC of 30m dollars [31]. 1contract CompWallet{ 2 address payable owner;//state variable 3 function initComWallet( address payable _owner) public { 4 owner = _owner;}//any user can change owner 5 function withdraw( uint _amount) public { 6 if(msg.sender == owner){ 7 if(!owner. send (_amount)){} 8 else {}}}} Listing 9. owner initialized in line#4, outside constructor [27]. C. Arithmetic Bugs This problem occurs as a result of a mathematical operation. Most significant bug is the integer overflow/underflow, which is a common problem in programming languages. Increments beyond the maximum or decrements below the lowest value (i.e. wrap-around) may generate wrong results. Thus, developers must perform manual checking (i.e., employ a human expert to check the code); otherwise, code may create a wrap-around error. One solution is to use SafeMath library. The latest research recommends using the “ solc-verifier ” tool. 1) Integer Overflow/Underflow: Ethereum has nothing to do with data types leaving the compiler responsible for catch- ing integer overflows and under-flows [17], [32]. Solidity is rich in integer data types with flexible sizes (uint8, uint16, uint24,..uint256, int8, int16, int24,..int256) but does not support floating-point math [6]. Thus, the diversity of integer data types provides no benefit to SC. Work in [17], [33] provides an example code generating integer bugs. Figure 3 shows an underflow SC and its output on Remix (0 changes to 255 on decrements). Fig. 3. Underflow SC, MUFTest1, modified from [34], and the result of debugging it on REMIX IDE. SafeMath [6], [35] provides several functions to replace the ordinary arithmetic operations in SCs. Listing 10, lines#2-4, show the logic of SafeMath library’s method sub(..) . Figure 3 SC, MUFTest1 , is modified from [34]. We replaced the line#5 in Figure 3 by sub(..) method of SafeMath library as shown in Listing 10, line#9, of SC MUFTest2 . 7 2) Unchecked Maths: Unchecked math means that a SC is not using strategies to protect mathematical statements from overflows/underflows. A good practice is to protect the code using assertions and SafeMath library as shown again in Listing 10, line#9. 1 library SafeMath { 2 function sub( uint8 x,uint8 y)internal pure returns (uint8 ) { 3 assert (y <= x); 4 return x - y; } } 5 contract MUFTest2 { 6 using SafeMath for uint8 ; 7 uint8 testVal= 0; 8 function Utest() public returns (uint8 ){ 9 testVal= testVal.sub(1); 10//instead of : testVal- - (in line#5, Fig. 3) 11 return testVal; } } Listing 10. Use of sub(..) function, line#9, to avoid underflow [34]. D. Gas Related Issues The gas serves two essential purposes for the EVM network. Firstly, gas serves as compensation to the miners’ efforts for recording transactions. Secondly, the gas acts as a fuel for running a transaction and thus prevents long transactions from hijacking the EVM scheduling scheme. Logically, it means that if the user does not pay enough gas fee as required for the transaction, the transaction will fail by generating an “ out of gas ” exception. Surprisingly, an integer overflow can also cause “out of gas.” Other examples are Denial of Service, and Wallet Griefing, as discussed below: 1) Denial of Service (Costly Loops Causing Out of Gas Exception): EVM protects programs from Denial of Service attacks by forced termination. EVM allocates gas at the start of execution, and each execution step results in some deduction. If the remaining amount after deduction is less than the amount required for execution, EVM [15] terminates the SC’s execution, causing partial or full rollback [36]. The termination can occur even without the influence of an attacker [37]. An attacker can manipulate the arr, line#4, in Listing 11 by adding additional addresses. Thus, increasing the execution cost and transfer to manipulated addresses. In the worst case, the entire gas may be exhausted, resulting in full revert . Denial of Service can occur due to the presence of revert in external function, as in Listing 2, line#24. 1 contract testLL{ 2 uint constant LARGEGAS = 100000; 3 address payable addrArr; 4 function LongList( uint256 memory nextV, uint [ ] memory arr, address payable _addr) public { 5 uint256 i= nextV; 6 addrArr = _addr; 7 for ( ;i < arr. length && gasleft() > LARGEGAS; i++) { 8 addrArr. send (arr[i]); } 9 nextV = i; } } Listing 11. Unbounded mass operation: traversing an unsized array [15]. Another example is the Denial of Service due to a costly for or awhile loop. This may cause depletion of gas in each iteration and finally resulting in Denial of Service. Work presented by [15] renames this vulnerability, as “ Unbounded mass operations due to an unsized array variable arr in line#7, Listing 11, and [15] have proposed resumable loops. Function LongList(..) , line#4, in Listing 11, is excerpted from [15]. In the case of revert , due to “out of gas” threat, nextV , in line#9, points to the arr index, from where to resume. 2) Integer Overflow (Causing Out of Gas Exception): Authors of SmartCheck [6] and MadMax [15] discuss about the integer overflow issue in a loop in the context of Var (deprecated, Solidity used Var for Type Inference [6], [9]). However, an integer overflow can occur even when Var does not determine the type of loop index (i.e., uint8 ) variable. By this, we mean that integer overflow can occur if the type of loop index variable is a short integer at run-time. Listing 12 shows an overflow without using Var, as in line#4 in Listing 12 when the loop counter variable becomes greater than or equal to 255. 1contract Overflow { 2 int [300] emp; 3 function testOF() public returns (bool ) { 4 for (uint8 i = 0; i < emp. length ; ++i) { }}} Listing 12. Short integer overflows even without Var [38] in line#4. 3) Wallet Griefing Causing Out of Gas Exception: This vulnerability occurs if a SC uses a loop to send Ether to multiple SCs. Thus, if one receiver fails, then the entire transaction fails. The receiver can fail due to a bad FF (line#2, Listing 3). If the sending SC uses a throw (i.e.,revert ) to handle the failure of send then it can exacerbate the situation because throw consumes the entire gas [14], [39]and locks the sender’s SC [15], [40]. Repeated attempts may also fail due to “out of gas” situation, as in line#6, Listing 13, modified from [15]. However, the latest version in can achieve the same effect by using require andtransfer instead of send andrevert . 8 1for (uint i = 0; i < employee. length ; i++) { 2 if( employee [i].paid < min_salary ) { 3 // sentinel for making a payment. 4 // code may lock the SC 5 // due to {\tt revert} consuming all gas. 6 if(!( employee [i].addr. send ( employee [i].bonusAmount ))) revert () ; 7 employee [i] = newEmployee ; } } Listing 13. Wallet Griefing using revert ,send fails in line#6, [15]. E. Transactional Irregularities EVM transactions become a source of greed for the miner, which validates them. Thus some miners can influence the transactions resulting in vulnerabilities like Transaction Ordering Dependence and Time Stamp Dependence. 1) Transaction Ordering Dependence (TOD): TOD is also known as “ front running race condition ” [16]. This attack, “selfish mining attack”, occurs due to the mishandling of transaction queue by miners. The owner/user incentivizes the miner to change the order of the transaction [18]. One example of TOD is the case of marketplace SC as shown in Listing 14 modified from [18] in which a miner may not honor a leading buyer’s request at the cost of some other transaction. The buyer sends the transaction to buy at cost 100, line#7, Listing 14. At the same time, owner sends the transaction with a high gas fee to increase the price, line#4, Listing 14. The owner’s transaction executes first due to the higher gas price incentive. The buyer’s transaction completes next but the buyer pays more. 1 contract MMarketPlace { 2 uint private cost=100 ; 3 uint private inventory= 100; //more declarations 4 function incPrice ( uint _incCost ){ 5 require (msg.sender == owner ) 6 cost = cost + incCost ; } 7 function buy ( ) returns (uint ){ 8 require (msg.value == cost); 9 require (inventory > 0)); 10 inventory -= 1; / *more */ } }//use of SafeMath recommended Listing 14. Miner alters lines#5-8, causing TOD: marketplace [18]. Contrary to the general notion about a miner in connection with TOD, the recent research conducted by [17] argues that it is hard to exploit TOD threat because the attacker should be a miner, and there are less financial gains. Apart from this, there are some other programming problems. State variables often have a dependency on the function, which changes their values. Thus, coding such a function when multiple users are invoking that function is a concurrent programming issue. The concurrency in SCs requires some mechanism like semaphore to control access to the state variable. Reference [9] argues that Solidity does not support concurrency. Thus, manipulation by a miner is a limitation of BlockChain rather than a bug. However, EVM must provide some solution for miner’s problems, as the miners also contribute to immense power consumption. One solution proposed by [41] is to delegate miners’ role to a SC. Another name for this problem is the unpredictable state problem. This is because multiple invocations of a dependent function make it difficult to predict what the state and the values stored within a SC will be when a user executes the function. 2) TimeStamp Dependence [13]: Each block within the BlockChain contains three pieces of information: 1) timestamp, 2) cryptographic hash, and 3) the transaction data. – Timestamp represents the time when the miner verifies all the transactions within the block after computing the proof-of- work puzzle. A miner can manipulate the block timestamp but has to complete the validation within 900s [18]; otherwise other miners would reject the block. – Cryptographic hashesare deterministic functions. Miners exploit the deterministic hash values to verify the integrity of the block’s data. Cryptographic hash chains the current block with the previous block as there is a dependency between hash values of the two said blocks. – Transaction data can vary based upon transactions. Still, for the most straightforward transactions between two SC accounts, the transaction data would be the sender’s and receiver’s SC account addresses and the amount of Ether sender transfers to the receiver. Despite the doubtful accuracy, SCs use the timestamp for random number generation. Due to the miner’s involvement in setting the timestamp’s value, the timestamp becomes a so-called deterministic random value. Hence, the usage of the timestamp as a random value in lottery implementation is vulnerable [21]. Programmatically, block.timeStamp retrieves the timestamp associated with a block. However, one can just use now (alias for block.timestamp) also to retrieve the timestamp, as in Listing 15, lines#3-4. Solidity uses now for simplicity and bytecode implementation. But Solidity does not discriminate between now andblock.timeStamp and hence both are vulnerable. 9 1 contract TSD{ 2 function Mpay () public { 3 uint tTime = now; 4 if(tTime > ( now + 2) ){ if(!msg.sender .send (200)) { } else { } } } } Listing 15. Miner’s misuse of now (lines#3-4) causes TSD. 3) tx.origin: tx.origin is a transaction state variable which indicates the originator of the transaction. Other transaction state variables also exist like tx.GasPrice . But tx.GasPrice has a fixed value so the adversary cannot change it [9]. On the other hand, tx.origin can vary. This variation can lead to attacks because we cannot use tx.origin to ratify the contract’s owner, as shown in Listing 16. Lines#1-9 in Listing 16 show the victim’s SC (i.e., TxUserWallet ) and lines#10-11 show the interface (i.e., TxUserWallet ). Note that the names of the victim’s SC and the interface are the same but they are in different files. 1contract TxUserWallet { 2 address owner; 3 constructor ()public { 4 owner = msg.sender ; } 5 function sendTo( address dest, uint256 amount) payable public returns (bytes memory theMessage) 6 {require (tx.origin == owner); 7 (bool success, bytes memory returnMessage) = dest. call .value (amount)(); 8 require (success); 9 return returnMessage; } / *more */} 10interface TxUserWallet { 11 function sendTo( address dest, uint amount) external ;} 12contract TxAttackWallet { 13 address owner; 14 constructor () public { 15 owner = msg.sender ; } 16 function ()external payable { 17 TxUserWallet( msg.sender ).sendTo(owner, msg.sender .balance ); } / *more */} Listing 16. Example of tx.origin [42], Victim’s SC (i.e. TxUserWallet ). The rest of the code from lines#12-17 show the attacker’s SC, TxAttackWallet . The surveyed literature recommends the replacement of tx.origin withmsg.sender particularly for authenticating the sender of a message [14]. tx.origin represents the address of the first account in the call chain (i.e., the list of calls related to the currently executing transaction), whereas msg.sender is the original caller [6], [25]. V. T OOLS FOR TESTING SMART CONTRACTS we provide a brief description of SC tools developed for detecting above mentioned vulnerabilities. We grouped the testing tools into dynamic and static-based tools. A. Testing Tools based on Static Analysis of SCs There are a good number of static-analysis for testing SCs: –Zeus [9]. Zeus is a tool for formal verification of SCs using abstract interpretation and symbolic model checking. Zeus works directly on the high-level of SC code. Zeus detects threats like reentrancy (section IV-A1), Unchecked and Failed send (section IV-A3), Integer Overflows (section IV-C1), and Timestamp dependency(section IV-E2). –VeriSolid [43]. VeriSolid is a SC development tool. VeriSolid uses a transition system model to generate Solidity-based formally verified SCs. Automatic code generation is an important achievement in the context of formal verification tools. VeriSolid prevents reentrancy (section IV-A1) by design and uses liveness property to prevent Denial of Service (section IV-A2, IV-D1). –Vandal [14]. Vandal is a static analysis tool. Vandal performs security analysis of EVM bytecode using a logic language, called Souffle, to transform the analysis into C++. Vandal’s static analysis library functions detect threats like “Unchecked Send” (section IV-A3), Reentrancy (section IV-A1), UnSecured Balance (section IV-B3), Destroyable SC (section IV-B2) [14]. –Teether [22]. Teether focuses on the same idea of critical paths as in [24]. Teether constructs the CFG of the SC using the EVM bytecode, which helps to detect critical paths. The authors discussed the peculiar problem of backward traversal associated with JMP because of JMP’s similarity with x86’s return statement. –SmartScopy [44]. SmartScopy is an attack synthesizer. SmartScopy performs summary-based symbolic evaluation, which reduces the program size for symbolic analysis (SA) required for automatic generation of adversarial SC. The adversarial SC confirms the presence of vulnerability in the victim SC, detected by manual analysis. SmartScopy detects threats like reentrancy (section IV-A1), timestamp dependence (section IV-E2), and Gasless send (section IV-A4). 10 –SmartCheck [6]. SmarkCheck helps to remove the simple bugs quickly. However, for removing non-trivial bugs, [6] recommends using more sophisticated techniques like taint analysis (TA). The authors identified several coding threats like reentrancy (section IV-A1, Mishandled Exception IV-A3, call transfers all gas, and so on. The SmartCheck [6] related research provides a comprehensive list of threats based upon exploits related to security, functional, operational, and developmental issues. –Securify [27]. Securify is a static analysis tool, focusing on patterns (compliance or violation). The tool extracts the domain knowledge from patterns related to a security property. Securify detects threats like Stealing (section IV-B3) and frozen Ether (section IV-B1), Reentrancy (section IV-A1), Mishandled Exception (section IV-A3) and Transaction Ordering Dependence (section IV-E1). Related violation properties with regarding threats are restricted write, Ether liquidity, no writes after calls, handled exception, restricted transfer and TOD [27]. –Oyente [18]. Oyente performs static analysis of SCs. [18] recommend the extension of Oyente and is a reality when one reads the details of the tools mentioned in [45]. Oyente detects threats like TOD (section IV-E1), TimeStamp Dependence (section IV-E2), and Mishandled Exception (section IV-A3). –OSIRIS [32]. OSIRIS employs a strategy based upon taint analysis and symbolic execution and consists of an integer de- tection module. Symbolic execution module constructs a control flow graph (CFG) from the bytecode. The CFG processes different paths of the SC using symbolic values, as in Maian [25]. Osiris [32] detects arithmetic bugs (overflow/underflow (section IV-C1) and division by 0), truncation bugs (converting from a larger to smaller data size, e.g., 64-bit data to 16-bit data), and signedness bugs (converting a signed integer to an unsigned integer of the same width and vice versa). –MadMax [15]. MadMax focuses on automatic detection of gas-focused threats. Like Vandal [14], MadMax performs the de-compilation of EVM bytecode and similarly uses a logic-based approach to produce a high-level representation of the program model. MadMax defines strategies for surviving out of gas conditions in the context of resumable loops (section IV-D1), loops bounded by induction variable, and dynamically bounded loops. –KFrameWork-EVM-Semantics (KEVM) [36] :KEVM is a semantic analysis tool based upon SE. KEVM’s development framework integrates a semantic debugger and a program verifier. Tool encapsulates a gas analyzer that computes gas bounds during execution and can help in detecting “Denial of Service”(section IV-A2, section IV-D1) threats. –Interactive Theorem Provers (ITP) [46]. Interactive Theorem Prover combines the idea of theorem proving with testing. Initially, this tool presents the desired behavior of EVM in LEM [47]. Authors used both the community-based test suits and interactive theorem provers like Isabelle/HOL to test their EVM definitions. The authors divided the formalization into deterministic and non-deterministic formalization. The basic assumption for non-deterministic formalization was to segregate the environment from the system. This helped to reason about the adversarial attack and to model the reentrancy attack (section IV-A1). –Gasper [48]. Gasper uses Oyente Engine to generate the CFG and identifies the code for optimization. [48] points out seven gas costly-patterns. Due to shortage of space, we have not discussed Gasper patterns in this paper. –FSolidM [49]. FSolidM allows development of secure SCs using Finite State Machines (FSMs) [16]. FSolidM uses a set of plugins and design patterns that developers can add to the SC for implementing locking, maintaining transaction counter, and enforcing timed transitions to safeguard against reentrancy (section IV-A1), transaction ordering dependence (section IV-E1), and time constraint, respectively. –FVF* [7]. The research work in [7] describes the verification of Ethereum SCs using F* (FVF* stands for formal verification using F*). The work in [7] added an effect system in F* which helps in the detection of “unchecked send” (section IV-A3) and destructive patterns like reentrancy (section IV-A1). –EtherTrust [50]. Authors used the tool to prove the reachability property for SC’s bytecode. EtherTrust ensures two things about the SC: (i) FFs should not result in DAO type of attack (section IV-A1) (ii) data is not vulnerable to miner’s manipulation. –DappGaurd [19]. DappGaurd detects the diverse type of threats. However, instead of relying on bytecode or Solidity code, DappGaurd focuses on Transaction Receipts, which analyze live SCs, but the authors do not provide the source for retrieving TRs. DappGaurd’s prototype version detects several threats, and for this purpose, DappGard incorporates the Oyente engine. –sCompile [24]. sCompile exploits the notion of “critical paths” i.e., in place of identifying a program to be vulnerable, sCompile identifies critical paths (i.e., money related inter-contractual paths involving call ) in the program. Developed inC+ +, sCompile uses Z3 SMT Solver for SE. sCompile detects threats like reentrancy (section IV-A1), be no black hole (section IV-B1, and unguarded selfdestruct (section IV-B2). B. Testing Tools based on Dynamic Analysis of SCs –Vultron [51]. Vultron is still in infancy stages and the authors have tested the prototype using truffle suite. Vultron is a test oracle, which stores bookkeeping information in variables. Vultron compares these variables with account balances related to SCs to determine the inconsistencies. Vultron can identify threats like reentrancy (section IV-A1), exception disorder (section IV-A3), integer overflow/underflow (section IV-C1), and “gasless send” (section IV-A4). 11 –Sereum [11]. Sereum modifies the “goethereum” client “geth” and adds an attack detector and taint engine. Sereum works at the bytecode level and the binary level does not keep type information. This fact makes it challenging to infer about the sensitivity of data [30]. Sereum related research reports a reentrancy attack (section IV-A1). –Regaurd [52]. Regaurd is a dynamic analysis tool and incorporates a fuzzing based analyzer. Regaurd focuses on automatic detection of common threats in SCs like reentrancy bugs (section IV-A1). Regaurd transforms the code into an intermediate representation (IR) (Abstract Syntax Tree). Finally, Regaurd executes the SC (with transactions as input) and forwards the dump of relevant operations of run-time analysis to the core detector to detect reentrancy bugs. –Maian [25]. Maian is a static analysis tool but also performs dynamic analysis of SC. For offline inspection, Maian’s input is the EVM bytecode and the SC’s initial state retrieved from the BlockChain. SA generates actual values for the transaction given SC’s bytecode and analysis specification i.e., vulnerability category to search like Suicidal (same as selfdestruct , IV-B2) or Greedy (same as Frozen Ether, section IV-B1) as input. Maian then uses the actual values in the validation step. –EasyFlow [35]. EasyFlow is a specialized tool focusing on integer overflow. EasyFlow uses taint analysis for overflow detection. Detection algorithm analyzes transaction instructions and mathematical instructions (at bytecode level) like EXP, ADDMOD, and MULMOD and even the instructions protected by SafeMath library. –ContractFuzzer [12]. Fuzzing is a technique which can perform both static and dynamic analysis independently or at the same time. [53] discusses an example of fuzzing with SC by mounting the Truffle project to a docker image. ContractFuzzer detects threats like “Gasless send” (section IV-A4), “Exception disorder” (section IV-A3), Reentrancy (section IV-A1), TSD (section IV-E2), and Freezing Ether (section IV-B1). VI. C ONCLUSION AND RESEARCH DIRECTIONS We have provided classification of SC vulnerabilities but this can be further enhanced. In fact, security of SC is vital for strengthening the concept of BlockChain. Consistent efforts from academia have provided great solutions and this should continue. Our future research would be related to identifying randomization vulnerabilities. Following are the suggestion to fill the gaps in previous research and to advance the current research: – For EVM researcher: a) there is a need for run-time environment within the Ethereum (i.e. EVM) and all the newly launched SC must be tested using this environment. This would take care of SC which are launched without testing, and b) Many good tools have been developed by academia and it would be a good approach to incorporate them on the Remix website as plug-ins. – For Solidity researcher: Solidity interpreter needs more improvements to catch the vulnerabilities. For catching mathe- matical errors, Solidity can incorporate a solver. This addition can also pave the way for detection of reentrancy error, which occurs due to the misplacement of account deduction statement – For general researcher: Improving and developing new tools and techniques is important. Some examples areas where tools can be developed are: i) to catch new vulnerability patterns such as reported in [11], [40], ii) to make the use of libraries safe for SC, and iii) design strategies to reduce the miner’s time to generate a block that is currently 900 seconds. – For Security Researchers: It is also important to develop more effective security testing and adequacy criteria that are unique for testing SC [54]. It is also important to develop algorithmic [55] and machine learning [56], and deep learning [57] approaches for detecting vulnerabilities and security defects in SCs. ACKNOWLEDGMENT This research work is supported by National Science Foundation (NSF) under Grant No: 1821560. REFERENCES [1] H. Hasanova, U.-j. Baek, M.-g. Shin, K. Cho, and M.-S. Kim, “A survey on blockchain cybersecurity vulnerabilities and possible countermeasures,” International Journal of Network Management , vol. 29, p. e2060, 2019. [2] A. Alkhalifah, A. Ng, A. Kayes, J. Chowdhury, M. Alazab, and P. Watters, “A taxonomy of blockchain threats and vulnerabilities,” 2019. [3] H. Chen, M. Pendleton, L. Njilla, and S. Xu, “A survey on ethereum systems security: Vulnerabilities, attacks, and defenses,” ACM Comput. Surv. , vol. 53, 2020. [4] W. Dingman, A. Cohen, N. Ferrara, A. Lynch, P. Jasinski, P. E. Black, and L. Deng, “Defects and vulnerabilities in smart contracts, a classification using the nist bugs framework,” International Journal of Networked and Distributed Computing , vol. 7, p. 121–132, 2019. [5] N. Atzei, M. Bartoletti, and T. Cimoli, “A survey of attacks on ethereum smart contracts (sok),” in Proceedings of the 6th International Conference on Principles of Security and Trust - Volume=10204 . Springer-Verlag, 2017, pp. 164–186. [6] S. Tikhomirov, E. V oskresenskaya, I. Ivanitskiy, R. Takhaviev, E. Marchenko, and Y . Alexandrov, “Smartcheck: Static analysis of ethereum smart contracts,” in 1st IEEE/ACM International Workshop on Emerging Trends in Software Engineering for Blockchain, WETSEB@ICSE 2018, Gothenburg, Sweden, May 27 - June 3, 2018 . IEEE, 2018, pp. 9–16. [7] K. Bhargavan, A. Delignat-Lavaud, C. Fournet, A. Gollamudi, G. Gonthier, N. Kobeissi, N. Kulatova, A. Rastogi, T. Sibut-Pinote, N. Swamy, and S. Zanella-Beguelin, “Formal verification of smart contracts: Short paper,” in PLAS ’16 Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security , October 2016, pp. 91–96. [8] Known attacks. [Online]. Available: https://consensys.github.io/smart-contract-best-practices/known attacks/ [9] S. Kalra, S. Goel, M. Dhawan, and S. Sharma, “Zeus: Analyzing safety of smart contracts,” in Network and Distributed System Security Symposium , 2018. 12 [10] I. Grishchenko, M. Maffei, and C. Schneidewind, “Foundations and tools for the static analysis of ethereum smart contracts,” in Lecture Notes in Computer Science . Springer, Cham., 2018, pp. 51–78. [11] M. Rodler, W. Li, G. O. Karame, and L. Davi, “Sereum: Protecting existing smart contracts against re-entrancy attacks,” CoRR , vol. abs/1812.05934, 2018. [12] B. Jiang, Y . Liu, and W. Chan, “Contractfuzzer: Fuzzing smart contracts for vulnerability detection,” in Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering . New York, NY , USA: ACM, 2018, pp. 259–269. [13] Bankex. (2018, aug) Nine pitfalls of ethereum smart contracts to be avoided. [Online]. Available: https://blog.bankex.org/ nine-pitfalls-of-ethereum-smart-contracts-to-be-avoided-f7464761211c [14] L. Brent, A. Jurisevic, M. Kong, E. Liu, F. Gauthier, V . Gramoli, R. Holz, and B. Scholz, “Vandal: A scalable security analysis framework for smart contracts,” CoRR , vol. abs/1809.03981, 2018. [15] N. Grech, M. Kong, A. Jurisevic, L. Brent, B. J. Scholz, and Y . Smaragdakis, “Madmax: Surviving out-of-gas conditions in ethereum smart contracts,” Proc. ACM Program. Lang. , vol. 2, oct 2018. [16] M. di Angelo and G. Salzer, “A survey of tools for analyzing ethereum smart contracts,” in 2019 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPCON) . IEEE, 2019, pp. 69–78. [17] D. P ´erez and B. Livshits, “Smart contract vulnerabilities: Does anyone care?” CoRR , vol. abs/1902.06710, 2019. [18] L. Luu, D.-H. Chu, H. Olickel, P. Saxena, and A. Hobor, “Making smart contracts smarter,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security . ACM, 2016, pp. 254–269. [19] T. Cook, A. Latham, and J. H. Le, “Dappguard : Active monitoring and defense for solidity smart contracts,” 2017. [20] zak100 and goodvibration. (2019, jun) Gasless send: Keeping of ether wrongfully. [Online]. Available: https://ethereum.stackexchange.com/questions/ 71870/gasless-send-keeping-of-ether-wrongfully [21] I. Grishchenko, M. Maffei, and C. Schneidewind, “A semantic framework for the security analysis of ethereum smart contracts,” CoRR , vol. abs/1802.08660, 2018. [22] J. Krupp and C. Rossow, “teether: Gnawing at ethereum to automatically exploit smart contracts,” in 27th USENIX Security Symposium (USENIX Security 18). Baltimore, MD: USENIX Association, aug 2018, pp. 1317–1333. [23] zak100, user19510, and itsHarshad. (2019, jun) Parsererror: Expected identifier but got ’address’. [Online]. Available: https://ethereum.stackexchange. com/questions/71895/parsererror-expected-identifier-but-got-address/71902 [24] J. Chang, B. Gao, H. Xiao, J. Sun, and Z. Yang, “scompile: Critical path identification and analysis for smart contracts,” CoRR , vol. abs/1808.00624, 2018. [25] I. Nikolic, A. Kolluri, I. Sergey, P. Saxena, and A. Hobor, “Finding the greedy, prodigal, and suicidal contracts at scale,” CoRR , vol. abs/1802.06038, 2018. [26] ghost. (2017, nov) Anyone can kill your contract. [Online]. Available: https://github.com/openethereum/openethereum/issues/6995 [27] P. Tsankov, A. Dan, D. Drachsler-Cohen, A. Gervais, F. B ¨unzli, and M. Vechev, “Securify: Practical security analysis of smart contracts,” in Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security . ACM, 2018, pp. 67–82. [28] J. Chen, X. Xia, J. G. David Lo, D. X. Luo, and T. Chen, “Domain specific code smells in smart contracts,” CoRR , vol. abs/1905.01467, 2019. [29] (2018, Oct) Smart contracts-solidity. [Online]. Available: https://fullstacks.org/materials/ethereumbook/08 smart-contracts-solidity.html [30] J. Newsome and D. Song. (2017, Jan) Dyanmic taint analysis. [Online]. Available: https://www.cs.ucr.edu/ heng/teaching/cs260-winter2017/tainting.pdf [31] J. Alois. (2017, Nov) Ethereum parity hack may impact eth 500,000 or $146 million. [Online]. Available: https://www.crowdfundinsider.com/2017/11/ 124200-ethereum-parity-hack-may-impact-eth-500000-146-million/ [32] C. F. Torres, J. Sch ¨utte, and R. State, “Osiris: Hunting for integer bugs in ethereum smart contracts,” in Proceedings of the 34th Annual Computer Security Applications Conference . ACM, 2018, pp. 664–676. [33] W. A. W, G. J. Pace, and G. Schneider, “Smart contracts: A killer application for deductive source code verification,” 2018. [34] zak100 and S. Fontaine. (2019, Jun) Compilation error using safemath. [Online]. Available: https://ethereum.stackexchange.com/questions/71726/ compilation-error-using-safemath [35] J. Gao, H. Liu, C. Liu, Q. Li, Z. Guan, and Z. Chen, “Easyflow: Keep ethereum away from overflow,” in 2019 IEEE/ACM 41st International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) , 2019, pp. 23–26. [36] E. Hildenbrandt, M. Saxena, N. Rodrigues, X. Zhu, P. Daian, D. Guth, B. Moore, D. Park, Y . Zhang, A. Stefanescu, and G. Rosu, “Kevm: A complete semantics of the ethereum virtual machine,” in 2018 IEEE 31st Computer Security Foundations Symposium (CSF) . IEEE, 2018, pp. 204–217. [37] (2020) Dos with block gas limit. [Online]. Available: https://swcregistry.io/docs/SWC-128 [38] zak100 and user19510. (2019) Error in declaring a sized array: Generating no gas exception. [Online]. Available: https://ethereum.stackexchange.com/ questions/71734/error-in-declaring-a-sized-array-generating-no-gas-exception [39] P. Hall, eth, 0xcaff, axic, R. McCone, P. Bylica, and T. Hess. (2017, Jan) Why does a solidity throw consume all gas? [Online]. Available: https://ethereum.stackexchange.com/questions/2307/why-does-a-solidity-throw-consume-all-gas [40] P. Vessenes88. (2016, jun) Send with throw is dangerous. [Online]. Available: https://vessenes.com/ ethereum-griefing-wallets-send-w-throw-considered-harmful/ [41] S. Gholami. (2019, apr) What-is-smart-blockchain? [Online]. Available: https://hackernoon.com/what-is-smart-blockchain-4b134275e90f [42] R. R. Padalia and abb. (2018, Jan) Unable to replicate tx.origin attack. [Online]. Available: https://ethereum.stackexchange.com/questions/38490/ unable-to-replicate-tx-origin-attack, [43] A. Mavridou, A. Laszka, E. Stachtiari, and A. Dubey, “Verisolid: Correct-by-design smart contracts for ethereum,” CoRR , vol. abs/1901.01292, 2019. [44] Y . Feng, E. Torlak, and R. Bod ´ık, “Precise attack synthesis for smart contracts,” CoRR , vol. abs/1902.06067, 2019. [45] E. Albert, P. Gordillo, B. Livshits, A. Rubio, and I. Sergey, “Ethir: A framework for high-level analysis of ethereum bytecode,” CoRR , vol. abs/1805.07208, 2018. [46] Y . Hirai, “Defining the ethereum virtual machine for interactive theorem provers,” in Financial Cryptography and Data Security - FC 2017 International Workshops, WAHC, BITCOIN, VOTING, WTSC, and TA, Sliema, Malta, , vol. 10323. Springer, 2017, pp. 520–535. [47] D. P. Mulligan, S. Owens, K. E. Gray, T. Ridge, and P. Sewell, “Lem: Reusable engineering of real-world semantics,” SIGPLAN Not. , vol. 49, pp. 175–188, 2014. [48] T. Chen, X. Li, X. Luo, and X. Zhang, “Under-optimized smart contracts devour your money,” in 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER) , 2017, pp. 442–446. [49] A. Mavridou and A. Laszka, “Designing secure ethereum smart contracts: A finite state machine based approach,” CoRR , vol. abs/1711.09327, 2017. [50] I. Grishchenko, M. Maffei, and C. Schneidewind, “Ethertrust: Sound static analysis of ethereum bytecode,” 2018. [51] H. Wang, Y . Li, S.-W. Lin, L. May, and Y . Liu, “Vultron: Catching vulnerable smart contracts once and for all,” in Proceedings of the 41st International Conference on Software Engineering: New Ideas and Emerging Results . IEEE Press, 2019, p. 1–4. [52] C. Liu, H. Liu, Z. Cao, Z. Chen, B. Chen, and B. Roscoe, “Reguard: Finding reentrancy bugs in smart contracts,” in 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion) . IEEE, 2018, pp. 65–68. [53] N. Ambroladze, “Fast and scalable analysis of smart contracts,” Master’s thesis, ETH Zurich, Departement of Computer Science. [54] S. Dass and A. S. Namin, “Vulnerability coverage for adequacy security testing,” in SAC ’20: The 35th ACM/SIGAPP Symposium on Applied Computing, online event, [Brno, Czech Republic], March 30 - April 3, 2020 , 2020, pp. 540–543. 13 [55] ——, “Evolutionary algorithms for vulnerability coverage,” in 44th IEEE Annual Computers, Software, and Applications Conference, COMPSAC 2020, Madrid, Spain, July 13-17, 2020 , 2020, pp. 1795–1801. [56] F. Abri, S. Siami-Namini, M. A. Khanghah, F. M. Soltani, and A. S. Namin, “Can machine/deep learning classifiers detect zero-day malware with high accuracy?” in 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, December 9-12, 2019 , 2019, pp. 3252–3259. [57] N. Tavakoli, “Seq2image: Sequence analysis using visualization and deep convolutional neural network,” in 44th IEEE Annual Computers, Software, and Applications Conference, COMPSAC 2020, Madrid, Spain, July 13-17, 2020 , 2020, pp. 1332–1337.
{ "id": "2012.14481" }
1807.08142
{\em Crypto-Battleships} or How to play Battleships game over the Blockchain?
Battleships is a well known traditional board game for two players which dates from World War I. Though, the game has several digital version implementations, they are affected by similar major drawbacks such as fairness and a trust model that relies on third party. In this paper, we demonstrate how to implement a fair, resistant to denial-of-service, where the honest winner earns the deposit money {\em immediately}. The game is built on a permissionless Blockchain that supports Turing complete smart-contract computation.
http://arxiv.org/pdf/1807.08142v1
Guy Barshap
cs.CR, cs.SE
cs.CR
Crypto-Battleships or How to play Battleships game over the Blockchain? Guy Barshap- BGU university of Israel. Abstract Battleships is a well known traditional board game for two players which dates from World War I. Though, the game has several digital version implementations, they are a ected by similar major drawbacks such as fairness and a trust model that relies on third party. In this paper, we demonstrate how to implement a fair, resistant to denial-of- service, where the honest winner earns the deposit money immediately . The game is built on a permissionless Blockchain that supports Turing complete smart-contract computation. Furthermore, we provide a full working game implementation1of this proposition over the Ethereum Blockchain. 1 Introduction - Basic Battleships rules This section describes the basic rules of the classic battleships game, which establishes the basis for our novel contribution. Battleships is a popular traditional board game[9] for two players, where each player is required to hold a board game of 10 10 cell size. In each board, the players need to place down a eet of 5 battleships, where each battleship has di erent sizes and occupies consecutive cells in the board. Each cell can either be a battleship's part or an empty cell. This classic game has the following stages: 1.Placing the Battleships. To commence the game, each player needs tosecretly arrange their eets. The battleships can be placed in hori- zontal or vertical arrangement with each player possessing a prede ned equal amount and types of battleships. E-mail: Barshag@post.bgu.ac.il 1The front-end game will be released on the website: http://www.playonchains.com . 1arXiv:1807.08142v1 [cs.CR] 21 Jul 2018 In this phase, each player also creates another board with the same size in order to record the torpedoes shot into the opponent's eet, as well as their status (hit or miss). 2.Launching Torpedoes in turns. This phase operates in rounds, where the players switch their roles in each round. In a single round, there is one player shooting a torpedo into one of the cells of the oppo- nent's board and on announcing the exact cell that is being targeted, both players have to record the shot. Then, the opponent announces whether this cell contains a part of his own battleships (i.e the oppo- nent announces whether it is a hitormiss shot). In a situation where all parts of the ship have been a ected, the owner of that ship must announce "This ship was sunk". 3.Termination of the game. In the eventual outcome that a eet of one of the players is sunk (i.e all the battleships are sunk), the game ends and the opponent will be announced as the winner. Pedantic players at this stage will perform comparison of their own records against the private opponent's board arrangement to obtain some2guarantee that they have not been cheated. 2 Why play battleships over the Blockchain? 2.1 Limitation of the Battleships' centrelized variant A typical battleships game is normally hosted on a third party centralized server, however, this approach su ers from the following limitations. Trusting the server. In a centralized server scenario, the players must rely on the information coming from the server, since it acts as a media- tor, unlike the case of dishonest server, which may be problematic due to erroneous information. Furthermore, when money is involved in the games, a server may decide whether or not to transfer money to the player who wins the game. In addition, a potential hacker may have the opportunity to exploit such loopholes to manipulate the performance of the server, which inherently in uences the outcome of the game. 2This will not give them a full guarantee, since a malicious opponent could perform Dynamically changing battleship's location attack. We describe that attack in Section 3.1 2 12345678910 AX BX CXX DXXXXX EX FXXX G XX H I J Table 1: A typical Battleships board game of 10 10 cell size and 5 battleships of sizes: 11, 12, . . . , 55. Game suspected to a Denial of Service attack (DoS). At any point in the game, a player who is not satis ed with the score of the game (or for any other reason), has the privilege to launch a denial of service campaign on the server. This is possible, since the server has a single point of failure and there are several low cost service providers for DDoS [6]. An example of DDoS attack that occurred in the wild, can be found in [4]. 2.2 Playing the game over a Blockchain A Blockchain architecture that allows arbitrary computation (i.e. Smart contract [11]) o ers several advantages over a centralized variant, and can mitigate the mentioned aws from Section 2.1. 2.2.1 Blockchain bene ts In this section, we describe the bene ts of executing the game over a Blockchain instead of using centralized server. Decentralization. A Blockchain that allows Turing-complete computa- tion executes commands across multiple machines, which are called nodes. This architecture enables a trust-less computation and validation over blockchain nodes. This property is in contrast to the case of executing the game on a sin- gle server, which makes the Blockchain resilient to denial-of-service attacks. 3 Hence, to "shut down" the computation mechanism, an attacker needs to attack several highly maintained servers across the Internet instead of just a few. "The code is the law" paradigm. Once a smart-contract is uploaded into the blockchain, it cannot be changed3. Thus, in a situation where the game is developed with fair rules that can be audited (since the bytecodes are publicly available once uploaded), it becomes infeasible for some entity to interfere and change the rules during an instance of a game. Participating in the game cannot be prevented from anyone. In addition to the above bene ts, playing on a permissionless Blockchain cannot be censored by a single authority, since every player can create a wallet on their own. Instant payment. The smart contract code has the ability to transfer money based on certain predetermined programmed rules. Whenever such rules occur, money transfer to a player's wallet cannot be prevented. In our Battleships game, the winner immediately receives the deposit money of both players (in Ether). 3 How to enforce fair play? 3.1 Survey of possible attacks Building a game over a Blockchain can be mistakenly interpreted to be re- silient to cyber attacks. However, such statement tends to be invalid, because a naive implementation would su er from the following attacks. Keeping secrets. Since the Blockchain maintains a public ledger, putting secret values will expose it to potential cheats, in which an adversary can scan the Blockchain and launch torpedoes on the public locations of his adversary. This is a well known vulnerability that occurs in Blockchain's architecture, more details on this vulnerability can be found in [5]. Dynamically changing battleships' location. In this attack, the attacker may change the location of the ships dynamically, in his own favor, without updating the other player. Thus, in a condition where there is no 3This claim is not 100% guaranteed, for example in the cases of fork that may arise spontaneously, or with an occurrence of 51% attack, which is rare on a popular Blockchains such as Bitcoin and Ethereum. 4 enforcement on the location after the rst stage of placing the Battleships , an attacker can attain a major advantage in the game. Inappropriate placement of the battleships. Using this attack, an attacker can place only a subset of the battleships or the entire battleships such that its parts are neither consecutive or nor forming the correct shape of the ship. Implementation's vulnerabilities. As for any other software, every game could have vulnerabilities and this is speci cally more prominent in the logic game executed over blockhcain. A comprehensive survey and taxonomy can be found in [5]. 3.2 Design concepts Herein we describe the design requirements that will mitigate the above at- tacks. Security requirements. 1. A player that picks a board layout have to commit the board at the beginning of the game, which must not be changed before the game nishes (i.e. a cheater cannot change the location of the battleships without being caught); 2. The above commitment, must not expose any value of the location of the battleships (i.e the locations of the battleships must remain pri- vate). 3. The type and size of battleships of the players must obey prede ned set of rules (i.e. there must be battleships of sizes 1 5;14, etc.). 4. In each turn, the players need to provide a proof of not cheating about the exact value of the previous torpedo shot toward them, whether it was a Hitor a Miss. 5. Whenever a player makes claim for a victory, he must provide proof that he was not cheated with regard to the location of the battleships. 6. The game should have a penalty mechanism for a malicious user who is not taking any action at a particular period of time. (i.e the game must prevent the user from freezing the deposit of money in the smart contract due to not continuing the game). 5 Architecture requirements. 1. The smart contract code of each move should be as light as possible. This requirement is crucial to minimize the nance costs, as well as to provide good user experience. 2. The code should be audited by independent researchers in order to lower the number of implementation's bugs. 3.3 Game design overview This section provides a brief overview of the game design, according to dif- ferent phases of the game. 3.3.1 Registration Phase Two di erent parties are required to register at the beginning of the game, where both parties make a joint decision on the amount of money to com- mit to the game. The deposited money is considered a major factor which enforces the players to play by the rules, because any attempt to cheat in the game will result in a punishment of giving the deposited money to the opponent. 3.3.2 Placing the battleships The players will then choose where to place their battleships on the board using the game user interface (UI). Afterward, a player who is satis ed with the layout of his own eet, must upload the computed root of the merkle-tree to the smart contract of the game (in a speci ed period of time). Merkle tree of the board. A merkle tree (MT)[7] is a cryptographic structure that allows for ecient and secure veri cation of content. This structure helps to verify the consistency and content of the data. The struc- ture is a binary tree, where every leaf node is labeled with the hash of a data block that it represents and every non-leaf node is labeled with the crypto- graphic hash of the labels of its child nodes. The topmost node is called the root (similar to a regular binary tree). In our design, every leaf node is labeled with a data block in the form of xjjr, wherexdenotes whether there exist a ship with size xin the respective 6 cell, or not (i.e x= 0), andris a sucient4large random value, where the excess number of leafs equals to 0 (those leafs completes the tree to a full binary tree with 27= 128 cells). An illustration of concrete merkle-tree of a simpli ed board can be seen in Figure 1. 12 AX BX)Root A1-A2 A1 2205A2 0813B1-B2 B1 2932B2 0417 Figure 1: Simpli ed 2 2 Battleships' board game with only one battleship of size two, and the corresponding merkle-tree structure of that board. Broadcasting the MT-root will enforce the player to commit the cho- sen board and force him not to change it later on, since a cryptographic hash function is a one-way function, which is resilient to second-preimage attack5. Furthermore, when broadcasting this root into the blockhcain, no single value from the underneath values will be revealed, due to the use of random concatenation of each value. 3.3.3 Launching Torpedoes In each turn6, a player that wants to launch a torpedo, must broadcast the underneath value of the previous opponent's shot, along with a proof that it is the real value. The proof is delivered by a MT-path from the MT-root till the targeted cell number of the previous opponent moves and this path will be veri ed on the blockchain smart-contract. Only in a situation where the path is valid 4Common length of rcan be at least 128 bit, to make it hard to guess the value of the cell by performing Brute-force guessing. 5The property of second-preimage resistance claims that it is computationally infeasible to nd any second input which has the same output as that of a speci ed input 6Not include the rst move. 7 (i.e. the leaf value ts with the root of the merkle tree uploaded in the rst phase), will the player be permitted to perform the next move. Furthermore, we also enforce time constraint to perform valid moves, in order to avoid a denial of service attack at a particular instance of game. 3.3.4 Final game veri cation Finally, the smart contract will enforce the candidate winner, which is the player that achieves a correct guess of the entire eet of the opponent, to reveal his own battleships' locations. Such rule is necessary to mitigate the Inappropriate placement of battleships attack . In case the player refuses to provide a valid MT-paths, he will be tagged as a cheater, and the punishment is that the other player will be announced as the winner, and thus receive the deposited money. 3.4 Software architecture of the game We describe the software architecture of our proposed game design in this section in order to o er a comprehensive overview of the game. The design of the game relies on the 3-tiers architecture [10], which is very similar to a typical decentralized application (dapps). An illustration of these layers is depicted in Figure 3.4. 1.Presentation layer - This layer is responsible for the UI, which in- cludes the following components: HTML and JScript code that manages the UI of the game. It also includes client side code which ensures game play follow the speci ed protocol7 Web3.js [2] is the layer that connects the HTML client code to interact with the game's smart contract. Metamask wallet[3] enables the users to commit transaction to the blockchain. 2.Logic layer - This layer is responsible for enforcement of the game rules and it is placed in the smart contract code. The layer includes the following components: 7This feature is not taken into account in the security analysis, since it is not prevented from malicious attacker who can change the code, and bypass the mechanisms. 8 Veri cation of the boards' MT-path which relies on the solidity library called merkle-tree-solidity [1]. Authentication and authorization of the players that participate in the game. Veri cation of the game rules and validity of transmitted data. 3.Data layer -This layer is responsible for storing the data that is trans- ferred to the blockchain and includes the following values: The MT-root of the board. The revealed value of cells in the board introduced by previous moves. Presentation layer - HTML and JScript code Logic layer- Battleships smart contract Data layer - Stored on the blockchainMT.solWeb3.js Board Committed values Figure 2: Overview of the architecture's scheme 3.5 Security analysis We give a brief security analysis by considering a semi-honest attacker whose computational resources are polynomial bounded. We defer the formal proofs to a full version of this article that will be published in a Journal. 3.5.1 Security This game inherits the basic security mechanism of blockchain which in- cludes: Authentication of the players during the game will be performed via private key which controls their wallet. 9 Authorization of performing moves in turns by restricting moves to current player's turn, using smart-contract restrictions. We now proceed to analysis of countermeasures to the types of cheats that were introduced in Section 3.1. Types of cheats. As discussed previously, any kind of cheat will be punished immediately, by enforcing the rules in the smart contract code. Table 2 describes cases of potential cheats and how the architecture monitors such cheats in the smart contract. Type of cheat Countermeasure mechanism Unresponsive player Each turn is time bounded8. Dynamically changing ships The board is committed via MT-root which stays permanent during a game instance. Any attempt to change the location will pro- duce a fake proof, that the smart contract identi es. Inappropriate placement The winner is forced to reveal his eet before he receives the payment. In case the amount or layout of the battleships does not follow the rules, the player will be punished. Table 2: Types of cheats and the corresponding countermeasure mechanisms programmed into the smart contract code. 3.5.2 Privacy The main privacy issue is how to hide the locations of players' battleships. Since the entire data in the transactions and smart contracts' elds are public, it must be ensured that they have not exposed parts of battleships locations which are yet to be made public. To that end, we examine the messages in each round of the game. 1.Commitment phase - hash function is a one-way function by de ni- tion (i.e. given an hash output, it is hard to compute the corresponding input). Thus, an attacker that wants to match boards of size 100 with 10 the root hash value will have to generate the entire board cells and then compute its MT. Since, we concatenate to each block data, a random number with a suciently large length, the whole computation com- plexity is approximately O((2)100), where we denote as the length ofrvalue in bits and in this experiment we use  >128 bits. Hence, the locations of the boards remain private against a computationally bounded adversary. 2.Launching torpedoes phase - in every turn, a player must reveal his targeted board's cell that was threatened by the previous turn. To this end, he broadcast a MT-path from the MT-root till that cell. It is easy to see that the publicly path does not reveal any other intermediate values, which in order to guess them, the attacker needs to generate 2 values, as cryptographic hash function is a one-way function. 3.Termination phase - the purpose of this phase is to reveal the can- didate's eet location. Thus, we do not consider any privacy issues in this phase, since the locations are not kept secret at the end of the game. 3.6 Computational analysis This section is concerned with the communication and computational anal- yses, which is important to understand the complexity of executing the game, since the computational cost of the game (in Ethereum gas units) is proportional to the number of operations and the data transmitted to the blockchain. However, we defer the in-depth details of these analyses to the full publication of this article, while we provide here only theoretical analysis. Let us denote [ H], [B], [BS] as the length in bits of the hash function's output, the amount of the cells in the Battleships' board, and the amount of battleships in the game, respectively. Communication analysis. Commitment phase -both players transmit [ H] bytes of the MT-root. Torpedo launching phase - red in each round, the current player trans- mits MT-path of size [ H]log([B]) and a cell number of size log([ B]) bits. 11 Computational analysis. It is easy to see that the major costly operations derive from the MT proof checking and the termination phase. Thus, the former computation is bounded by 2[ B][MTP ], where [MTP ] denotes the cost of executing MT- proof, and the latter computation is bounded by the number of battleships. This is due to the fact that once the valid battleships cells have been received, we only need to check that they are tied to each other. 4 Future advance mechanisms In this section, we present ideas that describe how to extend our proposed game, to include more sophisticated game features and advance game man- agement mechanisms. We also defer the comprehensive description of those features to the full publication version of this article. 4.0.1 Game variations Multi-player case. A trivial extension is to simply increase the game ton-multi-player game, where in each turn a player will have the priv- ilege to choose the speci c board to launch a torpedo toward. Additional assets. In this case, several additional features will be included such as mines, shes, etc. Players can purchase assets and obtain more rewards for the players. For example, an event of discov- ering a mine will immediately release a xed amount of money to the adversary. These assets can easily be an ERC tokens (both ERC-20 or ERC-721 types). 4.0.2 Game management Minimize the cost of moves. Since each move involves executing transaction on the blockchain, it is desirable to minimize the number of operations to reduce the costs of playing the game. One possible way is to decrease the number of data that is pushed to the main blockchain, by using plasma chains [8]. The latter approach will also increase user usability, since every move will not enforce metamask transaction pop- box. 12 Enforcing the locations of battleships in advance. To enforce that the players' boards is containing exactly (prede ned constant) T cells of battleships and that each battleships parts are in a consecutive manner, we can use zero-knowledge proofs. This approach however may increase the communication complexity overhead, which inherently in- creases the cost of playing the game. Catching cheaters in advance. In our proposed mechanism, despite devising a means for discovering a cheater who tries to change the battleships' locations or sizes and also preventing any form of money theft from the other player at the end of the game, the cheater could still manage to waste the time of the player and postpone the immediate discovery of cheating until the end of the game. This phenomena occurs since the committed MT-root does not provide a proof of arrangement of the battleships, because the validation of the arrangement only occurs at the end of the game, by the smart contract code. A solution to this problem is to use the zero-knowledge schemes. In contrast to this, we can transform this "bug" into a feature by adding a nice "Poker" mechanism feature to the game which allows the players the ability to blu each other. As such, a player can choose whether he cheats in advance or not, in the rst phase of the game. At any point in time in the game, a player can then guess whether the other player had blu ed him or not. In case the "cheat" is con rmed, then the player will receive an amount that is inversely proportional to the number of rounds of game already played. Blacklist of cheaters. After detecting cheats in the game, it is pos- sible to take actions against the users that were involved in cheat- ing. Such actions to those cheaters can be ban them from partici- pating. However, this feature is in con ict with our requirement to non-censorship game. 5 Conclusion In this article, we proposed the rst decentralized Battleships game, which is composed of various cryptographic components to enforce 13 fairness, keep battleships' location secret and protect honest players from malicious cheaters. Furthermore, playing battleships over the blockchain provides major bene ts such as making the game DDoS re- sistant, where the money is transferred immediately to the winner, or to the opponent in case cheating is discovered. The logic of the game is developed using solidity language and deploy over the Ethereum blockchain as a smart contract. 6 Acknowledgment I would like to thank Viki for giving the opportunity to work on this problem. I also want to thank Oded Leiba for the valuable technical discussions, Christiaan Verhoef and Bert Bosman from Amsterdam who showed enthusiasm which encouraged me to re ne this game, Polina Zilberman for helping me with proofreading and last but not least, my supervisor Dr. Rami Puzis from the BGU university. References [1] https://github.com/ameensol/merkle-tree- solidity/blob/master/src/merkleproof.sol. [2] https://github.com/ethereum/web3.js/. [3] https://metamask.io/. [4] https://threatpost.com/blizzard-entertainment-hit-with-weekend-ddos- attack/127440/. [5] Nicola Atzei, Massimo Bartoletti, and Tiziana Cimoli. A survey of at- tacks on ethereum smart contracts (sok). In International Conference on Principles of Security and Trust , pages 164{186. Springer, 2017. [6] Mohammad Karami and Damon McCoy. Understanding the emerging threat of ddos-as-a-service. In Presented as part of the 6th USENIX Workshop on Large-Scale Exploits and Emergent Threats , Washington, D.C., 2013. USENIX. 14 [7] Ralph C Merkle. A digital signature based on a conventional encryption function. In Conference on the theory and application of cryptographic techniques , pages 369{378. Springer, 1987. [8] Joseph Poon and Vitalik Buterin. Plasma: Scalable autonomous smart contracts. 2017. [9] Wikipedia contributors. Battleship (game) | Wikipedia, the free ency- clopedia, 2018. [Online; accessed 15-June-2018]. [10] Wikipedia contributors. Multitier architecture | Wikipedia, the free encyclopedia. https://en.wikipedia.org/w/index.php?title= Multitier_architecture&oldid=822900859 , 2018. [Online; accessed 16-July-2018]. [11] Gavin Wood. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper , 151:1{32, 2014. 15 A Appendix Figure 3: A screenshot from the current UI implementation. 16
{ "id": "1807.08142" }
2305.07608
Torrent Driven (TD) Coin: A Crypto Coin with Built In Distributed Data Storage System
In recent years decentralized currencies developed through Blockchains are increasingly becoming popular because of their transparent nature and absence of a central controlling authority. Though a lot of computation power, disk space, and energy are being used to run this system, most of these resources are dedicated to just keeping the bad actors away by using Proof of Work, Proof of Stake, Proof of Space, etc., consensus. In this paper, we discuss a way to combine those consensus mechanism and modify the defense system to create actual values for the end-users by providing a solution for securely storing their data in a decentralized manner without compromising the integrity of the blockchain.
http://arxiv.org/pdf/2305.07608v1
Anirudha Paul
cs.DB
cs.DB
TO R R E N T D R I V E N ( T D ) C O I N : A C R Y P TO C O I N W I T H B U I LT I N D I ST R I B U T E D DATA STO R A G E SYST E M /a.sc/n.sc/i.sc/r.sc/u.sc/d.sc/h.sc/a.sc /p.sc/a.sc/u.sc/l.sc /a.sc/b.sc/s.sc/t.sc/r.sc/a.sc/c.sc/t.sc In recent years decentralized currencies developed through Blockchains are increas- ingly becoming popular because of their transparent nature and absence of a central controlling authority. Though a lot of computation power, disk space, and energy are being used to run this system, most of these resources are dedicated to just keep- ing the bad actors away by using Proof of Work, Proof of Stake, Proof of Space, etc., consensus. In this paper, we discuss a way to combine those consensus mechanism and modify the defense system to create actual values for the end-users by pro- viding a solution for securely storing their data in a decentralized manner without compromising the integrity of the blockchain. /one.taboldstyle /i.sc/n.sc/t.sc/r.sc/o.sc/d.sc/u.sc/c.sc/t.sc/i.sc/o.sc/n.sc When Bitcoin [ 1] was first introduced, its Proof of Work consensus showed us a dif- ferent way to combat adversaries. Rather than blocking the adversaries directly, it made an attack on the network extremely expensive. Though this system is prevent- ing any major attack on the system, the tendency of centralized mining is increasing exponentially. Nowadays, ordinary people can not participate in bitcoin mining. As a result, the system is not as democratized as initially thought. Another widespread consensus is Proof of Stake, which is adapted in Ethereum 2.0[2], Cardano [ 3], etc., coins, where you stake your own money to participate. Any bad behavior can cost the miners loosing their staked money. Though it is power efficient, staking actual currency without doing any work can cause nothing at stake, whale problems, etc. To address this, we propose a consensus that uses this distributed network of the miner to store user data. By securely storing this data and continuously proving the proof of storage, the miners will earn seed points. Instead of staking the currency they maintain, they will use these earned seed points to claim a spot in the mining round. In a nutshell, miners should provide some utility to earn points that enable them to mine further to get actual cryptocurrency. Spoofing the process of earning these seed points is hard enough so that honest miners have no incentive to deviate from the intended flow. And as the underlying mining technology is basically already tested proof of stake, the integrity of the network is as good as other similar currencies like Ethereum 2.0, Cardano, etc. 1arXiv:2305.07608v1 [cs.DB] 12 May 2023 /p.sc/r.sc/e.sc/v.sc/i.sc/o.sc/u.sc/s.sc /w.sc/h.sc/i.sc/t.sc/e.sc/p.sc/a.sc/p.sc/e.sc/r.sc /s.sc/h.sc/o.sc/r.sc/t.sc/c.sc/o.sc/m.sc/i.sc/n.sc/g.sc/s.sc 2 /two.taboldstyle /p.sc/r.sc/e.sc/v.sc/i.sc/o.sc/u.sc/s.sc /w.sc/h.sc/i.sc/t.sc/e.sc/p.sc/a.sc/p.sc/e.sc/r.sc /s.sc/h.sc/o.sc/r.sc/t.sc/c.sc/o.sc/m.sc/i.sc/n.sc/g.sc/s.sc In the Bitcoin whitepaper [ 1], the author introduced the idea of Proof Of Work, where miners need to continuously try different nonce to generate a hash with the required number of zero bit. But as time goes by, this challenge of generating the intended hash has become so complex that nowadays it is near impossible to mine effectively without designated ASICS, which is a huge waste of money and resources for doing calculations that have no other purpose other than showing commitment. To address this, Ethereum is introducing Proof of Stake in its system. But it also introduces new problems - as now the "work" part is removed to show commitment, miners have the opportunity to sign multiple blocks from parallel chains, making it hard for forks to converge. Though Ethereum punishes this behavior by slashing the coin of bad actors, it is still not completely secured from manipulation by the whales who have the majority coin in control. Another consensus mechanism is proof of space [ 4], where the miner fills up its disk space with garbage information generated by mathematical hash functions, and the verifier sends them challenges from time to time to validate whether the miner is holding the data or not. The issue is the disk space the data is taking is not meaningful. It is there to show commitment, just like Bitcoin’s proof of work. We shall see later in this paper that it is possible to address some of the shortcom- ings mentioned above. /three.taboldstyle /a.sc/r.sc/c.sc/h.sc/i.sc/t.sc/e.sc/c.sc/t.sc/u.sc/r.sc/e.sc The whole mechanism of this blockchain can be described with three sections. 1. Block structure 2. Consensus 3. Method of issuing the token The block structure follows the standard Bitcoin block structure. The consensus follows the proof of stake mechanism, but it is different in a sense it doesn’t use the main coin as a stake but instead uses a secondary Seed Bonus Token. The main deviation comes in the method of issuing the tokens. Though the main Torrent Driven Coin (TD Coin) is issued with a standard block reward, the secondary coin (Seed Bonus Token) needed for staking and mining has a different structure for minting. /three.taboldstyle./one.taboldstyle Block structure Transactions are arranged in standard Bitcoin format, where every transaction is spent from the coin, not from the account. The coin owner transfers the coin by digitally signing the hash of the previous transaction and adding the next owner’s public key at the end. The new owner can verify the signatures by following the chain of ownership. And to avoid double-spending, only the oldest transaction of any coin is considered valid. 1 In the chain, many of these transactions are arranged in a block, and their hash value links them. The size of the blocks can be dynamically adjusted like Ethereum based on the network congestion. 2 /a.sc/r.sc/c.sc/h.sc/i.sc/t.sc/e.sc/c.sc/t.sc/u.sc/r.sc/e.sc 3 Figure 1: Transaction structure (Standard Bitcoin) [ 1] Figure 2: Block structure (Standard Bitcoin) [ 1] /three.taboldstyle./two.taboldstyle Consensus In this modified proof of stake consensus mechanism 3, miners agree to lock up the whole amount of their secondary coin, "Seed bonus token," for getting the chance to validate new blocks of data to be added to a blockchain. The blockchain algorithm selects validators from the pool of queued miners based on how much seed bonus token their accounts have. The more seed bonus token a miner has, the better chance of being chosen to mine and earn newly minted primary crypto - "Torrent Driven Coin" as a reward if the block gets added to the main chain. A portion of their seed bonus token is burnt to encourage future data seeding, and the rest is returned back to their wallet again. If a validator is caught cheating, they could be punished by burning all their seed bonus tokens and sending them to an unusable wallet address to which nobody has access, making them useless forever. /three.taboldstyle./three.taboldstyle Method of issuing the token There are three types of token present in this system. /one.taboldstyle. /t.sc/o.sc/r.sc/r.sc/e.sc/n.sc/t.sc /d.sc/r.sc/i.sc/v.sc/e.sc/n.sc /c.sc/o.sc/i.sc/n.sc This is the standard-issue coin that can be exchanged between any parties present in the blockchain. It can only be minted by mining a block in this blockchain. Other than exchanging it as money, users can also burn an Figure 3: A high level architecture of Proof of Stake consensus [ 5] /a.sc/r.sc/c.sc/h.sc/i.sc/t.sc/e.sc/c.sc/t.sc/u.sc/r.sc/e.sc 4 Figure 4: Minting Leech Token Figure 5: Hosting Request amount of this coin through a smart contract present in layer 1of this blockchain to get the Leecher Token described below. The exchange rate between Torrent Driven Coin and Leecher Token will be adjusted dynamically based on supply and de- mand. /two.taboldstyle. /l.sc/e.sc/e.sc/c.sc/h.sc/e.sc/r.sc /t.sc/o.sc/k.sc/e.sc/n.sc Leecher token grants the ability to upload your data to other users or the ability to host other’s data in your machine and get a seed bonus. The only way to get this token is to send an amount of Torrent Driven coin to the predefined smart contract, and the smart contract will burn the coin and give the sender an amount of Leecher Token in exchange. The exchange rate is controlled algorithmically to address the supply-demand issue. Each leech token grants access to upload or host one MB of data. If a user wants to host 30MB of data in one additional copy in the network, the process will work like this - For example, Alice wants to make a copy of her data on the peer-to-peer network, and Bob wants to host data for the seed bonus token. First, Alice will send an amount of Torrent Driven coin to a specific smart contract to get 30or more leecher tokens as seen in figure 4. Then she will join the pool of hosting requests to find possible hosts with the 30 leecher tokens in place like in figure 5. On the other side, Bob also needs to exchange Torrent Driven coins to show commitment as a seeder. So, for example, if he has 50leecher tokens, he can request the smart contract to match him with 50*5=250data blocks. Five is a constant here, representing each data block will be saved by at least five seeders. Then what the smart contract will do is match each block Alice wants to host with five different Host addresses. Alice will see all the public keys associated with each of her data blocks on the blockchain. The application on her side will make five copies of data, add the public key to those blocks, make a torrent tracker and publish the tracker on the blockchain. When the tracker gets published, the group of hosts, including Bob, can see the tracker and use that to only download the data attached with their individual public keys in header like in figure 6. Not only that, each payload is also appended with the seeder’s public key and random value before encryption which prevents seeders from swapping the pay- load between them. Each seeder has his own unique version of the same payload /a.sc/r.sc/c.sc/h.sc/i.sc/t.sc/e.sc/c.sc/t.sc/u.sc/r.sc/e.sc 5 Figure 6: Data Distribution Process Figure 7: Payload Structure that the data owner himself can only decrypt. Sample payload structure can be seen in figure 7 The entire process will be covered with Byzantine Fault tolerance and other cross- chain swap techniques if any involved party deviates from the intended path like - going offline, not signing, false signing, etc. The smart contract will ensure that other parties won’t have to consume the loss. So this leecher token is not exchangeable between addresses. It can only be used for hosting purposes. /three.taboldstyle. /s.sc/e.sc/e.sc/d.sc /b.sc/o.sc/n.sc/u.sc/s.sc /t.sc/o.sc/k.sc/e.sc/n.sc The sole purpose of this token is to ensure data integrity and facilitate staking for proof of stake. The first issue is - what is the guarantee the host is storing the data? The standard checksum used in torrent systems is not enough to solve this issue. Because to do that, they need to send the data back to the validator, which is slow and unnecessary. Instead, the original data owner or some other validator can save some part of that data in their system, and after random intervals, they can request zero-knowledge proof from the host. The time to response window is short to avoid data recreation. If they can’t respond with the proof within that window, that proves the miner is either offline or is not actually storing the data - both of these behaviors are unacceptable. But if they can respond to the challenge properly along with able to send a small amount of data to show seed liveliness and passing the checksum test, the host will be rewarded with a small amount of new token - the "Seed Bonus Token." The download and checksum check is similar to a normal torrenting system [ 6]. And the zero-knowledge proof is similar to this proof of space and time described in this paper [ 7]. The whole process can be done in side chain and only publish the result in main chain to claim reward. /s.sc/c.sc/a.sc/l.sc/a.sc/b.sc/i.sc/l.sc/i.sc/t.sc/y.sc, /s.sc/e.sc/c.sc/u.sc/r.sc/i.sc/t.sc/y.sc, /a.sc/n.sc/d.sc /r.sc/e.sc/s.sc/o.sc/u.sc/r.sc/c.sc/e.sc-/e.sc/f.sc/f.sc/i.sc/c.sc/i.sc/e.sc/n.sc/c.sc/y.sc 6 Now there is a new token in the account for potential miners - which is really hard to spoof and also not transferable. That’s why the reason to be a bad actor to earn this token is very slim. So the possibility of the host honestly seeding the data is much higher. But now the question is, what is the incentive for them to earn this reward? The answer is - they can use this reward to stake to get a chance to validate a block and get the block reward in TD coin, which is actually transferable and can be used as actual currency. From this point on, the consensus falls back on the proof of stake. The difference here is - instead of staking the main currency, the miners are staking their off-chain hosting work reward earned through proof of space. /four.taboldstyle /s.sc/c.sc/a.sc/l.sc/a.sc/b.sc/i.sc/l.sc/i.sc/t.sc/y.sc, /s.sc/e.sc/c.sc/u.sc/r.sc/i.sc/t.sc/y.sc, /a.sc/n.sc/d.sc /r.sc/e.sc/s.sc/o.sc/u.sc/r.sc/c.sc/e.sc-/e.sc/f.sc/f.sc/i.sc/c.sc/i.sc/e.sc/n.sc/c.sc/y.sc The system is scalable in a sense underlying everything; it is still using the proof of stake as its consensus, which is pretty scalable and secured under heavy transac- tions. One might think the whole process of downloading and uploading data can slow down the main blockchain - which is not true. Cause the upload, download, and zero-knowledge prove that part of the system can be considered off-chain work and side chain transactions. Only the result of each checkpoint is published on the main chain. So the main chain is not slowed down by all the bottlenecks associated with proof of space. The main network will continue to use proof of stake, but the staked coins are influenced by tokens earned in the independent torrenting mechanism and proof of space consensus. The whole system is resource-efficient because though miners have to do a lot more work, especially allocating more disk space than the traditional proof of stake, the silver lining is that those works are not wasted work. By using the storage, they are providing actual value to the users. There is no unnecessary computation power used like Proof of Work. Overall the security is also up to par with other traditional coins. The original main network is using proof of stake, which after many iterations and research, is now pretty secure to be relied upon. The staked point is going through the zero- knowledge proof of space and byzantine consensus, making it extremely hard to profit from being a bad actor. There is no way to replicate the data as the packets are encrypted with individual miner’s public key, and the only way to list your public key as a valid host is by burning actual Torrent Driven coins. As the exchange rate is controlled algorithmically, it is not easy to inflate or deflate the staking pool or make a hostile takeover. So by combining all those techniques, the proposed blockchain is scalable, se- cured, and resource-efficient and provides actual value to users instead of the per- ceived value of traditional crypto coins. /five.taboldstyle /c.sc/o.sc/n.sc/c.sc/l.sc/u.sc/s.sc/i.sc/o.sc/n.sc The primary goal of this white paper was to create intrinsic value for the whole distributed mining network of blockchain. By incorporating torrenting mechanisms in the proof of space framework, we have introduced a solution for securely and reliably storing multiple copies of data on the internet. Moreover, as there are monetary exchanges and interests involved in the process, the chance of abandoning the torrent by the seeder is really low. And it is also a great way to incentify hosting private encrypted data. In the process, it is now replacing the redundent generated data of Proof of Space with actual meaningful information. /c.sc/o.sc/n.sc/c.sc/l.sc/u.sc/s.sc/i.sc/o.sc/n.sc 7 By adding signatures, zero-knowledge proof, and byzantine consensus to track the seed status and facilitate a reward mechanism, we have minimized the risk of bad actors creating fake seed data and, in the process, attacking the staking pool. On the other hand, removing staking coins with staking work has introduced a toned-down version of Proof of Work in the Proof of Stake mechanism, making the architecture secure like PoW and scalable like vanilla PoS. Finally, introducing a utility inside the network and regulating the exchange rate algorithmically has the possibility of reducing the current deflationary nature of the crypto coins where no one wants to use it in the real-world other than speculative investment. Because in this architecture, seeding more data is beneficial for the miners, that’s why the competition among miners can reduce the cost for the storing data for the normal users. /r.sc/e.sc/f.sc/e.sc/r.sc/e.sc/n.sc/c.sc/e.sc/s.sc 8 /r.sc/e.sc/f.sc/e.sc/r.sc/e.sc/n.sc/c.sc/e.sc/s.sc [1] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system, 2009 . [2] Vitalik Buterin. Ethereum white paper: A next generation smart contract & decentralized application platform. 2013 . [3] Aggelos Kiayias, Alexander Russell, Bernardo David, and Roman Oliynykov. Ouroboros: A provably secure proof-of-stake blockchain protocol. In Annual international cryptology conference , pages 357–388. Springer, 2017 . [4] Stefan Dziembowski, Sebastian Faust, Vladimir Kolmogorov, and Krzysztof Pietrzak. Proofs of space. Cryptology ePrint Archive, Report 2013 /796,2013 . https://ia.cr/2013/796 . [5] Christopher Natoli, Vincent Gramoli, and Paulo Veríssimo. Deconstructing blockchains: A comprehensive survey on consensus, membership and structure, 08 2019 . [6] Bram Cohen. Incentives build robustness in bittorrent. In Workshop on Economics of Peer-to-Peer systems , volume 6, pages 68–72. Berkeley, CA, USA, 2003 . [7] Tal Moran and Ilan Orlov. Simple proofs of space-time and rational proofs of storage. In Annual International Cryptology Conference , pages 381–409. Springer, 2019 .
{ "id": "2305.07608" }
2312.02164
Driver Safety Reward with Cooperative Platooning using Blockchain
Cooperative driving (or Platooning) focuses on improving the safety and efficiency by connecting two or more vehicles on a road by vehicular communication protocols. The leader is crucial as it manages the platoon, establishes communication between cars, and perform platoon maneuvers. In this paper, we proposed a driver incentive model which encourages platooning on roads leading to driver safety. As, the leader of platoon have multiple responsibilities than followers, our model rewards more incentives to leader than followers. These incentives will be rewarded as crypto tokens. This digital monetization method for both leaders and followers of a platoon is accomplished by secure transactions using blockchain.
http://arxiv.org/pdf/2312.02164v1
Sruthi Rachamalla, Henry Hexmoor
cs.NI, cs.CR
cs.NI
Driver Safety Reward with Cooperative Platooning using Blockchain Sruthi Rachamalla1and Henry Hexmoor2 Southern Illinois University, Carbondale, IL 62901, USA, sruthirachamalla@siu.edu and henry.hexmoor@cs.siu.edu Abstract. Cooperative driving (or Platooning) focuses on improving the safety and efficiency by connecting two or more vehicles on a road by vehicular communication protocols. The leader is crucial as it man- ages the platoon, establishes communication between cars, and perform platoon maneuvers. In this paper, we proposed a driver incentive model which encourages platooning on roads leading to driver safety. As, the leader of platoon have multiple responsibilities than followers, our model rewards more incentives to leader than followers. These incentives will be rewarded as crypto tokens. This digital monetization method for both leaders and followers of a platoon is accomplished by secure transactions using blockchain. Keywords: Cooperative Driving, Platooning, Blockchain Technology, Monetization 1 Introduction In our daily lives, we spend an average of 47 minutes on the road travelling, and the traffic on the roads is becoming increasingly crowded. Congested roadways are linked to longer commute, lower fuel economy, and a higher risk of motor vehicle collisions. We could save a lot of travel time if we could reduce commuting times by a fraction of a second. One solution to the traffic problem is cooperative driving, also known as platooning [1]. Vehicles in a platoon communicate using an ad-hoc network or other communication protocols. These communication channels allow platoons to drive closer to one other while maintaining a safe distance. A platoon of vehicles will have a leader who will interact with the platoon followers while managing the platoon and overseeing maneuvers. The platoon leader is in charge of speed, lane changes, braking, and so on, while the follower vehicles are in charge of following the leader vehicle. Cooperative driving uses vehicle-to-vehicle and infrastructure-to-vehicle wire- less communication system. [2] emphasizes the technology aids in the interchange of data gathered from other cars that is impossible to obtain via on-board sen- sors. The Advanced Transportation Technology (PATH) project in California [3] first proposed the idea of cars traveling together on the road in 1980. Cooper- ative driving can improve the driving experience on the road by relieving the driver from some of the driving obligations. Traditional sensor based AdaptivearXiv:2312.02164v1 [cs.NI] 24 Oct 2023 2 Sruthi Rachamalla and Henry Hexmoor Cruise Control (ACC) isn’t enough for cooperative platooning, instead Cooper- ative Adaptive Cruise Control (CACC) should be considered. CACC broadcasts information such as speed, acceleration, and distance through wireless commu- nication. By allowing CACC, the distance between vehicles can be minimized by following closely, improving both safety and fuel efficiency . The focus on co- operative driving or platooning has increased globally in recent years because of the potential it holds in road transportation mainly focusing on automated and mixed traffic. Truck platooning [4, 5], and CACC [6] were prominent examples of cooperative driving, which focused on minimizing inter-vehicular distance by obeying the ”Three Second Rule” safety rule [7]. Having a good leader for a platoon is really crucial in forming, maintaining, and improving safety. There are a lot of methods in electing a platoon leader. [8] proposed an incentive based strategy using blockchain to elect leader who is the best for the safety of the platoon. The other way is through voting [9] to elect the platoon leader. Some other methods are may be through scoring and ranking the drivers based on the everyday driving and the driver with best rank can only initiate platoon formation. Our inspiration is drawn from the ranking method. We added an incentive or monetization factor for selecting platoon leader based on rank. When a driver of a vehicle drives everyday there will be a rank assigned to the driver performance and the driver with a best rank can become a platoon leader and other drivers will be followers. To encourage more drivers to be platoon leaders, a monetization system is required that is fair for all members. This digital monetization is implemented by the usage of a smart contract in blockchain technology that holds users to a higher level of behavior, which is promising in this regard. This smart contract establishes what constitutes acceptable behavior and prevents users from breaking that standard. The contributions of this paper is organized as follows: Literature Survey on Platooning and Blockchain is discussed in Section 2. The Cooperative Platoon Earnings Methodology is described in Section 3. Algorithms for determining the Earning setup, analysis, scoring model, and monetization heuristic are presented in Section 4. Section 5 discusses the implementation of Driver Safety Reward (DSR) on Rinkeby Test Network. Conclusions and future work are presented in Section 6. 2 Literature Review The first platooning simulator that was developed was Hestia [10]. This simula- tor is used for simulating various scenarios using sensors but its drawback is it do not execute the platooning maneuvers and does not simulate traffic scenarios. In paper [11], the researchers tried to simulate the mixed traffic scenarios using SUMO and were unsuccessful. They implemented a car following model based on CACC to simulate inter-vehicle communication. In [12] paper, they manu- ally simulated the mixed traffic scenarios and tested the simulator to study the consequences of CACC on traffic. Driver Safety Reward with Cooperative Platooning using Blockchain 3 The PLEXE [13] simulation tool is a platooning extension for SUMO [14] which is open-source and is available to the community. This simulation tool has different CACC car-following models to experiment. The wireless communication protocols are available for simulating the formation and platoon management. Mixed traffic scenarios are available to use and implement platooning maneu- vers. The authors in paper [15], developed a simulator to implement platooning maneuvers such as join an existing platoon and merge two platoons. In paper [9], the authors developed a state-of-the-art simulator based on VENTOS [16] which uses SUMO. PERMIT [17] is a tool which simulates platooning maneuvers like join, merge, leave, and split which is built on Plexe [13]. Currently, to our knowledge only few researchers are working on effectively combining the benefits of blockchain technology with the platooning technology to better understand the usefulness. The authors in paper [18] used blockchain as a medium in transportation. They achieved the communication between vehicles in platoon and blockchain public key infrastructure by securely using hardware- based side channels. In [19], they decreased the blockchain transaction validation time, and verified the vehicle identity. The authors in [20], emphasised on using blockchain with platooning to share information securely and rapidly. In our preceding work [21], significant features are extracted from a simulated driving dataset and driver is assigned a rank based on the behaviour on road. Based on the rank, the driver is offered crypto tokens and these transaction details along with driver attributes are stored on a blockchain network. 3 Cooperative Platoon Earnings Methodology This section presents the entire overview of the proposed framework as shown in the Fig. 1. This methodology put forward in 5 steps, namely: (1) Driving Rank Designation Model (2) Simulation with Permit (3) Feature Extraction (4) Digital Monetization with Platoons (5) Storing in Blockchain. Fig. 1. Cooperative Platoon Earnings Methodology 4 Sruthi Rachamalla and Henry Hexmoor Driving Rank Designation Model: Each Driver is assigned a rank and based on the rank, Earning rate of the driver is determined by the heuristic as proposed in [21]. Simulation with PERMIT: PERMIT [17], an open source platooning simulator based on SUMO and its platooning extension PLEXE. With PERMIT, Merge, Join, Leave and Split maneuvers can be performed. Merge is a maneuver in which two platoons join to form one platoon. Join refers to joining one vehicle into an existing platoon. Leave maneuver is when a car exists the current platoon. Split refers to dissolving one single platoon into two platoons. By using the PERMIT, we simulated all these maneuvers. This provides the data required for the evaluating the earnings with platoon for a driver. Feature Extraction: A platoon state represents two features: (1) number of cars, and (2) distance travelled. For example, in Fig. 2, a platoon is represented with five different states. First state S1has two cars. Car C3has joined the platoon reaching to state S2. Similarly, S3is achieved. In contrast, S4is attained by car C3leaving the platoon. Similarly, S5is also reached. Fig. 2. States in Platoon Digital Monetization with Platoons: With the features extracted from the previous step, we formalized the earnings ( erd) for the driver as summation of the earnings achieved while he drove in platoons ( erin) and earnings achieved while driving outside the platoon ( erout) erd=erin+erout(1) Because different maneuvers can exist inside the platoon, we decomposed the earning offered inside the platoon into addition of earnings during join( Per join) and leave( Per leave) maneuver. erin=Per join+Per leave (2) However, the eroutis calculated as product of previous day earnings rate (ER d−1) which determined by the Driving Rank Designation Model and distance travelled by the driver outside the platoon( dout). Driver Safety Reward with Cooperative Platooning using Blockchain 5 Table 1. List of Notations Symbol Definition erd Earnings of particular day eroutEarnings outside of the platoon erinEarnings inside of the platoon ERd−1 Earning Rate of previous day doutOut-platoon distance n Number of cars in a platoon j Number of followers in the platoon in join maneuver l Number of cars left the platoon in leave maneuver δ Balancing Factor η Penalty Factor S State-of-platoon Li Length of the platoon at state i dinIn-platoon distance at state S w Number of platoons a driver travelled Per join(L) In-platoon earnings with join maneuver of leader Per join(F) In-platoon earnings with join maneuver of follower Per leave(L) In-platoon earnings with leave maneuver of leader erout=ER d−1∗dout(3) As mentioned earlier that a platoon leader will have a little favor by this model due to his responsibilities, Join and Leave Maneuvers are calculated using two different equation one representing Leader and other Follower in the platoon. Join Maneuver For every platoon, driver joined on a particular day, and for all the states in each platoon, calculate the product of the average of the States of the platoon( Si) and the sum of the previous earning rate of the driver( ER d−1) andnδ. The State( Si) is defined as the product of the Length of Platoon( Li) at state iand distance travelled inside the platoon( din i). Here the term jδis the additional incentive for the leader of the platoon. It represents the summation of the balancing factor over the number cars joined in the platoon. The balancing factor δis used to control the amount of incentive does the drivers will provide during the platoon. We assigned it as 0.01. Per join(L) =wX p=1nX i=1Si∗(ER d−1+jδ) (4) The difference between Leader and Follower is there will be no additional incentives for follower. Instead, only the balancing factor is added to the previous day earning rate( ER d−1). Platoon Follower doesn’t require length of the platoon. So, it just uses the distance travelled in each state. Per join(F) =wX p=1nX i=1di∗(ER d−1+δ) (5) 6 Sruthi Rachamalla and Henry Hexmoor Leave Maneuver During the Leave Maneuver, for the leader, instead of the number of cars joined( j), number of cars left( l) is considered. Additionally, there will be a penalty if a car leaves the platoon before travelling ηmiles. In other words, earnings for the followers will start only after travelling ηmiles. The overhead incurred by changing the structure of the platoon while on the move is the main reason for penalty. Here we considered η= 10. Per leave(L) =wX p=1[nX i=1Si∗(ER d−1−lδ) +penalty w] (6) where, Si=Li∗din i (7) penalty =( (din−η)∗δ,ifdin< η 0, otherwise All the notations used in the model as summarized in the table 1. Storing in Blockchain: For secure transaction of the crypto tokens, the extracted data from the Feature Extraction step is stored in a blockchain tech- nology. Features stored are Driver ID, current earnings, Rank designated for the driver, over speed limit count, distance travelled, number of sharp accelerations, number of sharp decelerations, number of platoons he joined, platoon leader activity, earning date. To ensure the driver safety on road we propose following rules: –Drivers with rank less than four cannot act as platoon leaders. –Drivers with rank greater than three are encouraged to be platoon leaders 4 Algorithmic Approach In this section, we present the multiple algorithms for calculating the earnings of a day inside a platoon for a driver. In the below pseudo code snippet, total earnings for a driver in platoon is presented. Jer:=JoinEarnings Ler:=LeaveEarnings Earnings =Jer+Ler The following snippet calculate earnings for a merge or join maneuver for leader or follower. Driver Safety Reward with Cooperative Platooning using Blockchain 7 Join Earnings i f number cars joining >1: c a l c u l a t e merge earnings e l s e c a l c u l a t e earnings (” l e a d e r ”) or c a l c u l a t e earnings (” f o l l o w e r ”) Similar to above snippet of algorithm, leave maneuver for leader or follower are presented. Leave Earnings i f number cars leaving >1: c a l c u l a t e s p l i t e a r n i n g s e l s e c a l c u l a t e earnings (” l e a d e r ”) or c a l c u l a t e earnings (” f o l l o w e r ”) merge earnings and split earnings refers to earnings that can be awarded in the merge and split maneuvers respectively for a driver. Algorithm 1 merge earnings 1:ifplatoon 1leader then 2: earnings (”leader ”) 3:end if 4:ifplatoon 2leader then 5: earnings (”follower ”) 6:end if 7:ifplatoon follower then 8: earnings (”follower ”) 9:end if Depending on the driver type whether its leader or follower of the platoon, earnings algorithm is used for a platoon maneuver especially for join. Similarly penalized earnings is also defined which is used in the case of the leave maneuver. 5 Driver Safety Reward in Platoons We implemented a simple six car platoon with Join and Leave Maneuvers in PERMIT. With the data from the PERMIT and the above formulation we cal- culated the earnings for leader and a follower in both the scenarios. For the 8 Sruthi Rachamalla and Henry Hexmoor Algorithm 2 split earnings 1:ifplatoon 1leader then 2: penalized earnings (”leader ”) 3:end if 4:ifplatoon 2leader then 5: penalized earnings (”leader ”) 6:end if 7:ifplatoon follower then 8: penalized earnings (”follower ”) 9:end if Algorithm 3 earnings(driver type) Require: Per join= 0, δ= 0.01 1:forwdoinnum ofplatoons : 2: ifdriver =Platoon Leader then 3: Per=ERd−1+ (joined cars∗δ) 4: forsdoinnum ofstates : 5: SP=SP+ (Ls∗ds) 6: end for 7: else 8: Per=ERd−1+δ 9: forsdoinnumber ofstates : 10: SP=SP+ (ds) 11: end for 12: end if 13: Per join=Per join+SP+Per 14:end for Algorithm 4 penalized earnings(driver type) Require: Per leave = 0, δ= 0.01 1:forwdoinnumber ofplatoons : 2: calculate penalty 3: ifdriver =Platoon Leader then 4: Per=ERd−1−(leftcars∗δ) 5: forsdoinnum ofstates : 6: SP=SP+ (Ls∗ds) 7: end for 8: else 9: Per=ERd−1+δ 10: forsdoinnum ofstates : 11: SP=SP+ (ds) 12: end for 13: end if 14: Per leave =Per leave +SP+Per+penalty 15:end for Driver Safety Reward with Cooperative Platooning using Blockchain 9 leader, the earnings resulted in 26.29 tokens and in the case of follower its 19.34 tokens. A Rinkeby test network is used as our Ethereum network for implementation [21]. On the rinkeby etherscan network, two smart contracts were deployed, one for tokenization and the other for storing driver records. Tokenization contract will authorize the driver-record contract with driver DSR test tokens and transfer a small number of DSR test tokens to the driver-record contract at first.The driver-record will now be able to credit DSR test tokens to allocated driver’s wallets based on their rating. The tokenization contract, for example, created 10000000 (107) DSR test tokens and authorized the data-record to spend them. The contract sends 10000 DSR test tokens to data-record, where they will be assigned to the drivers. The tokenization contract, for example, created 10000000 (107) DSR test tokens and authorized the data-record to spend them. The contract sends 10000 DSR test tokens to data-record, where they will be assigned to the drivers. In the Admin wallet, the MetaMask represents 9990000 (0.999*107) DSR test tokens. 6 Conclusion and Future Work In this paper, we proposed a model to incentivize the driver behaviour in the case of platooning. For this, we articulated a system to calculate the earnings awarded for a driver in a platoon. This system considers the different maneu- vers in platoon namely Join, Leave, Merge, and Split. We used PERMIT, a platoon simulating system to mimic the aforementioned maneuvers. A Rinkeby test network is used to award the test tokens to driver based on their earnings. This paper assumes for the platooning in cars, but can be extended to different homogeneous vehicles and even heterogeneous vehicles. References 1. Carl Bergenhem, Steven Shladover, Erik Coelingh, Christoffer Englund, and Sa- dayuki Tsugawa. Overview of platooning systems. In Proceedings of the 19th ITS World Congress, Oct 22-26, Vienna, Austria (2012) , 2012. 2. J Piao and Mike McDonald. Advanced driver assistance systems from autonomous to cooperative approach. Transport reviews , 28(5):659–684, 2008. 3. Steven E Shladover, Charles A Desoer, J Karl Hedrick, Masayoshi Tomizuka, Jean Walrand, W-B Zhang, Donn H McMahon, Huei Peng, Shahab Sheikholeslam, and Nick McKeown. Automated vehicle control developments in the path program. IEEE Transactions on vehicular technology , 40(1):114–130, 1991. 4. Assad Alam, Bart Besselink, Valerio Turri, Jonas M˚ artensson, and Karl H Jo- hansson. Heavy-duty vehicle platooning for sustainable freight transportation: A cooperative method to enhance safety and efficiency. IEEE Control Systems Mag- azine , 35(6):34–56, 2015. 5. Kuo-Yun Liang. Fuel-efficient heavy-duty vehicle platoon formation . PhD thesis, KTH Royal Institute of Technology, 2016. 10 Sruthi Rachamalla and Henry Hexmoor 6. Steven E Shladover, Christopher Nowakowski, Xiao-Yun Lu, and Robert Ferlis. Cooperative adaptive cruise control: Definitions and operating concepts. Trans- portation Research Record , 2489(1):145–152, 2015. 7. Michael T Wolf and Joel W Burdick. Artificial potential functions for highway driv- ing with collision avoidance. In 2008 IEEE International Conference on Robotics and Automation , pages 3731–3736. IEEE, 2008. 8. Pranav Kumar Singh, Sahil Sharma, Sunit Kumar Nandi, Roshan Singh, and Suku- mar Nandi. Leader election in cooperative adaptive cruise control based platooning. InProceedings of the 1st International Workshop on Communication and Comput- ing in Connected Vehicles and Platooning , pages 8–14, 2018. 9. Mani Amoozadeh, Hui Deng, Chen-Nee Chuah, H Michael Zhang, and Dipak Ghosal. Platoon management with cooperative adaptive cruise control enabled by vanet. Vehicular communications , 2(2):110–123, 2015. 10. Simon Hall´ e and Brahim Chaib-draa. A collaborative driving system based on multiagent modelling and simulations. Transportation Research Part C: Emerging Technologies , 13(4):320–345, 2005. 11. Pedro Fernandes and Urbano Nunes. Platooning of autonomous vehicles with intervehicle communications in sumo traffic simulator. In 13th International IEEE Conference on Intelligent Transportation Systems , pages 1313–1318. IEEE, 2010. 12. Bart Van Arem, Cornelie JG Van Driel, and Ruben Visser. The impact of cooper- ative adaptive cruise control on traffic-flow characteristics. IEEE Transactions on intelligent transportation systems , 7(4):429–436, 2006. 13. Michele Segata, Stefan Joerer, Bastian Bloessl, Christoph Sommer, Falko Dressler, and Renate Lo Cigno. Plexe: A platooning extension for veins. In 2014 IEEE Vehicular Networking Conference (VNC) , pages 53–60. IEEE, 2014. 14. Pablo Alvarez Lopez, Michael Behrisch, Laura Bieker-Walz, Jakob Erdmann, Yun- Pang Fl¨ otter¨ od, Robert Hilbrich, Leonhard L¨ ucken, Johannes Rummel, Peter Wag- ner, and Evamarie Wießner. Microscopic traffic simulation using sumo. In The 21st IEEE International Conference on Intelligent Transportation Systems . IEEE, 2018. 15. Elham Semsar Kazerooni and Jeroen Ploeg. Interaction protocols for cooperative merging and lane reduction scenarios. In 2015 IEEE 18th International Conference on Intelligent Transportation Systems , pages 1964–1970. IEEE, 2015. 16. Mani Amoozadeh, Bryan Ching, Chen-Nee Chuah, Dipak Ghosal, and H Michael Zhang. Ventos: Vehicular network open simulator with hardware-in-the-loop sup- port. Procedia Computer Science , 151:61–68, 2019. 17. Jes´ us Mena-Oreja and Javier Gozalvez. Permit-a sumo simulator for platooning maneuvers in mixed traffic scenarios. In 2018 21st International Conference on Intelligent Transportation Systems (ITSC) , pages 3445–3450. IEEE, 2018. 18. Sean Rowan, Michael Clear, Mario Gerla, Meriel Huggard, and Ciar´ an Mc Goldrick. Securing vehicle to vehicle communications using blockchain through visible light and acoustic side-channels. arXiv preprint arXiv:1704.02553 , 2017. 19. Jose Angel Leon Calvo and Rudolf Mathar. Secure blockchain-based communica- tion scheme for connected vehicles. In 2018 European Conference on Networks and Communications (EuCNC) , pages 347–351. IEEE, 2018. 20. Henry Hexmoor, Suray Alsamaraee, and Maha Almaghshi. Blockchain for im- proved platoon security. International Journal of Information , 7(2):1–6, 2018. 21. Sruthi Rachamalla and Henry Hexmoor. Dsrbt-driving safety reward based on blockchain technology. Proceedings of 37th International Conference on Computers and Their Applications , 82:72–81, 2022.
{ "id": "2312.02164" }
2005.14689
Wallet Attestations for Virtual Asset Service Providers and Crypto-Assets Insurance
The emerging virtual asset service providers (VASP) industry currently faces a number of challenges related to the Travel Rule, notably pertaining to customer personal information, account number and cryptographic key information. VASPs will be handling virtual assets of different forms, where each may be bound to different private-public key pairs on the blockchain. As such, VASPs also face the additional problem of the management of its own keys and the management of customer keys that may reside in a customer wallet. The use of attestation technologies as applied to wallet systems may provide VASPs with suitable evidence relevant to the Travel Rule regarding cryptographic key information and their operational state. Additionally, wallet attestations may provide crypto-asset insurers with strong evidence regarding the key management aspects of a wallet device, thereby providing the insurance industry with measurable levels of assurance that can become the basis for insurers to perform risk assessment on crypto-assets bound to keys in wallets, both enterprise-grade wallets and consumer-grade wallets.
http://arxiv.org/pdf/2005.14689v1
Thomas Hardjono, Alexander Lipton, Alex Pentland
cs.CR
cs.CR
Wallet Attestations for Virtual Asset Service Providers and Crypto-Assets Insurance (Extended Abstract) Thomas Hardjono Alexander Lipton Alex Pentland MIT Connection Science & Engineering Massachusetts Institute of Technology Cambridge, MA 02139, USA hardjono@mit.edu alexlip@mit.edu pentland@mit.edu 1 June, 2020 Abstract The emerging virtual asset service providers (VASP) industry currently faces a number of challenges related to the Travel Rule, notably pertaining to customer personal informa- tion, account number and cryptographic key information. VASPs will be handling virtual assets of di erent forms, where each may be bound to di erent private-public key pairs on the blockchain. As such, VASPs also face the additional problem of the management of its own keys and the management of customer keys that may reside in a customer wallet. The use of attestation technologies as applied to wallet systems may provide VASPs with suitable evidence relevant to the Travel Rule regarding cryptographic key information and their operational state. Additionally, wallet attestations may provide crypto-asset insurers with strong evidence regarding the key management aspects of a wallet device, thereby providing the insurance industry with measurable levels of assurance that can become the basis for insurers to perform risk assessment on crypto-assets bound to keys in wallets, both enterprise-grade wallets and consumer-grade wallets. 1arXiv:2005.14689v1 [cs.CR] 29 May 2020 Contents 1 Introduction 3 2 Virtual Assets, VASPs and the Travel Rule 4 2.1 FATF Recommendations No. 15 and the Travel Rule . . . . . . . . . . . . . . . . . . . 4 2.2 Key Management Con gurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Customer Accounts & Key Ownership Information . . . . . . . . . . . . . . . . . . . . 6 3 Current Challenges in the VASP Industry 8 3.1 A Secure Messaging Network for VASPs . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Synchronization of Customer Information with Transactions . . . . . . . . . . . . . . . 9 3.3 Direct Transactions from Wallets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.4 VASP Transactions to Private Wallets . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.5 On-Boarding and O -Boarding Customers . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.6 Cross-Jurisdiction Asset Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 A Standard Architecture for Attestations 12 4.1 Attestations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 Entities, Roles and Actors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.3 Summary of an Attestation Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5 Wallet Attestations to Support VASPs 17 5.1 Wallet Devices and Trusted Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.2 Basic Wallet Attestation Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.3 Types of Attestation Evidence and Relevance to VASPs . . . . . . . . . . . . . . . . . 21 6 Attestation Services within VASP Trust Networks 23 7 Areas for Innovation 26 8 Conclusions 27 2 1 Introduction The emerging virtual asset service providers (VASP) industry currently faces a number of challenges related to the Travel Rule, notably in connection to customer personal information, account number and cryptographic key information. Given that VASPs will be handling virtual assets of di erent forms, where each may be bound to a di erent private-public key pairs on the blockchain, VASPs also face the additional problem of key management generally. The key management aspects pertain not only to VASPs themselves { as owners of their private-public keys { but also to customers who posses wallets (non-custodial) that hold their private-public keys. Most end-user consumers have never had to \handle" raw keys or own wallets [1]. From the perspective of the Travel Rule the private-public keys in customer wallets become a concern to a VASP when the customer associates their public-key with their account at the VASP, but then use the private-key for direct wallet-to-wallet transactions. In cases where a VASP becomes a custodial of a customer's private-public key, then the VASP must apply the same degree of protection as it does for its own keys. That is, the key management lifecycle [2] must be a core part of the cyber-security strategy of the VASP. The cyber-resilience a VASP's key management infrastructure has an impact on the business of being a VASP, including obtaining insurance for the virtual assets in its possession. Reports of successful hacks on cryptocurrencies [3, 4, 5] has the potential to tarnish the VASP industry as a whole. Thus, a move towards a new decentralized economy [6, 7] brings with it new challenges arising from the need to decentralized computing infrastructures, and the need to understand \trust" through a decentralized lens. The recent FATF Recommendations treats virtual assets as a digital representation of value, and as such is covered under the existing Anti-Money Laundering (AML) regulations and the Travel Rule. This means VASPs must be able to obtain, verify, retain and share respective customer information (originator and bene ciary) in the same manner as existing nancial institutions. This means, among others, personal information, account information, and transactions information. However, as pointed out in [8], in the case of virtual assets on a blockchain, the key-ownership information and key-operator information becomes another aspect of the customer's account that VASPs must manage. This is because virtual assets on blockchains are directly controlled by cryptographic keys, and therefore by the entity who controls the private-public key pair. In this paper, we seek to address technological means to provide the ownership information for private-public keys that are located within a customers wallet device. More speci cally, we explore how attestation technologies as applied to wallet systems can provide VASPs with means to prove operational controls of keys in wallets. The capability to obtain \visibility" into the state of keying material in a wallet device { without revealing the customer's private- keys { provides a good basis for a VASP to perform management (remote management) of the customer wallet. This in turn allows VASPs to address some of the regulatory compliance requirements arising from the Travel Rule. This paper is arranged in the following manner. We discuss the Travel Rule in Section 2, and discuss some of the corresponding challenges to VASPs in Section 3. 3 In Section 4 we review the concept of device attestations in the context of the VASPs and blockchains use-case, as a means to assist a VASP in obtaining better visibility into the internal state of the wallet devices [9, 10]. We review the current e orts in industry relating to the standardization of attestation architectures and evidence conveyance protocols. We discuss the application of device attestations to wallets in Section 5, and explore how com- munities of VASPs arranged in a consortium or \trust network" can use of shared attestation services as a means for VASPs to collectively address some of the challenges arising due to the Travel Rule. In the current work, we seek to make the concepts around device attestations to be more easily understandable and more accessible to the broad readership interested in VASPs, wallets and the virtual assets industry generally. Much of the language describing attestations come from the area of trusted computing, which has been heavily in uenced by the two- decades of the development of the Trusted Platform Module (TPM) chip [11, 12]. As such, we will strive to abstract-up from the various design features of the TPM and focus on the intent of some of these features, narrowing our interest on those features that support attestation and its potential use for VASPs in their ecosystem. Readers interested in details of the TPM are directed to the excellent works of [13, 14, 15]. 2 Virtual Assets, VASPs and the Travel Rule Since the advent of the Bitcoin system in 2008 [16], there has been an ever-growing interest among the general public in the potential use of crypto-currencies (\crypto") and virtual as- sets for decentralized unmediated nancial transaction. One of the key issues in this nascent crypto industry is the need for virtual asset service providers to comply with the various - nancial regulations related to Anti-Money Laundering (AML), terrorism nancing and other banking related regulations. At the international level, the inter-governmental body estab- lished to set the standards and promote the e ective implementation of legal, regulatory and operational measures is the Financial Action Task Force (FATF) [17]. 2.1 FATF Recommendations No. 15 and the Travel Rule A major milestone event in the crypto-currencies industry was the publication of the FATF Recommendation No. 15 in late 2018 which provided a comprehensive de nition the notion ofvirtual Assets and virtual Asset Service Providers (VASP) [18]: •Virtual Asset : A virtual asset is a digital representation of value that can be digitally traded, or transferred, and can be used for payment or investment purposes. Virtual assets do not include digital representations of at currencies, securities and other nancial assets that are already covered elsewhere in the FATF Recommendations. •Virtual Asset Service Providers (VASP): Virtual asset service provider means any nat- ural or legal person who is not covered elsewhere under the Recommendations, and as a business conducts one or more of the following activities or operations for or on 4 behalf of another natural or legal person: (i) exchange between virtual assets and at currencies; (ii) exchange between one or more forms of virtual assets; (iii) transfer of virtual assets; (iv) safekeeping and/or administration of virtual assets or instruments enabling control over virtual assets; and (v) participation in and provision of nancial services related to an issuer's o er and/or sale of a virtual asset. In this context of virtual assets, transfer means to conduct a transaction on behalf of another natural or legal person that moves a virtual asset from one virtual asset address or account to another [18]. One of the main requirements called out in the FATF Recommendation No. 15 and its ac- companying Guidelines document [19] is the mandated need for VASPs to retain information regarding the originator and bene ciaries of virtual asset transfers. That is, a VASP must posses accurate information regarding a customer before aiding that customer in conducting transactions in virtual assets. Another important implication of the Recommendation No. 15 is that cryptocurrency exchanges and related VASPs must be able to share the originator and bene ciary information for virtual asset transactions. This process { also known as the funds Travel Rule { originates from the US Bank Secrecy Act (BSA 31 USC Secs. 5311-5330), which mandates that nancial institutions deliver certain types of information to the next nancial institution when a funds transmittal event involves more than one nancial institution. This rule became e ective in May 1996 and was issued by the U.S. Treasury Department's Financial Crimes Enforcement Network (FinCEN). Other groups of nancial institutions (e.g. Wolfsberg Group [20]) have also tailored their AML principles based on the FATF Recommendations. 2.2 Key Management Con gurations In contrast to traditional banking institutions { which have been operating under the same Travel Rule for over two decades { VASPs today have the additional problem of dealing with cryptographic keys associated with customers. This stems from the fact that virtual assets on a blockchain is directly controlled through the private-public key associated with that virtual asset. For VASPs there are a number of possible models or con gurations with regards the management and use of the private-public key pair used to sign transaction on the blockchain. Two of the con gurations relevant to the current discussion are shown in Figure 1 (see [8] for other variations). In con guration (a) of Figure 1, the customer holds its private-public keys in the cus- tomer's wallet. The Originator-VASP holds a copy of the customer's public key, possibly enveloped within a digital certi cate (e.g. X.509 certi cate [21, 22, 23]). There are at least two ways involving VASPs for a wallet-based key-pair to be used by the originator customer to transfer virtual assets to a bene ciary. In the rst case, the originator creates the signed transaction (addressed to the bene ciary) and delivers to its VASP (Originator-VASP), re- questing the VASP to transmit the virtual asset onto the blockchain. This provides the 5 Figure 1: Two possible VASP cryptographic key management con gurations (after [8]) opportunity for the VASP to perform the relevant Travel Rule veri cations with regards to the destination bene ciary. Thus, technically speaking the VASP acts similar to a forwarding \gateway" that processes \ready-to-transmit" transactions signed by the private-key in the customer wallet. In the second case, the originator customer is the entity actually transmit- ting the transaction (i.e. direct from its wallet). However, before doing so the the originator relies on its VASP to perform the Travel Rule veri cations regarding the destination bene - ciary. Then, once the originator customer obtains permission (\green light") from its VASP, the originator transmits the transaction directly from its wallet. In either of these cases, the Travel Rule applies to the VAPSs, the originator and the bene ciary. In con guration (b) of Figure 1 the customer does not hold any private-public keys or own any wallet. Instead, the customer opens an account at the VASP and all the customer's asset-transactions are dealt with by the VASP. In this approach, the VASP has at least two options with regards key management. In the rst option, the VASP could hold a separate private-public key pair for each customer and employ that key-pair on behalf of the customer when transacting the customer's virtual assets. This approach is often referred to as the key custodial con guration [24]. In the second option, the VASP employs its own private-public key pair to sign all asset-related transactions. In this case various customer assets can be said to be commingled . With commingled assets/accounts, the VASP can batch together multiple transactions from its various customers, thereby reducing the overall cost (fees) of the transaction. 2.3 Customer Accounts & Key Ownership Information Aside from the customer personal or business information, the Travel Rule also requires that nancial institutions and VASPs furnish the account numbers when performing asset 6 transfers. This brings a number of interesting challenges with regards to how \account numbers" are to be realized in the case of virtual assets on the blockchain and how private- public keys are to be associated with accounts. With regards to account numbers, the work of OpenVASP [25] has proposed the estab- lishment of a standardized VASP code for each VASP consisting of the last 32-bits of the public-key of the VASP. Although the proposal is expressed in the context of the Ethereum system [26], the notion of a 32-bit VASP code is generally speaking logical, practical and indeed necessary from a VASP operations point of view. The 32-bit VASP code provides sucient bit-space to uniquely identify up to millions of VASPs in the future. When used in the context of Ethereum, VASPs also have the option of claiming a namespace within the Ethereum Name Service (ENS), and thus allowing the VASPs public-keys (i.e. its customer's public-keys) to be known and discoverable within the ENS context. The proposal of [25] also includes the notion of a unique Virtual Asset Account Number (VAAN) for each customer, where the rst 32-bit of the VAAN number is the VASP code. This proposal is logical and reasonable, and it mimics the familiar bank ABA routing numbers and account numbers. Given that private-public key pairs are the means to control virtual assets, we believe that for compliance to the Travel Rule, VASPs will also need to maintain information regarding the key-pairs of their customers. VASPs most likely will be required to share key-related information or certi cates with other VASPs and nancial institutions involved in virtual asset transfers. Key-related information should be considered as another attribute of the customer account information that is required in order to comply to the Travel Rule. Thus, in the context of the various possible key management con gurations (Section 2.2 and Figure 1), it is useful to distinguish between key-ownership information andkey-operator information [8]. This is particularly important for VASPs from a risk management and assets-insurance perspective [27, 28]. •Key ownership information : This is information pertaining to the legal ownership of cryptographic public-private keys. The traditional mechanism to denote legal ownership is through the registration of the public-key to a Certi cation Authority (CA), and for the CA to issue a public-key certi cate for that key [29]. The certi cate itself is signed by the CA, e ectively making the CA a notary asserting the ownership of the key-pair. The CA itself must be a registered business operating under a service contract (known as the Certi cate Practices Statement). It is worth noting that ability for an entity to prove possession of a private-key { such as exercising the private-key in a challenge-response protocol (e.g. CHAP [30]) or in signing a transaction on the blockchain { does not imply legal ownership of the key. •Key operator information : This is information or evidence pertaining to the legal cus- tody by a VASP of a customer's public-private keys. This information is relevant for VASPs which adopt a key-custodial business model, where the VASP holds and operates the customer's public-private keys to sign transactions on behalf of the customer. Here, the customer legally owns the public-private key-pair, but the customer-authorized legal 7 operator of the key-pair is the VASP. In the next section we review a number of challenges faced by the emerging VASP industry. Some of these challenges are related to the Travel Rule, while others are related to the operational aspects of VASPs and the need for VASP industry to develop and establish new trust infrastructures to support transaction on decentralized blockchain networks. 3 Current Challenges in the VASP Industry Aside from crypto-asset insurance issues, there are currently a number of challenges faced by the VASP community globally. These challenges arise not only because of existing reg- ulations with regards to AML/FT, but also because the of the rapid changes occurring in blockchain and DLT technologies. We brie y discuss some of these issues as a background to the discussion on attestations in the ensuing sections, and later to a discussion on the bene ts of wallet attestations to VASPs and to crypto-asset insurers. In the following we use the term regulated wallet to denote a wallet system (hardware and software) that is in possession of a customer of a supervised (regulated) VASP [31]. The understanding is that the customer's private-public keys are within the wallet device, and that the wallet device is in the possession and under the control of the customer (Figure 1(a)). From the perspective of customer information we use the term \regulated" in the sense of FINMA [31]. This means that the customer is registered at a VASP, owns an account at the VASP, and the VASP is able to ful ll the compliance requirements of the Travel Rule for that customer. We use the term private wallet to denote a wallet system belonging to an unveri ed entity . This implies that in the extreme case the wallet-holder information is unattainable by a VASP, despite the VASP querying other VASPs in the messaging network and querying certi cation authorities (CA) reachable by the VASP. 3.1 A Secure Messaging Network for VASPs The need to exchange customer account information and other private information raises the question regarding the need for a secure messaging network for VASPs [32, 33]. Such a messaging network may or may not be implemented using blockchain technology. How- ever, there are a number of fundamental requirements for such a messaging network. Among others, it must: (i) protect customer/VASP data privacy, (ii) provide secure transport of cus- tomer/VASP information between endpoints, (iii) operate based on the strong identi cation and authentication of VASPs in the network, and (iv) be able to operate independent of any speci c virtual-asset blockchain network, current or future. The need for a secure transport (e.g. SSL/TLS connection) from one VASP to another implies that VASPs will also need to posses private-public keys designated for negotiating the secure transport. It is good security practice to keep the SSL/TLS private-public keys distinct from the private-public keys used by a VASP to sign transactions for the blockchain. 8 Figure 2: The VASP Messaging Network and Blockchain Network Ideally, the SSL/TLS private-public keys should be wrapped in a digital certi cate (e.g. X.509), possibly using Extended Validation (EV) certi cates that carry business information regarding the VASP that owns the EV-Certi cate [34]. Such a messaging network must be able to evolve and persist over the next few decades, independent of (but informed by) the technological advancements in blockchains. It must allow a community of VASPs to exchange information pertinent to the Travel Rule, for any type of virtual asset transfers (e.g. crypto-currencies, tokenized assets, etc) on current and future blockchain systems. Figure 2 provides a high level illustration of a VASP messaging network, shown to be logically separate from the virtual asset blockchain. Figure 3 illustrates a possible layered architecture for the VASP messaging network. In Figure 2 the Originator (Bene ciary) customer is assumed to have a business relation- ship (e.g. account) with the Originator-VASP (Bene ciary-VASP). This is shown as (A) and (B). The VASP messaging network is denoted as (C) and (D), where the Originator-VASP can securely transmit the originator customer information to the Bene ciary-VASP in (C), and vice versa in (D). E orts are currently underway to develop such a messaging network and the related trust infrastructures (e.g. certi cates, decentralized directories) to support VASPs in complying to the various aspects of the Travel Rule (see [33, 25]). A standard customer information model has recently been developed [35] that would allow VASPs to interoperate with each other with semantic consistency when exchanging customer data. 3.2 Synchronization of Customer Information with Transactions The Travel Rule requires VASPs to \synchronize" (track or correlate) between transactions on the virtual assets blockchain with customer information. More speci cally, this means that both the Originator-VASP and the Bene ciary-VASP must account for every customer trans- 9 Figure 3: A layered architecture for the VASP Messaging Network action, and correlate transaction-related information to the correct originator and bene ciary respectively. Related to this is the question of customer data privacy [36]. Every instance of the exchange of customer information must be driven by (pertain to) transactions from the customers. The corollary is that VASPs are not permitted to exchange customer-related information outside the context of a customer transaction. This introduces a number of complications for VASPs with regards to the latency in the completion of customer transactions. A given VASP may need to delay the transmission of customer transaction until the relevant Travel Rule information (ie. regarding the bene ciary) has been obtained and veri ed. This requirement is bi-directional or mutual between VASPs. This means that the Bene ciary-VASP must also obtain and verify the originator customer information (e.g. from the Originator-VASP) before accepting transfers of virtual assets from the originator or its Originator-VASP. Such delays may be deemed to be \disappointing" by customers accustomed to media crypto-hype [37, 38]. Solving this challenge is bene cial for all VASPs around the world, but will require corporation among competing VASPs. 3.3 Direct Transactions from Wallets One of the dilemmas faced by VASPs is the desired (demand) on the part of customers to perform direct transactions from the customer's wallet (i.e. peer-to-peer). This is illus- trated in Figure 2 in ow (3a) and ow (3b). This demand can be addressed if both wallets (originator and bene ciary) are regulated wallets respectively. However, the dilemma arises when only the originator wallet is regulated, and the bene ciary information is not veri able immediately by the Originator-VASP. One possible solution is for VASPs to permit (pre-authorize) customers with regulated- wallets to transact up to a maximum daily limit as de ned by local regulations (e.g. $3K per 10 day). The Originator-VASP must then perform the veri cation of the bene ciary information after the transaction has been con rmed on the blockchain. The task of post-event veri cation would be made easier if the bene ciary is found to be associated with a Bene ciary-VASP. This limited pre-authorized solution could be tightly integrated into user authentica- tion/authorization Single Sign-On (SSO) protocol [39, 40, 41] via the customer's wallet. When a customer seeks to perform a direct transaction from its wallet, the customer/user would need to perform SSO (using the user's wallet) to the authorization service of the VASP, which should just take a few seconds. This process essentially provides a mechanism for the wallet to notify the VASP authorization server that the wallet will soon be transmitting a transaction in a direct P2P fashion to a bene ciary wallet. The SSO event provides a window of time for the VASP to verify whether the bene ciary is a known entity to the VASP (e.g. previously transacted from the customer) and whether a Bene ciary-VASP can be located corresponding to the bene ciary wallet holder. More sophisticated solutions may be devised based on well-known database transaction processing principles, such as the 2-Phase Commit (2PC) protocol [42, 43]. However, this topic is out of scope for the current work. 3.4 VASP Transactions to Private Wallets Another acute problem pertains to cases where an originator customer of a regulated VASP requests asset transfers to an address (public-key) of a private wallet. This is shown as ow (2a) and ow (2b) in Figure 2. The originator customer may only have informal and incomplete information regarding the bene ciary holder of the private wallet (i.e. either a person or an organization). The challenge, therefore, becomes one in which the Originator-VASP needs to seek information at other VASPs regarding that destination address. Indeed, this is one of the main reasons VASPs need to create a trust network or industry consortium operating under a legal trust framework (see [8]). E orts such as TRISA [33] are aimed at solving this dilemma, based on discovery protocols as well as VASP-level federated directories. The problem also has data privacy dimension [36]. A remote VASP located in a di erent jurisdiction may have veri ed information regarding holder of a private wallet or address. However, that remote VASP may be prohibited (e.g. under local data privacy regulations) from disclosing knowledge of the owner of a given address or public-key. As such, the remote VASP maybe prohibited from even responding to the query. 3.5 On-Boarding and O -Boarding Customers There are a number of challenges related to the on-boarding of a customer possessing a wallet. In the case that the customer wallet is regulated (i.e. previously known to another regulated VASP), then there are a number of practical issues that the acquiring VASP needs to face. These include: (i) validating whether prior to on-boarding the wallet was regulated or private; (ii) validating that the keys present within the wallet corresponds to the customer's historical 11 transactions (con rmed on the blockchain); (iii) verifying whether a backup/migration of the wallet has occurred in the past; (iv) determining whether the customer's assets should be moved to new keys, and if so, how the \old" keys will be archived; and so on. In the case where the customer's wallet is private, then the VASP may choose to require the customer to create a separate instance of the wallet application within the device, as- sociated with the VASP. This provides a way for the VASP to be responsible only for the \regulated partition" of the wallet while allowing the customer to retain the private portions of the wallet. Trusted Execution Environment (TEE) technologies such as Intel SGX [44, 45] may provide a way to achieve this partition, and at the same time provide evidence regarding the partition on the wallet device which is under the Travel Rule responsibility of the VASP. The case of a customer leaving a VASP also introduces a number of questions that may be relevant under the Travel Rule. The releasing VASP may need to address various question, including: (i) preparing evidence that the wallet was in a regulated state whilst the owner of the wallet was a customer of the VASP; (ii) whether the customer's assets should be moved to a temporary set of keys, denoting the end of the VASP's responsibilities for the customer under the Travel Rule; (iii) obtaining evidence from the wallet that the \old" keys (non-migrateable keys) have been erased from the wallet device, thereby rendering the keys unusable in the future by the customer; and so on. 3.6 Cross-Jurisdiction Asset Transfers Within certain jurisdictions the operational requirements may be more stringent. For ex- ample, in Switzerland the FINMA ordinance on Anti-Money Laundering (AMLO) makes it unambiguously clear that no exception is permitted for payments (i.e. virtual asset transfers) involving \unregulated wallet providers" [46]. This rule, among others, is to prevent (reduce) problems faced by supervised providers (i.e. VASPs) in cases where it has to deal with virtual asset transfers from an unregulated wallet provider. This brings into focus the challenge of how virtual asset transfers will occur between two VASPs where each are operating under di erent jurisdictions with di erent levels of stringencies. Furthermore, as long as an institution (i.e. VASP) supervised by FINMA is not able to send and receive the customer information required in payment transactions, such transactions are only permitted between wallets of the institution's own customers. Relevant to the current work on attestations is the requirement in FINMA that the ownership of a wallet be proven using \suitable technical means" [31]. 4 A Standard Architecture for Attestations Recently, the notion of attestations has have garnered interest within di erent technical standards organizations and industry consortiums, beyond the TCG alliance (e.g. FIDO Alliance [47], Global-Platform [48], IETF [49]). Despite the notion of device attestations nearing two-decades in age [50], the concepts around attestations { such as endorsements, validations and freshness { are just recently coming into wider attention in the broader 12 Figure 4: Overview of the concept of the Attester and Attesting Environment industry. The hope is that a canonical attestation architecture will allow standards to be developed that implement the various protocols and ows for relevant sectors and products (routers and network equipment [51, 52], mobile devices [48], cloud stacks [53], etc). By having a common reference architecture, di erent e orts can share common terminologies, concepts and implementations and therefore a ect a reduction in costs of developing and deploying the infrastructures supporting cyber-resilience and trustworthy computing generally. 4.1 Attestations The fundamental idea of attestations of a \thing" (e.g. a computing device) is that of the conveyance of truthful information regarding the (internal) state of the thing being attested to. In the related literature on trustworthy computing the term \measurement" is used to mean the act of collecting (introspecting) claims or assertions about the internal state, and delivering these claims as evidence to an external party or entity for automated review and security assessment. However, as we know today computing environments can be structurally complex and may consist of multiple elements (e.g. memory, CPU, storage, networking, rmware, software), and computational elements can be linked and composed to form computational pipelines, arrays and networks. Thus, the dilemma is that not every computational element can be expected to be capable of attestation. Furthermore, attestation-capable elements may not be capable of attesting every computing element with which it interacts. The attestation capability could in fact be a computing environment itself (Figure 4). The act of monitoring trustworthiness attributes, collecting them into an interoperable format, integrity protecting, authenticating and conveying them requires a computing environment { one that should be separate from the one being attested. Figure 4 illustrates the recognition of this distinc- tion, namely of the target environment being attested to, and the attesting environment that 13 Figure 5: Canonical architecture for attestations (after [55, 56, 57]) performs the work stated above1. The complexity of the problem has led to a number of e orts in industry to de ne an attestation architecture that incorporates some of these key concepts { such as the concept of the root-of-trust { and to develop standards that implement attestation concepts [54, 49]. The roles and functions of the attestation architecture is shown in Figure 4. In a nutshell, in Figure 4 an attester conveys evidence of trustworthiness (of the attested target environment) to a veri er entity. The veri er operates based on policies that are supplied by the owner of the veri er. 4.2 Entities, Roles and Actors The attestation architecture of [55] de nes of a set of roles that implement attestation ows. Roles are hosted by actors , where actors are deployment entities. Di erent deployment models may coalesce or separate various actor components and may call for di ering attestation conveyance mechanisms. However, di erent deployment models do not fundamentally modify attestation roles, the responsibilities of each role, nor the information that ows between them. In the following sections, we may use the actor and role terminology interchangeably when appropriate in order to simplify discussion (see Figure 5). •Attester : The Attester (e.g. target device) provides attestation Evidence to a Veri er. The Attester must have an attestation identity that is used to authenticate the conveyed Evidence and establishes an attestation endpoint context. The attestation identity is often established as part of a manufacturing process that embeds identity credentials in the entity that implements an Attester. 1An example of an attesting environment is the Quoting Enclave within Intel SGX [44, 45]. 14 •Veri er : The Veri er accepts Endorsements (from Endorsers) and Evidence (from the Attester) then conveys Attestation Results to one or more Relying Parties. The Veri er must evaluate the received Endorsements and Evidences against the internal appraisal policies chosen or con gured by the owner of the Veri er [57]. The Attestation Service Provider (ASP) is typically the actor which implements the Veri er role. An example of the ASP role is described in [58]. •Relying Party : The Relying Party (RP) role is implemented by a resource manager that accepts Attestation Results from a Veri er. The Relying Party trusts the Veri er to correctly evaluate attestation Evidence and Policies, and to produce a correct Attesta- tion Result . Thus, we assume that the RP and the Veri er has a business relationship or some other basis for trusting one another. The Relying Party may further evaluate Attestation Results according to Policies it may receive from an Owner. The Relying Party may take actions based on the evaluation of the Attestation Results. •Endorser : An Endorser role is typically implemented by a supply chain entity that cre- ates reference Endorsements (i.e., claims, values or measurements that are known to be authentic). Endorsements contain assertions about the device's intrinsic trustworthi- ness and correctness properties. Endorsers implement manufacturing, productization, or other techniques that establish the trustworthiness properties of the Attesting Envi- ronment. This is shown as ows (a) and (b) in Figure 5. •Owner of Veri er : The Veri er Owner role has policy oversight for the Veri er. It generates Appraisal Policy for Evidence and conveys the policy to the Veri er. The Veri er Owner sets policy for acceptable (or unacceptable) Evidence and Endorsements that may be supplied by Attesters and Endorsers respectively. The policies determine the trustworthiness state of the Attester and how best to rep- resent the state to Relying Parties in the form of Attestation Results. The Veri er Owner manages Endorsements supplied by Endorsers and may maintain a database of acceptable and/or unacceptable Endorsements. The Veri er Owner authenticates Ver- i ers and maintains lists of trustworthy Endorsers, peer Veri ers and Relying Parties with which the Veri er might interact. •Owner of Relying Party : The Relying Party (RP) Owner role has policy oversight for the Relying Party (RP). The RP-Owner sets appraisal policy regarding acceptable (or unacceptable) Attesta- tion Results about an Attester that was produced by a Veri er. The RP-Owner sets appraisal policies on the Relying Party that authorizes use of Attestation Results in the context of the relevant services, management consoles, network equipment, an en- forcement policies used by the Relying Party. The Relying Party Owner authenticates the Relying Party and maintains lists of trustworthy Veri ers and peer Relying Parties with which the Relying Party might interact. 15 •Evidence : The Attestation Evidence is a role message containing assertions from the Attester role. Evidence should have freshness and recentness claims that help establish Evidence relevance. For example, a Veri er supplies a nonce that can be included with the Evidence supplied by the Attester. Evidence typically describes the state of the device or entity. Normally, Evidence is collected in response to a request (e.g. challenge from Veri er). Evidence may also describe historical device states (e.g. the state of the Attester during initial boot). It may also describe operational states that are dynamic and likely to change from one request to the next. Attestation protocols may be helpful in providing timing context for correct evaluation of Evidence that is highly dynamic. •Endorsements : Endorsement structures contain reference Claims that are signed by an entity performing the Endorser role (e.g. supply-chain entity or manufacturer of the target device). Endorsements are reference values that may be used by Owners to form attestation Policies. Some endorsements may be considered \intrinsic" in that they convey static trust- worthiness properties relating to a given actor (e.g., device, environment, component, TCB, layer, RoT, or entity). These may exist as part of the design, implementation, validation and manufacture of that actor implementation. An Endorser (e.g. manufacturer) may assert immutable and intrinsic claims in its Endorsements, which then allows the Veri er to carry-out appraisal of the Attester (e.g. device) without requiring Attester reporting beyond simple authentication. 4.3 Summary of an Attestation Event Figure 5 illustrates the canonical attestation model. When an Attester (e.g. target device) seeks to perform an action at the Relying Party (e.g. access resources or services controlled by the Relying Party) the Attester must rst be evaluated by the Veri er. Among its inputs, the Veri er obtains endorsements from the Endorser (e.g. device manufacturer) in ow (a) of Figure 5. Prior to allowing any entity to be evaluated by the Veri er, the Owner of the Veri er must rst con gure a number of appraisal policies into the Veri er for evaluating Evidences. The policies are use-case speci c but may require other information about the Attester (or User) to be furnished to the Veri er. This is shown in Step 1 of Figure 5. Similarly, in Step 2 the owner of the Relying Party (e.g. resource or service) must con gure a number of Appraisal Policies for Attestation Results into the Relying Party. When the Attester requests access to the resources at the Relying Party (Step 3), it will be redirected to the Veri er (Step 4) { the understanding being that the Attester must deliver attestation Evidence to the Veri er. Included here are the endorsement(s) that the Attester obtained previously from the Endorser ( ow(b) of Figure 5). The ow represented by Step 3 may be multi-round and may include a nonce challenge that the Attester must include in its computation of the Evidence as a means to establish freshness. 16 After veri cation and appraisal of the Attester completes, the Veri er delivers the Attes- tation Result to the Relying Party in Step 5. The Relying Party in its turn must evaluate the Result against its own policies (set previously in Step 2). If the Relying Party is satis ed with its evaluation of the Attestation Result regarding the Attester, it will provide the Attester with permission to complete the action it seeks to perform (e.g. access resources at the RP). 5 Wallet Attestations to Support VASPs Following from the previous discussion regarding the emerging standard architecture for attestations, we explore the application of the attestation architecture for the case of wallet devices. We consider the potential bene ts of wallet attestations for VASPs, notably in the context of regulated wallets. Readers interested in the application of attestations to nodes (i.e. mining nodes [16], validator nodes [26]) are directed the work of [59]. In the current work we use the generic term wallet device to encompass both the hardware and software of the wallet system (see the NIST de nition of wallets in [60]). Furthermore, we use the term broadly to mean wallet systems located within consumer electronic devices (e.g. mobile devices, smartphones, PC computers, etc.) as well as Enterprise-grade key management systems deployed within organizations [2]. Thus, as will be seen, attestation capabilities should be used by wallets regardless of their portability factor (i.e. smartphones) or legal ownership (i.e. individuals or organizations). The need to protect keys has been a requirement since the emergence of digital cryptog- raphy. The need for key protection capabilities expanded with the adoption of public-key cryptography [61] into the mainstream computing and networking industry. In the late 1990s the demand for key protection capabilities in industry emerged with the rise of the Certi ca- tion Authorities (CA) business model. The high-cost of Hardware Security Module (HSM) cards in the late 1990s meant that only CAs and corporate buyers could a ord these HSM cards. The e ort to produce a low-cost trusted hardware chip commenced in 1999 with the formation of the Trusted Computing Platform Alliance (TCPA), which was subsequently renamed the Trusted Computing Group (TCG) [62]. The goal of the TCG was to develop a trusted hardware speci cations that permitted the hardware to be manufactured at very low cost (e.g. less than a couple of dollars). The cost had to be extremely low { compared with HSM cards, that could cost several hundred dollars per card { because the initial targeted market segment was the PC computer market (i.e. PC OEMs), which is a very cost-sensitive segment of the market. At the same time, Smart Cards [63] were under development and was targeted primarily for the newly emerging mobile phone market. Thus the TCG trusted hardware must also be below the cost of smart cards. The speci cations for trusted hardware from the TCG alliance was called the Trusted Platform Module (TPM), with the hardware version 1.2 becoming available in the 2004- 2005 timeframe. Wide deployment of the TPMv1.2 begun in 2006, notably with the new purchase requirements from the U.S. Army. More speci cally, in February 2006 the U.S. 17 Figure 6: High-level illustration of device key hierarchy Army Small Computer Program published a new Consolidated Buy-2 (CB2) Desktop and Notebook minimum speci cations for Army customers. The Army's new speci cation requires desktop and laptop personal computers be equipped with the new TPM (v1.2) hardware. This event represented a milestone in the adoption of trusted computing standards. It is fair to say that the notion of \attestations" and device \measurements" originated from the TCPA/TCG alliance, whose members in the early 2000s were grappling with the very hard problem of de ning technical trust (i.e. trust derived from technical means) [50, 13]. Being able to truthfully prove or attest as to the system state was considered core to the de nition and value-proposition of trusted computing. Unlike HSM cards and Smart Cards, one of the main driving use-cases for the TPM hardware was to protect the PC computer, such as protecting the PC computer through its boot-up sequence (e.g. secure boot). Thus, the idea is that with the aid of a low-cost well-designed hardware (i.e. the TPM) that was soldered to the motherboard, the computer should be able to report (or attest) about its boot-up sequence. Other applications in the PC context included encrypting les/folders and self-encrypting disk-drives [64, 65]. 5.1 Wallet Devices and Trusted Hardware There are several features of trusted hardware that make it attractive for use in the virtual assets industry [66]: •Cryptographic engine, protected storage and tamper-resistance : Current trusted hard- ware typically contains a cryptographic processor which implements a number of rudi- mentary functions related to cryptography. Examples include encryption (symmetric key), digital signatures, hash functions and key-generation. Trusted hardware typically possess protected storage for securing keys during system use, and when shutdown. 18 Tamper-resistance in trusted hardware provides protection against forced exportation of cryptographic keys (up to a point). A number of trusted hardware implementation may provide an auto-erasure of keys should physical tampering occur to sensitive parts in the interior of the hardware. As such, the value of the asset being protected by the keys should be measured against the approximate cost of attacking the hardware. •Hardware-bound and non-migratable keys : A core feature of trusted hardware such as the TPM is the ability of certain types of cryptographic keys to be generated inside the hardware, and for internal key hierarchies to be established. Using the example of the TPM, certain types of keys can be designated as non-migrateable at creation time, meaning that the key is bound to that single TPM and that it can not be migrated or exported from the TPM (see Figure 6 (a) and (b)). The use of non-migratable keys are advantageous when addressing the need to prevent the copying of keys. It is important to note that non-migrateable private-public key pairs can be used to uniquely identify the device (i.e. using the public key) [11, 67]. Mechanism to provide privacy to these keys/hardwares have also been created (see [68, 69]). •Application-level keys linked to non-migratable keys : Certain types of keys generated inside the trusted hardware can be designated to be accessible to application softwares. Thus, for the use-case of virtual assets transfers, one or more key-pairs maybe generated and stored inside the trusted hardware and be invoked to sign transactions for the blockchain. The public-key of such key-pairs can be copied to locations external to the hardware, allowing certi cates to be created for that public-key. A non-migratable key can be used internally to \certify" the application-level keys (Figure 6 (c) and (d)), thereby providing a provenance link to the non-migratable key (and therefore to trusted hardware). This feature maybe useful in attestation cases where the user has to prove the origins of an application-level key-pair. Typically, application-level keys can be designated to be migrateable at creation time, allowing the key-pair to me migrated (or backed-up) to a new compatible trusted hardware using a secure key migration protocol [70]. •Hardware-based attestations : Certain types of trusted hardware support the truthful reporting of one or more of its internal state variables, signed using a reporting-key that is derived from a non-migratable key. This capability permits an external entity to query the trusted hardware regarding attributes, including internal possession of keys (i.e. private-keys), without revealing the keys. Common examples of trusted hardware that posses some or all of the above features include the Trusted Platform Module (TPM) hardware (version 1.2 [11] and version 2.0 [12]), and the ARM TrustZone [71]. 19 Figure 7: Wallet attestation ows 5.2 Basic Wallet Attestation Flows Following from Figure 5, the roles/entities within the wallet attestation ows are as follows (see Figure 7): •Appraisal policies de ned by VASP : The wallet's attributes of interest to the VASP can be determined by the VASP con guring the relevant appraisal policies at the ASP (Step 1). This drives the ASP to request evidences from the wallet device as appropriate to the con gured policies. In the case that the VASP belongs to a consortium of VASPs (Section 6) then additional consortium-level policies may also be con gured at the ASP (Step 2). •Wallet as Attester : The target device being evaluated in this case is the wallet hardware, as a result of the customer seeking to perform a transaction (Step 3). The wallet is expected to provide evidence (Step 4), among others, regarding its installed hardware, software and rmware. •The ASP as Veri er : The function of the veri er is represented as the ASP, which could be a service owned and operated by the VASP, by a VASP consortium, or by a trusted third party. 20 •The VASP as the Relying Party : The relying party in Figure 7 is the VASP itself. In the regulated-wallet scenario where the VASPs customers posses wallet devices with trusted hardware, one goal of the VASP is to obtain attestation-evidence from these devices. Step 5 illustrates the ASP yielding the attestations results to the VASP as the relying party. 5.3 Types of Attestation Evidence and Relevance to VASPs The evidence reportable by trusted hardware depends largely on the capabilities of the trusted hardware and the surrounding system implementing the crypto-wallet functionality. In gen- eral there are a number of system attributes reportable from a wallet that may complement the customer information in the context of the Travel Rule. With regards to key-ownership information and key-operator information (Section 2.3), attestations technologies allows a VASP to obtain truthful (unforgeable) information from the wallet, such as: (i) howa key- pair was created (e.g. generated onboard, or injected from outside), (ii) where it was created (e.g. under shielded storage), and (iii) the current location of the key-pair (e.g. geolocation of wallet). The following is a non-exhaustive list of some of the possible wallet and key information that can be obtained using attestations: •Key creation provenance : Most (if not all) current generation crypto-processor trusted hardware have the capability to create/generate a new private-public key pairs inside the protected/shielded location of the hardware, and to maintain keys inside its long- term non-volatile protected storage. Furthermore, evidence regarding this process can be yielded by the trusted hardware, allowing the provenance of such keys to be asserted. Key-provenance evidence is useful for VASPs in many use-case scenarios. For example, in the case of a newly on-boarded customer with a wallet, the VASP may wish to ascertain the provenance of the existing customer transaction signing key-pair found in the wallet. If the provenance of the existing key-pair in the wallet is unveri able, then the VASP may require the customer (i.e. wallet) to generate a new key-pair inside the wallet. This, in turn, provides the VASP with a clear line of responsibility and accountability under the Travel Rule with regards to customer-originated transactions. The VASP has exculpatory evidence regarding the on-boarding of the new customer and the start of use of the new key-pair. •Key-type evidence and key loss recovery : As mentioned previously, some crypto-processor trusted hardware (e.g. TPMv1.2 and TPM2.0) support the creation of non-migratable keys (Figure 6). A VASP may request periodic attestation-evidences from its cus- tomers' wallets regarding the type of the transaction signing key-pair(s) currently in use (e.g. whether private-key non-migratable). The VASP may also require these non-migratable keys to be backed-up to a secure storage location at the VASP, using 21 a secure backup/migration protocol appropriate for the trusted hardware in the wal- let [70]. This migration \blob" is typically cryptographically sealed in that it can only be installed onto a new equivalent trusted hardware under the customer's authoriza- tion (e.g. migration password). The combined use of key-type evidence and key backup procedure allows VASPs to more e ectively handle emergency cases (e.g. perceived loss of private-key, actual loss of wallet device, etc.). For example, if a wallet device is lost/stolen and the VASP has recent attestation- evidence that the transaction key is non-migratable, then this gives the VASP some time to carry out emergency measures (i.e. assuming it will take some time for the thieves to crack the the tamper-resistance of trusted hardware). Such emergency procedures, for example, could mean: (i) recovering the sealed migration keys (i.e. migration \blob") from the VASP backup storage into a new wallet device with the same/equivalent trusted hardware; (ii) activation of trusted hardware and the a ected certi ed transaction signing key-pair; (iii) moving all asset on the blockchain from that a ected public-key (address) to a new temporary private-public key-pair (e.g. owned by the VASP). Aside from providing crucial customer service in times of emergency, the VASP will also obtain sucient technical evidence to justify this customer emergency asset transfer should the VASP be queried under the Travel Rule (e.g. why large amounts of assets moved from a customer address to the VASP address). •Evidence of signature-origin of transactions on the blockchain : Related to the key cre- ation provenance and key-type, the use of a hardware-bound private-key to sign trans- actions permits the device-origin of that transaction to be ascertained. This kind of evidence may be important in scenarios in which the VASP needs proof that a set of con rmed transactions on the blockchain originated from the speci c device belonging to one of its customers. •Evidence of geolocation of wallet : VASPs can obtain evidence regarding the geolocation of a wallet device, and therefore evidence regarding the geolocation of the hardware- bound keys in the wallet. This may provide a means for VASPs to enforce geolocation- related policies for customers to ensure that the VASPs customers are operating within the permissible jurisdiction (e.g. customer wallet must be in-country to sign transac- tions). For example, the work of [72] includes the ability to report location coordinates (lati- tude, longitude and altitude) of the attester device. In turn, this can be reinforced with geo-fence policies relevant to the speci c deployment scenario. •Key usage sequence : VASPs can also make use of a number built-in features of trusted hardware via the application software (e.g. mobile app) on the wallet. For example, the application can use the underlying trusted hardware to maintain a sequential history of the objects (transactions) signed using the private key inside the trusted hardware (e.g. 22 in the TPM using the hash-extend operation with the PCR registers and monotonic counter [11, 12]). For a VASP, this feature allows the VASP to perform an accurate accounting as to which order transactions were signed by the wallet system, as compared to the order in which the transactions were processed (i.e. con rmed) on the blockchain, and whether any transactions were lost (e.g. transmitted from the wallet, but never reaching the unprocessed-pool (UTXO model [16]), etc.). •Evidence of wallet system con gurations : Attestation technologies allows a VASP to obtain visibility into the components (hardware, software and rmware) of the wallets of its customers. Although this may appear to be intrusive, this has the advantage of allowing the VASP to advise (or require) customers to replace a weak wallet system with a stronger system. More broadly, this allows VASPs to o er remote device-manageability services to its customers, including continuous monitoring of the system health of the wallets. System health monitoring and reporting has been deployed in the Enterprise networking industry for sometime now [73]. Examples include Microsoft's NAP [74], NAC from Cisco [75] and the TNC from the TCG [76, 77]. Figure 6 provides a high level illustration of a simple key-hierarchy inside the trusted hard- ware of a wallet system. A given device platform may ship with one or more of manufacturer installed keys. This is shown as the Device Identity Key in Figure 6 (a). Examples include the manufacturer Endorsement Key (EK) in the TPM [78], the DeviceID key in routers [67, 52] and the Secret Device Key in server chassis/hardware [79, 80]. A corresponding certi cate may be issued by the manufacturer (Figure 6 (e)). The customer's transaction signing key-pair (d) may be derived from the non-migrateable device identity key (b). This generational-link between the key (d) to key (b) and to key (a) in Figure 6 allows the attestation process to discover this link and report it as evidence to the VASP. Finally, in Figure 6 (f) the VASP could issue an X.509 certi cate for the customer's transaction public-key. The VASP can be the issuing CA, or the VASP can outsource this function to a commercial CA (see [8] for a discussion of VASPs and CAs). The resulting customer X.509 certi cate could bear some markings (i.e. speci c elds or tags) indicating that the provenance of the public-key is known to the issuing VASP. This allows other VASPs and their customers (bene ciaries) to obtain some degree of con dence regarding the signing key and the wallet system employed by the originator customer. 6 Attestation Services within VASP Trust Networks In order to begin solving the various issues around the Travel Rule and the challenges in obtaining originator/bene ciary customer information, the nascent VASP industry should establish VASP trust networks or interconnected communities in a manner similar to the 23 Figure 8: Attestation network for VASP consortiums ISP communities on the Internet [8]. The term \trust network" is used here to denote a community of VASPs (e.g. regional level or national level) that has come together in a consortium arrangement to collaborate under a common legal trust framework (system rules de nition) for all its membership. As an industry consortium, the members of the VASP trust network would then de ne the technical speci cations and pro les that would need to be adopted by all members of the consortium. This ensures a high degree of functional interoperability within the community of VASPs. As part of the service de nition of the VASP trust network, the following services maybe useful to consider in the context of wallet attestations (Figure 8): •Common baseline appraisal policies : The VASP community should develop a set of baseline policies for the appraisal of wallet systems used in the community. This may include appraisal policies speci c for customer wallets (consumer-grade), and also ap- praisal policies for a VASPs key management system, which could be an enterprise- grade system built also using trusted hardware. Figure 8(a) illustrates the notion of a consortium-level appraisal policies. •Common device con guration manifests : The community of VASPs should de ne a number of approved wallet device con gurations (hardware, software, rmware) in order to allow their customer to obtain one of the approved con gurations. These approved con guration as de ned by their manufacturer is also known as reference manifests [81, 82]. For each device con guration, a matching set of appraisal policies should be created by the consortium and be made accessible to all VASP members. •Shared attestation veri cation service : The consortium as a community should provide attestation veri cation services. This is illustrated in Figure 8(b). These are also referred to as Attestation Service Providers (ASP) for the community (see Section 4.2). The work of [58] points to an example of an ASP service in the cloud. 24 Figure 9: Cross-VASP attestation appraisals •Shared integration model for customer single sign-on : All VASPs should seek to ensure good customer experiences, with minimal friction across a variety of wallet application softwares (e.g. mobile app, dekstop app, browsers, etc). To this end, the VASP community should harmonize the various single sign-on (SSO) protocols and ows, across the various approved types of wallet devices and applications. Several identity management and SSO protocols have been standardized over the past two decades (e.g. SAML2.0 [39, 83], OAuth2.0 [84], OpenID-Connect [85]). •Cross-VASP attestation veri cations : A given VASP should posses its own attestation veri cation system distinct from the consortium's shared attestation veri cation service. This is illustrated in Figure 8(d)-(e). The goal is to allow a VASP to perform appraisals of evidences conveyed by the wallet trusted hardware belonging to a customer of a di erent VASP (within the consortium). Having this capability, the VASP should then be open to appraising evidences from regulated wallets belonging to customers of non-member VASPs, and even private- wallets of holders seeking to be on-boarded as new customers. The notion of Cross-VASP attestation appraisals is summarized in Figure 9. Here, an orig- inator customer of VASP1 holding a regulated wallet with trusted hardware seeks to perform a direct transaction with a bene ciary entity who is customer of VASP2. Both VASP1 and VASP2 are members of the trust network consortium. This is shown as Step (1) of Figure 9. The wallet of the originator is referred to as Attester A, while the wallet of the bene ciary is referred to as Attester B. Upon request from VASP1, the bene ciary (Attester B) generates attestation-evidence in Step (2a) and conveys it to the Veri er (ASP) within VASP1. If both the wallets of the originator and the bene ciary complies to the appraisal policies of VASP1, the originator is then given authorization from VASP1 to transact directly with the 25 bene ciary (Step (3)). Alternatively, the VASP1 may require the bene ciary (Attester B) to convey its attestation-evidence to the consortium's ASP, as shown in Step (2b). 7 Areas for Innovation There are a number of potential areas of innovation for the newly emerging VASP industry. Related to the topic of device attestations and trusted hardware for wallets, Some of these are as follows •Wallet Levels of Assurance : Similar to the notion of Levels of Assurance (LOA) of authentication events de ned by NIST [86, 87, 88], a VASP trust network consortium could de ne a number of levels assurance as a function of the wallet condition and other key management aspects. Today the highest level (Level 4) achievable in the NIST scheme [86] is one in which a remote network authentication event employs cryp- tographic hardware. For example, a VASP consortium could recognize a number of di erent types of wallets (e.g. client software, browser plugins, etc.), the types of acceptable trusted hardware, user biometric authentication to the wallet device, and so on, and use these as input into the wallet LOA matrix. Using attestations, wallets could convey evidence to the ASP Service of the VASP consortium in order to obtain a wallet LOA assignment. In turn, this provides some basis for the insurance industry to begin risk assessment of crypto-asset, wallets and VASPs. •Wallet LOA for Crypto-Asset Insurance : There is interest in the insurance industry to provide insurance services to crypto-funds [28]. However, the insurance industry will need some technically measurable representation of \trust" in the VASP management of cryptographic keys. We believe it is insucient for VASPs to describe (e.g. in a document) the type of trusted hardware employed by a VASP and employed by the VASP's customer-wallets. Instead, attestations evidences should be yielded directly by the wallets (both enterprise-grade and consumer-grade wallets). Wallet attestations maybe able to provide insurers with strong evidence regarding the internal state of the trusted hardware, the keying material protected by the trusted hardware, and other aspects of the wallet system. Crypto-asset insurers may choose to operate its own evidence veri cation service (e.g. ASP service) in order to be able to obtain an independent attestation-result evaluation. •VASP Consortium Repository of Approved Software and Firmware : Related to the attestation of wallet devices, the VASP trust network consortium could maintain a repository of software, rmware and patches for the various approved wallet devices in it ecosystem. This could be done in collaboration with the various software vendors and hardware manufacturers in the wallet space. 26 Such a repository would assist VASPs in the on-boarding of new customers, by (i) re- quiring new customers to obtain one of the devices and con gurations approved by the VASP trust network consortium, and (ii) by ensuring that these customer devices sub- sequently install only known good software, rmware and patches from the consortium's repository. •VASP certi cate pro le for wallet non-migrateable keys : The VASP trust network con- sortium could develop a certi cate pro le for transaction signing public-keys that are provably non-migrateable. The X.509 certi cate for a transaction public-key (non-migrateable private-key) could bear some markings that conveys assurance to the recipient that the corresponding private-key was bound to a trusted hardware. In turn, this may increase con dence in the counter-party in dealing with the customer wilding the wallet associated with the X.509 certi cate. 8 Conclusions Today there is a great opportunity for VASPs to shape and in uence the development of future wallets systems with features, such as attestations, that would aid VASPs in complying to the the Travel Rule and help in the manageability of customer wallets. The ability for a VASP to obtain unforgeable evidence from a wallet system regarding the provenance of keys, as well as their usage and location, provides the VASP with additional means to address the problem of the synchronization between transaction on the blockchains and the account information required by the Travel Rule. Wallet attestations maybe able to provide crypto-funds insurers with strong evidence regarding the key management aspects of a wallet device, thereby providing the insurance industry with measurable levels of assurance that can become the basis for insurers to perform risk management about a crypto-asset. Looking more broadly, if virtual assets and blockchain technology are going to become a fundamental building block of the new economy then infrastructures that support the estab- lishment of trust between counter-parties will need to be developed and deployed. Because VASPs are the primary touch-points with users seeking to transact in virtual assets, this means that deploying trust-infrastructures will be largely the task of VASPs and the VASP communities globally. 27 References [1] L. H. Newman, \Cryptocurrency Hardware Wallets Can Get Hacked Too," Wired Mag- azine , May 2020, https://www.wired.com/story/cryptocurrency-hardware-wallets-can- get-hacked-too/. [2] E. Barker, \Recommendation for Key management (Part 1)," National Institute of Stan- dards and Technology, NIST Special Publication SP 800-57, Part 1, Rev 4, January 2016, http://dx.doi.org/10.6028/NIST.SP.800-57pt1r4. [3] D. Shane, \ $530 million cryptocurrency heist may be biggest ever," CNN Business , January 2018. [Online]. Available: https://money.cnn.com/2018/01/29/technology/ coincheck-cryptocurrency-exchange-hack-japan/index.html [4] A. Reddy, \Hackers stole $40 million of bitcoin from one of the world's largest crypto exchanges (BTC)," Business Insider , May 2019, https://markets.businessinsider.com/currencies/news/btc-binance-su ers-40-million- hack-2019-5-1028182318. [5] N. Rei , \The Largest Cryptocurrency Hacks So Far ," Investopedia , June 2019, https://www.investopedia.com/news/largest-cryptocurrency-hacks-so-far-year/. [6] A. Pentland, \Building the New Economy: what we need and how to get there," in Building the New Economy , A. Pentland, A. Lipton, and T. Hardjono, Eds. MIT Press - Work in Progress (WIP), 2020. [Online]. Available: https://wip.mitpress.mit.edu/new-economy [7] A. Lipton, T. Hardjono, and A. Pentland, \Digital Trade Coin (DTC): Towards a more stable digital currency," Journal of the Royal Society Open Science (RSOS) , August 2018, available at https://doi.org/10.1098/rsos.180155. [8] T. Hardjono, A. Lipton, and A. Pentland, \Towards a Public Key Management Frame- work for Virtual Assets and Virtual Asset Service Providers," 2020, Journal of FinTech (to appear) { Available at https://arxiv.org/pdf/1909.08607. [9] Trusted Computing Group, \TCG Glossary," Trusted Computing Group, TCG Published Speci cation { Version 1.1 Revision 1.0, May 2017. [Online]. Available: https: //trustedcomputinggroup.org/wp-content/uploads/TCG-Glossary-V1.1-Rev-1.0.pdf [10] A. Regenscheid, \Platform Firmware Resiliency Guidelines," National Institute of Standards and Technology, NIST Publication SP 800-193, May 2018. [Online]. Available: https://csrc.nist.gov/publications/detail/sp/800-193/ nal [11] Trusted Computing Group, \TPM Main { Speci cation Version 1.2," Trusted Computing Group, TCG Published Speci cation, October 2003, available at http://www.trustedcomputinggroup.org/ resources/ tpm main speci cation. 28 [12] ||, \Trusted Platform Module Library Part 1: Architecture { Speci cation Family 2.0 ," Trusted Computing Group, TCG Published Speci cation, March 2014. [Online]. Available: https://trustedcomputinggroup.org/wp-content/uploads/ TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf [13] B. Balache , L. Chen, S. Pearson, D. Plaquin, and G. Proudler, Trusted Computing Platforms: TCPA Technology in Context . New York: Prentice Hall, 2002. [14] D. Challener, K. Yoder, R. Catherman, D. Sa ord, and L. Van Doorn, Practical Guide to Trusted Computing . New York: IBM Press, 2008. [15] G. Proudler, L. Chen, and C. Dalton, Trusted Computing Platforms: TPM2.0 in Con- text. New York: Springer, 2014. [16] S. Nakamoto, \Bitcoin: A Peer-to-Peer Electronic Cash System," 2008. [Online]. Available: https://bitcoin.org/bitcoin.pdf [17] FATF, \Financial Action Task Force (FATF)," 2019, http://www.fatf-ga .org. [18] ||, \International Standards on Combating Money Laundering and the Fi- nancing of Terrorism and Proliferation," Financial Action Task Force (FATF), FATF Revision of Recommendation 15, October 2018, available at: http://www.fatf- ga .org/publications/fatfrecommendations/documents/fatf-recommendations.html. [19] ||, \Guidance for a Risk-Based Approach to Virtual Assets and Virtual Asset Service Providers," Financial Action Task Force (FATF), FATF Guidance, June 2019, avail- able at: www.fatf-ga .org/publications/fatfrecommendations/documents/Guidance- RBA-virtual-assets.html. [20] Wolfsberg Group, \Wolfsberg Anti-Money Laundering Principles for Private Banking (2012)," The Wolfsberg Group, Wolfsberg AML Principles, 2012. [Online]. Available: https://www.wolfsberg-principles.com/sites/default/ les/wb/pdfs/ wolfsberg-standards/10.%20Wolfsberg-Private-Banking-Prinicples-May-2012.pdf [21] R. Housley, W. Ford, W. Polk, and D. Solo, \Internet X.509 public key infrastructure certi cate and crl pro le," January 1999, RFC2459. [Online]. Available: http://tools.ietf.org/rfc/rfc2459.txt [22] D. Cooper, S. Santesson, S. Farrell, S. Boeyen, R. Housley, and W. Polk, \Internet X.509 public key infrastructure certi cate and certi cate revocation list (crl) pro le," May 2008, RFC5280. [Online]. Available: http://tools.ietf.org/rfc/rfc5280.txt [23] ISO, \Information Technology { Open Systems Interconnection { The Directory { Part 8: Public-key and Attribute Certi cate Frameworks," International Organization for Stan- dardization, ISO/IEC 9594-8:2017, February 2017. 29 [24] Global Digital Finance, \Crypto Asset Safekeeping and Cus- tody: Key Considerations and Takeaways," April 2019. [Online]. Available: https://www.gdf.io/wp-content/uploads/2019/02/ GDF-Crypto-Asset-Safekeeping 20-April-2019-2-cust-providers-additions-1-2.pdf [25] D. Riegelnig, \OpenVASP: An Open Protocol to Implement FATF's Travel Rule for Virtual Assets," November 2019. [Online]. Available: https://www.openvasp.org/ wp-content/uploads/2019/11/OpenVasp Whitepaper.pdf [26] V. Buterin, \Ethereum: A Next-Generation Cryptocurrency and Decen- tralized Application Platform," Bitcoin Magazine, Report, January 2014, https://bitcoinmagazine.com/articles/ethereum-next-generation-cryptocurrency- decentralized-application-platform-1390528211/. [27] A. John, \Cryptocurrency industry faces insurance hurdle to mainstream ambitions," Reuters , December 2018. [Online]. Avail- able: https://www.reuters.com/article/us-crypto-currency-insurance/ cryptocurrency-industry-faces-insurance-hurdle-to-mainstream-ambitions-idUSKCN1OJ0BU [28] O. Kharif, B. Louis, J. Edde, and K. Chiglinsky, \Interest in Crypto Insurance Grows, Despite High Premiums, Broad Exclusions," Insurance Journal , July 2018. [Online]. Available: https://www.insurancejournal.com/news/national/2018/07/23/495680.htm [29] United States Congress, \Electronic Signatures in Global and National Commerce Act (ESIGN) - Pub.L. 106{229," United States Congress, ESIGN, June 2000. [30] W. Simpson, \Ppp challenge handshake authentication protocol (chap)," August 1996, RFC1994. [Online]. Available: http://tools.ietf.org/rfc/rfc1994.txt [31] FINMA, \FINMA Guidance: Payments on the blockchain," Swiss Fi- nancial Market Supervisory Authority (FINMA), FINMA Guidance Report, August 2019. [Online]. Available: https://www. nma.ch/en/ /media/ nma/ dokumente/dokumentencenter/my nma/4dokumentation/ nma-aufsichtsmitteilungen/ 20190826- nma-aufsichtsmitteilung-02-2019.pdf [32] T. Hardjono, \Compliant Solutions for VASPs," May 2019, presentation to the FATF Private Sector Consultative Forum (PSCF) 2019, Vienna (6 May 2019). [33] TRISA, \Travel Rule Information Sharing Architecture for Virtual Asset Service Providers (TRISA) { Version 5," December 2019. [Online]. Available: https: //trisacrypto.github.io/white-papers/white-paper-trisa-v5.pdf [34] CAB-Forum, \Guidelines For The Issuance And Management of Extended Validation Certi cates," CA Browser Forum, Speci cation Version 1.7.2, March 2020. 30 [35] InterVASP, \InterVASP Messaging Standards IVMS101," Joint Working Group on in- terVASP Messaging Standards, interVASP data model standard { Issue 1 { FINAL, May 2020. [36] European Commission, \Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data (General Data Protection Regulation)," Ocial Journal of the European Union , vol. L119, pp. 1{88, 2016. [37] D. Furlonger and R. Kandaswamy, \Hype Cycle for Blockchain Technologies 2018," Gartner, Research Report G00340388, July 2018. [38] A. Litan and A. Leow, \Hype Cycle for Blockchain Technologies 2019," Gartner, Re- search Report G00383155, July 2019. [39] OASIS, \Assertions and Protocols for the OASIS Security Assertion Markup Lan- guage (SAML) V2.0," March 2005, available on http://docs.oasisopen.org/security/ saml/v2.0/ saml-core-2.0-os.pdf. [40] D. Hardt, \The OAuth 2.0 Authorization Framework," October 2012, IETF Stan- dard RFC6749. [Online]. Available: https://tools.ietf.org/html/rfc6749 [41] T. Hardjono, E. Maler, M. Machulak, and D. Catalano, \User-Managed Access (UMA) Pro le of OAuth2.0 { Speci cation Version 1.0," Kantara Initiative, Kantara Published Speci cation, April 2015, https://docs.kantarainitiative.org/uma/rec-uma-core.html. [42] I. L. Traiger, J. Gray, C. A. Galtieri, and B. G. Lindsay, \Transactions and Consistency in Distributed Database Systems," IBM Research Report , vol. RJ2555, 1979. [43] J. Gray, \The Transaction Concept: Virtues and Limitations," in Very Large Data Bases { Proceedings of the 7th International Conference , Cannes, France, September 1981, pp. 144{154. [44] F. Mckeen, I. Alexandrovich, A. Berenzon, C. Rozas, H. Sha , V. Shanbhogue, and U. Savagaonkar, \Innovative Instructions and Software Model for Iso- lated Execution," in Proc. Second Workshop on Hardware and Architec- tural Support for Security and Privacy HASP2013 , Tel-Aviv, June 2013, https://sites.google.com/site/haspworkshop2013/workshop-program. [45] F. McKeen, I. Alexandrovich, I. Anati, D. Caspi, S. Johnson, R. Leslie-Hurd, and C. Rozas, \Intel Software Guard Extensions (Intel SGX) Support for Dy- namic Memory Management Inside an Enclave," in Proc. Workshop on Hardware and Architectural Support for Security and Privacy (HASP) 2016 , Seoul, June 2016, http://caslab.csl.yale.edu/workshops/hasp2016/program.html. 31 [46] FINMA, \FINMA Anti-Money Laundering Ordinance (AMLO) ," Swiss Financial Market Supervisory Authority (FINMA), Verordnung der Eid- genssischen Finanzmarktaufsicht ber die Bekmpfung von Geldwscherei und Terrorismus nanzierung im Finanzsektor, June 2015. [Online]. Available: https://www.admin.ch/opc/de/classi ed-compilation/20143112/index.html [47] R. Lindemann and M. B. Jones, \FIDO 2.0: Key Attestation Format," FIDO Alliance, FIDO Alliance Proposed Standard, September 2015. [Online]. Avail- able: https:// doalliance.org/specs/ do-v2.0-ps-20150904/ do-key-attestation-v2. 0-ps-20150904.html [48] GlobalPlatform, \GlobalPlatform and the Trusted Computing Group Form Work Group to Drive Mobile Security Standards and Solutions," June 2012. [Online]. Available: https://globalplatform.org [49] IETF, \Remote ATtestation ProcedureS (RATS) Working Group { Approved Charter, Internet Engineering task Force," March 2019. [Online]. Available: https://datatracker.ietf.org/wg/rats/about/ [50] Trusted Computing Group, \TPM Main { Part 1 Design Principles { Speci cation Ver- sion 1.2," Trusted Computing Group, TCG Published Speci cation, October 2003, avail- able at http://www.trustedcomputinggroup.org/ resources/ tpm main speci cation. [51] TCG, \TCG Remote Integrity Veri cation (RIV): Network Equipment Remote Attestation System Version 1.0, Rev. 0.9b," Trusted Computing Group, TCG Draft Speci cations, June 2019. [Online]. Available: https://trustedcomputinggroup.org/ wp-content/uploads/TCG-NetEq-Attestation-Work ow-Outline v1r9b pubrev.pdf [52] G. Fedorkow, E. Voit, and J. Fitzgerald-McKay, \TPM-based Network Device Remote Integrity Veri cation," IETF, Internet-Draft draft-fedorkow-rats-network- device-attestation-05, April 2020. [Online]. Available: https://datatracker.ietf.org/doc/ draft-fedorkow-rats-network-device-attestation/ [53] OCP, \Open Compute Project," 2020. [Online]. Available: https://www.opencompute. org [54] TCG, \ Attestations Working Group, Trusted Computing Group," March 2020. [Online]. Available: https://members.trustedcomputinggroup.org [55] N. Smith (ed), \TCG Attestation Architecture," Trusted Computing Group, TCG Draft Speci cation { Version 1.0, February 2020. [56] H. Birkholz, D. Thaler, M. Richardson, N. Smith, and W. Pan, \Remote Attestation Pro- cedures Architecture," IETF, Internet-Draft draft-ietf-rats-architecture-02, March 2020. [Online]. Available: https://datatracker.ietf.org/doc/draft-birkholz-rats-architecture/ 32 [57] G. Coker, J. Guttman, P. Loscocco, A. Herzog, J. Millen, B. O?Hanlon, J. Ramsdell, J. S. Ariel Segall, and B. Sni en, \Principles of Remote Attestation," International Journal of Information Security , vol. 10, pp. 63{81, April 2011. [Online]. Available: https://doi.org/10.1007/s10207-011-0124-7 [58] J. Zic and T. Hardjono, \Towards a cloud-based integrity measurement service," Journal of Cloud Computing: Advances, Systems and Applications , February 2013. [59] T. Hardjono and N. Smith, \An Attestation Architecture for Blockchain Networks," May 2020, available at https://arxiv.org/abs/2005.04293. [60] D. Yaga, P. Mell, N. Roby, and K. Scarfone, \Blockchain Technology Overview," Na- tional Institute of Standards and Technology Internal Report 8202, October 2018, https://doi.org/10.6028/NIST.IR.8202. [61] R. Rivest, A. Shamir, and L. Adleman, \A Method for Obtaining Digital Signatures and Public-key Cryptosystems," Commun. ACM , vol. 21, no. 2, pp. 120{126, Feb. 1978. [62] TCG, \ Trusted Computing Group ," http://www.trustedcomputinggroup.org. [63] W. Rankl and W. Eng, Smart Card Handbook 2nd Edition . New York: John Wiley & Sons, 2000. [64] Trusted Computing Group, \TCG Storage Security Subsystem Class: Opal (v1.0)," Trusted Computing Group, TCG Published Speci cation, January 2009, http://www.trustedcomputinggroup.org/ resources. [65] Microsoft Corp, \Trusted Platform Module and Bitlocker Drive Encryption," https://msdn.microsoft.com/en-us/library/windows/hardware/dn653315. [66] T. Hardjono and G. Kazmierczak, \Overview of the TPM Key Management Standard," May 2008. [Online]. Available: https://trustedcomputinggroup.org/wp-content/ uploads/Kazmierczak20Greg20-20TPM Key Management KMS2008 v003.pdf [67] M. Seaman, \IEEE Std. 802.1AR-2018 { Secure Device Identity," IEEE, IEEE Standard for Local and Metropolitan Area Networks, August 2018. [68] E. Brickell, J. Camenisch, and L. Chen, \Direct Anonymous Attestation," in Proceedings of the 11th ACM Conference on Computer and Communications Security CCS2004 . ACM, 2004, pp. 132{145. [69] J. Camenisch, L. Chen, M. Drijvers, A. Lehmann, D. Novick, and R. Urian, \One TPM to Bind Them All: Fixing TPM 2.0 for Provably Secure Anonymous Attestation," in Proceedings of the 2017 IEEE Symposium on Security and Privacy . IEEE, May 2017, pp. 901{920. [Online]. Available: DOI:10.1109/SP.2017.22 33 [70] Trusted Computing Group, \TCG Interoperability Speci cations for Backup and Mi- gration Services (v1.0)," Trusted Computing Group, TCG Published Speci cation, June 2005, http://www.trustedcomputinggroup.org/ resources. [71] ARM, \ARM Security Technology: Building a Secure System using TrustZone Technology," ARM Limited, ARM Technical Documentation { PRD29-GENC- 009492C, April 2009. [Online]. Available: http://infocenter.arm.com/help/index.jsp? topic=/com.arm.doc.prd29-genc-009492c/CABGFFIC.html [72] G. Mandyam, L. Lundblade, M. Ballesteros, and J. O'Donoghue, \The Entity Attestation Token (EAT)," IETF, Internet-Draft draft-ietf-rats-eat-03, February 2020. [Online]. Available: https://datatracker.ietf.org/doc/draft-ietf-rats-eat/ [73] J. Snyder, \The competition for NAC: Mapping Cisco, Juniper, Microsoft and TCG's access-control schemes," Network World , April 2006. [Online]. Available: https://www.networkworld.com/article/2310209/the-competition-for-nac.html [74] M. Goel, \Providing 802.1X Enforcement For Network Access Protection," May 2006, presentation at WinHEC 2006. [Online]. Available: http://download.microsoft.com/ download/5/b/9/5b97017b-e28a-4bae-ba48-174cf47d23cd/NET078 WH06.ppt [75] J. Heary, J. Lin, C. Sullivan, and A. Agrawal, Cisco NAC Appliance: Enforcing Host Security with Clean Access . Hoboken, NJ: Cisco Press, August 2007. [76] T. Hardjono and N. Smith (ed), \TCG Trusted Network Connect (TNC) Architecture for Interoperability," Trusted Computing Group, TCG Published Speci cation { Ver- sion 1.1, April 2006, available at http://www.trustedcomputinggroup.org. [77] TCG, \TCG Trusted Network Communications (TNC) Architecture for Interoperabil- ity," Trusted Computing Group, TCG Published Speci cation { Version 2.0 Revision 13, October 2017. [Online]. Available: https://trustedcomputinggroup.org/wp-content/ uploads/TCG-TNC-Architecture-for-Interoperability-Version-2.0-Revision-13-.pdf [78] TCG, \TPM Keys for Platform Identity for TPM 1.2 Version 1.0, Rev. 3," Trusted Computing Group, TCG Published Speci cations, August 2015. [Online]. Available: https://trustedcomputinggroup.org/wp-content/uploads/TPM Keys forPlatform Identity v10r3Final.pdf [79] P. England, A. Marochko, D. Mattoon, R. Spiger, S. Thom, and D. Wooten, \RIoT - A Foundation for Trust in the Internet of Things," Microsoft Research, Tech. Rep. MSR-TR-2016-18, April 2016. [Online]. Available: https://www.microsoft.com/en-us/ research/publication/riot-a-foundation-for-trust-in-the-internet-of-things/ [80] B. Kelly, \Project Cerberus Security Architecture Overview Speci cation," Open Compute Project, Published Speci cations, September 2017. [Online]. 34 Available: https://github.com/opencomputeproject/Project Olympus/blob/master/ Project Cerberus/Project%20Cerberus%20Architecture%20Overview.pdf [81] T. Hardjono and N. Smith (ed), \TCG Infrastructure Working Group architecture (Part 2) { Integrity Management { Speci cation Version 1.0 Rev 1.0," Trusted Computing Group, TCG Published Speci cation, November 2006, available at http://www.trustedcomputinggroup.org/resources. [82] TCG, \TCG Reference Integrity Manifests (RIM) Information Model Version 1.00, Rev. 0.13," Trusted Computing Group, TCG Speci cations, December 2019. [Online]. Available: https://trustedcomputinggroup.org/wp-content/uploads/ TCG RIM Model v1-r13 2feb20.pdf [83] OASIS, \Pro les for the OASIS Security Assertion Markup Language (SAML) V2.0," March 2005, available on https://docs.oasis-open.org/security/saml/v2.0/ saml-pro les- 2.0-os.pdf. [84] D. Hardt, \The OAuth 2.0 Authorization Framework," October 2012, RFC6749. [Online]. Available: http://tools.ietf.org/rfc/rfc6749.txt [85] N. Sakimura, J. Bradley, M. Jones, B. de Medeiros, and C. Mortimore, \OpenID Connect Core 1.0," OpenID Foundation, Technical Speci cation v1.0 { Errata Set 1, November 2014, http://openid.net/specs/openid-connect-core-1 0.html. [86] National Institute of Science and Technology, \Electronic Authentication Guide- line," NIST Draft Special Publication 800-63-1, December 2008, available on http://csrc.nist.gov/publications/PubsDrafts.html ,. [87] US Oce of Management and Budget, \E-Authentication Guide- lines for Federal Agencies," Memorandum M-04-04, December 2003, available on http://www.whitehouse.gov/sites/default/files /omb/memoranda/fy04/m04-04.pdf . [88] NIST, \Digital Identity Guidelines: Authentication and Lifecycle Management," National Institute of Standards and Technology, NIST Special Publication 800-63B, June 2017. [Online]. Available: https://doi.org/10.6028/NIST.SP.800-63b 35
{ "id": "2005.14689" }
2210.06139
Zero-Knowledge Optimal Monetary Policy under Stochastic Dominance
Optimal simple rules for the monetary policy of the first stochastically dominant crypto-currency are derived in a Dynamic Stochastic General Equilibrium (DSGE) model, in order to provide optimal responses to changes in inflation, output, and other sources of uncertainty. The optimal monetary policy stochastically dominates all the previous crypto-currencies, thus the efficient portfolio is to go long on the stochastically dominant crypto-currency: a strategy-proof arbitrage featuring a higher Omega ratio with higher expected returns, inducing an investment-efficient Nash equilibrium over the crypto-market. Zero-knowledge proofs of the monetary policy are committed on the blockchain: an implementation is provided.
http://arxiv.org/pdf/2210.06139v1
David Cerezo Sánchez
cs.CR, cs.CE, econ.GN, q-fin.EC
cs.CR
Zero-Knowledge Optimal Monetary Policy under Stochastic Dominance David Cerezo Sánchez david@calctopia.com 13th October 2022 Abstract Optimal simple rules for the monetary policy of the first stochastically dominant crypto-currency are derived in a Dynamic Stochastic General Equilibrium (DSGE) model, in order to provide optimal responses to changes in inflation, output, and other sources of uncertainty. The optimal monetary policy1stochastically dominates all the pre- vious crypto-currencies, thus the efficient portfolio is to go long on the stochastically dominant crypto-currency: a strategy-proof arbitrage fea- turing a higher Omega ratio with higher expected returns, inducing an investment-efficient Nash equilibrium over the crypto-market. Zero-knowledge proofs of the monetary policy are committed on the blockchain: an implementation is provided. Keywords : optimal monetary policy, optimal simple rules, stochastic dominance, stochastic calculus, DSGE model, strategy-proof, Nash equi- librium, zero-knowledge, crypto-currency JEL classification : C11, C54, D58, D81, E42, E47, E52, E61, G11 1STATEMENT ON MONETARY POLICY GOALS AND STRATEGY : The primary mandate is (stochastic) dominance. The primary means of adjusting the policy stance is through changes in money growth. The monetary policy is implemented with pre-committed policy rules, only to be revised in case of technology shocks or in the event of a financial crisis: the stance of monetary policy will adjust as appropriate if risks emerge that could impede the attainment of its goals, and this document will be reviewed and updated with any changes. Unlike other crypto-currencies, this monetary policy synchronises with macro-economic observables, other fiat currencies and CBDCs: its primary goal is to follow cooperative equilibria, falling back to non-cooperative equilibria as last resort. 1arXiv:2210.06139v1 [cs.CR] 12 Oct 2022 Contents 1 Introduction 3 1.1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Related Literature 3 2.1 Comparison with prior work . . . . . . . . . . . . . . . . . . . . . 5 2.2 Survey of the Monetary Policy Impact on Crypto-currencies . . . 6 3 Environment, Framework and Efficient Portfolio 8 3.1 Economic Environment . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Decision Framework . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.1 Welfare Loss Function . . . . . . . . . . . . . . . . . . . . 11 3.2.2 Ranking Simple Policy Rules . . . . . . . . . . . . . . . . 12 3.3 Efficient Portfolio . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.3.1 Pricing Stochastic Dominance . . . . . . . . . . . . . . . . 14 3.3.2 Efficient Stochastically Dominant Portfolio . . . . . . . . 17 3.3.3 Omega ratio of Stochastically Dominant Crypto-currencies 21 3.3.4 Arbitraging with Stochastic Dominance . . . . . . . . . . 21 4 Model and Policies 22 4.1 Monetary Policy Rules . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1.1 Central Bank . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1.2 Bitcoin’s Monetary Policy . . . . . . . . . . . . . . . . . . 23 4.1.3 Ethereum 2.0’s Monetary Policy . . . . . . . . . . . . . . 25 4.1.4 McCallum’s Policy Rule . . . . . . . . . . . . . . . . . . . 26 4.1.5 A Reconsideration of Money Growth Rules . . . . . . . . 26 4.2 Ranking of Policy Rules . . . . . . . . . . . . . . . . . . . . . . . 27 5 Implementation Details 27 5.1 Global Implementation . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2 Zero-Knowledge Monetary Policy . . . . . . . . . . . . . . . . . . 28 5.2.1 Security Model . . . . . . . . . . . . . . . . . . . . . . . . 29 5.2.2 Protocol Description and Implementation . . . . . . . . . 30 6 Conclusion 33 I Appendix 38 2 1 Introduction One of the notorious deficiencies of crypto-currencies is their lack of monetary policy, as currently defined and studied in the field of macroeconomics: non- etheless, monetary crypto-policymakers must act in an optimal manner. In this paper, we initiate the study of optimal monetary policies for crypto-currencies in order to derive optimal simple rules that stochastically dominate the monetary policy of other previous crypto-currencies, and ultimately, prove that the efficient portfolio is to go long on the stochastically dominant crypto-currency. 1.1 Contributions In summary, we make the following contributions: •pioneer the introduction of the first optimal monetary policy for crypto- currencies •devise the first stochastically dominant crypto-currency, its dominance arising from its optimal monetary policy •derive optimal simple rules for a crypto-currency in a Dynamic Stochastic General Equilibria model •prove that the efficient portfolio is to go long on stochastically dominant crypto-currencies: in fact, it’s a strategy-proof arbitrage featuring a higher Omega ratio with a higher expected return, inducing a Nash equilibrium over the crypto-currency market •describe how zero-knowledge proofs for the implemented monetary policy are committed on the blockchain Inanutshell, wecontributeanewmethodologyforanalysingandderivingoptimal simple rules for the monetary policy of stochastically dominant crypto-currencies, in order to create efficient portfolios of stochastically dominant crypto-currencies. This paper intends to be a self-contained guide covering all the necessary theory and practical aspects. In section 2, we discuss related literature and prior work. In section 3, we introduce our economic environment, analysis framework, and efficient portfolio. In section 4, we describe our economic model and optimal monetary policies. Finally, we detail some features of the technical implementation in section 5, including how to commit the implemented zero-knowledge policy, and then we conclude in section 6. The reader interested in less theoretic and most empirical analysis may skip to subsection 4.2, 2 Related Literature The seminal contribution of this paper is to start the study of the first optimal monetary policy for crypto-currencies: until now, all the study of the field 3 was concentrated on the monetary policies for stablecoins [ MIOT19 ,Cer19a] or the models of the interaction between crypto-currencies, fiat currencies and/or CBDCs with a view of understanding their shocks to the economy (starting from the seminal [BK16]). Figure 2.1: Relative supply of crypto-currencies[Gal19] Figure 2.2: China’s simulated quantity rule and actual M2 growth [LZ09] 4 However, the study of the monetary policy of crypto-currencies has always been relegated to matters related to their supply [ Gal19], as shown in the previous Figure 2.1, in stark contrast with the quantity rules of money used in the real world (e.g., China’s policy rule as shown in the previous Figure 2.2). In fact, the equational expression of both policy rules couldn’t be more different: Bitcoin’s supply equation Stin periodtcan be given by SBTC t = 21107 1 t where is the growth rate ( 0:825for yearly periods and 0:953for quarterly periods, see 4.5), and China’s quantity rule of money [ LZ09] for the previous Figure 2.2 can be given by Mt= M t+1Mt12^Yt3(t t) with Mdenoting the nominal money growth, M tthe log of equilibrium money growth, 1= 0:88the lag of nominal money growth, ^Ytthe output gap, 2= 0:16the coefficient of response to changes of the output gap, tthe inflation rate in period t, tthe target inflation rate, and 3= 0:06the coefficient of response to changes in inflation. There is no related literature about what should be the optimal monetary policy of a crypto-currency according to the methods of modern macro-economics, as customarily practised on central banks: in fact, current crypto-currencies are designed for anarcho-autarkic settings on which they don’t have to keep track of inflation, GDP, or money growth, not even the exchange rate of other crypto-currencies. Moreover, previous sources of dominance in the crypto-currency market were the first mover advantage of Bitcoin, or the network effects inherent to payment networks [ HG16] : as a novel contribution, this paper introduces optimal monetary policies as a source of dominance in the crypto-currency market. Furthermore, simple rules are preferred over complex models [ FV20]: in the foreseeable future, simple rules will still dominate the design of markets over complex models due to their many strengths and few weaknesses [Tay20]. 2.1 Comparison with prior work Previous work from the same author [ Cer19a] described methods to conduct the monetary policy in a decentralised fashion, but with the following differences: 1.Previous work [ Cer19a] focused on a stablecoin, but this paper targets the volatile crypto-currency market. (a)However, this paper introduces the novelty of stochastic dominance of monetary policy rules and its usefulness to dominate other previous crypto-currencies. 2.The technical implementation of this paper is significantly simpler than [Cer19a], without compromising the security model: that is, it provides similar cryptographic guarantees on a decentralised blockchain. 5 Additionally, the results of this paper are also valid for the setting of [ Cer19a] : the optimal simple policy rules obtained in this paper (3.2.2 and 4.2) could be directly incorporated into the “Economic Model for a Central-Banked Currency” (Section 4.3 of [Cer19a]). 2.2 Survey of the Monetary Policy Impact on Crypto- currencies Although crypto-currencies such as Bitcoin were designed to replace the discre- tionary decisions of monetary policymakers from central banks, even to insulate them from macro-economic shocks, in reality their decisions continue impacting their price and volatility. In this subsection, a survey of recent research about this topic is presented, which shall inform the design of monetary policy rules in the next subsection (4.2): 6 Paper Period Results [Hsi21] 2010-2020 Unanticipated 1 bp on 2-year Treasury yield is about a 0.25% decrease in Bitcoin price and 1.23% three days later (stronger at high and low quantiles) [Kar21] 2014-2021 Disinflationary ECB policy shocks (2-year interest rates of 10 basis points) lead to a persistent decrease in Bitcoin price (-20%), whereas inflationary ECB information shocks lead to price increases; conversely, contractionary US policy shocks (2-year interest rates of 10 basis point) increase Bitcoin prices (+7%) but fall during expansionary US information shocks (due to flows to foreign exchanges with emerging market currencies) [PF21] 2016-2021 Cointegration between Bitcoin prices and M2, deeper with time delays [CS20] 2010-2018 SVAR model shows no response of Bitcoin prices to shocks to nominal interest rate (1-year US treasury rate), only to stocks, VIX; but increase after a positive shock to the price level (Billion prices index) [CLL+17]2013-2017 Mineable crypto-currencies show US volatility spillovers during FOMC announcement period, but not dApp or protocols [PL19] 2010-2018 Bitcoin price increases 0.26% at no FOMC announcement, 0.96% on the day before and decreases 1% on the announcement day. Bitcoin price doesn’t change on CPI, PPI or employment rate announcements [CMC21] 2010-2021 Positive link between cryptocurrencies and forward inflation rates is identified only during COVID-19 [CS21] 2010-2020 Bitcoin prices appreciate against inflation (or inflation expectation) shocks, but do not decrease after policy (1-year US treasury rate) uncertainty shocks (i.e., only when excluding ZLB constraint) [BGW21] 2019-2020 Daily changes in Bitcoin prices Granger cause changes in the forward inflation rate in a significant and persistent way, but not vice-versa [BGW14] 2010-2014 In the short term, Bitcoin price adjusts to changes in money supply, GDP, inflation, and interest rate Table 1: Survey of Monetary Policy Impact on Crypto-currencies 7 A practical example of the effects of inflation on Bitcoin price can be found below, shedding $1K on 13/9/2022 in just 3 minutes (10% of market capitalization) as US CPI inflation for August overshoots at 8.3% year-on–year (expected 8.1%): Figure 2.3: Effect of inflation on BTC/USD 3 Environment, Framework and Efficient Portfo- lio We consider pre-commitment rules in rational expectations models by a Bayesian risk-averse policymaker that is given the task to choose a policy feedback coef- ficient function mapping the parameter space into the set of policy feedback coefficients interpreted as random variables with probability distributions given from the posterior distributions of the model parameters, in order to minimise the expected disutilities of welfare loss for all disutility functions by ranking the policy rules according to a stochastic dominance criterion that is robust against all of the parameter uncertainty about the structure of the economic model. 3.1 Economic Environment The setting of this paper is the general form of linear rational expectations models with uncertainty as set out in [ And08]: many Dynamic Stochastic General Equilibrium models can be approximated by linear rational expectation (LRE) equations, F1(1;2)Etxt+1+F1(1;2)Etxt+1+F2(1;2)Etut+1 +F3(1;2)xt+F4(1;2)ut+F(1;2)vt= 0;(3.1) 8 G2()Etxt+1+G3()xt+G()vt=G1()ut; (3.2) M1(m)xt+M2(m)ut+M(m)vm;t=yt;t= 0;1;2;::: (3.3) with the equation 3.1 describing the dynamics of the private sector around the deterministicsteady-state, 3.2beingthepolicyequation, and3.3themeasurement equations, all the above using the following notation: •xtis a vector of nnon-policy endogenous variables •uta vector of kpolicy variables •yta vector of mn+kobservable variables •Etis the operator of conditional expectation with respect to an information set in period t •Fi;F;Gi;G;Mi;andMare matrices depending on the parameters •vm;tandvtare vectors of independent and identically distributed innova- tions with zero mean and identity variance-covariance matrix I •1is a vector of structural non-policy random parameters •2is a vector of structural non-policy calibrated parameters •mis a vector of measurement parameters •is a vector of random policy parameters (feedback or response coefficients) The solution to the system of linear rational expectation equations 3.1 - 3.2 is given by a state equation of the form zt=A(s;)zt1+B(s;)vt; t= 1;2;:::; (3.4) for the initial vector of states variables z0=h x0 0;u0i0 and for unknown matrices A(s;),B(s;)withs=h 0 1;0 2i0 . The parameter uncertainty in model 3.3 - 3.4 is measured by the posterior probability distribution function according to the following Bayes rule: p(;jYt) =p(;)p(Ytj;) p(Yt); (3.5) where=h s;0 mi0 ,Yt=h y0 1;y0 2;:::;y0 ti0 is a sequence of observable vectors at timet,p(Ytj;)is a likelihood function, and p(;)=p()p()is a prior posterior probability distribution function. The elements of A(s;), andB(s;)are usually non-linear functions of the vectors sand, and the 9 posteriors are not analytically available so we use the likelihood principle to treat posteriors as a measure of uncertainty about the parameters; thus, simulations are used to find approximations to the marginal posterior distributions and. With this approach, optimal policy coefficients are assumed to be random variables with probability distributions inherited from the posterior distributions ofthestructural modelparametersobservedwithparameteruncertainty, avoiding treating optimal feedback coefficients as fixed numbers much like policymakers usually do. 3.2 Decision Framework In this subsection, we use a decision procedure to evaluate and rank simple policy rules in rational expectation models. A Bayesian policymaker formulates a statistical decision problem to choose a policy rule under parameter uncertainty with the following tuple (Yt;p();p(l);;D;M;Lt) in which each term defines: •Ytdenotes the history of the observable variables over tperiods •subjective prior distributions p()for the structural parameters =h 0 s;0 mi0 2=sm •subjective prior distributions p(l)for the policy parameters l2lfor l= 1;2;:::;N •a setDof actions •a setM= Pzjs;d:s2s;d2D of linear rational expectations models under consideration, differing in the values of the structural parameters s2sand the values of the policymaker’s action d2D •loss function Lt(;d)that quantifies the policymaker’s choice of applying a given policy rule when a particular model holds Considering how to rank a set of policy rules in the model of 3.2 with N2 different functional forms G1l(l)ul;t=G2l(l)Etxt+1+G3l(l)xt+Gl(l)vt; t= 0;1;2;:::(3.6) withl= 1;2;:::;N, the vector l2lcollecting the policy feedback coefficients, withGilandGlbeing matrices that depend on the policy feedback parameters. The decision space Dis of the form D=f(l;fl) :l= 1;2;:::;N (3.7) fl:!lg (3.8) in which the following conditions hold: 10 •the admissible policies d= (l;fl)is a rule from 3.6 •fl:!lis a policy feedback coefficient from a given class of measurable functionsFlsuch that the system of linear rational expectation equations 3.1 and 3.6, with l=fl()for all2has a solution which is given by the state equation zl;t=Al(s;l)zl;t1+Bl(s;l)vt; t1 (3.9) withz0beinganinitialstate, zl;t=h x0 t;u0 l;ti0 ,zl;0=z0,andAl(s;l);Bl(s;l) are unknown matrices with s=h 0 1;0 2i0 •every setFlincludes all constant functions fl() =const •the parameters space lconsists of all vectors of policy parameters lfor everyl= 1;2;:::such that for all s2s, the system of linear rational expectation equations 3.1 and 3.6 has a unique solution The procedure of the Bayesian policymaker is to first observe the history of the observable variables Ytovertperiods, and for every l= 1;2;:::;Nsets the subjective prior distributions p()of the structural parameters and p(l)of the policy parameters l2l. Then, it analyses the following set of linear rational expectation models, M= Pzjs;d:s2s;d2D for endogenous non-policy xtdescribed by 3.1 and policy variables ul;tdescribed by 3.6. The predictive probability distribution Pzjs;dof the future state variables z= (zl;t+s)s=0;1;2;:::2Zevolves according to 3.9. 3.2.1 Welfare Loss Function The welfare loss function of the Bayesian decision maker’s objective at time tis defined by Lt:ZtVD![0;1) receiving the following parameters: •a vector of current state variables zt2Zt •all future shocks v=f(vt+s;vm;t+s)gs=1;2;:::2V •all vectors of structural parameters from the parameter space  •all admissible decisions dfrom the decision space D 11 In order to evaluate the objective function, the Bayesian policymaker could take the unconditional average of the welfare losses over the current state and all possible future shocks: Lt(;d) =Z ZtZ VLt(zt;v;;d )dPv(v)dPzt(zt) (3.10) or the conditional expected value of the welfare loss given zt: Lt(;djzt) =Z VLt(zt;v;;d )dPv(v) (3.11) with=h 0 s;0 mi0 2and the policymaker decision d2Dthat is able to modify the model structure Pzjs;d, the posterior distribution of the structural parameters PjYt;d, and the value of the expected welfare loss Lt(;d). In this paper, we will use a quadratic welfare loss function given by: Lt(;d) =tr WX zl(s;d)! =vars;d(^t) +wyvars;d(^yt)(3.12) for alld=(l;fl)2Dands2swherevar;d(zl;t;i)is the unconditional variance of the state variable zl;t;iin thel-th specification of the DSGE model, whilewyis the diagonal weight of Wfor the output gap. These diagonal weights reflect the monetary policy preferences of the central bank over the objectives: specifically, we set wy= 0:05andw= 1. 3.2.2 Ranking Simple Policy Rules Now we can start formulating robust optimality criteria to generate rankings of simple policy rules 3.6 based on the optimal Bayesian policymaker’s objective functionLt: first, a fixed vector of structural parameters ^2is chosen from the parameter space , and then the expected welfare loss Lt ^;d is minimised subject to the recursive state equations 3.9 under criteria of k-degree stochastic dominance (SD k) [Lev16]. Stochastic dominance is a useful concept for analysing risky decision-making under uncertainty when only partial information about the decision maker’s risk preferences is available. Definition 1. (SDkordering) . Defined by the indefinitely many inequalities ZL 0u(x)dFL1(x)ZL 0u(x)dFL2(x) (3.13) between the expected disutilities of non-negative valued random losses L1SDk L2with the cumulative distribution functions L1FL2andL2FL2, for all functions u2Ukwith strict inequality for some u, whereUkis the set of all disutility functions with the i-th derivative of usuch thatu00,u00 0;:::;u(k)0. Note that SD kimplies SDlfor allk > l, and that the SD 1 12 dominance of L2overL1implies that L1SDkL2holds for some finite k. Additionally, we denote with SDkthe inequality between random welfare losses defined by the SDkordering for k= 1;2;:::;1. Recall that SD1 ordering assumes all non-decreasing disutility functions (non-satiable); SD2 is for risk- averse policymakers towards welfare losses, restricting the disutility functions to convex and non-decreasing; SD3 additionally prefers negatively skewed welfare loss distributions (prudence); and SD4 requires that u40(temperance). Accordingly, simple policy rules can be analysed using the SD kordering from the previous Definition 1. Definition 2. (SDk-optimal policy) . Finding the best SD k-optimal simple policy under parameter uncertainty is solved by searching for the SD k-optimal decisiondSDk 1= lSDk 1;flSDk 1 2Dfrom the set of all admissible decisions D such that the corresponding distribution of welfare loss Lt ;dSDk 1 satisfies Lt ;dSDk 1 SDkLt(;d) (3.14) for alld2Dand subject to 3.9: dSDk 1generates the distribution of minimised welfare loss, the smallest in terms of the SD kordering. Assume that the Bayesian policymaker solves a parameterised optimisation problem to find the value of the optimal policy feedback coefficient function fmin l(): Lmin l;t() =min l2lLt(;(l;l)) =Lt ; l;fmin() (3.15) foreachvalueofthestructuralparameters 2andforeverypolicyspecification l=f1;2;:::;Nggiven in 3.6. Note that fmin l()is a selection from the optimal choice correspondence set: fmin l()2min l() = min l2l:Lmin l;t() =Lt ; l;min l We definemin l=fmin l()to be the vector of optimal policy feedback coefficient of rulelcalculated for the vector of structural parameters : thus, the optimal policy feedback coefficient function fmin l:!lis measurable and the pair l;fmin l belongs toD. The uncertainty of the structural parameters is considered in order to find the probability distribution of the optimal policy response coefficients min lp fmin l1jYt;l (3.16) and the minimised welfare loss is given by Lmin l;tp Ltfmin l1jYt;l (3.17) where the inverse image of A2B()under!fmin l()is fmin l1(A) = 2:fmin l()2A 13 and the inverse image of B2B()under!Lt ;fmin l() is Ltfmin l1(B) = 2:Lt ;fmin l() 2B Next theorem 3.18 gives sufficient conditions for the optimal solution to 3.14 and shows how the SD k-optimal decision can be found. Theorem 3. Assume that the decision sets lforl= 1;2;:::;Nare non-empty compact subsets of Rr, the parameter space is an open subset of Rp, and the policymaker’s welfare loss Ltis a Carathéodory-type integrable function. If d= (l;fl)2Dis a policymaker decision such that lis defined by Lmin l;tSDkLmin l;t;8l2f1;2;:::;Ng (3.18) whereLmin l;t;l2f1;2;:::;Ngare random minimised welfare losses as defined in 3.15, 3.16 and 3.17; and fl=fmin lis the optimal policy feedback coefficient function that solves 3.15, as denoted by min l2lLt(;(l;l)) =Lt(;(l;fl())) =Lmin l;t();82(3.19) thend=dSDk 1is the SDk-optimal decision. 3.3 Efficient Portfolio In this subsection, we derive an efficient portfolio for stochastically dominant crypto-currencies providing the best expected returns in comparison with the other crypto-currencies. Instead of using the mean-variance framework, we prefer to use marginal conditional stochastic dominance [ SY84]: all risk-averse investors prefer a portfolio Aover a portfolio Bif the portfolio return of Ais stochastically dominant over that of B, moving out all dominated assets. Furthermore, almost marginal conditional stochastic dominance [ MJYW14 ] could be used to prevent extreme utility functions in the set of risk-averse investors. 3.3.1 Pricing Stochastic Dominance In order to ease exposition, suppose there are only two crypto-currencies in two separate, segmented markets: a stochastically dominant crypto-currency, D, and Bitcoin,B(resp. any other PoW/PoS crypto-currency). Consumption in the dominant market at time tis denoted by cD t, andcB tin the Bitcoin denominated market (resp. any other PoW/PoS crypto-currency). Consumers can transact in one market but not both simultaneously, that is, utility uj(Cj;tmsj;t)at timetin marketj2fD;Bg, whereCj;tdenotes complete-market consumption that is distorted by the non-hedgeable monetary policy shock msj;t, rendering incomplete the system of markets: moreover, we assume that msj;tandCj;tare statistically independent for any j2fD;Bg. 14 Lemma 4. Suppose the utility function u(x)is of the form Constant Relat- ive Risk-Aversion (CRRA), then the Stochastic Discount Factor (SDF) in the dominant market is given by MD t+1=msD;t+1CD;t+1 msD;tCD;t =MCD t+1MmsD t+1 (3.20) and in the Bitcoin market (resp. any other PoW/PoS crypto-currency) is given by MB t+1=msB;t+1CB;t+1 msB;tCB;t =MCB t+1MmsB t+1 (3.21) where is the coefficient of relative risk aversion, and MCj t+1=Cj;t+1 Cj;t ;Mmsj t+1=msj;t+1 msj;t Lemma 5. (Fundamental Pricing Equation). The Euler equation for hold- ers of the stochastically dominant crypto-currency is given by: Et MB t+1Qt+1 Qt =Et MD t+1MmsB t+1 MmsD t+1 =1 RD t+1(3.22) and the Euler equation for the Bitcoin holder (resp. any other PoW/PoS crypto- currency) is given by: Et MD t+1Qt+1 Qt =Et MB t+1MmsD t+1 MmsB t+1 =1 RB t+1(3.23) whereQtis the real exchange rate, and RD t+1andRB t+1are the risk-free rate in the dominant and Bitcoin market, respectively. We assume that the logarithm of the Stochastic Discount Factors (SDFs) in the two markets are normally distributed: mD,mB,mmsD,mmsB,mCDand mCB(i.e., we denote logarithms of capitalised variables with their lowercase variant). Lemma 6. The arbitrage-free expected return on the stochastically-dominant crypto-currency is given by: Et(qt+1) =rB trD t+1 2 Vart mB t+1 Vart mD t+1 +EtmmsB t+1EtmmsD t+1 (3.24) thus a relative rise of EtmmsB t+1overEtmmsD t+1leads to the appreciation of the stochastically dominant crypto-currency. Definition 7. (Logarithmic utility function). The utility function is u(x) = log (x) 15 thus we have the following additively separable representation for the two shocks, consumption and monetary (resp. csandms): u(csms) = log (csms) =u1(cs)u2(ms) = log (cs) + log (ms) with values for D1andB1foru1andD2andB2foru2:D1andD2are marginals of the joint probability distribution D(cs;ms )in the dominant market, while B1andB2are marginals of the joint probability distribution B(cs;ms )in the Bitcoin market (resp. any other PoW/PoS crypto-currency). Lemma 8. (First-order Stochastic Dominance). A necessary and suffi- cient condition for the first-order stochastic dominance of the stochastically dom- inant crypto-currency over Bitcoin (resp. any other PoW/PoS crypto-currency) is B1(cs)D1(cs) and B2(cs)D2(cs) with strong inequality for at least some values in csor inms. Given the definitions 7, the stochastically dominant crypto-currency in the dominant market with a joint probability distribution D(cs;ms ), is preferred to the Bitcoin market with B(cs;ms )if: EDu(cs;ms )EBu(cs;ms ) (3.25) =Z (B1(t)D1(t))du1(t) +Z (B2(s)D2(s))du2(s) (3.26) =Z (B1(t)D1(t))1 tdu(t) +Z (B2(s)D2(s))1 sdu(s)0(3.27) Lemma 9. (Second-order Stochastic Dominance). A necessary and suffi- cient condition for the second-order stochastic dominance of the stochastically dominant crypto-currency over Bitcoin (resp. any other PoW/PoS crypto- currency)Z1 t(B1(s)D1(s))ds0 and Z1 t(B2(s)D2(s))ds0 for alls>twith at least one strict inequality. We assume that the consumption shocks in the two markets, dominant and Bitcoin, are roughly the same, D1B1 as both crypto-currencies are part of the same general economy (i.e., csis renderedCas in its initial definition), thus monetary shocks play a pivotal role: users prefer the stochastically dominant crypto-currency given the projected expected utility of its stochastically dominant monetary policy, D2, over Bitcoin’s B2(resp. any other PoW/PoS crypto-currency). 16 Theorem 10. (Dominant Expected Returns). A dominance relation- ship between the distribution of the monetary policy shock of the stochastically dominant crypto-currency, msD(D2), over Bitcoin, msB(B2), implies a rise Et(qt+1)6 of the price of the stochastically dominant crypto-currency Din terms of Bitcoin (resp. any other PoW/PoS crypto-currency). Proof.WhenD2dominatesB2in the first-order sense 8, then EtmmsB t+1EtmmsD t+1>0 and vice versa. Thus, EtmmsB t+1EtmmsD t+1=msB;tEt1 msB;t+1 msD;tEt1 msD;t+1 =Z1 tdB2(t)Z1 tdD2(t) =Z1 td(B2D2) =Z (D2B2)d1 t =Z (D2B2)1 t²dt> 0 and the consequent rise of Et(qt+1)as given by 6. 3.3.2 Efficient Stochastically Dominant Portfolio The stochastic dominance between two crypto-currencies of 8 and 9 further extends into a stochastically dominant portfolio of crypto-currencies. As in previous sections, we can distinguish between different orders of portfolio domin- ance: first (Definition 11), second (Definition 13), ..., SD k-orders (Definition 15) of portfolio dominance. Note that recent empirical research corroborates that the inclusion of crypto-currencies in portfolios is itself stochastically dominant [HNP+21, Rah20, MBN20, Coh21, TT18, AAT21]. GivenNalternatives and a random vector of their outcomes %, a decision maker can combine them into portfolios and all portfolio possibilities are denoted by  = 2RNj10= 1; n0; n= 1;2;:::;N Definition 11. Portfolio2dominates portfolio 2by the first-order stochastic dominance ( %0SD1%0) if F%0(x)SD1F%0(x);8x2R with strict inequality for at least one x2Rand withF%0(x)denoting the cumulative probability distribution of returns of portfolio . Necessary and sufficient conditions for the first-order stochastic dominance ( %0SD1%0) if: 17 •Eu(%0)Eu(%0)for all expected utility ( Eu) functions and strict inequality holds for at least some utility function •F1 %0(y)F1 %0(y)for ally2[0;1]with strict inequality for at least one y2[0;1] •VaR (%0)VaR(%0)for all 2[0;1]with strict inequality for at least one 2[0;1] Definition 12. A given portfolio 2is first-order stochastic dominant (Definition 11) inefficient if there exists portfolio 2such that%’SD1%’. Otherwise, portfolio is first-order stochastic dominant efficient. Second-order stochastic dominance can be similarly defined as first-order: Definition 13. Portfolio2dominates portfolio 2by the second-order stochastic dominance ( %0SD2%0) if and only if F(2) %0(y)SD2F(2) %0(y);8y2R with strict inequality for at least one y2Rand withF(2) %0(y)denoting the twice cumulative probability distribution of returns of portfolio . Necessary and sufficient conditions for the second-order stochastic dominance ( %0SD1%0) if: •Eu(%0)Eu(%0)for all expected concave utility functions and strict inequality holds for at least some concave utility function •Non-satiable and risk-averse decision maker prefers portfolio to portfolio and at least one prefers to •F2 %0(y)F2 %0(y)for ally2[0;1]with strict inequality for at least one y2[0;1], whereF2 %0(y)is a cumulated quantile function •CVaR (%0)CVaR(%0)for all 2[0;1]with strict inequality for at least one 2[0;1], where CVaR (r0) =min v2R;zt2R+v+1 1 SX t=1ptzt such thatztxtv; t = 1;2;:::;S Definition 14. A given portfolio 2is second-order stochastic dominant (Definition 11) inefficient if there exists portfolio 2such that%’SD2%’. Otherwise, portfolio is second-order stochastic dominant efficient. The previous two definitions, first-order and second-order, can be generalised to thek-order: 18 Definition 15. Portfoliodominates portfolio with respect to the k-order stochastic dominance ( SDk) ifEu(%0)Eu(%0)for all utility functions u2Unwith strict inequality for at least one such utility function, with UN being the set of Ntimes differentiable utility functions such that: (1)iu(i)0 for alli= 1;2;:::;N. Definition 16. A given portfolio is SDk-efficient (k2) if there exists at least one utility function u2UNsuch thatEu(%0)Eu(%0)0for all2 with strict inequality for at least one 2. And the previous one period stochastic dominance can be generalised to the multi-period setting: Theorem 17. ( [Lev73] ). LetFn(x)andGn(x)be the cumulative distributions of twon-period risks where nis the number of periods and xis the product of the returns corresponding to each period ( x=x1;x2;:::;xn). Then, a sufficient condition for Fndominance over Gnby first-order stochastic dominance for every non-decreasing utility function is that such dominance exists in each period, namely: Fi(xi)Gi(xi);8i;(i= 1;2;:::;n ) and there is at least one strict inequality, namely: Fi(xi0)<Gi(xi0) for somexi0. Theorem 18. ( [Lev73] ). A sufficient condition for Fndominance over Gnby second-order stochastic dominance for all non-decreasing concave utility functions is that such dominance exists in each period, namely: Zxi 0[Gi(ti)Fi(ti)]dti0;8i;(i= 1;2;:::;n ) and there is at least one strict inequality. Finally, notethattheconceptofstochasticdominancealsoextendstostrategy- proof allocation rules and game strategies: Definition 19. . A strategy sisstochastic dominance strategy-proof if, for all investorsi2I, all security ranking profiles (Ri;Ri)2RI, and all misreports R0 i2R, investori’s assignment xi;j2si(Ri;Ri)stochastically dominates yi;j2si R0 i;Ri atRi(i.e., independent of the other investors’ ranking reports), that is,X si(Ri;Ri)xi;jX si(R0 i;Ri)yi;j 19 Alternatively, stochastic dominance strategy-proof can also be defined in terms of expected utility if, for all utility functions ui2URi, we have that Eusi(Ri;Ri)(ui)Eusi(R0 i;Ri)(ui) All the previous definitions naturally lead to the following theorem regarding the stochastically dominant crypto-currency: Theorem 20. The efficient portfolio is to go long on the stochastically domin- ant crypto-currency: thus, the stochastically dominant strategy-proof allocation rule for any investor is to hold this efficient portfolio with the stochastically dominant crypto-currency. Furthermore, a higher return can be expected from the stochastically-dominant crypto-currency. Proof.Given a stochastic ranking of policy rules 3.14 of a stochastic ordering (Definition 1) of monetary policy rules 3.6 that generates a stochastically dom- inant crypto-currency by first-order 8 or second-order 9 dominance: then, the SDk-efficient portfolio 16 (also, first-order 12 or second-order 14 efficient) that dominates with respect to the k-order stochastic dominance 15 (also, first-order 11 or second-order 13 dominant) is the portfolio containing the stochastically dominant crypto-currency as, by definition, this the one crypto-currency with the SDk-optimal policy rule 3.14 that SD kdominates (Definition 1) all the other policy rules. The proof extends trivially to the multi-period case by Theorems 17 and 18. Moreover, for all investors i2I, the stochastically dominant strategy-proof allocationrule19istoholdtheSD k-efficientportfolio16withthecrypto-currency with the SD k-optimal policy rule 3.14. Furthermore, a higher return can be expected from the stochastically- dominant crypto-currency by the iterated deletion of strictly dominated strategies when extending Theorem 10 to the market portfolio setting. Finally, the efficient and strategy-proof portfolio of Theorem 20 induces an investment-efficient Nash equilibrium: Definition21. A mechanism Minduces efficient investment within by investor i2Iif, for all valuation functions vIrfig2VIrfig, if ^vi2arg max ~vi2Vin E(vi;vIrfig)h ui M vi;vIrfig ;vii ci ~vio then we have E(^vi;vIrfig)h V M vi;vIrfig ; vi;vIrfigi ci ^vi + sup vi2Vin E(~vi;vIrfig)h V M vi;vIrfig ; vi;vIrfigi ci ~vio for all cost functions ci. In other words, a mechanism induces efficient in- vestment by iwithinif, assuming agents report truthfully, every expected utility-maximising investment choice by imaximises expected social welfare within. 20 Theorem22. For any stochastic uncertainties 0and0, if the portfolio is approximately strategy-proof 19 within for investor iand approximately efficient within(i.e., first-order 12, second-order 14 or SD k-efficient 16 ), then it induces an approximately efficient investment within (+)(#Crypto-currencies )toi, independent of the other investors’ investments. Furthermore, the stochastically dominant crypto-currency induces a Nash equilibrium over the crypto-currency market that maximises ex-ante social welfare. Proof.Follows trivially from Theorem 5 and Corollary 2 of [ HKK19]. It also holds in expectations for any given investment choice profile of the other agents using Theorem 7 from [HKK19]. Remark23.On the immovable commitment of crypto-currency monet- ary policy rules and the lack of discretion : most crypto-currencies follow the example of Bitcoin, where the monetary policy was fixed since its launch and it was pre-announced that it will never change. This is in stark contrast with the monetary policy of fiat currencies, where discretion is preferred in case of a financial crisis. In other words, the widely accepted monetary policy stance of crypto-currencies to fix their monetary policies not only leaves them vulnerable to a financial crisis, but also turns them into dominated crypto-currencies by stochastically dominant crypto-currencies. 3.3.3 Omega ratio of Stochastically Dominant Crypto-currencies TheOmegaratio[ KS02]isarisk-returnperformancemeasureofanasset, portfolio, or strategy which takes into account all the higher moment information in the returns distribution and also incorporates sensitivity to return levels, unlike the Sharpe ratio. It is defined as the probability-weighted ratio of gains versus losses for some threshold return target , () =R1 [1F(r)]dr R 1F(r)dr=wTE(r) E (wTr)++ 1 Note that first-order stochastic dominance 11 implies Omega ratio dominance: Theorem24. (Theorem 2, [ GJW17]). For any two returns XandYwith means XandYand Omega ratios X()and Y(), respectively, if XSD1Y, then X() Y()for any2R. Corollary 25. The efficient portfolio long on the stochastically dominant crypto- currency of Theorem 20 has a higher Omega ratio for any return threshold. 3.3.4 Arbitraging with Stochastic Dominance If there exists a First-order Stochastic Dominance between two assets 8, under certain conditions, arbitrage opportunities will also exist: thus investors will increase not only their expected utilities, but also their wealth if they shift their holdings to the dominant asset from the dominated one (i.e., a risk-free investment opportunity with positive returns). 21 Theorem 26. (Arbitrage versus Stochastic Dominance - [ Jar86]). Given a complete market M, there exists an arbitrage opportunity if and only if there exists assets xandy2Msuch that: •xSD1y •[Pi(y )Pi(x )]0for all 2Rand for some investor i2I, wherePi()is theith investor’s subjective probability belief over the finite number of states of nature In other words, arbitrage implies First-order Stochastic Dominance but the inverse is not necessarily true: it’s only true when the cumulative distribution functions of the assets are perfectly correlated or the risky asset is a monotone function of the asset even in the absence of perfect correlation. Note that crypto-currency markets are unusually highly correlated compared to other asset markets. In practice, empirical studies may statistically detect First-order Stochastic Dominance, but arbitrage opportunities may not exist: nonetheless, investors can increase their expected utilities, as well as their expected wealth, if they shift their holdings to the dominant asset from the dominated one [WPL08]. 4 Model and Policies DSGE models constitute the modern workhorse of monetary policy analysis, with a recent survey finding 84 models used by 58 institutions [ Yag20]. In this section, a Dynamic Stochastic General Equilibrium (DSGE) parsimonious model is introduced to an economy featuring a Central-Bank Digital Currency (CBDC) and a crypto-currency, calibrated and estimated for the United States. The model is further simplified by opting for a closed-economy instead of a small open-economy, justified by previous results showing that optimal policies under parameteruncertainty lackexchangerate responses [ JP10] andthatwelfare loss functions for small open economies do not include foreign variables when the calibration is imposed [GM05]. 4.1 Monetary Policy Rules The following monetary policy rules are implemented in this model. 4.1.1 Central Bank Taylor’s rule for the monetary policy: it= (21) (i) +1it1+3 1Mt1 Yt1 + (21) ((t) +y(log(Yt)log(Yt1))) +it(4.1) whereiare smoothing parameters and is the inflation feedback coefficient. 22 4.1.2 Bitcoin’s Monetary Policy Although Bitcoin’s monetary policy is not described in its paper, its implementa- tion appears in the source code [ Nak09a]: the initial reward of 50 BTC is halved every 210,000 blocks (4 years), and each block is mined approximately every 10 minutes. The supply formula in block time is given by, B(t) =min(t;T)X t=150 2H(t)(4.2) H(t) =t 210000 (4.3) wheretis the block height, H(t)is the number of reward halvings up to block t, andT= 33x210000. Bitcoin supply is limited beyond block T, given by Btotal=32X i=050 2i2100002:1107(4.4) Equation 4.2 can be fitted as an exponential curve, given by: SBTC t = 2:1107 1 t (4.5) whereStis the supply in period t, and is the growth rate with 0:825for yearly periods and 0:953for quarterly periods. The previous exponential curve can be rewritten in recursive form as: f0= 2:1107(4.6) ft= 0:825ft1 (4.7) SBTC t = 2:1107ft (4.8) or equivalently: SBTC t+1=SBTC t + (1 ) 2:1107SBTC t (4.9) = SBTC t + (1 )2:1107(4.10) The following figure displays the evolution of bitcoin supply assuming exact 10-minute confirmation times. 23 Figure 4.1: Bitcoin’s controlled supply[Wik22] As previously pointed out in Figure 2.1 comparing the relative supply of crypto-currencies, most crypto-currencies follow similar supply curves but use different parameters: therefore, without loss of generality we will only consider Bitcoin in this paper in representation of all the other crypto-currencies. Note that Bitcoin’s monetary policy is independent of any observable variable (e.g., inflation, output, ....) and Satoshi Nakamoto pre-committed not to ever modify it: in macro-economics, this monetary policy can be interpreted as a deflationary version of Friedman’s k-percent rule[ FS63] (i.e., constant money growth). Following Poole’s classical Keynesian analysis [ Poo70] in a stochastic IS- LMmodel, monetarypoliciestargetingonlythemoneystockallowmoneydemand shocks to contribute to macroeconomic volatility: indeed, recent analysis in modern New Keynesian models [ Ire00,CD05,Gal15] demonstrate that constant money growth rules lead to excess volatility in both output and inflation when the economy faces money demand shocks, or other disturbances that require output and inflation to adjust. This situation is further aggravated by an inelastic supply curve in both the short and the long term: as the following comparative chart shows 4.2, supply inelasticities imply dramatic price changes with even minor changes in demand, thus contributing to Bitcoin’s volatility. 24 Figure 4.2: Elastic v. Inelastic Supply Charts However, money growth rules perform much better when they are able to adjust to movements in the output gap and inflation as exemplified by the two following rules 4.11 and 4.12: advantageously, these money growth rules are able to stabilise inflation by pre-committing to an average rate of money growth and focusing directly on stabilising the output gap over shorter time horizons, instead of the aggressive responses to inflation needed by interest rate rules (i.e., Taylor’s rule). 4.1.3 Ethereum 2.0’s Monetary Policy Other crypto-currencies feature a much more complex monetary policy than Bitcoin’s monetary policy 4.1.2, although in essence they all suffer from the same shortcoming: they fail to react to changes in inflation, output gap, or any other macro-economic aggregate (unlike the monetary policy presented in this paper). For the particular case of Ethereum 2.0 after transitioning to Proof-of-Stake (a.k.a., “the Merge”), the monetary policy will be described by the following features: •almost deflationary by default: issuance reduced from 2 Ether/block to a variable number depending on the total amount of Ether at stake (currently around 13.3MM ETH), which will be around 600K ETH/year, implying a 90% reduction •deflationary burning of transaction fees (EIP-1559) •double use as store of value and gas for smart contracts 25 Accounting in a monetary policy rule for all the previous features will only make it more deflationary, thus less reactive to changes in the macro-economic environment (i.e., a narrower path of policy responses) and therefore much more stochastically dominated even than Bitcoin’s monetary policy 4.1.2. 4.1.4 McCallum’s Policy Rule A classical monetarist policy, McCallum’s rule [MN99] is specified by: bt= x(xt1bt1xt17+bt17) 16+ x t1xt1 (4.11) where the previous variables are defined as: •btis the logarithm of the adjusted monetary base •xtis the logarithm of the adjusted nominal GDP •x tis the target value of xtfor quarter t(growing smoothly at the rate x). The second term provides a velocity growth adjustment intended to reflect long- lasting institutional changes, while the third term features feedback adjustment inbtin response to cyclical departures of xtfrom the target path x t, with 0chosen to balance the speed of eliminating x txtgaps against the danger of instrument instability. 4.1.5 A Reconsideration of Money Growth Rules If the Federal Reserve would have used a money rule targeting money growth instead of the interest rate during the 2007-2009 recession, the US economy would have recovered more quickly, and during the 2009-2015 period of zero nominal interest rates, it would have stabilised output and inflation with comparable performance [ BI22]. While the recent consensus was that policy rules using constant rates of money growth would have performed poorly in comparison to Taylor rules, recent work [ BI22] shows that money growth rules augmented to adjust to movements in the output gap and inflation in a manner similar to the Taylor rule will perform significantly better, on par with more conventional Taylor rules for the interest rate. Thus, the reconsidered money growth rule is given by ln (t=) =mmln (t1=) +mln (t=) +mxln (xt=x)(4.12) where the previous variables are defined as: •t=Mt=Mt1denotes the growth rate of nominal money •denotes the steady-state rate of money growth •denotes the steady-state rate of inflation 26 •xdenotes the steady-state values of the output gap Depending on the values of the parameters, the following cases can be considered: •m=m=mx= 0is theconstant money growth rule as advocated by Friedman [FS63] •m<0andmx<0allow to stabilise inflation and the output gap in response to shocks •m<0,mx<0andmm>0prescribe a gradual response of money growth to movements in inflation and the output gap, much like the Taylor rule with interest rate smoothing 4.2 Ranking of Policy Rules 5 Implementation Details The calculation of the stochastically-dominant optimal monetary policy is imple- mented using Dynare [ ABJ+22] with an additional 225.000 MATLAB/Octave LOCs. 5.1 Global Implementation Different countries feature different macro-economic indicators (inflation, interest rate, output, GDP growth, exchange rates...), thus it is very important for the consensus protocol to be aware of the different nationalities of its participants (nodes and/or users): Pravuil [ Cer21] is specifically designed for an international setting as it integrates national identity cards and biometric passports in layer 1, making it ideal to implement different monetary policies in different countries. Furthermore, the combination of Zero-Knowledge Proof of Identity[ Cer19b] with the Zero-Knowledge Stochastically Dominant crypto-currency induces the following pincer manoeuvre: 27 Figure 5.1: Pincer manoeuvre inducing a downward spiral on PoW/PoS crypto- currencies (in red) and a virtuous cycle for the Zero-Knowledge Stochastically Dominant crypto-currency (in green) 5.2 Zero-Knowledge Monetary Policy To understand the reason behind the lack of advanced monetary policies in crypto-currencies as the ones described in this paper in subsections 4.1, one has to look back to a reply by Satoshi Nakamoto [ Nak09b] on its original post announcing the first implementation of Bitcoin: Indeed there is nobody to act as central bank or federal reserve to adjust the money supply as the population of users grows. That would have required a trusted party to determine the value, because I don’t know a way for software to know the real world value of things. If there was some clever way, or if we wanted to trust someone to actively manage the money supply to peg it to something, the rules could have been programmed for that. Fortunately, the author of this paper is more knowledgeable: this subsection describes a zero-knowledge protocol to securely compute monetary policies using authenticated economic series and commit their resulting zero-knowledge proofs on the blockchain. 28 Figure 5.2: Committing zero-knowledge monetary policies on a blockchain As pictured in the Figure 5.2 above, there are 3 parties to the protocol: •Miner: commits transactions to the blockchain and gets rewarded accord- ing to a monetary policy rule using data from providers of authenticated economic series, and optionally its own private data. •Providers of Authenticated Economic Series : take economic series from public providers (e.g., FRED, db.nomics, ...) and authenticate their data on the blockchain by signing with their private keys skecon, so it can later be verified by everyone with the public key pkecon. •BlockchainValidators : blockchainnodesthatverifytransactions, blocks, and proofs. As previously discussed 5.1, they should be running the Pravuil [Cer21] consensus protocol. 5.2.1 Security Model The security model is defined with an ideal functionality FzkMonetaryPolicy that rigorously sets the security requirements of the zero-knowledge protocol: •Initialisation : the blockchain is initialised with public input data pand a computation circuit C •AuthenticateEconomicData : the provider of Authenticated Economic Series sends a data authentication request to obtain the digital signature seconover (datapublic ). •zk-CommitMonetaryPolicy : miners request with authenticated data containing inputpublic;inputprivate,thehashhofinputs,andthe outputminer. 29 Ideal Functionality FzkMonetaryPolicy FzkMonetaryPolicy interacts with the adversary A, the miner, the providers of authenticated economic series, the ideal functionality Fsigand the ideal blockchain ledger functionality Lwith the following queries: •Initialisation : upon receiving (init;C;p )on initialisation: –store the circuit Cand the public input data p –send (init;C;p )toA •AuthenticateEconomicData : upon receiving (authenticate; datapublic )from a provider of authenticated economic series: –send (sign;provider; datapublic )toFsigand receives signature secon –send (sign;provider; datapublic )toA •Validate : uponreceiving validate; outputminer;inputpublic;inputprivate;h;secon from a miner: –send (verify;provider;h;s econ)toFsigand check that it’s correct –check that p;outputminer;inputpublic;inputprivate;h satisfies the circuitC –send validate; outputminer;inputpublic;h;secon toA The ideal functionality FzkMonetaryPolicy captures the following design goals: •Authenticity : blockchain validators execute only on resulted computa- tions from providers of authenticated economic series, rejecting otherwise. •Privacy : the private data of the miner is never exposed to anyone, and the blockchain validators are executed correctly without the private data using the zero-knowledge proof. 5.2.2 Protocol Description and Implementation Using a zero-knowledge SNARK scheme , the steps of the proposed scheme would be as follows: •Initialisation : A security parameter 1is picked in accordance with the security requirements, and a circuit Cis constructed for the computation over the authenticated data. Then, a trusted generator or a MPC protocol setups the zk-SNARK with 1;C to create the Common Reference String for proof generation and verification. Concurrently, the provider of authenticated economic series chooses a public/private key pair (pkecon;skecon). Only then, (CRS;pkecon)are published on the blockchain for everyone to check their validity. 30 •AuthenticateEconomicData : providersofauthenticatedeconomicseries obtain signatures seconwith parameters (skecon;(h;datapublic )). •zk-CommitMonetaryPolicy : miner uses circuit Cof the monetary policytoobtaintheresult outputminerandahashhof inputpublic;inputprivate ; then, the miner executes the zk-SNARK for proving with parameters CRS;p;inputpublic;inputprivate;outputminer;h obtainingthezero-knowledge proof. Then, the miner sends a transaction to the blockchain validators as follows: txskminer = validate;; inputpublic;outputminer;h •Validation : blockchain validators verify the zk-SNARK with parameters CRS;pkecon;;p;inputpublic;outputminer;h : onlyincaseit’sfoundvalid, then the block from the miner is accepted with the computed monetary policy. 31 zkMonetaryPolicy Protocol Miner: •zk-CommitMonetaryPolicy : on input commit;p; inputpublic;inputprivate;outputminer;h –prove with zk-SNARK: =Prove CRS;p;inputpublic;inputprivate;outputminer;h –sendtxskminer = validate;; inputpublic;outputminer;h to the blockchain validator Providers of Authenticated Economic Series : •Initialisation : –(pkecon;skecon) =KeyGeneration 1 •Commit Authenticated Economic Data : –compute h =Hash (datapublic )andsecon = Sign (skecon;(h;datapublic )) –send (h;secon)to the blockchain Blockchain Validators: •Initialisation : upon receiving (init;C;p;CRS;pk econ) –Store the public input data pforC –Store the common reference string CRS and pkecon •Validation : upon receiving validate;; inputpublic;outputminer;h –Check that his stored on the blockchain –Checkthatzk-SNARK CRS;pkecon;;p;inputpublic;outputminer;h is valid –If valid, proceed to store the transactions, block, and associated zk-proof The following theorem formalises the security and privacy of the above scheme: Theorem 27. Ifis a simulation-extractable zk-SNARK with data authentica- tion scheme, then the above scheme is a privacy-preserving scheme under the universally composable framework. Proof.See I. Corollary 28. In the implementation, a simulation-extractable zk-SNARK such 32 as Plonk must be used [ GKK+21], even if it has larger proofs than other more succinct zk-SNARKs. An implementation in Go using gnark[ BPH+22] is available at https:// github.com/Calctopia-OpenSource/cothority/tree/zkmonpolicy 6 Conclusion The present paper has tackled and successfully solved the problem of optimal monetary policies specifically tailored for crypto-currencies, stochastically domin- ating all the other previous crypto-currencies. Furthermore, the efficient portfolio is to hold the stochastically dominant crypto-currency implementing the optimal monetary policy, a strategy-proof arbitrage featuring a higher Omega ratio with a higher expected return, inducing a Nash equilibrium over the crypto-currency market. References [AAT21] Sofia Anyfantaki, Stelios Arvanitis, and Nikolas Topaloglou. Diver- sification benefits in the cryptocurrency market under mild explos- ivity, 2021. https://www.sciencedirect.com/science/article/ abs/pii/S0377221721001715 . [ABJ+22]Stéphane Adjemian, Houtan Bastani, Michel Juillard, Fréderic Karamé, Ferhat Mihoubi, Willi Mutschler, Johannes Pfeifer, Marco Ratto, and Normann Rion Sébastien Villemot. Dynare: Ref- erence Manual Version 5, 2022. https://www.dynare.org/wp- repo/dynarewp072.pdf . [And08] Gary S. Anderson. Solving Linear Rational Expectations Models: A Horse Race, 2008. http://dx.doi.org/10.1007/s10614-007- 9108-0. [BGW14] Benjamin Blau, Todd Griffith, and Ryan Whitby. The Technology andEconomicDeterminantsofCryptocurrencyExchangeRates: The Case of Bitcoin, 2014. https://papers.ssrn.com/sol3/papers. cfm?abstract_id=2515233 . [BGW21] Benjamin Blau, Todd Griffith, and Ryan Whitby. Inflation and Bitcoin: A descriptive time-series analysis, 2021. https://www. sciencedirect.com/science/article/pii/S0165176521001257 . [BI22] Michael T. Belongia and Peter Ireland. A Reconsideration of Money Growth Rules, 2022. www.irelandp.com/papers/mgrules.pdf . [BK16] John Barrdear and Michael Kumhof. The Macroeconomics of Central Bank Issued Digital Currencies, 2016. https://papers.ssrn.com/ sol3/papers.cfm?abstract_id=2811208 . 33 [BPH+22]Gautam Botrel, Thomas Piellard, Youssef El Housni, Ivo Kubjas, and Arya Tabaie. ConsenSys/gnark: v0.7.0, March 2022. https: //doi.org/10.5281/zenodo.6387958 . [CD05] Fabrice Collard and Harris Dellas. Poole in the New Keynesian Model, 2005. https://core.ac.uk/download/pdf/6489568.pdf . [Cer19a] David Cerezo Sánchez. Truthful and Faithful Monetary Policy for a Stablecoin Conducted by a Decentralised, Encrypted Artificial Intelligence, 2019. https://ia.cr/2019/1054 . [Cer19b] David Cerezo Sánchez. Zero-Knowledge Proof-of-Identity: Sybil- Resistant, Anonymous Authentication on Permissionless Blockchains and Incentive Compatible, Strictly Dominant Cryptocurrencies, 2019. https://eprint.iacr.org/2019/546 . [Cer21] David Cerezo Sánchez. Pravuil: Global Consensus for a United World, 2021. https://ia.cr/2021/669 . [CLL+17]Shaen Corbet, Charles Larkin, Brian Lucey, Andrew Meegan, and Larisa Yarovaya. Cryptocurrency Reaction to FOMC An- nouncements: Evidence of Heterogeneity Based on Blockchain Stack Position, 2017. https://papers.ssrn.com/sol3/papers. cfm?abstract_id=3073727 . [CMC21] Thomas Conlon, Richard McGee, and Shaen Corbet. Inflation and Cryptocurrencies Revisited: A Time-Scale Analysis, 2021. https: //papers.ssrn.com/sol3/papers.cfm?abstract_id=3890938 . [Coh21] Gil Cohen. Trading Cryptocurrencies Using Second Order Stochastic Dominance, 2021. https://www.mdpi.com/2227-7390/ 9/22/2861/htm . [CS20] Sangyup Choi and Junhyeok Shin. Brave New World? Bit- coin is not the New Gold: Understanding Cryptocurrency Price Dynamics, 2020. https://papers.ssrn.com/sol3/papers.cfm? abstract_id=3555599 . [CS21] Sangyup Choi and Junhyeok Shin. Bitcoin: An Inflation Hedge but Not a Safe Haven, 2021. https://www.sciencedirect.com/ science/article/pii/S1544612321003810 . [FS63] Milton Friedman and Anna Schwartz. A Monetary History of the United States, 1867-1960, 1963. https://archive.org/details/ monetaryhistoryo0000unse_y4p6 . [FV20] Jesús Fernández-Villaverde. Simple Rules for a Complex World with Artificial Intelligence, 2020. https://papers.ssrn.com/sol3/ papers.cfm?abstract_id=3559378 . 34 [Gal15] Jordi Galí. Monetary Policy, Inflation, and the Busi- ness Cycle, 2015. https://press.princeton.edu/books/ hardcover/9780691164786/monetary-policy-inflation-and- the-business-cycle . [Gal19] Alexander Galea. Crypto Monetary Base: Relative Coin Supply, 2019. https://github.com/agalea91/crypto-monetary-base . [GJW17] Xu Guo, Xuejun Jiang, and Wing-Keung Wong. Stochastic Dom- inance and Omega Ratio: Measures to Examine Market Efficiency, Arbitrage Opportunity, and Anomaly, 2017. https://www.mdpi. com/2227-7099/5/4/38/pdf . [GKK+21]Chaya Ganesh, Hamidreza Khoshakhlagh, Markulf Kohlweiss, Anca Nitulescu, and Michal Zajac. What Makes Fiat–Shamir zkSNARKs (Updatable SRS) Simulation Extractable? Cryptology ePrint Archive, Paper 2021/511, 2021. https://eprint.iacr.org/2021/ 511. [GM05] Jordi Galí and Tommaso Monacelli. Monetary Policy and Exchange Rate Volatility in a Small Open Economy. The Review of Eco- nomic Studies , 72(3):707–734, 07 2005. https://doi.org/10.1111/ j.1467-937X.2005.00349.x . [HG16] Hanna Halaburda and Neil Gandal. Can We Predict the Win- ner in a Market with Network Effects? Competition in Crypto- currency Market, 2016. https://papers.ssrn.com/sol3/papers. cfm?abstract_id=2506463 . [HKK19] John Hatfield, Fuhito Kojima, and Scott Kominers. Strategy- Proofness, Investment Efficiency, and Marginal Returns: An Equivalence, 2019. https://papers.ssrn.com/sol3/Papers.cfm? abstract_id=2544951 . [HNP+21]Weihao Han, David Newton, Emmanouil Platanakis, Charles Sutcliffe, and Xiaoxia Ye. On the (Almost) Stochastic Dominance of Cryptocurrency Factor Portfolios & Implications for Crypto- currency Asset Pricing, 2021. https://papers.ssrn.com/sol3/ papers.cfm?abstract_id=3857315 . [Hsi21] Shisong Hsiao. Monetary policy shocks and Bitcoin prices, 2021. https://papers.ssrn.com/sol3/papers.cfm?abstract_ id=3947979 . [Ire00] Peter Ireland. Interest Rates, Inflation, and Federal Reserve Policy Since 1980, 2000. http://fmwww.bc.edu/EC-P/wp419.pdf . [Jar86] Robert Jarrow. The Relationship between Arbitrage and First Or- der Stochastic Dominance, 1986. https://www.jstor.org/stable/ 2328236. 35 [JP10] Alejandro Justiniano and Bruce Preston. Monetary policy and uncertainty in an empirical small open-economy model. Journal of Applied Econometrics , 25(1):93–128, 2010. https://doi.org/10. 1002/jae.1153 . [Kar21] Sören Karau. Monetary policy and Bitcoin, 2021. https://papers. ssrn.com/sol3/papers.cfm?abstract_id=3988527 . [KS02] Con Keating and William F. Shadwick. A Universal Perform- ance Measure, 2002. http://www.performance-measurement.org/ KeatingShadwick2002a.pdf . [Lev73] Haim Levy. Stochastic Dominance, Efficiency Criteria, and Efficient Portfolios: The Multi-Period Case, 1973. https://doi.org/10. 1142/9789814417358_0018 . [Lev16] Haim Levy. Stochastic Dominance: Investment Decision Making under Uncertainty, 2016. https://link.springer.com/book/10. 1007/978-3-319-21708-6 . [LZ09] Li-gang Liu and Wenlang Zhang. A New Keynesian model for analysing monetary policy in Mainland China, 2009. https://www.hkma.gov.hk/media/eng/publication-and- research/research/working-papers/HKMAWP07_18_full.pdf . [MBN20] Mourad Mroua, Slah Bahloul, and Nader Naifar. Should investors include bitcoin in their portfolio? New evidence from a bootstrap- based stochastic dominance approach, 2020. https://doi.org/10. 1080/13504851.2020.1855302 . [MIOT19] Makiko Mita, Kensuke Ito, Shohei Ohsawa, and Hideyuki Tanaka. What is Stablecoin?: A Survey on Its Mechanism and Potential as Decentralized Payment Systems, 2019. https://arxiv.org/abs/ 1906.06037 . [MJYW14] Michel M.Denuit, Rachel J.Huang, Larry Y.Tzeng, and Christine W.Wang. Almost marginal conditional stochastic dominance, 2014. https://www.sciencedirect.com/science/article/abs/ pii/S037842661300486X . [MN99] Bennett T. McCallum and Edward Nelson. Performance of Opera- tional Policy Rules in an Estimated Semiclassical Structural Model, 1999. http://www.nber.org/chapters/c7413 . [Nak09a] Satoshi Nakamoto. Bitcoin’s initial function GetBlock- Value(), 2009. https://github.com/bitcoin/bitcoin/blob/ 8dca7864f793072701f810e4c5ea12a6e1087085/main.cpp#L675 . 36 [Nak09b] Satoshi Nakamoto. Re: Bitcoin open source implementation of P2P currency, 2009. http://p2pfoundation.ning.com/xn/detail/ 2003008:Comment:9562 . [PF21] Marco Patacca and Sergio Focardi. The Quantitative Easing Bursts Bitcoin Price, 2021. https://papers.ssrn.com/sol3/papers. cfm?abstract_id=3920808 . [PL19] Sujin Pyo and Jaewook Lee. Do FOMC and macroeconomic an- nouncements affect Bitcoin prices?, 2019. https://doi.org/10. 1016/j.frl.2019.101386 . [Poo70] William Poole. Optimal Choice of Monetary Policy Instruments in a Simple Stochastic Macro Model, 1970. https://www.bu.edu/econ/ files/2011/01/PooleQJE.pdf . [Rah20] Monireh Rahiminejat. Does Bitcoin improve optimal portfolios? A stochastic spanning approach, 2020. http://repository.bilkent. edu.tr/bitstream/handle/11693/54198/10362152.pdf . [SY84] Haim Shalit and Shlomo Yitzhaki. Marginal Conditional Stochastic Dominance, 1984. https://www.jstor.org/stable/2632865 . [Tay20] John B. Taylor. Simple Monetary Rules: Many Strengths and Few Weaknesses, 2020. https://web.stanford.edu/~johntayl/2020_ pdfs/Taylor%20paper%20for%20NYU%20conference%20Feb%2028- Paper-MCS-JBT-v2.pdf . [TT18] Nikolas Topaloglou and Georgios Tsomidis. Investors’ Beha- vior in Cryptocurrency Market, 2018. https://www2.aueb.gr/ conferences/Crete2019/Papers/Tsomidis.pdf . [Wik22] Bitcoin Wiki. Bitcoin’s Controlled Supply, 2022. https://en. bitcoin.it/wiki/Controlled_supply . [WPL08] Wing-Keung Wong, Kok Fai Phoon, and Hooi Hooi Lean. Stochastic dominance analysis of Asian hedge funds, 2008. https://scholars.hkbu.edu.hk/en/publications/1f0e212c- 49ea-4f6d-983a-d05b22c90015 . [Yag20] Takeshi Yagihashi. DSGE Models Used by Policymakers: A Sur- vey, 2020. https://www.mof.go.jp/pri/research/discussion_ paper/ron333.pdf . 37 Part I Appendix Proof.(Theorem 27 ) . The protocol 5.2.2 securely realises the ideal function- alityFzkMonetaryPolicy 5.2.1: by using the universal composability framework, we first show an ideal-world simulator for the dummy adversary Aautomatically passing messages to and from the actual adversary, the environment E; then, we show the indistinguishability of the ideal and the Fsig-Hybrid worlds. Ideal-world simulator . For conciseness, we only focus on the simulator S and not on the blockchain functionality. -Initialisation : simulatorSobtains[CRSand a trapdoor by running a simulated setup algorithm of the zk-SNARK scheme . Then, simulator Skeeps and sends[CRStoE. -Simulatinghonestparties (notethatonly zk-CommitMonetaryPolicy needstobesimulated): Esends validate; outputminer;inputpublic;inputprivate;h toanhonestminerandsimulator Sreceives validate; outputminer;inputpublic;h from the ideal functionality FzkMonetaryPolicy ; then, simulator Sgenerates an indistinguishable proof using trapdoor (i.e., without knowing inputprivate). Finally,Ssends validate;; inputpublic;outputminer;h to the blockchain val- idators. -Simulating corrupted parties :Erequests to the simulator Son be- half of corrupted parties; then Sprocesses as follows: Sreceives (validate; outputminer;inputpublic;inputprivate;h)and extracts inputprivatefrom the proof using the trapdoor , then sends validate;; inputpublic;outputminer;h to FzkMonetaryPolicy . Indistinguishability between the ideal and the Fsig-Hybrid worlds : a series of games from the Fsig-Hybrid protocol execution until the ideal world. -Fsig-Hybrid model : a dummy adversary passes messages for the environ- mentE, the actual adversary. -HybridH1: adds to theFsig-Hybrid world calls to the simulated setup that generates (kept by the simulator) and [CRS, sent toE.H1replaces the real proofs with the simulated proofs using [CRSand: due to the computational zero-knowledge property, H1is computationally indistinguishable from the Fsig- Hybrid world. -HybridH2: adds the simulation of the blockchain to the H1world. From the adversaryE’s point of view, H2is indistinguishable from H1because the blockchain functionality is public. -HybridH3: adds to theH2world, the extraction of the private witness from a zero-knowledge proof bySif it is a valid proof, otherwise aborts. H3 is indistinguishable from H2because the abort probability is negligible due to the simulation extractability property of the zk-SNARK. Finally, the ideal and the Fsig-Hybrid world are computationally indistin- guishable because H3is computationally indistinguishable for Efrom the ideal 38 simulation. Note that any universal-composable signature scheme can implement Fsigdue to the universal composition theorem. 39
{ "id": "2210.06139" }
1712.02027
Evolutionary Game for Mining Pool Selection in Blockchain Networks
In blockchain networks adopting the proof-of-work schemes, the monetary incentive is introduced by the Nakamoto consensus protocol to guide the behaviors of the full nodes (i.e., block miners) in the process of maintaining the consensus about the blockchain state. The block miners have to devote their computation power measured in hash rate in a crypto-puzzle solving competition to win the reward of publishing (a.k.a., mining) new blocks. Due to the exponentially increasing difficulty of the crypto-puzzle, individual block miners tends to join mining pools, i.e., the coalitions of miners, in order to reduce the income variance and earn stable profits. In this paper, we study the dynamics of mining pool selection in a blockchain network, where mining pools may choose arbitrary block mining strategies. We identify the hash rate and the block propagation delay as two major factors determining the outcomes of mining competition, and then model the strategy evolution of the individual miners as an evolutionary game. We provide the theoretical analysis of the evolutionary stability for the pool selection dynamics in a case study of two mining pools. The numerical simulations provide the evidence to support our theoretical discoveries as well as demonstrating the stability in the evolution of miners' strategies in a general case.
http://arxiv.org/pdf/1712.02027v4
Xiaojun Liu, Wenbo Wang, Dusit Niyato, Narisa Zhao, Ping Wang
cs.GT
cs.GT
arXiv:1712.02027v4 [cs.GT] 29 Dec 20171 Evolutionary Game for Mining Pool Selection in Blockchain Networks Xiaojun Liu∗†, Wenbo Wang†, Dusit Niyato†, Narisa Zhao∗and Ping Wang† ∗Institute of Systems Engineering, Dalian University of Tec hnology, Dalian, China, 116024 †School of Computer Engineering, Nanyang Technological Uni versity, Singapore, 639798 Abstract —In blockchain networks adopting the proof-of-work schemes, the monetary incentive is introduced by the Nakamo to consensus protocol to guide the behaviors of the full nodes ( i.e., block miners) in the process of maintaining the consensus ab out the blockchain state. The block miners have to devote their computation power measured in hash rate in a crypto-puzzle solving competition to win the reward of publishing (a.k.a. , mining) new blocks. Due to the exponentially increasing dif ficulty of the crypto-puzzle, individual block miners tends to join mining pools, i.e., the coalitions of miners, in order to reduce the income variance and earn stable profits. In this paper, we study the dynamics of mining pool selection in a blockchain network, w here mining pools may choose arbitrary block mining strategies. We identify the hash rate and the block propagation delay as two major factors determining the outcomes of mining competiti on, and then model the strategy evolution of the individual mine rs as an evolutionary game. We provide the theoretical analysis o f the evolutionary stability for the pool selection dynamics in a case study of two mining pools. The numerical simulations provid e the evidence to support our theoretical discoveries as well as demonstrating the stability in the evolution of miners’ str ategies in a general case. Index Terms —Blockchain, proof-of-work, mining pool, evolu- tionary game I. I NTRODUCTION Since its introduction in the grassroot online project “Bit - coin” [1], the technology of blockchain has attracted signi f- icant attentions across the academia, the industry and the public. A blockchain network is built upon a virtual overlay Peer-to-Peer (P2P) network as a decentralized temper-proo f system for transactional record logging [2]. For permissio nless blockchains, the Nakamoto consensus protocol [1] is widely adopted to financially incentivize the full nodes (block min - ers) to abide by the longest-chain rule in maintaining the blockchain state. In a blockchain network, the blockchain u sers issue the digitally signed transactions between their cryp to- graphic addresses (a.k.a., wallets). Following the Nakamo to protocol, the block miners pack an arbitrary number of such verified transactions into a data structure, known as a candi date block, and broadcast it to the rest of the network. A blockcha in is thus organized as a hash-linked list of such blocks and stored distributively as the local replica on each block min er. Following the “longest-chain rule”, at a given time instanc e, the longest one among the proposed blockchain views will be ultimately recognized by the network as the current state of the blockchain [2]. Both the engineering practices and theoret icalstudies [3] have shown that the Nakamoto protocol is able to guarantee the persistence and liveness of a blockchain in a Byzantine environment. In other words, when a majority of the mining nodes honestly follow the Nakamoto protocol, the transactional data on the blockchain are guaranteed to b e immutable once they are recorded. In the Nakamoto protocol, the financial incentive mecha- nism consists of two parts: (a) a computation-intensive cry pto- puzzle solving process to make Sybil attacks financially una f- fordable, and (b) a reward generation process to award the miners when their published blocks are recognized by the entire network. The crypto-puzzle solving process is imple - mented through a Proof-of-Work (PoW) process [3], where the miners exhaustively query a trusted random oracle (e.g. , a SHA-256 hash function) to find a string satisfying a preimage condition based on their individual block proposals. In the block awarding process, the first miner whose candidate bloc k gets accepted by the majority of the network will receive a monetary reward for its contribution in approving transact ions and extending the blockchain by one block. Except for the transaction fees named by the transaction issuers, the winn er in a round of the block mining competitions may also receive anex-nihilo , fixed-amount of award according to the token- generation mechanism of the blockchain [1], [2]. The probability of winning a puzzle-solving competition depends on the ratio between a miner’s hash rate (i.e., numbe r of queries to the random oracle per unit time) and the total hash rate of the entire network [3]. In addition, the block propagation time in the P2P network determines the final result of block confirmation within one consensus round, sin ce only the first block propagated to the majority of the network can be confirmed as the new head of the blockchain [4], [5]. In practical scenarios, the chance for individual mine rs to win in one round of the mining competitions has been negligible due to the exponential growth of hash rate in the network. As a result, the real-world blockchain networks ar e dominated by the proxy nodes that represent the coalitions of miners known as mining pools [2]. A mining pool works as a task scheduler by dividing a puzzle-solution task into smaller sub-tasks and assigning them to the miners accordin g to their devoted hash rate. By aggregating the hash rate of many miners, the probability for a mining pool to win a block reward becomes significantly large. Then, an individual min er can secure its small but stable share of reward according to 2 the ratio between its hash rate and the hash rate of the pool. In this paper, we study the problem of mining pool selection in a PoW-based blockchain network, where each mining pool may adopt a different arbitrary block mining strategy [6]. B y assuming that the individual miners are rational and profit- driven, we propose a model based on the evolutionary game to mathematically describe the dynamic mining-pool select ion process in a large population of individual miners. Conside ring the computation power and propagation delay as the two major factors to determine the results of mining competitions, we focus on how these two factors as well as the cost of the com- putation resource (mainly in electricity) impact the strat egies of the individual miners for pool selection. Based on a case study of two mining pools, we provide the theoretical analys is of evolutionary stability for the pool-selection dynamics . Our numerical simulation results provide the evidences that su pport our theoretical discoveries and further present the experi mental insight into the impact of the arbitrary strategies on the re ward outcomes of different mining pools. II. P ROBLEM FORMULATION A. Financially Incentivized Block Mining with Proof-of-Wo rk We consider a blockchain network adopting the Nakamoto consensus based on Proof-of-Work (PoW) [1]. Assume that the network is composed of a large population of Nindividual miners. For each miner, the chance of mining a new block is in proportion to the ratio between its individual hash rate f or solving the crypto-puzzles in PoW and the total hash rate in the network. According to the Nakamoto consensus protocol, the miner of each confirmed block receives a fixed amount of blockchain tokens from the new block’s coinbase and a flexibl e amount of transaction fees as the reward for maintaining the blockchain’s consensus and approving the transactions [2] . We consider that the individual miners organize themselves into a set of Mmining pools, namely, M={1,2,...,M}. We further consider that each mining pool may set different requirement on the hash rate contributed by an individual miner trying to join the pool. Let ωidenote the individual hash rate required by pool i(i∈M ), andxidenote the miners’ population fraction in pool i. Then, the probability for pool i to mine a block in one consensus round can be expressed as: Prmine i(x,ωωω) =ωixi/summationtextM j=1ωjxj, (1) whereωωω= [ω1,...,ω M]⊤,x= [x1,...,x M]⊤,/summationtext i∈Mxi= 1and∀i,xi≥0. After successfully mining a block, pool ibroadcasts the mined block to its neighbors in the hope that it will be propagated to the entire network and confirmed as the new head block of the blockchain. However, in the situation wher e more than one mining pool discover a new block at the same time, only the block that is first disseminated to the network will be confirmed by the network. All of the rest candidate blocks will be discarded (orphaned). According t o the empirical studies in [4], [5], the block propagation tim eis mainly determined by two factors, namely, the transmissi on delay over each link and the transaction verification time at each relaying node. For a block of size s, the transmission delay can be modeled as τp(s)=s γc[4], where γis a network scale-related parameter, and cis the average effective channel capacity of each link. On the other hand, since verifying a transaction requires roughly the same amount of computatio n, the block verification time can be modeled as a linear functio n τv(s) =bs, wherebis a parameter determined by both the network scale and the average verification speed of each node . Then, the average propagation time for a block of size scan be expressed as: τ(s) =τp(s)+τv(s) =s γc+bs. (2) Based on (2), the incidence of abandoned (i.e., orphaning) a valid block due to the propagation delay can be modeled as a Poisson process with mean 1/T, whereTis maintained by the network as a fixed average mining time (e.g., 600s in Bitcoin) [4]. Then, the probability of orphaning a valid candidate block of size sin one consensus round is: Prorphan(s) = 1−e−τ(s)/T= 1−e−(s γc+bs)/T. (3) From (1) and (3), the probability for pool ito ultimately win a block mining race with a block of size sican be derived as: Prwin i(x,ωωω,si) =ωixi/summationtextM j=1ωjxje−(si γc+bsi)/T. (4) We assume that the transactions in the blockchain network are issued with an invariant rate of transaction fees. When the transactions are of fixed size, pool i’s mining reward from transaction fee collection can also be modeled as a linear function of the block size si. Letρdenote the price of transaction in a unit block size [5]. Then, the reward of poolifrom transaction fees can be written as ρsi. LetR denote the fixed reward from the new block’s coinbase. Then, the expected reward for pool ican be expressed as follows: E{ri(x,ωωω,si)}= (R+ρsi)ωixi/summationtextM j=1ωjxje−(si γc+bsi)/T.(5) Since the process of crypto-puzzle solving in PoW is com- putationally intensive, the rational miners also have to co nsider the cost of power consumption due to hash computation in the block mining process. Noting that the new blocks are discovered with a roughly fixed time interval, we denote the energy price for generating a unit hash query rate during tha t time interval by p. Then, we can obtain the expected payoff for an individual miner in pool ias follows: yi(x,ωωω,si) =R+ρsi Nxiωixi/summationtextM j=1ωjxje−(si γc+bsi)/T−pωi.(6) B. Mining Pool Selection as an Evolutionary Game Consider that the individual miners are rational and aim to maximize their net payoff given in (6). Then, it is nature to model the process of mining pool selection in the population 3 of individual miners as an evolutionary game. Mathematical ly, we can define the evolutionary game for mining pool selection as a 4-tuple:G=/an}bracketle{tN,M,x,{yi(x;ωωω,si)}i∈M/an}bracketri}ht, where •Nis the population of individual miners, |N|=N. •M={1,2,...,M}is the set of mining pools, and (wi,si)is the mining strategy preference of each pool i∈M . •x= [x1,...,x M]⊤∈X is the vector of the population states, where xirepresents the fraction of population that choose mining pool i.X={x∈RM +:/summationtext i∈Mxi= 1}. •{yi(x;ωωω,si)}i∈M is the set of individual miner’s payoff in each mining pool. yi(x;ωωω,si)is given by (6). We note that ωiandsiform the predetermined mining strategy of pool i. Given a population state x∈X , we can derive the average payoff of the individual miner in Nbased on (6) as follows: y(x) =M/summationdisplay i=1yi(x;ωωω,si)xi. (7) Then, by the pairwise proportional imitation protocol [7], the replicator dynamics for the evolution of the population states can be expressed by the following system of Ordinary Differential Equations (ODEs) ∀i∈M [7]: ˙xi(t) =fi(x(t);ωωω,si) =xi(t)(yi(x(t);ωωω,si)−y(x(t))),(8) where˙xi(t)represents the growth rate of the size of pool i with respect to time t. We are interested in the Nash Equilibria (NE) of game G described by (8). Let Y(x)denote the vector of individual payoffs for all the mining pools, Y(x)=[y1(x),...,y M(x)]⊤ and letE(Y)denote the set of NE in game G. Then,E(Y) can be defined as follows [8]: Definition 1 (NE) .A population state x∗∈X is an NE of the evolutionary game G, i.e.,x∗∈E(Y), if for all feasible population state x∈X the following inequality holds (x−x∗)⊤Y(x∗)≤0. (9) It is straightforward that an NE is a fixed point of the repli- cator dynamics given by (8), namely, ∀i∈M,fi(x(t);ωωω,si) = 0[7]. Then, we need to further investigate the stability of an NE state x∗∈E(Y)for pool selection. Suppose that there exists another population state x′trying to invade state x∗by attracting a small share ǫ∈(0,1)in the population of miners to switch to x′. Then,x′is an Evolutionary Stable Strategy (ESS) if the following condition holds for all ǫ∈(0,ǫ): /summationdisplay i∈Mx∗ iyi((1−ǫ)x∗+ǫx′)≥/summationdisplay i∈Mx′ iyi((1−ǫ)x∗+ǫx′).(10) Based on (10), we can formally define the ESS as follows. Definition 2 (ESS [8]) .A population state x∗is an ESS of gameG, if there exists a neighborhood B ∈ X , such that ∀x∈B−x∗, the condition (x−x∗)⊤Y(x∗) = 0 implies that (x∗−x)⊤Y(x)≥0. (11)Algorithm 1 Mining Pool Selection Following the Pairwise Proportional Imitation Protocol. 1:Initialization :∀i∈N , minerirandomly selects a mining pool to start with. 2:t←1 3:whilexhas not converged andt <MAX COUNT do 4: fori∈N do 5:j←Rand(1,M){Randomly selects a mining pool j∈M} 6: Determine whether to switch to pool jaccording to the following probability of pool switching ρi,j: ρi,j=xjmax(yj(x;ωωω,sj)−yi(x;ωωω,si),0).(12) 7: end for 8:t←t+1 9:end while In Algorithm 1, we describe the strategy evolution of the N individual miners following the revision protocol of pairw ise proportional imitation [9]. When receiving a signal for str ategy revision of choosing a new pool, an individual miner switche s from it current pool to the new pool probabilistically accor ding to (12). As the population size increases, the pairwise pro- portional imitation will asymptotically lead to the replic ator dynamics described by the ODEs in (8). C. A Case Study of Two Mining Pools In this section, we consider a special case of a blockchain network with two mining pools, i.e., M= 2. Let the pop- ulation fraction of each pool be x1=x, andx2= 1−x. From Definition 1 and by solving ˙xi(t) = 0,i∈[1,2], we can obtain Theorem 1 as follows. THEOREM 1.Based on the replicator dynamics in (8), a blockchain network of two mining pools has three rest points in the form of (x∗,1−x∗)with x∗∈/braceleftbigg 0,1,a−b Np(ω1−ω2)2−ω2 ω1−ω2/bracerightbigg , (13) wherea= (R+ρs1)ω1e−(s1 γc+bs1)/T,b= (R+ ρs2)ω2e−(s2 γc+bs2)/Tand0<a−b Np(ω1−ω2)2−ω2 ω1−ω2<1. Proof. Fromfi(x(t)) = 0,∀i∈{1,2}, we have fi(x(t)) =xi(t)(yi(x(t),ai)−y(x(t))) =xi(t)(1−xi(t))/parenleftbigga−b N(ω1xi(t)+ω2(1−xi(t)))−p(ω1−ω2)/parenrightbigg . (14) Then, by solving fi(x(t)) = 0 , we can obtain the three rest points for the case of two mining pools as (x∗,1−x∗), where x∗∈/braceleftBig 0,1,a−b Np(ω1−ω2)2−ω2 ω1−ω2/bracerightBig . Since from any initial statex(0)∈X, the rest point of (8) should stay in the interior ofX, we have the following condition: 0<a−b Np(ω1−ω2)2−ω2 ω1−ω2<1. (15) 4 Then, the proof of Theorem 1 is completed. Now, we are ready to investigate the evolutionary stability of the three fixed points. In the case of x∗= 0 andx∗= 1, the population state is (0,1)and(1,0), respectively. We know that the two fixed points are of the similar form, since the individual payoff functions are similar for each mining poo l. Therefore, we only need to check the case with x1=x∗= 0. Lemma 1. For gameGwith two mining pools, 1) The rest point with x∗= 0 is an ESS, if the conditions given by (16) and (17) hold: a−b Nω2−p(ω1−ω2)<0, (16) /parenleftbigga−b Nω2−p(ω1−ω2)/parenrightbigg/parenleftbigg pω2−b Nω2/parenrightbigg >0. (17) 2) If the conditions given by (18) and (19) hold, the rest poin t withx∗=a−b Np(ω1−ω2)2−ω2 ω1−ω2is an ESS. c(a(ω1+ω2)+ω1(−2b+Npω1(ω2−ω1))) (a−b)<0,(18) pc(−bω1+aω2)(a−b+Npω1(ω2−ω1)) (ω1−ω2)>0, (19) wherec=a−b+Npω2(ω2−ω1). Proof. According to Definition 2.6 in [9], the asymptotically stable state of the ODE system given in (8) is guaranteed to be an ESS. When the replicator dynamics is continuous-time, it is asymptotically stable if the Jacobian matrix of the dynam ic system at the equilibrium is negative definite, or equivalen tly, if all the eigenvalues of the Jacobian matrix have negative r eal parts [10]. For the replicate dynamic system given in (8), th e Jacobian matrix of the replicator dynamics in a two-mining- pool network is J= ∂f1(x) ∂x1∂f1(x) ∂x2∂f2(x) ∂x1∂f2(x) ∂x2 /vextendsingle/vextendsingle/vextendsingle/vextendsingle/vextendsingle (x1=x∗,x2=1−x∗). (20) Further, the elements in (20) can be derived as follows: ∂f1(x) ∂x1=(1−2x1)/parenleftBigg a N(ω1x1+ω2x2)−pω1/parenrightBigg −aω1(x1−x2 1) N(ω1x1+ω2x2)2−bω2x2 2 N(ω1x1+ω2x2)2+pω2x2,(21) ∂f1(x) ∂x2=x1/parenleftBigg pω2−aω2(1−x1) N(ω1x1+ω2x2)2 +bω2x2 N(ω1x1+ω2x2)2−b N(ω1x1+ω2x2)/parenrightBigg , (22)∂f2(x) ∂x1=x2/parenleftBigg pω1+aω1x1 N(ω1x1+ω2x2)2 −bω1(1−x2) N(ω1x1+ω2x2)2−a N(ω1x1+ω2x2)/parenrightBigg , (23) ∂f2(x) ∂x2=(1−2x2)/parenleftBigg b N(ω1x1+ω2x2)−pω2/parenrightBigg −bω2(x2−x2 2) N(ω1x1+ω2x2)2−aω1x2 1 N(ω1x1+ω2x2)2+pω1x1.(24) Based on (21)-(24), we have 1) After some tedious mathematical manipulations, the de- terminants of the principle minors of Jatx∗= 0 should satisfy the following conditions to guarantee the negative definiteness of J: det(J11)=a−b Nω2−p(ω1−ω2)<0, (25) det(J)=/parenleftbigga−b Nω2−p(ω1−ω2)/parenrightbigg (pω2−b Nω2)>0.(26) 2) Similarly, at x∗=a−b Np(ω1−ω2)2−ω2 ω1−ω2, the following conditions can be obtained for the negative definiteness ofJafter some mathematical manipulations: det(J11)=c(a(ω1+ω2)+ω1(−2b+Npω1(ω2−ω1))) N(a−b)(ω1−ω2)2 <0, (27) det(J)=pc(−bω1+aω2)(a−b+Npω1(ω2−ω1)) N(a−b)2(ω1−ω2)>0. (28) Then, the proof to Lemma 1 is completed. We note that the blockchain network is comprised by a large population of individual miners in the real-world scenario s. Then, from Lemma 1, we can employ the asymptotic analysis and obtain the following theorem on evolutionary stability of the rest points. THEOREM 2.Assume that the population size Nis suffi- ciently large. Then, neither of the rest points with x∗∈{0,1} is evolutionary stable. The rest point with x∗=a−b Np(ω1−ω2)2− ω2 ω1−ω2is an ESS if the following conditions are satisfied: /braceleftbigga−b <0, (bω1−aω2)(ω2−ω1)>0.(29) Proof. First, at the rest point with x∗= 0, by Lemma 1, we can obtain the following conditions for the Jacobian if ω1≤ω2, lim N→+∞det(J11)= lim N→+∞a−b Nω2−p(ω1−ω2)≥0.(30) Then, the Jacobian matrix is not negative definite. Alterna- tively, ifω1> ω2, we have lim N→+∞det(J11)= lim N→+∞a−b Nω2−p(ω1−ω2)<0,(31) 5 and lim N→+∞det(J)= lim N→+∞(a−b Nω2−p(ω1−ω2))(pω2−b Nω2)<0. (32) Again, the Jacobian matrix cannot be negative definite. Then , the rest point with x∗= 0 is not an ESS. Following the same procedure, we can show that the rest point with x∗= 1is not evolutionary stable, either. By [10], we know that any rest point in the interior of X is an NE. Then, for the NE with x∗=a−b Np(ω1−ω2)2−ω2 ω1−ω2, following Lemma 1, we obtain lim N→+∞det(J11) = lim N→+∞(a−b+Npω2(ω2−ω1))a(ω1+ω2) N(a−b)(ω1−ω2)2+ (a−b+Npω2(ω2−ω1))ω1(−2b+Npω1(ω2−ω1)) N(a−b)(ω1−ω2)2 = lim N→+∞Np2ω1ω2 a−b, (33) and lim N→+∞det(J)= lim N→+∞p(a−b+Npω2(ω2−ω1)) N(a−b)2(ω1−ω2)· (−bω1+aω2)(a−b+Npω1(ω2−ω1)) N(a−b)2(ω1−ω2) = lim N→+∞Np3ω1ω2(bω1−aω2)(ω2−ω1) (a−b)2. (34) By (33) and (34), the Jacobian matrix is negative definite if t he conditions given in (29) are satisfied, hence the NE (x∗,1−x∗) is an ESS. Then, the proof to Theorem 2 is completed. III. E VOLUTION ANALYSIS In this section, we conduct several numerical simulations and provide the performance evaluation of the individual miners’ pool-selection strategies in different situation s. We first consider a blockchain network with N= 5000 individual miners, which evolve to form two mining pools (i.e., M= 2). For the purpose of demonstration, we set the block generatio n parameters as λ= 1/600,1 γc+b= 0.005,R= 1000 ,ρ= 2 andp= 0.01. We also set the initial population state as x= [0.75,0.25]. We first consider that the two pools adopt their mining strategies with the same block size, s1=s2= 100, and different computation power contribution, ω1= 30 andω2= 20 . By Theorem 2, we know that such strategy adaptation satisfies the condition for an ESS in the interior of the simplexX. Figure 1(a) demonstrates the evolution of the miners’ pool-selection strategies. According to Figure 1( b), the strategies converge to a global ESS of (0.4,0.6), which is in accordance with our theoretical prediction. We also observ e that relatively fewer miners choose to join the pool requiri ng a higher hash rate (i.e., pool 1) at the ESS. This is because a higher computation power requirement will lead to an increa se in the mining cost, which exceeds the profit improvement that the miner can obtain in that pool.0 100 200 300 400 500 600 700 800 900 100000.10.20.30.40.50.60.70.80.91 x1 x2 (a)0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.10.20.30.40.50.60.70.80.91 (b) Fig. 1. (a) Evolution of the miners’ population states over t ime with two mining pools. (b) Replicator dynamics of the pool-selectio n strategies and the evolution trajectory starting from x(0)=(0.75,0.25). 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.10.20.30.40.50.60.70.80.91 x1 x2 (a)0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-0.1-0.08-0.06-0.04-0.0200.020.040.060.080.1 (b) Fig. 2. (a) Population state at the ESS vs. varying delay coef ficient1 γc+b. (b) Average payoff of the miners at the ESS vs. varying delay c oefficient 1 γc+b. Further, we analyze the influence of the network condition on the pool-selection strategies of the individual miners. In Figure 2, we show the evolution of the stable population states and the corresponding average payoff of the individu al miners with respect to varied delay coefficient1 γc+b. In the simulation, we adopt the same mining strategies as in Figure 1. Figure 2(a) shows that as the propagation delay coefficient increases, more miners will tend to join the pool with a smaller hash rate requirement ( ω2=20 ). Jointly considering the payoffs at NE shown in Figure 2(b), we know that a larger delay coefficient leads to a higher probability of orphaning blocks of the same size. As a result, the miners prefer to join the pool that induces lower mining cost. We can also observe in Figure 2(b) that the payoffs of the mining pool remain unchanged at zero. This phenomenon can be interpreted as a situation of market equilibrium where the demand for the hash rate exactly meets the supply with the current settings of reward parameters. Finally, we consider a more general situation with four mining pools, where each pool adopts in their mining strateg y the same block size as si= 100 (1≤i≤4) and different requirement on the hash rate contribution as ω1=10 ,ω2=20 , ω3=30 andω4=40 . The evolution of the miner population states is presented in Figure 3(a). In the considered case, we observe that when the miners’ pool-selection strategies converge to the equilibrium, selecting pool 1 becomes a dominating strategy since by contributing a higher hash rat e, the profit gain is unable to cover the power consumption cost 6 0 100 200 300 400 500 600 700 800 900 100000.10.20.30.40.50.60.70.80.9 x1 x2 x3 x4 (a)0 100 200 300 400 500 600 700 800 900 1000-0.2-0.15-0.1-0.050 x1 x2 x3 x4 (b) Fig. 3. (a) The population states evolution with respect to d ifferent delay coefficient1 γc+b, where mining strategy variables are s1= 100 ,s2= 120 andω1= 20 ,ω2= 20 . (b) Payoff evolution with respect to different delay coefficient1 γc+b. for each miner. Then, the individual miners prefer to decrea se their dedicated hash rate since they are sensitive to the min ing cost. Figure 3(b) show that the payoffs of joining a pool evolves from negative value to zero. Again, this indicates a situation where the block mining business becomes a perfect competition market with an NE payoff of zero, and no miner can switch its pool selection without undermining some othe r miner’s payoff at the equilibrium. IV. C ONCLUSION In this paper, we have investigated the dynamic mining pool- selection problem in a blockchain network using Nakamoto consensus protocol. We model the dynamics of the individual miner’s pool-selection strategies as an evolutionary game . In particular, we have considered the computation power and propagation delay as two major factors that determine the outcome of the block mining competition. Furthermore, we have theoretically analyzed the evolutionary stability of the pool selection dynamics based on a case study of two mining pools. For the case of two mining pools, we have shown that the blockchain network conditionally admits a unique evolutionary stable state. Our simulation results have pro vided the numerical evidence for our theoretical discoveries. REFERENCES [1] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash s ystem,” Self- published Paper , May 2008. [2] F. Tschorsch and B. Scheuermann, “Bitcoin and beyond: A t echnical survey on decentralized digital currencies,” IEEE Communications Sur- veys Tutorials , vol. 18, no. 3, pp. 2084–2123, third quarter 2016. [3] J. Garay, A. Kiayias, and N. Leonardos, “The bitcoin back bone protocol: Analysis and applications,” in 34th Annual International Conference on the Theory and Applications of Cryptographic Techniques , Sofia, Bulgaria, Apr. 2015, pp. 281–310. [4] P. R. Rizun, “A transaction fee market exists without a bl ock size limit,” Self-published Paper , Aug. 2015. [5] N. Houy, “The bitcoin mining game,” Ledger Journal , vol. 1, no. 13, pp. 53 – 68, 2016. [6] B. A. Fisch, R. Pass, and A. Shelat, “Socially optimal min ing pools,” arXiv preprint arXiv:1703.03846 , 2017. [7] J. Hofbauer and K. Sigmund, “Evolutionary game dynamics ,”Bulletin of the American Mathematical Society , vol. 40, no. 4, pp. 479–519, 2003. [8] J. Hofbauer and W. H. Sandholm, “Stable games and their dy namics,” Journal of Economic Theory , vol. 144, no. 4, pp. 1665 – 1693.e4, 2009. [9] J. W. Weibull, Evolutionary game theory . MIT press, 1997.[10] R. Cressman, Evolutionary dynamics and extensive form games . MIT Press, 2003, vol. 5.
{ "id": "1712.02027" }
1805.04698
Bitcoin Risk Modeling with Blockchain Graphs
A key challenge for Bitcoin cryptocurrency holders, such as startups using ICOs to raise funding, is managing their FX risk. Specifically, a misinformed decision to convert Bitcoin to fiat currency could, by itself, cost USD millions. In contrast to financial exchanges, Blockchain based crypto-currencies expose the entire transaction history to the public. By processing all transactions, we model the network with a high fidelity graph so that it is possible to characterize how the flow of information in the network evolves over time. We demonstrate how this data representation permits a new form of microstructure modeling - with the emphasis on the topological network structures to study the role of users, entities and their interactions in formation and dynamics of crypto-currency investment risk. In particular, we identify certain sub-graphs ('chainlets') that exhibit predictive influence on Bitcoin price and volatility, and characterize the types of chainlets that signify extreme losses.
http://arxiv.org/pdf/1805.04698v1
Cuneyt Akcora, Matthew Dixon, Yulia Gel, Murat Kantarcioglu
q-fin.RM
q-fin.RM
Bitcoin Risk Modeling with Blockchain Graphs Cuneyt Gurcan Akcora∗, Matthew F. Dixon†, Yulia R. Gel‡and Murat Kantarcioglu§ Abstract A key challenge for Bitcoin cryptocurrency holders, such as startups using ICOs to raise funding, is managing their FX risk. Specifically, a mis-informed decision to convert Bitcoin to fiat currency could, by itself, cost USD millions. In contrast to financial exchanges, Blockchain based crypto-currencies expose the entire transaction history to the public. By processing all transactions, we model the net- work with a high fidelity graph so that it is possible to char- acterize how the flow of information in the network evolves over time. We demonstrate how this data representation permits a new form of microstructure modeling — with the emphasis on the local topological network structure to study the role of users, entities and their interactions in formation and dynamics of crypto-currency investment risk. In partic- ular, we identify certain sub-graphs (chainlets) that exhibit predictive influence on Bitcoin price and volatility and char- acterize the types of chainlets that signify extreme losses. keywords :Cryptocurrencies ,Graph analysis ,forecast- ing,financial risk ,ICOs . JEL codes : C58, C63, G18 1 Introduction Nascent empirical research suggests that short-run Bitcoin price behavior is prone to bubbles and busts and somewhat detached from asset pricing theory [9, 10, 5]. Since Bitcoin derives its economic value from a “network effect” – the more individuals who use Bitcoin, the more valuable the entire Bitcoin ecosystem becomes- it is expected that transaction activity is strongly linked with Bitcoin price changes [9, 10]. In contrast to existing financial networks, Blockchain based crypto-currencies expose the entire transaction graph to the public. Bitcoin transactions are listed for all participants and the most significant agents can be immediately located on the network. In contrast to closed financial systems, the largest ac- counts in a crypto-currency exchange are listed and can be tracked over time and have been popularly referred to as ∗Postdoctoral Fellow, Data Security and Privacy Lab, University of Texas at Dallas. †Assistant Professor of Finance & Statistics, Stuart School of Busi- ness, Illinois Institute of Technology. ‡Professor of Mathematics, Department of Mathematical Sciences, University of Texas at Dallas. §Professor of Computer Science, Director of the Data Security and Privacy Lab, University of Texas at Dallas.“whales”. The econometrics of Bitcoin seeks new interdis- ciplinary research to demonstrate how full disclosure of an agent’s actions in a crypto-currency market inform price dis- covery and ultimately serve as an early-warning indicator for excess market volatility or even a crash. With the goal of building a predictive model, we therefore depart from classical times-series cross sectional models that leverage standard macro economic variables such as GDP and inflation. Instead, we use Bitcoin’s microstructure. By processing all financial interactions, our objective is to model the network with a high fidelity graph so that it is possible to characterize how the flow of information in the network evolves over time. This novel data representa- tion permits an entirely new form of financial econometrics — with the emphasis on the topological network structures rather than covariance of historical time series of prices. The role of users, entities and their interactions in formation and dynamics of crypto-currency risk investment, financial pre- dictive analytics and, more generally, in re-shaping the mod- ern financial world is a novel area of research [11, 6, 7, 8, 12]. 2 Method: Chainlets and Data Processing As shown in Figure 1, a Bitcoin graph consists of three main components: addresses, transactions and blocks (see [1] for a primer on Blockchain graphs). One approach to understand how transactions relate to market price is to introduce the novel concept of k-chainlets [2]. Ak-chainlet is a Bitcoin sub-graph of k≥1 transactions and their corresponding input and output addresses corre- sponding to different accounts, not necessarily unique to a user. In the simplest case, a single transaction creates a 1- chainlet with one or more inputs and a single output. For example, in Figure 1, transaction t2results in the transfer of Bitcoin from addresses a3,a4,a5to address a8. Such a transaction creates a 1-chainlet that has three inputs and one output. We denote this subgraph as a chainlet of type C3→1, where 3 and 1 are the number of input and output addresses, respectively. A 1-chainlet is the smallest building block of the Bitcoin graph; inputs and outputs of the chainlet are determined at once, and the transaction is digitally signed. This signed information cannot be modified, but multiple 1-chainlets can be combined to extend the graph. For simplicity, in the rest of this work, we use the term chainlet to refer to 1-chainlets. 1 arXiv:1805.04698v1 [q-fin.RM] 12 May 2018 a6t1 t2 t4t3 a2a1 a7 a4a3 a5a8a9 a10 a11 a12 a13 TimeFigure 1: A transaction-address graph representation of the Bitcoin network. Addresses are represented by circles, trans- actions with rectangles and edges indicate a transfer of coins. Blocks order transactions in time, whereas each transaction with its input and output nodes represents an immutable de- cision that is encoded as a subgraph on the Bitcoin network. Some addresses, such as a6in the figure, may contain un- spent bitcoins. Graph analysis allows us to evaluate the local topological structure of the Bitcoin graph over time and assess the role of chainlets on Bitcoin price formation and dynamics. Figure 2 illustrates how the activity of the network can be represented by a chainlet matrix. On a given day, we count the occurrences of each Ci→jand store it in a chainlet ma- trix. The maximum number of inputs or outputs of a chain- let can be large, however, sometimes exceeding 1000. When the number of inputs and/or outputs exceeds a threshold N, we refer to these chainlets as ”extreme chainlets”. In our his- torical analysis of daily snapshots, we choose N= 20, which corresponds to the 97.5 percentile of all chainlet occurrences. Figure 2: This figure illustrates how the network is repre- sented in time with a 20×20chainlet matrix. Each matrix is formed by taking snapshots of the Bitcoin graph and count- ing the occurrences of Ci→j,∀i,jon a given day. The color scale denotes the frequency of chainlet occurrences. The left and right extreme chainlets are shown by the bottom row and far right column respectively. It is instructive to distinguish between ’left extreme chain- lets’ and ’right extreme chainlets’. Left extreme chainlets are the subsetCl:={Ci→j|i=N, j∈{1,...,N}}, ashighlighted in the bottom row in Figure 2. They represent transactions from of a large number of accounts to fewer addresses. As a general rule, left extreme chainlets indicate bitcoin investment. Right extreme chainlets are the subset Cr:={Ci→j|i∈ {1,...,N−1}, j=N}, as highlighted in the far right col- umn in Figure 2. They represent the sale of a large sum of Bitcoins across the market - the seller divides the balance and sends them to potentially hundreds of Bitcoin addresses. We denote the USD amount of Satoshis transferred on date tby left and right extreme chainlets as Al tandAr t, and the total occurrences as Ol tandOr trespectively. Figure 3 shows the ratio of extreme chainlets to total oc- currences at time t, denoted as Ox t. We also measure ex- treme chainlet activity with the ratio of Bitcoins transacted by extreme chainlets, Ax t. For example, if the volume to- day was 2M Satoshis and 200K Satoshis were transacted by using extreme chainlets, then Ax t= 0.1. 0.050.100.150.20 1 40 154 251 360 Day of 2015Ratio Figure 3: Ratio of extreme chainlets by daily occurrence over 2015. On June 3 (day 154), New York State finan- cial services superintendent announced BitLicense: a set of rules that would govern virtual-currency businesses. BitLi- cense came into effect on September 8th (day 251). Rather than complying with these rules, cryptocurrency exchanges demanded their customers to leave their platforms. Many customers left by selling their Bitcoins, as evidenced by high extreme chainlet activity. 3 Forecasting Bitcoin The extent to which we can build predictive models from the chainlets has already led to some promising results [2] (see [2] for specification of the types and groups of chainlets that exhibit predictive influence on Bitcoin price and volatility). 3.1 Risk modeling We characterize the uncertainty of a ’loss’ and, in particular, estimate the probability of extreme losses occurring over a future horizon. The loss is defined as the negative of the log 2 returns,Lt=−rt, wherert:=ln(Pt+1/Pt) andPtis the Bitcoin price on day t. Bitcoin prices are sourced from Coinbase over the period 1/1/2012 to 10/7/2017 (2107 observations)1and the corre- sponding chainlet matrices are available through the website 2. Table 1 shows the results from regressing the square of the log returns r2 t, a proxy for volatility, against xt– the vector of daily extreme chainlet activity. Estimate Std. Error t-value Pr(>|t|) (Intercept) 0.9995 0.0807 12.385<2e-16 *** Al t 0.7248 0.1063 6.818 1.21e-11 *** Ar t 0.2959 0.1278 2.316 0.02068 * Ax t -0.5348 0.1313 -4.073 4.82e-05 *** Ol t -0.5699 0.1074 -5.304 1.25e-07 *** Or t -0.4541 0.1644 -2.762 0.00579 ** Ox t 0.5043 0.1832 2.753 0.00595 ** Table 1: This table shows the statistical significance of the extreme chainlet regressors on r2 t, a proxy for volatility. Note that both the response and the regressors have been standardized. 0.00.20.40.6 −2 0 2 Lossesdensity 0.00.20.40.6 −2 0 2 Lossesdensity Figure 4: The empirical densities of the standardized daily losses conditioned on the lower (red) and upper (green) α= 0.05percentiles of extreme chainlet activity by (top) amount (Ax) and (bottom) occurrences ( Ox). The standard- ized unconditional loss density is shown by the black line. Results establishing Granger causality between prices and 1Our analysis (see Figure 3 in [2]) showed that the Bitcoin network did not stabilize until late 2011. 2https://github.com/cakcora/CoinWorkschainlets are shown in [2]. We emphasize that the purpose of our analysis here is to augment these results with the distri- butional properties of losses given extreme chainlet activity. Figure 4 and Table 2 show the unconditional loss densities, φ(Lt) (black) and conditional densities of the standardized daily Bitcoin losses over the same period from 1-1-2012 to 10-7-2017. The mean of the loss density is observed to shift to the right (indicating higher losses) when conditioned on the top fifth percentile (green) of extreme chainlet activity measuresAx t(top) andOx t(bottom). Conversely, we ob- serve that the mean of the loss density shifts to the left when conditioned on the lower fifth percentile (red) of ex- treme chainlet activity measures Ax t(top) andOx t(bottom). The skew and kurtosis of the conditional loss distributions are also observed to differ significantly from the uncondi- tional loss distribution. pdf mean std.dev. skewness kurtosis φ(Lt) 0 1 0.518 12.082 φ(Lt|Ax t<Φ−1 Ax t(0.05)) -0.047 1.107 3.283 31.618 φ(Lt|Ax t>Φ−1 Ax t(0.95)) 0.0861 0.843 1.590 6.046 φ(Lt|Ox t<Φ−1 Ox t(0.05)) -0.081 0.633 1.296 8.114 φ(Lt|Ox t>Φ−1 Ox t(0.95)) 0.118 0.930 2.025 10.457 Table 2: This table show the moments of the conditional and unconditional empirical density functions corresponding to those shown in Figure 4. 3.2 GARCH The application of GARCH models to forecast Bitcoin has been extensively investigated in [4, 3]. We supplement these findings, by demonstrating the importance of including ex- treme chainlet activity, xtin the GARCH model. We choose anARMA (p,q)−GARCHX (1,1) model: yt=µ+p/summationdisplay i=1yt−i+q/summationdisplay i=1ut−1+σtut, (1) σ2 t=α0+α1u2 t−1+βσ2 t−1+βT xxt, (2) whereytare the observed daily returns, utare standard skewed Student’s t-innovations and σtis the volatility. Ad- ditional diagnostics, provided on request, show a positive ARCH effect and that a GARCH(1,1) model has the lowest AIC with a ARMA(2,2) model for the mean equation. Both models pass a Box-Ljung and Lagrange Multiplier test at the 99% confidence level for the residuals and square of the residuals. Separate sign-bias tests show that asymmetry is not significant. Table 3 compares the 99% daily Value-at-Risk (VaR) backtest of the ARMA(2,2)-GARCHX(1,1) model with the 3 Aug 15 Sep 01 Sep 15 Oct 010.00 0.05 0.10 0.15 0.20Forecast Rolling Sigma vs |Series| Time/HorizonSigma GARCH model : sGARCHHorizon: 30 Actual Forecast |Series| Aug 15 Sep 01 Sep 15 Oct 010.00 0.05 0.10 0.15 0.20Forecast Rolling Sigma vs |Series| Time/HorizonSigma GARCH model : sGARCHHorizon: 30 Actual Forecast |Series|Figure 5: Next day volatilities estimated using a (top) ARMA(2,2)-GARCH(1,1) model and a (bottom) ARMA(2,2)-GARCHX(1,1) model. The forecasting horizon is rolled over a 30 day out-of-sample period (red). In sam- ple volatility estimates are shown in blue and observed daily returns are shown in gray. ARMA(2,2)-GARCH(1,1) model over an historical period of 1857 days. The backtest is performed over an in-sample rolling horizon, with model refitting every 7 days. The ARMA(2,2)-GARCHX(1,1) model is observed to pass the Kupiec unconditional and the Christoffersen conditional coverage tests at the 95% confidence level whereas the ARMA(2,2)-GARCH(1,1) underestimates the VAR and fails both tests.ARMA(2,2)-GARCH(1,1) ARMA(2,2)-GARCHX(1,1) alpha 1% Expected Breaches 18.6 Actual VaR Breaches 33 15 Unconditional Coverage (Kupiec) H0: Correct Breaches LR.uc Statistic 9.201 0.742 LR.uc Critical 3.841 LR.uc p-value 0.002 0.389 Reject Null YES NO Conditional Coverage (Christoffersen) H0: Correct Breaches and Independence of Failures LR.cc Statistic 9.451 0.986 LR.cc Critical 5.991 LR.cc p-value 0.009 0.611 Reject Null YES NO Table 3: This table compares coverage test results of VaR backtests using the GARCH and GARCHX model. Figure 5 compares the day ahead forecasted volatility, over a 30 day out-of-sample rolling horizon, (top) without and (bottom) with the chainlet regressors. The GARCHX model is observed to predict higher volatility than the GARCH model and is found to be preferable for modeling risk. Under a quadratic loss function, we reject H0in the Diebold-Mariano test (DM=-2.2728) and conclude that the differences in the model residuals are significant at the 95% level (p= 0.023). 4 Summary We model the blockchain transaction history of Bitcoin with high fidelity graphs. Extreme chainlet activity, character- ized by transaction amounts and occurrences are shown em- pirically to result in increased probability of losses and to significant changes in the volatility. With the inclusion of these chainlet activities as external regressors in the variance equation, we show a significant improvement in the GARCH model for predicting extreme next day losses. Orders in the mean and variance equation being equal, the inclusion of extreme chainlet regressors results in nearly 90% reduction in the number of false daily 99% VaR breaches or under- breaches over an approximately 5 year backtesting horizon. 5 Acknowledgements This material is based upon work supported by the National Science Foundation under Grant No. IIS 1633331. 4 References [1] C. G. Akcora, Y. R. Gel, and M. Kantarcioglu. “Blockchain: A Graph Primer”. In: arXiv preprint arXiv:1708.08749 (2017). [2] C. G. Akcora et al. “Forecasting Bitcoin Price with Graph Chainlets”. In: The 22nd Pacific-Asia Con- ference on Knowledge Discovery and Data Mining, PaKDD (2018). [3] Vavrinec Cermak. “Can Bitcoin Become a Viable Al- ternative to Fiat Currencies? An Empirical Analysis of Bitcoin’s Volatility Based on a GARCH Model”. In: (2017), pp. 1–53. [4] Jeffrey Chu et al. “GARCH Modelling of Cryptocur- rencies”. In: Journal of Risk and Financial Manage- ment 10.17 (2017). issn: 1911-8074. doi:10.3390/ jrfm10040017 .url:http://www.mdpi.com/1911- 8074/10/4/17 . [5] Pavel Ciaian, Miroslava Rajcaniova, and dArtis Kancs. “The economics of BitCoin price formation”. In:Applied Economics 48.19 (2016), pp. 1799–1815. [6] Shaen Corbet et al. “Exploring the dynamic relation- ships between cryptocurrencies and other financial as- sets”. In: (2017).[7] A.H. Dyhrberg. “Bitcoin, gold and the dollar – A GARCH volatility analysis”. In: Finance Research Letters (2016). [8] P. Gomber, J.-A. Koch, and M. Siering. “Digital Fi- nance and FinTech: current research and future re- search directions”. In: Journal of Business Economics 7.5 (2017), pp. 537–580. [9] Dimitrios Koutmos. “Bitcoin returns and transaction activity”. In: Economics Letters 167 (2018), pp. 81 –85. issn: 0165-1765. doi:https : / / doi . org / 10 . 1016 / j . econlet . 2018 . 03 . 021 .url:http : / / www.sciencedirect.com/science/article/pii/ S0165176518301125 . [10] L. Kristoufek. “What are the main drivers of the Bit- coin price? Evidence from wavelet coherence analysis”. In:PloS One 10.4 (2015), e0123923. [11] Devavrat Shah and Kang Zhang. “Bayesian regression and Bitcoin”. In: Communication, Control, and Com- puting (Allerton), 2014 52nd Annual Allerton Confer- ence on . IEEE. 2014, pp. 409–414. [12] Y. Sovbetov. “Factors Influencing Cryptocurrency Prices: Evidence from Bitcoin, Ethereum, Dash, Lit- coin, and Monero”. In: Journal of Economics and Fi- nancial Analysis 2.2 (2018), pp. 1–27. 5
{ "id": "1805.04698" }
1808.00811
Digging into Browser-based Crypto Mining
Mining is the foundation of blockchain-based cryptocurrencies such as Bitcoin rewarding the miner for finding blocks for new transactions. The Monero currency enables mining with standard hardware in contrast to special hardware (ASICs) as often used in Bitcoin, paving the way for in-browser mining as a new revenue model for website operators. In this work, we study the prevalence of this new phenomenon. We identify and classify mining websites in 138M domains and present a new fingerprinting method which finds up to a factor of 5.7 more miners than publicly available block lists. Our work identifies and dissects Coinhive as the major browser-mining stakeholder. Further, we present a new method to associate mined blocks in the Monero blockchain to mining pools and uncover that Coinhive currently contributes 1.18% of mined blocks having turned over 1293 Moneros in June 2018.
http://arxiv.org/pdf/1808.00811v2
Jan Rüth, Torsten Zimmermann, Konrad Wolsing, Oliver Hohlfeld
cs.CR, cs.NI
cs.CR
Digging into Browser-based Crypto Mining Jan Rüth, Torsten Zimmermann, Konrad Wolsing, Oliver Hohlfeld Communication and Distributed Systems, RWTH Aachen University, Germany {lastname}@comsys.rwth-aachen.de ABSTRACT Mining is the foundation of blockchain-based cryptocurrencies such as Bitcoin rewarding the miner for finding blocks for new transactions. The Monero currency enables mining with standard hardware in contrast to special hardware (ASICs) as often used in Bitcoin, paving the way for in-browser mining as a new revenue model for website operators. In this work, we study the prevalence of this new phenomenon. We identify and classify mining websites in 138M domains and present a new fingerprinting method which finds up to a factor of 5.7 more miners than publicly available block lists. Our work identifies and dissects Coinhive as the major browser-mining stakeholder. Further, we present a new method to associate mined blocks in the Monero blockchain to mining pools and uncover that Coinhive currently contributes 1.18% of mined blocks having turned over 1293 Moneros in June 2018. CCS CONCEPTS •Security and privacy →Malware and its mitigation ;•Net- works →Network measurement ; KEYWORDS Mining, Cryptocurrency, Monero, Blockchain, Webassembly, Wasm, Malware, Cryptojacking ACM Reference Format: Jan Rüth, Torsten Zimmermann, Konrad Wolsing, and Oliver Hohlfeld. 2018. Digging into Browser-based Crypto Mining. In IMC ’18: Internet Measure- ment Conference, October 31–November 2, 2018, Boston, MA, USA. ACM, New York, NY, USA, 7 pages. https://doi.org/10.1145/3278532.3278539 1 INTRODUCTION The web economy has traditionally used advertisements as means to monetize services that are offered free of charge. This business model relies on the implicit agreement between content providers and users where viewing ads is the price for the “free” content. This traditional approach has very recently been complemented by a new monetizing model in which the computational resources of website visitors are used to mine cryptocurrencies to generate revenue for the website operators (browser-based mining). Mining is the method of producing new blocks in blockchain systems, most prominently cryptocurrencies such as Bitcoin. It requires miners to solve a computationally expensive puzzle to cryptographically link a new block to the previous block in the IMC ’18, October 31–November 2, 2018, Boston, MA, USA ©2018 Association for Computing Machinery. This is the author’s version of the work. It is posted here for your personal use. Not for redistribution. The definitive Version of Record was published in IMC ’18: Internet Measurement Conference, October 31–November 2, 2018, Boston, MA, USA , https://doi.org/10.1145/3278532.3278539.blockchain. The difficulty to solve this puzzle depends on the com- bined computing power of all users—depending on the difficulty, an individual requires powerful machines to increase the probability of mining a block (e.g., GPUs, FPGAs, or even ASICs). To provide an in- centive for contributing computational power, miners are awarded currency for every mined block. This monetary reward has ren- dered crypto mining a business—browser-based mining extends this business to monetize the web. Not all cryptocurrencies are equally suited for browser-based mining. The hardware imbalance and the consequential high diffi- culty to mine Bitcoin renders its in-browser mining inefficient and motivates the use of, e.g., Monero as an alternative currency that can be efficiently mined on CPUs and thus browsers. Given its design, Monero has been adopted by websites (e.g., The Piratebay or a video streaming service with subsequent media exposure [ 9,28]) and even among botnets to mine on millions of compromised hosts [ 18]. To ease browser mining, APIs [ 5,6] exist, e.g., for in-game financ- ing [7], link forwarding [ 16], captchas, during video streaming [ 10] or even as an entry fee for parties [ 15]. Our work identifies Coin- hive [ 5] as a widely used service which provides a framework for embedding a Monero miner into a website. While these frameworks enable mining without the users’ knowledge (cryptojacking), other services (Authedmine) actively ask users for their consent to do so as an alternative to displaying ads. Besides media reports, little is known about the ubiquity and use of browser-based mining. Given these new possibilities, we provide a first in-depth study of the prevalence andeconomics of browser-based mining as a new web business model. We base this perspective on crawls of 137M .com/.net/.org domains and the Alexa Top 1M list to first identify sites using browser-based mining enabling to create a new finger- printing method to identify mining code. Second, we dissect the short link service of the largest web-mining stakeholder Coinhive and screen their market power and profits. Our contributions are: •We investigate the prevalence of browser-mining in the three largest TLDs and the Alexa Top 1M, i.e., at over 138M domains. •We present a new Wasm-based fingerprinting method showing the inadequate capabilities of block lists to detect mining. •Moreover, we identify the largest browser-based mining provider Coinhive and dissect their link-forwarding service. •We present a novel methodology enabling us to associate blocks in a privacy-preserving blockchain to a mining pool. •By applying our methodology, we screen Coinhive and show that they contribute 1.18% of the blocks in the Monero blockchain mining Moneros worth 150,000 USD per month (as of writing). Structure. Section 2 establishes the basics of mining. Section 3 measures the prevalence of browser-mining. Section 4 studies the practices, userbase, and economics of Coinhive. Section 5 discusses related work and Section 6 concludes the paper.arXiv:1808.00811v2 [cs.CR] 21 Sep 2018 IMC ’18, October 31–November 2, 2018, Boston, MA, USA Rüth et al. Miner’sCoinbase TXmaj: 7min: 7ts: time.now()prev:nonce: ???merkle_root:num_tx: 4…BlockchainMerkle TreeP2P NetworkPending TXNetworkStateDifficultyBlock Reward…PoWInputBlock HeaderTX1TX2TX3TX4TX5TX..? Figure 1: Monero blockchain and PoW mining input. 2 BROWSER-BASED MINING 101 Blockchain-based cryptocurrencies build on the principle of embed- ding financial transactions in a public, tamper-proof series of blocks. To evolve the system, new blocks must constantly be appended to store pending transactions; their generation is called mining . Miners solve a crypto puzzle as a proof of work (PoW) whose difficulty is dynamically adjusted to produce new blocks at a constant block rate guaranteeing predictability and tamper resistance. Consequently, when more miners compete for finding blocks, the difficulty rises such that the block rate is met. When the PoW meets the difficulty, it links the newly mined block (containing new transactions) to the previous one rewarding the miner with currency in exchange for the contributed computing power. The recent hype around cryptocurrencies has led to substantial increases in difficulty resulting in the need for faster hardware to mine blocks profitably w.r.t. the energy costs. To increase the chance of earning currency, miners seek to increase their available computational power. This quest for speed is currently served by GPUs, FPGAs, or even specialized ASICs. One can host substantial amounts of mining hardware in dedicated data centers. Another way is to bundle the computing power of multiple miners in mining pools that share the earned revenue for the newly mined block. Browser-based Mining. Utilizing the computation power of web- site visitors provides yet another mean of increasing the mining power. By embedding mining code into websites, a miner can make use of the visitor’s CPU resources during the visit. The website oper- ator thereby saves energy costs and mining hardware investments. Thus, web-based mining is an alternative revenue generating model to monetize websites and services. However, hidden mining or with- out user consent (i.e., cryptojacking) poses a significant challenge and it is a known attack vector (Section 5). While browser miners for Bitcoin exist (e.g., jsMiner from 2011 [ 30]), the performance im- balance between CPUs, GPUs, and ASICs poses an insurmountable challenge for Bitcoin browser mining. Consequently, browser-based mining requires cryptocurrencies with PoW functions that are only efficiently computable on CPUs. Monero. Launched in 2014, Monero [ 25] (see Figure 1) is a privacy- preserving cryptocurrency whose PoW is designed to be ASIC resistant (memory intensive and periodically redesigned) enabling CPUs and thus browser-based mining. Specifically, it uses the Cryp- tonight hash function [ 23] in its PoW to mine a new block with an average block rate of two minutes. Figure 1 shows the PoW inputs; in Monero, a miner constructs a Merkle tree of the transactions that are to be included in the new block, requiring at least the Coinbase 11.01.18 11.03.18 02.03.18 11.05.18 27.02.18 08.05.18 28.02.18 09.05.18 Scan Date0.000.250.500.751.00NoCoin Detection Share Alexa .com .net .org coinhive authedminewp-monero cryptolootcpmstar other710 621 6676 5744 618 553 473 399# Potential Mining DomainsFigure 2: NoCoin detected miners on the Alexa Top 1M and .com/.net/.org domains. transaction paying the block reward to the miner. A node in this tree is the hash of its two children with the hash of the transactions as the leaves of the tree. Including the tree’s root links the trans- actions to the PoW and the final block. Now the miner’s goal is to find a nonce such that the PoW output (a hash) meets the global difficulty (here, literally the product of the hash multiplied by the difficulty must be smaller than 2256). Thus, a miner needs to draw a new nonce and recompute the hash until it satisfies this goal. The network can easily verify that the proof holds through a single round of hashing, and by including the block in the blockchain, rewards the miner with the block reward expressed through the Coinbase transaction. When using mining pools, the pool pushes jobs (containing the PoW input) asking the miners participating in the pool to find a nonce that satisfies a lower difficulty than that of the total network. When this lower difficulty is met, the miner is awarded a share of the final block reward and if by chance the actual difficulty is also met, the pool mined a block. 3 PREVALENCE OF BROWSER MINING We start our analysis of browser-based mining by investigating its prevalence in the web. Thus, we visit landing pages of a large body of domains and identify the presence of mining code using two approaches. Initially, we use a light-weight approach to download website landing pages via TLS across several datasets, i.e., .com (∼116M), .net ( ∼12M), .org ( ∼9M), and Alexa Top 1M ( ∼950K), and match their HTML body against a public filter list (Section 3.1). Subsequently, we instruct a Chrome browser to visit a subset of these domains to execute the webpage code and thereby monitor Websocket interactions and WebAssembly (Wasm) code as preva- lent techniques for browser-based mining (Section 3.2). We obtain our datasets through DNS resolutions [ 11] from zone files available at Verisign [27] (.net/.com) and PIR [19] (.org). 3.1 NoCoin List We visit every domain, prefixed with www. , via TLS and download the first 256 kB of the domains’ landing pages using zgrab . 256 kB offers a good tradeoff between capturing most content (i.e., scripts are often located in the head of the document) and having a point where to stop downloading when pages do not stop sending data. We then extract all javascript tags using lxml to apply the NoCoin filter list [ 12]. This list contains regular expressions to detect and subsequently block mining code using common ad blockers. Fig- ure 2 shows the number of domains with hits to NoCoin filter rules Digging into Browser-based Crypto Mining IMC ’18, October 31–November 2, 2018, Boston, MA, USA Alexa .orgClass. Count Class. Count 1 coinhive 311 coinhive 711 2 skencituer 123 cryptoloot 183 3 cryptoloot 103 web.stati.bid 120 4 UnknownWSS 56 freecontent.date 108 5 notgiven688 46 notgiven688 92 Total WebAssembly 796 WebAssembly 1491 Table 1: Top 5 ( ∼80%) WebAssembly signatures. Most Web- Assembly are miners ( ∼96%), dominated by Coinhive. on the top x-axis. Relative to the number of domains, the bars on the y-axis show the relative share of the top 5 mining scripts (multiple per website possible). We find the prevalence of mining websites to be rather low. Yet in comparison, (popular) Alexa-listed domains have the largest share (up to 0.07%). This seems likely since mining is most profitable with websites having many visitors. Looking at the miners, we find Coinhive, a Monero-based miner to be most prevalent (used by >75% of the mining sites). Notably, Authedmine, a variant of Coinhive asking for explicit user consent to mine and wp-monero a WordPress plugin follows but at much lower shares. We find other miners with smaller shares, e.g., Cryptoloot a Coin- hive clone. By manually inspecting a random subset, we find false positives, e.g., cpmstar is a gaming ad-network that we could not verify to contain mining code. For the once popular jsMiner [ 30], we find only 31 instances in all datasets combined. Takeaway. We observe a low prevalence of mining in landing pages according to the NoCoin list. Most miners are Monero-based with Coinhive having the largest share ( >75%). 3.2 Chrome We complement the NoCoin analysis by broadly investigating pat- terns of mining behavior when actually executing the pages. This enables to find mining domains beyond NoCoin-listed pattern. Through manual miner code inspection, we find that the major- ity of javascript miners utilizes WebAssembly (Wasm) for efficient PoW calculation. WebAssembly [ 29] is a binary instruction format— featured in recent browsers—that enables to compile e.g., C-code to Wasm for efficient execution within the browser. Further, the com- munication to the backend servers providing the PoW input often uses Websockets. To detect these, we instrument a stock Chrome web browser using the Chrome Dev Protocol [ 3] to capture all Websocket communication and to dump all detected Wasm code. To decide when a page is fully loaded, we wait for the page’s load event and set a 2 s timer on every DOM change but wait no longer than additional 5 s before we mark the page as loaded completely. In case of no load event, we wait no longer than 15 s to mark the website as timed out. We further save the first 65 kB of the final HTML to enable comparison with the NoCoin list used previously. Measurements. As this measurement is more time consuming, we restrict our scope to the .org zone and the Alexa 1M. We pre- fix every domain with http://www. allowing Chrome to follow redirects to the secured variant if necessary. Thus in contrast to our previous TLS-only measurement, we also analyze non-HTTPS websites. We build signatures from the Wasm code by combining (in a strict order) and then hashing the contained functions withNoCoin Hitshaving Wasm MinerWasm Hitsblocked by NoCoinmissed by NoCoin Alexa 993 129 737 129 608 (82%) .org 978 450 1372 450 922 (67%) Table 2: Miners on Chrome data (incl. non-TLS) found through NoCoin and by our WebAssembly signatures. Alexa .orgNoCoin Signature NoCoin Signature 1Gaming 19% Pornogr. 19% Gaming 29% Religion 9% 2Edu. Site 9% Tech. 8% Business 8% Business 8% 3Shopping 8% Filesharing 8% Edu. Site 6% Edu. Site 8% 4Pornogr. 7% Edu. Site 5% Pornogr. 5% Health Site 7% 5Tech. 6% Ent. & Music 5% Shopping 4% Tech. 6% Categorized 79% 74% 54% 42% Table 3: Top 5 categories according to Symantec RuleSpace. SHA256. Through manual inspection of the Wasm, we build up a database of ∼160 different assemblies (often versions of the con- ceptually same Miner) that we found and categorized them, e.g., through their Websocket communication backend or by some other distinguishing feature that we found in the code. Such features e.g., comprises the number of XOR, shift or load operations which we found to be quite distinctive or function name hinting at the hash function itself. Table 1 summarizes our findings for the Alexa 1M and the .org TLD from measurements in the first two weeks of May 2018. We observe most Wasm code to contain mining functionality and most miners are again Coinhive. To put the Chrome-based approach in perspective to the NoCoin list, we apply the NoCoin block list to HTML saved by Chrome, i.e., after the execution of javascripts. Table 2 shows the number of miners detected by the NoCoin list and the fraction of mining Wasm on this part as well as the total number of websites classified through our Miner Wasm signature database and the subset of websites that were detected by the NoCoin list. We observe that NoCoin classifies many websites as miners, of which only a fraction actually embeds mining Wasm code. This indicates false positives which we verified through random inspections. If we take a look at the websites for which we found Wasm mining signatures, again, the NoCoin list only classifies a fraction of these as having a miner—false negatives. Classification. We use the Symantec RuleSpace1[24] engine to categorize the mining websites. Table 3 shows the top 5 categories to which RuleSpace assigned the websites for the NoCoin list matches as well as our signature-based approach. We observe a diverse set of categories and that RuleSpace can classify a larger body of Alexa domains than .org domains. Interestingly, the categories for NoCoin and our approach differ, especially the top category shows a large mismatch, i.e., Gaming vs. Pornography and Gaming vs. Religion. This could be caused by the aforementioned gaming ad-network. Takeaway. Miners are already embedded on websites today. Simple block lists are ineffective to detect them all and our signature-based approach can detect sites beyond the NoCoin block list. Still, Coinhive is the most used mining service. 1Used in Symantec products to classify websites. IMC ’18, October 31–November 2, 2018, Boston, MA, USA Rüth et al. 100101102103104 Indexed token sorted by # links100101102103104105106Links per tokenAbsolute CDF 0.000.170.330.500.670.831.00 CDF Figure 3: The number of links per token (users) is heavily biased towards a small number of users. 4 THE COINHIVE SERVICE Coinhive provides a mining service advertised with the slogan “Monetize Your Business With Your Users’ CPU Power” [5], we ob- served Coinhive to have the most widespread use (see Section 3). Their services are built on providing a highly optimized Monero javascript miner to be embedded in websites. In turn, Coinhive keeps 30% of the mined reward. Apart from offering this API, Coin- hive offers e.g., a Captcha service and a short link forwarding service which is the subject of our first analysis. Our tools on which the following analysis is based are available at [20]. Regardless of the actual service, the process works as follows: i) A Coinhive user (e.g., a website owner) is assigned a unique token that is included in the API calls which is used to associate the mined shares. ii)Upon a website visit, the miner is loaded and connects to the Coinhive pool and authorizes with the user’s token to receive input for hashing. iii)Once a valid hash is found, it is committed to the Coinhive pool. iv)Eventually, Coinhive pays their users 70% of the block reward and keeps the remaining 30%. 4.1 Short Link Forwarding Service To begin analyzing Coinhive, we focus on its short link forwarding service, which is similar to a common short link service (e.g., bit.ly) but additionally requires to compute a configurable number of hashes before resolving the link. When a user visits a link, she only sees a progress bar indicating the share of hashes that have been computed, when all locally computed hashes have been sent to the service (i.e., the progress bar is full), the service will return the original link and will instruct the browser to redirect the user to it. This link redirection monetization is comparable to short link services delaying the redirection while serving advertisements and paying the link creator a commission [ 14]. With Coinhive, the creator of the short link receives a share of the block reward that is mined by the users visiting the short links. Their short links follow a simple structure, identified by an al- phanumeric ID: https://cnhv.co/[a-z0-9] . We observed that new links are assigned increasing IDs which enables one to enumer- ate the link address space. As of February 2018, up to 4 characters are used, resulting in a total of 1,709,203 active short links. We visit all links and gather the Coinhive redirection HTML document to collect i)the link creator’s token—used to associate performed hashes to the link creator—as well as ii)the number of hash compu- tations required by the link creator to resolve the link. Even though a single user could own multiple tokens, we will regard users and tokens as synonymous in this paper. 2829210211212213214215216 # Hashes required100101102103104105106# Links 10510121019 0.000.170.330.500.670.831.00 CDF13s 26s 51s 2m 3m 7m 14m 27m 55mDuration @20H/s 1.4h 16Gyr All links User bias removedFigure 4: Required number of hashes and their frequency of occurrence as well as the time it takes to compute these hashes. Please note the skewed x-axis. Without actually computing hashes, we can already look at i) the distribution of short links per Coinhive users as well as ii)the required number of hashes to resolve the links. Figure 3 shows the distribution of short links per user. We observe a power-law which highlights the existence of a few heavy users that created a large number of links. In fact, 1/3 of all links are contributed by a single user only and roughly 85% of all links are created by only 10 users. Of course, a single user could use multiple tokens, however, this would only emphasize our current observations. To actually resolve the link, the user needs to compute the re- quired number of hashes set by the link creator. Figure 4 shows the distribution of this link resolution difficulty in the number of required hash computations. The blue (dark) portion of the CDF depicts all observed links, while the red (light) portion removes the previously observed bias by heavy user by counting a required # hashes only once per user; i.e., 1000 links from the same user with the same number of required hash computations are only counted once instead of 1000 times as in the blue (dark) dataset. To provide a perspective on the time it takes to resolve a short link, the top x-axis shows the duration to compute the required # of Cryptonight hashes in a Chrome browser with a commodity laptop2. We observe that the majority of links can be resolved in less than 51 sec (1024 hashes). The heavy user bias is most prominent at 512 hashes, still, when removing the user-bias over 2/3 of the links of all users can be solved with at most 1024 hashes in below one minute. To our surprise, many links require a longer time to resolve; we find many different users and over hundreds of short links that set the max- imum of 1019hashes which takes several billion years to resolve. While the user’s willingness to wait certainly depends on the con- tent that is supposed to be behind a short link, high values suggest either no desire to have them ever resolved or misconfigurations (e.g., short link creators are not aware of the actual duration). Link Destinations. To understand the kinds of links that the short link service is used for, we resolve all links which require less than 10K hashes from the unbiased dataset (covering 85% of this dataset see red (light) CDF in Figure 4). Additionally, we resolve a random sample of 1000 links for each of the top ten Coinhive users. To efficiently resolve the short links without a web browser, we replicate the working principle of the web miner in a non-web implementation that can resolve multiple short links in parallel making use of the official optimized Monero hash code. We found 22013 Macbook Pro 2.8 GHz Intel Core i7: 20 h/s with 4 threads. Digging into Browser-based Crypto Mining IMC ’18, October 31–November 2, 2018, Boston, MA, USA Domain Category Freq. Domain Category Freq. youtu.be Ent. & Music 20% ftbucket.info Msg. Board 9.9% zippyshare.com Filesharing 10% getcoinfree.com Finance 9.2% icerbox.com Filesharing 10% ul.to Filesharing 4.2% hq-mirror.de Ent. & Music 10% share-online.biz Filesharing 2.9% andyspeed racing.comAutomotive 10%oboom.com Filesharing 2.8% Table 4: Top 10 domains in 89% of all samples from the top 10 short link creators. that Coinhive alters the block header contained in the PoW inputs before sending them to the users which the web miner reverts deep within its WebAssembly3. This appears to be a countermeasure to prevent using the Coinhive web miner outside of the Coinhive environment, e.g., in custom mining pools. We had to roughly compute 61.5M hashes which we were able to do in little less than two days on a capable server machine. Top 10 User. We first investigate a random sample from all short links of the top 10 users (1000 links each) representing 80% of the link targets. Table 4 shows a classification for the top 10 domains (accounting for roughly 89% of all sampled URLs) that we extracted from the destination URL. We again utilize the RuleSpace categories to manually classify those 10 domains. As the table shows, most links point to streaming and filesharing services. Top Categories. We employ the RuleSpace engine to further clas- sify the unbiased dataset into categories. One URL can have multiple categories, therefore, a single URL can contribute to different cate- gories. For roughly 1/3 of the URLs RuleSpace has no classification, for the remainder, Table 5 lists the top 10 categories and how often a URL falls into each category. We observe that sites to fall into a di- verse set of categories, unlike the top 10 users for which filesharing and streaming were the dominant categories (Table 4). Takeaway. Coinhive’s link forwarding service is dominated by links from only 10 users. They mostly redirect to streaming videos and filesharing sites. We find that most short links can be resolved within minutes, however, some links require millions of hashes to be computed which is infeasible. 4.2 Estimating the Network Size While we find many websites to use Coinhive (see Section 3), it remains unclear how many users visit these sites. Thus, the mining power and the achievable payouts are unknown. To understand the available mining power and thereby the users of Coinhive, we need to identify which blocks in the Monero blockchain were mined through Coinhive. Methodology. When a block is mined by the Coinhive network, one of the clients must have found a nonce that satisfies the PoW difficulty. Then, a new block can be mounted into the blockchain which contains the block header that is also part of the PoW input, as well as all the transactions that have implicitly been included in the PoW input through the Merkle tree root (see Figure 1). Thus, if we find the PoW input for which a suitable nonce was found, we can investigate the blockchain and look at the block that succeeds the block referenced in the PoW. If the transactions in that block form a Merkle tree whose root is equal to that in the PoW input, we 3A simple XOR with a fixed value at a fixed offsetCategory Count Category Count Tech. & Telecomm. 1,522 Shopping 572 Gaming 737 Finance and Investing 502 Dynamic Site 727 Ent. & Music 313 Business 578 Educational Site 305 Pornography 577 Hosting 298 Table 5: Top 10 categories of the unbiased dataset <10K hashes. 010 % Blocks 010305070911131517192123 Hour of Day (UTC)26.04.1803.05.1810.05.1817.05.1824.05.18Day 0 10 # Blocksmedian Figure 5: Mined blocks over time from the Coinhive net- work. Black parts mark outages of ourinfrastructure. can be sure that the PoW input was the one that was used to mine the block. This uniquely identifies the origin as each block contains the Coinbase transaction (first leaf of the Merkle tree) which is used to pay the block rewards to the miner (i.e., Coinhive). Thus we could never by accident see a Merkle tree root of another miner in the PoW input. We investigate the PoW inputs that are delegated by Coinhive to its users by connecting to one of their mining pools and request a new PoW input every 500 ms. As the network finds a new block on average every two minutes, we cluster the PoW inputs by the pointer to the previous (at time of reception, most recent) block. We found that we never obtain more than 8 different PoW inputs (even though more exist theoretically). Coinhive currently operates 32 mining endpoints (which can be gathered from the javascript or by enumerating the domain name), when we connect to all of them and repeat the process, we observe at most 128 different PoW inputs per block. While this suggests that there are two endpoints per backend system, it also puts us into the position to actually investigate each of the 128 PoW inputs and check the Merkle tree root against the Merkle tree root of the transactions in the block that was actually mined after that referenced in the PoW input. Measurements. We have been requesting new PoW inputs for four weeks and we are thus able to confidently estimate a lower bound on the blocks mined through Coinhive. Figure 5 shows a blue block for every Coinhive-mined block as well as the total number of blocks on that day. As finding blocks correlate with users mining through Coinhive, we were interested to see if blocks are found at certain times which could hint at the geolocation of the users. However, the figure (upper subplot) shows that blocks are found throughout the whole day which might be an indicator of the global reach of Coinhive. We find multiple days with significantly more blocks than on average, e.g., the 30th of April, 10th and 22nd of May 2018. The 30th of April precedes Labor Day, a public holiday in IMC ’18, October 31–November 2, 2018, Boston, MA, USA Rüth et al. Med. Avg. Hashrate Currency [blocks/day] [MH/s] [XMR] May 9.0 8.8 5.5 1231 June 10.0 9.7 5.5 1293 July 9.0 9.1 5.8 1215 Table 6: Coinhive mining statistics for three month in 2018. over 80 countries, time zone shifts to UTC or holidays could explain increased Internet usage resulting in more mined blocks. Similarly, the latter two were Ascension Day and the day after Pentecost, both public holiday in many (mostly) European countries. In the median (average), we find 8.5 (9.0) blocks per day, we noticed a disruption of Coinhive’ service on the 6th and 7th of May which resulted in only a few to no announced PoW inputs. We can estimate the combined hash rate of Coinhive by taking the network’s difficulty into account. The difficulty denotes the ex- pected number of hashes that are required to find a block which is adjusted after each block such that the block rate of two minutes is met. Over the course of our observations, the median difficulty was 55.4G hashes, which translates to a network hash rate of 462M h/s. As Coinhive mines roughly 8.5 blocks per day, they produce 1.18% of all 720 blocks/day which translates to 5.5M h/s. If we assume that a web client performs between 20 to 100 h/s, then Coinhive requires between 292K and 58K constantly mining users. Compare our findings with numbers reported by Coinhive [ 4] from Septem- ber 2017 is difficult. Coinhive wrote that their hash rate peaked at 13.5M h/s (then 5% of the network’s hash rate). However, our results are averages over long periods of time and derived from the statistical properties of the network, while those published are momentary peak rates, thus a direct comparison is not possible. If we sum up the block rewards of the actually mined blocks over the observation period of four weeks, we find that Coinhive earned 1,271 XMR. Table 6 complements our four-week analysis with three full months in 2018 showing its continuity. Similar to other cryptocurrencies, Monero’s exchange-rate fluctuates heavily, at the time of writing one XMR is worth 120 USD, having peaked at 400 USD at the beginning of 2018. Thus, assuming 120 USD, Coin- hive mines Moneros worth around 150,000 USD per month of which they say, they give 70% to their users. Still, the operational costs seem manageable, making it potentially profitable for Coinhive. Takeaway. Coinhive currently contributes ∼1.18% of the mining power of the Monero network. While probably profitable for Coinhive, it remains questionable whether mining is a feasible ad alternative. 5 RELATED WORK Browser-based mining has been subject to substantial media cover- age, e.g., reports on Pirate Bay [ 9] mining, about hacked websites for mining [ 28], miners injected into the Google’s DoubleClick ad- platform [ 26] or drive-by Monero mining on Android [ 22]. Many blog posts exist that report on Alexa-listed websites to include min- ing code [ 2,17], however, without detailing a methodology. A list published on Github [ 21] provides an overview of potential mining domains. However, this list also includes entries such as google.com which is unlikely to be mining. To the best of our knowledge, [ 8] are the first to academically investigate browser-based mining par- allel to our work. While they also find Coinhive to be the most prominent service, their analysis is based on a string search overa large set of HTTP bodies, thus not accounting for actual HTML structure which we did in our first analysis (see Section 3.1) which showed to already produce skewed results, e.g., the categories of websites significantly differs. We thus complement their results by incorporating WebAssembly fingerprinting and further shed light on the inner workings of Coinhive. In concurrent work, Konoth et al. [ 13] estimate revenue for websites on the Alexa Top 1M in- cluding mining scripts. Further, they also analyze the nature of Wasm mining for detection using a very similar methodology to what was the basis for our fingerprinting such as counting certain instruction or memory access pattern. Based on monitoring DNS, [1] also observes Coinhive as the dominant player. They report that most crypto miners are present on adult websites in the Alexa Top 1K/3K. Similar with regards to link-forwarders, [14] analyzed ad-based link forwarding services and their revenue model which relates to that of Coinhive, thus we believe their results to also apply here. 6 CONCLUSION This paper analyzes the prevalence of browser-based mining, a new revenue generating model to monetize websites and an alternative to ad-based financing that is enabled by ASIC resistant cryptocur- rencies such as Monero. By inspecting 137M .com/.net/.org and Alexa Top 1M domains for mining code, we indeed find websites that utilize browser-mining. Yet, the prevalence of browser mining iscurrently low at <0.08%of the probed sites. For its detection, we find the public NoCoin filter list to be insufficient to broadly detect browser mining. We thus present a new technique based on WebAssembly fingerprinting to identify miners, up to 82% of thereby identified mining websites are not detected by block lists. We identify Coinhive as the largest web-based mining provider used by 75% of the mining sites. Given its popularity, we further dissect Coinhives’ link-forwarding service. We find that 10 heavy users contribute over 80% of all short links mostly targeting stream- ing and filesharing services. The remaining short links target a diverse set of websites. We continue by dissecting the economics of Coinhive, we devise a new method that allows associating mined blocks with a mining pool and we find that Coinhive mines 1.18% of all Monero blocks and their visitors have a combined median hash rate of 5.5M h/s. While we find that Coinhive turns around Moneros worth 150,000 USD per month, the current value stability of cryptocurrencies requires further investigations if browser-based mining can be an alternative revenue model to ad-based financ- ing. Further, the impact of the CPU intensive miner on a website’s performance, a mobile device’s battery lifetime or a visitor’s en- ergy bill is yet to be quantified but it could be a huge hurdle to be competitive to ad-based financing on a larger scale. ACKNOWLEDGMENTS Funded by the Excellence Initiative of the German federal and state governments, as well as by the German Research Foundation (DFG) as part of project B1 within the Collaborative Research Center (CRC) 1053 – MAKI. Further, we thank Martin Coughlan from Symantec for granting us access to the RuleSpace classification engine as well as the network operators at RWTH Aachen University, especially Jens Hektor and Bernd Kohler. Digging into Browser-based Crypto Mining IMC ’18, October 31–November 2, 2018, Boston, MA, USA REFERENCES [1]360Netlabs and Xu Yang. 2018. Who is Stealing My Power: Web Mining Domains Measurement via DNSMon. http://web.archive.org/web/20180515135858/http: //blog.netlab.360.com/who-is-stealing-my-power-web-mining-domains- measurement-via-dnsmon-en/. Archived on 2018-05-15. [2]AdGuard. 2017. Cryptocurrency mining affects over 500 million people. And they have no idea it is happening. http://web.archive.org/web/20180515160301/https: //adguard.com/en/blog/crypto-mining-fever/. Archived on 2018-05-15. [3]ChromeDevTools. 2018. DevTools Protocol API docs – its domains, methods, and events. http://web.archive.org/web/20180517161942/https://github.com/ ChromeDevTools/debugger-protocol-viewer. Archived on 2018-05-17. [4]Coinhive. 2017. First Week Status Report. http://web.archive.org/web/ 20180515151445/https://coinhive.com/blog/status-report. Archived on 2018- 05-15. [5]Coinhive. 2018. Coinhive – Monero JavaScript Mining. https://web.archive.org/ web/20180515073251/https://coinhive.com/. Archived on 2018-05-15. [6]Crypto-Loot. 2018. Crypto-Loot - A Web Browser Miner | Traffic Miner | CoinHive Alternative. https://web.archive.org/web/20180515073236/https://crypto-loot. com/. Archived on 2018-05-15. [7]Robert DeVoe. 2017. Tombs.io Launches Collaborative Online Game Powered by Monero Mining. http://web.archive.org/web/20180516070407/https://btcmanager. com/tombs-io-launches-collaborative-online-game-powered-monero-mining/. Archived on 2018-05-16. [8]Shayan Eskandari, Andreas Leoutsarakos, Troy Mursch, and Jeremy Clark. 2018. A first look at browser-based Cryptojacking. In IEEE Security & Privacy on the Blockchain . [9]Guardian. 2017. Ads don’t work so websites are using your electric- ity to pay the bills. http://web.archive.org/web/20180515115349/https: //www.theguardian.com/technology/2017/sep/27/pirate-bay-showtime-ads- websites-electricity-pay-bills-cryptocurrency-bitcoin. Archived on 2018-05-15. [10] Guardian. 2017. Billions of video site visitors unwittingly mine cryptocur- rency as they watch. http://web.archive.org/web/20180516072539/https: //www.theguardian.com/technology/2017/dec/13/video-site-visitors- unwittingly-mine-cryptocurrency-as-they-watch-report-openload- streamango-rapidvideo-onlinevideoconverter-monero. Archived on 2018-05-16. [11] Oliver Hohlfeld. 2018. Operating a DNS-based Active Internet Observatory. In ACM SIGCOMM Posters and Demos . [12] Hosh (hoshsadiq). 2018. Github: Block lists to prevent JavaScript min- ers. http://web.archive.org/web/20180517153826/https://github.com/hoshsadiq/ adblock-nocoin-list. Archived on 2018-05-17. [13] Radhesh Krishnan Konoth, Emanuele Vineti, Veelasha Moonsamy, Martina Lindorfer, Christopher Kruegel, Herbert Bos, and Giovanni Vigna. 2018. MineSweeper: An In-depth Look into Drive-by Cryptocurrency Mining and Its Defense. In ACM CCS . [14] Nick Nikiforakis, Federico Maggi, Gianluca Stringhini, M. Zubair Rafique, Wouter Joosen, Christopher Kruegel, Frank Piessens, Giovanni Vigna, and Stefano Zanero.2014. Stranger Danger: Exploring the Ecosystem of Ad-based URL Shortening Services. In ACM WWW ’14 . [15] Omsk Social Club and !Mediengruppe Bitnik. 2018. Cryptorave #5 Alexiety - 0b673cce.xyz. http://web.archive.org/web/20180515160638/https://0b673cce.xyz/. Archived on 2018-05-15. [16] Paper Authors. 2018. Coinhive Link Forwarding Example to Youtube. http: //web.archive.org/web/20180516094141/https://cnhv.co/3w88o. Archived on 2018-05-16. [17] Pixalate. 2017. Pixalate unveils the list of sites secretly mining for cryptocur- rency. http://web.archive.org/web/20180515155855/http://blog.pixalate.com/ coinhive-cryptocurrency-mining-cpu-site-list. Archived on 2018-05-15. [18] Proofpoint. 2018. Smominru Monero mining botnet making mil- lions for operators. https://web.archive.org/web/20180515071304/https: //www.proofpoint.com/us/threat-insight/post/smominru-monero-mining- botnet-making-millions-operators. Archived on 2018-05-15. [19] Public Interest Registry. 2018. Zone File Access. http://pir.org/. [20] Jan Rüth. 2018. Coinhive Paper Tools. https://doi.org/10.5281/zenodo.1421702. [21] Paul Sec. 2018. Extract from the Top 1M Alexa domains (and also from investigations) using coin-hive mining service. http: //web.archive.org/web/20180515161228/https://gist.github.com/PaulSec/ 029d198a1e049acead74c31db0de1466. Archived on 2018-05-15. [22] Jérôme Segura. 2018. Drive-by cryptomining campaign targets millions of Android users. http://web.archive.org/web/20180515162842/https: //blog.malwarebytes.com/threat-analysis/2018/02/drive-by-cryptomining- campaign-attracts-millions-of-android-users/. Archived on 2018-05-15. [23] Seigen, Max Jameson, Tuomo Nieminen, Neocortex, and Antonio M. Juarez. 2013. CryptoNight Hash Function . CRYPTONOTE STANDARD 008. [24] Symantec. 2018. Advanced Web Intelligence - RuleSpace | Syman- tec. http://web.archive.org/web/20180516095136/https://www.symantec.com/ products/rulespace. Archived on 2018-05-16. [25] The Monero Project. 2018. Monero - secure, private, untraceable. http://web. archive.org/web/20180517083008/https://getmonero.org. Archived on 2018-05- 17. [26] TrendMicro. 2018. Malvertising Campaign Abuses Google’s DoubleClick to De- liver Cryptocurrency Miners. http://web.archive.org/web/20180515134601/https: //blog.trendmicro.com/trendlabs-security-intelligence/malvertising-campaign- abuses-googles-doubleclick-to-deliver-cryptocurrency-miners/. Archived on 2018-05-15. [27] Verisign. 2018. Zone Files For Top-Level Domains (TLDs). verisign.com. [28] Mark Ward. 2018. Websites hacked to mint crypto-cash. http://web.archive.org/ web/20180515154917/http://www.bbc.com/news/technology-41518351. Archived on 2018-05-15. [29] WebAssembly Community Group. 2018. WebAssembly. http://web.archive.org/ web/20180525093453/https://webassembly.org. Archived on 2018-05-25. [30] Jason Whitehorn. 2011. jsMiner. http://web.archive.org/web/20180517091106/ https://github.com/jwhitehorn/jsMiner. Archived on 2018-05-17.
{ "id": "1808.00811" }
2308.06829
When Web 3.0 Meets Reality: A Hyperdimensional Fractal Polytope P2P Ecosystems
Web 3.0 opens the world of new existence of the crypto-network-entity, which is independently defined by the public key pairs for entities and the connection to the Web 3.0 cyberspace. In this paper, we first discover a spacetime coordinate system based on fractal polytope in any dimensions with discrete time offered by blockchain and consensus. Second, the novel network entities and functions are defined to make use of hyperdimensional deterministic switching and routing protocols and blockchain-enabled mutual authentication. In addition to spacetime network architecture, we also define a multi-tier identity scheme which extends the native Web 3.0 crypto-network-entity to outer cyber and physical world, offering legal-compliant anonymity and linkability to all derived identifiers of entities. In this way, we unify the holistic Web 3.0 network based on persistent spacetime and its entity extension to our cyber and physical world.
http://arxiv.org/pdf/2308.06829v1
Hao Xu, Yunqing Sun, Xiaoshuai Zhang, Erwu Liu, Chih-Lin I
cs.NI, cs.AR, cs.CR, cs.DC
cs.NI
1 When Web 3.0 Meets Reality: A Hyperdimensional Fractal Polytope P2P Ecosystems Hao Xu, Yunqing Sun, Xiaoshuai Zhang, Erwu Liu and Chih-Lin I Fellow, IEEE Abstract —Web 3.0 opens the world of new existence of the crypto-network-entity, which is independently defined by the public key pairs for entities and the connection to the Web 3.0 cyberspace. In this paper, we first discover a spacetime coordinate system based on fractal polytope in any dimensions with discrete time offered by blockchain and consensus. Second, the novel network entities and functions are defined to make use of hyperdimensional deterministic switching and routing protocols and blockchain-enabled mutual authentication. In ad- dition to spacetime network architecture, we also define a multi- tier identity scheme which extends the native Web 3.0 crypto- network-entity to outer cyber and physical world, offering legal- compliant anonymity and linkability to all derived identifiers of entities. In this way, we unify the holistic Web 3.0 network based on persistent spacetime and its entity extension to our cyber and physical world. Index Terms —Web 3.0, fractal network, decentralized infras- tructure and identity, blockchain, polytope I. I NTRODUCTION Web 3.0 represents the next stage in the development of the World Wide Web by encouraging peer-to-peer networks among all users who enjoy equal ownership of their digital assets without relying on centralized servers or third-party intermediaries. By leveraging the Web 3.0 ready network, entities are both reached locally and globally in a unified access scheme. However, existing computer networking pro- tocols, e.g., IPv4 and IPv6, treat the address with local and global routing based on routing tables within the domain. On the other hand, the current network cannot resolve addresses and identifiers without the records from name servers, which are eventually aggregated as the root Domain Name Servers (DNS) held by central internet agencies and hinders decentral- ization in the global scale [1]. With the existing infrastructure, peer-to-peer networks are easily suffocated by tycoons and experiencing interruptions of services, as P2P networks are merely extensions of physical networks, where all devices are connected to central network infrastructures. Distributed Ledger Technology (DLT) or Blockchain is considered as the backbone of Web 3.0, which enables infor- mation distribution, and protects data integrity and credibility while maintaining consistency using consensus mechanisms Hao Xu is with Huawei Technologies (UK), Cambridge, CB4 0WG, UK, E- mail: hao.xu@ieee.org. Yunqing Sun is with Department of Computer Science, McCormick School of Engineering and Applied Science, Northwestern Uni- versity, Evanston, IL, US, E-mail: yunqing.sun@northwestern.edu. Xiaoshuai Zhang is with University of Glasgow, Glasgow, G12 8QQ, UK, E-mail: Xiaoshuai.Zhang@glasgow.ac.uk. Erwu Liu is with College of Electronics and Information Engineering, Tongji University, Shanghai, China; E-mail: erwuliu@tongji.edu.cn. Chih-Lin I is with China Mobile Research Institute, Beijing, China; E-mail: icl@chinamobile.com.[2]. And when it comes to the existence of objects and value in Web 3.0 due to anonymity and its independence from physical networks, there is always a debate about the metaphysical significance of everything on the blockchain and Web 3.0. People often wonder if their assets are real in Web 3.0, or if their identities are indiscernible in this digital realm. Can our identities truly be located in cyberspace with precise spacetime, even though they may not have any physical presence? A. Motivations of Web 3.0 network and identity management Web 3.0 offers a viewpoint of decentralization for recon- structing WWW and the internet services in controversial to big giants and centralized infrastructures with the power of blockchain [3]. Blockchain has only been considered as an one-dimensional data structure and has a little reflection of the actual/logical world. In fact, linear and repetitive data blocks resemble the idea of discrete time in Web 3.0. As the pillar of decentralized ecosystems, the blockchain is not only a chained undeniable crypto vessel but a spatio-temporal description of everything connected and mapped into the topology. 1) Web 3.0 network: Based on persistent decentralized medium and data, the Web 3.0 network is not only the extension of reality, but a new “reality” is happening within. However, to define an existence, the network needs to provide the persistent and independent coordinates of the existent, which are inherently true when they are connected in any space where the coordinate of the existent can be twofold: the space and the time. Thanks to blockchain-backed network, the network state database, e.g., connectivity, temporal topology and aliveness status, are subject to continuous refresh based on concurrent connections at any given time. An example of network identity mapping into a network address with blockchain timestamp can be found in Fig. 1, where the network is defined as a regular triangle with Koch fractal, more iterations are illustrated in Fig. 2. Compared with the current centralized network paradigm, such a fractal shaped architecture is native globally peer-to-peer and deterministic with shortest paths to better facilitate the future encrypted Web 3.0 network. Furthermore, the issue of network scalability needs to be addressed to construct a truly global and interplanetary Web 3.0 network. Unlike existing networks, the global Web 3.0 network will be a massive entity involving countless users and stakeholders, offering a vast array of services and applications, and processing enormous transactions. This amplifies the need for high network throughput and highlights the negative impact of network latency. Novel networks are yet to concern thearXiv:2308.06829v1 [cs.NI] 13 Aug 2023 2 Local routing table maintained by home routerWide area routing table maintained by lower-tier routerRegional routing table maintained by mid-tier router SnowedNet SnowedNet New blocks commit Home (Higher-tier) Router Mid-tier Router BC ADD 7 BC ADD 8 BC ADD 9 ....IP 7 IP 8 IP 9 ...BC Address IP Address Interface 7 Interface 8 Interface 9 ....SnowedNet Routing T able Blockchain T ransactions InterfacesBC ADD 4 BC ADD 5 BC ADD 6 ....IP 4 IP 5 IP 6 ...BC Address IP Address Interface 4 Interface 5 Interface 6 ....SnowedNet Routing T able Blockchain T ransactions Interfacesz BC ADD 1 BC ADD 2 BC ADD 3 ....IP 1 IP 2 IP 3 ...BC Address IP Address Interface 1 Interface 2 Interface 3 ....SnowedNet Routing T able Blockchain T ransactions InterfacesBCADD 0 ....IP 0 ...BC Address IP Address Interface 0 ....SnowedNet Routing T able Blockchain T ransactions Interfaces BC ADD 0 | BC ADD 9 ....IP 0 | IP 9 ...BC Address IP Address Interface 0 | Interface 9 ....SnowedNet Routing T able Blockchain T ransactions InterfacesLocal device is learned by its Home Router , which commits to the lower-tier router Local branch fork Local branch merge Global Ledger Local Ledger Global Ledger Local Ledger New blocks commit ...... Tier 2 Tier 2Tier 1Tier 1Tier 2 Mid branch Lower-tier Router Higher-tier Router Lower-tier Router Lower-tier RouterLower branch Lower-tier Router Higher-tier Router Mid-tier RouterLower branch Lower branchOroboros Tier 0Tier 1 Tier 2Local branch Mid-tier Router Higher-tier Router Tier 2 Tier 2Mid branch Fig. 1. Architecture of the hyperdimensional fractal network for Web 3.0 ( D= 2). consistent global state with high regional throughput, as seen in Fig. 1, where the network shards are committed into the upper network nodes. 2) Identity management: When it comes to existence, iden- tity matters. The whole network needs to recognize a user’s identity and its derivatives in a consistent manner i.e., no matter how the identifiers are processed in cryptography, they can always be linked back to a real identity and the existent in the network. Ghost identities, which are pure cryptographic products not linked to any real entities, shall not be considered a real identity, as there is no spatio-temporal existence of them. Users’ identities are managed and verified by third-party applications and service providers i.e., they possess the identity information of their clients. Compared with Web 1.0/2.0, identity management in Web 3.0 needs to be more universal because no centralized entity can harness users’ identities [4]. Furthermore, since all users are equivalent and their identities are kept anonymous in the decentralized Web 3.0 network, a real user identity should only be possessed and controlled by the user itself and the sensitive information used in identity verification needs to be regulated by the user. Web 3.0 seeks to eliminate privacy and data governance issues in today’s Internet. With the features of decentraliza- tion and anonymization, users have more control over their personal data and privacy where they own their autonomy to make choices. However, Web 3.0 may bring some new potential challenges in the perspective of legislation such as data jurisdiction and self-sovereign identity, which should be further analyzed in line with the objectives of General Data Protection Regulation (GDPR). In this paper, a novel schemefor the universal identity with their juridical compliance is proposed based on their spatio-temporal existence in Web 3.0. B. Contribution In this paper, we propose a fundamental spacetime co- ordinate system with the skeleton of a network built on blockchain. This coordinate system combines a novel network- spatial blockchain in a hyperdimensional manner with the state description of the whole network and the identities mapped to the spatial ontological entries [5]. It impacts the existing network by enabling deterministic geometrical mapping of every connected entity to the spatial description of logical space which is agnostic to the real world. Hence, they are defined only by the topological relations and identity while being timestamped by blockchain. Our contributions to Web 3.0 lay in two aspects: •A hyperdimensional simplex fractal Web 3.0 network based on blockchain, coined as SnowedNet, offering a discrete spatio-temporal coordinate, which is mapped to the physical world, to connect existent with considering blockchain consensus process and routing strategies; •A universal identity management scheme that extends the use of anonymous and consistent Web 3.0 identity in the cyber world and physical world. II. H YPERDIMENSIONAL FRACTAL WEB3.0 NETWORK The first mathematical introduction of fractal shape was first discovered in measuring the length of the coast of Britain. A fractal shape is usually defined as a rough or fragmented 3 geometric shape that can be divided into several parts, and each part is at least approximately a reduced shape of the whole, i.e., it has the property of self-similarity as shown in Fig. 2. A fractal shape is an abstract object in mathematics used to describe things that exist in nature. Inspired by fractal shape and Hausdorff dimension [6], the fractal dimension of the network is proposed to analyze complex networks. As seen in Fig. 1, the network can grow in terms of tiers, which follows the same pattern of the previous step, and the network can have infinite tiers, allowing infinite connections and infinite shards of the network. Koch fractalHyper-dimensional n-simplex fractal 2-simplex 2-simplex 3-simplex 3-simplex 1-simplex 1-simplex 3-simplex 5-simplex 4-simplex 2-simplex 3-simplex 4-simplex 5-simplexEdge Face 1-simplex 1-simplex Iteration 1 Iteration 2 2-simplex Fig. 2. Hyperdimensional n-simplex fractal edge and face stereophonic projection and Koch fractal iterations (tiers) 1 and 2, note that 4-simplex and 5-simplex cannot be viewed as a whole in 3D, and Koch fractal iterations of n-simplex ( n≥4) are beyond authors’ imagination. A. Fractal network overview The blockchain has a timely synchronized mechanism that ensures the information is distributed across nodes with the ability to verify the data integrity efficiently. In the fractal network, the blockchain brings an opportunity to enable the dynamics of label-based routing/switching [7], in the way of updating the routing/switching records in a timely and accountable manner with the reinforced security for trans- portation and authentication because of encrypted identities. With the given amount of records, if the blockchain records are set to be only kept at the given length and refresh the chain and blocks over time, and old blocks are considered in the last epoch, which would not be synchronized to the networking devices but stored in the archive. New records will replace the old records block by block on a periodical basis. The behavior of such blockchain is like an Ouroboros , the snake has its tail in its mouth, rolling over and over again. The record which points to an entity in the real world will be set to refresh every time a block is generated, hence becominga dynamic network client. The blockchain is also considered a global public network, which keeps all records on every participating node. Meanwhile, each fraction or segment of the longest chain can be regarded as a segment of records of what happened on the chain, and verifiable with little effort by distributed nodes regardless of where records are kept on the chain. B. Hyperdimensional fractal network architecture for Web 3.0 1) Hyperdimensional fractals: Network is naturally visible as a flat surface with every connection from end to end. However, the use of overlay in the network has created a new mind-blowing topological challenge, with the state-of-the-art software-defined networks (SDN). The SDN controller builds multiple bridges among the peer-to-peer connected entities, for example, VPN and tunneling between servers. The underlying network is responsible for forwarding the network traffic based on distance vectors or link states. Blockchain full nodes are considered as peers in the network, and they are required to be a full replica of each other. The network is initially established on multi-port switches, by building an equivalent relation between switches with a given number of ports so a node can have direct connections according to quantity of ports, D. If all nodes are connected directly, they will form a topological relation where each node hasDarms, and each arm has identical jumps among all nodes represented by a unit length in the topology. In the case D= 1, we have a segment line with two vertices, known as 1-simplex [8], shown in Fig. 2, and 2-simplex, an equilateral triangle in the case D= 2, and a tetrahedron with D= 3, 4- simplex, a.k.a., pentachoron, when D= 4. However, we can have switches with ports as many as 24/48/96 ports, which leads to D= 24 /48/96to create a 24/48/96-simplex and forms a near hypersphere in the dimension of 24/48/96. The dimension of the network as a whole is largely decided by the switch with the most ports D, and all sub-network can be seen as a Ddimensional space reduced to its actual port quantity. It is always true to have a full topological description of the lower dimension structure in a higher dimension. Note that, blockchain consensus and the network throughput might become the bottleneck of achievable dimensions. Consensus, in particular, voting-based consensus, suffers heavy commu- nication overhead and a significant computation complexity challenge. As for the network throughput, the traffic amount on the tier 0 routers is effectively the summit of the whole network. Meanwhile, when we attach a sub-network to any nodes, e.g., shards in Fig. 1, it establishes a tiered topology with its hierarchy similar to the parent network. In that case, the network starts growing to higher tiers, no matter which dimension it belongs to. The topology is fractal in both dimensional and geometrical. 2) Design overview - entities and functions: To sculpt the Web 3.0 network with fractal shapes abstracted from reality, the computer network is mapped into a new network architec- ture we propose, named SnowedNet with characteristics from blockchain, fractal shapes, security, routing and switching. The entities in SnowedNet are listed as follows. 4 •Blockchain address ( BCADD )is any encoded hashed public key that fits the requirements of blockchain plat- forms, acting as the encrypted identity, for instance, ERC- 20 compatible address or W3C/ISO DID (decentralized identity) compliant if required in the future. The BCADD is a prerequisite for anything connected to the network. •SnowedNet nodes , are an umbrella term for both SnowedNet routers or end devices. The node of SnowedNet is marked with BCADD . When the node is an end device, it can be routed directly and determined without further lookup of blockchain addresses, as it is a vertices of the topology. •SnowedNet records consist of two basic types of trans- actions, self-claims and routing requests. They are basic units in both SnowedNet blockchain and SnowedNet routers and switches. For every record, there is an as- signed label by the end-point routing node, and the label contains the information of current label-based routing information. •SnowedNet blocks , are ordinary blockchain blocks, linked by hash and timestamps. •SnowedNet shards , are the composition unit of a given height of segments, the node within the shard keeps the identical records as other peer nodes under the same segments. And the shard represented by interconnected nodes within the same tier is considered as a contention group. •SnowedNet segments , the length unit of SnowedNet blockchain, are consisted of blocks with varied lengths. A segment is defined with the number of blocks, known as the capacity of the segment. Moreover, the lower tier always keeps more segments of blocks. •SnowedNet addresses , are hybrid addresses of SnowedNet topology labels and entities’ BCADD and their other (optional) addresses. A complete SnowedNet address is both globally routable and switchable. •Block height is represented by tier number and the indexes of labels. The tier is counted from 0, as shown in Fig. 1. The block height is limited by a maximum value defined by the tier number and the segment capacity. •Routing path is the outcome of the calculated shortest paths between the requested client and the origin node. The path is dynamic and real-time based on the latest routing information shared by its upper-tier routers. The path can always be obtained by the upper-tier router, as it knows the whole composition of current sub-nets with all labels under its hierarchy. •SnowedNet epoch , is a preset time period for a complete refresh in the direction marked by arrows in Fig. 1. SnowedNet refresh makes the original blockchain folded as a coil. All records are reeled with the latest records always on the surface, resembling the blockchain into a block ring. 3) Consensus process: The consensus for maintaining the blockchain network is proof-of-routes (length). The router with most routes should have a greater chance to mine. Meanwhile, the winning nodes are under continuous testing of the routing(or switching) speed, by evaluating searching algorithms to validate its performance. A threshold can be set up for each router’s minimum searching performance in each tier, as the consensus should maintain its minimum commitment to deterministic network and end-to-end latency. The nodes in vertices or the routing node are set to be re-elected during the mining activities in each tier, and the winner node can replace its lower-tier node in a competitive manner. In addition, the unsuccessful node will be set back to the higher tier. To obtain the maximum live routes, the following steps of sending heartbeat packet can be used: 1) The node unicasts to all neighboring nodes, as one of the requirements for neighbor discovery and verification. The maximum hop for neighbor discovery is 1. 2) The node multicasts to all routing nodes (except neigh- bor nodes) stored in the current routing node, i.e., vertices of all records on the Koch curve. The maximum hop for the remote router is 2×t, t̸= 0, the tier number. The transmissions of packets are designated to the router vertices to avoid flooding in the network and remove the necessity of pinging every router along the way to the destination. 3) The node broadcasts to all local entities’ records stored in the current routing node. The maximum hop for reaching the entity is 1. For each successful transmission with a response received by the current routing node, the length of routes is calculated in terms of the total segment length, s, which is the minimum unit of SnowedNet length defined as the shortest side length. In practice, the segment length is equivalent to 1 hop between two highest-tier neighboring nodes, i.e., the shortest segment in the fractal shape. 4) Routing strategy: Having the segment and vertices defined as the number of records and routing nodes, the SnowedNet is illustrated in Fig. 1. By comparing the snowflake shape with the network characteristics of SnowedNet, we can conclude the following attributes: tier number t; node numbers N; the length of segments kept by the highest tier node noted ass; segment length S; the number of blocks per segment b; block numbers B; the number of records per block r; and record numbers R. The number of nodes Ncan be defined with the given number of tiers t, N= 3×4t. (1) The length of total segments Sfor a given number of tiers tis, S= 3×((4 3)t). (2) The total number of blocks Bin the above SnowedNet for one SnowedNet epoch and the total records Rkept in the given SnowedNet with rrecords in each block are B=b×S, R =r×B. (3) The blockchain records contain the information needed for routing and switching, which are essential self-claimed identi- ties from clients of their current network address bindings. In 5 the case of switching, the local record utilizes the binding of the entity’s encrypted address, i.e., BCADD , and the network interface, e.g., the port number of a switch. By having the BCADD as the header, the endpoint switch/router is able to steer the traffic between any entities tagged within the switch/routing table records and the attached interfaces. As a part of blockchain-integrated functionality in Web 3.0, smart contracts can be directly involved in making Service Level Agreement (SLA) deals between two endpoint users. Such SLA information is readable to all routers, and acknowl- edgments of resource reservation can be collected by replying to the request hosted by smart contracts. III. V ERIFIABLE IDENTITIES BETWEEN REALITY AND WEB3.0 As aforementioned, crypto-network-entity, a network avatar of the user’s credential, is native to Web 3.0, existed in the fractal polytope shape of a decentralized network, and its identifiers are used by dApp, DeFi, Decentralized Autonomous Organizations (DAOs) and decentralized infrastructures. On the other hand, identities should be consistent in both decen- tralized and centralized infrastructures. Therefore, there is a requirement of consistent verifiable identities between Web 3.0 and reality, satisfying the legal anonymity and the linkability of decentralized identifiers from network to applications. A. Overview To ensure user anonymity in the Web 3.0 network, a three- tier identity mechanism was introduced in deController [4] to connect entities in reality with anonymous identifiers in the network and services for security and privacy. According to the identity generation procedure, the authorities can au- dit anonymous identities in Web 3.0 network. However, the public should have no information about the identity linked to the anonymous identifiers.Moreover, once the identifiers generation procedure involves more parameters from networks or services, auditing from authority becomes a challenge. Here, we follow the design of the three-tier identity, refine the parameters in identity derivation, and enable the public verifiable authenticity of the privacy-preserving links between identities in Web 3.0 and reality as illustrated in Fig. 3 and Fig. 4. B. Identity and Operations All the identifiers should not reveal any sensitive identity in- formation. As shown in Fig. 3, when the user moves from one jurisdiction (J1) to another (J2), the identifiers BCADD and APPID are generated from the registered RealID and privacy- preserving invisible links are built among them. BCADD and APPID can be verified by the public as seen in Fig. 4 to allow people to confirm the BCADD andAPPID provided by the user are valid when the user uses them in the Web 3.0 cyberspace, e.g., network, applications, services, etc. •Identity credential: noted by RealID is the master key of the user in the Web 3.0 identity layer implicitly linked to the identity IDof the entity in reality, which is Applications Network layer Service providerAuthorityJ1 Fractal networkUser J3 J2 Own RegisterApplication layer Used inDeployUsed byUsed by RealIDBCADD Generate/UpdateAPPID 1 APPID 2 Derive Derive Identity layerFig. 3. Three-tier identity scheme for the Web 3.0 fractal network. unchangeable in the Web 3.0 cyberspace and should be issued, updated, and verified by the authorities from its country of origin or other permitted authorities in reality. RealID is the root of all the identifier derivation in the Web 3.0 cyberspace. •Web 3.0 identity: noted by BCADD is the identity of the user in the network layer. BCADD can be generated and updated by the user itself to be derived with optional parameters para auth from authorities based on RealID . The BCADD and its link to the corresponding RealID can be verified by the public. •Virtual identifiers: noted by APPID , represents users’ identities in the application layer for different services and applications. Generally, APPID is derived from BCADD together with optional parameters para′ authfrom authorities and the corresponding service/application. Furthermore, it can contain essential user information for specific usage such as balance checks for services and age confirmation for applications. There are three distinct requirements that should be con- sidered to implement the proposed three-tier identity scheme including identity anonymity, linkability between two tiers and public verification. However, conventional certificates and other public-key methods are difficult to meet all three requirements in a fully decentralized infrastructure. To achieve the required identity operations, we have two research questions: 1) How to verify the users’ ownership of anonymous identifiers? 2) How to verify anonymous identi- fiers are generated using authority-provided parameters, hence approved by authorities? C. Technical route: Non-Interactive Zero-Knowledge Proof (NIZK) One promising technical route could be zero-knowledge proof (ZKP), first proposed by Goldwasser, Micali, and Rack- off in 1985 [9]. The highlight of ZKP is one party proves to another party using cryptographic methods that it possesses knowledge without revealing any information about the knowl- edge. 6 There are two well-established categories of ZKP: interac- tive and non-interactive. The interactive ones enable the prover to show its enough knowledge of the statement to the verifier via interactive procedures. However, such a design requires both the prover and the verifier keeping online and probably incurs heavy communication overhead. To mitigate the communication complexity of interactive ZKP, non-interactive zero-knowledge (NIZK) [10] is pro- posed to prune the interactive rounds to one round, which is more desirable than interactive ZKP in the Web 3.0 sce- nario. A general NIZK system is sculpted by three algo- rithms: (Setup ,Prove ,Verify )with a statement xand wit- nessw. (1) Setup (1κ)→σ, where σis a public random string; (2) Prove (σ, x, w )→π, where πis the proof; (3) Verify (σ, x, π )→0/1, where 1 means accepts the proof and 0 means rejects. To apply the NIZK scheme to our refined identity scheme, the algorithm generating BCADD from RealID /para auth or the algorithm generating APPID from BCADD /para′ auth is regarded as the statement xin NIZK. Meanwhile, RealID /para auth andBCADD /para′ auth are regarded as wit- nesses in different statements. To implement the Setup pro- cedure, a smart contract or the authorities can be regarded as trusted parties to generate the public random string. Then, the user performs Prove and includes the proof πinto auxiliary values auxBCADD /auxAPPID . The verification procedure can be implemented as smart contracts in Web 3.0 so all BCADD and APPID can be verified by the public. D. Three-tier identity based on NIZK Though BCADD can be derived directly from RealID , it needs to meet the legal requirement as the authority may need to attain the user’s identity. Therefore, the authority needs to first bind RealID toIDand urge the use of BCADD derivation with the provided parameters. We present an example of how public verifiable anonymous identities are generated, used, and verified in Web 3.0 as demonstrated in Fig. 4. 1) From RealID toBCADD :First, user registers RealID to authority as shown in Fig. 4, step 1. Then, the user receives parameter para authwith auxiliary value auxauthfrom an authority, as shown in Fig. 4, step 2, where auxauthcannot be forged by other parties. auxauthcan be regarded as signature ofpara authandRealID to endorse their authenticity. In step 3, user generates BCADD from RealID and para auth. Then, instep 4, user generates auxBCADD from auxauth,para auth, andRealID . Note that both BCADD andauxBCADD perfectly hide RealID .auxBCADD can be used to verify the validity of the parameters in generating BCADD . Each time user uses BCADD in the network, it attaches auxBCADD , as shown in step 5, which enables the public to verify that BCADD is generated from a real RealID that is already registered to authority. 2) From BCADD toAPPID :When a user access an application in Web 3.0 and this application needs to verify the private data held by the user, e.g., the age of the user, it sends a verifying request with para appand auxiliary value auxappto the user, as shown in Fig. 4, step 6. Since the age information auxauthVerification contract BCADD APPIDRealID Generate ProofVerification Verification contract Generate ProofVerification Generateparaauth VerifyPublicPublic Verify Authorities Generate auxBCADD Web 3.0 applications/servicesauxapp paraappRegister (optional) aux'auth para'auth auxAPPIDUser UserAccessReq uest1 2 34 5 67 89 10Fig. 4. Workflow of the three-tier identity scheme based on NIZK. is personal information should be held by authorities, the user should receive para′ authwith aux′ auth, as shown in step7, where para′ auth contains user age and other optional parameters. Then, the user derives APPID from BCADD ,para app,para′ auth instep 8, and generates auxAPPID from auxBCADD ,auxapp, aux′ auth,para app,para′ authandBCADD instep 9. Noted that both APPID andauxAPPID hides BCADD ,RealID and user age. If user attaches auxAPPID with APPID , the public could verify that APPID is linked to a valid BCADD orIDby checking auxAPPID instep 10. In this way, we can establish a holistic identity scheme, extending RealID toBCADD in the network layer and BCADD toAPPID in the application layer so a joint au- thentication can be achieved by the network for applica- tions via decentralization-ready physical infrastructures, e.g., blockchain network routers and mobile networks [11]. IV. C HALLENGES AND OPPORTUNITIES A. Questioning the existence of crypto-network-entity The definition of new “existence” brings rigorous discussion on the juridical aspect. In the discovered network, the existence comes after the crypto-loaded physical entity is plugged into the network, hence leaving the record of crypto-network- entity on the blockchain ledger. Therefore, the challenges to new world legal governance become an extension of the cyber or physical world, depending on where in the cyber or physical world the crypto-network-entity is plugged in. The physical location of vertices nodes in the fractal simplex network is also subject to the local jurisdiction, and subjects to the real physical world entity. In this way, people may wonder whether the network is independent or not, and the answer can be straightforward by examining the existence 7 when physical entities are removed. The status of the network is independent from any single networking device but subjects to the decentralized infrastructure as a whole. However, the status of the network does not undermine the existence of crypto-network-entity as long as the decentralized information medium stays true. B. Questioning on network calculus and pathfinding In the fractal regular polytope network, we have the shortest path known as 2t, but the stub of the network has entered an extremely complex space where routes need to be found in hyperdimension. More advanced manifold-based geometric solutions to the shortest route on the fractal polytope network are critical challenges and future work for the comprehensive simplex fractal network. Furthermore, more basic properties such as network mass, density, volume, acceleration, power, etc., can be mapped into the fractal polytope network for a better understanding of network characteristics. C. Questioning the privacy and legal compliance of anonymity Due to the nature of user anonymity in Web 3.0, it does not set any restriction to the real identity behind the user which may result in abuse and forgery of user identities. Therefore, the supervision of RealID is a key point to be considered to align the proposed three-tier identity scheme to legislation in building the global Web 3.0 cyberspace. As shown in Fig. 4, an optional design is to utilize authorities to issue and update a user’s IDto avoid the user forging its identity information or using identity information of others without permission. When users try to access certain Web 3.0 resources, in which real- name registration is required, such a design can ensure the generated BCADD from RealID and the derived APPID from BCADD contain authorized identity information to represent the real identity of the user. V. C ONCLUSION AND FUTURE WORK In this paper, we propose SnowedNet, reforming the spatial information of everything that is connected to Web 3.0 in a hyperdimensional simplex topology, timestamp everything with blockchain consensus, and extending the Web 3.0 ex- istence to cyberspace and physical space with ZKP on their identities derivatives. The fractal-driven topology is illustrated with a 2-simplex, a regular triangle with Koch iterations, showing not only the juridical broader mapped into shards but also enormous capacity and simplicity in building the future generation decentralized network. However, there are limited findings on the shortest path on higher dimensional fractal topology. In future work, a compre- hensive study on hyperdimensional routing protocol with state- of-the-art polytope theories is plan to help find the shortest path in any dimension of fractal simplices. Furthermore, NIZK verifiable identities and identifier derivation need to be explored to enhance the efficiency of identifier generation to crystallize a comprehensive cryptographic scheme. In addition, NIZK identity statement should be compatible with various structures of identity information from different jurisdictional authorities.REFERENCES [1] L. Jin, S. Hao, Y . Huang, H. Wang, and C. Cotton, “Dnsonchain: Delegating privacy-preserved dns resolution to blockchain,” in 2021 IEEE 29th International Conference onNetwork Protocols (ICNP), 2021, pp. 1–11. [2] X. Li, P. Russell, C. Mladin, and C. Wang, “Blockchain-enabled applica- tions in next-generation wireless systems: Challenges and opportunities,” IEEE Wireless Communications, vol. 28, no. 2, pp. 86–95, 2021. [3] J. Bambacht and J. Pouwelse, “Web3: A decentralized societal infras- tructure for identity, trust, money, and data,” 2022. [4] H. Xu, Y . Sun, Z. Li, Y . Sun, X. Zhang, and L. Zhang, “deCon- troller: A Web3 Native Cyberspace Infrastructure Perspective,” IEEE Communications Magazine, 2023. [5] O. Eriksson and P. J. ˚Agerfalk, “Speaking things into existence: Ontological foundations of identity representation and management,” Information Systems Journal, vol. 32, no. 1, pp. 33–60, jan 2022. [Online]. Available: https://onlinelibrary.wiley.com/doi/10.1111/ isj.12330 [6] K. J. Falconer, The Geometry of Fractal Sets, ser. Cambridge Tracts in Mathematics. Cambridge University Press, 1985. [7] A. Viswanathan, E. C. Rosen, and R. Callon, “Multiprotocol Label Switching Architecture,” RFC 3031, Jan. 2001. [Online]. Available: https://www.rfc-editor.org/info/rfc3031 [8] P. McMullen and E. Schulte, Abstract Regular Polytopes. Cambridge University Press, dec 2002. [9] S. Goldwasser, S. Micali, and C. Rackoff, “The knowledge complexity of interactive proof-systems,” in Proceedings oftheSeventeenth Annual ACM Symposium onTheory ofComputing, ser. STOC ’85. New York, NY , USA: Association for Computing Machinery, 1985, p. 291–304. [Online]. Available: https://doi.org/10.1145/22145.22178 [10] A. Fiat and A. Shamir, “How to prove yourself: Practical solutions to identification and signature problems,” in Conference onthetheory and application ofcryptographic techniques. Springer, 1986, pp. 186–194. [11] H. Xu, X. Liu, Q. Zeng, Q. Li, S. Ge, G. Zhou, and R. Forbes, “De- centRAN: Decentralized Radio Access Network for 5.5G and beyond,” inIEEE ICC Workshops, 2023.
{ "id": "2308.06829" }
2403.15074
Tax Policy Handbook for Crypto Assets
The Financial system has witnessed rapid technological changes. The rise of Bitcoin and other crypto assets based on Distributed Ledger Technology mark a fundamental change in the way people transact and transmit value over a decentralized network, spread across geographies. This has created regulatory and tax policy blind spots, as governments and tax administrations take time to understand and provide policy responses to this innovative, revolutionary, and fast-paced technology. Due to the breakneck speed of innovation in blockchain technology and advent of Decentralized Finance, Decentralized Autonomous Organizations and the Metaverse, it is unlikely that the policy interventions and guidance by regulatory authorities or tax administrations would be ahead or in sync with the pace of innovation. This paper tries to explain the principles on which crypto assets function, their underlying technology and relates them to the tax issues and taxable events which arise within this ecosystem. It also provides instances of tax and regulatory policy responses already in effect in various jurisdictions, including the recent changes in reporting standards by the FATF and the OECD. This paper tries to explain the rationale behind existing laws and policies and the challenges in their implementation. It also attempts to present a ballpark estimate of tax potential of this asset class and suggests creation of global public digital infrastructure that can address issues related to pseudonymity and extra-territoriality. The paper analyses both direct and indirect taxation issues related to crypto assets and discusses more recent aspects like proof-of-stake and maximal extractable value in greater detail.
http://arxiv.org/pdf/2403.15074v3
Arindam Misra
q-fin.GN, cs.CR
q-fin.GN
1 Arindam Misra Abstract The Financial system has witnessed rapid technological change s. The ri se of Bitcoin and other crypto assets based on Distributed Ledger Technology mark a fundamental change in the way people transact and transmit value over a decentralized network , spread across geographies. This has created regulatory and tax policy blind spots, as governments and tax administrations take time to understand and provide policy responses to this innovative, revolutionary, and fast -paced technology. Due to the breakneck speed of innovation in blockchain technology and advent of Decentralized Finance , Decentralized Autonomous Organizations and the Metaverse , it is unlikely that the policy interventions and guidance by regulatory authorities or tax administrations would be ahead or in sync with the pace of innovation. This paper tries to explain the principles on which crypto assets function , their underlying technology and relates them to the tax issues and taxable events which arise within this ecosystem. It also provides instances of tax and regulatory policy responses already in effect in various jurisdictions , including the recent changes i n reporting standards by the FATF and the OECD . This paper tries to explain the rationale behind existing laws and policies and the challenges in their implementation . It also attempts to present a ballpark estimate of tax potential of this asset class and suggests creation of global public digital infrastructure that can address issues related to pseudonymity and extra -territoriality . The paper analyses both direct and indirect tax ation issues related to crypto assets and discusses more recent aspects like proof -of-stake and maximal extrac table value in greater detail . The overall objective of the paper is to enable a tax policymaker, an auditor, or an investigator to obtain a reasonable understanding of this technologically challenging realm of economic activity , and formulate tax polic y and laws according to the specific requirements of their individual jurisdictions. Keywords: Blockchain, Crypto Assets, NFT, Bitcoin, Ethereum, DeFi, DAO , Crypto Tax TAX POLICY HANDBOOK FOR CRYPTO ASSETS 2 Index Page No . 1. Introduction 4 2. Bitcoin and the Blockchain 6 2.1 The Origins 6 2.2 Bitcoin in a nutshell 6 2.3 Basic Concepts 7 2.3.1 Hash Functions 7 2.3.2 SHA256 security 8 2.3.3 Digital Signatures 9 2.3.4 ECDSA and Bitcoin addresses 11 2.3.5 Bitcoin Transactions 16 2.3.5.1 Tax Implications of UTXO Based Transactions 18 2.3.6 The Bitcoin Blockchain 19 2.3.7 Bitcoin Mining 21 2.3.7.1 Mining Pools 26 2.3.7.2 Estimating the extent of Mining 26 2.3.7.3 Bitcoin Mining and Game Theory 28 2.3.8 Taxation of Mining Activity and Rewards 29 2.3.8.1 Direct Taxes on Mining 30 2.3.8.1.1 Taxation of crypto asset acquired as mining rewards 30 2.3.8.1.2 Disposal/transfer of crypto asset s acquired as mining rewards 31 2.3.8. 2 Indirect Taxes on Mining 31 2.3.8.2.1 Indirect Taxes on Supply of crypto assets 36 2.3.8.2.2 Indirect Taxes on use of crypto assets for payments for goods and services 37 2.3.8.2.3 Taxing the externalities of mining using the proof -of- work mechanism 37 2.3.9 Proof -of-Stake and Forging 37 2.3.10 The Bitcoin Network 39 2.3.11 Forking 40 2.3.11.1 Hard Fork 40 2.3.11.2 Soft Fork 42 2.3.11.3 Taxation of forking events 43 2.3.12 Bitcoin Wallets 43 3. Crypto Exchanges 45 4. Source of Value of crypto assets and Bootstrapping 47 5. Initial Coin Offerings 48 6. Airdrops 49 7. Ethereum 49 7.1 Proof -of-Stake based consensus in Ethereum 51 7.1.1 Slots and Epochs 53 7.1.2 Rewards and Penalties 55 7.1.2.1 Rewards 55 7.1.2.2 Penalties and Slashing 57 7.1.3 Staking Pools 57 7.1.4 Taxation of Proof -of-Stake based consensus in Ethereum 58 7.1.4.1 Direct Taxes related to Proof -of-Stake based consensus in Ethereum 58 3 7.1.4.2 Indirect Taxes related to Proof -of-Stake based consensus in Ethereum 59 7.1.4.3 Taxes on MEV rewards on Ethereum 60 7.2 Smart Contracts 60 7.2.1 Issue with code -only smart contracts 62 7.3 Tokens 63 7.3.1 ERC-20 Token Standard 64 7.4 Non-Fungible Tokens 64 7.4.1 Legal Status of NFTs 68 7.4.2 ERC 1155 Token Standard 70 7.4.3 Taxation of NFTs 71 8. Decentralized Finance 72 8.1 MakerDAO 73 8.2 Uniswap 75 8.3 Taxable events in DeFi ecosystem 80 8.3.1 Direct Taxes in DeFi ecosystem 80 8.3.2 Indirect Taxes in DeFi ecosystem 82 8.4 Maximal Extractable Value (MEV) on Ethereum 82 8.4.1 MEV Supply Chain and its taxation 85 9. Decentralized Autonomous Organizations – DAOs 87 9.1 Legal Entity Status of DAOs 91 9.1.1 Unregistered DAOs 92 9.1.2 DAOs registered as a legal entity 93 9.2 Taxation issues of DAOs 93 10. International Cooperation and Exchange of Information 94 10.1 FATF Standards on VAs and VASPs 95 10.1.1 Challenges in Travel Rule implementation 96 10.2 Crypto -Asset Reporting Framework 97 10.3 Need for Global Public Digital Infrastructure 99 10.4 The Challenge of Anonymity Enhancing Crypto Assets 101 11. Conclusion 104 References 105 4 1. Introduction On 3rd January 2009, Satoshi Nakamoto mined the first block of Bitcoin (the genesis block) and created a revolutionary system of storing and transmitting value in a trustless1 manner over an open network. The genesis block also insinuated at the philosophy behind the newly created network. The transaction which generated the first 50 Bitcoins contained the phrase “The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.” which alluded to the problems of the contemporary monetary and financial system. However, Bitcoin was and remains largely a network for storing and transmitting value through the blockchain . Few years later , on 30th July 2015 Vitalik Buterin started Ethereum, which had more features as compared to Bitcoin and worked like a global general purpose computing virtual machine. The ability to run customized code on blockchain started an entire ecosystem of applications which provide innovative financial products from lending a nd borrowing , to insurance through smart contracts2. With blockchain networks like Solana the transaction speeds can outnumber traditional networks like Visa3. Entities like Decentralized Autonomous Organizations , Decentralised Applications and the Metaverse challenge the traditional notions of source and residence -based taxation and pose new challenges to taxing this form of digital economy. This has given rise to a new asset class which has unique features like openness, decentralization, pseudonymity , and transparency. This asset class also aims at improving the efficiencies of the current financial and monetary system where transfer of securities can take a couple of days, or sending/receiving huge sums of money across nations can take a few days. It enables creating a financial system where users with lower capital do not get differentially treated than those with huge capital4. Although there are studies that indicate that entities with large capital can get certain advantages in the crypto asset ecosystem (Aramonte et. al 2021) . This has also created new challenges for tax policy and administration, which is more accustomed to function in a centralized banking ecosystem where identities of the participants are known or possible to be known. The beneficial owners hip of entities can be found and the source and origins of transactions can be traced in the centralized system. However, with crypto assets, especially those held and transacted using non-custodial wallets5 it is difficult , if not impossible, to identify the natural or juridical person behind the transaction. The nature of these assets also blurs regulatory boundaries as they possess the characteristics of money, equity, commodity, financial instruments, and property 1 A trustless system is one in which the participants do not need to trust a third party or each other for the system to function as intended. *The author belongs to the Indian Revenue Service and is currently working as a Joint Commissioner at the Tax Policy Research Unit, Department of Revenue, Government of India . Email: misra.arindam@gov.in **This paper is not a legal or investment guide or advice and is purely academic in nature. Readers should draw their own legal conclusions and investment decisions regarding Crypto Assets and their Taxation . *** The findings, interpretations, and conclusions expressed herein are those of the author and do not necessarily reflect the views of the Government of India . This paper represents the personal views of the author only, not the views of the Government of India . The author accept s sole responsibility for any errors. **** Readers are advised not to send any Crypto Assets to any public addresses given in the paper , the author is not respon sible for loss of any Crypto Assets due to any such actions. 2 Smart Contracts are analogous to automated agreements stored on the Blockchain which can accept or release crypto assets or perform certain actions when certain conditions specified in the form of code are met 3 Solana: Better Than Your Credit Card? 4 https://hbr.org/2022/05/how -digital -currencies -can-help -small -businesses 5 Non -Custodial wallets allow users to have full ownership of their crypto assets without relying on any central custodian of the secret keys corresponding to the crypto assets 5 (Auer, R., & Claessens, S. (2018) ). Consequently, many countries have no regulatory or taxation framework for this asset class, and there is wide variety in regulation and taxation of this asset class across jurisdictions which have formulated policies and guidance for crypto assets . The increasing volumes of transactions in crypto assets make it a sizeable tax base, which if not taxed appropriately , can lead to potential revenue loss. Thus, it becomes important for policymakers to have a conceptual understanding of this asset class and its financial ecosystem, to effectively formulate and administer realistic tax policies and laws regarding crypto assets, or to use the existing legal and policy framework to collect due taxes. It is also imperative for investigators and law enforcement agencies to acquaint and train themselves with this technology , as they are likely to have more frequent encounters with it while performing audit and investigating tax fraud cases . There is abundant literature and guidance available to the tax authorities, practitioners, and taxpayers regarding the regulatory and taxation regime s for crypto assets in different jurisdictions. However, it is imperative to have a grasp o f the underlying technology and dynamics of these assets and not just the legal provisions , to be able to effectively regulate and tax them. For example, notions like the site of storage of Bitcoins and crypto assets , and the services provided by various members of this ecosystem and their place of supply have a bearing on multiple issues related to direct and indirect taxes. It is important to understand the mining process using proof -of-work and proof -of-stake mechanisms , and the nexus between a miner or validator and crypto asset owner whose transaction is included on the blockchain by the miner or validator ( service provider) for the purpose of indirect taxation. Also, questions like tax treatment of Non-Fungible Token s (NFTs) and what exactly the owner of an NFT gets legally , are central to their taxation. This paper tries to relate the technological underpinning s of this asset class to the tax events they trigger and the source of economic value creation in this ecosystem, which can enable the tax administrations to tax them intuitively based on the existing tax provisions or any other specific provisions or guidance for crypto assets. It also tries to quantify th eir tax potential from publicly available data on crypto asset transactions . This paper first explains the basic concepts of blockchain technology using Bitcoin as a classic example. It also explains the vulnerabilities of the Bitcoin Blockchain to emerging technologies like quantum computing. The later sections deal with Ethereum and its recent change to the proof -of-stake consensus mechanism . The discussion tries to link the underlying technolog y to the regulatory and tax implications. It also tries to make the reader understand why a specific regulatory or enforcement action which is effective in the current centralized system , may not be practical in case of crypto assets. The paper also includes the regulatory and tax policy responses by multiple jurisdictions to specific areas in crypto assets to enable the tax practitioner s to understand the various approaches used to tax this asset class. For example, a law enforcement agency’s request to a Decentralized Application to identify the beneficial owner of a particular crypto asset address might be impossible for the application to process for purely technological reasons. The understanding of underlying technology is also important to formulate practical and realistic policies to ring fence this technology from its potential misuse for tax evasion, money laundering , terror financing , proliferation financing and other illegal activities and at the sam e time , not to stifle the innovative spirits of the torch bearers of this technology , which also has huge potential benefits (Marian, 2013 ), (Kapsis, 2023) , (Shin & Rice, 2022) . 6 2. Bitcoin and the Blockchain 2.1 The Origins The Oxford English dictionary defines Bitcoin as “a system of electronic money, used for buying and selling online and without the need for a central bank” and “a unit of the bitcoin electronic system of money” which essentially captures the notion we attribute to Bitcoin , when we refer to the Bitcoin network for storing and transmitting value , whose unit of accounting is unsurprisingly known as , Bitcoin. It also refers to the protocol or software that various nodes in the Bitcoin network run to transmit and include the trans actions on the blockchain in the form of blocks . At a very basic level , the Bitcoin Blockchain records transactions between entities on a public ledger structured in the form of blocks by using cryptographic techniques without involving any central authority like a bank. However, to prevent fraud and double -spend transactions6 the blockchain relies on a network of nodes which maintain the integrity of the chain of transaction s cryptographically and are in -turn rewarded for that. 2.2 Bitcoin in a nutshell Bitcoin has an open permissionless blockchain where anyone who generates a correct cryptography - based pseudonym (Bitcoin address) and its corresponding private key , can start transact ing. Also, anyone with appropriate hardware and network capabilities can join the network and get rewarded (depending on their computational power) for adding transactions bundled into blocks on the blockchain (mining) , securing and maintaining the blockchain . Unlike a banking system where users must undergo a Know Your Customer ( KYC) procedure and risk profiling before opening an account, one can instantaneously generate Bitcoin pseudonym(s) and start transacting on the blockchain . In a common banking transaction between Bob and Alice the account balance of Bob is reduced by a certain amount and that of Alice is increased by that amount by a central authority . Bob may also pay some transaction fee to the bank for facilitating the transaction . The central authority essentially plays the role of minimizing the counter party risk involved in the transaction. Similarly in the Bitcoin Blockchain , users transmit amount denominated in Bitcoins to each other. However, instead of relying on the bank for processing the transaction they use the Bitcoin Blockchain which approves this transaction with the help of various nodes (miners) which cryptographically record the set of transactions called a block in a public blockchain using a process called mining. Instead of paying the bank fee the users pay fees to the miners who maintain the integrity of the Bitcoin Blockchain and get this fee along with an in -built economic incentive in the Bitcoin Blockchain as a reward. Transmitting value through the Bitcoin Blockchain involves no settlement intermediaries and the blockchain is oblivious and agnostic to the geographical location of the owner of the Bitcoin pseudonym ous address . This creates and maintains an immutable global public ledger in which all the BTC value ever exchanged by a Bitcoin pseudonym ous address is readily and publicly available, and is used to verify and validate future transactions. 6 A double -spend transaction is one in which a Bitcoin owner in the ecosystem , Alice, owns a certain BTC value and transmits it to Bob for buying a good or a service. However, the flaw in the network does not prevent her from resending the same BTC value to Carol, a third us er. This allows Alice to spend the same Bitcoins twice. 7 2.3 Basic Concepts The underlying technology of Bitcoin tries to solve the problem of transmitting value from one user to another in a trustless manner, using a distributed public ledger without involving any central authority. This problem requires technological solutions w hich ensure trust in a trustless environment. Just as a banking system needs to develop mechanisms to verify identity and maintain the security of the bank accounts , the Bitcoin system also solves these problems by combining cryptography, game -theory, comp uter networking and economics. Cryptography is extensively used in the Bitcoin ecosystem . Hash functions and digital signatures form the bedrock on top of which the entire technological stack of Bitcoin and other crypto assets is built . To understand the mechanics of any transactions in this ecosystem , it is imperative to understand how these fundamental building blocks like hash functions and digital signatures along with economic incentive mechanisms make this system work effectively in a fault tolerant manner. The next section explains the basic concepts of hash function s and digital signatures which will be used repeatedly in the subsequent sections. 2.3.1 Hash Functions In a blockchain like Bitcoin the copy of the public ledger is stored by many participants of the Bitcoin Blockchain called nodes. As each individual node can store, transmit, and validate transactions, it is important that the transactions are verifiable and temper -evident , as in a n open and permissionless system like Bitcoin it is impossible to prevent tempering by malicious nodes, but possible to make the tempering evident through cryptograph y. In solving this problem in the blockchain , hash functions have a critical role to play. Many of us might have come across hash of a particular file while downloading it from a website . The purpose of the hash is to enable the user downloading the file to confirm that the file has not been tempered and is same as present on the website. Hash functions are mathematical functions which map a string of any length to a string of fixed length based on certain algorithm that scrambles the input string to generate a seemingly unrelated output string of fixed length . It is like a unique fingerprint of given dat a string . It can be represented as shown in Fig.1 Fig.1 Hash Functions For any hash function to be cryptographically secure it must have the following properties: a) Computational Efficiency: For an input string of certain size, the time taken by the algorithm to calculate the hash or digest of the input should be a linear function of the size of the input string. Input String (arbitrary length) Hash Value (fixed length) Hashing Algorithm 8 b) Collision Resistance: The hash value function maps the infinite set of strings of variable length to a finite set of hash values of fixed length. From the pigeonhole principle7 it can be inferred that there exists a string 𝑦 for a string 𝑥 and hash function 𝐻(), such that 𝐻(𝑥)=𝐻(𝑦)=𝑧 when 𝑥≠𝑦 . Such a case is called a collision, when two non -equal input strings have the same hash value. However, for cryptographically secure hash functions, even though the collisions exist , it should be computationally infeasible to find two strings that have the same hash. c) Hiding: It should be computationally infeasible for an attacker to guess the input string correctly by looking at the hash. And even if a slight change is made in the input string, the cryptographic hash changes completely . This can be seen with the SHA256 hash of the string “Crypto Asset taxation is interesting” concatenated with various special characters as shown in Table 1 . String SHA256 hash Crypto Asset taxation is interesting~ 94c68e0e2fe8e816b7290352dd689c54cca15d4c18717586c84e37c6a81c1356 Crypto Asset taxation is interesting@ a233387a164f7ef4d4c630e5f1c73cdc1c87a3e68e437a917d3cdc971b0d603c Crypto Asset taxation is interesting# 5e47cbeb3a3926059ab42cef858386caa05ac6776fc8bfeba0294bd2b8a4266d Crypto Asset taxation is interesting$ b2a85c2e59a7e480950c885b8e28730addbe40fc713e5268d7e46a1d2f5c9397 Crypto Asset taxation is interesting% 9050a1d69e3d4cff17cbcfd73166d78f827d125e040641341e36f9a8d5bd6aa2 Crypto Asset taxation is interesting& cc7375d79bab0cac25f831dfb9fa05458423d37cfeaedfbdb61f577f94a6a601 Crypto Asset taxation is interesting* 7bd72477ad02701a977019bba8d1c919b2775358f9c25817cb442bc83bed459d Table 1. Changing hash Values with changes in input string From the table , it can be inferred that chang ing a single character generates a totally different hash value. This characteristic of the SHA256 Cryptographic hash function is important for making the blockchain temper -evident, which means that every participant in the blockchain would be able to identify any tempering by a malicious actor with transactions or other block fields in the blocks that are already a part of the blockchain . 2.3.2 SHA256 security Bitcoin uses the SHA256 algorithm for hashing. It is a secure hashing algorithm designed by the United States National Security Agency8. It is widely believed to be collision resistant as for a given string 𝑥 an attacker trying to find an input string 𝑦 for a hash function 𝐻() such that 𝐻(𝑥)=𝐻(𝑦)=𝑧 would have to calculate at least 2128 hashes, which is an extremely large number. The highest hash rate generated by the Bitcoin network till March 2024 is ~600 Exa9 hashes per second . Even at that hash rate it would take around 17,983 ,805,11710 years to find a collision by brute force calculation , which is more than the estimated age of our universe. However, there are certain hash functions which do have efficient collision detection methods. In case of SHA256 we do not have knowledge of any such efficient collision detection methods as of now , and it is largely believed to be collision resistant , as despite best efforts , collisions could not be found11. However, there is no way to prove that a hash function is collision resistant. In the past , hash functions have been broken and phased out of security systems . A famous case is that of MD5 hashing algorithm which was widely used but eventually phased out for use as a cryptographic hash function. 7 If n+1 pigeons occupy n holes, then some hole must have at least 2 pigeons 8 National Institute of Standards and Technology (NIST). Secure Hash Standard (SHS). Federal Information Processing Standards Publication 180 -4. 9 1018 10 ((2^128) ÷ ( 600 × (10^18) × 365×86400)) 11 https://steviecellis.medium.com/the -beautiful -hash -algorithm -f18d9d2b84fb 9 Wang & Yu (2005) found and published ways to attack MD5 hash ing algorithm12 and Magnus & Stefan (2005) produced two Post Script files which had the same MD5 hash13. Hash functions are so critical for blockchain s as they are the primary mechanisms of creating trust about the integrity of information being exchanged between the nodes of the network. If an underlying algorithm like SHA256 breaks down, the trust in the Bitcoin blockchain would also crumble . Quantum computers can also significantly affect the cryptography used in Bitcoin. It is estimated that in the 2030s quantum computers would be able to crack SHA25614 unless Bitcoin Blockchain migrates to quantum safe cryptography. As the blocks and transactions in the Bitcoin Blockchain are identified using the hash value of their header, a well -orchestrated attack by an attacker having a reasonably sized quantum computer can potentially cause significant damage to trust in the Bitcoin Blockchain . However, just as the traditional banks continuously improve the security of their credit cards and internet banking solutions, Bitcoin Blockchain can also find potential solutions to circumvent the likely threat f rom quantum computers . 2.3.3 Digital Signatures The Bitcoin Blockchain needs to identify the originators of transactions and owners of funds who can spend their Bitcoins on the Bitcoin Blockchain using valid transactions. This is analogous to a banking system where the bank assigns a customer identification number to each customer and each customer has their respective username and passwords for online banking. It is a mechanism to establish the identity , to verify the originator and authorizer of the transactions. However, in centralized banking system s, additional checks are possible to verify the identity of the originator of the transaction in circumstances of suspicion and there is a rigorous process of onboarding which includes mapping the customer identification number to a natural person using Social Security Number, Passport etc. The beneficial ownership of the account is also captured while opening the bank account. As the Bitcoin Blockchain does not have any centralized authority to verify identity, it relies on cryptographic techniques like digital signatu res to validate the identity of the participants in the system. A digital signature is like a stamp of authentication of the origin of a message, transaction or document which establishes that the information did indeed originate from the person who has signed the message, transaction or document and it has not been altered. An excellent overview of how digital signatures work can be found in security tip (ST04 -018) of the US Cybersecurity and Infrastructure Security Agency15. We often come across digital signatures in our daily lives while receiving digital documents from the government . Various PDF documents contain digital signatures which are verified as soon as the PDF file is opened. One such example is the AADHAAR document (Indian social security number) downloaded in PDF format. The user downloading the document can ensure that the document has indeed been issued by the issuing authority i.e., the Unique Identification Authority of India (UIDAI) and has not been tempered with. Fig. 2 and Fig. 3 show how a user can verify the identity of the issuer and absence of any tempering in the document. 12 Wang, X., & Yu, H. (2005, May). How to break MD5 and other hash functions. In Annual international conference on the theory and applications of cryptographic techniques (pp. 19 -35). Springer, Berlin, Heidelberg. 13 Daum, Magnus & Lucks, Stefan. (2005). Attacking Hash Functions by Poisoned Messages "The Story of Alice and her Boss. 14 In the 2030s, quantum computers will be able to crack the SHA -256 algorithm used by Bitcoin 15 https://www.cisa.gov/uscert/ncas/tips/ST04 -018 10 Fig. 2 Digital Signature being used to ensure that the document has not been modified Fig. 3 Properties of digital signature From the above figure it is clear that the said digital signature is issued by a Certifying Authority which contains the public key and the identity of the Unique Identification Authority of India (UIDAI) . It is a kind of authorised directory of public keys which maps them to a natural person or an organization. As shown in Fig. 3 the digital signature can also be used for non-repudiation . The signature of the Unique Identification Authority of India (UIDAI) on the AADHAAR document makes it impossible for the UIDAI to claim that it has not issued and signed the said document. The understanding of non -repudiation property of digital signatures is crucial for an investigator or tax auditor to prove that the funds in a crypto asset wallet are indeed controlled and beneficially owned by a natural or juridical person. Digital signatures are based on public key cryptography . A public key cryptographic system uses a pair of keys with each pair consisting of a public and a private key. The public key is publicly known and can be shared with various users and the private key is kept secret . To prove identity, the transaction is signed (encrypted) using the private key and the signed as well as the original transaction is transmitted to the receiver by the sender . The signed( encrypted ) message is then decrypted by the receiver using the public key of the sender , which is known to the receiver, and is matched with the original (unencrypted ) transaction . If the two match , then it can be inferred that the message did indeed originate from the owner of the private key corresponding to the public key used to decrypt the signed message . For example , Consider the private key 1ee283aa3024205e69c14b11b65685ac367213aba131e654d97020cfe5aa5818 11 and its corresponding public key fc1a62a566ce576431cc2c96dac6766fb8fcea90b8da28307b1af1647a361f874c9604c3c98497a11538 7b0382df141d4cdda97bc8502a7cf7af267ce91d3f45 Alice has to send the message “Crypto Taxation is interesting” to Bob , and Bob needs to verify that this message is indeed from Alice , and that it has not been tempered. Thus, Alice uses her private key to encrypt the message “Crypto Taxation is interesting” and generates the signed (encrypted) message . She transmits the signed message along with the original message to Bob . Cryptographically the signed message would be 02df346b572d370d5bb19cd5a6de115335284d4c6de7683078eef9d6df11e14c236af35e817a303d3d ed6b3e63531e5ad26f6db006fbbf97ca6c96de60db3326. Bob receives the signed message as well as the original message “Crypto Taxation is interesting”. He decrypts the signed message using the known public key of Alice and compares it with the original message “Crypto Taxation is interesting” . If the two messages match, then Bob can say with certainty that the message is indeed sent by Alice and has not been tempered . If a malicious actor tempers even a single bit of the original or signed message sent by Alice, Bob would come to know that the message has been tempered or was not sent by Alice . This use of digital signatures in blockchains makes them temper -evident. This can be seen pictorially in Fig. 4 . Public key cryptography is central to the addresses used by Bitcoin to send and receive Bitcoins. The public key is analogous to the bank account number in a banking system and private keys are analogous to the passwords used to authorize transactions. The public key is derived from the private key using a one -way function16, which has the nature of making the computation possible only from the private key to the public key. These one -way functions are based on properties of large prime numbers. For example, it is very easy to find the product of two very large prime numbers, but it is extremely difficult, given the product , to factorize it into the two large prime numbers. The public key can be easily derived from the private key using the one -way function, but it is practically impossible to derive the private key from a public key. Bitcoin uses the Elliptic Curve Digital Signature Algorithm (ECDSA) which has 256-bit private keys. This means that a Bitcoin private key is a random 256-bit number. 256-bit keys are highly secure and currently it is practically impossible for an attacker to derive the private key from a public key using brute force. In the best case the attacker would have to guess 2128 keys , and even if the attacker uses the fastest supercomputer in the world with capacity of 1.1x1018 floating point calculations per second , with 10 floating point operations to be carried to try a key, it would take around 1 trillion years to derive the private key. However, with the advent of quantum computers it is believed that algorithms like the Shor’s algorithm can break public key cryptography in reasonable time by adopting more efficient method s of factorizing large numbers (Fahmy , 1997) . This can pose a significant threat to public key cryptography in general and crypto assets in particular. 2.3.4 ECDSA and Bitcoin addresses Bitcoin uses the Elliptic Curve Digital Signature Algorithm (ECDSA) for its digital signature scheme. There are multiple elliptic curves in ECDSA. Bitcoin uses the Secp256k1 elliptic curve to derive the public keys from private keys. However, even though p ublic and private keys are required for bitcoin 16 In computer science, a one -way function is a function which is easy to compute for every input, but given a computed output, it is very hard to invert. 12 transactions, in order to reduce the size of transactions, instead of using the public key, Bitcoin uses the public address which is a modified version of the public key. This transformation creates various types of addresses through the algorithm depicted in Fig. 5. Besides allowing for a greater number of transactions in a block due to lower transaction size, this transformation has some positive security implications, as it provides quantum resistance to existing public keys17 which hold Bitcoin and reduces the possibility of errors that users might make in specifying the public addresses while sending the Bitcoins, due to the presence of a checksum. Fig.4 Signature verification in public key cryptography 17 As discussed in 2.3.3 using Shor’s algorithm on quantum computers it would be possible to obtain the private key corresponding to a given public key efficiently. However, if the attacker has a hashed version of the public key and not the public key itself, he/she need to find the public keys first using Grover’s Algorithm ALICE Crypto Taxation is interesting 02df346b572d370d5bb19cd5a6de11 5335284d4 c6de7683078eef9d6df11e 14c236af35e817a303d3ded6b3e6353 1e5ad26f6db006fbbf97ca6c96de60d b3326 Signed message Message en crypted using Alice ’s private key 1ee283aa3024205e69c14b11b65685 ac367213aba131e654d97020cfe5aa5 818 BOB receives the signed message a nd the origi nal message , decrypts th e signed message using Alice ’s public key fc1a62a566ce5 76431cc2c96dac6766f b8fcea90b8da28307b1af1647a361f8 74c9604c3c98497a115387b0382df14 1d4cdda97bc8502a7cf7af267ce91d3f 45 and compare s to the original mess age Crypto Taxation is interesting Crypto Taxation is interesting As both the messages are identical, the mess age was indeed sent by Alice and has not been tempere d 13 Fig. 5 Deriving a Bech32 Bitcoin address from a public key For getting an identity on the Bitcoin Blockchain , the user must generate a random number between 0 and 2256, which becomes the private key of the user. The user derives the corresponding public key of this private key using the Secp256k1 elliptic curve of ECDSA and it is transformed into a Bitcoin address using the process shown in Fig. 5 . In this process it is critical to have a good source of randomness as the key generation algorithm uses a random seed to generate the key pair. There are multiple websites which help users to generate such key pairs, they use various methods to generate a truly random number by using techniques like moving a mouse pointer or entering random text as input. One such website is www.bitaddress.org . Fig. 6 is a screenshot from the website, which shows how it uses the mouse movement to generate a truly random number which is used to generate Bitcoin key pairs. Fig. 6 Random number generation using mouse pointer for generating Bitcoin private key The generated Bitcoin address is shown in Fig. 7. It is important to note that in this process of generating a Bitcoin address and its corresponding private or secret key, there is no requirement to provide any identity related information. No Know Your Customer (KYC) procedure is required to generate t his valid Bitcoin address which can be used for transaction on the Bitcoin Blockchain . The validity of the bitcoin address can be easily verified on the Bitcoin Blockchain Explorer as given in Fig. 8. As we have freshly created this address there are no transactions on this address. Similarly, a user can create any number of addresses and make transactions on the Bitcoin Blockchain without undergoing any Identity verification or KYC. Unlike the digital signatures which had their public keys verified by a central authority like in case of UIDAI, the Bitcoin Blockchain does not require attaching any real -world identity to the digital signature . This has implications for tax enforcement and other law enforcement agencies , as this identity on the Bitcoin Blockchain is not mapped to a real -world identity. Unlike details like Swift Code and a name or possibly a social security number attached with a bank account, there is no such personal or Public Key SHA256 RIPEMD160 Checksum BTC address 14 geographical information associated with a Bitcoin address. However, there are some mechanisms to do so on a probabilistic basis. This makes it pseudonymous. Fig. 7 Bitcoin address generated using the Random Seed Fig. 8. The newly created Bitcoin address displaying zero BTC amount on Bitcoin Blockchain In this case, methods like subpoena and summons cannot be issued to a central authority like a bank or a stock exchange to obtain information about the beneficial owner of this Bitcoin address. Methods to map a real -world identity to this Bitcoin address are usually based on blockchain analytics and inference. In case of a centralized exchanges where users do not generate their own key pairs and the exchange does this for them, the KYC information is captured before on -boarding a customer and can be obtaine d after satisfying the legal requirements, through their law enforcement portal. However, such centralized exchanges might primarily rely on the self -declaration of tax residency by the user. The Bitcoin address is basically a 160 -bit number. Therefore, a maximum of 2160 unique addresses can be generated. This might raise concerns for some users about collisions in Bitcoin address generation, i.e., two users independently generating same Bitcoin addresses and their corresponding private keys . However, as the number of addresses is too large, the probability of a collision is almost non -existent. For a detailed mathematical analysis of this problem, you may refer to an article by andytoshi on The Bitcoin Birthday Paradox18. It concludes that there would be a 0.1% chance of a collision if 5.4x1022 addresses are in existence. Still there is no reason to worry about collisions as: 18 https://download.wpsoftware.net/bitcoin -birthday.pdf 15 i) The probability of collision is extremely low (1 in 1048) for each independent collision ii) It would take trillions of years to reach a stage where so many Bitcoin addresses are generated that the newly generated addresses have a significant chance of colliding with the old ones. iii) Since only 21 million Bitcoins can ever be generated and the smallest possible unit of Bitcoin is 1 Satoshi or 10-8 Bitcoin, only 2.1x1014 addresses can possibly have any amount of Bitcoin in them and an attacker would have to generate trillions of Bitcoin addresses before he/she can find a collision address which has Bitcoin balance . Thus, it is practically impossible for two Bitcoin users to generate the same address independently unless they have used the same or predictable source of randomness. So, if a taxpayer presents the argument of his/her Bitcoin being stolen by someone who maliciously generated their public and private key pair, the taxman should know that it is practically impossible for anyone to do so, and the private key might have been compromised in some othe r way. In the next section we would see how the addresses and their corresponding private keys are used to transact on the Bitcoin Blockchain . From the point of view of tax investigation and enforcement as well as for other law enforcement agencies it is important to have a general understanding about the characteristics of the public and private keys as well as the public addresses of Bitcoin and other crypto assets. For investigators involved in enforcement actions as well as the forensic analysis of evidence , it is important to be able to identify crypto assets address and keys to find the quantum and flow of funds. It would also be important to use regular expressions to identify certain crypto asset addresses and keys located in mobile devices or hard drives. Although, nowadays various forensic investigation tools provide this functionality. However, knowledge about the various types of addresses of crypto assets might help the investigators and the taxman to prima facie identify the crypto assets involved in the investigation. The algorithm shown in Fig. 5 generates 3 types of Bitcoin addresses which can enable an investigator to identify/suspect a string of characters representing a Bitcoin address. Awareness about Bitcoin address types can also aid an investigator in tracking the flow of funds in cases of theft, fraud or establishing the ownership or control of a Bitcoin address. The three types of Bitcoin addresses generally used in transactions are: i) P2PKH address es: These addresses are the first version of Bitcoin addresses and are also known as legacy addresses. They start with the number ‘1’ and have 26 to 36 characters. The transactions using these addresses are larger in size and hance require more transaction fee making this address type inefficient. For example, 1KfVFNtxkknugXhA9uYkohMWxG8f78nyax ii) P2SH address es: These are like P2PKH addresses and provide more complex functionality like multiple signatures for spending the Bitcoins. They start with the number ‘3’. For example, 3FMFtFAJxKmvpumn3sGjA6xjXw1M4Bw97v iii) P2WPKH or Bech32 : These transactions are advance transactions which help to reduce transaction size and make them faster and more efficient. These are used in SegWit transactions, a new format for Bitcoin transactions in which to accommodate more transactions in a block , certain information (regarding witnesses) was removed from the input field of the block. These addresses start with ‘bc1’. For example, bc1q9jayxqvah5gynukddmmvs7jc9xwjc0c6emulpp Similarly the Bitcoin private keys start with ‘K’,‘L’ or ‘5’ like Kx4cBkAHgD9CrYNhTM12P5cNgVfwTeG5nN2R4KxcZjPPLx7DfrEr L5WNtTRjhqisXpnkCbr2mRu6oR7k34axzggh4nyXKuQU6aozLnkQ 5J5PZqvCe1uThJ3FZeUUFLCh2FuK9pZhtEK4MzhNmugqTmxCdwE 16 These patterns can help investigators to identify the use of Bitcoin blockchain by the taxpayer or suspect. The regular expressions19 for Bitcoin and other crypto assets’ addresses and keys can be used to look for use of such assets by the taxpayer or suspect on a computer or disk using specialized software . In Bitcoin, mnemonics -based keys, often referred to as mnemonic seeds or recovery phrases , as shown in Fig. 8A , are a human -readable and memorable representation of the private key or seed used to generate a deterministic wallet. These phrases typically consist of a sequence of 12, 18, or 24 words chosen from a predefined list of words. Mnemonics serve as a conven ient way for users to back up and restore their cryptocurrency wallets without needing to store or remember the raw cryptographic keys themselves. They are crucial for wallet recovery in case of loss, theft, or hardware failure, as users can simply input their mnemonic seed into a compatible wallet software to regain access to their funds. Mnemonics -based keys adhere to the BIP -39 standard20, ensuring compatibility across different Bitcoin wallets and implementations. Thus, whenever a n auditor or investigator comes across such mnemonics it should be identified as a seed phrase for a crypto asset wallet. Fig. 8A mnemonics -based keys 2.3.5 Bitcoin Transactions Bitcoin is primarily a means for transmitting value from one user to another through an open, permissionless and trustless network. Bitcoin Blockchain has multiple mechanisms to ensure the validity of transactions which make sure that it is usually impossible to carry out fraudulent transactions. A transaction is usually of the form of Alice paying Bob a certain Bitcoin value . The various aspects of ensuring security and integrity of transactions are: i) The users must own the Bitcoin value that they wish to transfer and should be able to prove the ownership unambiguously on the network. For example , if Alice has 2.5 BTC the Bitcoin Blockchain based on a consensus, should agree that Alice owns 2.5 BTC ii) Appropriate funds should be available with the user. It should be impossible to transfer 3 BTC when a user owns only 2.5 BTC21. iii) The originator and authorizer of the transaction must be verifiable as Alice iv) The transaction should not have been tempered One of the most important ideas in a transaction on Bitcoin Blockchain is that of an Unspent Transaction Output (UTXO). UTXOs are quantities of Bitcoin sent to various public addresses which have not yet been spent by them. They represent the units of Bitcoin which can be referenced by the 19 Regular Expressions are patterns which are used for matching strings by computers 20 https://en.bitcoin.it/wiki/BIP_0039 21 There is no concept of loans or any overdrafts in Bitcoin transactions. 17 owners of the Bitcoin addresses to which the UTXOs are assigned , and can be spent on the Bitcoin Blockchain . For every valid transaction Alice must reference a UTXO which is a result of previous transaction by Alice herself or some other address in the Bitcoin Blockchain which transferred Bitcoins to Alice’s Bitcoin address. The only exception to this is the first transaction in every block , called the Coinbase transaction, which results in newly created bitcoins being assigned to the miner of the block as reward. Coinbase transactions do not require any input UTXO, but only the pay -out Bitcoin address. UTXOs are analogous to cheques which are written in the name of a specific Bitcoin address owner and can be spent only by them. It also important to note that while Bitcoins are fungible, UTXOs are not fungible. A user must use the entire value of the input UTXO either by transferring Bitcoin value to other Bitcoin addresses , their own address or as transaction fee for miners . The difference in the value of the input and output UTXOs is deemed to be the transaction fee for miners. UTXOs can be imagined as piggybanks assigned to specific users and every time the user intend s to spend the amounts kept in the piggybank , they must break the entire piggybank assigned in their name , and create new piggybank(s) in the name of the intended transferees or the transferor himself/herself which can only be spent by them. In the transaction depicted in Fig. 9 these new output UTXOs (piggybanks) are for the Bitcoin addresses of Bob, Carol, and Alice. Any change that is not assigned to either Bob and other transferees or Alice’s new piggybank , is by default the miner fee given by Alice for adding her transaction on the Bitcoin Blockchain . Fig. 9 A Bitcoin Transaction In the above transaction Alice sends 2.5 BTC to Bob, 0.2 BTC to Carol and 0.25 BTC to herself (to a new Bitcoin address controlled by her or her existing Bitcoin address) the balance amount of 0. 05 BTC is the miner fee. The UTXOs are in the form of a locked script which can only be spent by a user who has a public address , same as that specified in the locking script. It is a ki nd of cheque written for the user whose public address is same as that specified in the script. The input UTXOs of 1.2 and 1.8 BTC have been locke d using a script by the sender for Alice’s Bitcoin address . So, Alice refers to the input UTXOs in the input side of her transaction and specifies the output Bitcoin addresses of Bob, Carol, and herself along with locking scripts and signs the transaction using her private key. She then broadcasts the transaction signature along with her public key which allows 1.2 BTC Alice 1.8 BTC Alice Unlock Alice’s UTXOs Lock Output in new UTXOs for Bob, Carol and Alice. Balance for miner fee and sign using Alice’s pvt key 2.5 BTC Bob 0.2 BTC Carol 0.25 BTC Alice 0.05 BTC Miner 18 the nodes of the Bitcoin Blockchain to make sure that the transaction has indeed originated from Alice and that she is the one entitled to spend the input UTXOs of 1.2 and 1.8 BTC. The nodes compare Bitcoin address corresponding to the public key of Alice with the Bitcoin address specified in the input UTXO, if they match , then they infer that indeed Alice is entitled to spend the Bitcoin amount contained in the input UTXO. Then the nodes verify the signature of the transaction broadcasted by Alice . If the signatures are verified, then it can be inferred that indeed Alice has authorized the spending of the input UTXOs. This ensures that only Alice can spend the input UTXOs owned by her Bitcoin address. Suppose an eavesdropper Eve knows Alice’s public key somehow and tries to spend her UTXOs. She cannot do it as Eve does not know the private key of Alice and would have to sign the transaction using her own private key or any other private key . The nodes of the Bitcoin network would fail to verify the signatures and would come to know that it is not Alice but someone else who has signed the transaction or the transaction ha s been tempered . In case Eve uses her own private and public key pair to create a transaction having UTXOs meant for Alice as input, the Bitcoin address corresponding to the public key of Eve will not be same as that of Alice’s public key and the nodes will be unable to successfully run the unlocking script of UTXOs meant for Bitcoin address of Alice, making Eve unable to spend Alice’s UTXOs. This combination of locking and unlocking scripts along with digital signatures makes sure that UTXOs are not spent fraudulently by malicious actors. While broadcasting the transaction , Alice transmits the signature of the transaction along with her public key. This has potential implications for security threats from quantum computer s, as until only the Bitcoin address is known to the attacker with a reasonabl y resourceful quantum computer, he/she will have to first find out the public key itself using Grover’s Algorithm and then use Shor’s Algorithm to find out Alice’s private key in reasonable time. However, with the disclosure of public key while spending the UTXOs, it might become easier for an attacker to find the private key of Alice before the transaction is included in the next few blocks , allowing him /her to spend Alice’s UTXOs fraudulently. It can also be seen that a Bitcoin transaction22 on the blockchain has no narration, purpose code or identity or IP address information of any device and natural or juridical person attached with it. Thus, by merely looking at the transaction it is not possible to know the device or IP address that originated the transaction as well as the real natural or juridical persons behind it or the purpose of the transaction. However, some blockchain analytics and inferences can help in such identification. 2.3.5.1 Tax Implications of UTXO Based Transactions The UTXO based design of Bitcoin and other similar crypto assets like Bitcoin Cash and Monero can have implications for determining the cost basis for calculation of the capital gains liability. As the UTXOs are not fungible, each UTXO(s) belonging to a public key(s) of a taxpayer can be uniquely identified . While transacting on the Bitcoin Blockchain, the taxpayer might choose an optimal combination of the input UTXOs which minimizes the transaction fee, but this might give rise to different tax liabilitie s due to possibly different cost basis of each UTXO . This can lead to significant complexity for owners of crypto assets while reporting the basis of transactions and calculating their tax liability from crypto asset transactions. 22 https://www.blockchain.com/explorer/transactions/btc/e9412cfda50be55c0a1989fb0ac7a2514a2f47852804d 4d7cfdebb33f5e780f3 19 To simplify the calculation of cost basis and the tax liability many tax administrations allow various accounting methods to determine the cost basis of crypto assets. The methods are as follows: i) First In First Out (FIFO): The earliest brought crypto asset is sold first ii) Last In First Out (LIFO): The most recently brought crypto asset is sold first iii) Highest In First Out (HIFO): The most expensive crypto asset is sold first iv) Specific Identification (Spec ID): The specifically identified asset in record is sold. This is the method most consistent with the UTXO based design of Bitcoin and other similar crypto assets . v) Average Cost Basis (Known as Share Pooling in the UK): A method wherein identical assets are pooled and the average cost basis is taken for each of these pools. Depending on the average basis being taken for the entire financial year or for each disposal t he methods are also known as the total average and moving average methods respectively. vi) Periodic Basis: The cost basis in some jurisdictions is determined by the value of the crypto asset at the beginning of each tax year. This method is used by the Belastingdienst vii) PVCT (Plus-value à court terme ) method: While dispos ing a crypto asset, the cost basis is calculated by the fraction of the acquisition cost of the entire crypto holdings relative to the sales proceeds. This method is used by the Direction Générale des Finances Publiques As one cannot transact with oneself, the transfer of crypto assets from on wallet address, hosted or un-hosted , owned by the same person or entity is not taxed. However, such transfers would require maintaining records of the original incoming crypto asset for an accurate determination of the cost basis for determining capital gains or losses at the time of disposal of the crypto asset . Choice of different methods can have an impact on the tax liabilities of individuals as well as the revenue collected through taxation on crypto asset s. As crypto asset s resemble securities in many aspects and some have even been classified as securities by regulators like the SEC, they are also susceptible to “wash sales”. However, as in some jurisdictions, wash sale rules apply only to securities, and crypto assets are classified into different asset classes in multiple jurisdictions, investors can use the regulatory arbitrage to lower their ta x liability . There is also evidence of Tax Loss Harvesting (Cong, Landsman, Maydew, & Rabetti, 2023) in jurisdictions like the US to lower the tax liability. 2.3.6 The Bitcoin Blockchain Wikipedia23 provides a comprehensive definition of a blockchain as “A blockchain is a decentralized, distributed, and often public, digital ledger consisting of records called blocks that are used to record transactions across many computers so that any involved block cannot be altered retroactively, without the alteration of all subsequent blocks. They are authenticated by mass collaboration powered by collective self -interests. This allows the parti cipants to verify and audit transactions independently and relatively inexpensively. A blockchain database is managed autonomously using a peer -to-peer network ” The distributed public ledger of Bitcoin is based on the blockchain . The transactions in a blockchain are grouped together in the form of blocks and the subsequent blocks are cryptographically linked to the previous blocks, thus forming a chain. A complex interplay of cryptography, distributed consensus regarding the state of the blockchain and a system of economic incentives keep the Bitcoin Blockchain secure. It leads to only valid blocks being added to the blockchain and prevents malicious actors from compromising the integrity of the blockchain . Blockchain is not the only way to structure data and blocks for crypto assets . Some crypto assets like IOTA, Nano and Obyte use Directed Acyclic Graph framework to store data24. 23 https://en.wikipedia.org/wiki/Blockchain 24 https://finance.yahoo.com/news/cryptocurrencies -dag-based -framework -why -081019399.html 20 Unlike the banking system, the copies of ledgers in a public blockchain are maintained in the form of a distributed database which can be openly accessed by anyone. The transactions broadcasted by the users of the blockchain are verified by the nodes of the Bitcoin network and are included into a block only when they are found to be valid . Addition of each block to the top of the existing blockchain requires solving a rigorous mathematical puzzle by nodes called miners which add a new block to the blockchain . The promptest miner to solve the puzzle gets to add the block create d by it on top of the existing blockchain and extend it. It also earns him/her the mining rewards in the form of newly created Bitcoins through the Coinbase transaction . This difficulty in adding another block to the existing blockchain makes it practically impossible for any malicious actor to temper the earlier blocks or transactions. Any effort at tempering becomes evident to the participating nodes and due to the enormous computational resource s required for mining, it is extremely difficult for a malicious actor to create a blockchain which is a few blocks different from the original blockchain . A system of economic incentives promotes honest behaviour by participants , as they own or hope to own Bitcoin in the form of miner’s reward , and have an incentive to keep the trust in the blockchain by maintaining its integrity . The structure of the blockchain is shown in Fig 10. Each block contains a header and several valid transactions. The header of the block consists of the following: i) Merkle Root: It is the hash of the merkle tree25 which contains all the transactions in the block. Its main objective is to ensure that no transaction has been modified in the block. It is also used to quickly verify if a transaction is a part of a block. ii) Nonce: It is a value which is the solution of the mathematical problem that the miner must find to mine the block. A nonce value once found by a miner can be easily verified by anyone. iii) Previous Block Hash: Every Bitcoin block contains the hash of the previous bloc k. This makes the blocks connect in the form of a chain as shown in Fig. 10, hence the name blockchain . This property makes the blockchain temper evident as any change in a block changes the block hash and breaks the blockchain as shown in Fig. 11 Fig. 10 Blockchain Structure (representative) Fig. 1 1 Maliciously modified blockchain 25 In Computer Science, A merkle tree is a data structure which is used for verification of data in a large distributed dataset. It allows huge amount of data to be efficiently mapped in the form of a tree. If it is required to check if any changes have been made to the data in the merkle tree it can be done by checking if the data is consistent with the root hash instead of traversing the entire merkle tree . 21 If a malicious actor tries to alter the transaction on Block 651 where Ron sends 3 BTC to Alice instead of 2 BTC (Assuming that the added transaction is indeed authorized by Alice). As one of the transactions in the merkle tree has been changed, the merkle root will change and consequently the block hash would change. This would make the actual hash of the Block 651 inconsistent with the hash of the Block 651 recorded in the header of Block 652. The nodes on the blockchain would take cognizance of this and rely on the longest consistent chain instead and continue adding new blocks on top of that chain. Bitcoin blocks are identified using the unique hash of their header. This relies on the collision resistance of SHA256 hashing algorithm. This is the reason why if an attacker , equipped with a quantum computer can find an input 𝑥 such that 𝐻(𝑥)=𝐻(𝐻𝑒𝑎𝑑𝑒𝑟 𝑜𝑓 𝐵𝑙𝑜𝑐𝑘 651 )=00064 𝑏 then the integrity of the blockchain can be seriously compromised. 2.3.7 Bitcoin Mining The Bitcoin Blockchain needs to achieve a distributed consensus in which the participants of the network agree on which blocks form a part of the blockchain . As various nodes broadcast new transactions to be included in blocks and added to the existing blockchain , there must be a mechanism to decide which transactions will be added to the blockchain and which node adds the new block . The new blocks added to the blockchain must be verified and the nodes must be in sync about the current state of the blockcha in. This common view of the blockchain is called a consensus. We come across the term miners and mining very often in the context of crypto assets. To effectively tax mining it is important to understand what exactly does it mean to mine Bitcoin . This facilitates the understanding of the direct and indirect tax implications of this service of adding blocks to the blockchain which creates economic value in the Bitcoin ecosystem. Many tax administrators might want to have an idea about the trends and extent of mining in their jurisdiction. It can be estimated using trends in network traffic and some services like Bitnodes26. However, many Bitcoin nodes use the ToR network and are very hard to trace using their IP addresses. Also, as the probability of earing mining rewards is based on the percentage of total hashing rate (computational power) available with the miner, most individual miners join a mining pool. A mining pool significantly reduces the variance of rewards received by a miner. For a fee, the mining pool makes the rewards almost certain if the individual miner has a hashing rate above a certain threshold. Mining activities can result in direct as well as indirect tax events which are discussed later. The Bitcoin Blockchain needs to have a robust mechanism to ensure that only valid transactions are included in the blockchain and a system of incentives is in place to encourage honest actors and disincentivize malicious actors in the system. It is important to note that not all nodes of the Bitcoin network are involved in mining , as mining is a very resource intensive activity . Some nodes only relay the transactions received by them to broadcast th ose transactions to the entire network effectively. Only nodes involved in mining can add another block to the blockchain . One of the important problems to be solved by a miner node is to select the transactions out of the broadcasted transactions to be included in the block which the miner would try to mine. When a Bitcoin user submits a transaction to the Bitcoin network, it is broadcast ed using a flooding algorithm to the entire Bitcoin network and the miner nodes come to know about its existence. The broadcasted transactions form what is known as a mempool, which is a pool of unverified transactions being 26 https://bitnodes.io/nodes/live -map/ 22 broadcast on the Bitcoin network27. The transaction fee and the block reward are the incentives for the miner nodes to verify transactions and mine new blocks to be added to the blockchain . To gain maximum reward in Bitcoins , the miners solve an optimization problem like the knapsack problem28 in Computer Science (Fig. 1 2) while picking up the transactions from the mempool for inclusion in Blocks to maximize their block rewards . The miners check if the transactions are valid and the senders have the funds and the authorization to spend the UTXOs and construct the merkle tree of the transactions to form a block. The miner also puts its own Bitcoin address in the Coinbase transaction for receiving the block reward. It is usually believed that miners pick up the transaction with the highest transaction fees, but it is not entirely correct. Bitcoin transactions have multiple inputs and outputs which ar e measured in bytes. However, for the purpose of inclusion in the blocks , another criterion called weight units is used , as all bytes in a Bitcoin transaction do not have the same weight. The miner uses the criterion of “fee per weight unit ” for inclusion in the mining block and maximizes his/her payoff. For example, if a miner must choose between a transaction which has 4 input UTXOs and 4 output addresses and the other transaction having 2 input UTXOs and 1 output address , and both transactions have the same transaction fee. Then the miners would pick up the second transaction over the first one as it is smaller and has more transaction fee per weight unit. This would enable the miner to fit more transactions into the block as the limit for Bitcoin transactions in a block is 4 million weight units29. Fig. 1 2 The Knapsack Problem30 The next problem in mining is to select the node which would add a valid block to the blockchain . One possible solution for it could be to randomly select a miner node and allow it to add a valid block to the blockchain . This solution will rely on the premise that most of the times an honest miner node will be selected and it would add a valid block to extend the blockchain . However, this solution has a potential problem of the network getting flooded by numerous malicious miner nodes largely as the margina l cos t of adding another malicious miner node would not be much. Thus, there needs to be some barriers to entry for participation in the validation process of transactions, adding new blocks and gaining from the consequent rewards. Computational intensity of mining acts as such a barrier. Bitcoin solves this problem using proof -of-work mechanism . In the proof -of-work mechanism , each node involved in mining must perform intensive computation to find the solution to a mathematical problem to ‘mine ’ a block and add it to the blockchain . Once the solution has been found, a node can 27 This pool of transactions getting arranged into blocks and being mined , along with other parameters of Bitcoin network can be visualized at https://mempool.space/ and https://mempool.space/mining 28 https://en.wikipedia.org/wiki/Knapsack_problem 29 https://en.bitcoin.it/wiki/Weight_units 30 Source: https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Knapsack.svg/375px - Knapsack.svg.png 23 broadcast the solved block to the entire Bitcoin network and claim the reward for validation. When a node involved in mining solves the mathematical puzzle and adds a block to the blockchain , it is said to have mined a block. To understand the mathematical puzzle that the miners solve to mine a Bitcoin block, it is pertinent to look the block hash of some of the actual Bitcoin blocks mined recently and added to the blockchain . One can go to any Blockchain Explorer31 and find out the block hash of the last 10 recently mined blocks of Bitcoin Blockchain. They are shown in Table 2. Block Height32 Block Hash 832072 00000000000000000000fd8369848fa6bcb3bef188d76fc7a1d38992a5e881d1 832071 000000000000000000023f411f7ebea61731f0d7990a4da1f7106375501d100e 832070 00000000000000000002a7473666215bd65b39e74ffbd7b9d2eccb8336430f4a 832069 00000000000000000001907e66f40f2bd56e267d73dd37a7541161efea891808 832068 000000000000000000004df71f0b4419e9c3355dd2c399b19bd56f65ad58c113 832067 000000000000000000004ff4ea42aa1a467363d22e524913e6913eaf5d24e8fb 832066 000000000000000000009de6eee5f331dfdbb1ef59a15ea095552a00983bdbc0 832065 00000000000000000002782005e1e33e276d47763cc86822983cd258e04d1614 832064 000000000000000000021a6cf69f6deabb2641d4afb5aede607584f9c02e6566 832063 0000000000000000000211c4647e2610ae16307851e38b7953c399b501b788e5 Table 2 Block Hash of 10 Bitcoin Blocks A striking feature of the block hash values of these blocks are that the first 19 digits of the hexadecimal hash are 0s. This is not a coincidence , and is related to the mining puzzle which each miner tries to solve to ‘ mine ’ a block and receive the block reward. The Bitcoin block header is 80 bytes in size and consists of multiple fields as shown in Fig. 13 To add a block to the blockchain the miner must find a nonce, which is a number when entered in the block header and subsequently the SHA256 hash of the block header is calculated , the resulting hash value is less than the target hash. Or mathematically: 𝐻(𝑣𝑒𝑟𝑠𝑖𝑜𝑛 ||𝑃𝑟𝑒𝑣𝐵𝑙𝑜𝑐𝑘𝐻𝑎𝑠 ℎ||𝑀𝑒𝑟𝑘𝑙𝑒𝑅𝑜𝑜𝑡𝐻𝑎𝑠 ℎ||𝑡𝑖𝑚𝑒 ||𝑛𝐵𝑖𝑡𝑠 ||𝑛𝑜𝑛𝑐𝑒 )<𝑡𝑎𝑟𝑔𝑒𝑡 ℎ𝑎𝑠ℎ This is the reason why in Table 2 the hash values of blocks have their first 19 digits as zero. Finding such a nonce is an extremely challenging computational problem and this is the reason why massive hardware is deployed in various mining farms to try as many nonces as possible in the least possible time, so that the miner can find the right nonce and broa dcast the ‘ mined ’ block to the rest of the network and get the miner’s fee as well as the block reward. Once a valid nonce is found, the other nodes can very easily verify that the hash value in the proposed block header is indeed lower than the hash value target. To ensure that the mining difficulty keeps pace with the rapidly evolving hashing capacity of the network, it is in -built in the Bitcoin Core software33 to recalibrate the difficulty level of the problem after every 2016 Blocks (~ two weeks) such that a Bitcoin block is mined every 10 minutes on an average. This can be practically seen in the hash values of blocks mined at various points of time in 31 A Blockchain Explorer is a website that enables anyone to search any information regarding a Transaction, Address or Block in the Blockchain. Different Crypto Assets have different Blockchain Explorer websites. 32 Block Height is the number of blocks mined since the Genesis block of Bitcoin was mined in January 2009 33 https://github.com/bitcoin/bitcoin/blob/master/src/pow.cpp 24 Fig. 1 3 A Bitcoin Header34 Block Height Date Block Hash 50 2009 -01-11 0000000026f34d197f653c5e80cb805e40612eadb0f45d00d7ea4164a20faa33 75000 2010 -08-18 00000000000ace2adaabf1baf9dc0ec54434db11e9fd63c1819d8d77df40afda 150000 2011 -10-20 0000000000000a3290f20e75860d505ce0e948a1d1d846bec7e39015d242884b 225000 2013 -03-09 000000000000013d8781110987bf0e9f230e3cc85127d1ee752d5dd014f8a8e1 300000 2014 -05-10 000000000000000082ccf8f1557c5d40b21edabb18d2d691cfbf87118bac7254 375000 2015 -09-18 000000000000000009733ff8f11fbb9575af7412df3fae97f382376709c965dc 450000 2017 -01-26 0000000000000000014083723ed311a461c648068af8cef8a19dcd620c07a20b 525000 2018 -05-30 0000000000000000002ffaa108b110ff7fd64475841b6ab65abd9bb43f8ede1d 600000 2019 -10-19 00000000000000000007316856900e76b4f7a9139cfbfba89842c8d196cd5f91 675000 2021 -03-17 000000000000000000057b6df3f61f96fbdd4b9c4d76fcb975cb0e8a56577d51 750000 2022 -08-18 0000000000000000000592a974b1b9f087cb77628bb4a097d5c2c11b3476a58e 825000 2024 -01-09 00000000000000000001432b1ea8b3b710c3fb7e628d605cf4a42c25d7822431 Table 3. Block Hash values after every 75000 blocks the past. Table 3 shows the block hash values recorded after every 75000 mined blocks. The number of zeros in the hash is has been increasing, indicating lower and lower target hash values. This can also be seen with the graphs of difficulty and hash rates of the Bitcoin network given in Fig. 14. The Bitcoin mining difficulty and Bitcoin network’s hash rate follow a close trajectory. This is also a mechanism through which the Bitcoin protocol ensures that there are always enough participants in the Bitcoin network which validate the transactions and keep the blockchain secure. When the 34 Source: https://developer.bitcoin.org/reference/block_chain.html#block -headers 25 number of miners goes down, the hash rate of the Bitcoin network goes down and it takes longer to mine new Blocks at the existing difficulty level. Consequently, the mining difficulty is lowered and this attracts more miners till a new equilibrium is achieved. The sharp fall in the hash rate around mid - 2021 can be attributed to the crypto ban by China. Subsequently the difficulty of mining reduced and hash rate started having an upward trend with mining activity increasing in USA and Kazakhstan , consequentl y increasing the mining difficulty again . This can be seen in Fig. 1 5 showing the country - wise share of hash rate. Fig. 1 4 Bitcoin mining difficulty and Bitcoin network hash rate35 Fig. 1 5 Country -wise share of Bitcoin hash rate36 Mining is a highly resource intensive activity and miners deploy significant computational capacity in the form of Application -Specific Integrated Circuits (ASICs) which are optimized for producing trillions of SHA256 hashes per second. This also results in consumption of massive amounts of electricity in operating the hardware as well as cooling it. It is estimated that if Bitcoin mining consumes more electricity than 167 countries37. The probability of a miner successfully mining a block is directly proportional to the percentage of the total hash rate of the Bitcoin network that the miner can produce. Thus, i f a miner produces a hash 35 Source: https://mempool.space/graphs/mining/hashrate -difficulty#3y 36 Source: https://ccaf.io/cbeci/mining_map 37 https://www.aa.com.tr/en/economy/bitcoin -mining -consumes -as-much -energy -as-167-countries/3109915 26 rate which is 0.001% of the total hash rate of the Bitcoin network, the miner can expect to mine one in 100000 blocks. As we know that approximately 2016 blocks are mined in two weeks, this means that it would take around 100 weeks or two years on an average for a miner to successfully mine a block. Till then he/she would have to make the capital investment and incur the costs of depreciation of hardware, the Internet and electricity. 2.3.7.1 Mining Pools As discussed above, the possibility of a standalone miner successfully mining a block is miniscule and it involves high degree of risk , as even after spending substantial amount on electricity and IT hardware , it is possible that a standalone miner might not successfully mine a block for several years. Thus, to hedge this risk, miners join mining pools . A mining pool is a group of crypto asset miners who pool their computational resources over a network to increase the probability of success in mining crypto assets, the rewards are divided amongst the participants of the pool rather than a winner - takes -all case in standalone mining. The mining pools are operated by a centralized entity which divides the task of computation between the pool members – the ‘worker’ miners . A comparison of the leading mining pools can be found at Bitcoin Wiki38. Joining a mining pool significantly reduces the risk and uncertainty associated with mining. The mining pools have pool managers which manage the pay outs of mining rewards to the members of the pool depending on the computation done by them. In Bitcoin mining , the mining pool puts its own Bitcoin address in the Coinbase transaction and shares a work template with the ‘worker’ miner who returns ‘shares’ to the mining pool. A share is not exactly a solved block , but one in which the block hash is only a few times higher than the target hash. For example, a mining pool taking share which are nearly 10 times of the target hash can be mathematically expressed as: 𝐻(𝑣𝑒𝑟𝑠𝑖𝑜𝑛 ||𝑃𝑟𝑒𝑣𝐵𝑙𝑜𝑐𝑘𝐻𝑎𝑠 ℎ||𝑀𝑒𝑟𝑘𝑙𝑒𝑅𝑜𝑜𝑡𝐻𝑎𝑠 ℎ||𝑡𝑖𝑚𝑒 ||𝑛𝑏𝑖𝑡𝑠 ||𝑛𝑜𝑛𝑐𝑒 𝑠ℎ𝑎𝑟𝑒)<10×𝑡𝑎𝑟𝑔𝑒𝑡 ℎ𝑎𝑠ℎ This is a proof that the ‘worker’ miner has indeed put in a lot of computational effort as getting a hash which is close to the target hash is also computation ally intensive. This results in a pay out from the mining pool depending on the pay-out policy. Some pools pay ‘worker’ miners for every share whereas some pools pay out only when the pool finds a block. When a ‘worker’ miner joins a mining pool even though he/she finds solves a block, he/she cannot take the entire block reward as the Coinbase transaction has the Bitcoin address of the mining pool. This is an important aspect from the perspective of taxation . The shares made to a mining pool in lieu of pay -outs by the mining pools can have direct and indirect tax consequences which have been discussed later. There are also multiple issues related to the identification of miners and determining their tax residen cy for the purpose of direct and indirect taxation. These issues will also be discussed subsequently. 2.3.7.2 Estimating the extent of Mining Mining is an important part of any blockchain which ensures trust and security in the blockchain . It produces economic value in the blockchain ecosystem and leads to generation of income which might be liable to tax. However, for mining Bitcoin or any other crypto asset mined using the proof -of-work mechanism, only hardware that can produce high hash rates, the Internet and electricity are required. Usually, a ‘worker’ miner joins a mining pool based on self-certification , the pool usually does not carry out any Know Your Customer verification or Anti -Money Laundering measures to link the pseudonymous ‘worker’ miner to a natural or juridical person. Tax administrations would also be interested to know the incidence of mining in their jurisdiction. As mining activity is mostly pseudonymous and only estimates and trends can be drawn from data either 38 https://en.bitcoin.it/wiki/Comparison_of_mining_pools 27 obtained from the mining pools or through open -source network analytics. (Sun et al., 2022) studies the spatial distribution of Bitcoin mining through bottom -up tracking and geospatial statistics. The Cambridge Centre for Alternative Finance has developed a mining map39 which shows the geographical distribution of the total hash rate of Bitcoin over a period . This is based on the data obtained from various mining pools and extrapolating it to provide the monthly percentage share of the country in providing the global hash rate of the Bitcoin network. It provides a snapshot of the extent of mining in each country from September 2019 to January 2022. The methodology adopted for this estimation has some important assumptions like inability to specify the geolocation of miners using VPN or proxy services40. Which indicates that it can be very difficult to map various miners with certainty . Mining pool networks have specific characteristics which can be used to detect the miners who are members of the mining pool. Using public network analysis tools like Shodan it is possible to identify the IP addresses of some miners who use specific port n umbers to connect to the pools. Shodan41 is a search engine for devices connected across the Internet. It can help to find IP addresses and number of users using a specific port number in a country or region. By having a look at the number of ports and port numbers used by a particular IP it can be inferred if it is a miner or a general computer. For example, some popular pools use port number 3333 for Transmission Control Protocol (TCP) connection with the participant miners. The result of such a Shodan query for finding IP addresses who are using port 3333 is given in Fig. 1 6 Fig. 1 6 Query for port number 3333 on Shodan Various IP addresses which have port 3333 open are displayed. The information about two such IP address from South Korea and Poland is shown in Fig. 1 7 and Fig. 1 8 respectively . This potential miner has only few ports open as compared to a general computer which might need to have various other open ports. This makes it highly probable that these computers/ASICs are involved in mining. Due to the imperfection of this method in finding an accurate number of miners, it may only enable users to see the trends in mining in a country, region, or city. 39 https://ccaf.io/cbeci/mining_map 40 https://ccaf.io/cbeci/mining_map/methodology 41 https://www.shodan.io 28 Fig. 1 7 Open ports of a potential miner in South Korea as seen on Shodan Fig. 1 8 Open ports of a potential miner in Poland as seen on Shodan 2.3.7.3 Bitcoin Mining and Game Theory The participants in the Bitcoin Blockchain are rational and they try to maximize payoffs for their actions in the Bitcoin ecosystem. As Bitcoin is based on a decentralized network, malicious nodes/actors cannot be prevented from joining the network. Bitcoin solves this problem effectively by using incentives and cryptographic checks which can detect and counter the actions of malicious actors. The behaviour of the participants in the Bitcoin ecosystem can be understood and predicted using game theory. The application of game theory to crypto asset mining is an active area of research. Various participants try to maximize their payoff s and adopt strategies accordingly. Mining can be considered a repeated zero -sum game between various rational miners who do not know each other’s strategy. Thus, to gain maximum out of the game, the miner s tend to follow the strategy of honesty and submit only verified blocks to the blockchain . The miners have a disincentive in duping the system as the validity of the fraudulent transaction can be verified and the other honest nodes would discard the propose d block. As mining is a resource intensive activity, any such efforts would cost the miner dearly even if he/she has a substantial part of the total hash rate of the network. Some mining pools can adopt a strategy to infiltrate other mining pools and make their infiltrator workers send the shares to the pool but withhold the shares whenever they ‘solve’ a block. This can enable other pools to bleed profits out of their competitors. This strategy can harm the profits of rival pools but the workers cannot div ert the profits to the original pool as the work templates shared by the victim pools would have their Bitcoin address in the Coinbase transaction. A detailed study on such pool attacks has been done by Li et al. , (2020) . As discussed earlier, the percentage of hash -power of miners/mining pools determines their probability of mining the next block. The hash -rate share of various mining pools in the Bitcoin network in the past one year is shown in Fig. 1 942 42 Source: https://mempool.space/graphs/mining/pools#1y 29 Fig. 1 9 hash -rate share of various mining pools in the Bitcoin network in the past one year43 There can be a scenario in which a single pool has more than 51% of the hash -power of the network. This can enable the pool to delay the transactions of some Bitcoin addresses and carry out double spends. The delay in service can be caused if the pool excludes the transactions received from a set of Bitcoin addresses which it wants to exclude from the n etwork. However, since all nodes would not have this discriminatory behaviour, the pool can at best delay the transactions of a subset of Bitcoin addresses. Double spending can be done by such a pool as it can simultaneously send two transactions in the network that spend the same Bitcoins . The first transaction would pay the provider of the good or service purchased with some UTXOs and the second transaction would use the same UTXOs for payment to an address controlled by the pool. As the pool controls more than 51% of hash -rate of the network it can get the second transaction included in the longest blockchain resulting in orphaning of the first transaction a nd loss to the supplier. This would significantly reduce the confidence in the Bitcoin network and adversely affect its price. As the pools also have an incentive to maintain or enhance the value of Bitcoin which they get as reward, it disincentivizes any pool to grow to such a large size that it affects Bitcoin and they cause losses to everyone including themselves. However, such an attack can be launched by an entity which does not have much stake in the Bitcoin ecosystem or which is facing a larger loss in value terms in real world . It is sometimes misunderstood that a mining pool with 51% of hash rate can steal Bitcoins out of the addresses of users. Due to the digital signature -based mechanism of transactions it is impossible for a mining pool to maliciously steal the Bitcoins out of any Bitcoin addresses. The pool can at best delay certain transactions or carry out double spends as described above. 2.3.8 Taxation of Mining Activity and Rewards As discussed above, mining is an important source of value creation in the blockchain as it adds new transactions to the blockchain and provides trust and security. It creates an incentive for the miners due to which they participate in validating transactions and add blocks to the blockchain . The miner essentially provides a service to the Bitcoin owners by verifying the validity of transactions, arranging them in the form of a block and solving for the nonce to mine the block, in lieu of the Bitcoin bloc k 43 https://mempool.space/graphs/mining/pools#1y 30 rewards and user fees. Mining activity can have direct and indirect tax consequences for miners as well as mining pool operators. The following sections first discuss the direct tax issues in mining related to the acquisition and ‘disposal’ of crypto assets obtained through mining. The subsequent section discusses the indirect tax issues related to mining. In the discussion to follow, mining mainly refers to mining using the proof -of-work mechanism. The proof -of-stake mechanism and its taxation is discussed subsequently. 2.3.8.1 Direct Taxes on Mining Mining provides economic value to the miners in lieu of the services provided by them to blockchain users as well as the blockchain protocol. The income of miners arises either from the protocol rewards for ‘mining’ a new block, the user fee paid by the users transacting on the blockchain or pay -outs from a mining pool for ‘shares’ by the ‘worker ’ miners. As this constitutes income or accrual of assets/value, a tax liability may arise, depending on the tax jurisdiction of the miner, as different tax adminis trations tax mining activity differently. Moreover, the disposal/sale or any further transactions with the mined crypto assets are also taxable events in various jurisdictions. The tax treatment of the income or accrual of assets/value and disposal/sale or any further transactions of mined crypto assets depends on the nature and scale of the activity carried out by miners. The two potential taxable events in the mining process are: i) Acquisition of crypto assets as mining rewards ii) Disposal/transfer of crypto assets acquired as mining rewards 2.3.8.1.1 Taxation of crypto asset acquired as mining rewards A miner carries out mining activity using IT hardware that generates trillions/ billions of hashes per second. As soon as a valid block is found by the miner, it is transmitted to other nodes in the Bitcoin network. If the ‘worker ’ miner is a part of a mining pool, it sends ‘shares’ to the mining pool over the Internet and the pool, in turn, transmits the ‘mined’ block over the Bitcoin network. The rewards are received by the miner when it successfully mines a block or when the ‘worker ’ miner in a mining poo l cashes out his/her accrued rewards. The acquisition of crypto assets as mining rewards is subject to income tax in most jurisdictions. The miners are supposed to report the mining incomes separately as ‘miscellaneous income’ in many jurisdictions and the tax liability arises on the fair market value of the acquired crypto assets at the time of acquisition, with allowable deductions for the costs of mining. Many tax jurisdictions carve out an exception for ‘hobby miners’ who undertake mining activities out of interest or as a pastime on a smal l scale, with an intention to accumulate the mined crypto assets instead of trading them to earn a profit. In some jurisdictions, hobby miners are not liable to pay income tax on the acquired crypto assets at the time of acquisition of such assets. However, the expenses incurred by the hobby miners are treated as the basis of acquisition . On the other hand , many jurisdictions take the basis of acquisition of crypto asset s of hobby miners as zero and allow no deductions for expenses. Besides this, in some jurisdictions like the US, crypto mining is considered as a self -employment activity and miners are subject to payment of employment taxes as well as social security contributions for their income from mining. However, as highlighted above, as it is difficult to find the tax jurisdictions o f miners, the payment of taxes is largely subject to self-compliance by the individual miners. Since the mining of first block by Satoshi Nakamoto in 2009 till February 2024 mining rewards 31 and user fee of approximately 60 billion USD has accrued to miners44. Similarly, the mining and transaction rewards accrued to Ethereum miners till 15th September 2022 , when Ethereum switched to proof-of-stake based consensus mechanism are approximately 35 billion USD45. These are significant amounts for tax administrations as the direct and indirect taxes on it might run into billions of dollars after deducting the relevant expenses. Moreover, as the market capitalization of Bitcoin reaches an all -time high of ~1.3 trillion USD46 and that of Ethereum nears 450 billion USD47, the amount of taxes due on these mined crypto assets might be in hundreds of billions of dollars . 2.3.8.1.2 Disposal/transfer of crypto asset s acquired as mining rewards In most jurisdictions, the tax treatment of disposal of the crypto assets acquired as mining rewards depends upon the nature and scale of activity by the miners. The income/gain from the disposal of crypto asset s acquired as mining rewards is classified as business income or capital gains. If the miners deploy large number of equipment to carry out mining on a commercial scale or frequently engage in trading of crypto asset s acquired as mining rewards instead of holding and accumulating them, they are clas sified as commercial miners and the profits from such activities are taxed as business income/ commercial profits, after deducting allowable expenses. In other cases, the disposal of crypto asset s acquired as mining rewards is considered to give rise to capital gains which are taxed at the time of ‘disposal’ of the crypto asset s. In some jurisdictions which do not have a capital gains tax, such disposals may not result in a capital gains tax liability. However, for calculating capital gains, issues related to determination of the basis, as discussed earlier , might arise, and may require clear guidance by the tax administrations. Also , unlike crypto asset s acquired as mining rewards which can be clearly ascertained on the blockchain through the Coinbase transactions, the accrual of capital gains cannot be easily ascertained through blockchain analysis alone as many of the apparent ‘disposals’ of the crypto asset s acquired as mining rewards might either be payouts by the mining pool to the ‘worker ’ miners or transfers to other addresses controlled by the same taxable entity/person , resulting in no tax liability for the transaction. 2.3.8. 2 Indirect Taxes on Mining As described above, Bitcoin mining activity involves various actors like: i) Bitcoin users who broadcast transactions ii) Individual miners who combine the transactions in the mempool into a block and mine the blocks to include in the Bitcoin blockchain. iii) Mining pools which create blocks of transactions and divide the computation task between various ‘worker’ miners iv) ‘Worker’ miners which try to find the nonce for a block given by a mining pool and get paid based on ‘shares’ sent to the mining pool The Bitcoin network and the users provide economic incentive to the miners to perform mining and record their transactions on the blockchain . These activities are akin to providing a digital service to the users who transmit transactions and pay the transaction fee and the Bitcoin protocol which provides the block reward in lieu of this service. However, the high degree of uncertainty associat ed with mining rewards leads to many miners joining mining pools as ‘worker’ miners , this complicates the indirect t ax treatment of the services provided. This gives rise to two category of service providers namely: 44 https://explorer.btc.com/btc/blocks 45 https://etherscan.io/chart/blockreward 46 https://coinmarketcap.com/currencies/bitcoin/ 47 https://coinmarketcap.com/currencies/ethereum/ 32 A) Individual miners and mining pools which create blocks of transactions broadcasted by the users of Bitcoin network and add new blocks to the blockchain through mining. B) ‘Worker’ miners which get a pre formed block from a mining pool, which contains the payout address of the mining pool in the Coinbase transaction. They provide the mining pool with ‘shares’ and get rewarded for the same. There are also the mining pools which provi de services of reducing the variance of payout rewards of ‘worker’ miners which join the mining pools instead of mining Bitcoin as individual miners. These service providers in the Bitcoin ecosystem are depicted in Fig. 20 Fig. 20 Mining service s by various service providers The tax treatment of the services offered by these two categories of miners are based on various questions directly related to the service offered by the two categories of miners to Bitcoin users (which is rewarded in the form of transaction fee ) and the Bitcoin protocol (which is rewarded in the form of new Bitcoins issued through the Coinbase transaction ). Some of the important questions that are critical in determining the indirect tax treatment of mining activities are: i) Does there exist a direct nexus or a legal synallagmatic relationship between the user broadcasting a transaction and the miner adding the transaction on the blockchain? ii) Does the service offered by miners to the blockchain network , for which they are rewarded with the block reward , constitute a taxable service for a consideration? iii) Does the service provided by the ‘worker’ miners to the mining pool have a bearing on the nature of service provided and its tax treatment? iv) What is the place of supply of such services? These questions have a critical role in determining the levy of indirect taxes on mining activities . Multiple jurisdictions have different legal provisions for taxability and exemptions to services like Bitcoin mining , with most jurisdictions treating mining activity as exempt f or indirect tax purposes . Two important issues related to the questions raised above are those of existence of a nexus/link/contract between the miner and the users transacting on the blockchain , which also determines the place of su pply of the services, and if such nexus is established or deemed to exist, the Bitcoin Owners Bitcoin Owners Individual Miner Bitcoin Network Computation Hedging Mining Pool Computation Hedging Mining Pool Country A Country B Country C Country D Country E Country F ‘Worker’ miner ‘Worker’ miner 33 issue of exemption of services of miners as financial services , which is contingent upon the treatment of Bitcoin and other crypto asset s as a negotiable instrument or any other financial instrument which is exempt . However, the broad principles and considerations while determining the levy of GST/VAT on mining activities remain common and provide the answers to the questions above. As laws and jurisprudence in this area seem to be most developed in the EU the following discussion analyses these issues from the perspective of the EU Law, although the broad principles and considerations would apply to almost all jurisdictions. The primary consideration for levying an indirect tax on a miner is that he/she should be engaged in an ‘economic activity.’ The miner should be performing his/her activities for an income that is linked to its activity. The Article 9 of the EU Directive 2006/112/EC of 28 November 2006 on the common system of value -added tax defines a ‘taxable person’ and ‘economic activity’ as: ‘Taxable person’ shall mean any person who, independently, carries out in any place any economic activity, whatever the purpose or results of that activity. Any activity of producers, traders or persons supplying services, including mining and agricultural activities and activities of the professions, shall be regarded as economic activity. The exploitation of tangible or intangible property for the purposes o f obtaining income therefrom on a continuing basis shall in particular be regarded as an economic activity. As per the Council Implementing Regulation (EU) No 282/2011 “Electronically supplied services as referred to in Directive 2006/112/EC shall include services which are delivered over the Internet or an electronic network and the nature of which renders their supply essentially automated and involving minimal human intervention, and impossible to ensure in the absence of information technology” Also, mining activities could also be seen as falling within the definition of an electronically supplied service as per section 3.1.5 of the Working paper No 854 of the EU VAT Committee which states: "When the platform is run in an automated manner with minimal human intervention and the provision of the service is impossible without information technology, then the access to such platform supplied for consideration should be seen as covered by the def inition of electronically supplied service" Also, in a recent case before the Dutch Court of The Hague the claimant performed mining activities and raised a question that does the incentive/remuneration received by her pertain to her mining activities and would the mining activity be seen as an ‘economic activity’? The court adjudicated that the transaction fee as well as the block reward were considerations for validating transactions on the Bitcoin Blockchain and that the fact that the petitioner does not always receive the transaction fee was irrelevant48. The court compared this to a home buyer reaching out to multiple realtors to buy a home but choosing only one of them to buy the house and pay commission. The other realtors would still be considered to be engaged in economic activity with only one being remunerated. Further the court argued that validating the transactions was important for blocks to be created and added to the blockchain and this made the validation, verification and mining of coins inseparably 48 https://www.lexology.com/library/detail.aspx?g=e4cfac02 -9134 -4629 -85cb -cffaa9859dc0 34 intertwined. However, the mining activity was exempted from VAT by the court by virtue of Article 135(d) of the EU VAT Directive. From a theoretical standpoint also, the presence of incentives to the miners is an existential factor for crypto assets like Bitcoin , as the fundamental problem in the Bitcoin Blockchain of making multiple nodes agree on transactions added to the blockchain , when it is known that some of the nodes can be faulty or malicious, is theoretically impossible to achieve without incentives. This is a widely studied problem known as the Byzantine Agreement problem in Computer Science, which is named after the Byzantine Generals’ Problem, in which generals of the Byzantine army must agree on a coordinated attack or retreat . There are no incentive mechanisms in this problem and it is proven that the problem cannot be solved if more than 1/3rd of the generals are traitors49. Also, another theoretical result related to distributed systems - the FLP ( Fischer -Lynch -Paterson ) impossibility theorem states that no deterministic protocol solves the byzantine agreement problem in the asynchronous model, with even a single faulty node (Fischer, Lynch, & Paterson, 1985) . However, in the Bitcoin Blockchain we observe that with the presence of incentives in the form of block rewards and transaction fees for the miners, the Bitcoin distributed consensus protocol for the ledger has worked well for years. This makes incentives the cornerstone of Bitcoin as a ne twork and a crypto asset . It leads to the alignment of the interest of the miners with the holders of Bitcoin transmitting transactions on the Bitcoin Blockchain to be included in the public ledger. This makes the activiti es performed by the miner in expectation of incentives an economic activity by design . As discussed earlier , the probability of an individual miner mining a Bitcoin block is directly proportional to the fraction of the hash rate of the miner to the total hash rate of all the miners combined. This results in high variance and uncertainty in rewards received by the solo miners who deploy resources for mining. To reduce the uncertainty in mining rewards, solo miners often join a mining pool. The ‘worker’ miners share hashes with the pool and based on different criteria like the number of hashes shared below a target range (not the same as the Bitcoin hash target range), or some other pay-out agreement , pay-outs are made by the mining pool. This provides the ‘worker’ miners frequent pay-outs depending on the number of ‘shares’ made with the mining pool. The mining pools charge a fee for this service (usually 1 -3%)50 and deduct the same from the pay -outs given to the ‘worker’ miners. The mining pool creates a block of transactions and distributes the mining computation between the various ‘worker’ miners which join the mining pool. The template shared by the mining pool with the ‘worker’ miners contains the transactions picked by the mining pool and the pay -out address in the Coinbase transaction is that of the mining pool . In case a valid nonce is found by a ‘worker’ miner which mines the current block, the entire block reward goes to the mining pool and the ‘worker’ miner cannot earn the full block reward , but is entitled to the reward as per the pay -out scheme agreed between the ‘worker’ miner and the mining pool. This makes the operation of the mining pool an ‘economic activity’ which provides a service of hedging the risks by significantly lowering the variance of reward payments for mining activity. The consideration received for this service (usually 1 -3%) is in the form of crypto asset s being mined, which is deducted from the pay -out due to the ‘worker’ miner. This is an important aspect from the perspective of indirect taxation as the ‘worker miners’ and the mining pools provide two services to each other in a symbiotic relationship. The mining pools help to reduce the uncertainty and variance 49 https://en.wikipedia.org/wiki/Byzantine_fault 50 https://fastercapital.com/topics/understanding -pool -rewards -and-payouts.html 35 of the mining rewards of the ‘worker miners ,’ who in turn, provide computational power in the form of billions/ trillions of hashes per second (shares) to the mining pool, which may or may not result in ‘min ing’ a block by the mining pool and can never result in direct block rewards to the ‘worker’ miner . There are multiple case laws like C -2/95 SDC51 and C -350/10 Nordea52 which provide that for a service to be VAT exempt , the service must be an exempt service itself . The argument that it is an input service to an exempt service does not suffice for VAT exemption to a service. Considering the nature of these services , neither of these services may classify as a financial service which can exempt the service providers from VAT/GST. However, the service provided by the mining pool or individual miners to the blockchain and its users might be exempt from the perspective of VAT/GST as financial services , depending on the classification of the crypto asset s involved as negotia ble instrument or some other instrument which qualify the service as financial services in the domestic law of a jurisdiction . Now that we have a case where VAT/GST might be leviable on the services provided by the mining pool and the ‘worker’ miners to each other, it is important to determine the place of supply of such services as it may be zero rated in most jurisdictions , if the services are supplied to a non -resident. The taxability will also be affected by whether an individual or enterprise is providing and/or availing the services and whether such entities have obligations for VAT/GST registration . It may also lead to impli cations for providing input tax credit and refunds for suppliers of zero -rated mining related services. This problem is like the problem of taxation of cross -border services, using crypto assets -based payments. Brondolo, (2021) provides a detailed discussion on potential solutions to this issue . Under the vendor colle ction model, the mining pools , if they are non -resident suppliers of hedging services to the ‘worker’ miners , would be required to register for VAT/GST in the jurisdictions of the ‘worker’ miners and charge and collect VAT/GST and pay the collected amounts to the respective jurisdictions. For exa mple, i n India th ese hedging services would qualify as an Online Information Data Base Access and Retrieval (OIDAR) service and the mining pool is obligated to pay 18% GST on it , if the service is availed by an Indian ‘worker’ miner , especially if it is not registered under GST . In case of Business -to- Business supplies the recipient may be obligated to collect VAT/GST on a reverse charge basis. Also, the services exported by the mining pool to the worker miner can be zero -rated and entitle the mining pool for a refund of the input tax credit in its country of registration , with the ‘worker’ miner paying taxes for import of services in its own jurisdiction . This might be a humongous compliance burden for mining pools which might be required to collect the tax residency and VAT/GST information from ‘worker’ miners. However, this may be simplified if the tax jurisdictions create crypto asset wallets for depositing the aggregated VAT/GST collections along with filing of returns by the mining pools to the respective jurisdictions . A similar arrangement may also be required for the computational services of ‘worker’ miners used by the mining pools in return of pay -out for ‘shares’ by the m. Alternatively, the mining pool may also collec t and pay VAT/GST net of the fee charged to ‘worker’ miners in its own jurisdiction on a reverse charge basis. In various tax jurisdictions the transaction fee by the users in lieu of the servic e of including the user’s transaction in the blockchain through ‘mining’ might also be taxable as a service53. In that case, in line with the destination principle of VAT/GST the blockchain user/ mining pool ( in a vendor collection model ) might be liable to pay VAT/GST in the jurisdiction of the user, depending on turnover threshold 51 https://eur -lex.europa.eu/legal -content/EN/ALL/?uri=CELEX%3A61995CJ0002 52 https://curia.europa.eu/juris/document/document.jsf;jsessionid=CD1328EA651A7F81A11CBDAB3C8E3AC9?te xt=&docid=108324&pageIndex=0&doclang=EN&mode=lst&dir=&occ=first&part=1&cid=1203786 53 The service provided by the mining pool to the users might not be exempt from the perspective of VAT/GST as financial service, depending on the classification of the Crypto Assets in the domestic law of a jurisdiction 36 and other requirements for VAT/GST collection as per the domestic laws of the user’s jurisdiction. However, the determination of tax jurisdiction of crypto asset users who transmit transactions on the blockchain without any information about the tax residency of the use r, which has a bearing on the place of supply of the service , remains the biggest challenge for this . A more complicated issue will be the taxation of services provided by the mining pools or individual miners to the blockchain itself , for which they receive the fixed block reward programmed in the blockchain . The place of supply of such service cannot be determined and the payment for the service may amount to billions of dollars each year. If we consider the scenario depicted in Fig. 20, A mining pool registered in countr y D might be liable to pay VAT/GST on the services provided to the ‘worker ’ miners of countr y A, B and C as per the domestic laws of countr ies A, B and C, and might be required to register for VAT/GST in countr ies A, B and C especially if the ‘worker’ miners are not registered under GST . The GST/VAT amounts would be paid by the mining pool to the countries A, B and C for providing hedging services to minimize the variance and uncertainty of block rewards in mining. Also, the individual ‘worker’ miners in the countries A, B and C would also have an indirect tax liability for provid ing computational services for Bitcoin mining to the mining pool registered in count ry D. Alternatively, as discussed earlier, the mining pool registered in country D may also collect and pay VAT/GST net of the fee charged to ‘worker’ miners in countr ies A, B and C, in its own jurisdiction countr y D on a reverse charge basis. The mining pool might also have a VAT/GST liability for providing transaction validation services to a user in countr y E, where the final consumption of the service of the ‘worker’ miners in countries A, B and C takes place , as the Bitcoin user in country E pays a tra nsaction fee to the mining pool for mining his/her transaction. The individual miner in countr y F might also be liable to pay VAT/GST in countr y E on the transaction fee paid by the Bitcoin user if it validates the transaction of the Bitcoin user in country E and includes it in a block mined by it. Depending upon the turnover thresholds of various jurisdictions, the individual miner might not be liable to pay VAT/GST on the transaction fee. Some mining pools like Terra Pool54 implement KYC and provide real -time AML measures . Other top mining pools also specify in their privacy policy that they collect information like username, email addresses, wallet addresses, IP addresses, unique device IDs, information related to amount of computing power provided to the pool, the rewards, and processed payouts. The privacy policy of many mining pools makes the users aware that their personal data can be used by the mining pool to comply with domestic and international legal obligations . This can be used by the mining pool s to determine residency of ‘worker’ miners and enable tax administrations or other law enforcement agencies to seek information regarding their tax residents using the services of such pools for both direct and indirect tax purposes. However, the determination of p lace of supply for the ordinary Bitcoin or other crypto asset users will remain a challenge. 2.3.8. 2.1 Indirect Taxes on Supply of crypto asset s In various jurisdictions there are specific provisions in the indirect tax law which exempt certain financial transactions , loans deposits etc. from VAT/GST. For example , in India the Notification No. 12/2017 - Central Tax (Rate) exempts loans, deposits purchase of foreign currency etc. from GST. However, in many jurisdictions there are no such explicit exemptions for crypto asset s. Thus, it is possible to interpret the indirect tax law to consider the crypto asset transactions as a taxable supply and levy GST on such supplies. However, many jurisdictions do not treat crypto asset transactions as taxable supply , but one such exception is Singapore where prior to 1st January 2020, the supply of 54 https://terrapool.io/ 37 virtual currencies (including cryptocurrencies such as Bitcoin) was treated as a taxable supply of services. 2.3.8. 2.2 Indirect Taxes on use of crypto asset s for payments for goods and service s In most jurisdictions, the ‘disposal’ of crypto asset s in lieu of any goods or services attracts GST/VAT like fiat currency and the ‘disposal’ event might also attract income tax or capital gain s liability based on the domestic provisions for taxation of crypto asset s which are mainly based upon the nature and scale of engagement of the individual or entity in crypto asset s transactions. Baer et al., (2023) highlight the profound risks that crypto asset s might pose for collection of VAT/Sales Tax on final sales of goods and services. 2.3.8. 2.3 Taxing the externalities of mining using the proof -of-work mechanism As highlighted in earlier sections, crypto asset mining using proof -of-work consensus mechanism is a resource intensive activity with a huge carbon footprint of both the electricity consumption and the specialized IT hardware that is used to find nonces to ‘mine’ a block of Bitcoin. This produces externalities which calls for imposition of taxes like the excise tax which discourage mining or make up for its associated costs on the environment. The Biden administration has proposed a 30% excise tax on electricity used for Bitcoin mining. It is called the Digital Asset Mining Energy (DAME) tax. Similarly other options like a graded tax on electricity consumption by miners as being used by other jurisdictions like Kazakhstan can be used. Moreover , measures to incentivise miners to switch from proof -of-work based mining to staking and forging , which is based on the proof -of-stake protocol (as discussed below) and has a much less carbon footprint , can be considered. Alternatively, i f the excise taxes are found difficult to administer or impose, miners can be denied to claim deductions for electricity consumption and depreciation for IT hardware from their revenues to calculate taxable profits. 2.3.9 Proof -of-Stake and Forging Proof -of-work and proof -of-stake are two different consensus mechanisms in blockchain technology. A consensus mechanism is a method for maintaining the integrity of the blockchain in which nodes of the blockchain network develop a consensus about the blocks and length of a blockchain. The proof - of-stake consensus mechanism requires much less computation and resources to add blocks to the blockchain than proof -of-work. In this method, nodes do not compete against each other to mine the block, and have to sta ke their own minimum amount of crypto asset to be a part of the consensus mechanism55 Nguyen et al. (2019) . These assets act as a collateral and are locked and cannot be moved before the locked period. If a node wants to stop being a forger , its staked crypto asset s are released after a certain period, once it has been verified that it has not been involved in any malicious behaviour in adding blocks and verifying transactions. By staking crypto asset s in a wallet the validator nodes make themselves available to propose new blocks and validate the blocks proposed by other forgers . The proof -of-stake mechanism is depicted in Fig 21. A node is selected by the blockchain to be the proposer of the next block using a pseudo -random process . The proposed block is then verified by other nodes and if it is verified by more than 2/3rd of the nodes, the block is added to the blockchain . The proposer node gets the reward in the form of 55 A detailed analysis of proof -of-stake consensus mechanism has been done by Nguyen et al. (2019) Nguyen, C. T., Hoang, D. T., Nguyen, D. N., Niyato, D., Nguyen, H. T., & Dutkiewicz, E. (2019). Proof -of-stake consensus mechanisms for future blockchain networks: fundamentals, applications and opportunities. IEEE Access , 7, 85727 -85745. 38 transaction fee. The proof -of-stake method usually lead s to generation of new crypto asset s and the process of adding new blocks to the blockchain is called forging instead of mining. Fig.21 proof -of-stake consensus mechanism Crypto assets frequently begin by selling pre -mined coins or they begin with the proof -of-work consensus mechanism and then move to the proof -of-stake consensus mechanism (like in case of Ethereum) . Various blockchains use different methods to choose the node for proposing the next block in proof -of-stake . The two most popular methods are randomized block selection and coin age selection. In randomized block selection , the node with the lowest hash value and the highest stake is chosen. As stake sizes are public , the next forger can typical ly be predicted by other nodes . The coin age selection method selects nodes depending on the length of time that their crypto asset s have been staked, the age of a coin is determined by multiplying the number of days the coins have been staked by the number of coins staked. After a forging block a node's currency age is reset to zero and they must wait a specific amount of time before forging another block , this prevents large stake nodes from controlling the consensus mechanism . The proof -of-stake consensus also has a penalty mechanism which discourages forger misbehaviour which discourages malicious activity and promotes honest nodes. If a node fails to propose a block on its turn or proposes more than one block then a slashing penalty is imposed on the node by taking away a portion or entire staked crypto asset . The malicious node can even be banned for the current epoch or permanently. A part of the slashed funds is usually given to the node which reports the malicious behaviour and the rest are b urnt56. On one hand this provides the blockchains with the best and most effective forgers, on the other hand the inability of a node to propose a block due to factors like server downtime, buggy algorithms and network attacks can penalize forgers heavily . Although the proof -of-stake consensus described above is broadly the same as one used by the Ethereum blockchain, however there are marked differences between the two. The proof -of-stake mechanism currently used by the Ethereum Blockchain i s described in detail in the section on Ethereum. The taxable events in this consensus mechanisms with the Ethereum Blockchain as the example are also discussed in the subsequent sections . 56 Crypto Assets are burnt by removing them from circulation permanently by sending them to a special address, called a burn address, that cannot send or receive any Crypto Assets , making them inaccessible and effectively destroy ing them. 1. Algorithm assigns a proposer 2. Selected node proposes a block 3. Other validators (2/3rd) verify and approve the block 4. Proposed block is added to the Blockchain 39 2.3.10 The Bitcoin Network The Bitcoin nodes are connected to each other through a decentralized network where there is no central server. It is essentially a peer -to-peer network which relays and validates Bitcoin transactions and secures and maintains the Bitcoin Blockchain. Anyon e is free to join the network if they have access to the Internet. The collection of such peer -to-peer nodes can be called as the Bitcoin network. All the nodes in the network perform basic functions like discovering peer nodes and maintaining a connection with them , as well as propagation and validation of transactions and blocks. The Bitcoin network consists of various types of nodes as listed below: a) Mining nodes: These nodes run full copy of the blockchain and produce valid blocks for being added to the blockchain . They get rewards in the form of newly created Bitcoins. b) Full Nodes: These nodes also maintain a full copy of the blockchain and can independently verify transactions. c) Super Nodes: These nodes have many connections with the full nodes and act as redistribution relays to ensure that every node in the network has the latest copy of the blockchain . d) Light/Simple Payment Verification (SPV) Nodes: These nodes do not maintain a full copy of the Bitcoin Blockchain and operate on small devices like smartphones or tablets. They verify transactions by querying their peers to retrieve the subsets of the blockchain they require to validate a transaction. The Bitcoin network scheme is shown in Fig. 22 Fig. 22 The Bitcoin network When a node broadcasts a transaction to its peers, they further broadcast it and flood the network. Thus, the propagation of transactions in the network is not instantaneous and every node does not have the same view of the mempool. When a transaction is b roadcasted over the network, as discussed earlier , there is no IP address related information associated with the transaction. Thus, it is not usually feasible to find out the IP address of the node that broadcasted a specific transaction. This makes it di fficult to attach IP addresses to Bitcoin addresses by listening to transactions on the Bitcoin network. Juhász, Stéger, Kondor, & Vattay, (2018) have tried a Bayesian approach to identify Bitcoin users where they installed more than 100 Bitcoin clients and analysed the propagation of these messages in the Bitcoin network . They claim to have identified several thousand Bitcoin clients and bind their SPV Node Full Node Miner Node Full Node Mining Pool Worker ASICs 40 transactions to geographical locations. However, such an approach would provide a n estimate which might not enable a tax administration to assign an IP address and subsequently an IP address owner/user to a Bitcoin transaction beyond reasonable doubt . As the Simple Payment Verification /Light nodes depend on other nodes for verification of transactions, they can be used to identify Bitcoin addresses in their wallet, and enable associating IP addresses to Bitcoin addresses. To prevent this , the SPV Nodes use bloom filters57. However, Gervais, Capkun, Karame, & Gruber, (2014) found that SPV clients with bloom filters also leak considerable information regarding Bitcoin addresses in the ir wallet and make associating IP addresses to Bitcoin addresses possible . Another feature of the Bitcoin network is that the participating nodes usually connect to each other using the port number 833358. This can create a potential problem for the network in case of a widespread disruption in traffic on this port, which can seriously affect the mining and validation of blocks and consequently, the price of Bitcoin significantly. However, this issue has been addressed in Bitcoin Core 23.059 . 2.3.11 Forking Just like a fork in a road, forking in a blockchain refers to a situation where the blockchain diverges into two potential paths forward. This can arise due to a temporary lack of consensus in the network regarding the block(s) to be added to the main blockchain , resulting in a temporary fork. This can also be due to changes in the software run by various nodes which validate transactions and add blocks to the blockchain. If the blockchain software undergoes a major change, for example due to a major security threat or a necessary improvement, and the new blockchain is incompatible with the previous version, such a change is called a Hard Fork . If the software updates are backward compatible it results in a Soft Fork . As the Bitcoin Blockchain is decentralized with each node maintaining its own copy of the blockchain , it is possible that at some instance divergence might arise between the nodes about the blockchain . Temporary forks can emerge in cases like when two blocks are mined within a short interval by two different miners , and they reach various nodes almost simultaneously . This results in some nodes adding the first block and some nodes adding the second block to the blockchain , resulting in the nodes having two different perspectives of the blockchain at that moment . The blockchain eventually reconverges as more blocks are added to one of the forks. The blocks added to the other fork get orphaned and are discarded, the transactions in orphaned blocks remain unconfirmed. This is the main reason why it is recommended to wait for 6 confirmations of the transaction i.e., waiting for six subsequent blocks to be added to the blockchain after the transaction for confirming the validity of the transaction. This is graphically depicted in Fig. 2 3 2.3.11.1 Hard Fork A hard fork occurs in a blockchain when a major change happens in the blockchain software/protocol and these are incompatible with the previous version of the blockchain . This is a way through which new features can be incorporated in the blockchain protocol or security loopholes in the software can be plugged. However, all nodes of the Bitcoin network might not accept the change and upgrade. As the changes introduced make the nodes that upgrade incompatible with the old protocol, a split occurs in t he bloc kchain . The blocks created by the nodes running the old version of the protocol 57 https://bitcoinops.org/en/topics/transaction -bloom -filtering/ 58 https://bitcoin.org/en/full -node#network -configuration 59 https://github.com/bitcoin/bitcoin/blob/e88a52e9a2fda971d34425bb80e42ad2d6623d68/doc/release - notes/release -notes -23.0.md#p2p -and-network -changes 41 Fig. 2 3 Temporary Blockchain Fork would be invalid for the upgraded nodes. As a result, two crypto asset s are created and the owners of the crypto asset s prior to the point of hard forking get equal number of crypto asset s in the both the blockchains right after the hard forking. A prominent example of hard forking is the creation of Bitcoin Cash Blockchain from the Bitcoin Blockchain . To increase the number of transactions that can be included in a block in Bitcoin , it was proposed to segregate the signatures from the main transaction data to accommodate more transactions in the 1MB block size limit. To avoid the update, some Bitcoin developers and users decided to initiate a hard fork and created the Bitcoin Cash which has a block size of 8MB and does not segregate signatures. Hard fork s are important events from tax perspective as it results in the ownership of crypto asset s in both the forks of the blockchain after the fork has taken effect, for those who owned any Bitcoin amount right before the fork . For example , the hard fork in Bitcoin took effect from block number 478558 of Bitcoin blockchain . If we look at the address 3FGs7JfaoAZTT6Sda73XrJ6i5Gwsuw9GUC which received 8.0 BTC in a transaction included in the no. 47855760 right before the hard fork happened and query the Blockchain Explorer61 at present , we find a result as shown in Fig 24. This shows that this Bitcoin address also became a Bitcoin Cash address and the owner of this address received 8.0 Bitcoin Cash by virtue of the hard fork. This is analogous to splitting of shares in equity market and is an important taxable event. 60 https://www.blockchain.com/btc/tx/98ecc4189d3f33eee96afbff948219ba0ba2342c263241602b95437050c11 30b 61 https://www.blockchain.com/search?search=3FGs7JfaoAZTT6Sda73XrJ6i5Gwsuw9GUC 42 Fig. 24 Receipt of Bitcoin Cash by owner of Bitcoin due to a hard fork 2.3.11.2 Soft Fork Soft Forks are minor changes in the blockchain protocol/software that are backward compatible. Thus, a new blockchain is not created and the blocks created by nodes running the updated software are treated as valid by the nodes running the old version of the software. However, the blocks created by old nodes would be treated as invalid by the nodes running the upgraded software. If a significant number of nodes upgrade their software, this results in no disruption in the functioning of the blockchain . Soft forks usually do not have any tax implications unless they trigger a hard fork like in case of Bitcoin. 43 2.3.11.3 Taxation of forking events A) Hard Forks: As explained earlier for those who own any crypto asset amount right before the fork , hard forks result in the ownership of crypto asset s in both the forks of the blockchain after the fork has taken effect. This results in acquisition of crypto asset s by the users of one blockchain on another blockchain without any consideration. The two taxable events that arise out of a hard fork are: i) Acquisition of crypto asset s in the other blockchain ii) Disposal of the crypto asset s acquired as result of the hard fork The tax treatment of a cquisition of crypto asset s in the other blockchain due to a hard fork differs across jurisdictions. While some jurisdictions like the US and Japan consider crypto asset s received because of hard fork s as taxable income , with the value of the newly acquired crypto asset s taken as the fair market value of the crypto asset s at the time of the hard fork . Other jurisdictions like the UK, Finland , Sweden etc. do not tax the crypto asset s received because of hard fork s at the time of their receipt , and their cost of acquisition is taken as zero. However, upon the disposal of the crypto asset s received because of hard fork s, a capital gain or income tax may be charged depending upon the local law (presence or absence of capital gain s) with the tax liability depending upon the basis/cost of acquisition. In Australia, the Australian Tax Office has issued guidance for hard fork s where individuals/entities running crypto asset businesses need to apply trading stock tax rules instead of Crypto Tax Rules in hard fork events. B) Soft Forks: As soft fork s are minor software changes and do not result in a new blockchain , they are not taxable events and result in no tax liability. 2.3.12 Bitcoin Wallets Bitcoin Wallets are software that store the address (es) of a Bitcoin user (Fig. 25). A wallet is a software that keeps a track of the crypto asset s owned by various addresses in the wallet, generates and manages new addresses for new transactions (as it is recommended to generate new addresses for every Bitcoin transaction ). The wallet software also provides a consolidated interface enabling the owner to find the aggregate sum of all UTXOs owned by him/her in the form of a Bitcoin balance. Recommendations of transaction fees are also provided by wallet software after analysing the network congestion and transaction fee trends . Fig. 2 5 A Bitcoin wallet (representation) There are mainly two types of wallets used by Bitcoin and other crypto asset s. Cold wallet s are the wallets stored on a paper or some specialized hardware wallets that are not connected to any network or the Interne t. A collection of Bitcoin addresses as shown in Fig. 7 is known as a paper wallet. There are multiple hardware wallets like the Trezor hardware wallet and the Ledger Nano hardware wallet. 44 These USB drive like wallets do not communicate with any other device unless physically plugged while accessing the private keys. It is like the digital signature USB drives which need to be plugged -in to sign a document. Hot wallets are connected to the Internet and the blockchain network. They are often in the form of smartphone apps like the Trust wallet or computer applications and browser extensions like the Coinbase wallet and Jaxx Liberty wallet respectively. Since, hot wallets are connected to the Internet, they are usually recommended to be used only for small transactions. For privacy, the wallets create a new address for every Bitcoin transaction. Many wallets also use a mnemonic seed phrase along with a password and using this seed key they can generate many public and private key pairs and use a new key for every transaction . Such wallets are known as Hierarchical Deterministic wallets. One such wallet is shown in Fig. 2 6. The practice of generating a new Bitcoin address for every transaction also protects Bitcoin users from risk of quantum computer enabled attacks. As explained earlier, while broadcasting a signed transaction, a user Alice needs to send her public key along with the signature. Thus, even if a quantum computer enabled attacker Qua finds Alice’s private key using Shor’s algorithm, he can derive no benefit , as Alice’s address would have no UTXOs to be spent once the transaction is recorded on the blockchain . Such wallets make it difficult to track the transactions on the blockchain , as a wallet can have numerous Bitcoin addresses and it can be difficult to associate them to a single user by analysing transactions on the blockchain . Also, the Bitcoin balance shown by the wallet on the dashboard is an aggregate of all the UTXOs that can be spent by all the Bitcoin addresses in the wallet. Thus , there is nothing like One Bitcoin which resides in a wallet , a balance of 1.2 BTC on the wallet means that the Bitcoin Blockchain agrees that the Bitcoin addresses in the wallet have ownership of UTXOs which aggregate to 1.2 BTC. Fig. 2 6. A Hierarchical Deterministic wallet that generates a new address for every transaction. These wallet services generate and manage addresses using ECDSA , as described above and provide services like creating transactions with optimum number and amounts of UTXOs, signing them and broadcasting on the Bitcoin network. Most wallets do not charge any fees for it. However, if the wallet 45 charges a fee, it might be subject to service tax/GST in various jurisdictions. In many jurisdictions the wallet services charging fee might not be exempted from VAT/GST as for a service to be VAT Exempt the service must itself be an exempt service, and the argument that it is an input service to an exempt service does not suffice for VAT exemption to a service (C -2/95 SDC62 and C -350/10 Nordea63) It is also important to note that many such hot and cold wallets do not capture any identity information regarding the user or carry out any KYC compliance procedures. Anyone with access to the Internet and a smartphone or PC can create an account or buy a hardware wallet and start transacting in crypto asset s. This kind of wallets where the keys are owned and directly controlled by the user of the wallet are known as non -custodial wallets. 3. Crypto Exchanges The Bitcoin Blockchain allows users to transact 24x7 using wallet software which facilitate signing and broadcast ing transactions to be included in blocks that get added to the Bitcoin Blockchain. However , Bitcoin owners also have two other fundamental requirements of being able to convert fiat currency into crypto asset s and vice versa, as well as exchanging one crypto asset into another. The crypto exchanges provide these facilities and many more to the owners of crypto asset s. In this ecosystem the excha nges can be divided into two categories , centralized and decentralized exchanges. The major differences between them are: Centralized Exchanges Decentralized Exchanges Exchange is the custodian of private key s Owner is the custodian of private key s KYC is required Usually, No KYC is required Easy to use Relatively difficult to use Products like derivatives available Offer only basic products Higher liquidity Lower liquidity Can convert fiat currency to Crypto assets Cannot convert fiat to crypto asset s directly The wallets provided by crypto asset exch anges are known as custodial wallets as the keys contained the wallet are in the custody of the crypto exchanges. The users access their accounts and authorize transactions using a PIN or a password which the exchange executes locally or on the blockchain , on behalf of the user, charging a fee. Some of the other facilities provided by the exchanges are: i) Liquidity: Due to the participation of market makers, the crypto exchanges can provide liquidity to the markets. It enables facilitation of trades as enough number of buyers/sellers are present at any given point through facilities like margin trading . ii) Derivatives: Products like Futures and Options based on the underlying crypto asset s are offered by exchanges. iii) Passive Income: By providing services like liquidity to exchanges, staking crypto asset s in proof -of-stake consensus mechanism, loans, and yield farming64, many crypto exchange s allow users to earn passive income on their crypto asset s. Many centralized and decentralized exchanges offer such services and in the latter case they form a part of 62 https://eur -lex.europa.eu/legal -content/EN/ALL/?uri=CELEX%3A61995CJ0002 63 https://curia.europa.eu/juris/document/document.jsf;jsessionid=CD1328EA651A7F81A11CBDAB3C8E3AC9?te xt=&docid=108324&pageIndex=0&doclang=EN&mode=lst&dir=&occ=first&part=1&cid=1203786 64 A form of platform arbitrage where users staking or lending their Crypto Assets move their assets between platforms that give the highest yield/return. 46 Decentralized Finance (DeFi) which is an emerging area in crypto asset ecosystem and warrants an in -depth discussion as a part of a separate paper. Besides centralized and decentralized exchanges there are also some peer -to-peer trading platforms like LocalBitcoins and Paxful which list various individual suppliers of crypto asset s who provide quotes and acceptable volumes of trade. The suppliers specify methods like credit card payments, bank transfers, gift cards etc. for paying for crypto asset s like Tether, Bitcoin or Ethereum. These platforms provide escrow service which minimizes the counter party risk and the seller transfers the crypto assets to the buyer once the receipt of the payment by the seller is confirmed. As the sellers on such platforms are persons who might be neither registered as crypto asset traders nor regulated, they can be potentially used by taxpayers to evade their due taxes on their crypto asset transactions. However, to comply to AML/ CFT laws and regulations such services have verification levels depending on the types of transactions being undertaken by the user. For example , LocalBitcoins has 4 verification tiers in which the most basic level captures information regarding Full Name, Country of Residence, Email address and Phone number65 of the user . This can enable tax administrations and other law enforcement agencies to gather information regarding such transactions in their jurisdiction. Many centralized crypto exchanges execute trades based on order matching and get their liquidity from market makers and margin trading facility. As the transaction costs of recording the transactions on the blockchain are high, the centralized exchanges execute transactions by passing accounting entries in their own accounts of crypto asset s or accounts of other users maintained with them. This off-chain nature of transactions enables faster processing times and greater scalability compared to on-chain tran sactions, which must be validated and confirmed by the blockchain network. For example , if Alice buys 0.1 BTC from a centralized exchange, the exchange might debit its own BTC account by 0.1 and credit 0.1 BTC to Alice’s account in the form of an accounting entry . The exchange may also match the sell order of Bob against the buy order of Alice and debit Bob’s BTC account by 0.1 BTC and credit 0.1 BTC to Alice’s account. The exchange would also credit the fiat currency value of 0.1 BTC to Bob’s fiat currency funds and debit the equivalent amount from Alice’s fiat currency funds kept with the exchange. Usually, the transactions undertaken on a centralized exchange cannot be traced on the blockchain except when the funds are transferred in the form of crypto asset s from one exchange to another by the user, or to/from any other non -custodial wallet addresses outside the exchange. Similarly, some exchanges may utilize on -chain settlement mechanisms for certain types of trades or transactions to provide greater transp arency and security. However, most trading activities on centralized exchanges are conducted off -chain to optimize performance and scalability, albeit at the expense of decentralization and trustless nature inherent to blockchain technology. The management of user keys also differs between centralized exchanges and decentralized exchanges . In centralized exchanges, users typically do not have direct control over their private keys, which are used to sign transactions and authorize the transfer of funds. Instead, users rely on the exchange to manage their keys on their behalf, with the exch ange holding custody of the keys associated with user accounts. This centralized custody model introduces counterparty risk, as users must trust the exchange to safeguard their assets and manage their keys securely. However, some exchanges offer additional security features such as two -factor authentication and cold storage to mitigate this risk. 65 https://localbitcoins.com/guides/verification -guide 47 The exchange charges a service fee for this transaction and is liable to pay VAT/ Service Tax/GST on it. It is also the case that the service fee can be paid in the form of another crypto asset (which is native to the exchange or freely tradable) at a discount. This makes the transaction equivalent of buying a service in exchange of crypto asset s and may be taxed accordingly . 4. Source of Value of crypto asset s and Bootstrapping There are multiple examples of assets which have a value without an underlying asset. For example , the valuation of shares of many start -ups are based on the perception of the company in the minds of the shareholders and the expectation of higher profits in the future. Tulip Mania, the Dutch speculative bubble in the 17th century which led to prices of some Tulip bulbs reaching unprecedented levels, is another such case where the Tulip bulbs did not have any inherent value or utility , but derived their value from the value buyers ascribed to them . Bitcoin and other crypto asset s have some characteristics of other conventional assets which ascribe value to them. Scarcity is one feature which makes it rare, just as Gold and Diamond derive their value from scarcity, the fact that only 21 million Bitcoins can ever be issued, makes i t scarce. There is also some evidence to suggest that the lack of centralized control over Bitcoin makes it trustworthy and a hedge against inflation , as no central bank can ever impose an ‘inflation tax’ on Bitcoin owners. Various instances have come to light where citizens of a country who have reduced faith in their Central Banks use Bitcoin as a safe store of value66. Also, t he secure nature of immutable blockchain which is almost impossible to modify along with cryptographic safeguards guarantee the owners of Bitcoin the ownership and the right to transfer the assets securely. If the users believe d that an attacker can maliciously steal Bitcoins from them, Bitcoin would not have much value as an asset. The fact that the users can transfer a part or whole of their Bitcoins to another user who is willing to transact, irrespective of his /her location establishes the acceptance and portability of Bitcoin. This trust in the value of Bitcoin also has positive feedback on the nodes which add blocks to the blockchain (miners). It creates an incentive for them to secure the blockchain and maintain its integrity . The incentive mechanism promotes honest behaviour by nodes and miners which maintains the integrity and trust in the Bitcoin Blockchain which has not suffered outages. As seen earlier, if the number of miners decreases resulting in lower hash rate, the mining difficulty decreases resulting in an increase in the number of miners. The value ascribed to Bitcoin is a complex interplay between the factors depicted in Fi g. 27 Fig. 27 Source of Bitcoin Value 66 https://www.mariblock.com/africans -should -embrace -stablecoins -safeguard -savings -against -inflation - currency -devaluation/ Future Value of Bitcoin Number of Mining NodesSecurity of Bitcoin Blockchain 48 In the above figure, the perceived future value of Bitcoin is an incentive for a sizeable number of nodes to validate the transactions and mine blocks, which enhances or maintains the security of the blockchain and thus, in turn keeps Bitcoin valuable. Other crypto asset s like Ethereum, Tether and Solana also derive their value from properties and mechanisms of Bitcoin with a few modifications. Ethereum with is smart -contract67 ecosystem provides a wide platform on top which various services like lending and borrowing can be offered. Another token, Solana claims highest transaction speed of 65,000 transactions per second with average transaction fees of $0.0002568. It is also growing its stack of services which can offered on top of Solana Blockchain. Such USPs and Network effects also contribute to the value of crypto asset s. The security provided by high hash rates and large number of miners can explain the value ascribed to crypto asset s in stable blockchain s like Bitcoin. However, to start and establish a blockchain or a crypto asset on top of an existing blockchain like Ethereum, the developers need to bootstrap it to create a virtuous cycle and enhance its pros pects and investment. This is done through various incentives like higher initial block rewards , initial coin offering s and airdrop s along with aggressive marketing . In case of Bitcoin when Satoshi Nakamoto mined the first block of Bitcoin the Bitcoin Blockchain was not secured by many nodes producing trillions of hashes per second. To incentivise more nodes and miners to join the Bitcoin network , the block reward was 50 BTC per block. The idea of a new decentralized system of exchanging value in a trustless manner attracted users and miners who also believed that the price of Bitcoin would increase once it gains wider acceptance, which was indeed the case. This system of incentives has also resulted in honest behaviour being the dominant strategy for miners and users if bitcoin mining is considered a repeated zero -sum game. 5. Initial Coin Offerings Many blockchain developers undertake projects to launch their own blockchain or another token on top of an existing blockchain like Ethereum. This is somewhat like a start -up launching its product. For this purpose, developers need funds for development as well as a user base for the token or blockchain who participate in the network and contribute in terms of nodes, value in tokens and transactions over the blockch ain. Thus, many developers come out with initial coin offering and sell /promise to sell the new tokens/ crypto asset s to investors at a price, just like in the IPO of a c ompany , to raise capital for the project . To enable investors/buyers to understand the proposed token/blockchain the developers usually come out with a whitepaper which contains: - The long terms goals of the developers for the token/blockchain - The detailed architecture and code of the token/blockchain - Plan for marketing and advertisement - The USP of the token/blockchain - Details like developer fee, the initial distribution of assets and rights and permissions on the blockchain /token for user and developers - Details of reward and incentive mechanism in mining and transactions, if any This makes the participants and investors stakeholders in the success of the project and spreads the risk involved in launching a new token/blockchain. However, ICOs are not regulated in many jurisdictions or their regulation is not clear. This results in investors not having rights and safeguards similar to the equity market s. As many crypto asset s are very similar to securities in nature there is a possibility of intervention of securities regulators which aim at enforcing investor protection measures 67 A self-executing contract with the terms of the agreement between buyer and seller being directly written into lines of code 68 Digital Assets Primer: Only the first inning - Bank of America 49 similar to securities market s. There are numerous examples of various successful ICOs. Ethereum was funded through an ICO in 2014 where buyers exchanged Bitcoin for Ether. In the Ethereum ICO some amount was set aside for the developers and the Ethereum Foundation. Nowadays Ethereum through its smart contract execution enables the creation o f new tokens and platforms which are interoperable on the Ethereum Blockchain. ICOs are important taxable events as the fair market value of new crypto asset s at the time of their acquisition would be the basis for calculating the capital gain s on the ‘disposal’ of such assets in lieu of fiat currency or another crypto asset (subject to domestic tax laws). Also, as most crypto asset s are highly centralized in the initial phases and its only after the crypto asset gains some traction that their control is transferred to a completely decentralized organization, such crypto asset s may be classified as securities and subject to taxes due on securities and regulations of the securities regulator. 6. Airdrops Another method used by developers of new tokens or blockchain s is to give out crypto tokens for free to incentivise its usage and enhance market presence and exposure . These free tokens are known as airdrop s. They are also a kind of reward for the early adopters of the new crypto asset . For example, Uniswap, a decentralized exchange gave 400 Uniswap token to all the Ethereum accounts that had interacted with its smart contract prior to September 1, 2020 . This was aimed at rewarding users for using the Uniswap exchange and make them stakeholders in the success of Uniswap . To receive airdrop s users are required to perform actions like using the platform or service, signing up for newsletters and mailing lists, hold tokens for a specified period , contribute to the development of the project etc. Non-Fungible Tokens or NFTs can also be airdropped for using an NFT platform or buying/sell ing NFTs. Airdrops are also important taxable events and in most jurisdictions an income tax is chargeable upon the receipt of an airdrop . The receipt of an airdrop is not taxed but is considered acquisition of a crypto asset with zero basis in some jurisdictions . Also , the subsequent sale, swap, spend or gift transactions are also subject to capital gain s. In some jurisdictions, depending upon the domestic tax laws and guidance, gifts might not be taxed. 7. Ethereum Bitcoin is mainly used to transfer value from one address to another in a secure and efficient manner. However, it does not offer many opportunities to build applications on top of the Bitcoin Blockchain as the Bitcoin script is not Turing complete69 and does not allow user defined logic and customized functions to execute in transactions. As seen earlier, Bitcoin transactions also require the entire UTXO amount to be spent and do not provide control over the amount that can be withdrawn from a UTXO . Ethereum is different from Bitcoin as it provides above and beyond the capacity to transfer value from one address to another. Ethereum is mistakenly considered a crypto asset whereas it is a decentralized platform that is designed to run smart contract s, with Ether as its native asset which gives basis to i ts value. As Ethereum’s language is Turing complete, it can act like a giant decentralized general -purpose computer which is censorship resistant and minimizes third party risks in transactions. To understand Ethereum it is important to imagine a blockchain as a state -machine where transactions change the state of the blockchain . A blockchain is essentially a "cryptographically secure transactional singleton 69 In Computer Science a Turing Complete system is one that can mimic a Turing Machine. A Turing Machine is a theoretical machine with a memory tape of infinite length which can calculate or compute anything for which an algorithm exists. 50 machine with shared -state."70. This is depicted pictorially in Fig. 28 71 . The consensus mechanism essentially aims to make all the nodes /validators of the Ethereum network agree on the current state of the blockchain . Fig. 28 Blockchain as a State Machine72 Ethereum is an account based blockchain unlike Bitcoin which is UTXO based. For a Bitcoin user the ‘Balance’ of his/her account is the sum of all the UTXOs for which he/she owns the private keys. In Ethereum, the accounts keep a track of the balance automatically. There are two types of accounts in Ethereum a) Externally Owned Accounts which have private keys and no code associated with them and b) Contract Accounts which do not have private keys and have code associated with them . Both these types of accounts have a Balance field associated with them , which shows the amount of Ether owned by these accounts. The state of the Ethereum Blockchain consists of the balance, data, code, and all other fields of all the accounts. The fields in a transaction on the Ethereum Blockchain are given in Table 4. A contract account contains the code of the smart contract and it is controlled by the smart contract code. In an Ethereum transaction when the destination address is a contract address , the smart contract code is executed on the Ethereum Virtual Machin e. The smart contract function specified in the data payload is called, if no function is specified, a fallback function is called. From Address of externally owned account initiating the transaction To The address of the receiver. 0x00000 in case of creation of a smart contract Value Amount in Wei (10-18Ether) Data Bytecode sent as input for contract creation or execution Gas Limit The maximum amount of gas user is willing to pay for the transaction Gas Price The amount of Ether the user is willing to pay for each unit of gas. In gwei(=10-9 Ether) Nonce Sequence number of transaction for the EOA Signature Proves the origin of the transaction, not required in transactions where one contract invokes a function in another contract. Table. 4 fields in a transaction on the Ethereum Blockchain An Ethereum block consist s of transactions which i) change the balance associated with EOA and smart contract accounts ii) change data stored in a smart contract or iii) create, destroy (deprecated) or change the code of a smart contract. Each transaction affects the data stored in contracts in every single full node on the Ethereum network. Thus, Ethereum can be imagined as a giant decentralized computer where users can run their code and store data after paying the fee for the transaction. However, these computations are mainly use d for basic functions like changing the balance and 70 https://docs.ethhub.io/ethereum -roadmap/ethereum -2.0/stateless -clients/ 71https://www.preethikasireddy.com/post/how -does -ethereum -work -anyway 72Source: https://uploads -ssl.webflow.com/5ddd80927946cdaa0e71d607/5ddd80927946cdd1dd71d6f1_how - does -ethereum -work -anyway -2.png 51 ownership of tokens held by the smart contract and validating signatures instead of storing large files or executing complex programs . Ethereum also has a much smaller block time of 12 seconds as opposed to ~10 Minutes in Bitcoin. It also has much lower fees as compared to the Bitcoin Blockchain . The fee to be paid for any transaction in Ethereum is called gas. To complete a transaction, the user needs to provide appropriate amount of gas depending on the size and nature of the transaction. Simple transactions to transfer Ether from one account to another do not cost as much gas as breeding CryptoKitties73 using a smart contract . The user must provide adequate gas for the entire transaction to go through, if the entire gas is not used for the transaction, the excess gas is refunded. However, if the gas amount is not enough for the entire transaction to take place, the entire gas amount is consumed and forfeited. Gas also protects the Ethereum Blockchain from infinite loops as even if a malicious user tries to execute an infinite loop on the Ethereum EVM it would stop after the transaction runs out of gas. Any contract execution in Ethereum must be triggered by an externally owned account. The triggered transaction can in -turn trigger further transactions on other contract accounts . The triggered transactions are executed atomically, i.e., either the full transaction involving all the intended smart contract s is exe cuted or all the changes made by the incomplete transaction are reversed. Ethereum also uses digital signature and hash functions like Bitcoin. However, Ethereum uses the KECCAK -256 algorithm and an Ethereum address is a 42 -character hexadecimal address derived from the last 20 bytes of the public key . The signed transactions are sent to a mempool, thereafter the nodes verify and propagate the transactions using flooding. 7.1 Proof -of-Stake based consensus in Ethereum Ethereum initially started as a blockchain based on the proof -of-work consensus mechanism but in order to reduce the negative externalities of proof -of-work , it switched to a proof -of-stake based consensus mechanism similar to one descri bed in the section 2.3.9 . The Ethereum proof -of-stake mechanism is based on each validator staking 32 ETH to be a part of the set of validators which propose and attest blocks. Besides this the validators have various other duties assigned to them, for which they get paid in the form of rewards at regular intervals . Any malicious behaviour by a validator is penal ized through slashing – a mechanism in which the staked Ether is slashed for violating the proof -of-stake rules , it also result s in removal of the validator from the network. The validators deposit 32 ETH in a smart contract on Ethereum and must wait for certain period in the activation queue before they can take part in proposing and validating blocks. The 32 ETH deposit is made to a smart contract that keeps track of all the staking validators. The validators specify a withdrawal address in the smart contract to which the payouts are made , as shown in Fig . 29 The depositor send s 32 ETH along with its public address and a withdrawal address to the smart contract. It is important to note that the staked ETH becomes a part of the consensus layer and is accounted for separately from Ether in execution layer Ethereum accounts and contracts. No Ethereum execution layer transactions can be run on staked ETH and no transfers can be made between validator accounts. The validators can top -up their ETH balance on the smart contract later if it goes below 32 ETH. The validators are rewarded for proposing as well as validating proposed blocks with a part of the user fee and newly issued ETH by the Ethereum consensus laye r known as ‘Issuance.’ The validators are also penalized if they do not complete their assigned duties of block proposal and validation. However, these penalties are much less severe than the slashing penalties which are levied for malicious behaviour. The base fee in each block is burnt in accordance with EIP 155974 which may be smaller or larger than Issuance for the block. 73 https://www.cryptokitties.co/about 74 https://eips.ethereum.org/EIPS/eip -1559 52 Fig. 29 Ethereum deposit smart contract Validators are paid rewards at regular intervals of time . At any point i f a validator is found violating proof -of-stake rules , its deposit is slashed and it exits the system. The remaining deposit of a slashed validator can only be withdrawn after certain time has elapsed. If a validator voluntarily decides to withdraw its stake and cease to be a part of the Ethereum consensus mechanism , it can initiate a withdrawal and if no breaches of the proof -of-stake rules are found , the entire staked ETH is returned to the validator which can be withdrawn after a certain interval . No gas is required for this transaction. The flowchart depicting deposits and withdrawals in the Ethereum proof -of-stake smart contract is given in Fig. 30 75 The system of entry and exit of validators is not instantaneous to maintain a stable pool of validators over a certain period . The proof -of-stake based consensus mechanism in Ethereum is like a voting -based mechanism in which the validators carry out the functions proposing the next blocks of the blockchain as well as attesting the blocks proposed by others. The attestation of a b lock is essentially a vote on the validity of the block and its inclusion in the blockchain. The validators maintain the integrity of the blockchain by honestly carrying out the duties assigned to them, with the other validators keeping an eye over their c onduct. The mechanism is designed such that it incentivises honest behaviour by the validators and places heavy penalties on dishonest behaviour by the validators. In the proof -of-work consensus mechanism, the high capital required for establishing a mining farm along with its high running costs creates barriers to entry in the mining ecosystem and plays a major role in incentivising honest behaviour by the validator s. Similarly, in the proof -of-stake based consensus mechanism of Ethereum, staking of 32 ETH by each validator creates a high capital requirement. Ethereum tries to achieve consensus amongst the set of validators through a combination of two different cons ensus mechanisms – the Latest Message Driven Greedy Heaviest - Observed Sub -Tree (LMD GHOST) and the Casper Friendly Finality Gadget (Casper FFG). The LMD GHOST is different from the longest chain rule in the Bitcoin Blockchain and the proof -of-work based Ethereum as it counts every block in a fork as a vote, even if they are conflict ing blocks and not a part of the longest chain. This means that the fork with the highest number of validator votes is the one to which new blocks are added. 75 https://notes.ethereum.org/@hww/lifecycle 53 Fig. 30 D eposits and withdrawals in the Ethereum proof -of-stake smart contract76 7.1.1 Slots and Epochs Time periods on the Ethereum Blockchain are divided into slots and epochs. One slot which results into a block proposal and attestations is 12 seconds long and 32 slots together form an ‘epoch’ as shown in Fig .31. By design, in Ethereum every 12 seconds a random validator is chosen to propose a block to be added to the Ethereum Blockchain. The block proposed by the validator needs to be verified by other validators in the validator set through an ‘attestation .’ These validators, other than the proposer have a responsibility for verifying the proposed block if it is correct. Attestations include information about the current block the validators are attesting to, as well as the previous block they are building upon . However, not all the validators are required to attest every block and, in each epoch, the set of validators is distributed into 32 randomly chosen committees, with each committee being responsible for one slot which is 12 seconds long. At the start of each slot, the first validator of the committee proposes a block to be added to the Ethereum Blockchain. The rest of the members of the committee are supposed to attest the proposed block. Validators attest to the validity of proposed blocks by signing and broadcasting attestations . A validator can only attest one block per slot in an epoch and any violation of this results into slashing. Each proposer validator is required to propose a block in the first 4 seconds of the slot, failing which the validators in the committee are required to attest the previous block. 76 https://ethos.dev/beacon -chain# 54 Fig. 31 Slots and epoch in Ethereum consensus mechanism77 Considering the current number of validators is >800,000 each committee is likely to consist of >2500 0 validators. It is an uphill task to collect signatures of so many validators for each slot. Consequently, validators in each committee are further divided into 128 subnets , as shown in Fig. 32, and validators produce a n aggregate BLS signature in each subnet. Validators in the committee collect all the individual BLS signatures they receive and aggregate them into a single BLS signature using a process called "signature aggregation." This aggregation is possible because of the unique additive property of BLS si gnatures, allowing multiple signatures to be combined into one without losing any security properties . By collecting attestations from an ample number of validators, the network can finalize blocks, guaranteeing their inclusion in the Ethereum Blockchain and making them resistant to reversal unless a substantial portion of the validator set collaborates to do so. The choice of the block proposal and assignment of validators into committees and subnets is dependent on an Ethereum Blockchain process that generates a pseudo -random number . The random number is generated on Ethereum using an algorithm called RANDAO78. The validator selection is fixed two epochs in advance . This implies that validators know a few minutes in advance about their upcoming proposer or attestation duties . This process pre determines a small set of 64 validators who are entrusted to propose blocks for each slot in the two epochs (12 mins 48 seconds) . Fig. 32 Committees and Subnets in Ethereum consensus mechanism 77 https://ethos.dev/assets/images/posts/beacon -chain/Beacon -Chain -Slots -and-Epochs.png.webp 78 https://ethereum.org/gu/developers/docs/consensus -mechanisms/pos/block -proposal/ 55 Besides the LMD GHOST which provides the fork choice rule79, the Ethereum Blockchain also aims to achieve finality in the blockchain through the Casper FFG which is a Practical Byzantine Fault Tolerance (PBFT) inspired and improved consensus protocol. Finality refers to the guarantee that a block cannot be altered or removed from the blockchain without burning at least 33% of the total staked E ther . Finality in Casper FFG is achieved through “checkpoint” blocks, which are always the first block s in an epoch. Validators agree on the state of a block at checkpoint blocks, and if two -thirds of the validators agree, the block is finalized . It usually takes two epochs for the Ethereum Blockchain to attain finality as by the end on two epochs >2/3rd of the validators likely vote for two ‘checkpoint’ blocks. If a block is not able to exceed the two-thirds threshold , finality is not achieved , the fork choice rule would kick -in to determine which chain to follow and finality will be achieved when the 2/3rd majority is m et. If finality is not achieved for more than four epochs, ‘inactivity leak’ mechanism gets activated. The inactivity leak is a feature of the Ethereum proof -of-stake consensus mechanism that is activated when the network fails to finalize a checkpoint for more than four epochs (25.6 minutes). The inactivity leak is designed to restore finality in the event of the permanent failure of large numbers of validators. It does so by gradually reducing the stakes of validators who are not making attestations until the remaining validators control two -thirds of the stake and can resume finalizing checkpoints. The inactivity leak also prevents validators from receiving attestation rewards during this period, to discourage attacks that might deliberately cause the network to lose finality . 7.1.2 Rewards and Penalties To incentivise the validators, the Ethereum Blockchain offers rewards to the participants in the network. Also, to penalize behaviour that is detrimental or outrightly malicious , the Ethereum Blockchain also has a system of penalties and slashing which act as a deterrence against such behaviour. 7.1.2.1 Rewards The main rewards which validators receive in the Ethereum ecosystem are the n ewly issued Ether created by the protocol and the t ransaction fee paid by the users transacting on the Ethereum Blockchain. The validators are assigned various duties like proposing and attesting blocks in a slot as well as participation in sync committees and they receive rewards fo r correct and timely performance of these duties . ‘Correct ’ attestation implies that the attestation of the block by the validator agrees with the fork choice of the block proposer. This ensures that only participants in the winning fork (in case of an available fork choice ) receive the reward s. Failure in performing duties in the specified timeframe results in missed rewards. The block proposers are also rewarded for reporting any violations of the slashing rules, which may not happen so often. In a block , majority of rewards of the validators come from attestations. An attestation contains three votes and each vote is eligible for a reward if it satisfies the conditions given in Table 5: S. No. Validity Timeliness 1 Correct source Within 5 slots 2 Correct source and target Within 32 slots 3 Correct source, target and head Within 1 slot Table. 5 Timelines for attestation reward eligibility80 79 The Fork Choice Rule (FCR) is a crucial mechanism in blockchain networks, determining which branch of a forked chain to accept as the canonical or main chain. 80 https://eth2book.info/capella/part2/incentives/rewards/ 56 Even if the above duties are performed in a timely manner by the validator, it may not receive the rewards due to various extraneous factors like the block proposer missing to propose a block within 4 seconds in a slot, or the block proposer proposing a block on a minority fork which is discarded after a few blocks. Thus, the rewards accrued to the validator due to randomness in allocation of duties as well as other extraneous factors stated above have a variance and vary over time. The breakdown of expecte d rewards for proposers and validators is given in Fig. 33 Fig. 33 B reakdown of expected rewards for proposers and validators81 Sync committees allow light Ethereum clients to keep track of the chain of beacon block headers. Light clients are nodes that do not download the entire blockchain , but only rely on the block headers and some cryptographic proofs to verify the state of the blockchain . Sync committees are groups of 512 validators that are randomly selected every 256 epochs (about 27 hours) . They are responsible for signing the block headers that are the new head of the chain at each slot. The signatures of the sync committee members are broadcast to the network and are used by light clients to authenticate the block headers without downloading the full blocks. Validators are rewarded for participating in sync committees. The maximum amount of newly issued Ether per year – Annual issuance, is proportional to the square root of the number of validators in the network. However, the annual returns of the validators are inversely proportional to the square root of the number of validators. This results in a design like the proof -of-work based consensus where the difficulty level of the target hash is related to the overall hashing power of the network. Similarly, in Ethereum as the number of validators increases the annual retur n on staked Ether goes down and vice versa, resulting in an optimal number of validators being present in the Ethereum c onsensus protocol. Mathematically 𝐴𝑛𝑛𝑢𝑎𝑙 𝐼𝑠𝑠𝑢𝑎𝑛𝑐𝑒 ∝ √𝑁 𝐴𝑛𝑛𝑢𝑎𝑙 𝑅𝑒𝑡𝑢𝑟𝑛 ∝ 1 √𝑁 Here 𝑁 is the number of validator s on the Ethereum consensus layer . This mechanism helps the consensus layer in reaching the equilibrium number of validators at a given time. 81 https://eth2book.info/capella/part2/incentives/rewards/ 57 7.1.2.2 Penalties and Slashing To create negative incentives for validators who fail to contribute in a desired manner to the Ethereum Blockchain , penalties are levied. The validators are penalized for incorrect, late, or missing attestations (votes) . The validators are penalized for incorrect , late, or missing source82 and target votes83 but there is no penalty for a missed head vote84. Besides this, validators who fail to participate in sync committees receive a penalty equal to the reward they would have earned had they participated in the committee correctly. These penalties act as ‘sticks’ in the consensus protocol to motivate the validators to perform their duties diligently. However, these are not penalties for malicious behaviour or potential attacks on the protocol. The mechanism to deal with m alicious activity on the Ethereum consensus layer is Slashing . Upon detection of violation of rules or any dishonest behaviour by a validator the Stake of such validator is slashed and it is removed from the network. Slashing protects the protocol against any attacks . For example , it prevents a validator from voting for two blocks in the same slot. Also, the incentive to the block proposers for reporting any violations of slashing rules acts as a protection against such malicious behaviour. The penalties and slashing mechanisms in the Ethereum consensus layer have important tax implications which are related to the admissibility of the such penalties and slashing to be allowed as an admissible expense . While penalties can be allowed , as they might be caused due to bona fide reasons , the stake of a validator slashed due to malicious behaviour may not be allowed as an expense for the purpose of taxation. 7.1.3 Staking Pools When an individual/entity runs an Ethereum validator node on its own and makes the entire 32 ETH deposit it is said to be involved in ‘Solo’ staking . Solo staking also involves a reasonable degree of technical knowledge and the validators retain the full control of the keys of their deposited Ether. This form of staking also involves incurring the hardware and operational costs only, without paying any service fee to staking pool s, resulting in higher profits. It also helps to prevent the accumulation of majority stake with one central entity on the consensus layer . For the validators who have access to the required capital but do not possess the required knowhow or do not want to run a validator node , usuall y delegate the technically difficult tasks to a service provider for a fee. The validators retain the control of the keys of their deposited Ether and do not need to purchase any hardware or software to run validator nodes. However, this method of staking might involve increased third party risks due to potential downtime or bugs with the software of the service provider. 82 Source vote: This is a vote for the lower checkpoint of a link between two checkpoints from different heights. A checkpoint is a block that is divisible by 50, and a link is a connection between two checkpoints that represents a validator’s attestation. A source vote is used to determine the justified and finalized checkpoints, which are the blocks that have received enough votes from validators to be considered final and irreversible 83 Target vote: This is a vote for the higher checkpoint of a link between two checkpoints from different heights. A target vote is used to measure the participation rate of validators and to reward them for voting on the correct chain. A target vote also con tributes to the finality of checkpoints, as a checkpoint can only be finalized if its previous checkpoint is justified 84 Head vote: This is a vote for the most recent block that the validator sees as the head of the chain. A head vote is used to implement the LMD -GHOST fork choice rule, which selects the chain with the most votes from validators as the canonical chain. A hea d vote also helps to prevent stale blocks from being proposed and included in the chain 58 The 32 ETHs required to be deposited for being a validator on the Ethereum consensus layer is a significant barrier to entry for individuals/entities which want to participate in the consensus mechanism and earn rewards. Those inclined to participate in staking who do not possess the required capital or those who want to earn rewards over and above the staking rewards collaborate and stake Ether through a staking pool . Various stake rs who possess smaller amounts of ETH collaborate and pool their assets to p articipate in staking on the Ethereum consensus layer and earn rewards. In many staking pool s the depositors are issued tokens that represent a claim on the staked ETH amount and its associated rewards. For example , on depositing ETH on a popular staking platform LIDO, the depositor gets and equivalent number of stETH tokens which are pegged 1:1 with Ether and can be traded or used like any other ERC token on Ethereum to earn additional income, over and above the staking rewards by transacting on various DeFi platforms as shown in Fig . 34 Consequently, more than 3 0% of the ETH currently deposited on the Ethereum consensus layer Deposit Smart Contract is staked through LIDO85. The stakers on such platforms have a choice to run a pool node and get additional rewards for it. The stakers pay a commission /fee (For example LIDO charges 10%) which is split between the pool node operators and the Decentralized Autonomous Organization (DAO) of LIDO . Fig. 34 Staking pool token issuance and trading 7.1.4 Taxation of Proof -of-Stake based consensus in Ethereum The activities of the validators in the proof -of-stake based consensus in Ethereum and the rewards received by them can have direct and indirect tax implication s as they result in accrual of income and involve providing certain services to the users of the Ethereum Blockchain. The main issues concerning the direct tax treatment of rewards accrued by staking revolve around the treatment of the reward as an active or passive income for the validato r. For the levy of indirect taxes, the classification of nature of service provided by the validator , the classification of Ethereum as a negotiable instrument, property, asset etc. and the tax residency of the validation service recipient for ascertaining the place of supply would be important to determine the incidence of taxes. 7.1.4.1 Direct Taxes related to Proof -of-Stake based consensus in Ethereum As discussed above, t he validators in the Ethereum consensus layer receive rewards for block proposals and attestation along with participation in sync committees and reporting any violation of the proof -of-stake rules . The rewards received by the validator above 32 ETH does not increase the weight of the validator in the consensus layer and is withdrawn automatically every few days as reward payment. The rewards are credited to the validator’s payout address at regular intervals and as these are initiated at the consensus layer , no gas is required for such payout transactions . The receipt of a staking reward by a validator would be a taxable event in most tax jurisdictions as it results in accession of wealth over which the validators have complete dominion. However, their tax treatment depends largely upon whether a jurisdiction considers the reward as a passive income for 85 https://dune.com/hildobby/eth2 -staking 4 ETH LIDO Deposit 4 stETH DeFi 59 the stake deposited in the deposit contract by the validators or as an active self -employment income . The treatment would also be contingent upon the rewards being accrued because of solo staking or staking through a staking pool . To classify the income from staking as active or passive income it is important to understand the nature of relationship between: i) The Ethereum consensus layer and the Solo staking validator ii) The Ethereum consensus layer and the staking pool validator iii) The staking pool and person/entity contributing ETH to the staking pool and/or running a pool node. The solo and staking pool validators are assigned with specific duties and tasks of proposing and attesting blocks on the blockchain . They agree to the rules of the consensus layer protocol and receive regular rewards for performance of assigned duties. Moreover, they are also subject to penalties for downtime and malicious behaviour. Also, the rewards received cannot be considered a compensation for the use or forbearance of money. Thus, the solo validators can be subject to self -employment taxes in some jurisdictions and the associated social security con tributions . Some jurisdictions may consider the fact that as staking involves little or no effort and can be earned without the active involvement of the person or entity, and tax it as a passive income akin to interes t. The staking pool validators, being involved in the business of staking would be treated correspondingly. The taxpayers earning income by contributing ETH to a staking pool cannot be considered to be self - employed as instead of the contributors , the staking pool /pool node operator is assigned with specific duties and tasks of proposing and attesting blocks on the blockchain and is also subject to penalties for downtime and malicious behaviour. The rewards accrue to them on the Ethereum execution layer through the staking pool instead of the consensus layer . Thus , they may not be subject to self - employment taxes and the corresponding social security contributions. The accrual and/or ‘disposal’ of the rewards would be a taxable event in most tax jurisdictions and attract income tax or a capital gain s tax. If the validators are engaged in the business of providing validation services on a commercial scale, the income might be taxed as business income. The fair market value of the rewards at the time of accrual would be the basis for calculation of the capital gain s tax . In this ecosystem, the staking pool s are also likely to accrue income as an entity, which usually exists as a Decentralized Autonomous Organization. For example , LIDO which is the leading staking pool on Ethereum operates as a Decentralized A utonomous Organization. The tax issues related to such entities are discussed in subsequent sections . 7.1.4.2 Indirect Taxes related to Proof -of-Stake based consensus in Ethereum The validators, staking pool s, the individuals/entities that contribute to the staking pool s and Ethereum users involved in providing or receiving services may be subject to indirect taxes depending upon: i) The nature of service provided ii) The place of supply of services iii) The recipient of the services The solo validators and staking pool s are involved in providing validation services to the users carrying out transactions on the Ethereum Blockchain and may be considered to be self -employed. The y essentially provide two kinds of services, those to the users carrying out transactions on the Ethereum Blockchain (for which they get rewarded in the form of transaction fee) and to the Ethereum consensus layer for finalizing blocks (for which they get rewarded in the form of newly issued ETH) . 60 For the transaction validation services to the user, the validators might be subject to GST if the validator is a resident of the jurisdiction same as that of the validator. Services provided by the validator to users in other jurisdictions would constitute an export of services and would be zero rated in most jurisdictions. In case of Ethereum, taxation of services provided by the staking pools or solo stakers to the Ethereum Blockchain itself, for which they receive the issuance reward programmed in the Ethereum Blockchain , would be a complicated issue . In this case also, t he place of supply of such service cannot be determined and the payment for the service may amount to billions of dollars each year. Mechanism like those described in section 2.3.8.1 for collecting indirect taxes on miners and mining pools in Bitcoin can be applied for services of staking pools and solo stakers. In case of other models of staking like using Staking -as-a-Service the services provided by the staking service provider might also be subject to GST depending upon the place of supply and the residency of the staking service provider and the individual/entity staking the ETH. In the case of staking pool s, the commission charged by the pools would also be subject to GST as it is in lieu of a service provided to the depositors. As discussed in the case of mining rewards , only the direct validation services provided to the Ethereum users and the consensus protocol may be considered exempt services as other services would largely qualify as input to validation services. Similar to the treatment of miners providing services to users in other jurisdictions, the validators providing zero -rated services might be entitled to refunds for the input taxes paid for exporting the service. 7.1.4.3 Taxes on MEV rewards on Ethereum As described above the users broadcast their transactions on the Ethereum Blockchain into a ‘mempool’ and the validators which are supposed to propose blocks in a slot bundle the transactions into a ‘Block’. As all the mempool transactions are visible to everyone , the validators can also come to know about potential arbitrage opportunities on various DeFi applications. This can enable the validators to ‘front run ’ such transactions to extract a profit by altering the order of transactions. This is known as M aximal Extractable Value on the Ethereum Blockchain and acts as an ‘invisible tax’ on Ethereum users and lead s to imperfect markets. The role and taxation of MEV Ecosystem on the Ethereum Blockchain is described subsequent to the section on DeFi as the readers can better appreciate the mechanism through which value is extracted by validators and other actors by reordering DeFi transactions. 7.2 Smart Contract s Smart contracts are agreements written in code which are automatically executed by the Ethereum Blockchain when certain conditions are met. For example , few individuals might pool Ether in a smart contract for organizing a fair lottery and making a pay -out to the winner without relying on any central authority for trust and fairness. Another analogy is that of a vending machine which delivers the desired product and the residual amount, if any. It follows a specific algorithm for delivering the item automatically. These contracts try to eliminate third party risk as once crypto asset s are kept in the custody of the smart contract, they can only be withdrawn or released when the contract conditions are met. The smart contracts contain code which has well defined functions which execute the contract. Invocation of functions can alter th e balance of the contract by depositing or releasing Ether to or from the contract , change the internal contract state like assign a token like Tether (USDT) from one account to another and alter the data stored in the contract. Smart contracts are used to perform important functions in the Ethereum Blockchain like i) Authenticating the identity of the user invoking the transaction with the smart contract ii) Store and update the data intended to be stored by users. For example , ownership information of fungible and non -fungible tokens, maximum supply of a token etc. 61 iii) Provide trust as a third party governed solely by terms of an agreement subjected to public scrutiny by users . iv) Expose functions to be invoked by other contracts The transaction that creates a smart contract is special transaction as it has a special destination address called a zero address . The smart contract s once created cannot be altered ever in the Ethereum Blockchain. Only if a smart contract has a self -destruction function, it could be destroyed earlier , leaving a blank Ethereum account and destruction of the storage and state of that smart contract , but this function has been deprecated in the later releases of Ethereum . From the discussion above it can be seen that a smart contract is essentially code running on the Ethereum Virtual Machine which executes when certain conditions are met. There are multiple viewpoints on the legality and enforceability of a smart contract and many argue that smart contract s are neither smart nor contracts (Durovic, 2021) . Levi & Lipton (2018) argue that smart contract s can be categorized into code -only smart contracts and ancillary smart contract s which are essentially vehicles to effectuate the provisions of the traditional text-based contracts. In commo n law , a contract is a “ an agreement between private parties creating mutual obligations enforceable by law. The basic elements required for the agreement to be a legally enforceable contract are: mutual assent, expressed by a valid offer and acceptance; adequate consideration; capacity; and legality ”86. This definition can be satisfied by ancillary smart contracts . As agreements need not always be in writing to be enforced87, code -only smart contracts might also be enforceable in some jurisdictions. Just like a user using the vending machine sees the price displayed for each item in the display and acts according to the instructions written on the vending machine, he/she gains certain implied rights and a contract is formed without any written terms, conditions and obligations. Levi & Lipton (2018 ) argue that the Uniform Electronic Transactions Act (UETA) in the USA provides for records created by computer programs, and electronic signatures the same legal effect as written documents. UETA states that an Electronic Agent is “capable within the parameters of its programming, of initiating, responding or interacting with other parties or their electronic agents once it has been activated by a party, without further attention of that party,” . The federal Electronic Signatures Recordi ng Act (E -Sign Act) in the US provides that a contract or other record relating to a transaction “may not be denied legal effect, validity, or enforceability solely because its formation, creation, or delivery involved the action of one or more electronic agents so long as the action of any such electronic agent is legally attributable to the person to be bound.”88. Article 9 of the EU Directive on Electronic Commerce 2000 states that “ Member States shall ensure that their legal system allows contracts to be concluded by electronic means. Member States shall in particular ensure that the legal requirements applicable to the contractual process neither create obstacles for the use of elec tronic contracts nor result in such contracts being deprived of legal effectiveness and validity on account of their having been made by electronic means ”. Sates like Arizona89 and Nevada90 have amended their UETA to include blockchain and smart contract s which can have far reaching implications on their legal status and enforceability. However, most of the users who interact with a smart contract would have no means to verify what the code actually does and pre-emptively find out the vulnerabilities if any, this may be treated as a case where the user was unaware of the terms of agreemen t of the contract and the smart contract might not be enforceable. 86 https://www.law.cornell.edu/wex/contract 87 Lumhoo v. Home Depot USA, Inc ., 229 F. Supp. 2d 121, 160 (E.D.N.Y. 2002) 88 15 U.S.C. § 7001(h). 89 https://www.azleg.gov/legtext/53leg/1r/bills/hb2417p.pdf 90 https://www.leg.state.nv.us/nrs/nrs -719.html#NRS719Sec245 62 7.2.1 Issue with code -only smart contracts Code -only smart contracts might also face challenges due to a fundamental issue in Computer Science called the ‘halting problem .’ The halting problem refers to the challenge of determining whether a given computer program, when provided with input, will eventually terminate, or run indefinitely. It is proven to be undecidable, indicating that there is no universal algorithm capable of solving the halting problem for all combinations of programs and inputs. For code -only smart contracts the undecidability of the halting problem poses challenges , as the user of the smart contract has no means to verify the deterministic execution of the smart contract code . If a party engages with a smart contract without understanding its code or implications, it may call into question whether true consent was given . The legality and other aspects of smart contract s are an active area of research and more judicial amendments and court rulings are expected to bring more clarity on the legality and enforceability of smart contract s. This may also have profound implications for tax treatment of various transactions involving smart contracts . To prove that the halting problem is undecidable, we can use a proof by contradiction. We assume that there exists a Turing machine 𝐻 that can decide the halting problem, and then we derive a contradiction. The Halting Problem Let 𝐻 be a Turing machine that decides the halting problem. This means that for any pair of input strings 〈𝑀,𝑤〉 , where 𝑀 is a description of a Turing machine and 𝑤 is an input string for 𝑀, 𝐻 halts and outputs "Accept" if 𝑀 halts on input 𝑤, and it halts and outputs "Reject" otherwise. Now, we construct a new Turing machine 𝐷 with the following behaviour: Given an input string 𝑀 (a description of a Turing machine): 1. Run 𝐻 with input 〈𝑀,𝑀〉. 2. If 𝐻 outputs "Accept," 𝐷 enters an infinite loop. 3. If 𝐻 outputs "Reject," 𝐷 halts. Now, let us consider what happens when we feed 𝐷 its own description 〈𝐷〉: 1. If 𝐷 halts on input 〈𝐷〉, according to its construction, it should enter an infinite loop (step 2). 2. If 𝐷 enters an infinite loop on input 〈𝐷〉, according to its construction, it should halt (step 3). This creates a contradiction. If 𝐷 halts on input 〈𝐷〉, then it should enter an infinite loop according to its construction. If 𝐷 enters an infinite loop on input 〈𝐷〉, then it should halt according to its construction . Thus, our assumption that there exists a Turing machine 𝐻 that decides the halting problem leads to a contradiction. Therefore, the halting problem is undecidable. 63 7.3 Tokens The Collins dictionary defines token as a countable noun. It is defined as “ A token is a piece of paper or card that can be exchanged for goods, either in a particular shop or as part of a special offer ”91. In the context of a blockchain a token represents something similar. But, instead of a piece of paper or card , it is an abstraction created on the blockchain , often through smart contract s to represent assets, equity, collectible, currency etc. It is often confused and used interchangeably with the term coin in the parlance of crypto asset s. Coins are the native assets of blockchain s whereas tokens are abstractions created on top of blockchain s which may or may not represent any underlying asset. For example , Ether and Bitcoin are the native assets of the Ethereum and Bitcoin Blockchain respectively whereas Tether (USDT) is a token created through a smart contract which regulates its supply and pegs it to the US Dollar . In order to in teract with the USDT smart contract the user still has to pay gas in Ether denominated in gwei(10-18 Ether). Smart contracts enable creation of tokens which may represent a wide variety of tangibles and intangibles . There can be different types of tokens like: i) Payment Tokens: These are native assets of the blockchain , also known as coins, which are used for making payments. For example , Ether, Bitcoin and Monero ii) Utility Tokens: These tokens provide access to a specific product or service on the blockchain . For example , the WRX or the WazirX token is used to make payments for transaction fee on the WazirX crypto exchange and sometimes enables users to get a discount on the transaction fee . iii) Security Token: These tokens derive their value from external assets like stocks and bonds. For example , the tZero token which represents tokenized assets like stocks and bonds. iv) Governance Token: These tokens provide voting rights to the holders regarding various proposals for changes in a Decentralized Application or a Decentralized Autonomous Organization. For example , The Maker token (MKR) allows holders to vote on decisions regarding the decentralized lending platform Maker. v) Non -Fungible Tokens: These tokens represent a collectible or something unique which is not interchangeable with any other token. For example , the Bored Ape Yacht Club92 NFTs with each ape being unique. The tokens mentioned in examples above cannot be classified strictly into the categories . There are tokens which have multiple characteristics and can be categorized into more than one category. For example , the MKR token is a utility token in the Maker ecosystem as well as its governance token which can be used for initiating and voting on proposals. It can also be exchanged for other crypto asset s and purchased on crypto exchanges. This makes the regulation of these tokens complicated . As security tokens are essentially tokenized assets like securities and bonds, they are regulated by securities market regulators like the SEC. In some instances, like in case of Ripple ( XRP), the regulators may treat the issued/minted tokens as securities, giving rise to litigation93. From the discussion above it can be observed that there are certain tokens which purportedly represent real underlying assets like real estate, securities, US Dollars and Gold. The transfer of these assets on the blockchain may not mitigate the counterparty risk in a real -world environment. For example , a user on Ethereum Blockchain may have no means to authenticate the ownership of a corporation’s equity for a particular Ethereum address without involving the real -world custodian of listed securities, posing a counter -party risk to the transaction. On the other hand , ownership of tokens like WRX, MKR can be cryptographically proven on the blockchain and their transfer on the blockchain does not involve any counterparty risk. 91 https://www.collinsdictionary.com/dictionary/english/token 92 https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d 93 https://www.sec.gov/news/press -release/2020 -338 64 7.3.1 ERC-20 Token Standard The ERC -20 is an Ethereum Blockchain standard for fungible tokens. Many tokens are based on the ERC-20 standard. An ERC -20 token smart contract should have some mandatory functions like those for defining the total supply of tokens, transfer of tokens from one account to another, functions authorizing certain accounts to transfer tokens from authorizing accounts etc . Some examples of popular ERC -20 tokens are USDT, DAI and MKR which are discussed in detail in later sections . Anyone can create their own ERC -20 token . However , to make the token popular and widely acceptable , bootstrapping through incentives like ICOs and airdrop s is required , which may be taxable events for the users as well as creators. The USDT is a so -called stablecoin that is told to be pegged to the US Dollar. It is an asset backed ERC - 20 token which enables the owner to exchange 1 USDT for 1 USD. The total supply of the USDT tokens on Ethereum is controlled using the USDT smart contract on the Ethereum Blockchain (Fig. 35) . Whenever a request for exchanging a Dollar with USDT is made, the smart contract issues new USDT tokens to the Ethereum account with corresponding addition on the asset side. On the other hand, when a user converts USDT to USD or an equivalent asset, USDT tokens are burnt and equivalent asset s held are released. As the so -called stablecoin is pegged to USD it can be used to buy or sell other crypto asset s using a dollar -pegged stablecoin. Fig. 35 Issuance and burning of token s 7.4 Non -Fungible Tokens Non -Fungible Tokens represent unique and non -interchangeable assets on a blockchain . The ownership of an NFT is usually established on the blockchain through a smart contract . The purported underlying asset in an N FT can be anything ranging from a piece of art, an antique piece, real -estate, music etc. Some of the famous NFT sales like the NFT of the first tweet by Jack Dorsey and the “Everydays - The First 5000 Days ” NFT by Beeple created lot of buzz and increased the interest in NFTs. NFTs are enabling content creators and sellers of unique non -fungible items or assets to connect directly with the users. NF Ts are an integral component of various metaverse s where a lot of e - Commerce takes place through NFTs. For example , unique land parcels in metaverse s like Decentraland are essentially NFTs which can be bought or sold in the metaverse using crypto asset s. The non-fungible nature of NFTs gives them value , in case of crypto asset s like Ether , every Ether denomination is same and completely fungible. On the other hand, NFTs like the NFT of the first tweet by Jack Dorsey are unique . ERC-721 is the token standard for Non -Fungible Tokens on Ethereum. Although, there are other blockchain s like Solana which also have a rapidly developing NFT and smart contract ecosystem. In an ERC-721 smart contract the unique NFTs are assigned Token IDs . The process of establishing the ownership of representation of a unique item on the blockchain is known as Minting. The unique 65 attributes of the item are recorded on the blockchain in the smart contract , which assigns a unique tokenID to the item. As the collectibles/artworks are often very large files, the metadata describing the unique collectible and the URL of the actual artwork is provided in the URI (Uniform Resource Identifier) field in the smart contract. This highlights an important fact regarding many NFTs which represent digital artwork that the NFTs usually only store a pointer URI to the URL of the artwork and no art itself on the blockchain . Users can write their own smart contract to mint NFTs, however, many platforms like OpenSea and Rarible provide services to create smart contracts and mint NFTs for a fee. Let us try to understand the ERC -721 framework using the famous Bored Ape Yacht Club collection on the Ethereum Blockchain. On visiting the website of Bored Ape Yacht Club on OpenSea94 we find many unique images of bored apes. To understand how the ownership of these NFTs is recorded and transferred on the blockchain we can click any NFT to find out its current owner’s account address, the address of the smart contract and the TokenID of the NFT . The smart contract holds the information regarding the NFTs and maintains the record of its ownership for each token ID (Unique collectible). The smart contract of Bored Ape Yacht Club on EtherScan can be used to find owner account addresses of each NFT, their URIs as well as ownership history. The transaction history of the smart contract can be seen and if a user goes to the first few transactions, he/she can see the transactions that minted the BAYC NFTs . The transaction for minting a TokenID associates the TokenID and other information like the URI (containing the description of the artwork along with the URL of the artwork ), with an Ethereum account in the BAYC smart contract . To find where the metadata of the NFT image is stored on the Ethereum Blockchain one can query the smart contract on Etherscan by using the Read Contract Tab on the Contract stub95. One can find the following important functions in the smart contract which can be queried to read data without paying any gas on the Ethereum Blockchain. They are listed as below: A) MAX_APES: Defines the maximum number of token s (Unique Apes) that can be minted in this contract. 10000 for BAYC. B) balanceOf: Returns the number of BAYC NFTs owned by an Ethereum address C) ownerOf: It returns the Ethereum address that owns a specific BAYC TokenID D) tokenURI: It takes token ID as the input and returns the Uniform Resource Indicator which is usually a link containing the metadata of the NFT Thus , an ERC721 smart contract essentially keeps a track of the minted NFTs and the accounts that own them . Every time a new NFT is minted, gas must be paid to record the URI, ownership, and other data on the blockchain . While changing the ownership also, gas must be paid to record the change in the smart contract , along with some consideration if it is a sale or without consideration if it is merely a transfer. As discussed earlier, the token URI usually contains the metadata regarding the NFT which might in-turn contain the URL where the actual digital image is stor ed. Querying the tokenURI field for any token ID provides the address: ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/ 17XX as shown in Fig. 36 which is address of data stored in Inter Planetary File System - a peer -ot-peer decentralized storage which stores data based on the hash identifier of the item96. Accessing the metadat a present at the given URI we find a json document which contains the metadata of the NFT as shown in Fig . 37. This is the core of the NFT which lists its characteristics as well as provides the link to the URL of the digital image of the artwork . This URL is a source of potential risk for the 94 https://opensea.io/collection/boredapeyachtclub 95 https://etherscan.io/address/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d#readContract 96 https://ipfs.tech/ 66 NFT as it makes it essentially a pointer to a URL. If the image URL is changed from the unique artwork in a token ID to any random picture, the NFT and the ownership of the image can be altered by a third party hosting the artwork . To mitigate that risk , BAYC uses the IPFS to store the image and metadata. As IPFS is a hash identifier -based peer -to-peer network which ensures that the URI would not change or go offline. Fig. 36 tokenURI of an NFT {"image":"ipfs://QmW2uHxzxDfxGDUroqYkDQRaNuXSb2Vc9zDpCb53J9u1Qa","attributes":[{"trait_ty pe":"Clothes","value":"Leather Jacket"},{"trait_type":"Fur","value":"Golden Brown"},{"trait_type":"H at","value":"Sea Captain's Hat"},{"trait_type":"Eyes","value":"Coins"},{"trait_type":"Mouth","value": "Bored Unshaven Cigarette"},{"trait_type":"Background","value":"Yellow"}]} Angry"},{"trait_type":"B ackground","value":"Yellow"}]} Fig. 37 NFT Metadata Blockchain explorers also provide the transaction history of a particular TokenID since it was minted. For any NFT Token ID the sale and transfer transactions can be seen on the blockchain . The consideration paid in various NFT transactions is also given. However, a relook at the smart contract functions reveals that NFT smart contract s usually have no field for recording the price at which the sale takes place. NFT smart contracts typically do not directly record the price of sale of the NFT within the contract itself. However, they often include functionalities to facilitate the transfer of ownership and may emit events or logs that contain information about the sale, including the price. Also, the owners and intermediate holders of the NFT are merely Ethereum Account addresses which cannot be easily mapped to a real -world identity. When purchasing an NFT, the transaction typically involves two separate components: 1. Transfer of the NFT : This is the actual transfer of ownership of the NFT from the seller's address to the buyer's address . This transfer is recorded on the blockchain and is immutable. Once the transfer is complete, the buyer becomes the new owner of the NFT. 2. Consideration or Payment : This is the payment made by the buyer to the seller in exchange for the NFT. While the transfer of the NFT itself happens on the blockchain , the payment for the NFT usually occurs off -chain. Buyers and sellers typically arrange payment separately from the blockchain transaction using traditional payment methods such as credit cards, bank transfers, or crypto asset transfers . This hinders a taxman to find out the income and capital gains accrued to various holders of the NFT (Fig. 38) . However, NFT marketplaces like OpenSea in their privacy policy97 state that they capture the email address, first name, last name as well as the blockchain address and IP address along with mobile device IDs. These can be used by tax administrations and law enforcement to map NFT owner account 97 https://opensea.io/privacy 67 addresses to natural or juridical persons in tax fraud and money laundering cases . The valuation of NFTs just like any other piece of art can be complex and subjective. NFTs can be wash traded to artificially enhance their prices and laundering money. Various popular NFT marketplaces presently do not capture any KYC information for trading and minting NFTs. This enhances the risk of tax evasion and money laundering in NFTs. The Royal United Services Institute (RUSI) in the UK has published a report98 that assesses the money laundering risk in NFT marketplaces. The U.S. Department of the Treasury has also published a study99 on the facilitation of money laundering and the financing of terrorism through the trade in works of high -value art . It finds that emerging digital art forms like NFTs present new money laundering and terror financing risks. The blockchain analytics firm Chainalysis identified 262 users who ha d sold an NFT to a self - financed address more than 25 times100. Another important feature of NFTs is that the creators can earn royalty income from the subsequent sale of the NFT. While minting the NFTs on platforms like OpenSea, the creators can specify the percentage of royalty to be paid for every subsequent sale of the NFT. However, as can be seen in the most NFT smart contract s, there is no field for specifying the royalty percentage. Thus, this specification of royalty is enforceable only when the sale of the NFT takes place on the specific platform. If the NFT is sold on some other platform or through a direct smart contract interaction, the NFT may be transferred without any royalty payment as the royalty specification and payment is not in-built into the NFT smart contract . As multiple marketplaces have multiple royalty payment implementations which may not be compatible, developers have proposed a n NFT Royalty Standard - EIP 2981101 which enables all marketplaces to retrieve royalty payment information for a given NFT and enables marketplace agnostic royalty payments for secondary sales. However, the proposal is not yet implemented and if a marketplace chooses not to implement the proposal, no royalty would be paid automatically for secondary sales. The increase in trading volumes of NFTs has created an ecosystem of Decentralized Finance applications which involve NFT related commercial activity. They enable users to earn passive income besides the royalty income on sales . As NFTs are often unique collectibles , they can be rented out for use by others. For example , a popular and expensive sword or a weapon can be rented by users in an online game or a metaverse . Platforms like reNFT102 provide NFT rental infrastructure for the metaverse . It allows NFT owners to rent their NFTs for a set amount and time after taking certain amount as collateral. There are also protocols which do not transfer the original NFT but issues an expiring wrapped version of the NFT to the borrower. NFTs can also be staked or deposited into smart contracts in lieu of tokens issued by the platform , which can lend the NFT to generate passive income which is shared with the owners of the NFT. The users can also deposit NFTs to get tokens that are composable and fungible at a ratio of 1:1 and can be used to acquire other NFTs or their fractions , on the platform or staked further. Many services pool multiple NFTs and provide a liquid market for their sale and purchase with a floor price for each NFT. 98 https://rusi.org/explore -our-research/publications/commentary/nfts -new -frontier -money -laundering 99 https://home.treasury.gov/system/files/136/Treasury_Study_WoA.pdf 100 https://www.financialexpress.com/digital -currency/wash -trading -and-money -laundering -observed -in-nfts- report/2497965/ 101 https://eips.ethereum.org/EIPS/eip -2981 102 https://www.renft.io/ 68 Fig. 38 NFT transaction history on Ethereum Blockchain explorer 7.4.1 Legal Status of NFTs The basic idea behind NFTs purportedly representing art work, collectibles, real estate etc. is that by owning the NFT on the blockchain one can have property rights in another underlying asset like art or real estate. But what property rights of the underlying asset does the ownership of the NFT automatically transfer to the owner is a matter of debate. The fundamental question is about the property rights that the process of tokenization of a tangible or intangible asset on the blockchain brings with it. Moringiello & Odinet (2022) analysed the legal aspects of tokenization and examined how the token is connected to the underlying asset, if at all , and what does the current legal framework say about it. They argue that NFTs do not have attributes of other token s like negotiable instruments and bills of lading . They also survey dataset of terms of service from the most prominent NFT platforms to explore their legal effects as compared to the claims. token ization is not a new concept in law and economics. Various negotiable instruments, securities and deeds are based on the principle that the tokens represent the ownership rights of some other assets. When a user buys an NFT and the NFT is assigned to the blockchain address controlled by the user on the blockchain , it is believed by many buyers that they acquire the ownership and other associated rights in the underlying artwork or collectible just by virtue of acquiring the NFT. The large amounts invol ved in NFT purchases might prompt a connoisseur of art to assume that the digital work itself has been transferred, whereas the NFT bought by the users essentially contain s metadata and not the image itself. 69 Moreover, anything that can be digitized can be minted into an NFT as the process of minting essentially creates a unique TokenID for that digital work of art and records it into a smart contract in the blockchain . Thus, it is technologically possible to mint a copyrighted item for which the user does not have ownership or the copyright to be minted into an NFT purportedly “owned” by the user. The ownership , reproduction and use of an artwork or collectible in most jurisdictions is govern ed by the copyright law, which may or may not recognize NFTs as a valid deed of transferring the copyright or other rights in the artwork. Thus, it is argued that from a copyright perspective that minting an NFT describing an artwork without authorization might not be clearly a copyright infringement as it can be considered generation of a string of numbers in relation to a work but not reproduction or adaptation of the work itself103. Guadamuz104 (2022) argues that most NFTs do not involve a transfer of rights and in some instances where a user must check a box for transferring rights while minting an NFT , it might not fulfil the requirements of the copyright law of the jurisdiction of the creator of the NFT. He gives the example of Copyright Designs and Patents Act 1988 of UK which requires the copyright agreement “in writing signed by or on behalf of the assignor” . For example , in case of real estate in India the transfer of ownership is governed and effectuated through the Transfer of Property Act. The sale or purchase of any real-world real-estate merely through the transfer of an NFT representing the real-estate would not be recognized as a transfer under the Transfer of Property Act. Moringiello & Odinet (2022) survey ed the terms of service of various leading NFT platforms and found that none of the terms of service provided any clear link between ownership of an NFT and rights in the underlying creative work. One of the terms stated that buyer obtains ownership of “a cryptographic token representing the artist’s creative Work as a piece of property, but” obtains no ownership of the “creative Work itself.” They argue that the only right the owner of the NFT gets by making the purchase is the right to display the NFT. Moringiello & Odinet (2022) reviewed the terms of service of a site SuperWorld which maps the Earth to create virtual land assets which participants can “buy”. The users can buy or sell real estate tokens . The terms of service state that “purchase ” of tokens conveys no rights in the underlying art. The users can monetize the property in SuperWorld. Marinotti105 (2022) argues that a lthough the NFTs used in metaverse s are on the blockchain but the constituents that make the metaverse like land and goods exist on private servers which are stored on secured databases running proprietary code. He argues that the metaverse platforms effectively grant the users only access to the digital assets . As the metaverse NFTs have functional use in the metaverse , blocking access or deleting the NFT from the metaverse for violation of terms of service can significantly affect the utility and financial worth of the NFT. A more detailed and comprehensive discussion about the copyright issues of NFTs ca n be found in an article by James Grimmelmann, Yan Ji, and Tyler Kell106 which also mentions the case of Spice DAO which involved a dispute over ownership and control of a digital art collection on the Ethereum blockchain . Various tax administrations in recent rulings have also clarified the nature of NFTs . The Spanish tax administration in its ruling V0486 -22 on 10th March 2022107 stated the fact that “ the object of the sale is not the illustrations themselves but NFTs, that is, non -fungible tokens that grant the buyer rights of use but in no case the underlying rights to ownership of the work. ”. The Norwegian tax administration 103 https://www.wipo.int/wipo_magazine/en/2021/04/article_0007.html 104 https://www.weforum.org/agenda/2022/02/non -fungible -tokens -nfts-and-copyright/ 105 https://theconversation.com/can -you-truly -own -anything -in-the-metaverse -a-law-professor -explains -how - blockchains -and-nfts-dont -protect -virtual -property -179067 106 https://www.theverge.com/23139793/nft -crypto -copyright -ownership -primer -cornell -ic3 107 https://petete.tributos.hacienda.gob.es/consultas/?num_consulta=V0486 -22 70 in its guidance108 also states that “ An NFT will not normally be considered home contents/movable property in this connection, as the NFT in itself is a digital code and not the actual object it is linked to.” These rulings and clarifications can have consequences for direct and indirect tax treatment of NFTs. One interesting perspective on NFTs is to consider them as vouchers, which can be either single - purpose or multipurpose in nature109. In the context of NFTs, single -purpose vouchers refer to tokens that are designed for a specific utility or use case. Once redeemed or utilized, their purpose is fulfilled, and they may lose their value or become non -transferrable. For example, an NFT representing a ticket to a virtual event provides access to that specific event only. Single -purpose NFTs provide a direct link between the digital asset and its owner, facilitating transparent ownership and provenance tracking. On the other hand, multipurpose vouchers in the realm of NFTs refer to tokens that possess versatile utility across various contexts or platforms. T hese NFTs retain their value and transferability even after redemption, allowing owners to utilize them in different ways or trade them in secondary markets. Multipurpose NFTs may represent a range of assets or rights whose value often depends on factors such as scarcity, demand, and interoperability with different ecosystems. For instance, an NFT representing a virtual land parcel in a metaverse could be utilized for various purposes, such as building virtual structures, hosting events, or generating revenue through in -world activities. Similarly, an NFT representing membershi p in a decentralized governance platform might grant voting rights, access to exclusiv e content, or dividends from platform activities. Treating NFTs as single -purpose or multi -purpose vouchers can have consequences for taxation of NFTs from the perspective of VAT/GST. 7.4.2 ERC 1155 Token Standard A closer look at the ERC -721 smart contract s reveals that an ERC -721 smart contract can be used only to map unique TokenIDs to Ethereum addresses. I t cannot hold ERC -20 tokens along with NFTs (ERC - 721 token s). Also, there are no functions to transfer the NFTs in bulk. All these shortcomings result in payment of huge amount in gas fees while creating and transferring NFTs. Moreover, there are use cases where more than one copy of a collectible like a weapon or outfit in an online game might be required along with the native ERC -20 token of the game. The ERC 1155 token standard solves this problem and enables the smart contract to hold fungible as well non -fungible tokens. ERC-1155 solves th ese problems by assigning TokenIDs to each kind of token(s) held by the smart contract , which also keeps a track of their ownership by mapping them to Ethereum addresses. In case of Non -Fungible Tokens, the respective TokenID is mapped to only one Ethereum address , whereas for an ERC -20 token the TokenID can have many tokens issued whose balances are maintained in th e smart contract. It also enables the creation of multiple copies of a single artwork or collectible which can be minted in limited quantities and assigned to different users (Ethereum Accounts). For example , an online game can have an ERC 1155 smart contract which can hold the native ERC -20 token of the game as well as collectibles like weapons or armour which are assigned different TokenIDs and available in one or more than one quantity. This can be pictorially represented in Fig. 39 108 https://www.skatteetaten.no/en/person/taxes/get -the-taxes -right/shares -and-securities/about -shares - and-securities/digital - currency/nft/#:~:text=The%20taxable%20value%20of%20NFTs,the%20value%20assessment%20upon%20requ est. 109 VALUE ADDED TAX COMMITTEE (ARTICLE 398 OF DIRECTIVE 2006/112/EC) WORKING PAPER NO 1060 71 Fig. 39 ERC 1155 Token Standard (illustration) 7.4.3 Taxation of NFTs NFTs are collectibles and can be considered as blockchain representation of various art forms like paintings, music, videos etc. They may also be tokens created purely for acting as tokens for a specific purpose like entry into a concert or represent the position of a liquidity provider in a liquidity pool . The first potential taxable event is the creation or ‘Minting’ of the NFT. The creation of the NFT usually involves recording the metadata and URI of the artwork on the blockchain . As this does not lead to accrual of any income and is merely a process for recording information about the artwork on the blockchain it might not be taxed in most jurisdictions. However, only a few jurisdictions have issued guidance related to taxation of NFTs. The Norwegian tax administration in its guideline has clarified that creating an NFT does not trigger taxation110. Also, the transfer of NFT from one account to the other owned by the same person/entity would also not be taxable. The tax treatment of the transactions related to the NFT after minting depend upon the Intellectual Property Rights that get transferred to the purchaser. As discussed above , as buying an NFT does not necessarily transfer all the Intellectual Property Rights associated with the artwork , the first sale of the primary transfer of the NFT may be treated as a license for the purpose of taxation. The secondary and subsequent transactions of the NFT may be treated as a sale as the recipient of the primary transfe r would sell all its rights to the recipient of the secondary or subsequent transfer. However , the secondary sale might also require payment of royalty to the owner of the underlying artwork and might also involve issues related to amortization of the basis by the taxpayer. For the seller making the secondary sale it might attract income tax or capital gains tax depending upon the classification of NFTs by the jurisdictional tax administration and the prescribed rates as well as the nature of activity and the period of holding . For example , in the US NFTs are treated as collectibles and might be subject to higher tax rates. However, the tax treatment would depend on the facts and circumstances of each transfer and the rights relinquished and acquired by the transferor and the transferee respectively. The royalty payments on secondary sales might be subject to withholding taxes in many jurisdictions , depending upon the tax residency of the transfero r. The lack of sale consideration data on the blockchain as well as the limited ability to map Ethereum addresses to Tax Identification Numbers can make it difficult for tax administrations to collect due taxes. Howe ver, as many NFT owners publicly mention their social media handles /IDs it might be possible for tax administrations to o btain the ownership information from such platforms. 110 https://www.skatteetaten.no/en/person/taxes/get -the-taxes -right/shares -and-securities/about -shares - and-securities/digital -currency/nft/ TokenID 1 Total Supply 10000 TokenID 2 Total Supply 1 TokenID 3 Total Supply 10 Address 1: 5000 Address 2: 3000 Address 3: 2000 Address 1 Address 1: 3 Address 2: 2 Address 3: 5 ERC 1155 72 NFT sales can also be subject to GST/VAT in many jurisdictions as it may be considered a taxable supply of services . For example, NFTs would be considered as digital services as per Council Implementing Regulation (EU) No 282/2011 . The individuals or entities involved in trade of NFTs can might be considered ‘taxable person’ for GST/VAT as they carry out an ‘economic activity ’ with direct nexus between the supply of service and the consideration. Even NFTs minted for functional purposes like for entry into concerts and restaurants might also be subject to GST/VAT in many jurisdictions depending upon their classification as a voucher, with possible exemptions up to a certain limit. The services offered by various NFT marketplaces for minting and sale of NFTs may also be subject to GST/VAT depending upon the tax residency of the clients. The royalty payments related to NFTs may also be subject to GST /VAT in various jurisdictions as royalties are considered as licensing services in many jurisdictions. GST/VAT liability on royalties received may depend on whether they pertain to the right o f using the NFT or the right to resell the NFT. The issues and tax treatment related to place of supply, claiming input tax credit and exemption of supplies made to residents in foreign jurisdictions would be similar to the issues related to taxation of Bitcoin Mining activities. Some tax administrations have already issued rulings and guidance that clarify the tax treatment of NFTs. The Spanish tax administration has clarified that the NFT sales are electronically supplied services and will be subject to VAT , depending on the place of supply111. The Belgian tax administration has also clarified that the NFT sale is to be regarded as a service provided by electronic means. If the supply of NFTs is deemed to take place in Belgium standard VAT rates would apply112. A striking feature of such rulings and guidance is the presumption of place of supply to exist somewhere in the real world, where a destination tax administration can collect the VAT/GST due. However, the supply of such services in virtual worlds like a metaverse raise fundamental questions regarding the taxability and tax treatment of such transactions. One such example is the judgement of the German Federal Finance Court in a case involving the online platform ‘Second Life’ where the court overruled the judgement of the Col ogne Finance Court and concluded that such transactions in virtual world do not constitute participation in economic activity in the real world and are outside the scope of VAT/GST113. Despite these uncertainties and issues, i t is worth mentioning that t he market cap of NFTs is approximately 4 billion USD with all time sales volumes of around 137 billion USD114 which makes it difficult for tax administrations to overlook the revenues associated with NFTs 8. Decentralized Finance The financial system performs a critical job of financial intermediation and enables the flow of capital from lenders to borrowers . Similarly, in the domain of crypto asset s using platforms like centralized crypto exchange s or decentralized platforms using smart contract s, such financial intermediation is possible. The smart contract ecosystem enables the automation of deposit, disbursal , lending and repayment of funds. This has created an entire ecosystem of financial services which operate on the blockchain , called DeFi or Decentralized Finance. DeFi enables enormous opportunities of financial innovation using crypto asset s and smart contract s. At the same time, it also poses new challenges to tax administrations and law enforc ement agencies as lack of KYC norms and regulatory oversight can enable tax evasion and money laundering. The wide variety of applications and products offered by DeFi warrant a separate paper to describe the mechanics as well as the taxation aspects of this ecosystem, which are not very clear and well understood today. However, this paper discusses two promin ent DeFi platforms MakerDAO and UniSwap which account for a significant portion of assets locked up in DeFi applications. 111 https://petete.tributos.hacienda.gob.es/consultas/?num_consulta=V0486 -22 112 https://www.dekamer.be/QRVA/pdf/55/55K0073.pdf - page 11 4 113 https://www.justiz.nrw.de/nrwe/fgs/koeln/j2019/8_K_1565_18_Urteil_20190813.html 114 https://coinmarketcap.com/nft/ 73 8.1 MakerDAO MakerDAO is one of the most popular DeFi projects. It is a Decentralized Autonomous Organization that issues and manages two ERC -20 tokens. The first token is known as DAI, which is a crypto - collateralized so called stablecoin soft pegged to the US Dollar , the second token is Maker (MKR) which is used as a governance token of the Maker protocol as well as a utility token for auctioning DAI for MKR and vice versa. In unforeseen situation s it can also be used as a resource for recapitalization and repayment of Maker protocol debt . The MakerDAO is essentially a system of smart contracts running on the Ethereum Blockchain that manage the supply of DAI and MKR . A system of incentives and other mechanisms enable creation and destruction of DAI as well as its backing with appropriate collateral to maintain its soft peg to the US Dollar using smart contract s. Unlike the so called centralized stablecoins, the collateralization and assets in the MakerDAO ecosystem are publicly available and do not requi re any proof of reserve or audit. A detailed overview of the MakerDAO is available in the whitepaper115. The MakerDAO can be considered a digital vault system which gives a DAI denominated loan to users which lock -up their E ther or other authorized crypto assets into a smart contract , which is called a Collateralized Debt Position (CDP). This is the mechanism that generates DAI as shown in Fig. 40. The DAI loan accrues interest denominated in DAI which is called the ‘stability fees’ in the Maker protocol. When the DAI loan is returned along with the stability fee by the borrower, the retuned DAI is burnt , the stability fees go to the surplus smart contract account and the collateralized assets are released (Fig. 41) . Fig. 40 Collateralized Debt Position Fig. 41 Repayment of DAI loan This system is analogous to a mortgage in the traditional financial system. One of the key differences is that the collateralized crypto asset s like E TH and Basic Attention Token (BAT) are much more volatile than the assets mortgaged in traditional finance. Thus, MakerDAO users need to overcollateralize the DAI loans by at least 150% for E TH which can be higher (>175%) for some other crypto assets like BAT. This facilitates the stability of the protocol as well as the peg of DAI to the USD , as even if the value of CDP reduces, the Maker protocol would still be able to discharge the liability of issued DAI. If the CDP value falls below the threshold, t he protocol enables three scenarios: i) The borrower deposits more collateral to the CDP. ii) The borrower repays some of the DAI debt. 115 https://makerdao.com/en/whitepaper/ 4 ETH 4 ETH= 6000 DAI 4000 DAI Stability Fee 4 ETH 4 ETH= 6000 DAI 4000 DAI Stability Fee 90 DAI 4000 DAI 90 DAI Surplus 74 iii) The protocol opens the CDP for auction by keepers wh ich liquidate the CDP. The MKR token is the governance token of the Maker protocol which enables the holders to vote on proposals as well as initiate proposals for changes in the protocol. The parameters like stability fee, the crypto assets to be taken as collateral , as well as their collateralization ratios are decided through voting, with each MKR token holder entitled to one vote. If due to an extreme event the protocol accrues a debt, the governance mechanism decides through voting to issue new MKR tokens for recapitalizatio n. This is very similar to a situation in traditional finance where new equity is issued to infuse capital in a sick enterprise . It is also noteworthy that apart from the Maker protocol DAI and MKR can also be bought and sold on various crypto exchange s. In order to incentivise people to hold DAI rather than selling it and to stabilize its value in the open market, t he Maker protocol also enables the DAI borrowers to deposit the borrowed DAI into smart contracts that yield returns at the rate of the DAI savings rate . The DAI savings rate is also determined by the governance ecosystem of MakerDAO. Just like in ordinary finance where the lending rate is higher than the savings rate, the stability fee is always higher than the DAI savings rate. Besides this, the borrowers of DAI can use it to earn passive income on other DeFi applications or create further leveraged positions. The DAI stability fee, savings rate and the collateralization ratio are like instruments in the armour of a central bank which can affect the demand and supply of DAI resulting in movement of price of DAI in the desired direction as compared to the US Dollar . Various external actors also play an important role in the Maker protocol operations. They play a critical role in maintaining the peg against the US Dollar. The main external actors in the Maker protocol are: i) Keepers: They are independent actors which take advantage of arbitrage opportunities which help DAI to move towards the target price of 1 USD. They participate in Surplus Auctions, Debt Auctions, and Collateral Auctions which help to maintain sufficient reserves against the issued DAI in the protocol. Keeper s are usually bots operated by natural or legal persons. ii) Oracles: As the blockchain s cannot access any off-chain information like asset prices of assets locked in CDPs or the price of DAI, oracles deliver price information about the assets locked in CDPs in order to enable the protocol to know when to trigger a liquidation. iii) Emergency Oracles: They are the oracle s selected by Maker governance as last line of defence against Maker governance or oracle s. They are authorized by Maker governance to freeze oracle s and trigger an emergency shutdown in an unforeseen situation. iv) DAO Teams : These are individuals and service providers who are authorized by Maker governance to provide services to MakerDAO. Keepers play an important role in maintain ing the peg of DAI to the US Dollar as they participate in various auctions like the Surplus Auctions, Debt Auctions, and Collateral Auctions . The various auctions in the MakerDAO ecosystem and their role in the protocol is as follows: i) Surplus Auctions : The DAI loans with accrued stability fee denominated in DAI is repaid back to the CDP smart contract . Once the DAI principal along with the stability fee is repaid, the collateralized assets are released. The excess DAI obtained from the stability fee goes to a smart contract which accumulates it to a level determined by the Maker governance , after which an auction for the surplus DAI to be converted to MKR can be triggered by a keeper and the MKR tokens obtained consequent to the auction are burnt. 75 ii) Debt Auctions : It is possible in certain cases that in situations where the value of the collateralized asset collapses rapidly, the liquidations might not be able to repay the entire collateralized assets and the protocol may incur debt. When this debt crosses a certain threshold determined by the Maker governance , an auction can be triggered by a keeper to recapitalize the protocol by auctioning off MKR for a fixed number of DAI. iii) Collateral Auctions : These auctions are triggered to recover debt in liquidated vaults . When the collateral position in a CDP vault drops below the specified liquidation ratio the vault becomes available for liquidation . The keeper bots liquidate the vaults by sending transactions which trigger an auction of the assets locked in the vault . It is important to note that as the liquidation transactions can only originate from an externally owned account on Ethereum , the Maker protocol cannot automatically trigger the collateral auctions and relies on keepers for the same. The amount of DAI recovered by the auction is used to repay the debt and the remaining collateral is returned to the user after deduction of a penalty fee. The keeper gets a fee for the transaction as an incentive to keep a watch on vault s that can be liquidated. The MakerDAO users and owners of MKR and DAI do not undergo any KYC procedure to determine their tax residency or for identification of the beneficial owner ship of the assets, this gives rise to a complex scenario where a number of individuals or entities come together to transact on a decentralized lending platform which also issues a so -called stable coin and maintains its peg to the US Dollar. The individuals or entities also participate in the governance of the Maker Decentralized Autonomous Organizatio n and take decisions which have financial implications for the protocol and the holders of MKR token themselves. The tax implications of transactions in such ecosystems can be very complex and due to unforeseen and trans -national nature of such organizations there is virtually no guidance available for taxation of the truly Decentralized Autonomous Organization s which do not have a well -defined legal identity . Although, the individual transactions are still governed by the tax guidelines and laws of the respective jurisdictions of the members and users of the Decentralized Autonomous Organization ’s platforms/proto cols. The taxation of such Decentralized Autonomous Organizations is discussed in the subsequent sections. 8.2 Uniswap Uniswap is one of the most popular Decentralized Finance projects and one of the biggest decentralized exchanges built on the Ethereum Blockchain which is censorship resistant, non -custodial and trustless. It enables users to swap one ERC -20 token for another for a fee, without presence of market makers116 who are individuals or entities . Unlike the traditional order -book based exchanges there is no single authority like WazirX and Binance which matches buy and sell orders on Uniswap . The trades are executed against on -chain liquidity pools which pool the crypto asset s provided by all the liquidity providers, unlike individual orders by individual market makers in a traditional centralized exchange. In Uniswap, unlike a traditional centralized crypto or securit ies exchange , a counter -party is not required to execute a trade. Instead, an automated market maker facilitates every trade according to the supply and demand of the ERC -20 token s. This can be considered to be analogous to barter trad ing in crypto tokens . There are two possible models in crypto exchanges, the first one is a centralized model which enables users to buy and sell their crypto asset s for fiat currency and vice versa after undergoing a KYC process. The second model is that of an entirely decentralized exchange which can 116 https://en.wikipedia.org/wiki/Market_maker 76 deal only in crypto asset s and facilitates the exchange of one crypto asset for another purely on the basis of barter, without the involvement of any fiat currency or KYC procedures . Analogous to the first case if an individual who has only Rubies wants to have some Emeralds which he/she does not possess , he/she would either have to find someone who is willing to exchange his/her Rubies for Emerald (s) which would be extremely difficult . It would also be difficult to find out how many Rubies are a fair deal for one Emerald and vice versa. The individual would instead try to find an exchange where he/she can exchange Rubies for a common medium of exchange like the Indian Rupee or the US Dollar and then exchange it for Emeralds , as depicted in Fig. 42(a) . However, exchanging the Ruby for money would require t he individual to have a bank account and identification proofs for KYC before the individual can undertake the transaction . Also, the exchange would charge the individual a fee for providing this intermediation and liquidity facility both when converting Rubies to fiat currency and subsequently using the fiat currency for buying Emeralds . This is analogous to the mechanism of trading in centralized exchanges with the added disadvantage of crypto asset s being in the custody of the exchange rather than the users. Fig. 42 (a) Exchange based on fiat currency Fig. 42(b) Barter based on Automated Market Maker Analogous to the second case, there can be an automated store like Amazon Go named Unistore which does not deal in fiat currency at all and carries out purely automated barter trades of precious stone pairs like Ruby /Emerald , Emerald /Sapphire , Sapphire /Diamond etc. as depicted in Fig. 42 (b). If we consider the Ruby/Emerald pair in the store, the store has a pool of individuals who own Rubies and Emeralds and wish to earn passive income on their assets . The owners of the Rubies and Emeralds are given an offer by Unistore to deposit equal values of Rubies and Emeralds into the baskets in t he store in order to earn a fixed fee on every Ruby/Emerald swap executed in Unistore . The owners of the Rubies and Emeralds can withdraw their precious stones at their will along with the accumulated fee. The liquidity providers are required to deposit Rubies and Emeralds of equal value (not equal number) in order to maintain the stability of the protocol which is based on an automated market maker (AMM) . Unistore facilitate s its users to anonymously exchange Rubies for Emeralds and vice versa without converting them to fiat currency , in lieu of a small fee which is used to pay the owners of Rubies and Emeralds who decide to pool them into Unistore to provide the liquidity . This enables a user to anonymously walk into the store and exchange Rubies for Emeralds and vice versa through an Automated Market Maker, without any human intervention and questions about identity and jurisdiction. This is achieved through smart contracts which run an Automated Market Maker that decide s the price for each Emerald exchanged in lieu of a Ruby and vice versa. 77 Uniswap uses a constant product market maker which can be mathematically represented as (1) where 𝑄𝑅𝑢𝑏𝑦 is the quantity of Rubies in the pool and 𝑄𝐸𝑚𝑒𝑟𝑎𝑙𝑑 is the quantity of Emeralds in the pool and K is a constant. 𝑄𝑅𝑢𝑏𝑦 ×𝑄𝐸𝑚𝑒𝑟𝑎𝑙𝑑 =𝐾 (1) When K=1600 this would result in a curve shown in Fig. 43 Fig. 43 Constant product market maker of Unistore where K=1600 For example , if a user swaps their Ruby for an Emerald when there are 40 Rub ies and 40 Emeralds in the pool already, the supply of Ruby would increase and that of Emerald would decrease , thus the price of Ruby would go down and the user would get a smaller number of Emeralds for every subsequent Ruby swapped for an Emerald. Such fluctuations give rise to arbitrage opportunities which are used by rational actors in the DeFi ecosystem to carry out trades which move the exchange rate towards equilibrium levels . This also gives rise to opportunities for validators to earn income over and above the transaction fee and issuance and is known as Maximal Extractible Value (MEV). The operation of the Automated Market Maker is purely algorithmic without the need for any counter - party’s presence to facilitate individual transaction s. Theoretically it can provide infinite liquidity with exchange rates of tokens rising asymptotically. A transaction would be available even for the last available Emerald for an infinite number of Rubies . Uniswap is identical to a Unistore trading in ERC - 20 token pairs instead of precious stone pairs. However, in Uniswap V3 the liquidity providers can choose the range on the curve for which they wish to provide liquidity , resulting in much greater market depth. This results in each liquidity provider providing a unique position on the liquidity curve. Therefore, these positions cannot be represented by ERC -20 LP tokens and are instead minted in the form of LP NFTs which specify the ownership of the corresponding liquidity position on the bonding curve of the Automated Market Maker as shown in Fig. 44. It can also be seen from the curve in Fig. 43 that every trade would result in a change in price for every unit of the ERC -20 token bought, this is known as slippage. Hence, large trades executed in pools with low liquidity can result in significant price fluctuations when the trade is actually executed on chain . This is one of the main reasons why validators who have visibility of such transactions might reorder such transactions to benefit from such variations . The value derived by such reordering is called Maximal Extractible Value (MEV) and provides additional revenue to the validators. The t axable events triggered in the MEV ecosystem are discussed in the subsequent section s. 𝑄𝑅𝑢𝑏𝑦 =𝑥; 𝑄𝐸𝑚𝑒𝑟𝑎𝑙𝑑 =𝑦 78 Fig. 44 A Uniswap LP NFT In order to maintain and incentivize liquidity and pooling of tokens, Uniswap provides the users who pool their tokens (known as liquidity provider s) with LP tokens which can be used by them to earn passive income in the form of share of the transaction fee of charge by Uniswap . Uniswap V2 charged a flat fee of 0.3% for all the swap transactions117. However, Uniswap V3 has a fee structure of 0.05%, 0.3% and 1% depending on the token being exchanged118. The users pooling their assets are given a percentage of LP tokens or LP NFTs that represent the liquidity reserve which accumulates the liquidity fee, when the users decide to stop providing their assets for liquidity, they redeem the LP tokens or LP NFTs to get their share of the liquidity reserve. The LP tokens or NFTs are burnt consequently. This mechanism is the main source of liquidity for decentralized exchanges like Uniswap. However, the conversion of the crypto asset pair into LP tokens/LP NFTs and vice versa might be considered a ‘disposal’ in many tax jurisdictions. In this process, the project itself does not receive any income , as all the fee is given to the liquidity provider s. It is noteworthy that LP tokens are also ERC -20 tokens which can also be used by liquidity provider s to earn passive income on other DeFi platforms. However, providing liquidity has its own risks with a possibility of divergence loss which is caused due to the change in price of assets locked in the Liquidity Pool smart contract. A divergence loss is also known as an impermanent loss, it is s aid to have occurred when the current price of the tokens pooled into the liquidity pool changes relative to the price when the tokens were deposited. A detailed explanation can be found here119. Both upward and downward movement of relative price of assets causes divergence loss. Mathematically deriving from (1) it can be expressed in terms of the price ratio 𝑝 as given below and the plot of (2) is shown in Fig. 45. 𝐷𝑖𝑣𝑒𝑟𝑔𝑒𝑛𝑐𝑒 𝐿𝑜𝑠𝑠 =2√𝑝 1+𝑝−1 (2) 117 https://docs.uniswap.org/contracts/v2/concepts/advanced -topics/fees 118 https://docs.uniswap.org/concepts/protocol/fees 119 https://pintail.medium.com/uniswap -a-good -deal -for-liquidity -providers -104c0b6816f2 79 Where 𝑝 is the ratio of the price of assets currently to the price at the time of depositing. However, despite the possibility of a divergence loss users pool their assets in liquidity pools as fees from liquidity mining offsets the divergence losses. Fig. 45 Divergence loss The users can list any ERC -20 token pair for swapping on the exchange, As on March 2024 there were 2056 token pairs listed on Uniswap120. The percentage of transaction fee to be charged is determined using the governance mechanism of Uniswap wherein each holder of the governance token UNI can initiate proposals for change and cast their votes on proposed changes. This makes Uniswap a Decentralized Autonomous Organization like the MakerDAO where no single ‘person’ owns the entity and it exists in a truly decentralized manner . Although, Uniswap has recently establish ed an NPO – the Uniswap Foundation121, a real -world legal entity which support s decentralized growth and long -term sustainability of Uniswap. Such Decentralized Autonomous Organizations pose various unique tax and legal challenges which are discussed in the subsequent section s. The market ‘ depth ’ in decentralized exchanges like Uniswap is obtained by having large pools of asset pairs which are liquidity pools and this facilitation of swap transactions in lie u of fee is known as liquidity mining . In Uniswap V 2.0 the liquidity providers had to deposit equal value of both the ERC - 20 tokens in the liquidity pool , a condition which has been relaxed in Uniswap V3 . For example , if the value of 3 BAT is same as 1 DAI then the liquidity miner would have to deposit 300 BAT and 100 DAI in the BAT/DAI liquid ity pool. It is worth noting that the crypto asset s being swapped in Uniswap are also available for open market trading on other platforms. Just as it would be possible for users of Unistore to utilize an arbitrage opportunity where the swapping ratio of the Ruby/Emerald pair is higher or lower than the ir open market price ratio , the crypto asset pairs like DAI/BAT or ETH/DAI having different price ratios than those prevailing in other exchanges would give arbitrageur s an opportunity to earn profit . This facilitates the maintenance of liquidity and price ratios close to the market price ratios in Uniswap liquidity pools. 120 https://www.coingecko.com/en/exchanges/uniswap#:~:text=Uniswap%20(v3)%20is%20a%20decentralized,pa irs%20available%20on%20the%20exchange . 121 https://www.uniswapfoundation.org/ 80 8.3 Taxable events in DeFi ecosystem The market cap of DeFi crypto market is ~ 138 billion USD122. The number of DeFi users ha d increased to ~7.5 million in late 2021 and has declined since123. Many DeFi transactions result in accrual or realization of income to the depositors, borrowers , DeFi protocols and other actors and service providers in the DeFi ecosystem. As the income received or accrued along with the associated services might be taxable , it is important to unde rstand the tax implications of various DeFi transactions . Some of the direct and indirect tax events in the DeFi ecosystem and their potential tax treatments are given below. This list is not exhaustive and the treatment of the events below mentioned might be significantly different in different jurisdictions124. 8.3.1 Direct Taxes in DeFi ecosystem The tax treatment of deposit ing crypto asset s into a DeFi protocol smart contract and their locking up into a Collateralized Debt Position (CDP) would largely depend on the treatment of locking up of crypto asset s into a Collateralized Debt Position (CDP) as ‘disposal .’ As the protocol can allow the CDP to be auction ed by keepers to liquidate the CDP, some tax administrations might take a view that this is tantamount to the transfer of beneficial ownership , thus making the creation of a CDP a ‘disposal’ of the underlying crypto asset . Some tax admini strations might treat the CDP as a kind of escrow account which does not lead to transfer of beneficial ownership and hence may not be considered a taxable event. To understand the instance of transfer of beneficial ownership of the crypto asset s locked in the CDP it would be worthwhile to delve deeper into the mechanism of a Collateral Auction in the MakerDAO protocol. A closer look at the documentation of the liquidation module of MakerDAO125 reveals that a liquidation is triggered when a keeper detects a CDP that is below the liquidation ratio and triggers a liquidation by calling the Dog.bark function126 . Thus, it can be inferred that the beneficial ownership of the CDP remains with the borrower till the value of assets in the CDP falls below the liquidation ratio and a liquidation is triggered by a keeper. The issuance and disbursal of the loan amount in any other crypto asset in lieu of a CDP might also be taxable for the DeFi platform, but without any tax implications for the DeFi platform user . This might lead to issues of tax neutrality a nd taxation of such activities being inconsistent with their economic rationale and may also increase the administrative and compliance burden on users . Such transactions are very similar to repo transactions as they do not lead to transfer of all economic rights . Thus , some jurisdictions might consider including such transactions in the repo rules or create new rules for treating such sale and repurchase transactions as loans. This makes their tax treatment in sync with their economic rationale. Some liquidity pools issue tokens to liquidity providers which give them a right to exchange the issued tokens for the original crypto asset pair deposited by the liquidity providers at the time of repayment. This arrangement may be considered as disposal by some tax administrations and subject to capital gain s. However, such transactions are also like repo transactions and some jurisdictions might consider including such transactions in the repo rules or create new rules for treating such sale and repurchase transactions in line with their economic rationale . Only t he HMRC has issued guidance on 122 Top DeFi Tokens by Market Capitalization | CoinMarketCap 123 https://www.statista.com/statistics/1297745/defi -user -number/ 124 Currently as there are no generally accepted definitions of DeFi which are used or accepted by tax administrations, the terms used below might not have the same meaning as used in regulatory or statutory parlance. 125 https://docs.makerdao.com/smart -contract -modules/dog -and-clipper -detailed -documentation 126 https://github.com/makerdao/dss/blob/liq -2.0/src/dog.sol 81 such liquidity pools and has also done a public consultation to try to sync the tax treatment of such transactions with their economic rationale. The interest paid by the borrower to the DeFi application, like the stability fee in case of MakerDAO may constitute taxable income in the form of interest for the application (after deducting the interest paid by the application to the borrowers) and might require withholding taxes by the borrower depending upon the legal residency of the DeFi application. The stability fee might be deductible as an expense for the borrower if the DAI is used as an investment or for trading. Actions like auctioning of the accumulated stability fee might also give rise to income for the DeFi application due to changes in the value of DAI with respect to MKR, even though the MKR acquired because of the surplus auction is eventually burnt. The deposits made by borrowers in the MakerDAO smart contract for earning income at the DAI savings rate might also constitute ordinary income and taxable at the fair market value of the return in DAI when it is received. In this case, the DeFi application might be required to withhold taxes based on the tax residency of the borrower. B esides this, any further leveraging of the borrowed DAI or MKR and any income therefrom or any capital gains arising on disposal may also be taxable as income and capital gai ns respectively and may also have associated withholding requirements. However, some jurisdictions to reduce the administrative and compliance burden might consider taxing the net income or capital gains accruing due to such leveraging. In case the governance of the application decides to recapitalize the protocol through a mechanism like Debt Auction in MakerDAO, the conversion of the issued MKR into DAI might also be taxable for the application. A CDP liquidation by a keeper might also be a taxable event for the borrower as the CDP of the borrower would be ‘disposed’ to repay the DAI loan and the excess ETH will be returned to the borrower after deduction of a penalty. The borrower might be subject to capital gain s tax , the loss or gains would be determined by the basis of the liquidated crypto asset s. The penalty might be allowed by some jurisdictions as a deductible expense if the borrowed DAI was used as an investment or for trading . Any governance tokens issued to the participants of the DeFi application in the form of airdrop s or other wise would be taxed in most jurisdictions as income at the fair market value of the governance token at the time of receipt. Spending, trading or selling the acquired governance tokens might attract capital gains or taxed as business profit depending upon the nature and scale of the activity. The fee charged by decentralized exchange s (DEXs) for swap transactions might also constitute their income. Also, the returns paid by the DEXs to the liquidity providers might also constitute the income of liquidity providers and allowed as an expense for the DeFi application. Any income or capital gains obtained by further leveraging or selling tokens like UNI , LP or NFTs of a DEXs Liquidity Pool might also attract taxes on income and Capital gains respectively. In most of the liquidity pools like Uniswap, the liquidity providers get a fixed number of LP tokens or an LP NFT which represents their share in the liquidity pool which increases in val ue over time. The LP tokens or the NFT can be exchanged for the original tokens al ong with the financial return on the liquidity provided. T his realized gain at the time of withdrawal or sale might be subject to capital gains in most jurisdictions. DeFi applications might also hire teams/individuals to develop certain functionalities or provide services to the DAO like assistance in establishing a foundation for the protocol or developing or fixing software of the application . Such income might be characterized as self -employment income in some jurisdictions and may require deduction of social security contributions and other taxes. Depending upon the tax residency of the individuals hired by the DAO taxes might be required to be withheld. 82 Also, the fee charged or incentives given to various other actors or entities like keeper s and oracle s providing services to the DeFi application , might also be chargeable as income . 8.3.2 Indirect Taxes in DeFi ecosystem Various stakeholders in DeFi ecosystem provide services to the users and other entities for a consideration. For example , Uniswap users need to pay a fee for swapping one crypto asset for another. Keepers also provide the service s of monitoring the collateralization ratios of the CDPs and initiate Dutch auctions when they fall below the liquidation ratio. The keeper triggering the liquidation receives an incentive in the form of a percentage of the collateral auctioned . Oracles perform the service of providing external data to the smart contract s of DeFi platforms and charge a fee for the same. The fee charged by various ent ities in the DeFi ecosystem may also be subject to GST/VAT depending upon the tax residency, registration requirements, thresholds, and place of supply. The LP NFTs minted on UniswapV3 may also be subject to VAT/GST in many jurisdictions. 8.4 Maximal Extractable Value (MEV) on Ethereum Maximal Extractable Value refers to “ the maximum value that can be extracted from block production in excess of the standard block reward and gas fees by including, excluding, and changing the order of transactions in a block. ”127. The nodes on Ethereum have visibility of the transactions in the mempool as transactions are not encrypted . This gives various actors on the Ethereum Blockchain the ability to front -run some transactions and capture lucrative arbitrage and other opportunities like liquidation s. For example, at a certain price ratio in a liquidity pool , if such actors are aware of a transaction that is likely to cause the relative prices of tokens in that liquidity pool to move significantly , they might try to place their own transaction (s) before and/or after the transaction , taking advantage of the prior knowledge about the likely change in relative prices of the tokens in the li quidity pool. In one such transaction128 due to difference in prices of the Ether and DAI between Uniswap and Sushiswap , a user was able to make a profit of 45 ETH in a single transaction. As it is known in advance that a large transaction might cause prices on the decentralized exchange s to move , the user trying to extract MEV can pay much higher gas fee to place the buy and sell transactions before and after the target transaction. Such strategies can cause a ‘tax’ to be levied on the blockchain users due to slippage caused by sandwich trading. As users who want to extract MEV are ready to pay very high gas fees to include transactions extracting MEV , common users have to pay much higher ga s fee with increased network congestion and gas prices. However, not all MEV on blockchain has such undesirable effects. MEV acts as an incentive for actors on the blockchain to keep the prices in various DeFi applications at the general equilibrium price and makes the markets more efficient. As validators decide which transactions are included in the block and in what order, one might conclude that the entire MEV would accrue to the validators. However, exploiting arbitrage and liquidation opportunities requires running specialized algorithms and gaining faster access to the transactions transmitted on the Ethereum network . This requirement is fulfilled by certain specialized actors like builders, searchers, and specialized infrastructure like relays in the Ethereum ecosystem , which play a significant role in MEV extraction. Thus, unlike the traditional method of transactions being sent by users to the mempool over the E thereum network , which are then subsequently included in blocks proposed by validators , is hardly executed in practice. A cursory look at the most recent blocks of the Ethereum blockchain129 highlights that in most of the blocks the fee recipient is not the validator but a ‘builder .’ As the block proposer specifies the address which receives the fee , it can be inferred that the blocks were created by the ‘builders’ which received the fees. 127 Maximal extractable value (MEV) | ethereum.org 128 https://etherscan.io/tx/0x5e1657ef0e9be9bc72efefe59a2528d0d730d478cfc9e6cdd09af9f997bb3ef4 129 https://etherscan.io/blocks 83 To prevent the ir transactions from being front run , the actors in the MEV ecosystem join a mechanism which communicates the transaction bundles prepared by a set of specialized bots called searchers which continuously look out for MEV opportunities on the Ethereum Blockchain. The searchers submit transaction bundles to specialized actors called ‘builders’ wh ich construct most profitable blocks from these transaction bundles and transmit these blocks to validators through secure communication channels called relays. Relays rece ive blocks from builders and forward them to validators, however they can reorder or censor bundles based on their own policies . They also provide an available, reliable , efficient, and fast channel of communication between builders and validators and provides a layer of abstraction and anonymity between them. Flashbots, a popular block space auction platform used by many searchers uses the first-price sealed - bid auction or blind auction mechanism , wherein users can privately communicate their bid transaction order preference without paying for failed bids130. The transactions bundle flow between a searcher and builder is shown in Fig . 46. Fig. 46 T ransactions bundle flow between a searcher and builder131 In the above scenario , the transaction bundles will be sent to the private transaction pool of Flashbots instead of the common mempool of Ethereum nodes , which protects the transactions from front - running. The searchers need to trust block builders as they have full visibility of the transaction s in the bundle and can maliciously front -run the searchers as the builders can also operate searchers themselves . As shown in Fig. 47 a searcher can submit transaction bundles to multiple builders and the builders i n-turn can submit the blocks to various relays which connect them to validators. Fig. 47 Searchers submitting bundles to builders who submit full blocks to relays132 The mechanism of creation of blocks by builders and their transmission securely to the validators through relays creates centraliz ation within the Ethereum ecosystem which can be used for censoring certain transactions by builders and relays . For example , on Nov 21 202 2 it can be seen in Fig. 48 that 130 https://docs.flashbots.net/flashbots -auction/overview 131 https://docs.flashbots.net/assets/images/searcher -architecture -d9a0bd137035304fc54067ce243c32ce.png 132 https://docs.flashbots.net/assets/images/block -builder -flow -0c01103143daeac8b79cc377ff248630.png 84 79% of all Ethereum Blocks were OFAC compliant as MEV Boost, the then dominant off-chain marketplace used by validators for selling block space to builders is OFAC compliant. Fig. 48 Daily OFAC Compliant Blocks on Ethereum (source: https://www.mevwatch.info ) As relays also have full visibility of the transactions they need to be trusted by the builders. Relays do not provide the full block to the validators on request. Instead, the header of the most profitable block is provided to the validator which receives the full block from the relay only upon committing to propose the block by sending the signed block header to the relay , this is depicted in Fig. 49. Fig. 49 Relay selecting the most profitable block and providing validator with the block header followed by the full block133 The validator can be connected to multiple relays and upon receipt of multiple block headers from multiple relays, proposes the most profitable block on the Ethereum Blockchain as shown in the Fig. 50 133 https://docs.flashbots.net/assets/images/relay -flow -8f9aca183eaf4b8213220bc5bd71eb3a.png 85 Fig. 50 Validator proposing the most profitable block on the consensus layer134 The overall communication and auction architecture for block space is shown in Fig. 51 Fig. 51 Overall communication and auction architecture for Ethereum block space135 8.4.1 MEV Supply Chain and its taxation The MEV ecosystem described above facilitates the extraction of MEV on the Ethereum Blockchain with the help of various specialized actors and service providers which play crucial role in the entire process. The income accruing to multiple actors in this ecosystem would be subject to tax in most jurisdictions with most jurisdictions classifying it as a business activity , allowing deduction of allowable expenses . However , as on date , there does not exist any specific guidance on fee or rewards received through MEV . The MEV re lated services might also be subject to indirect taxes as actors like builders , validators get paid for their service of creating and proposing blocks containing speci fic transaction bundles through the mechanism described above. To understand the tax events in the process of MEV extraction starting from the creation of bundles by the searcher to the final proposal of the block by the validator, it is important to track the payments made to/by searchers , builders, and validators in a block on the Ethereum Blockchain. For example , in the Ethereum Block No. 18840841 it can be observed that the block reward ( transaction fee – base fee burn t) was transferred to the address 0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326 (rsync - builder.eth ) as shown in Fig 52. 134 https://docs.flashbots.net/assets/images/validator -flow -f3a8249b600db2b2b8d0a0344f336f95.png 135 https://docs.flashbots.net/assets/images/mevboost -searcher -bundle -flow - bae4ba67a9d8d928efe337f36defa14a.png 86 Fig. 52 Reward in Ethereum Block No. 18840841 accrued to rsync -builder.eth A look at the MEV Info of the same block as shown in Fig. 53 indicates that the recipient of the Proposer fee for the block is the Lido: Execution Layer Rewards Vault (validator) with the smart contract address 0x388C818CA8B9251b393131C08a736A67ccB19297 Fig. 53 MEV Info of the Block No. 18840841 of Ethereum This transaction can also be seen in the list of transactions in the block 18840841 . As shown inf Fig. 54 this is the reward received by the validator (Lido) over and above the issuance and other rewards received on the consensus layer . This is also the fee paid by the builder to the block proposer for proposing the block sent by the builder through the relay as described above. Fig. 54 list of transactions in the block 18840841 This might lead to a conclusion that for this block the builder paid more fee to the validator than the reward received by it, thereby incurring a loss. However, a closer look at the internal transactions in this block (Fig. 55) highlights two transactions where amounts of 0.013180 ETH and 0.032166 ETH 87 were sent to the builder. This is the fee paid by the searchers or other users to the builder for inclusion of their transaction bundle in the block. Thus, the net fee received by the builder for the block is 0.031971 + 0.013180 + 0.032166 - 0.063398 = 0.0139 19 ETH Fig. 55 Internal transactions in block number 18840841 It can be observed that the searcher paid the builder through a transaction on the blockchain rather than high gas fee for inclusion in the block, this method conditions the searcher’s bid on the inclusion of their transaction in the block and obviates the need to pay for unsuccessful bids. However, to gain reputation and remain competitive some builders might discount some blocks and incur a short -term loss. The payments made by the searchers and other actors to the builder and by the builder to the validator constitute payments in lieu of services of including the transaction bundles in the blocks formed by the builder and proposing the blocks formed by builder on the Ethereum Blockchain by the validator respectively. Thus, depending upon the tax residency of the builders and validators the services provided by them to searchers and builders may be subject to VAT/GST. As relays are not currently monetized, they would not be subject to VAT/GST . The total value of MEV rewards extracted before ‘the Merge’ of Ethereum is $675,623,114136. After ‘the Merge ’ of Ethereum the total MEV extracted is 464,201 ETH137 which is ~800 million USD. Although these figures are not huge , but with increasing transaction volumes it might not be possible for tax administrations to ignore this aspect of the crypto asset s ecosystem. 9. Decentralized Autonomous Organizations - DAOs Both the DeFi applications discussed above rely on smart contracts for their execution without the need for any centralized entity or agency. The parameters like savings rate , token pairs to be exchanged on the platform, collateralization ratio for various tokens etc. are decided by members holding voting rights through governance tokens of the DeFi applications. Such DeFi applications are classic examples of Decentralized Autonomous Organizations , which run on permissionless public blockchain s without any centralized institutional structures , usually not having offices or addresses where operations are carried out or decisions are made. The rules that govern such organizations are encoded into and enforced through smart contracts on the blockchain , unlike conventional organizations where board of directors and personnel with clearly defined powers and responsibilities take decisions on behalf of the shareholders or participants . DAOs attempt to address the ‘agency problem’ faced by many traditional organizations by making decision -making more participative . Each member of the DAO’s governance contributes virtual assets 136 https://explore.flashbots.net/ 137 https://transparency.flashbots.net/ 88 to the DAO and obtains rights to vote through governance tokens . Holders of governance tokens can make proposals and vote on proposals through various voting models like Token -Based Quorum Voting , Quadratic Voting etc.138. The wide variety of activities carried out by participants is based on foundations of Cryptography and properties of the transactions undertaken on the blockchain . This provides pseudonymity to the DAO ’s participants who can use the applications to carry out transactions without any KYC requirements or disclosure of tax residency or beneficial ownership information. Also, this renders the DAO technologically unable to gather the required information for filing and compliance purposes, if any. As the application is essentially smart contract code running on a public blockchain , it is possible to create a DAO without any formal registration with a State , any government entity, or a regulator. This makes it possible for a DAO to have an organizational form which does not formally associate with any legal entity with the location of its operations and users not being known with certainty. The World Economic Forum’s report Decentralized Autonomous Organization Toolkit defines DAO s as organizational structures that use blockchains, digital assets and related technologies to allocate resources, coordinate activities and make decisions . In simple terms, Decentralized Autonomous Organizations (DAOs) are like digital clubs or teams where people work together, but there is no boss or leader. Instead, decisions are made by everyone involved. Imagine a school club where all members vote on what activities to do, what snacks to bring, and how to spend the club’s money. That is analogous to how DAOs work, but they use blockchains and smart contracts instead . DAOs are not just confined to financial applications like decentralized exchange s but can have a wide gamut of for - profit and non -profit objectives. Some examples of different kind of DAOs are: i. Protocol DAOs : These are like the “rule -makers” for online applications . They decide how the application works, what features to add, and when to update it. example : Uniswap is a popular decentralized exchange (DEX) protocol. Its governance decisions are made by UNI token holders . ii. Grant DAOs : These are akin to charity clubs. People pool their money to help others, like donating to a cause they care about. example : Gitcoin Grants allows contributors to fund open -source projects and public goods in the crypto space . iii. Social DAOs : These are like online communities. Members collaborate on projects, share ideas, and organize events , undertaking tasks that require a big team effort . example : Friends With Benefits (FWB) is a social DAO where members participate in events, discussions, and projects . iv. Collector DAOs : It is like a group of people who collect rare collectibles . They decide which collectibles to buy and how to take care of them. example : Flamingo DAO acquires rare NFTs (non -fungible tokens) and digital art. v. Investment DAOs : These are like investment clubs. People put their money together to invest stocks , new technologies , startups etc . example : MetaCartel Ventures invests in early -stage blockchain projects. vi. Media DAOs : Akin to a group of content creators (like YouTubers or bloggers) working together. They decide what videos to make or articles to write. example : Forefront is a media DAO where creators share revenue and collaborate on content. Many of the different kinds of DAOs listed above have profit as one of their primary motives . Many DAOs may also involve contributions from its members as well as other economic transactions like acquisition of assets by the DAO, changes in value of assets or distribution of profits to the members . The DAO’s governance tokens might also be tradable on secondary markets . All such transactions are likely to involve transfer of economic value and may be taxable events , resulting in tax liability for the 138 DAO Voting Mechanisms Explained - LimeChain 89 DAO at the entity level or for the participant. However, in the absence of a legal entity structure and limited or no information about the location of its operations and users , the DAOs are likely to suffer from uncertainty about their legal structure, tax liability , residency , and jurisdiction as well as the applicable laws, rules , and regulations. It is likely that due to this uncertainty , till date no tax administration has issued any guidance for taxing DAOs. Despite the uncertainties associated with DAOs , the total value of assets locked in DAO treasuries as of February 2024 is around 33 billion USD with around 10 million governance token holders , out of which around 3 million are active voters and proposal makers139 . These statistics as shown in Fig. 56 are showing an increasing trend and are difficult for tax administrations across the world to ignore. Fig. 56 DAO treasury values and number of active voters Some pertinent questions related to DAOs which regulators in general and tax administrations in particular would want to seek answers to are: a) How do DAOs classify under existing laws? Are existing legal structures and frameworks sufficient to provide legal personhood to DAOs or new legal technology is required for DAOs which pose challenges to any known classification? b) How does the place of operation of DAO get determined and which laws, rules and regulations apply to it ? c) How do the organizational structure and nature of the token s/crypto asset s determine the regulatory framework of the DAO? d) Is the DAO required to identify or collect information about its members ? If yes, then how it does so to fulfil its legal and regulatory obligations ? e) Who has the power to act legally on behalf of the DAO and how does the DAO confer such power s? f) How does a DAO carry out its legal affairs like filing of taxes and other compliances like social security contributions , withholding taxes etc. ? g) How the profits of DAOs from thei r multiple revenue streams are determined and who is obligated to pay the corresponding taxes? h) How do investors/participants and the DAO are prevented from No Taxation as well as Double Taxation? i) Do DAO participants have an unlimited or limited liability for debt s, judgements , obligations, and liabilities of the DAO? Though this is not an exhaustive list of issues being faced by stakeholders in the DAO ecosystem, but the issues highlight the unique challenges posed by DAOs. Most of these questions arise because of Blockchain based operations of DAOs and the pseudonymity of their members/users. These questions might be difficult or impossible to answer due to the technological bottom -lines of crypto asset s. To 139 https://deepdao.io/organizations 90 answer these questions standardized technological solutions which address these issues on a global scale would be required. It would also require global policy action to formulate bespoke laws, rules and regulations that address the technological framework of DAOs, the blockchain s on which they operate and their underlying crypto asset s. Due to such uncertainties, there have been multiple instances where DAOs have faced actions from regulators and other stakeholder s, some of which are given below: a) CFTC action on Ooki DAO140: Ooki DAO faced regulatory action by the U.S. Commodity Futures Trading Commission (CFTC ) for allegedly operat ing an illegal trading platform without proper registration as a futures commission merchant. The CFTC filed a legal action against Ooki DAO, alleging violations of the Commodity Exchange Act. Ooki DAO failed to respond, leading to a default judgment. The court held that ‘Ooki DAO is a ‘person’ under the Commodity Exchange Act and thus can be held liable for violations of the law .’ The court also ordered Ooki DAO to pay a penalty and permanently cease operations. b) SEC action on The DAO141: In 2017, the SEC investigated digital assets associated with The DAO, a virtual organization which was created in 2016 with more than 11,000142 anonymous investors who collectively raised more than 150 million USD143. The SEC applied the Howey test, which is a legal framework used to determine whether an arrangement constitutes an investment contract (and thus a security) and found that The DAO tokens met the criteria for investment contracts. The SEC concluded that t hese tokens were securities, subject to federal securities laws as The DAO did not meet the criteria for Regulation Crowdfunding exemption. It issued a warning in the report that the digital assets offered by virtual organizations like The DAO could be sub ject to federal securities laws. c) MakerDAO arbitration144: On 12th March 2020, the crypto asset s market witnessed a crash and the event later came to be known as Black Thursday. On the Black Thursday , the value of Ether plummeted dramatically. As explain ed earlier, this led to under -collateralization of the DAI loans in the Collateralized Debt Position vaults, triggering liquidations. Due to multiple issues related to the crash in price of Ether, several CDP vaults could be liquidated at a bid price of $ 0 resulting in heavy losses to the borrowers. Subsequently, a class -action lawsuit was filed against the Maker Foundation which governed the Maker protocol and DAI , claiming loss and damages for misleading investors about the risks associated with MakerDAO . The suit culminated in an arbitration and subsequent dissolution of the Maker Foundation . There is a general lack of certainty about the tax and regulatory treatment of DAOs which results in instances of actions as given above. Many legal experts are of the opinion that DAOs would be classified as general partnerships (Shenk, Van Kerckhoven, & Weinberger, 2023) . Some experts also argue that DAOs have certain characteristics of corporations and they should be given the ability to choose their legal entity status for tax and other regulatory purposes (Brunson, 2022) . However, the truly Decentralized Autonomous Organization is an entity which lives and operates on the blockchain and suffers from real impediments in its interaction wi th the physical world . Such interaction requires agents who are natural persons acting on behalf of the entity for important tasks like regulatory compliances, filing and payment of taxes and compliance and cooperation with law enforcement . 140 https://www.cftc.gov/media/8736/enfookidaoorder060923/download 141 https://www.sec.gov/news/press -release/2017 -131 142 The DAO Attack: Understanding What Happened – CoinDesk 143 https://www.bitstamp.net/learn/crypto -101/ethereum -dao-hack/ 144 https://www.coindesk.com/policy/2020/09/29/28m -makerdao -black -thursday -lawsuit -moves -to- arbitration/ 91 Thus, it would be important for a DAO to have a real-world legal identity to avail benefits of legal personhood like access to banking , more certain tax and regulatory treatment and limited liability . This would have to be augmented by technological solutions which help to ameliorate issues related to pseudonymity on the blockchain . 9.1 Legal Entity Status of DAOs DAOs can be defined as “ organizational structures that use blockchains, digital assets and related technologies to allocate resources, coordinate activities and make decisions .145” As discussed above, such organizations can commence their operations without any registration due to the pseudonymous nature of its members and permissionless nature of the public blockchain s on which DAOs function. Although this might have advantages of enabling decentralized decision making without a management structure with clearly defined roles, it makes it difficult for DAOs to avail benefits of legal personhood like being able to sue as an entity, having a bank account and being able to enter into contracts , limited liability of its members , and simplified compliances. The legal entity statu s of a DAO has profound consequences related to applicability of tax laws , AML/CFT/CPF and other regulatory obligations of the DAO and its me mbers . This makes the issue of a DAOs legal entity status crucial. Classification of DAOs as domestic or foreign general partnerships, unincorporated associations, domestic or foreign corporations, foundations , or limited liability corporations has bearing on various important issues like: A) Liability of the members for debts, judgements, obligations, and liabilities of the DAO B) Collection and filing of information relating to taxes and other regulations in multiple jurisdictions C) Determination of tax liability of the DAO and its members and identification of taxable events It is also possible that various sub organizations within the DAO may have different classifications as legal entities. For example , components of the DAO which manage the treasury and the component managing voting on the protocol might have different classifications. Many countries have enacted provisions to recognize DAOs as a legal entity. The Innovative Technology Arrangements and Services (ITAS) Act of Malta146 enables DAOs to register by applying to the Malta Digital Innovation Authority . In Switzerlan d, DAOs can be structured as ownerless foundations and jurisdictions like Cayman Islands enable creation of an LLC structure that acts as real- world interface of the DAO147. Many states like Wyoming and Vermont in the US have also enabled DAOs to register as LLCs148. However, many of these legal entities require filing of physical forms along with the relevant information or establishing and maintain a registered agent in the jurisdiction , which might be operationally difficult for truly decentralized DAOs and against their foundational principles. The following discussion about DAOs and their legal aspects is from the perspective of the laws in the US, other jurisdictions may have similar or different legal treatment and classification depending on their domestic law. 145 Decentralized Autonomous Organization Toolkit 146 https://legislation.mt/eli/cap/592/eng/pdf 147 https://www.forbes.com/sites/irinaheaver/2023/08/14/the -ultimate -crypto -legal -guide -to-structuring - your -dao/?sh=777f38957b81 148 https://sos.wyo.gov/Business/Docs/DAOs_FAQs.pdf 92 9.1.1 Unregistered DAOs One of the most important issues concerning the legal entity status of DAOs is the legal identity of an unregistered Decentralized Autonomous Organization which operates on the blockchain with pseudonymous members without registering with any State, government entity, or a regulator . As mentioned earlier, in an important case related to the Ooki DAO in the US, the US District Court for Northern District of California has adjudicated that Ooki DAO was an unincorporated association with token holders as its members, who joined it voluntarily. It was observed that Ooki DAO was a ‘person’ under the Commodity Exchange Act and it could be sued as it was an unincorporated association . The notice was served by Commodity Futures Trading Commission (CFTC ) through the online community forum of the DAO , which was upheld by the court. A civil monetary penalty of $643,542 was levied and its operations were shut down. In California, an unincorporated association refers to a gathering of individuals united by a shared purpose or goal, but lacking formal incorporation status with the state. Despite this absence of incorporation, such associations maintain legal standing a nd can undertake activities such as contractual agreements, property ownership, and litigation. While possessing fewer formalities and regulatory obligations compared to corporations, they still hold recognition under the law. Example s encompass social clu bs, community organizations, and informal business partnerships. There are no State filing requirements for unincorporated associations , however, if the association is operating a business , it may need to obtain relevant licenses or permits , which the Ooki DAO purportedly failed to obtain from the CFTC. This case is important as it highlighted that for unregistered DAO s, members of unincorporated association may have unlimited personal liability for the debts, obligations, and liabilities of the DAO. It may also be possible to classify many DAOs as general partnerships. General partnerships are a type of business structure where two or more individuals (or entities) come together to operate a business for profit. In a general partnership, each partner shares in the management, profits, and liabilities of the business. They may be formed through a written or oral agreement and the members have unlimited personal liability for the debts, obligations, and liabilities of the business. Thus, it might be poss ible that all members holding the governance tokens of DAOs which have not otherwise been incorporated as a legal entity form a general partnership inadvertently , as the intention to form a partnership is not a pre -requisite for forming a general partnership. However, the pseudonymity of the members of the general partnership and lack of the concept of a ‘principal office’ is a major roadblock in determination of the jurisdiction that governs the DAO as a general partnership. The classification as a general partnership might obligate a DAO to reporting requirements in jurisdictions like the US. Even if none of the members of the DAO happen to be US tax residents , but if the income of the DAO is attributable to the US, it might be required to report the same to the IRS. Partnerships may also be required to submit an information return, Form 1065, to the IRS, detailing the partnership's financial information. Additionally, each member receives a Schedule K -1, which outlines their share of income, deductions, and other tax items, to be reported on their personal tax returns. Due to pseudonymous nature of membership of the DAO, such information might be extremely difficult to gather and furnish. Also, c onsidering the nature of DAOs operations it is not clear that w ho would have the power to act l egally on behalf of the DAO to make such filings and how does the DAO confer such powers ? As many of the DAOs may not be domestic i.e. ‘Organized in the US’ it would be possible to classify them as foreign partnerships. If the DAOs governance tokens are tradable on the secondary market, it may be classified as a Foreign Publicly Traded Partnership. Foreign partnerships that conduct certain activities within the US are subject to filing obligations with the IRS. This typically includes filing Form 1065, "U.S. Return of Partnership Income," if the partnership earns income effectively connected wit h 93 a U.S. trade or business, or if it receives U.S. source income subject to withholding. Additionally, the partnership may need to issue Schedule K -1 to each partner to report their share of income, deductions, and other tax items 9.1.2 DAOs registered as a legal entity Some DAOs are already registered in various jurisdictions under the existing legal framework s. This provides the DAOs with the benefits of legal personhood, but might not eliminate the legal and regulatory uncertainty completely. DAOs choose multiple legal wrappers based on legal and regulatory considerations as well as tax implications. Some DAOs are constituted as foundations under the laws of jurisdictions like the Cayman Islands and Switzerland . Such structures have benefit of limited liability to identify members and beneficial owners , with limited liability of members of the foundation for its debts and other obligations . The LLC structure provides members of the DAO with benefit of limited liability and the flexibility to choose how it is taxed based on specific circumstances . Brunson (2022 ) argue s that just like check - the-box regulations led to more widespread adoption of LLCs as a legal entity, DAOs can also be given a choice to opt their entity status for tax purposes. However, as Decentralized Autonomous Organization live and operates on the blockchain and the Internet, and due to the pseudonymous nature of their member s, DAOs registered as entities might find it technologically infeasible to collect and report information related to tax residency, beneficial ownership etc. of its members. Technological solutions that address the pseudonymity problem can help to resolve many legal, regulatory and tax related issues related to both registered and unregistered DAOs. 9.2 Taxation issues of DAOs One of the fundamental aspects related to taxation of DAOs and their members is the classification of the tokens of the DAO. Some tokens might be classified as securities on application of the Howey Test or any other similar test for securities in a jurisdiction. In such a scenario the tokens will be taxed as securities. However, the tokens might serve dual purpose as utility tokens o f the DAO’s protocol/application . Unless jurisdictions prescribe specific tax treatment for such tokens , it is likely that ac tions like those taken by SEC in case of The DAO and by the CFTC in case of Ooki DAO may continue. The individuals or entities may undertake many transactions with the DAO which might be taxable. The members may either receive governance tokens of the DAO or NFTs in the form of airdrop s or they may pay a consideration for buying the tokens. In case of airdrop s, in most jurisdictions , an income tax is chargeable upon the receipt of the airdrop . However, in some jurisdictions the receipt of an airdrop is not taxed but is considered acquisition of a crypto asset with zero basis. Also, the subsequent sale, swap, spend or gift transactions are also subject to capital gain s. However, in some jurisdictions, depending upon the domestic tax laws and guidance, gifts might not be taxed. In case the member pays a consideration for buying the governance tokens of a DAO which qualifies as a general partnership , in some jurisdictions like the US , no gain or loss would be recognizable ( 26 U.S. Code § 721149), making the initial contribution non -taxable . For DAOs w hich may be treated by default as general partnerships unless they register as any other entity, they might subject to pass - through taxation where the DAO does not pay taxes as a business entity and the individual partners pay taxes on their share of profits. The portfolios of the DAOs in the form of investments or NFTs etc . may appreciate and taxed when realized , DAOs might also have income from staking on DeFi platforms 149 Section 721 of the Internal Revenue Code (IRC) of the United States deals with the tax treatment of contributions to partnerships in exchange for partnership interests. Specifically, it states that no gain or loss shall be recognized to a partnership or to any of its partners in the case of a contribution of property to the partnership in exchange for an interest in the partnership. 94 and the Ethereum Beacon Chain . DAO’s sale of governance tokens for other crypto asset s or fiat currency for funding the treasury, software development or any other purpose might also be a taxable event. The individual partners of the DAO would have to account for profits from all the activities of the DAO to pay the ir due taxes, which might be a challenge. The partners in a jurisdiction might pay taxes in their jurisdiction of residence as well as taxes in foreign jurisdictions for the DAOs profits attributable to those jurisdictions. This multi -jurisdictional liability might make profit attributions and tax liability ascertainment extremely co mplex and possibly lead to double or no taxation. If the DAO is registered as a corporation or is treated as a corporation for tax purposes , its profits will be taxed at the level of corporation as well as at the time o f distribution of profits. The distribution of profits by the DAOs or burning of governance tokens might be taxed as dividends or share buyback in some jurisdictions. DAOs also engage in the procurement of goods and services from multiple individuals and entities which would be taxable for the recipients of the consideration. These transactions might also give rise to VAT/GST liability and if the consideration paid is in the form of crypto asset s it might be considered disposal for the purpose of capital gain s. For example , a DAO may assign responsibility for some of their operations to a specialized entity or another DAO which might be subject to VAT/GST. DAOs that employ people might have obligations to pay employer taxes, social security contributions etc. Revenu e sharing arrangements or royalty payments might also be subject to taxes. Many of the transactions and taxable events mentioned above might have withholding tax obligations. However, in the absence of tax residency information, DAOs might be have to withhold taxes at a higher rate. The mechanism for payment and seeking credit for withheld taxes is also a practical challenge. 10. International Cooperation and Exchange of Information Ever since the first Bitcoin was mined in 2009 the landscape and scale of crypto asset s has changed significantly. Even with recent dips in value of crypto asset s this asset class remains , and is likely to remain a challenge for tax administrations across the world due to its pseudonymous and extra - territorial nature. Many tax administrations have formulated laws and policies to tax this asset class , whereas some jurisdictions have put an outright ban or a partial ban on crypto asset s, whose efficacy has not been very high (Chen & Liu, 2022) . However, many jurisdictions do not have any tax or regulatory policies regarding crypto assets which creates a regulatory arbitrage . Due to the unique characteristics of crypto asset s, in absence of clearly defined tax treatment and guidance, lack of third -party -reporting and regulatory arbitrage , the collection of taxes is primarily based on voluntary compliance , which might result in significant tax gaps . The UNCTAD has observed that crypto asset s may enable tax evasion or avoidance through offshore flows whose ownership is not easily identifiable, undermine capital controls , erode the tax base, and consequently hinder Domestic Resource Mobilization for achieving the Sustainable Development Goals150. The IMF Executive Board also discussed a board paper on key elements of an appropriate policy response to crypto assets151 and considered that “the growing adoption of crypto assets in some countries, the extra -territorial nature of crypto assets and its providers, as well as the increasing interlinkages with the financial system, motivate the need for a comprehensive, consistent, and coordinated response ” and it also agreed that the applicability of tax regimes should be clarified. The UNCTAD also issued a policy brief that “ highlights the importance and urgency of international cooperation regarding cryptocurrency tax treatments, regulation and information sharing as well as 150 https://unctad.org/system/files/official -document/presspb2022d10_en.pdf 151 https://www.imf.org/en/News/Articles/2023/02/23/pr2351 -imf-executive -board -discusses -elements -of- effective -policies -for-crypto -assets 95 of redesigning capital controls to take account of the decentralized, borderless and pseudonymous features of cryptocurrencies. ”152 The G20 Roadmap on crypto asset s also highlighted the significance of international collaboration in tackling regulatory hurdles associated with crypto assets153. It underscored the necessity to share information and coordinate actions to establish uniform regulatory frameworks across different jurisdictions. This concerted effort aims to effectively address the challenges arising from the global nature of crypto activities and promote regulatory consistency to ensure a cohesive approach worldwide. Presently, the FATF standards on virtual asset s and virtual asset service provider s and the Crypto -Asset Reporting Framework proposed by the Organisation for Economic Co -operation and Development (OECD) aim at achieving the comprehensive, consistent, and coordinated approach to Tax and AML/CFT related aspects of crypto asset s. They are discussed in the following sections 10.1 FATF Standards on VAs and VASPs The FATF standards pertaining to virtual asset s (VAs) establish a comprehensive framework aimed at regulating virtual asset service provider s (VASPs) to mitigate the risks associated with money laundering, terrorist financing, proliferation finan cing and other illicit activities. These standards mandate that countries enforce licensing and registration protocols for VASPs, conduct thorough customer due diligence (CDD), maintain transaction records, and promptly report any suspicious activities to rele vant au thorities154. Furthermore, the FATF guidelines stress the importance of robust supervision, enforcement mechanisms, international collaboration, and the adoption of risk -based approaches to safeguard the integrity of the financial system while fostering innovation in the virtual asset realm. The FATF recommendations obligate VASPs to implement the Travel Rule , which requires VASPs to share the information related to a transaction's sender and recipient with other VASPs . It mandates that VASPs must obtain, hold, and transmit required originator and beneficiary information, immediately and securely, when conducting virtual asset transfers , particularly for those surpassing a designated threshold. This regulation aims to boost transparency and curb the potential for money laundering, terrorist financing, and other unlawful activities within the virtual asset s ecosystem by enabling authorities to track and monitor transac tions more efficiently, mirroring the obligations imposed on conventional financial institutions. It characterizes some products like so called Stablecoins and P2P transactions as high risk and guides the jurisdictions to take measures limiting the ability of users to transact anonymously. However, the guidance does not quantify the size of the P2P transactions and its associated money laundering /terror financing /proliferation financing risks. The FATF defines virtual asset s as a “ digital representation of value that can be digitally traded or transferred and can be used for payment or investment purposes. Virtual assets do not include digital representations of fiat currencies, securities, and other financial assets that are alread y covered elsewhere in the FATF Recommendations .”155 This definition covers almost all types of virtual assets except few like NFTs. A VASPs is defined as: 152 https://unctad.org/publication/cost -doing -too-little -too-late-how -cryptocurrencies -can-undermine - domestic -resource 153 https://www.mea.gov.in/Images/CPV/G20 -New -Delhi -Leaders -Declaration.pdf 154 https://www.fatf -gafi.org/en/publications/Fatfrecommendations/Fatf -recommendations.html 155 https://www.fatf -gafi.org/en/publications/Fatfrecommendations/Guidance -rba-virtual -assets -2021.html 96 any natural or legal person who is not covered elsewhere under the Recommendations and as a business conducts one or more of the following activities or operations for or on behalf of another natural or legal person: i) Exchange between virtual assets and fiat currencies; ii) Exchange between one or more forms of virtual assets; iii) Transfer of virtual assets; and iv) Safekeeping and/or administration of virtual assets or instruments enabling control over virtual assets; v) Participation in and provision of financial services related to an issuer’s offer and/or sale of a virtual asset. This definition does not cover m iners , validators and ancillary service providers like hardware wallet manufacturers, cloud service providers, software developers etc. DeFi Applications are not VASPs as per this definition. However, DeFi applications which have strong centralized operations, colloquially known as DeFi in Name Only (DINO) , as well as not yet decentralized nascent DAOs may qualify as VASPs as per the definition. The Travel Rule requires the following information to be obtained and transferred before the VA transfer takes place i) originator’s name ii) originator’s account number (wallet address) iii) originator’s physical (geographical) address, or national identity number, or customer identification number, or date and place of birth iv) beneficiary’s name v) beneficiary’s account number (wallet address) The information is not required to be a part of the blockchain transaction . In case of transfer to an unhosted wallet the VASPs are required to obtain the counterparty information from the customer. Moreover, VASPs are required to perform CDD for customers transacting above a threshold amount of virtual asset s. The ordering VASP is required to perform due diligence on the beneficiary VASP about the Data Protection and Privacy ( DPP) measures related to security of travel rule information. I t also encourages VASPs to collect additional information like: a. the purpose of transaction or payment; b. details about the nature, end use or end user of the item; c. proof of funds ownership; d. parties to the transaction and the relationship between parties; e. sources of wealth and/or funds; f. the identity and the beneficial ownership of the counterparty; and g. export control information, such as copies of export -control or other licenses issued by the national export control authorities, and end -user certification. 10.1.1 Challenges in Travel Rule implementation The FATF Travel Rule requires VASPs to obtain, hold, and transmit required originator and beneficiary information, immediately and securely, when conducting virtual asset transfers . However, due to the pseudonymous nature of crypto asset s it might not be easy to ascertain the iden tity of the beneficiary VASP and might require reliance on blockchain analytics and specialized networks /protocols for travel rule solution s like TRISA156, OpenVASP157 and Notabene158. The FATF acknowledges that “ To date, the FATF is not aware of any technically proven means of identifying the VASP that manages the 156 https://trisa.io/ 157 https://www.openvasp.org/ 158 https://notabene.id/ 97 beneficiary wallet exhaustively, precisely, and accurately in all circumstances and from the VA address alone ”159. The technology neutral stand of FATF recommendations makes them agnostic to the products, services, solutions, or technologies provided by various vendors if they comply with the AML/CFT obligations . There are many commercial solutions which provide travel rule services, but some of suffer from various shortcomings like: a) Lack of interoperability – this remains the most important challenge in Travel Rule implementation b) Lack of consensus on counterparty VASP due diligence c) Inability to transfer information of both originator and beneficiary VASP before the transaction on blockchain d) Issues in recordkeeping and retrieval of Travel Rule information e) Transmission of transaction IDs instead of wallet addresses by some Travel Rule solution providers Besides these, there are jurisdic tion specific issues like different approaches to transaction thresholds, data privacy laws and approach on transactions to unhosted wallets. There are also issues related to jurisdictions where the FATF recommendations related to VASPs have not been applied yet – The Sunrise Issue. Moreover, as the FATF recommendations might not be complied by some jurisdictions and tax administrations might find it difficult to access information that is mainly intended for AML use, they may face challenges related to real-time use of such information for tax administration purposes . Also, there are many technological challenges in compliance to the Travel Rule. In the Targeted Update on Implementation of the FATF Standards on virtual asset s and virtual asset service provider s, FATF has called on industry to accelerate efforts to strengthen solutions that are global, and can accommodate nuances in requirements across jurisdictions, in line with the expectations of the FATF Standards . 10.2 Crypto -Asset Reporting Framework The Crypto Assets Reporting Framework introduced by the OECD addresses the challenges posed by crypto asset s in the realm of taxation , specifically addressing the lack of taxpayer information . This framework establishes guidelines and standards for the reporting and automatic exchange of information regarding crypto asset transactions among tax authorities globally. With the rapid proliferation of crypto assets and increase in their market capitalization , the OECD recognize d the imperative to ensure transparency and compliance within this evolving landscape. The CARF seeks to enable tax authorities to effectively monitor and regulate crypto asset transactions, to help them combat tax evasion. By establishing clear reporting requirements for crypto asset transactions, the framework aims to enhance tax compliance. Moreover, by facilitating the exchange of information among tax authorities across jurisdictions, it fosters internation al cooperation in addressing the unique tax challenges posed by crypto assets. Besides providing a framework for multilateral and bil ateral agreements for exchange of information, it also provides a n XML schema for informatio n exchange. The CARF160 is similar to the Common Reporting Standard (CRS) developed by the OECD which help s jurisdictions to obtain offshore accounts information through annual automatic exchange of information. It defines the term “Relevant Crypto -Asset ” which means “ any Crypto -Asset that is not a Central Bank Digital Currency, a Specified Electronic Money Product or any Crypto -Asset for which the 159 https://www.fatf -gafi.org/content/dam/fatf -gafi/guidance/Updated -Guidance -VA-VASP.pdf page 39 160 https://www.oecd.org/tax/exchange -of-tax-information/crypto -asset -reporting -framework -and- amendments -to-the-common -reporting -standard.pdf 98 Reporting Crypto Asset Service Provider has adequately determined that it cannot be used for payment or investment purposes .” This definition includes crypto asset s like NFTs and excludes specific categories of crypto asset s like CBDCs . It makes the following three types of transactions reportable to tax authorities: • exchanges between Relevant Crypto -Assets and Fiat Currencies; • exchanges between one or more forms of Relevant Crypto -Assets; and • Transfers (including Reportable Retail Payment Transactions) of Relevant Crypto -Assets. The amount and details of units of crypto asset s transferred to unhosted wallets are also require d to be collected and retained for 5 years . The individuals or entities carrying out transactions related to crypto asset s are known as “Reporting Crypto -Asset Service Provider s. A Reporting Crypto -Asset Service Provider is defined as ‘any individual or Entity that, as a business, provides a service effectuating Exchange Transactions for or on behalf of customers, including by acting as a counterparty, or as an intermediary, to such Exchange Transactions, or by making available a trading platform .’ The commentary to the CARF clarifies the applicability of the definition to individuals and entities like software developers and decentrali sed exchanges. It states “ An individual or Entity that is making available a platform that solely includes a bulletin board functionality for posting buy, sell or conversion prices of Relevant Crypto -Assets would not be a Reporting Crypto -Asset Service Provider as it would not provide a service allowing users to effectuate Exchange Transactions. For the same reason, an individual or Entity that solely creates or sells software or an application is not a Reporting Crypto - Asset Service Provider, as long as it is not using such software or application for the provision of a service effectuating Exchange Transactions for or on behalf of customers. ” The Reporting Crypto -Asset Service Provider are required to submit reports on Reportable Users161 and also undertake due diligence on the customers, both individuals and entities. They are required to report the following information regarding Crypto -Asset Users that are Reportable Users or that have Controlling Persons that are Reportable Persons: - Name - Address - Jurisdiction(s) of Residence - Tax Identification Number (s) - Date and Place of Birth The name, address and identifying information of the Reporting Crypto -Asset Service Provider along with details of ‘Relevant Transactions’ need to be provided. Tax Identification Number ( TIN) and Place of B irth may not be required to be reported if the domestic law does not require collecting the information or TIN has not been issued by the reportable jurisdiction. The information is to be obtained on a self -certification basis and its reasonableness needs to be confirmed relying on other information collected by the Reporting Crypto -Asset Service Provider , like AML /KYC related information. The CARF is an amendment to CRS and based on a separate legal framework from the CRS, which makes it possible for countries to implement CARF without signing up for CRS (Falcao & Michel, 2023) . The definitions of Relevant Crypto -Asset s and Reporting Crypto -Asset Service Provider are wider than the corresponding FATF definitions. This can enable tax authorities to obtain tax related information for a wider gamut of crypto asset s and from a larger set of exchanges/ intermediaries. However, the 161 D Section IV: Defined Terms 99 determination of place of residence of a taxpayer might be a challenge in case of decentralized exchange s which would likely qualify as Reporting Crypto -Asset Service Provider . Although the XML Scheme standardizes the information exchange but absence “ of any technically proven means of identifying the VASP that manages the beneficiary wallet exhaustively, precisely, and accurately in all circumstances and from the VA address alone ” as acknowledged by FATF , would also be a challenge for CARF as self -declaration based due diligence and blockchain analytics based attribution of crypto asset addresses to natural and legal persons might not provide reliable and accurate information for levy of taxes. Also, the information is provided annually which might lead to flight of assets in tax fraud cases. 10.3 Need for Global Public Digital Infrastructure Pseudonymity and extra-territoriality are two key aspects of crypto asset s which are a major hurdle for tax administrations across the world to realize the full potential of taxes due on crypto asset s. Most crypto asset service provider s and law enforcement agencies rely on blockchain analytics solutions which attribute crypto asset addresses to a natural or legal person. Such attribution would not be required for off -chain transactions undertaken by an individual or entity with a Reporting Crypto -Asset Service Provider as the information can be obtained through CRS . The accurate determination of such information for on -chain transactions i.e. P2P transactions is essential for levying taxes as the ownership of private keys corresponding to the wallet would be required to be established before the levy of tax. As the blockchain analytics -based attribution is mainly obtained through clustering techniques and transaction behaviours, it might not establish legal ownership or control of the private keys beyond doubt162. One example of such attribute of a crypto asset address is its jurisdictional tax administration. Accurate information about the originator and beneficiary tax jurisdiction is essential for addressing multiple issues related to taxation in a transaction , like: a) Percentage of amount to be withheld, if at all b) Attribution of profits to a jurisdiction c) Preparation and submission of information returns of an entity for a jurisdiction d) Application of Double Taxation Avoidance Agreements e) Determining tax treatment of a DAO and its members The information related to off -chain transactions would be collected and retained for the prescribed periods by the Reporting Crypto -Asset Service Provider . Information related to the transfer of crypto asset s from a Reporting Crypto -Asset Service Provider needs to be obtained from the user , which might require a cryptographic process similar to the Address Ownership Proof Protocol163. As the transaction information is already stored on the blockchain it might be more prudent for tax administrations to attribute crypto asset addresses to TINs using cryptographic methods and then use the blockchain information about P2P transactions to determine tax liability of the taxpayer. Presently the CRS information is exchanged through secure networks established by the participating countries' tax authorities or the Common Transmission System (CTS) provided by the OECD which are designed to ensure the confidentiality, integrity, and privacy of the exchanged data . However, this data is exchanged annually after a lag and is not designed to provide real -time information which might be the requirement for many tax jurisdictions to attribute the crypto asset address to a tax jurisdiction and TIN . To meet this requirement tax administratio ns across the globe would require a global public digital infrastructure for obtaining, maintaining , and facilitating the ac cess to such attribution data ensur ing the confidentiality, integrity, and privacy of the data , where exchange of 162 https://finance.yahoo.com/news/crypto -tracing -revolutionizing -crime -fighting -124050120.html 163 https://www.21analytics.ch/what -is-aopp/ 100 data can take place in accordance to policies based on Exchange of Information Agreements between tax jurisdictions . The tax administration might use measures like prescribing higher withholding tax rates for transactions with wallets for which such attribution information could not be obtained from any ta x jurisdiction in real time . One probable design of such a system may use digital signature certificates issued to every TIN holder from its respective tax authority . Using the digital signature certificate issued by the tax authority and digital signature s from their wallet addresses the tax jurisdiction of the TIN can obtain a cryptographic proof of the ownership of the crypto asset private keys by the TIN holder. The tax jurisdiction would be required to maintain a record of all public addresses of its TIN holders for which it holds the cryptographic proof , and in real time, respond to queries from other jurisdictions about the ownership of a Crypto address by a TIN holder in the jurisdiction . As the number of unique Ethereum address es which have been used for transactions till date is in tens of Millions and the number of unique Bitcoin address es that have been used for transactions till date is in few billions, using appropriate data structures and search methods, the tax administrations can respond to requests from other jurisdicti ons about a TIN holder in real -time. Whenever a new transaction is to be carried out, the wallet software can broadcast a message signed with the digital signature issued by the originating jurisdiction enquiring about the tax jurisdiction of the beneficiary crypto address as depicted in Fig. 57 . Depending upon the EOI agreements some or no tax jurisdiction may respond to the broadcast about the presence of the TIN of the beneficiary crypto asset address owner in the affirmative. In case a response is received the transaction can be carried out as usual on the blockchain , as the jurisdictions, by virtue of processing requests based on cryptographic proofs, would automatically obtain the visibility of the transactions, and may also exchange the personal information related to the TINs . In case no response is received broadcast about the presence of the TIN of the beneficiary crypto asset address from any tax jurisdiction, the originator may be obligated by its tax jurisd iction to withhold taxes at a higher rate to safeguard the interest of the tax administration of the transaction originator. This design may also enable tax administrations to perform their own analytics on on-chain transaction data and the benefici al ownership and controlled entity information captured in the tax returns filed by their taxpayers . Another such secure information sharing mechanism that can be used by virtual asset service provider s can be XMTP Protocol164 based messaging. This messaging protocol provides a wallet -to- wallet messaging functionality provided both the wallets on -board to an XMTP protocol -based application. This service can provide a VASP with technically proven means of identifying the VASP that manages the beneficiary wallet exhaustively, precisely, and accurately in all circumstances and from the VA address alone , if the beneficiary VASP also uses an XMTP protocol -based application. The onward and backward communication between two wallets is depicted in Fig. 58 and 59. Multiple applications built on the protocol would be interoperable . An application can be developed as a global public digital infrastructure like the SWIFT network for exchanging Travel Rule information between VASPs , ensuring the adherence to Data Privacy and Protection . As most VASPs follow the interVASP Messaging Standard 101 (IVMS 101)165, which is a data format for exchanging travel rule information, like the XML scheme in CARF, a standard protocol for communication can solve the problem of interoperability. Just as the protocols approved by the Internet Engineering Task Force like the Hypertext Transfer Protocol166 (HTTP ) and Transport Layer Security167 (TLS) Protocol provide the broad framework which needs to be adhered to by developers, similar adoption of standards would be required to overcome the problem of interoperability. The SWIFT network used by financial 164 https://xmtp.org/ . 165 https://www.intervasp.org/ 166 https://www.ietf.org/rfc/rfc2616.txt 167 https://www.ietf.org/rfc/rfc5246.txt 101 institutions for the rapid, precise, and secure transmission of transaction information is another such example . Fig. 57 A Digital Signature based solution to find tax jurisdiction of a crypto asset address 10.4 The Challenge of Anonymity Enhancing Crypto Assets Tracing anonymity -enhancing crypto assets, particularly those like Monero, presents multifaceted challenges due to the sophisticated technological features embedded within these cryptocurrencies. Monero leverages cutting -edge cryptographic techniques such as ring signatures, stealth addresses, and confidential transactions to provide users with unparalleled privacy and fungibility. One of the primary hurdles in tracing Monero transactions lies in its use of ring signatures, which obfuscate the sender's iden tity by mixing the sender's transaction with those of other users, making it virtually impossible to determine the true source of a transaction. Country A Country B Country C Country D Country E broadcca Country F Country G Who has 0xf9efa2? I have 0xf9efa2 ! 102 Fig. 58 XMTP: Onward communication between two wallets168 168 https://xmtp.org/ Portions of this page are modifications based on work created and shared by XMTP and used according to terms described in the Creative Commons 4.0 Attribution License 103 Fig. 59 XMTP: Backward communication between two wallets169 Unlike Bitcoin, where transactions can be traced through a transparent ledger, Monero's blockchain obscures transaction details, including sender, recipient, and transaction amount, thereby thwarting traditional tracing methods. Additionally, Monero employs stealth addresses to enhance privacy by generating unique, one -time addresses for each transaction, making it challenging for external observers to link transactions to specific recipients. Furthermore, Monero's integration of confidential transactions encrypts transaction amounts, adding another layer of complexity to tracing efforts. Thes e technological innovations collectively render Monero transactions highly opaque and resistant to external scrutiny, posing significant challenges for tax authorities and law enforcement agencies seeking to enforce taxation laws and tracing illicit activities . Blockchain mixers and tumblers also pose similar challenges. Addressing these challenges necessitates the development of novel investigative techniques and regulatory frameworks tailored to the unique characteristics of privacy -centric cryptocurrencies like Monero, as well as collaboration between public and private sectors as well as governments on a global scale. Various blockchain intelligence and analytics solution providers claim the ability to trace Monero . However, it remains extremely difficult, if not impossible , to trace Monero purely through conventional methods used for other crypto asset s like Bitcoin and some other conventional investigative inputs might be required. 169 https://xmtp.org/ Portions of this page are modifications based on work created and shared by XMTP and used according to terms described in the Creative Commons 4.0 Attribution License 104 11. Conclusion Crypto assets have posed unique challenges to tax administrations throughout the world . On one hand they need to appropriately classify crypto assets as property/asset or means of payment /negotiable instrument and on the other hand address challenges due to their pseudonymous and extra -territorial nature. Tax administrations are innately designed to tax conventional means of holding and transmitting value as well as economic activity. This technologically challenging realm of economic activity creates tax design issues related to neutrality, efficiency and equity as well as their practical implementation. Policymakers would need to address the complex issues related to direct and indirect taxation of crypto assets , including issues related to the environmental costs of crypto assets, to provide clarity about their tax treatment without impeding progress or inhibiting innovation in this domain. With ‘Crypto Winter’ slowly turning into a ‘Crypto Spring’ the revenues involved would be significant , especially for developing countries due to the large policy and compliance gaps that exist. The significant amounts involved in GST/VAT related to sales of goods and services in lieu of crypto assets as well as GST/VAT on cross border services like mining services , MEV and NFTs need urgent attention of tax administrations. This would require a policy response which is coherent and compatible with the technological bottom -lines of crypto assets and provides certainty to facilitate compliance . At the same time, they need to be conscious about the tax policy arbitrage opportunities that exist in this ecosystem, which may result in non -compliance and revenue loss. The swift pace of innovation in this field presents a formidable challenge for policymakers to effectively stay abreast to formulate prudent and practical policies . The migration of commercial activity from digital commerce in real world to virtual worlds like metaverses can fundamentally challenge the ideas on which our present tax systems are designed. In near future, tax admini strations might be compelled to have a presence on various blockchain s to collect the due taxes. Capacity development, especially in the context of developing countries, must be at the core of the strategy of tax administrations to deal with this asset class. Having policymakers well versed with the technolog y related aspects of crypto assets , which have profound tax policy implications, can formulate appropriate policies to help realize the revenues associated with asset class. Each auditor who can accurately determine the tax liability of crypto asset owners in his/her jurisdiction can collect the fa ir share of taxes as well as prevent the misuse of this technology for tax evasion, bypassing capital controls and money laundering . Just as issues related to international taxation and transfer pricing remain focus areas for capacity development in many jurisdictions, similar focus needs to be adopted for the taxation related issues of crypto assets. The inherent nature of crypto assets transcends national borders, rendering traditional tax frameworks inadequate in capturing and regulating these assets effectively. The decentralized and pseudonymous nature of blockchain technology poses formidable challenges in tracking and reporting taxable transactions. Effective exchange of taxpayer information among countries and implementation of the travel rule are indispensable for combating tax evasion and money laundering as well as ensuring compliance within the crypto ecosystem . It would also help to avoid non -taxation and double taxation of crypto assets. Without attribution of transactions to natural and legal persons even high -capacity jurisdictions might be unbale to effectively tax this asset class. As this ecosystem continues to evolve, collaborative efforts are essential to address emerging issues such as DeFi, NFTs and the metaverse . The creation of global public digital infrastructure for exchange of such information in real time like the SWIFT network , based on standardized protocols can help to mitigate many practical challenges associated with pseudonymity. Also, the issues related to anonymity enhancing crypto ass ets as well as services like tumblers and mixers need to be addressed as those intending to evade taxes may resort to them as avenues for tax regulatory arbitrage shrink. 105 References Antonopoulos, A. M. (2019). Mastering bitcoin . O'Reilly Media. Antonopoulos, A. M., & Wood, G. (2018). Mastering ethereum: building smart contracts and dapps . O'reilly Media. Aramonte, S., Huang, W., & Schrimpf, A. (2021). DeFi risks and the decentralisation illusion. BIS Quarterly Review , 21. Auer, R., & Claessens, S. (2018). Regulating cryptocurrencies: assessing market reactions. BIS Quarterly Review September . Baer, K., De Mooij, R., Hebous, S., & Keen, M. (2023). Taxing cryptocurrencies. Oxford Review of Economic Policy , 39(3), 478 -497. Brondolo, J. (2021). Administering the value -added tax on imported digital services and low -value imported goods . International Monetary Fund. Brunson, S. D. (2022). Standing on the Shoulders of LLCs: Tax Entity Status and Decentralized Autonomous Organizations. Ga. L. Rev. , 57, 603. Chen, C., & Liu, L. (2022). How effective is China's cryptocurrency trading ban?. Finance Research Letters , 46, 102429. Cong, L. W., Landsman, W., Maydew, E., & Rabetti, D. (2023). Tax -loss harvesting with cryptocurrencies. Journal of Accounting and Economics , 76(2-3), 101607. Durovic, M. (2021). What are smart contracts?: An attempt at demystification. In Digital Technologies and the Law of Obligations (pp. 121 -132). Routledge. Falcao, T., & Michel, B. (2023). Towards a Comprehensive Cryptocurrency Income Tax policy for Countries in Africa. Available at SSRN 4658850 . Fahmy, A.F. (1997). Quantum computing. Reports on Progress in Physics, 61 , 117 - 173. Fischer, M. J., Lynch, N. A., & Paterson, M. S. (1985). Impossibility of distributed consensus with one faulty process. Journal of the ACM (JACM) , 32(2), 374 -382. Gervais, A., Capkun, S., Karame, G. O., & Gruber, D. (2014, December). On the privacy provisions of bloom filters in lightweight bitcoin clients. In Proceedings of the 30th Annual Computer Security Applications Conference (pp. 326 -335). Juhász, P. L., Stéger, J., Kondor, D., & Vattay, G. (2018). A bayesian approach to identify bitcoin users. PloS one , 13(12), e0207000. Kapsis, I. (2023). Crypto -assets and criminality: A critical review focusing on money laundering and terrorism financing. Organised Crime, Financial Crime, and Criminal Justice , 122 -141. Levi, S. D., & Lipton, A. B. (2018, May). An introduction to smart contracts and their potential and inherent limitations. In Harvard Law School Forum on Corporate Governance (Vol. 10). Li, W., Cao, M., Wang, Y., Tang, C., & Lin, F. (2020). Mining pool game model and nash equilibrium analysis for pow -based blockchain networks. IEEE Access , 8, 101049 -101060. Daum, M., & Lucks, S. (2005). Attacking hash functions by poisoned messages: The story of Alice and her boss. Marian, O. (2013). Are cryptocurrencies super tax havens? Mich. L. Rev. First Impressions , 112, 38. Moringiello, J. M., & Odinet, C. K. (2022). The property law of tokens. Fla. L. Rev. , 74, 607. 106 Nguyen, C. T., Hoang, D. T., Nguyen, D. N., Niyato, D., Nguyen, H. T., & Dutkiewicz, E. (2019). Proof - of-stake consensus mechanisms for future blockchain networks: fundamentals, applications and opportunities. IEEE access , 7, 85727 -85745. Shenk, M., Van Kerckhoven, S., & Weinberger, J. (2023). The Crown, the Market and the DAO. Stan. J. Blockchain L. & Pol'y , 6, 244. Shin, D., & Rice, J. (2022). Cryptocurrency: a panacea for economic growth and sustainability? A critical review of crypto innovation. Telematics and Informatics , 71, 101830. Sun, W., Jin, H., Jin, F., Kong, L., Peng, Y., & Dai, Z. (2022). Spatial analysis of global Bitcoin mining. Scientific Reports , 12(1), 10694. Wang, X., & Yu, H. (2005, May). How to break MD5 and other hash functions. In Annual international conference on the theory and applications of cryptographic techniques (pp. 19 -35). Berlin, Heidelberg: Springer Berlin Heidelberg.
{ "id": "2403.15074" }
2405.00051
Arbitrage impact on the relationship between XRP price and correlation tensor spectra of transaction networks
The increasing use of cryptoassets for international remittances has proven to be faster and more cost-effective, particularly for migrants without access to traditional banking. However, the inherent volatility of cryptoasset prices, independent of blockchain-based remittance mechanisms, introduces potential risks during periods of high volatility. This study investigates the intricate dynamics between XRP price fluctuations across diverse crypto exchanges and the correlation of the largest singular values of the correlation tensor of XRP transaction networks. Particularly, we show the impact of arbitrage opportunities across different crypto exchanges on the relationship between XRP price and correlation tensor spectra of transaction networks. Distinct periods, non-bubble and bubble, showcase different characteristics in XRP price fluctuations. Establishing a connection between XRP price and transaction networks, we compute correlation tensors and singular values, emphasizing the significance of the largest singular value. Comparisons with reshuffled and Gaussian random correlation tensors validate the uniqueness of the empirical tensor. A set of simulated weekly XRP prices, resembling arbitrage opportunities across various crypto exchanges, further confirms the robustness of our findings. It reveals a pronounced anti-correlation during bubble periods and a non-significant correlation during non-bubble periods with the largest singular value, irrespective of price fluctuations across different crypto exchanges.
http://arxiv.org/pdf/2405.00051v1
Abhijit Chakraborty, Yuichi Ikeda
physics.soc-ph, q-fin.GN, q-fin.ST
physics.soc-ph
Arbitrage impact on the relationship between XRP price and correlation tensor spectra of transaction networks Abhijit C hakraborty1,2,∔*and Yuichi I keda1,† 1Kyoto University, Graduate School of Advanced Integrated Studies in Human Survivability, Kyoto, 606-8306, Japan 2RIKEN Interdisciplinary Theoretical and Mathematical Sciences Program, Saitama, 351-0198, Japan E-mail: ∔abhijit@iisertirupati.ac.in †ikeda.yuichi.2w@kyoto-u.ac.jp The increasing use of cryptoassets for international remittances has proven to be faster and more cost-e ffective, particularly for migrants without access to traditional banking. However, the inher- ent volatility of cryptoasset prices, independent of blockchain-based remittance mechanisms, intro- duces potential risks during periods of high volatility. This study investigates the intricate dynamics between XRP price fluctuations across diverse crypto exchanges and the correlation of the largest singular values of the correlation tensor of XRP transaction networks. Particularly, we show the im- pact of arbitrage opportunities across di fferent crypto exchanges on the relationship between XRP price and correlation tensor spectra of transaction networks. Distinct periods, non-bubble and bubble, showcase di fferent characteristics in XRP price fluctuations. Establishing a connection between XRP price and transaction networks, we compute correlation tensors and singular values, emphasizing the significance of the largest singular value. Comparisons with reshu ffled and Gaussian random corre- lation tensors validate the uniqueness of the empirical tensor. A set of simulated weekly XRP prices, resembling arbitrage opportunities across various crypto exchanges, further confirms the robustness of our findings. It reveals a pronounced anti-correlation during bubble periods and a non-significant correlation during non-bubble periods with the largest singular value, irrespective of price fluctua- tions across di fferent crypto exchanges. KEYWORDS: cryptoassets, price fluctuation, correlation tensor, singular values 1. Introduction In recent years, cryptoassets have become widely used as an essential means of international remittances [1, 2]. For example, when migrants transfer money earned from working in the destina- tion country to family members in the country of origin, international remittances using cryptoassets are faster and cheaper than the traditional method of transferring money via banks. In particular, for migrants who do not have bank accounts in their economically developing countries of origin, inter- national remittances using cryptoassets are the only practical way to send money. However, the prices of cryptoassets are more volatile than fiat currency at times, and international remittances during pe- riods of high price volatility are said to be risky [3]. The price of cryptoassets is independent of the blockchain-based remittance mechanism for cryptoassets. The price is determined when fiat currency and cryptoassets are exchanged on cryptoasset exchanges. The price of a cryptoasset generally varies from exchange to exchange, as well as the point *Currently at the Department of Humanities and Social Sciences, Indian Institute of Science Education and Research Tirupati, Tirupati 517619, India. 1arXiv:2405.00051v1 [physics.soc-ph] 15 Apr 2024 in time when the cryptoasset is exchanged for fiat currency. Concerning di fferences in the price of cryptoassets at di fferent points in time, if cryptoassets are purchased and remitted abroad to family members in the country of origin when the price of cryptoassets is low, and if cryptoassets can be sold when the price of cryptoassets is high, the family members in the country of origin can obtain more economic value. On the other hand, concerning the price di fference between exchanges, if cryptoassets are purchased on an exchange where the price of cryptoassets is low and remitted abroad to family members in the country of origin, and cryptoassets are sold on an exchange where the price of cryptoassets is high, the family members in the country of origin can obtain more economic value. This is referred as an arbitrage. The application of Random Matrix Theory (RMT) [4–6] has become a prevalent approach in the analysis of financial time series data, encompassing domains like stock prices [7–9], foreign exchange rate [10, 11], and other macroeconomic indicators. Recently, we utilized random matrix theory to study crypto transaction networks [12–16]. Specifically, our method [12, 13] involving correlation tensor spectra provides a crucial understanding of the relationship between XRP price and the largest singular value. Our previous work [12, 13] found that the largest singular value of the correlation tensor for the transaction networks and the price of cryptoassets (on a particular exchange) shows a significant negative correlation. Using this negative correlation may, therefore, reduce the risk of price volatility of cryptoassets at di fferent points in time. However, no attention has so far been paid to the impact of exchanges on the price di fference of cryptoassets. If the price di fference by exchange is more significant than the di fference by point in time, then the negative correlation described above would have no practical significance. In this paper, we first examine the time series of the price of the cryptoasset XRP on representative exchanges to determine the magnitude of the price di fferences by the exchange. It then examines the correlation between the first singular value of the correlation tensor of the transaction network and the price, considering the exchange-specific price di fferences obtained from the actual price time series. Statistical tests test the significance of the correlation. This study aims to answer whether the negative correlations between the largest singular value of the correlation tensor for the transaction networks and the prices of cryptoassets obtained in our previous studies are statistically significant when considering the di fferences in prices between exchanges. The paper is organized as follows. We describe our data in Section 2. In Section 3 we provide a brief description of our methods. Following that, Section 4 presents a comprehensive discussion of the results obtained from our investigation. Finally, in Section 5, we share concluding observations. 2. Data We collect XRP daily close price data from nine di fferent crypto exchanges. The typical 24-hour trade volume on these crypto exchanges is tabulated in Table I. It is important to note that among the nine exchanges, Bittrex and FTX are currently not operational. We additionally present the monthly volumes across three leading cryptoasset exchanges in Fig. A·1. XRP transaction data is collected from the Ripple API. We construct weekly networks of users’ wallets from the transactional data by aggregating the XRP transaction volume for a week between pairs of wallets. It is noteworthy that the weekly transaction networks are weighted and directed in nature. XRP wallets serve as the nodes, and a weighted directed link represents the total XRP transferred from a source wallet to a destination wallet in a week. 3. Methods We provide a concise overview of our methodology in the following subsections. 2 Table I. Crypto exchanges in terms of 24 hour volume on February7, 2024, according to analytics website Coinranking. Exchange 24h V olume ( billion USD) Binance 11.20 OKX 1.39 Huboi 1.20 Kraken 0.85 Bitstamp 0.19 Bitfinex 0.18 Exmo 0.03 Bittrex - FTX - 3.1 Network embedding Network embedding is a technique in machine learning that transforms nodes in a network into low-dimensional vectors, capturing the structural and relational information of the graph. We em- ployed the node2vec algorithm [17] to embed each weekly weighted directed network into a D- dimensional space. Setting the return parameter pand in-out parameter qboth to 1 in the algorithm signifies the use of unbiased random walks. Consequently, every node in the networks is represented by a D-dimensional vector, denoted as Vα i, where iandjare node indices, and αandβare compo- nents in the D-dimensional space. This algorithm encodes both local community structure and global network topology in the learned node embeddings. 3.2 Correlation tensor Utilizing the correlation tensor method and its diagonalization through double Singular Value Decomposition (SVD) o ffers valuable insights into crypto transaction systems. [12–14]. In the weekly XRP transaction networks, we consider Nnodes conducting at least one weekly transaction during the investigated period, categorizing them as regular nodes. Each regular node within the embedding space is presented as a time series of D-dimensional vectors, indicated as Vα i(t). Here, ivaries from 1 toN,tspans from 1 to T, andαranges from 1 to D. The correlation tensor among components of regular nodes is expressed as: Mαβ i j(t)=1 2∆Tt+∆TX t′=t−∆T[Vα i(t′)−Vα i][Vβ j(t′)−Vβ j] σVα iσVβ j, (1) In this equation, we compute the sum across five weekly networks at times t′={t−2,t−1,t,t+1,t+2} within a time window of (2 ∆T+1), where ∆T=2 for our analysis. The terms Vα iandσVα idenote the mean and standard deviation of Vα iover a time window of (2 ∆T+1)=5 weekly networks at times {t−2,t−1,t,t+1,t+2}. It’s crucial to acknowledge that a smaller ∆Tintroduces more noise into the correlation tensor. However, opting for a larger ∆Tis not feasible due to the detailed temporal evolution of the networks. In this analysis, we adopt a dimensionality of D=32. The influence of the correlation tensor on window size (2 ∆T+1) and dimension Dis elaborated in [12]. 3.3 Double singular value decomposition To get the spectrum of the correlation tensor, we employ a double SVD approach as outlined below: We consecutively diagonalize Mαβ i jthrough a bi-unitary transformation, or SVD, first in terms of the ( i j)-index and subsequently the ( αβ)-index. In the initial step, we represent Mαβ i jas a sum of 3 matrices using the SVD technique. Mαβ i j=NX k=1Lαβ ikσαβ kRαβ k j. (2) In the subsequent stage, we proceed to decompose each singular value σαβ kinto a sum of matrices, employing the SVD method: σαβ k=DX γ=1Lαγ kργ kRγβ k. (3) Finally, substituting Eq. 3 into Eq. 2, we get the following expression for Mαβ i j: Mαβ i j=NX k=1DX γ=1ργ k(Lαβ ikRαβ k j)(Lαγ kRγβ k). (4) whereργ kdenotes the N×Dgeneralized singular values, characterized by being both real and positive, due to all elements of the correlation tensor, Mis real. Fig. 1. The daily XRP prices at Huboi (HTX) crypto exchange. The four vertical lines represent the following dates: A) January 6, 2020; B) November 1, 2020; C) February 1, 2021; and D) August 1, 2021. 4. Results We show the daily XRP prices from January 18, 2018, to January 22, 2024, at the Huobi exchange in Fig. 1. The graph illustrates a considerable fluctuation in XRP prices, ranging from 0.136 USD to 4 1.838 USD during this timeframe. Vertical lines on the Fig. mark specific dates: A) January 6, 2020; B) November 1, 2020; C) February 1, 2021; and D) August 1, 2021. In this study, our primary focus lies on the periods AB and CD. These two phases exhibit distinct characteristics regarding XRP price fluctuations. Notably, the XRP price remained relatively stable during period AB. In contrast, period CD showcases a notable surge and decline in XRP prices. We label CD as the ”bubble period” and AB as the ”non-bubble period” for XRP prices. We examine how the XRP price varies among di fferent crypto exchanges in Fig. 2. We have considered daily XRP prices from nine crypto exchanges, which are listed in Table 1. Considering these nine crypto exchanges, we calculated the daily mean XRP price, ⟨XRP/USD⟩(daily), shown in Fig. 2 (a) for the period AD. The daily fluctuation in XRP price among the exchanges is measured by the standard deviation σ. The fluctuation in the daily XRP price among the crypto exchanges is illustrated in Fig. 2 (b). The fluctuation in the daily XRP price among the crypto exchanges was very low during the first ten months of 2020. However, we observed a high fluctuation, even up to 5%, be- yond the first ten months of 2020. We calculated the weekly XRP price, ⟨XRP/USD⟩(weekly), for a particular crypto exchange by averaging the daily XRP price over seven days. The mean ⟨XRP/USD⟩ (weekly) and standard deviation σ(weekly) in the weekly XRP price among the crypto exchanges are shown in Fig. 3 (a) and (b), respectively. The fluctuations are relatively low for weekly XRP prices, as expected. Fig. 2. Mean daily XRP prices, ⟨XRP/USD⟩(daily) and fluctuation σ(daily) over nine di fferent crypto exchanges. To establish a connection between the XRP price and the XRP transaction network, we compute the correlation tensor among the components of the regular nodes, denoted as N. This process is detailed in the Method section. The number of regular nodes is determined to be 465 and 753 for the time periods AB and CD, respectively. Focusing on the regular nodes during period CD, we compute the correlation tensor Mαβ i j(t) for the week t=April 5-11, 2021. The correlation tensor contains a total of N×N×D×Delements. Extracting essential insights from this tensor involves diagonalizing it through a technique known as double SVD, as detailed in Method section. The double SVD is an extension of the standard SVD, typically employed for matrices. By applying double SVD to the 5 Fig. 3. Mean weekly XRP prices, ⟨XRP/USD⟩(weekly) and fluctuation σ(weekly) over nine di fferent crypto exchanges. weekly correlation tensor, Mαβ i j(t), we derive the singular values denoted as ργ k(t). Determining the significance of the empirical correlation tensor requires comparing it with the reshu ffled correlation tensor. To construct the reshu ffled correlation tensor, we perform a reshu ffling of the components within the time window (2 ∆T+1) for the embedded regular node vector Vα i. Utilizing these reshu ffled embedded regular node vectors, we compute the reshu ffled correlation ten- sor according to Eq. 1. Furthermore, we simulate singular values of a Gaussian random correlation tensor utilizing random matrix theory [6, 18–21]. The elements of the Gaussian correlation tensor, denoted as Gαβ i j, are drawn from a Gaussian distribution with a mean of zero and a standard deviation ofσG=0.5, where ( i,j=1,..., N) and (α,β=1,..., D). We opt for σG=0.5 to align with the standard deviation of our empirical correlation tensor. The probability distribution function for the largest singular values of the Gaussian random cor- relation tensor, denoted as (˜ ρ1 k) for all k, is expressed as [13]: P(˜ρ1 k)=1 πσ2 Gq (˜ρ1 1)2−(˜ρ1 k)2. (5) Here, the largest singular value is given by ˜ ρ1 1=2σGD√ Nfork=1. Fig.4 (a) displays the singular values ργ kfor all k∈[1,N] andγ=1, along with the singular values for the reshu ffled correlation tensor. Notably, only the largest singular value ρ1 1for the empirical correlation tensor surpasses the largest singular value of the reshu ffled correlation tensor. We extend this comparison to other singular values ργ kfor all k∈[1,2,3,..., N] andγ∈ [2,3,4,..., D] in Fig.4 (b). Here, we observe that several singular values of the empirical corre- lation tensor surpass the largest singular values of the reshu ffled correlation tensor, although these singular values are notably smaller than ρ1 1. Consequently, their contribution to the correlation tensor is relatively minor. Additionally, we compare the empirical singular values with those of the Gaussian random cor- relation tensor, where the elements are drawn from a normal distribution. The singular values ˜ ρ1 kof the Gaussian random correlation tensor follows Eq. 5. In Fig.4(c), the simulated singular values, ˜ ρ1 k, 6 Fig. 4. Singular value examination of correlation tensors from April 5 to 11, 2021. (a) Comparative analysis of singular values, ρ1 k, for the empirical correlation tensor (depicted by black filled circles) and the reshu ffled correlation tensor (represented by red filled triangles) across all kvalues. (b) Exploration of singular values, ργ k, for the empirical correlation tensor and the reshu ffled correlation tensor, encompassing all kvalues with γ >1. (c) Simulated singular values, ρ1 k, for the Gaussian random correlation tensor (illustrated as green open squares), accompanied by the corresponding analytic curve from Eq. 5 (solid purple line). (d) Examination of simulated singular values, ργ k, for the Gaussian random correlation tensor, considering all values of kwith γ>1. of the Gaussian correlation tensor exhibit a smooth fit with the analytical curve provided by Eq.5. Fig.4 (d) presents the spectrum, ˜ ργ k, of the Gaussian random correlation tensor across all kvalues, whereγranges from 2 to D. It is evident that the singular values of the Gaussian correlation tensors are much smaller than those of the empirical and reshu ffled correlation tensors. The singular values of the reshu ffled correlation tensor tend to approach those of the Gaussian correlation tensor when the time window ∆Tbecomes significantly larger than N[12]. While we present results specifically for the week April 5-11, 2021, it is worth noting that these findings remain qualitatively consistent for any other week. We generate a set of 1000 time series representing weekly XRP prices, denoted as XRP /USD( t) (simulated). These time series are simulated from Gaussian distributions characterized by the mean 7 Fig. 5. Comparison of the mean simulated weekly XRP prices, ⟨XRP/USD(t)⟩(simulated) with the mean correlation coe fficient,⟨r(t)⟩, depicting the relationship between the mean simulated weekly XRP prices, ⟨XRP/USD(t)⟩(simulated) and the largest singular value ρ1 1(t−1). A moving window of 9 weeks is applied for two distinct periods: (a) AB, covering January 6, 2020, to November 1, 2020, and (b) CD, ranging from February 1, 2021, to August 1, 2021. The black curves illustrate the mean simulated weekly XRP prices, ⟨XRP/USD(t)⟩(simulated). The blue curves, marked with green and red triangles, represent the mean correla- tion coe fficient,⟨r(t)⟩, with green triangles denoting significant correlations (p-value <0.05) and red triangles indicating no significant correlations (p-value >0.05). The two lower panels display the corresponding p-values for Pearson correlations. Dotted grey vertical lines delineate the weekly windows. ⟨XRP/USD⟩(weekly) and the standard deviation σ(t) (weekly). To assess the relationship between the simulated weekly XRP prices and the largest singular value ρ1 1(t−1), we employ the Pearson correlation coe fficient. Specifically, we calculate the correlation within a moving time window of length 9 weeks. The Pearson’s correlation coe fficient, denoted as r(t), is defined as follows: r(t)=1 2∆τt+∆τX t′=t−∆τ[y(t′)−⟨y⟩][ρ1 1(t′−1)−⟨ρ1 1⟩] σyσρ1 1, (6) where the variable ycorresponds to XRP /USD( t) (simulated), and we have chosen ∆τ=4. Herein, the symbols σand⟨·⟩denote the standard deviation and mean, respectively, of the quantities within the temporal span of (2 ∆τ+1) weeks. We calculate mean correlation coe fficient⟨r(t)⟩over 1000 simulated set of weekly XRP prices, XRP/USD( t) (simulated). The mean simulated weekly XRP prices are represented as ⟨XRP/USD( t)⟩ (simulated). We investigate the temporal correlation separately for two di fferent periods, AB and CD. The temporal variation of the mean correlation coe fficient⟨r(t)⟩between the simulated weekly XRP prices, XRP /USD( t) (simulated), and the largest singular values ρ1 1(t−1) of the weekly correlation tensors is shown along with the mean simulated weekly XRP prices, ⟨XRP/USD( t)⟩(simulated), in Fig. 5. The anti correlation is high and significant during the period CD. The anti correlation mostly 8 Fig. 6. (a) Distribution of correlation coe fficients between the largest singular value ρ1 1(t−1) and simulated 1000 weekly XRP Price times series XRP/US D (t) for the week, t=April 12−18,2021. (b)Distribution of associated p-values. non-significant during the period AB. This reflects the fact that the formation of a large bubble in the XRP price is indicated by a strong anti correlation with the largest singular value. The findings underscore the impact of XRP price fluctuations across various exchanges. Specifically, the largest singular value, ρ1 1, demonstrates a pronounced and meaningful average negative correlation during the bubble period. Conversely, during non-bubble periods, the average correlation is observed to be non-significant. Our analysis extends to a more detailed exploration of the correlation coe fficients with each sim- ulated weekly XRP price time series, XRP /USD( t) (simulated). Specifically, we focus on two distinct weeks, namely t1andt2, each chosen from distinct periods - t1from April 12-18, 2021, falling within the bubble period CD, and t2from April 27- May 3, 2020, situated within the non-bubble period AB. In Fig. 6, we present the distributions of correlation coe fficients, r(t), along with associated p-values between the largest singular value ρ1 1(t−1) and a simulated set of 1000 weekly XRP Price time series, XRP/USD( t) (simulated), for the week t=t1. Notably, all correlation coe fficients r(t) exhibit a highly negative and statistically significant pattern. Conversely, in Fig. 7, we illustrate the distributions of correlation coe fficients r(t) and corresponding p-values for the same analysis conducted for the week t=t2. Remarkably, all correlation coe fficients r(t) in this case are observed to be non-significant. These findings provide additional a ffirmation that our results remain consistent across each simulated time series. This underscores the notion that price fluctuations across various crypto exchanges do not exert any significant influence on our conclusions. This phenomenon can be attributed to the minimal price variations of XRP across various trading exchanges, leading to limited arbitrage opportunities. Notably, the p-values associated with the correlation between the largest singular value of the corre- lation tensor and the price reveal that this correlation remains significant even when accounting for the price di fferentials of XRP across diverse exchanges, particularly during the bubble period. 9 Fig. 7. (a) Distribution of correlation coe fficients between the largest singular value ρ1 1(t−1) and simulated 1000 weekly XRP Price times series XRP/US D (t) for the week, t=April 27 - May 3 ,2020. (b)Distribution of associated p-values. 5. Conclusions We have examined the impact of XRP price fluctuations across di fferent crypto exchanges on the correlation between the largest singular values of the correlation tensor of XRP transaction networks and the XRP price. For this purpose, we have collected XRP price data from nine di fferent crypto exchanges. We have displayed the daily and weekly prices and their fluctuations over a period of approximately 1.5 years. To uncover the correlation between price and XRP transaction networks, we have calculated the singular values of correlation tensor spectra. Comparing this with a reshu ffled correlation tensor, we found that only the largest singular value is significant. To capture the price impact of fluctuations, we have generated a set of 1000 simulated weekly XRP price time series from a Gaussian distribution with an identical mean and standard deviation as empirical XRP prices. We have found that irrespective of XRP price fluctuations at crypto exchanges, the largest singular value shows a strong, significant anti-correlation during the bubble period and a non-significant correlation during the non-bubble period with the XRP price. Our simulated weekly XRP price mirrors the potential arbitrage opportunities present across various cryptocurrency ex- changes. Upon examination of correlation coe fficients and p-values between the largest singular value and these time series, it becomes evident that arbitrage exerts a non-significant impact. This can be attributed to the relatively low arbitrage opportunities across diverse cryptocurrency exchanges. Appendix A: Cryptoassets monthly exchange volume We illustrate the monthly spot market volume across three prominent cryptoasset exchanges from January 2020 to August 2020 in Fig. A·1. It visually demonstrates the evolution of Binance as it ascends to become the largest crypto exchange during this period. 10 Fig. A·1. Monthly spot market volumes across three major cryptoasset exchanges from https://www. theblock.co/data/crypto-markets/spot . Appendix B: Data sources: •Binance: https://www.investing.com/crypto/xrp/xrp-btc-historical-data •OKX: https://www.investing.com/crypto/xrp/xrp-usd-historical-data •Huboi: https://www.investing.com/crypto/xrp/xrp-usd-historical-data?cid=1058260 •Kraken: https://www.marketwatch.com/investing/cryptocurrency/xrpusd •Bitstamp: https://www.CryptoDataDownload.com •Bitfinex: https://www.CryptoDataDownload.com •Exmo: https://www.CryptoDataDownload.com •Bittrex: https://www.CryptoDataDownload.com •FTX: https://www.CryptoDataDownload.com •Transaction networks: https://xrpl.org/data-api.html#payment-objects . Acknowledgements We express our gratitude to Tetsuo Hatsuda for his valuable comments on our manuscript. YI acknowledges the financial support received from the Ripple Impact Fund (Grant Number: 2022- 247584) for partial support to this work. References [1] D.C. Mills, K. Wang, B. Malone, A. Ravi, J. Marquardt, A.I. Badev, T. Brezinski, L. Fahy, K. Liao, V . Kargenian, and M. Ellithorpe, FEDS Working Paper (2016). 11 [2] L. Rella, Frontiers in Blockchain, 2, 14 (2019). [3] P. Katsiampa, Research in International Business and Finance 50, 322 (2019). [4] M. L. Mehta, Random matrices , Elsevier (2004). [5] M. Potters, and J.-P. Bouchaud, A First Course in Random Matrix Theory: For Physicists, Engineers and Data Scientists , Cambridge University Press (2020). [6] A. M. Sengupta, and P. P. Mitra, Physical Review E 60(3), 3389 (1999). [7] L. Laloux, P. Cizeau, J. P. Bouchaud, and M Potters, PRL, 83, 1467 (1999). [8] V . Plerou, P. Gopikrishnan, B. Rosenow, L. A. N. Amaral, and H. E. Stanley, PRL 83, 1471 (1999). [9] V . Plerou et al. , PRE 65, 066126 (2002). [10] A. Chakraborty, S. Easwaran, and S. Sinha, Phys. A: Stat. Mech. its Appl. 509, 599 (2018). [11] A. Chakraborty, S. Easwaran, and S. Sinha, Acta Phys. Polonica A 138, 105 (2020). [12] A. Chakraborty, T. Hatsuda, and Y . Ikeda Scientific Reports 13, 4718 (2023). [13] A. Chakraborty, T. Hatsuda, and Y . Ikeda arXiv preprint arXiv:2309.05935 (2023). [14] A. Chakraborty, T. Hatsuda, and Y . Ikeda JPS Conf. Proc. 40, 011003 (2023). [15] Y . Ikeda, In Digital Designs for Money,Markets, and Social Dilemmas, 203–220 (Springer, 2022). [16] Y . Ikeda and A Chakraborty, JPS Conf. Proc. 40, 011004 (2023). [17] A. Grover, and J. Leskovec, Proc. ACM SIGKDD int. conf. on Know. dis. and data mining 22855 (2016). [18] A Edelman, and N.R. Rao, Acta numerica 14233 (2005). [19] J.-P. Bouchaud, M. Potters, Financial applications of random matrix theory: a short review , inThe Oxford Handbook of Random Matrix Theory , Eds. G. Akemann, J. Baik, P. Di Francesco, Oxford University Press, Oxford (2015), Chapter 40, 824-850. [20] M. Rudelson, R. Vershynin, Non-asymptotic theory of random matrices: extreme singular values , inPro- ceedings of the International Congress of Mathematicians 2010 (ICM 2010) (In 4 Volumes) Vol. I: Plenary Lectures and Ceremonies Vols. II–IV: Invited Lectures , 1576-1602 (2010), World Scientific. [21] W. Bryc, J. W. Silverstein, Random Matrices: Theory and Applications 9(04), 2050012 (2020), 12
{ "id": "2405.00051" }
1707.07442
Intelligent Vehicle-Trust Point: Reward based Intelligent Vehicle Communication using Blockchain
The Intelligent vehicle (IV) is experiencing revolutionary growth in research and industry, but it still suffers from many security vulnerabilities. Traditional security methods are incapable to provide secure IV communication. The major issues in IV communication, are trust, data accuracy and reliability of communication data in the communication channel. Blockchain technology works for the crypto currency, Bit-coin, which is recently used to build trust and reliability in peer-to-peer networks having similar topologies as IV Communication. In this paper, we are proposing, Intelligent Vehicle-Trust Point (IV-TP) mechanism for IV communication among IVs using Blockchain technology. The IVs communicated data provides security and reliability using our proposed IV-TP. Our IV-TP mechanism provides trustworthiness for vehicles behavior, and vehicles legal and illegal action. Our proposal presents a reward based system, an exchange of some IV-TP among IVs, during successful communication. For the data management of the IV-TP, we are using blockchain technology in the intelligent transportation system (ITS), which stores all IV-TP details of every vehicle and is accessed ubiquitously by IVs. In this paper, we evaluate our proposal with the help of intersection use case scenario for intelligent vehicles communication.
http://arxiv.org/pdf/1707.07442v2
Madhusudan Singh, Shiho Kim
cs.CR
cs.CR
Intelligent Vehicle -Trust Point: Reward based Intelligent Vehicle Communication using Blockchain Madhusudan Singh Yonsei Institute of Convergence Technology Yonsei University Seoul, South Korea msingh@yonsei.ac.kr Shiho Kim School of Integrated Technology, Yonsei University Seoul, South Korea shiho@yonsei.ac.kr Abstract—The Intelligent vehicle (IV) is experiencing revolutionary growth in research and industry, but it still suffers from many security vulnerabilities. Traditional security methods are incapable to provide secure IV communication. The major issues in IV communication, are trust, data accuracy and reliability of communication data in the communication channel. Blockchain technology works for the crypto currency, Bit-coin, which is recently used to build trust and reliability in peer-to- peer networks having similar topologies as IV Communication. In this paper, we are proposing, Intelligent Vehicle -Trust Point (IV-TP) mechanism for IV communication among IVs using Blockchain technology. The IVs communicated data provides security and reliability using our proposed IV-TP. Our IV-TP mechanism provides trustworthiness for vehicles behavior, and vehicles legal and illegal action. Our proposal presents a reward based system, an exchange of some IV-TP among IVs, during successful communication. For the data management of the IV- TP, we are using blockchain technology in the intelligent transportation system (ITS), which stores all IV-TP details of every vehicle and is accessed ubiquitously by IVs. In this paper, we evaluate our proposal with the help of intersection use case scenario for intelligent vehicles communication. Keywords — Blockchain, intelligent vehicles, security, component; ITS I. INTRODUCTION (Heading 1) Current ITS system uses ad-hoc networks for Vehicle communication such as DSRC, WAVE, Cellular Network, which does not guarantee secure data transmission. Currently, vehicle communication application security protocols are based on cellular and IT standard security mechanism which are not up-to-date and suitable for ITS applications. Still many researchers are working to provide standard security mechanism for ITS. Our proposed mechanism is advantages as it is easy to implement, it’s a peer -to -peer communication, it provides a secure and trust environment for Vehicle communication with immutable database and ubiquitous data access in a secure way. Our proposal is based on a very simple concept of using Blockchain based trust environment for data sharing among Intelligent Vehicles using the IV-TP (Intelligent Vehicle -Trust Point). We are exploiting the features of Blockchain i.e. distributed and open ledger which is encrypted with Merkel tree and Hash function (SHA -256) and are based on Consensus Mechanism (Proof of Work Algorithm). We have not mentioned the details of the Blockchain mechanism for our application Intelligent Vehicle data sharing due to the limitation of space. Previously, some researchers combined automotive and blockchain technology but most of them considered applications based on services and smart contracts. However, our proposal concentrates on secure and fast communication between intelligent vehicles (self-driving cars) [5]. We have proposed a unique crypto Intelligent Vehicle -Trust Point (IV- TP) based on blockchain technology. Our proposal explains the management of IV-TP for intelligent vehicles communication and we elicited the benefits of IV-TP and evaluated our proposal with intersection use case scenario for intelligent vehicles communication. We organize our articles as follows; Section II presents the motivation of using Blockchain based trust environment for data sharing among Intelligent Vehicles using the IV-TP (Intelligent Vehicle -Trust Point) over traditional security methods. Section III presents the introduction of blockchain technology and existing work of blockchain technology for Intelligent Vehicles communication. Section IV, describes, our proposed reward based intelligent vehicles communication mechanism based on blockchain technology, Section V, discusses the generation of the intelligent vehicle trust point (IV-TP), Section VI evaluates our proposal with intersection based use case scenarios; Section VII concludes our paper, and discuss our future work for our proposed mechanism II. RELATED WORK A. Blockchain Technology Blockchain technology is distributed, open ledger, saved by each node in the network, which is self-maintained by each node. It provides peer-to-peer network without the interference of the third party. The blockchain integrity is based on strong cryptography that validates and chain blocks together on transactions, making it nearly impossible to tamper with any individual transaction without being detected [6]. Fig.4 shows the Blockchain technology features such as shared ledger, Cryptography, Signed blocks of transactions, and digital signatures [6]. This work was supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea go vernment(MSIP) (No.2017 -0- 00560, Development of a Blockchain based Secure Decentralized Trust network for intelligent vehicles) B. Previous work: Blockchain technology for Intelligent Transportation System. Yong yuan, et.al [7] has proposed the blockchain technology for ITS for establishment of secured, trusted and decentralized autonomous ecosystem and proposed a seven - layer conceptual model for the blockchain. Benjaminet.al [8], have also proposed the blockchain technology for vehicular ad-hoc network (VANET). They have combined Ethereum’ blockchain based smart contracts system with vehicle ad -hoc network. They have proposed combination of two applications, mandatory applications (traffic regulation, vehicle tax, vehicle insurance) and optional applications (applications which provides information and updates on traffic jams and weather forecasts) of vehicles. They have tried to connect the blockchain with VANET services. Blockchain can use multiple other functionalities such as communication between vehicles, provide security, provide peer-to-peer communication without disclosing personal information etc. Ali dorri et.al. [9] have proposed the blockchain technology mechanism without disclosing any private information of vehicles user to provide and update the wireless remote software and other emerging vehicles services. Sean Rowen et.al. [10] have described the blockchain technology for securing intelligent vehicles communication through the visible light and acoustic side channels. They have verified their proposed mechanism through a new session cryptographic key, leveraging both side-channels and blockchain public key infrastructure. We define our blockchain mechanism for the intelligent vehicles communication environment. We propose the secure environment peer-to-peer communication between intelligent vehicles without interfering/disturbing other intelligent vehicles. We also evaluate our proposed mechanism with intersection road scenario based use case. Fig. 2. Proposed blockchain Intelligent Vehicle Communication A. Network enabled Connected device It is an internet -enabled device, which can organize, communicate in VANET such as Smartphone, PDA, Intelligent Vehicles, etc. B. Vehicular Cloud Computing VCC is a hybrid technology that has a remarkable impact on traffic management and road safety by instantly using vehicle resources, such as computing, data storage, and internet decision -making. C. Blockchain supported intelligent vehicles Blockchain consists of a technically unlimited number of blocks which are chained together cryptographically in chronological order. In this, each block consists of transactions, which are the actual data to be stored in the chain. IV. VEHICLES -TRUST POINT GENERATION We propose an Intelligent Vehicles -Trust Point (IV-TP) crypto unique ID that is issued by vehicle seller/authorized dealers. This IV-TP is developed by blockchain crypto mechanism and is similar to bitcoin. This IV-TP is issued to every intelligent vehicle. During communication, vehicles provide IV-TP to build trust in the communication network. The Vehicular networks having blockchain enabled service/user data providers, manages the IV-TP. IV-TP is an encrypted unique number, which uniquely issued to every IV and called as IV-TP ID. Every IV has its own IV-TP ID, generated by the authorized authority. The IV- TP is earned by calculating some computation in the group communication. Greater the IV-TP attained by an IV, higher will be its respect and honor. With the help of IV-TP, one can get the complete history of vehicles (accident history, condition of IV, crime history, etc.). The IV-TP access method is show in figure 6. III. INTELLIGENT VEHICLE -TRUST POINT : REWARD -BASED INTELLIGENT VEHICLES COMMUNICATION USING BLOCKCHAIN We propose a reward based intelligent vehicles communication using blockchain technology. Our proposed mechanism has three basics technologies including communication network enabled connected device, Vehicular Cloud Computing (VCC) and blockchain technology (BT). Authorized Dealer Fig. 3. IV-TP access methods Fig. 1. Blockchain technology Blockchain technology based intelligent vehicles communicate with each other following the steps shown below: We have explained the process of IV-TP sharing and verification in figure 7. A. Key generation Firstly, each IV will generate its private and public key. The blockchain will maintain the public key of all IVs in network and when an IV want to communicate another IV then it will access the public of another IV from the blockchain. B. Digital Signature: Secondly, each vehicle shall digitally sign the message to check integrity and non-repudiation of the message. With digitally signed message, receiver can easily find, that the message is not tampered, and the sender of the message is a valid IV in the network. C. Verification Lastly, the receiver after receiving message identifies the sender by verifying the digitally signed encrypted message. After verification, receiver decrypts the message with the Fig. 4. Message process between two IV  Example Setting of IV network Consider, five intelligent vehicles having IV-TP as IV- 1, IV-2, IV-3, IV-4, & IV-5, respectively. Message is broadcasted from IV-1 to IV-5 as shown in figure 8. Each vehicle broadcasts the message in the network. The blockchain maintains a table shown in Table 1 showing the information of “who communicates with whom”. It does not require any personal information of any IV. It only needs IV-TP of IVs. TABLE 1. COMMUNICATION INFORMATION OF IVS ON BLOCKCHAIN Each IV broadcast the message in the network, using the message framework shown in fig. 9. Fig. 6. Message Framework example In fig 9, IV-1 and IV-5 are IV-TP of intelligent vehicles 1 and 5 respectively. TF is time flag of message broadcasted from intelligent vehicles. D. Consensus Protocols Broadcasted message will be validated only after verification by more than 50% of the network vehicles. This validation process is based on Proof of Driving (PoD) algorithm. PoD provides evidence that the vehicles are legal and are running in the same network shared by the approved vehicles at the communication time. All vehicles communication data will be managed on the vehicular cloud with the IV-TP ID. If in future, IV owners want to sell or change their IVs, then they can access their complete data history via the vehicular cloud. V. USE CASE EVALUATION OF BLOCKCHAIN ENABLED IV COMMUNICATION We evaluate our proposed method with the help of use case. We randomly select the intersection scenario as a use case example for the explanation of our proposal. A. IV communication on Intersection scenario Consider, four IVs (IV-1, IV-2, IV-3, and IV-4) reach the intersection, almost at the same time, as shown in figure 10. In this condition, how our proposed system will help to overcome this situation. Before coming to the intersection, each IV will broadcast its status (a message that they want to cross the intersection) on the network. Every IV near the intersection will receive the broadcasted message in the network. They will first verify the IV-TP ID from VC, and then each vehicle will calculate the received time of the broadcasted message of the vehicles. The vehicle, which first calculates the time, will broadcast the vehicles IV-TP ID, which first arrived at the intersection. Other vehicles will also calculate and verify the first arrived vehicle at the intersection. If everyone agrees, they will give way to the first arrived vehicle to go first or cross the Send public key of IV-1 Blockchain (Store Public key of IV’s in Access public Public ledger) key of IV-1 Decryption process Encryption process Fig. 5. Intelligent Vehicular networks intersection first. In table 2, we show the IV-TP ID of each vehicle and their message broadcasted time, and received time from other vehicles. Fig. 7. Intersection scenario for IV communication According to the table 2 shown below, IV-1 comes first on the Intersection region and IV-3 calculates first so, IV-3 will broadcast the message that IV-1 will move first based on first come first serve approach and IV-3 will also propose move sequences for other vehicles ( IV-1then next IV-2, then next IV-3 and last IV-4). Other IVs (IV-1, IV-2, and IV-4) will calculate the time and agree with the schedule given by IV-3. IV-1 will get some reward in terms of IV-TP with its own IV- TP ID. All this information of the vehicles will be stored on the vehicular cloud with their IV-TP IDs. TABLE 2. TIME SCHEDULE OF MESSAGE BROADCASTED AND RECEIVED BY IV’S IV- TP Message Transmissio n Time (sec.) Message Received by IV-TP Receiver Time (sec.) Reward Note: our proposed mechanism use case is for general vehicles and not specified for special vehicles such as ambulance, police, VIP’s vehicles, etc. In our use case, the vehicles are an intelligent machine (internet connected self-driving vehicles) so, they have enough computational power to calculate time. VI. CONCLUSION In this paper, we have presented a reward based intelligent vehicle communication based on blockchain technology and not for specific services as previously proposed by other researchers. We have proposed crypto IV-TP that will help to improve the privacy of IVs. IV-TP provide fast and secure communication between IVs. It also helps to detect the detailed history of IVs communication. IV communication data will be stored on the VC, as long as the user wants. During any accident, the IVs communication history and their reputations are ubiquitously available to authorized organizations (hospital, insurance company, police etc.) and home via VC. In future, we will simulate our proposed mechanism for multiple vehicle communication scenarios as well as analyze different use cases (suspicious actions by IVs and managing IV-TP etc.) with a solution. ACKNOWLEDGMENT This work was supported by Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIT) (No.2017 -0-00560, Development of a Blockchain based Secure Decentralized Trust network for intelligent vehicles) . REFERENCES 1. G. Yan and S. Olariu, “A probabilistic analysis of link duration in vehicular ad hoc networks,” IEEE Trans. Intell. Transp. Syst., vol. 12, no. 4, pp. 1227–1236, Dec. 2011. 2. D. Singh, M. Singh, I. Singh and H. J. Lee, "Secure and reliable cloud networks for smart transportation services," 2015 17th International Conference on Advanced Communication Technology (ICACT), Seoul, 2015, pp. 358-362. doi: 10.1109/ICACT.2015.7224819 3. S. Olariu, M. Eltoweissy, and M. Younis, “Toward autonomous vehicular clouds,” ICST Trans. Mobile Commun. Comput., vol. 11, no. 7–9, pp. 1–11, Jul.–Sep. 2011. 4. C. Wang, Q. Wang, K. Ren, and W. Lou, “Privacy -preserving public auditing for data storage security in cloud computing,” in Proc. IEEE INFOCOM, San Diego, CA, 2010, pp. 1–9. 5. M. Singh, D. Singh, and A. Jara, "Secure cloud networks for connected & automated vehicles," 2015 International Conference on Connected Vehicles and Expo (ICCVE), Shenzhen, 2015, pp. 330-335. doi: 10.1109/ICCVE.2015.94 6. Satoshi Nakomoto, Bitcoin: A Peer-to-Peer Electronic Cash System, BITCOIN.ORG 3 (2009). 7. Yong Yuan, and Fei-Yue Wang, “Towards Blockchain -based Intelligent Transportation Systems”, 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC), Windsor Oceanico Hotel, Rio de Janerio, Brazil, Nov.1 -4, 2016. 8. Benjamin Leiding, Parisa Memarmoshrefi, and Dieter Hogrefe. 2016. Self-managed and blockchain -based vehicular ad-hoc networks. In Proceedings of the 2016 ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct (UbiComp '16). ACM, New York, NY, USA, 137-140. 9. Ali Dorri, Marco Steger, Salil S. Kanhere, and Raja Jurdak, “Blockchain: A distributed solution to automotive security and privacy”, eprint arXiv:1704.00073, March, 2017 10. Sean Rowan, Michael Clear, Meriel Huggard and Ciaran Mc Goldrick, “Securing vehicle to vehicle communication using blockchain through visible light and acoustic side-channels”, eprint arXiv:1704.02553, April,2017.
{ "id": "1707.07442" }
1712.07564
Transaction Propagation on Permissionless Blockchains: Incentive and Routing Mechanisms
Existing permissionless blockchain solutions rely on peer-to-peer propagation mechanisms, where nodes in a network transfer transaction they received to their neighbors. Unfortunately, there is no explicit incentive for such transaction propagation. Therefore, existing propagation mechanisms will not be sustainable in a fully decentralized blockchain with rational nodes. In this work, we formally define the problem of incentivizing nodes for transaction propagation. We propose an incentive mechanism where each node involved in the propagation of a transaction receives a share of the transaction fee. We also show that our proposal is Sybil-proof. Furthermore, we combine the incentive mechanism with smart routing to reduce the communication and storage costs at the same time. The proposed routing mechanism reduces the redundant transaction propagation from the size of the network to a factor of average shortest path length. The routing mechanism is built upon a specific type of consensus protocol where the round leader who creates the transaction block is known in advance. Note that our routing mechanism is a generic one and can be adopted independently from the incentive mechanism.
http://arxiv.org/pdf/1712.07564v2
Oguzhan Ersoy, Zhijie Ren, Zekeriya Erkin, Reginald L. Lagendijk
cs.CR
cs.CR
Transaction Propagation on Permissionless Blockchains: Incentive and Routing Mechanisms O˘guzhan Ersoy, Zhijie Ren, Zekeriya Erkin and Reginald L. Lagendijk Cyber Security Group, Department of Intelligent Systems, Delft University of Technology Delft, The Netherlands Email: o.ersoy@tudelft.nl, z.ren@tudelft.nl, z.erkin@tudelft.nl, r.l.lagendijk@tudelft.nl Abstract —Existing permissionless blockchain solutions rely on peer-to-peer propagation mechanisms, where nodes in a network transfer transaction they received to their neighbors. Unfortunately, there is no explicit incentive for such transaction propagation. Therefore, existing propagation mechanisms will not be sustainable in a fully decentralized blockchain with rational nodes. In this work, we formally define the problem of incentivizing nodes for transaction propagation. We propose an incentive mechanism where each node involved in the prop- agation of a transaction receives a share of the transaction fee. We also show that our proposal is Sybil-proof. Furthermore, we combine the incentive mechanism with smart routing to reduce the communication and storage costs at the same time. The proposed routing mechanism reduces the redundant transaction propagation from the size of the network to a factor of average shortest path length. The routing mechanism is built upon a specific type of consensus protocol where the round leader who creates the transaction block is known in advance. Note that our routing mechanism is a generic one and can be adopted independently from the incentive mechanism. Index Terms —Blockchain, transaction propagation, incentive, routing. I. I NTRODUCTION In this work, we investigate transaction propagation on per- missionless blockchains with respect to incentive compatibility and bandwidth efficiency. The former, incentive compatibility, is an essential component of permissionless blockchain to maintain its functionality with rational participants [1], [2]. The latter, bandwidth efficiency, is an important factor for efficient use of limited resources available in the network. Although a number of works have studied incentive com- patibility problem of blockchains, they are limited to min- ing mechanism, e.g. investigating selfish mining attacks [3]– [6], and block withholding attacks [7]–[10]. The existing blockchain solutions such as Bitcoin [11] and Ethereum [12] do not pay attention to incentives for transaction propagation in the network. This is due to the fact that the mining networks in those solutions are centralized in practice [13]–[15] and thus, they do not exhibit a fully decentralized structure. There are only two works that address incentive compatibility of transaction propagation in blockchain by Babaioff et al. [16] and Abraham et al. [17]. Unfortunately, both works suggest a specific solution for the incentive compatibility but do not provide a formal definition of the problem. Furthermore,the proposed solutions are also designed for certain network topologies. In terms of bandwidth inefficiency, existing solutions suffer from multiple broadcasting of the same transaction over the network. For example, in Bitcoin, each transaction is received by the nodes (miners) in the network twice: once during the advertisement, i.e. broadcasting of the transaction at the beginning, and once after the validation, i.e. broadcasting of the block including the transaction. While validation is essential since each node in the network stores every validated transaction, the advertisement does not need to be received by all nodes. However, redundancy for advertisement is inevitable in such cases where the round leader who creates the validated block is unknown in advance since the transaction needs to be broadcast to all potential round leaders. In recent blockchain proposals where the round leader is known in advance, what we call first-leader-then-block (FLTB) type of consensus pro- tocols [18]–[21], it is possible to improve bandwidth efficiency by reducing the communication cost by directly routing the transaction to the round leader. To the best of our knowledge, there is no prior work on optimizing bandwidth efficiency for fully decentralized blockchain. In this work, our contribution is three-fold: 1) Sybil-proof incentive compatible propagation mechanism, 2) bandwidth- efficient routing mechanism, and 3) bandwidth and storage efficient transaction propagation mechanism which combines the first two mechanisms. We formally define incentive compatibility of propagation mechanisms in fully decentralized blockchain networks. We show that there is no Sybil-proof and incentive compati- ble propagation mechanism for poorly connected networks (specifically for 1-connected networks). For other network topologies, we find the following incentive compatible and Sybil-proof formula, which distributes the transaction fee among propagating nodes: fk [i]=( FC(1C)i1fori<k; F(1C)k1fori=k; whereFis the fee,kis the length of the propagation path, fk [i] is the share of the ithnode in that path, and Cis a parameter related to the network topology. The incentive mechanism isarXiv:1712.07564v2 [cs.CR] 14 Jun 2018 independent of the choice of consensus protocol and works with any consensus protocol. We propose a routing mechanism compatible with FLTB- type consensus protocols. Our proposal reduces the commu- nication cost of the transaction propagation from the size of the network to the scale of average shortest path length. In a random network topology of more than 500 nodes, we achieve over97% communication cost reduction compared to de facto propagation mechanism for the advertisement. Furthermore, we also present a propagation mechanism which combines our incentive and routing mechanisms in a storage and bandwidth efficient way. For incentive mechanism, our combined protocol requires storing only a single signature to provide the integrity of the path, unlike the existing works, which use a signature chain including signatures of each node in the path. The rest of the paper is organized as follows: Section II presents the related work. Our blockchain model and notations are defined in Section III. Section IV formulates requirements of the incentive problem and computes the generic solution. Smart routing mechanism is presented in Section V and combined with incentive mechanism in Section VI. II. R ELATED WORK The lack of incentive for information propagation in a peer-to-peer network has been known and studied in different settings [22]–[25]. Kleinberg and Raghavan [24] proposed an incentive scheme for finding the answer for a given query in a tree-structured network topology. Li et al. [25] focused on node discovery in a homogeneous network where each node has the same probability of having an answer for the query. In [22], [23], the authors analyzed the incentive problem for multi-level marketing which rewards referrals if the advertise- ment produces a purchase. In these marketing models, the reward is shared among all nodes in the tree including the propagation path. The proposed solutions for peer-to-peer networks [22]–[25] are not applicable for the permissionless blockchains. In peer- to-peer solutions, nodes are asked to provide a specific datum like the position of a peer or the answer to a query. In blockchains, however, transaction propagation is requested to advertise the transactions and eventually place them into a valid block. Alternatively, finding an answer to a query is equivalent to validation of a transaction by round leader in the blockchain. Query propagation in a peer-to-peer network has two main differences compared to a blockchain transaction propagation: nodes do not compete against the ones who forwarded the message to them and nodes cannot generate a response to a query that they do not have the answer, i.e. either they have the right answer or not. Whereas in a blockchain, a block is generated by the round leader and every node is a potential round leader. Essentially, nodes in a blockchain are competitors that have an incentive not to propagate whereas other peer-to-peer nodes do not have the incentive since they cannot generate the answer to the query by themselves. Recently, blockchain oriented propagation mechanisms have been proposed [16], [17]. In [16], Babaioff et al. uncoveredthe incentive problem in the Bitcoin system where a rational node (miner) has no incentive to propagate a transaction. They focused on a specific type of network, namely regular d-ary directed tree with a height H, and assumed that each node has the same processing power. In that setting, the authors proposed a hybrid incentive (rewarding) scheme and proved that it is also Sybil-proof. In [17], Abraham et al. proposed a consensus mechanism, Solidus, offering an incentive to propagate transactions and validated blocks (puzzles). In their incentive mechanism, the amount of processing fee passed to the next node is determined by the sender. Both works rely on a signature chain to prevent any manipulation over the path and thereby, to secure the shares of propagating nodes. [16] and [17] provided analyses of their proposals based on game theory. For the analysis, [16] assumes a tree-structured network which eliminates the case of competition against com- mon neighbors and it is not realistic for blockchain network topology. Whereas, the analysis in [17] is limited to the case of competition between nodes that have common neighbors. For bandwidth efficiency, to the best of our knowledge, there is no prior work for fully decentralized blockchain without dedicated miners (round leaders). Nevertheless, Li et al. [25] presented a distributed routing scheme for peer-to-peer networks. The authors focused on one-to-one routing which is dedicated to a single target node. Whereas in blockchain it needs to be one-to-all routing, which connects the complete network to the round leader. In addition, [25] does not take into account the possibility of a failing routing caused by a failing or malicious node in the routing path. III. O URBLOCKCHAIN MODEL AND NOTATIONS In this section, we describe our blockchain model and the notation used in the paper. Network. It is a dynamic peer-to-peer network means that there are nodes joining and leaving constantly. Unlike to the existing works [16], [17], we do not have a restriction on the network topology. Participants. Each participant is denoted by a node in the net- work. We assume a permissionless blockchain where anyone can participate and contribute to the ledger directly. Moreover, there is no discrimination between nodes (participants), i.e., they can all be the owner of a transaction and propose a block as a miner (round leader). For identification, each node has a public and private key pair and can be validated by his public key. Consensus and leader election. Incentive mechanism defined in Section IV works regardless of the consensus structure. Whereas, the routing mechanism requires special treatment, which we call first-leader-then-block (FLTB ) type consensus protocols. FLTB protocols can be defined as the consensus model where the round leader is validated before he proposes the block. Any leader election mechanism which is independent of the prospective block of that leader can be converted into FLTB type. Examples of the FLTB consensus protocols are Proof-of-Work (PoW) based Bitcoin-NG [18] and several Proof-of-Stake (PoS) based ones [19]–[21]. The rest of the definitions and notations are listed below: Neighbor nodes : Directly connected nodes in the network, adjacency in the graph. Client : The source or the sender of a transaction. Client of a transaction T, denoted by cT. Round Leader : The legitimate node (participant) who constructs the current block. Intermediary Node : A node on the transmission path between the round leader and a client. Lr: The credential of round leader which validates the round leader of round rand can be verified by all nodes in the network. For example, it could be a special hash value in a PoW protocol or the proof of possessing the chosen coin in a PoS protocol. In general, regardless of the consensus mechanism, credentials are linked to the public key of the leader and can be verified by a corresponding signature. (ni): The probability of node nibeing the round leader, also referred as the capacity of node ni. It corresponds to the mining power in PoW or the stake size in PoS protocols and is assumed to be greater than zero for every node in the network. (S)corresponds to the total capacity of the all nodes in set S. NT K: The set of nodes who know (received) the transac- tionT.Nn;T Kpresents the set from the point of view of noden(includingnitself). NT NK: The set of nodes who do not know (received) transactionTyet.Nn;T NK denotes the set from the point of view of node nand includes only the neighbors of n. IV. I NCENTIVE MECHANISM We now describe our incentive mechanism. For the sus- tainable functioning of a fully decentralized blockchain where the nodes (participants) are able to create new identities and behave according to their incentives, propagation mechanism needs to be Sybil-proof and incentive compatible [1]. Conventional incentive instrument, namely transaction fee, almost always refers to the reward of the round leader. Here, we refer transaction fee as it consists of the reward to propagate and to validate transactions. Thereby, rational nodes are encouraged not only to validate transactions but also to propagate them. How to determine the fee is out of the scope of this paper but we assume that each transaction fee is predefined by either the client or a known function. We focus on how to automatically allocate the fee among all the contributors of the process. Fee sharing function (rewarding mechanism). The fee sharing function distributes the transaction fee among the propagating nodes and the round leader. Note that it is highly probable that the same transaction is received more than once by the round leader (and intermediary nodes) because of the propagation mechanism. A rational round leader would choose the one which maximizes his profit. Like existing works [16], [17], the fee sharing function described here deals with thepath which is included in the block. For a transaction (added to the block) with fee Fand propagation path P, the function Fdetermines the shares of each node involved: F:fF;Pg!ffjPj [i]gjPj i=1wherejPjX i=1fjPj [i]=F: jPjdenotes the number of nodes involved in the processing of a transaction with fee F, wherejPj1of the nodes are in the propagation path between the client and the round leader. LetjPj=k, i.e., length of the propagation path of the transaction is k. Then,fjPj [i]denotes the share of ithnode in the propagation path, fk [k]is the share of the round leader andPk i=1fk [i]=F. In the rest of the section, we formulate the necessities of the fee sharing function to incentivize propagation of an arbitrary transactionTwith feeF. An ideal incentive compatible prop- agation mechanism should satisfy the following properties: 1)Sybil-proofness : An intermediary node, as well as the round leader, should not benefit from introducing Sybil nodes to the network. 2)Game theoretically soundness : A transaction should not be kept among a subset of the network. There should be adequate incentive for rational nodes willing to propagate, thence it will eventually reach to the whole network. By formulating these conditions, we achieve the following theorem (where Cis a constant which can be chosen according to the network connectivity): Theorem 1. In a 2- or more connected blockchain network, each rational node n2 NT Kwith(n)< C(Nn;T K) propagates transaction Twithout introducing Sybil nodes, if the transaction fee Fis shared by the following method: fk [i]=( FC(1C)i1for1i<k; F(1C)k1fori=k: Proof of the theorem is divided into the following sections. The requirements are formulated in Sections IV-A and IV-B, and the fee sharing function satisfying them is computed in Section IV-C. A. Sybil-Proofness Here, we use the same definition of Sybil nodes in [16]: fake identities sharing the same neighbors with the original node that do not increase the connectivity of the network. Because of the Sybil-proof consensus algorithm, Sybil nodes do not increase the capacity of their owner, i.e., the probability of being the round leader. We investigate the problem in two different settings: 1- connected networks and the rest. k-connected network means that removal of any k1nodes does not disconnect the network. In 1-connected networks, there exists a bridge which is the only connection between two distinct subnetworks. Though 1-connected network model seems to be unrealistic topology for permissionless blockchains, it is important to see the intuition behind the non-competition effect. 1-connected networks. In 1-connected networks, there are critical nodes which have special positions in the propagation paths between some node pairs. A critical node for a node pair appears in all possible paths between these two nodes. The following lemma shows that non-competing advantage of critical nodes makes it impossible to have a Sybil-proof incentive mechanism for 1-connected networks. Lemma 2 (Impossibility Lemma) .For 1-connected networks, there is no Sybil-proof and incentive compatible propagation mechanism which rewards every node in the propagation path. Proof. Assume that, because of 1-connectedness of the net- work, a node nihave a critical position for a transaction T, meaning that it is certain he will be included in the propagation path of that transaction. If niis one side of the bridge combining two distinct subnetworks, nican be sure that each transaction coming from its subnetwork and validated in the other one has to pass through ni. In Figure 1, we illustrate the two possible paths of a transaction passing through ni. Since the round leader and also intermediary nodes after ni will receive one of the paths, they do not have any choice but accept the path sent by ni.   cT fk [1] fk [i1] fk [i] fk [i+1] fk [k1] fk [k] n1 ni1 ni ni+1 nk1 nk   fk+1 [1] fk+1 [i1] fk+1 [i] fk+1 [i+2] fk+1 [k] fk+1 [k+1] n0 i fk+1 [i+1] Fig. 1. The fee sharing before and after a Sybil node ni0added by ni Now, we investigate the share of a node niwith and without a Sybil node. As given in Figure 1, niis theithnode in the original propagation path and his corresponding fee shares are fk [i]andfk+1 [i]+fk+1 [i+1]. In order to demotivate ni,fk [i]should be greater than or equal to fk+1 [i]+fk+1 [i+1]. Since the position of the node would change for different transactions and rounds, the condition should hold for all positions: 8i2f1;:::;kg; fk [i]fk+1 [i]+fk+1 [i+1] (summing for all i’s)=)kX i=1fk [i]kX i=1fk+1 [i]+kX i=1fk+1 [i+1] (Definition ofF)=)FFfk+1 [k+1]+Ffk+1 [1] =)fk+1 [k+1]+fk+1 [1]F (Definition ofF)=)fk+1 [k+1]+fk+1 [1]=F: Therefore, other than the first propagating node and the round leader, there is no reward for the rest of the propagating nodes which contradicts with rational behavior.Eclipse and partitioning. Note that this monopolized behav- ior is similar to the eclipse and partitioning attacks where the adversary separates the network into two distinct group and controls all the connections between them [26], [27]. Indeed, Lemma 2 can be generalized to the case where the adversary is able to control all the outgoing connections of a client. In that case, there is no way to deviate the adversary from creating Sybil nodes for that specific transaction. We assume that client nodes are able to defend against the eclipse attacks using the countermeasures defined in [26]. In a 2- or more connected network, there are multiple paths between any two nodes. Therefore, we can immediately focus on the multiple paths case where there are competing paths for the same transaction and the round leader includes one of them to the block. A node can profit from a fee by either being an interme- diary node who propagates it or being the round leader who creates the block. We investigate the Sybil-proof conditions of intermediary nodes and the round leader separately. a) Intermediary nodes: An intermediary node can be de- viated by the actions of the nodes who receive the transaction afterwards. Since there are multiple paths, the round leader will receive the same transaction from at least two different paths. In other words, the round leader would decline all but one of the paths (for each transaction). An intermediary node will be demotivated if introducing a Sybil node would increase the chance of rejection of his path. If the share of the round leader decreases as the propagation path length increases, then he will choose the shortest path for each transaction. In that case, introducing Sybil nodes will decrease his chance to be included in the block. Therefore, providing larger gain to the leader for choosing the shortest path is sufficient and can be formulated as fk [k]>fk+1 [k+1]. b) Round leader: In some cases, round leader is de- termined before the block is created or even several rounds earlier [18]–[20]. Since the round leader is guaranteed to be in the propagation path, it is needed to be taken into account separately. In addition, an intermediary node can propagate righteously to his neighbors and then add Sybil nodes for his own mining process. Therefore, in any case (predefined leader or not), it is necessary to make an additional policy for the round leader. In the case of sSybil nodes, share of the round leader will change from fk [k]toPs i=0fk+s [k+i]for somek. In order to deviate the round leader, fk [k]Ps i=0fk+s [k+i]is required. Since the latter condition includes the former one (as fk+1 [k]>0), Sybil proofness condition can be formulated as: 8k1;8s1; fk [k]sX i=0fk+s [k+i]: (1) B. Incentive Compatibility The decision of the propagation of a transaction can be analyzed as a simultaneous move game where each party takes action without knowing strategies of the others. All players (nodes in our case) are assumed to be rational and they decide their actions deducing that the others will also act rationally. Some nodes may cooperate with each other. We assume that colluding neighboring nodes already share every transaction with each other and take actions as one. In other words, they act as a single combined node in the network which can be seen as Sybil nodes. Here, we investigate the propagation decision by comparing the change in the expected rewards for a transaction T. In the beginning, each transaction is shared with some nodes, at least with the neighbors of the client. We will find the required condition to propagate through the whole network. We first investigate the propagation decision by comparing the change in the expected rewards immediately after the action. Then, we extend our analysis with a permanence condition which guarantees that the ones who propagate will not suffer from any future actions. We show that the sharing decision of a node is independent of the probability of his neighboring nodes being the round leader. Instead, it depends on his own probability against the rest who knows the transaction. Lemma 3 (Equity Lemma) .Propagation decision of a node is independent from the neighbors’ capacities. A rational node would propagate to either all of its neighbors or none of them. Proof. Let a transaction Twith feeFis known by a node n, and its distance to the cTisk. The expected reward of node ncan be defined as a function R()whose input corresponds to the capacities of the nodes who received Tfromn, then R(X) =fk [k](n) +fk+1 [k]X (Nn;T K) +X: We show that R()is a monotone function. In order to show that a function is a monotone, it is enough to show that the sign of its derivative does not change in the domain range. For our case, it can be seen that the sign is independent of the input: R0(X)=fk+1 [k] (Nn;T K) +X  fk [k](n) +fk+1 [k]X  (Nn;T K) +X2 =fk+1 [k](Nn;T K)fk [k](n)  (Nn;T K) +X2: SinceR()is a monotone function, then it achieves the maximum value at one of the boundary values. In our case, the boundary values are X= 0 where no neighbors received the transaction and X= Nn;T NK where all neighbors received it. Here, we omit the fact that ()is also a monotone function. Thus, we can say that a rational node maximizes his profit by propagating to either all of its neighbors or none of them. Lemma 3 simplifies to evaluate interfering multiple node decisions which is discussed in the following Lemma.Lemma 4 (Propagation Lemma) .Let a node n2 NT K, Nn;T NK6=;where the distance between nandcTisk. All neighbors of nwill be aware of Tif fk+1 [k] fk [k]>(n) (Nn;T K): Proof. Assume that some of the neighbors of nare not aware ofT, i.e.,Nn;T NK6=;. From Lemma 3, we know that ndid not propagate the transaction to any of his neighbors. Therefore, at the moment, the only way that nprofits from Tis being the round leader with a reward fk [k]. Table I presents expected reward of nwith respect to each possible action of nandNn;T K. The propagation decision of Nn;T K may not include all its members, thereby all possible decisions are taken into account. Here, CN corresponds to the common neighbors of nandNn;T K,NCN 1distinct neighbors ofnandNCN 2distinct neighbors of Nn;T K (who decide to propagate), i.e., CNSNCN 1=Nn;T NK. SinceCN is received the transaction from both nand the rest of the Nn;T K, represents the percentage of the ones in CN decided to continue with the one including n. If all nodes ofNn;T K decide not to propagate with their neighbors, then nwill benefit from propagating Tin the case of fk [k](n)+fk+1 [k](Nn;T NK) (Nn;T K)+(Nn;T NK)>fk [k](n) (Nn;T K)()fk+1 [k] fk [k]>(n) (Nn;T K): If (some) nodes in Nn;T Kdecide to propagate T, thennwill benefit from propagating Tin the case of fk [k](n)+fk+1 [k](NCN 1)+ fk+1 [k](CN) (Nn;T K)+(Nn;T NK)+(NCN 2)>fk [k](n) (Nn;T K)+(CN)+(NCN 2) (=fk+1 [k] fk [k]>(n) (Nn;T K)+(CN)+(NCN 2)andNCN 16=;: Note thatNCN 1=;means that all the neighbors of nare also neighbors ofNn;T Kwho decide to propagate. In addition, the sufficiency condition is independent of . Therefore, in any case, iffk+1 [k] fk [k]>(n) (Nn;T K)is satisfied, then all neighbors of nwill be aware of the transaction. Corollary 5. Letfk+1 [k]Cfk [k]for some constant C2 (0;1).NT Kwill continue to expand until there is no more node n2NT Khaving neighbors in NT NK and satisfying (n)< C(Nn;T K). Remark I. Here, it is possible to define different Ckvalues for each distance k, i.e.,fk+1 [k]Ckfk [k]. One might argue that, as the distance increases, it could be possible to find nodes satisfying(n) (Nn;T K)<Ckfor smallerCkvalues. However, as seen in Section VI, this is not always the case. In addition, the intermediate node may not know the exact distance, thus using the same Cvalue would make the decision simpler. Remark II. Note that the propagation decision is based on Nn;T Kinstead ofNT Ksince the latter one may not be available. This could lead to better consequences for propagation because nodes may predict NT Kgreater than its actual size and decide TABLE I THE EXPECTED REWARD OF nFROM TREGARDING POSSIBLE DECISIONS OF nAND THE REST OF Nn;T K. Nn;T K(excluding n) Decision Not Propagate (some) Propagate nNot Propagatefk [k](n) (Nn;T K)fk [k](n) (Nn;T K)+(CN)+(NCN 2) Propagatefk [k](n)+fk+1 [k](Nn;T NK) (Nn;T K)+(Nn;T NK)fk [k](n)+fk+1 [k](NCN 1)+ fk+1 [k](CN) (Nn;T K)+(Nn;T NK)+(NCN 2) accordingly. Nonetheless, a carefully chosen Cvalue will lead the nodes to share it with an overwhelming probability. Remark III. Being the round leader should be more appealing than being an intermediary node, thus the round leader would try to fulfill the round block capacity to maximize his profit. The system may not work at full capacity if the nodes gain the same reward from propagating instead of validating (as the round leader) transactions. In Corollary 5, the propagation condition is given as fk+1 [k]Cfk [k]. We fix the condition in favor of the round leader: 8k; fk+1 [k]=Cfk [k]: (2) Permanence condition. In the simultaneous move analysis, we investigated one step at a time, i.e., what will happen immediately after the decision of propagation. However, all possible future actions should be taken into account. For example, the sender of a transaction should consider the pos- sibility of the further propagation done by the receiver. From Lemma 3, capacities of the neighboring nodes do not have any influence on the sharing decision. Unless the processing fee share decreases, which is caused by some possible future actions like increased path length, the same lemma will be satisfied. If the share of a propagating node is non-decreasing with respect to the path length, then the ones who propagate will not suffer from any future actions. This can be formulated as 8i<k; fk [i]fk+1 [i]: (3) C. Fee Sharing Function With the equations obtained from the required conditions, we can uniquely determine the fee sharing function and conclude Theorem 1. First, using permanence condition (3), Sybil-proofness condition (1), can be reduced to fk [k] fk+1 [k+1]+fk+1 [k]: 8k1; fk [k]fk+1 [k+1]+fk+1 [k]fk+2 [k+2]+fk+2 [k+1]+fk+1 [k] fk+3 [k+3]+fk+3 [k+2]+fk+2 [k+1]+fk+1 [k] 8s1;fk+s [k+s]+s1X i=0fk+i+1 [k+i]fk+s [k+s]+s1X i=0fk+s [k+i]: Therefore, we can update the Sybil-proofness condition as: 8k1; fk [k]fk+1 [k+1]+fk+1 [k]: (4)Then, we can obtain the following equations: Using (4)kX i=1fi [i]kX i=1fi+1 [i+1]+kX i=1fi+1 [i] =)F=f1 [1]fk+1 [k+1]+kX i=1fi+1 [i] Using (3) =)Ffk+1 [k+1]+kX i=1fk+1 [i]=F =)fk [i]=fk+1 [i]andfk [k]=fk+1 [k+1]+fk+1 [k]:(5) After all, we can finalize the fee sharing function which corresponds to Theorem 1. Using (2) and (5), the share of the round leader can be computed: fk [k]=fk1 [k1](1C) ==F(1C)k1: (6) Using (5) and (6), the share of an intermediary node can be computed: 8i<k; fk [i]=fi+1 [i]=FC(1C)i1: D. Discussion Integration. Implementation of the incentive mechanism should take into account the security and efficiency concerns. The propagation path should be immutable in a way that an adversary cannot add or subtract any node neither in the propa- gation process nor after the block generation. At the same time, storage efficiency is also essential since these path logs are needed to be stored in the ledger by every node. Both existing incentive-compatible blockchain solutions [16], [17] adopted a signature chaining mechanism where each propagated message includes the public key of the receiver and signature of the sender. This protocol prevents any manipulation over the path and thereby secures the shares of each contributor. It requires additional storage which is the signatures of the contributors. Although signature chaining solution requires the knowledge of the public key of the receiver and stores signatures of each sender, it is generic and can be applied to any blockchain. In Section VI, we present a novel and storage-efficient solution which is feasible for FLTB blockchains. It is embedded into routing mechanism and does not require the knowledge of the public keys of the neighboring nodes. Determining Cparameter. Cvalue plays an important role to make sure that there will be incentive to propagate a transac- tion for some nodes until it reaches to the whole network. On the one hand, as the choice for the Cvalue increases, it will be easier to satisfy the propagation condition since there will be more chance to find nodes satisfying (n)< C(NT K). On the other hand, the higher Cvalue, the lower fee remains for the rest of the propagation path. It significantly reduces the fee of the round leader, thereby the incentive. For these reasons, it is required to choose a moderate Cvalue, e.g., a reasonable choice would be C=2 NconwhereNcondenotes default number of connections of a node. For example, in Bitcoin network where Ncon= 8, nodes will propagate unless they assume that their mining power is greater than 25% of the ones having the transaction. Even at the very beginning, at leastNconnodes have the transaction, C=2 Nconsetting would provide overwhelming probability to have nodes willing to propagate according to Corollary 5. Client ( 0capacity) nodes. The main goal of the propagation incentive mechanism is to make sure that the transactions are received by the nodes who are capable of validating transactions as well as creating blocks. For that reason, we mainly focused on the nodes having a capacity greater than zero, i.e.,()>0. Nevertheless, a client node can be seen as a potential capacity node because of the possible propagation of the client. Regarding Lemma 3 and permanence condition (3), a rational node, who decided to propagate, would benefit from propagating to the client nodes as well. At the same time, a client node will always benefit from propagating any transaction since otherwise it will not have any chance to gain a fee. Decentralization effect. In the conventional permissionless blockchains, all rewards including block reward and trans- action fees are given to the block owner. In other words, nodes have only one incentive to participate in the network: being round leader. The less chance individual nodes have to be the round leader, the more they are motivated to join into centralized forms (e.g. mining pools) [13], [28]. Conversely, the transaction fee is shared with all propagators nodes. In addition, since many transactions are included in a single block, aiming processing fees of (some) transactions has significantly more chance than being the round leader. Thereby, it is reasonable to conclude that incentive mechanism would have a positive impact on the decentralization of the permissionless blockchains. V. R OUTING MECHANISM As a non-hierarchical peer-to-peer network, the blockchain ledger is validated by all nodes (miners) individually. This requires broadcasting every data and blocks over the network since every node needs to keep a record of the chain to validate new blocks. In existing permissionless blockchains, every transaction is broadcast throughout the network by the client, then the new block including (some of) these is constructed and broadcast by the round leader. Hence, each transaction is broadcast at least twice. Even more ( inv) messages are sent to check the awareness of the neighbors on the transaction. In Nakamoto-like consensus protocols, the round leader is validated simultaneously with his proposed block where theredundant propagation of the client is inevitable. In FLTB protocols, on the other hand, it is possible to validate the round leader before the block is proposed. It enables to determine a direct route between each client and the round leader. Our routing mechanism in Algorithm 1 finds the shortest paths between clients and the round leader for each round. Instead of sending each transaction to all nodes in the network, it is relayed over the shortest path between the client and the leader. The distance between (almost) any two nodes in a connected graph is dramatically smaller than the size of the network [29]. This is equivalent to cost reduction from O(N)toO(lnN)in a random network of size N[30], [31]. The treat model of routing mechanism we present in this section considers a malicious adversary rather than a rational one. In the routing mechanism, a malicious adversary may try to block or censor some of the transaction propagations. Our protocol can be divided into two parts: Recognition Phase where the routes are determined and Transaction Phase where the transactions are propagated (see Figure 2). First, in the recognition phase, the round leader is recognized throughout the network and his credential is propagated with a standard gossip protocol. Each node nilearns his closest node towards the round leader, gradient node (gni), who is the first node forwarding the credential. In the transaction phase, each client forwards his transaction to (some of) his neighbors. Then, each node, receiving a transaction for the first time, directly transmits to his gradient node. Here, the reason for clients to broadcast to more than one neighbor is that one path could yield a single point of failure. It could be caused by the nodes who fail or maliciously censor some of the transactions. As presented in the experimental results, forwarding transaction to a few of the neighbors (precisely Ncon) is sufficient. Note that, the routing mechanism works under asynchronous network assumptions since a client does not have to wait for all nodes but Nconof his neighbors. Sim- ilarly, for an intermediary node, waiting for the first credential message is enough to propagate received transactions. Lr Lr Lr Lr Lr Lr Lr Lr Fig. 2. The Routing Mechanism. The left one illustrates the Recognition Phase and connections to the gradient nodes are shown with bold solid lines. On the right, three clients and their transaction paths are presented. Locational privacy. There have been several papers investi- gating anonymity in the permissionless blockchain networks, especially for the Bitcoin network [32]–[34]. It is found out that matching public keys and IP addresses can be done by eavesdropping. In this manner, FLTB -based blockchains may expose to DoS (denial-of-service) attacks against to the round Algorithm 1 The Routing Algorithm Recognition Phase Leader provides his credential Lrto his neighbors. forNoden1tonNdo ifFirst time receiving Lrthen Store ID of the sender (gradient) node nj, i.e., gni nj PropagateLrto neighbors. end if end for Transaction Phase Client provides transaction Tto his neighbors. forEach nodenireceivingTdo ifFirst time receiving Tthen Send it to the gni end if end for leader. We want to stress that our routing mechanism does not leak any more locational information about the position of the leader other than the original FLTB protocols do. It just takes advantage of the announcement of the leader which is done exactly in the same manner with the FLTB protocols. Therefore, our routing mechanism does not cause any addi- tional vulnerabilities for DoS-like attacks against the round leader. Yet, it is possible to improve the locational privacy via anonymity phase where the message is first forwarded in a line of nodes, then diffused from there [35]. The extra cost of anonymity would be a few nodes on the line which is still proportional to the logarithmic size of the network. A. Experimental Results In this experiment, we use Barab ´asi-Albert (BA) graph model [30] which simulates peer discovery in a peer-to-peer network. It starts with a well-connected small graph and each new node is connected to some of the previous nodes with a probability proportional to their degrees. Barab ´asi-Albert (BA) [30] and Erd ˝os-R ´enyi (ER) [31] graph models have been used to simulate permissionless blockchains [36], [37]. In our setting, we combine both models where the network starts with a small ER graph and grows according to BA model. We start with 50 nodes in ER model [31] with edge probability of 1=2, meaning that on average each node has 25 connections. Then, each new node is added by connecting with Nconnodes in the network. For each (N;Ncon)pair analyzed, we generated various graphs using Python graph library [38]. Bandwidth gain. In [39], the average shortest path length between any two nodes, i.e., the average path length, of a BA graph is shown to be in the order oflnN ln lnN. Hence, our routing protocol reduces the communication cost of a message transaction from O(N)toO(NconlnN ln lnN). The communication gain is up to 99% for scaled networks (see Figure 3), which can be verified by counting the average number of nodes visited per transaction. Here, we assume thatthe first arriving credential is coming from the node which is closest to the leader with respect to the number of nodes in between. In other words, the delay between any two nodes is computed by the node-distance. In Figure 3, we count only one redundant communication for each transaction. Even more redundancy is caused by the flooding of each transaction because the same transaction is received from different neighboring nodes. In other words, the total redundancy is not N, but on average NconN. In the existing blockchains, this additional redundancy is reduced by the sending the hash of the transaction to check whether the neighbor has it or not. If storage size of the transaction is relative to the size of the hash, then the total number of relays of a transaction would be significantly more than double of the network size. For example, Statoshi info [40], a block explorer of Bitcoin, shows that average incoming bandwidth usage for the transactions ( tx) is,2:87KBps, less than for the checking messages ( inv),4:12KBps (measurements taken between 02:00 AM and 14:00 PM in 13 of Feb. 2018). To conclude, since our mechanism does not suffer from the flooding effect, the actual communication gain would be much higher than the result in Figure 3. 102103104 Network Size (# of nodes)101102103104Bandwidth Usage (# of visited nodes)Our routing mech. with Ncon=8 Our routing mech. with Ncon=16 Standard routing mech. Fig. 3. Communication cost for advertisement of a transaction. Failing transmissions. Since each transaction is propagated among a small set of nodes, we need to take into account the possibility of propagation failure which can be caused by the nodes who fail or censor the transaction. The fail- ure probability of a transaction can be approximated by 1(1h)lnN ln lnN1Ncon wherehdenotes the probability of a node in the network who fails or censors the transaction. These failing nodes are the ones who were present at the recognition phase and failed just afterwards. Long-term offline nodes can be ignored since they will not be chosen as gradient nodes. Thus, Figure 4 demonstrates that our routing is robust against instant network fluctuations. For a blockchain network withN= 10000 andNcon= 8, similar to Bitcoin network, if 30% of the active nodes fail after the recognition phase, only 9%of the transactions will be affected. VI. C OMBINED PROPAGATION MECHANISM In this section, we show how to deploy both of the incentive and routing mechanisms for any blockchain having a FLTB consensus protocol. At first glance, they seem to conflict 102103104 Network size (# of nodes)10-510-410-310-210-1100Failure probability of a propagationh=0.3, Ncon=8 h=0.4, Ncon=8 h=0.3, Ncon=16 h=0.4, Ncon=16Fig. 4. Probability of a transaction failing to be received by the round leader where his the probability of an intermediary node being a failing or censoring node. with each other because the incentive mechanism is used to encourage propagation while the routing mechanism helps to reduce redundant propagation. We combine them in a way that rational nodes are encouraged to propagate only the transactions which are coming from the predefined paths of the routing mechanism. As demonstrated in Algorithm 2, we use the same infrastructure with the routing mechanism, and we include proofs of the intermediary nodes such that their contributions cannot be denied. Each transaction path is defined and secured by a path identifier which includes the public keys of the propagating nodes. Blocks consist of transactions as well as their path identifiers used to claim processing fee shares. In the recognition phase, each intermediary node conveys the leader credential and the path identifier. Incoming and outgoing path identifiers of a node nare denoted by INn andOUTn, which are used to validate and secure the propa- gation path. The round leader `produces the initial identifier, OUT`=H(Lr;PK`), and propagates to his neighbors. Each nodenupdates the identifier coming from the gradient node by OUTn=H(INn;PKn). This operation is done just for the gradient node (first one sending Lr), then updated identifier and the credential are forwarded to the neighbors. Nodes may ignore the subsequent identifiers except a client who stores the firstNconones for the transaction phase. After the routing paths are determined, each client delivers the signed transaction and the incoming identifier to his Ncon neighbors. The first receiving nodes, check the signature, then add their public keys to the transaction and forward it to their gradient nodes. From that point, each intermediary node in the path first checks the validity of the path via the public keys included and his own identifier, then forwards the transaction including his public key to the gradient node. Once transactions are received by the round leader, he includes the valid ones into the block. The block consists of the credential, hash of the previous block and valid transactions with their paths. Then, the block is propagated throughout the network. Incentive for block propagation. As a consequence of the in-Algorithm 2 The Combined Propagation Algorithm Recognition Phase LeaderlpropagatesLr forEach nodenido ifFirst time receiving LrandINn0then ifLris valid then AssignINni INn0and gradient node as n0 ComputeOUTni=H(INni;PKni) PropagateLrandOUTnito neighbors. end if end if end for Transaction Phase ClientcTprovidesSigned (T;INcT)(andPK=;) to the firstNcongradient nodes. forEach nodenireceivingSigned (T;INcT)andPK do ifFirst time receiving Tthen ifSignature path holds then UpdatePK PKSfPKnig SendSigned (T;INcT)andPK to the gradient node. end if end if end for centive and routing mechanisms, intermediary nodes also have incentives to propagate the block since they share processing fees. Even more, the ones who are closer to the leader would have higher motivation since they probably gain from more transactions. Storage efficiency. Any propagation incentive mechanism requires additional data storage than the data itself to keep track of the propagation path. Previous works having incentive [16], [17] utilize signature chains where each node signs the transaction and the public key of the receiver. Therefore, additional to the transaction, the signature package of each propagating node is included. On the other hand, our solution with the path identification benefits from the recognition phase of the routing protocol, and its additional storage requirement is only the public keys of propagating nodes and a signature of the client. Since the ability to claim propagation reward and the validation of the path need to be available, our propagation mechanism demands minimal storage components. Privacy of the intermediary nodes. Signature chains and the proposed path identifier yield a direct connection between nodes network ID and their public keys. Unlike signature chains, our solution consists of two phases and the propagating nodes validate it by checking whether their input is preserved or not. This enables us to tackle the privacy issue by replac- ing plain public keys with commitments. Instead of directly including a public key, each node can obscure it in a simple commitment with a random number ( CTi=H(PKi;Ri)). All verifications can be handled with the commitments while claiming propagation reward requires to reveal it. The com- mitment version uses the same network structure without compromising the identities of the nodes except clients and the round leader. The location of the round leader and clients will be known to their neighbors. They may need to update their key pairs or replace their connections for the next rounds. VII. C ONCLUSION In this work, we investigated two transaction propagation related problems of blockchains: incentive and bandwidth efficiency. We presented an incentive mechanism encourag- ing nodes to propagate messages, and a routing mechanism reducing the redundant communication cost. We analyzed the necessary and sufficient conditions provid- ing an incentive to propagate messages as well as to deviate participants (nodes) from introducing Sybil nodes. We studied different types of network topologies and we showed the impossibility result of the Sybil-proofness for the 1-connected model. We formulated the incentive-compatible propagation mechanism and proved that it obeys the rational behavior. We presented a new aspect of the consensus algorithms, namely first-leader-then-block protocols. We proposed a smart routing mechanism for these protocols, which reduces the redundant transaction propagation from the size of the network to the scale of average shortest path length. Finally, we combined incentive and routing mechanisms in a compatible and memory-efficient way. Future work and open questions. In Section IV-D, we mentioned the parameter choice and possible outcomes of the incentive mechanism. Detailed effect of incentive model and parameter choice are left as a future work. Another open question is the effect of the incentive mechanism on the topology of the network. Nodes would benefit from increasing their connection to contribute more transaction propagations, i.e., it would increase the connectivity of the network. Using that result, a rigorous analysis on the choice of the Cparameter can be done. Finally, there are open problems regarding the economics of the transaction fee: analyzing the accuracy of the de facto formulas in the existing cryptocurrencies with respect to the cost of the propagation and validation and investigating the possible impacts of the sharing fee like decentralization effect. VIII. A CKNOWLEDGMENT This work was supported by NWO Grant 439.16.614 Blockchain and Logistics Innovation. REFERENCES [1] G. W. Peters and E. Panayi, “Understanding modern banking ledgers through blockchain technologies: Future of transaction processing and smart contracts on the internet of money,” in Banking Beyond Banks and Money . Springer, 2016, pp. 239–278. [2] Y . Sompolinsky and A. Zohar, “Bitcoin’s underlying incentives,” Commun. ACM , vol. 61, no. 3, pp. 46–53, Feb. 2018. [Online]. Available: http://doi.acm.org/10.1145/3152481[3] I. Eyal and E. G. Sirer, “Majority is not enough: Bitcoin mining is vulnerable,” in Financial Cryptography and Data Security - 18th International Conference, FC 2014, Christ Church, Barbados, March 3-7, 2014, Revised Selected Papers , ser. Lecture Notes in Computer Science, N. Christin and R. Safavi-Naini, Eds., vol. 8437. Springer, 2014, pp. 436–454. [Online]. Available: https://doi.org/10.1007/978-3-662-45472-5 28 [4] A. Sapirshtein, Y . Sompolinsky, and A. Zohar, “Optimal selfish mining strategies in bitcoin,” in Financial Cryptography and Data Security - 20th International Conference, FC 2016, Christ Church, Barbados, February 22-26, 2016, Revised Selected Papers , ser. Lecture Notes in Computer Science, J. Grossklags and B. Preneel, Eds., vol. 9603. Springer, 2016, pp. 515–532. [Online]. Available: https://doi.org/10.1007/978-3-662-54970-4 30 [5] K. Nayak, S. Kumar, A. Miller, and E. Shi, “Stubborn mining: Generalizing selfish mining and combining with an eclipse attack,” in IEEE European Symposium on Security and Privacy, EuroS&P 2016, Saarbr ¨ucken, Germany, March 21-24, 2016 . IEEE, 2016, pp. 305–320. [Online]. Available: https://doi.org/10.1109/EuroSP.2016.32 [6] A. Gervais, G. O. Karame, K. W ¨ust, V . Glykantzis, H. Ritzdorf, and S. Capkun, “On the security and performance of proof of work blockchains,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 24-28, 2016 , E. R. Weippl, S. Katzenbeisser, C. Kruegel, A. C. Myers, and S. Halevi, Eds. ACM, 2016, pp. 3–16. [Online]. Available: http://doi.acm.org/10.1145/2976749.2978341 [7] M. Rosenfeld, “Analysis of bitcoin pooled mining reward systems,” CoRR , vol. abs/1112.4980, 2011. [Online]. Available: http://arxiv.org/ abs/1112.4980 [8] N. T. Courtois and L. Bahack, “On subversive miner strategies and block withholding attack in bitcoin digital currency,” CoRR , vol. abs/1402.1718, 2014. [Online]. Available: http://arxiv.org/abs/1402.1718 [9] I. Eyal, “The miner’s dilemma,” in 2015 IEEE Symposium on Security and Privacy, SP 2015, San Jose, CA, USA, May 17-21, 2015 . IEEE Computer Society, 2015, pp. 89–103. [Online]. Available: https://doi.org/10.1109/SP.2015.13 [10] S. Bag, S. Ruj, and K. Sakurai, “Bitcoin block withholding attack: Analysis and mitigation,” IEEE Trans. Information Forensics and Security , vol. 12, no. 8, pp. 1967–1978, 2017. [Online]. Available: https://doi.org/10.1109/TIFS.2016.2623588 [11] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” 2008. [12] G. Wood, “Ethereum: A secure decentralised generalised transaction ledger,” Ethereum Project Yellow Paper , vol. 151, 2014. [13] A. Gervais, G. O. Karame, V . Capkun, and S. Capkun, “Is bitcoin a decentralized currency?” IEEE Security & Privacy , vol. 12, no. 3, pp. 54–60, 2014. [Online]. Available: https://doi.org/10.1109/MSP.2014.49 [14] A. Miller, J. Litton, A. Pachulski, N. Gupta, D. Levin, N. Spring, and B. Bhattacharjee, “Discovering bitcoins public topology and influential nodes,” May 2015. [15] A. E. Gencer, S. Basu, I. Eyal, R. van Renesse, and E. G. Sirer, “Decentralization in bitcoin and ethereum networks,” CoRR , vol. abs/1801.03998, 2018. [Online]. Available: http://arxiv.org/abs/1801. 03998 [16] M. Babaioff, S. Dobzinski, S. Oren, and A. Zohar, “On bitcoin and red balloons,” in ACM Conference on Electronic Commerce, EC ’12, Valencia, Spain, June 4-8, 2012 , B. Faltings, K. Leyton-Brown, and P. Ipeirotis, Eds. ACM, 2012, pp. 56–73. [Online]. Available: http://doi.acm.org/10.1145/2229012.2229022 [17] I. Abraham, D. Malkhi, K. Nayak, L. Ren, and A. Spiegelman, “Solidus: An incentive-compatible cryptocurrency based on permissionless byzantine consensus,” CoRR , vol. abs/1612.02916, 2016. [Online]. Available: http://arxiv.org/abs/1612.02916 [18] I. Eyal, A. E. Gencer, E. G. Sirer, and R. van Renesse, “Bitcoin-NG: A scalable blockchain protocol,” in 13th USENIX Symposium on Networked Systems Design and Implementation, NSDI 2016, Santa Clara, CA, USA, March 16-18, 2016 , K. J. Argyraki and R. Isaacs, Eds. USENIX Association, 2016, pp. 45–59. [Online]. Available: https:// www.usenix.org/conference/nsdi16/technical-sessions/presentation/eyal [19] I. Bentov, A. Gabizon, and A. Mizrahi, “Cryptocurrencies without proof of work,” in Financial Cryptography and Data Security - FC 2016 International Workshops, BITCOIN, VOTING, and WAHC, Christ Church, Barbados, February 26, 2016, Revised Selected Papers , ser. Lecture Notes in Computer Science, J. Clark, S. Meiklejohn, P. Y . A. Ryan, D. S. Wallach, M. Brenner, and K. Rohloff, Eds., vol. 9604. Springer, 2016, pp. 142–157. [Online]. Available: https://doi.org/10.1007/978-3-662-53357-4 10 [20] I. Bentov, C. Lee, A. Mizrahi, and M. Rosenfeld, “Proof of activity: Extending bitcoin’s proof of work via proof of stake [extended abstract],” SIGMETRICS Performance Evaluation Review , vol. 42, no. 3, pp. 34–37, 2014. [Online]. Available: http://doi.acm.org/10.1145/2695533.2695545 [21] A. Kiayias, A. Russell, B. David, and R. Oliynykov, “Ouroboros: A provably secure proof-of-stake blockchain protocol,” in Advances in Cryptology - CRYPTO 2017 - 37th Annual International Cryptology Conference, Santa Barbara, CA, USA, August 20-24, 2017, Proceedings, Part I , ser. Lecture Notes in Computer Science, J. Katz and H. Shacham, Eds., vol. 10401. Springer, 2017, pp. 357–388. [Online]. Available: https://doi.org/10.1007/978-3-319-63688-7 12 [22] F. Drucker and L. Fleischer, “Simpler sybil-proof mechanisms for multi-level marketing,” in ACM Conference on Electronic Commerce, EC ’12, Valencia, Spain, June 4-8, 2012 , B. Faltings, K. Leyton-Brown, and P. Ipeirotis, Eds. ACM, 2012, pp. 441–458. [Online]. Available: http://doi.acm.org/10.1145/2229012.2229046 [23] Y . Emek, R. Karidi, M. Tennenholtz, and A. Zohar, “Mechanisms for multi-level marketing,” in Proceedings 12th ACM Conference on Electronic Commerce (EC-2011), San Jose, CA, USA, June 5-9, 2011 , Y . Shoham, Y . Chen, and T. Roughgarden, Eds. ACM, 2011, pp. 209– 218. [Online]. Available: http://doi.acm.org/10.1145/1993574.1993606 [24] J. M. Kleinberg and P. Raghavan, “Query incentive networks,” in 46th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2005), 23-25 October 2005, Pittsburgh, PA, USA, Proceedings . IEEE Computer Society, 2005, pp. 132–141. [Online]. Available: https://doi.org/10.1109/SFCS.2005.63 [25] C. Li, B. Yu, and K. P. Sycara, “An incentive mechanism for message relaying in unstructured peer-to-peer systems,” Electronic Commerce Research and Applications , vol. 8, no. 6, pp. 315–326, 2009. [Online]. Available: https://doi.org/10.1016/j.elerap.2009.04.007 [26] E. Heilman, A. Kendler, A. Zohar, and S. Goldberg, “Eclipse attacks on bitcoin’s peer-to-peer network,” in 24th USENIX Security Symposium, USENIX Security 15, Washington, D.C., USA, August 12-14, 2015. , J. Jung and T. Holz, Eds. USENIX Association, 2015, pp. 129–144. [Online]. Available: https://www.usenix.org/conference/ usenixsecurity15/technical-sessions/presentation/heilman [27] M. Apostolaki, A. Zohar, and L. Vanbever, “Hijacking bitcoin: Routing attacks on cryptocurrencies,” in 2017 IEEE Symposium on Security and Privacy, SP 2017, San Jose, CA, USA, May 22-26, 2017 . IEEE Computer Society, 2017, pp. 375–392. [Online]. Available: https://doi.org/10.1109/SP.2017.29 [28] Y . Lewenberg, Y . Bachrach, Y . Sompolinsky, A. Zohar, and J. S. Rosenschein, “Bitcoin mining pools: A cooperative game theoretic analysis,” in Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2015, Istanbul, Turkey, May 4-8, 2015 , G. Weiss, P. Yolum, R. H. Bordini, and E. Elkind, Eds. ACM, 2015, pp. 919–927. [Online]. Available: http://dl.acm.org/citation.cfm?id=2773270 [29] J. Travers and S. Milgram, “The small world problem,” Phychology Today , vol. 1, pp. 61–67, 1967. [30] R. Albert and A.-L. Barab ´asi, “Statistical mechanics of complex net- works,” Reviews of Modern Physics , vol. 74, no. 1, p. 47, 2002.[31] P. Erd ¨os and A. R ´enyi, “On the evolution of random graphs,” Publ. Math. Inst. Hung. Acad. Sci , vol. 5, no. 1, pp. 17–60, 1960. [32] A. Biryukov, D. Khovratovich, and I. Pustogarov, “Deanonymisation of clients in bitcoin P2P network,” in Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security, Scottsdale, AZ, USA, November 3-7, 2014 , G. Ahn, M. Yung, and N. Li, Eds. ACM, 2014, pp. 15–29. [Online]. Available: http://doi.acm.org/10.1145/2660267.2660379 [33] G. C. Fanti and P. Viswanath, “Deanonymization in the bitcoin P2P network,” in Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA , I. Guyon, U. von Luxburg, S. Bengio, H. M. Wallach, R. Fergus, S. V . N. Vishwanathan, and R. Garnett, Eds., 2017, pp. 1364–1373. [Online]. Available: http://papers.nips.cc/paper/ 6735-deanonymization-in-the-bitcoin-p2p-network [34] P. Koshy, D. Koshy, and P. D. McDaniel, “An analysis of anonymity in bitcoin using P2P network traffic,” in Financial Cryptography and Data Security - 18th International Conference, FC 2014, Christ Church, Barbados, March 3-7, 2014, Revised Selected Papers , ser. Lecture Notes in Computer Science, N. Christin and R. Safavi-Naini, Eds., vol. 8437. Springer, 2014, pp. 469–485. [Online]. Available: https://doi.org/10.1007/978-3-662-45472-5 30 [35] S. B. Venkatakrishnan, G. C. Fanti, and P. Viswanath, “Dandelion: Redesigning the bitcoin network for anonymity,” POMACS , vol. 1, no. 1, pp. 22:1–22:34, 2017. [Online]. Available: http://doi.acm.org/10. 1145/3084459 [36] T. Neudecker, P. Andelfinger, and H. Hartenstein, “Timing analysis for inferring the topology of the bitcoin peer-to-peer network,” in 2016 Intl IEEE Conferences on Ubiquitous Intelligence & Computing, Advanced and Trusted Computing, Scalable Computing and Communications, Cloud and Big Data Computing, Internet of People, and Smart World Congress (UIC/ATC/ScalCom/CBDCom/IoP/SmartWorld), Toulouse, France, July 18-21, 2016 . IEEE Computer Society, 2016, pp. 358–367. [Online]. Available: https://doi.org/10.1109/ UIC-ATC-ScalCom-CBDCom-IoP-SmartWorld.2016.0070 [37] M. Berini Sarrias, “Bitcoin network simulator data explotation,” Master’s thesis, Universitat Oberta de Catalunya, 2015. [38] T. Nepusz, “IGraph: High performance graph data structures and algorithms,” 2006–. [Online]. Available: http://igraph.org/python/ [39] A. Fronczak, P. Fronczak, and J. A. Hołyst, “Average path length in random networks,” Physical Review E , vol. 70, no. 5, p. 056110, 2004. [40] Statoshi Team, retreived 13 Feb. 2018. [Online]. Available: http: //statoshi.info [41] B. Faltings, K. Leyton-Brown, and P. Ipeirotis, Eds., ACM Conference on Electronic Commerce, EC ’12, Valencia, Spain, June 4-8, 2012 . ACM, 2012. [Online]. Available: http://dl.acm.org/citation.cfm?id=2229012 [42] N. Christin and R. Safavi-Naini, Eds., Financial Cryptography and Data Security - 18th International Conference, FC 2014, Christ Church, Barbados, March 3-7, 2014, Revised Selected Papers , ser. Lecture Notes in Computer Science, vol. 8437. Springer, 2014. [Online]. Available: https://doi.org/10.1007/978-3-662-45472-5
{ "id": "1712.07564" }
1709.07790
A Petri Nets Model for Blockchain Analysis
A Blockchain is a global shared infrastructure where cryptocurrency transactions among addresses are recorded, validated and made publicly available in a peer- to-peer network. To date the best known and important cryptocurrency is the bitcoin. In this paper we focus on this cryptocurrency and in particular on the modeling of the Bitcoin Blockchain by using the Petri Nets formalism. The proposed model allows us to quickly collect information about identities owning Bitcoin addresses and to recover measures and statistics on the Bitcoin network. By exploiting algebraic formalism, we reconstructed an Entities network associated to Blockchain transactions gathering together Bitcoin addresses into the single entity holding permits to manage Bitcoins held by those addresses. The model allows also to identify a set of behaviours typical of Bitcoin owners, like that of using an address only once, and to reconstruct chains for this behaviour together with the rate of firing. Our model is highly flexible and can easily be adapted to include different features of the Bitcoin crypto-currency system.
http://arxiv.org/pdf/1709.07790v2
Andrea Pinna, Roberto Tonelli, Matteo Orrú, Michele Marchesi
cs.CR, cs.DC, cs.SE
cs.CR
A Petri Nets Model for Blockchain Analysis Andrea Pinna1, Roberto Tonelli1, Matteo Orr u2and Michele Marchesi3 1Department of Electrical and Electronic Engineering (DIEE), University of Cagliari, Piazza D'Armi, 09100 Cagliari, Italy. 2Computer Science Dept. | Technion - IIT Technion City, CS Taub Building, 3200003 Haifa, Israel. 3Department of Mathematics and Computer Science, University of Cagliari, Via Ospedale 72, 09124 Cagliari, Italy. Email: a.pinna@diee.unica.it, roberto.tonelli@dsf.unica.it, matteo.orru@cs.technion.ac.il, marchesi@unica.it A Blockchain is a global shared infrastructure where cryptocurrency transactions among addresses are recorded, validated and made publicly available in a peer- to-peer network. To date the best known and important cryptocurrency is the bitcoin. In this paper we focus on this cryptocurrency and in particular on the modeling of the Bitcoin Blockchain by using the Petri Nets formalism. The proposed model allows us to quickly collect information about identities owning Bitcoin addresses and to recover measures and statistics on the Bitcoin network. By exploiting algebraic formalism, we reconstructed an Entities network associated to Blockchain transactions gathering together Bitcoin addresses into the single entity holding permits to manage Bitcoins held by those addresses. The model allows also to identify a set of behaviours typical of Bitcoin owners, like that of using an address only once, and to reconstruct chains for this behaviour together with the rate of ring. Our model is highly exible and can easily be adapted to include di erent features of the Bitcoin crypto-currency system. Keywords: Blockchain; Petri Nets; Bitcoin; Cryptocurrency Received 00 January 2009; revised 00 Month 2009 1. INTRODUCTION The Bitcoin electronic cash system was conceived in the 2008 by the scientist Satoshi Nakamoto [1] with the aim of producing digital coins whose control is distributed across the Internet, rather than owned by a central issuing authority, such as a government or a bank. It became fully operational on January 2009, when the rst mining operation was completed, and since then it has constantly seen an increase in the number of users and miners. At the beginning, the interest in the bitcoin digital currency was purely academic, and the exchanges in bitcoins were limited to a restricted elite of people more interested in the cryptography properties than in the real bitcoin value. Nowadays bitcoins are exchanged to buy and sell real goods and services as happens with traditional currencies. The main distinctive feature introduced by the Bitcoin system is the Blockchain, that is a sharedinfrastructure where all bitcoins transfer are recorded. Value transfer is called transaction and is an operation between users. To send and receive bitcoins, a user needs an alphanumeric code, called address . Address represents the users' account and to each address a private key is associated. No personal information is usually recorded in a Blockchain and for this reason Bitcoin protocol o ers pseudo-anonymity. Di erent blockchains have been implemented so far and the technology often seems to work properly, even if most of them su er from a lack of software engineering principles application in their development and deployment [3]. To date blockchain is the technology underlying Bitcoin, but is also the technology underlying other cryptocurrencies, such as Ethereum, Litecoin and MaidSafeCoin. By analyzing this technology we can obtain many statistical properties of its associated cryptocurrency network, as well as the typical behavior The Computer Journal , Vol. ??, No. ??, ????arXiv:1709.07790v2 [cs.CR] 26 Sep 2017 2 A. Pinna, R. Tonelli, M. Orr u, M. Marchesi of users, for example how users move bitcoins between their various accounts in order to preserve and reinforce their privacy. In this paper, we introduce a novel approach, based on a Petri Net (PN) model to analyze the Blockchain. Using Petri Net we de ne a single useful model, a unique data structure, by which not only all main information about transactions and addresses are represented, as can be done using other approaches, but also the overall architecture and scheme of blockchain transactions are fully and natively implemented through a well known and powerful formalism. We assume that each address corresponds to a place and each Bitcoin transaction corresponds to a transition in a Petri Net (also known as Place/Transition Net or P/T Net). The proposed model, called \Addresses Petri net", allows to quickly collect information on the identities owning Bitcoin addresses and to recover measures and statistics on the Bitcoin network. We reconstruct an Entities network associated to Block Chain transactions gathering together Bitcoin addresses into the single entity holding permits to manage Bitcoins held by those addresses. In other words, the use of PN formalism easily allows us to construct rst the\Addresses Petri Net", and then the \Entities Petri Net". Even if we analyzed only a few features of the bitcoin blockchain, our model perfectly ts blockchain behavior and features and can potentially be used to exploit the full behavior of this new technology and to preform statistical simulations on it. There a number or advantages in using PN as a model to investigate the Bitcoin transactions. First of all, the well-de ned algebraic model allows to manage straightforward algorithms to perform several structural analysis. Second, it allows to represent natively the Blockchain transactions, providing an alternative graphical repre- sentation of the Blockchain scheme. Finally, it opens up the possibility to perform dy- namic simulations to forecast the future properties of the Bitcoin network. In fact the model allows the creation of higher level representations of the Bitcoin ledger, by grouping addresses in speci c places and obtaining transition ring statistics. The remaining of the paper is organized as follows. In Section 2 an overview of related works is reported, in Section 3 we illustrate the Bitcoin payment system, in Section 4 we describe our model. Speci cally, Section 4.2 illustrates the Addresses Petri Net associated to Bitcoin addresses. Section 4.3 describes Entities Petri Net and the proposed algorithm used to infer from the Entites Petri Net, the Addresses Petri Net. In Section 5 we illustrate the application of our model to the Bitcoin system and present the results. Finally, Section 6 presents the discussion and Section 7 concludes.2. RELATED WORKS In these last years, the unique features of Blockchain have attracted more and more researchers and several are the works that examined this shared data collection. Even if several papers focused on heuristics and algorithms in order to analyze and cluster Bitcoin addresses identifying network of users, no researcher focused on the analysis of the blockchain by modeling it within the framework of Petri Nets. This idea was carried on as the topic of the Ph.D. program of A. Pinna [2] and some preliminary results are reported in [4]. Consequently this section on related works will mainly focus on the works in literature which investigate blockchain technology, structure and properties from the point of view of dynamical networks. Ron and Shamir [5] analyzed and measured the Blockchain up to the block number 180,000, from January 03th, 2009 to May 13th, 2012, by using a model called transaction graph . They analyzed the distribution of the number of transaction per address and introduced the concept of entity as a group of addresses of the same owner. They ran a variant of a Union-Find graph algorithm in order to nd sets of addresses belonging to the same user. First, they constructed the transaction graph, the address graph, and then constructed the contracted transaction graph and the entity graph. Thanks to this entity graph, the authors determined various statistical properties of each entity, such as the distribution of the accumulated incoming bitcoins, the balance of bitcoins updated to May, 13th 2012, and the balance of the number of transactions per entity and per address. The authors obtained, for both the original and the clustered network (the entities network), some statistical properties which are typically encountered in complex networks [6, 7, 8, 9]. In addition they investigated the most active entities in the system. In [5], the users' common practice to move bitcoins between their various accounts (addresses) is tracked as a good practice to preserve and reinforce user's anonymity. As a preliminary result , the potentiality of the Petri Nets formalism for investigating users behavior has been discussed in [4]. That work focused on the identi cation of \disposable addresses" (addresses used just once). Many other strategies adopted in order to preserve and reinforce users' anonymity have been analyzed in literature. Some of these strategies improve the privacy and anonymity including mixing protocols, are discussed in CoinShue [10]. CoinJoin and CoinParty [11] investigated the use of anonymity networks obtained by using software like TOR. Biryukov et al. in [12] found countermeasures to block users who access in the Bitcoin network using Tor or other similar protocols. Reid and Harrigan [13] studied how an attacker could make a map of users' coins movement tracing their addresses and gathering information from The Computer Journal , Vol. ??, No. ??, ???? A Petri Nets Model for Blockchain Analysis 3 others sources. They also focused in the topology of addresses network and transaction network, showing their properties of complex networks. These results can be compared to those reported in [14] for clustering other software networks. Androulaki et al [15] analyzed how users try to reinforce theirs anonymity in the Bitcoin system. In particular, they studied the technique of changing address and how this makes more complex the network. Meiklejom et al. [16] proposed an heuristic to recognize the changing addresses method, and to keep track of potential criminal users, thanks to information extracted from the Blockchain and from other sources, such as forums. They also tried to give a name to each address. Kondor et al. [17] focus on retrieving the Blockchain transaction network, studying its features over the time. Recently, Lishke and Fabian [18] proposed an exploratory analysis of the Blockchain and of Bitcoin users. They studied the economy and main features of the Bitcoin cash system, but did not focus neither on the concept of "entity", nor on disposal addresses, as we do in this work. Their analysis revealed the major bitcoin businesses and markets, giving insights on the degree distribution (probability density function and complementary cumulative distribution function) of bitcoin transactions for several aggregations of time, businesses categories and country. These distributions revealed the existence of a scale-free network, and hence that Bitcoin network follows a power law distribution although not over the entire period. These results can be compared to those reported in [9] about the mechanism of power law distribution generation in similar technological networks and have also been replicated in this paper, where we found that the distributions of several investigated quantities follow a power-law very closely (see section 5 for details). The surge of interest regarding Bitcoin led scientists to face several other topics, in addition to the Blockchain analysis, Cocco et al. in [19] presented an agent-based arti cial cryptocurrency market in which heterogeneous agents buy or sell cryptocurrencies, in particular Bitcoins. The model proposed is able to reproduce some of the real statistical properties of the price returns observed in the Bitcoin real market. In [20] the same authors proposed an agent-based arti cial cryptocurrency market in order to model the economy of the mining process. Starting from GPU's generation they reproduce some "stylized facts" found in real- time price series and some core aspects of the mining business. Other works focus on security and privacy issues [21], cryptographic problems [22], social aspects of the Bitcoin users behavior [23, 24, 25] and on and economic aspects and the implication of the cryptocurrency phenomenon, see for instance works [26]. FIGURE 1. Simpli ed transaction schema. 3. THE BITCOIN CASH SYSTEM: AN OVERVIEW. The Blockchain is a distributed and global database where all information about bitcoins' transactions are stored, but the term can also be used to denote the technology behind. It works as a public ledger which is composed of an ordered sequence of blocks. Blocks are validated and inserted into the chain and each block contains data about a variable number of validated transactions. Bitcoin transactions originally represented value transfer of a cryptocurrency but they can be used to transfer any kind of information. Each transaction is composed by an input section and an output section, which report a list of addresses4and their associated values meaning bitcoins. The information associated to each transaction in the Blockchain are characterized by: A list of inputs, each one containing one previous transaction; A non empty list of outputs (possibly coinciding with some inputs); The associated amounts to each output. Users can own one or more addresses, and address creation is costless. Users' anonymity is preserved since the Blockchain stores only addresses, and neither user names nor other identity information are required to create an address. Bitcoin clients (software which allow users to interact with the Bitcoin network) manage the addresses in digital wallets . Wallets store both public and private keys which are used to receive and to send payments. Fig. 1 shows a simpli ed scheme of the interaction among transactions (called i) and addresses (called j). In the gure seven transactions and six addresses are involved in the chains. The balance of bitcoins owned by users is associated to their own address, 4An alphanumeric string of 32 elements which can begin only with "1" or "4", e.g. 1JQfV fzfxtfUb 9kexSt 7mHhcHxX 6fyBJ 5A: ; The Computer Journal , Vol. ??, No. ??, ???? 4 A. Pinna, R. Tonelli, M. Orr u, M. Marchesi and it is equivalent to the total value of the unspent transaction outputs (i.e., UTXO s) that the address has received and not spent yet. Each square in the input section represents a spent transaction. Each square in the output section that is not connected to the input of another transaction, represents an UTXO. For example, the addresses 1; 2; 4and 5have one or more UTXOs, so their balance is not null. Each transfer of bitcoins among users implies changes on the balances associated to the respective addresses, similarly to what happens with a traditional bank account. Transaction requests wait in a \pending" status in the peer-to-peer network until they are validated by miners, in order both to prevent frauds and to avoid double spending. Technical details about the network implementation can be found in [1]. Brie y, users interact with the Bitcoin network through clients which establish a Internet connection with some other client. Each client become a node of the peer-to-peer network and, potentially, each node of the Bitcoin system has the same importance of any other one. Nodes listen for transaction requests arriving from other nodes. A transaction between addresses can be accepted only if it satis es the following constraints: The transaction's inputs must correspond to the outputs of previous unspent transactions (UTXO) with same address and values; The transaction's output total value must be less or equal to the total value of the inputs, with a possible di erence being the transaction fee. The validation procedure, called mining , is carried out by miners and consists in solving the (computation- ally hard) problem of determining an hash key starting with a given number of zeros ( nonce ) starting from a set of transactions requests as input. This hash key will be associated to the new validated block. In addition to transaction data, each new block contains several in- formation such as the hash code of the previous block in the Blockchain, its height (its associated progressive number), and the IP address of the miner. Mining the blocks is a competitive task which involves all the miners in the peer-to-peer network, which try to be the rst to validate the next block. The rst miner who is able to validate a new block5receives a reward in bitcoins (presently 12.5 BTC). A special kind of nodes in the peer-to-peer network, called full nodes , check the new blocks, speci cally their validity, also verifying that they respect the Bitcoin's core consensus rules6. The diculty of this computational problem is automatically adjusted by the network, from time to time, in order to maintain constant, on a statistical base, the release rate of the 5who become a part of the main branch of the Blockchain, after eliminating the forks using a consensus rule. 6https://en.bitcoin.it/wiki/Full-nodenew blocks (about a new one every ten minutes) and the consequent release of new Bitcoins. In Fig. 1, we can identify the mining transactions. They are the transactions 1;2;4and6, which are the transactions having their input section empty. Nowadays, miners are gathered in pools to optimize the computational e ort and to make constant the incoming of pool members. The whole Bitcoin system can be seen as a special typology of nancial system in which, according with its technical speci cation, everyone can be a trader. Real time nancial instruments, made possible by cloud and grid computing[27] could aid users in that operations. 4. THE MODEL: THE BLOCKCHAIN PETRI NET The proposed model is based on the Petri Net formalism. Using the Petri Net formalism obtained a lightweight but useful representation of the Blockchain that we call the Addresses Petri Net. Petri Net is an oriented graph, made of two types of nodes, place and transitions, where each node can be connected only with a node of the other type. Also the Bitcoin Blockchain can be modeled as an oriented graph, made of two types of nodes, addresses and transactions, where the latter activate transfers of tokens between the former, and thus can be natively modeled by using the Petri Net formalism for places and transitions, respectively. 4.1. Petri Nets: A brief introduction A Petri Net [28] is a formalism to describe systems based on a bipartite graph with two kind of nodes called places and transitions . For this reason, Petri nets are also called Place Transition nets (P/T nets ). Connections between nodes are made by directed arcs. Each node can be only connected to nodes of the other type and there are two types of arcs: arcs ingoing into a transition, called pre-arc , and arcs outgoing from a transition, called post-arc . One of the advantages of using Petri Nets is that they are also well described by an algebraic formalism. The formalism provides sets to de ne the nodes, and matrices to describe the arcs. A Petri Net Nis a quadruple de ned as described below. Definition 4.1. N= (P;T;Pre;Post ) (1) where P=fp1;p2;:::;pmgis the set of mplaces, T=ft1;t2;:::tngis the set of ntransitions, Pre:PT!Nis the Pre-incidence function Post :PT!Nis the Post-incidence function. The Computer Journal , Vol. ??, No. ??, ???? A Petri Nets Model for Blockchain Analysis 5 PreandPost incidence functions are usually de ned by mean of matrices with dimension equal to mn. Each element of these matrices contains the number of arcs which connect places with transitions. The Pre matrix contains the numbers of ingoing (to transitions) arcs for each place-transition pair. Vice versa, each element ofPost matrix is the number of outgoing arcs for each place-transition pair. Petri nets are also a powerful formalism to describe discrete event systems, as is the case of blocks generation in the Blockchain. To model the state of a system, a marking M(i.e., a vector which de nes the distribution of tokens in places) is needed. Transitions are aimed at modifying the marking of the system. Transitions absorb tokens from places connected with Pre-arcs and produce tokens for the places connected with Post-arcs, an operation called ring of a transition. Petri net and the associated initial marking form the Network system de ned as hN;M0i, where M0is the initial marking. In this work we do not describe a speci c state of the Blockchain so we do not need to de ne a marking. 4.2. Addresses Petri Net In order to obtain the Petri net algebraic representation for the Blockchain we provide a set theory description of the two Blockchain elements involved, e.g., addresses and transactions. We denoteA=f 1; 2;:::; mgthe nite set of m addresses registered either as inputs or outputs in the Blockchain, and with  = f1;2;:::;ngthe set of ntransactions validated by the Blockchain. LetN = (P ;T;PreA;PostA ) be the network of addresses, where: P =fp 1;p 2;:::;p mgis the set of mplaces with each place p associated to one and only one address 2A; T=ft1;t2;:::tngis the set of ntransitions where each transition tis associated to one and only one transaction 2; PreA : is the pre-incidence matrix; PostA : is the post-incidence matrix. The setsP andTcan be recovered by browsing all the addresses and transactions validated in the Blockchain, which are publicly available, and inserting a new place every time a new address is found, and a new transition every time a new bitcoin transaction is encountered. In order to build the matrices PreA andPostA let us consider one transaction in the Blockchain and the associated transition t. In the Blockchain, a transaction consists in a set of input and output addresses with the associated amounts in bitcoin. We denote by In()A FIGURE 2. Addresses Petri Net equivalent to the simpli ed transaction chains in Fig. 1 PreA =2 66666640 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 7777775p 1 p 2 p 3 p 4 p 5 p 6 t1t2t3t4t5t6t7 FIGURE 3. Pre-incidence matrix of the Petri net for the example in Fig. 1. the set of input addresses, and by Out() A the outputs set. For each address 2In() we consider its associated place p and we add a pre-arc leaving fromp and arriving to the transition tassociated to . At the same time, for each address 2Out() we add a post-arc leaving from transition tassociated to  and arriving to the place p associated to . For each couple (p ;t) to which a pre-arc has been added we set PreA (p ;t) = 1, while for each couple ( p ;t) to which apost-arc has been added we set PostA (p ;t) = 1. This model does not carry all the information available in the Blockchain (e.g. transactions amounts) and so it cannot completely represent Blockchain's behavior and properties. However, in contrast with the methodologies used in other works, in which di erent models were applied in order to analyze the Blockchain overloading the analysis, our approach natively represents the Blockchain structure and dynamics and includes into one single model and into one single data structure di erent features and properties of the Blockchain. Consider for instance the simpli ed transaction chains in Fig. 1. There are seven transaction and six places. The equivalent Address Petri Net is composed by six places and seven transitions. The graphical representation is shown in Fig. 2. This Net is de ned by a set of places P =fp 1;p 2;:::;p 6g, a set of transactions T=ft1;t2;:::t 7gand by the pre-andpost- incidence matrices PreA andPostA , shown in Fig. 3 and 4. These matrices can be straightforwardly used to perform several analysis of the network. For example, we can compute the di erence between post and pre- The Computer Journal , Vol. ??, No. ??, ???? 6 A. Pinna, R. Tonelli, M. Orr u, M. Marchesi PostA =2 66666641 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 03 7777775p 1 p 2 p 3 p 4 p 5 p 6 t1t2t3t4t5t6t7 FIGURE 4. Post-incidence matrix of the Petri Net for the example in Fig. 1. incidence matrices and consider one of its row. The number of not null elements in such row is equal to the number of UTXO contained in the address related to the place corresponding to the row. This number must be greater than or equal to zero, and if it is equal to zero the balance of the associated address is null. In addition, we can easily compute the number of times that an address appears as input in a transaction. In fact, all the not-zero elements of the row iof the matrix PreA provide the number of times the address corresponding to the place p =ihas been the input of a transaction. As other example we consider the case of di erent transactions occurring in di erent moments which share the same input set and the same output set. Using our model, these transactions can be represented with only one transition, which is characterized by a ring clock. This feature, along with the creation of the entities net, can be useful to enable a dynamical and high level analysis of the Bitcoin system. We will show in the following that our model allows to easily detect such sets of transactions. 4.3. Entities Petri Net and algorithm to manage them It is quite common for Bitcoin users to hold more than one address in order to manage bitcoin exchanges and anonymity more easily. As in [5] we de ne an entity as the person, the organization, the group of people, or the rm that hold the control of the bitcoins associated to a set of addresses. All addresses appearing in an input section of a single transaction must be owned by the same entity. This is because, in order to activate the bitcoin transfers from those addresses, the same entity must hold all the private keys of all corresponding wallets In order to build the Entities Petri Net Nwe associated each entity to a collection of addresses, associating places p2PinNto a set of places p of N . We denote by E=f1;2;:::;kgthe set of entities where each entity2Eis a nite set of addresses such thatA. The matrix PreA hasmrows, one for each place, and ncolumns, one for each transition. Given a transition t we consider the array PreA (;t) which is the column ofLet beT=Tthe set of unexplored transitions and E=;the set of entities. whileT6=; 1. take at:t2Tand remove this form T 2. lete=; 3. for alli:PreA (pi;t)6= 0 doe=e[fpig 4. lete=ethe set of unexplored places 5. whilee6=; (a) take a place p2e (b) letT0=; (c) for all j:PreA (p;tj)6= 0 doT0= T0[ft0g (d) for allt02T0 i. letenew=; ii. for allh:PreA (ph;t0)6= 0 doenew= enew[fphgendfor iii.e=e[enewande=e[enew iv.e=enp v.T=Tnt0 endfor endwhile 6.E=E[e endwhile FIGURE 5. Algorithm used to compute the set Eof entities. PreA with index t. Its non zero elements correspond to placesp with PreA (p ;t) = 1, namely places with outgoing arcs pre-arc towards transition t. These placesp correspond to input addresses 2In(), for the transaction corresponding to transition t. As a consequence, all these places belong to one single entity 2E. It is also possible that a given address appears in two or more input sections, together with other addresses. In this case, the entity must be composed by all the addresses in these input sections. To build the Entities Petri Net, E, we applied the following algorithm. We denote unexplored place , every place which is an element of the current entity, but is not yet processed. In fact, in order to nd other places to be inserted into the current entity e, each unexplored place must be processed as in step 5. In this step, all the other placesphelement ofeare found. Eache2Eis a set of places of the Addresses Petri Net or, equivalently, is the representation of a set of addresses that compose an entity. The algorithm creates the set Eof entities. The correctness of the algorithm can be discussed analyzing The Computer Journal , Vol. ??, No. ??, ???? A Petri Nets Model for Blockchain Analysis 7 Entity inE Places e1fp 1g e2fp 2;p 3;p 6g e3fp 4g e4fp 5g TABLE 1: Entity in the Entities Petri Net of the simpli ed transaction chains in Fig. 1. PreE =2 6640 0 1 0 0 0 0 0 0 0 0 2 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 03 775p1 p2 p3 p4 t1t2t3t4t5t6t7 FIGURE 6. Pre-incidence matrix of the Entities Petri Net for the simpli ed transaction chains in Fig. 1. the two requirements: the nite number of iterations and the correctness of the solution. Firstly, the number of iterations is limited by the number of transitions. In fact, the set of unexplored transitions will be emptied every time a transition will be examined. In particular, both in step 1 and in step 5.d.v. a transition is removed from T. Regarding the second point, because place determination occurs by evaluating the pre-arcs connected to each transition, entities are correctly created and populated. Furthermore, it is possible to check that the resulting entities form mutually disjoint sets and that the result of the entities' union contains all the places of the Addresses Petri net. We can de ne N, the Entity Petri Net, as N= (P;T;PreE;PostE ), wherePis the set of places that are associated one to one with elements of the entities setE. The de nition includes the set Tof transitions. This is the same that we have in the Addresses Petri Net. In order to compute PreE andPostE rows, we take every entity e2E. Given an entity e, we rst extract fromPreA and then from PostE the rows correspond- ing to every place p 2e. Then, for each matrix, we sum these rows together. In this way, we obtain one new row for both PreE andPostE , corresponding to the entitye. For instance, looking at the Address Petri Net in Fig. 2 and at the PreA matrix, we recognize that places p 2;p 3andp 6can be joined to an entity, and that hence their related addresses 2; 3; 6are owned by the same person. In total four entities are recognized as described in Table 1. To each entity, a place p2Pis then associated. In the following tables, PreE andPostE of the example resulting Entities Petri Net are shown in Fig. 6 and 7. In Fig 8, the graphic representation of the Entities Petri net is shown.PostE =2 6641 1 0 0 0 0 0 0 0 2 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 13 775p1 p2 p3 p4 t1t2t3t4t5t6t7 FIGURE 7. Post-incidence matrix of the Entities Petri Net for the simpli ed transaction chains in Fig. 1. FIGURE 8. The Entities Petri Net of the simpli ed transaction chains in Fig.1 5. RESULTS Blockchain can be explored mainly using two ap- proaches. The rst consists in downloading all binary data from the peer-to-peer network, and in identifying transactions, addresses and other information by using protocol instructions. The second one consists in ex- ploring speci c websites where the decoded Blockchain is shown, and application interfaces or other utilities, are provided to explore it. We followed the second ap- proach and downloaded blocks as formatted JSON les from the website blockchain.info . We parsed the rst 180,000 blocks in the Blockchain, corresponding to a period of about three and half years, from January 2009 to March 2012, in order to compare our results with those in [5]. The data processing performed in this work is carried on in steps as shown in Fig. 9. All implementations are made with R language and RStudio IDE. The analyzed portion of Blockchain was processed without speci c hardware resources and processing time to elaborate the rst 180,000 blocks has been about 250 hours long. The average time required to compute a block is 5 seconds. The single block computation time depends on the number of addresses contained in it, considering every address in input or in output of a transaction. The procedure requires about ten seconds to elaborate eight addresses and does not increase signi cantly even when matrices become larger. The situation has quite changed for blocks validated in subsequent periods. Currently a block contains about three thousand addresses and the time to com- pute it using our Petri Nets modeling is about six minutes long. Generally the time to elaborate an ad- dresses is larger if the address has not yet been found and the search algorithm must add it into the matrices. The Computer Journal , Vol. ??, No. ??, ???? 8 A. Pinna, R. Tonelli, M. Orr u, M. Marchesi Json processing Transactions processingPT net computing $tx[[105]]$out[[16]]$type[1] 0$tx[[105]]$out[[16]]$addr[1] "1GzHUt4mC2KSH5HHapbB4M49SFGMLBBqbs"$tx[[105]]$out[[16]]$value[1] 10000$tx[[105]]$out[[16]]$n[1] 15$tx[[105]]$out0f5a9de425ede9d278f4e13519231d0bb648e188ac"$tx[[105]]$out[[17]]$tx[[105]]$out[[17]]$spent[1] TRUE Files of blocksA transaction Chains computingEntities net computingUsers computationTransaction data request Net dataEntity data Chains dataBlockchain.info API FIGURE 9. Diagram of the data processing path for the study of Blockchain The downloaded JSON les, elaborated and saved in a R structure, occupies 2.8GB and after the elabora- tion the addresses Petri net occupies about 800MB in RAM. Saving corresponding data in a Rdata le, it occupies about 40MB. 5.1. Results of the Addresses Petri net We found 3,730,480 di erent addresses and 3,142,019 transactions, which in our model correspond to the number of rows and columns of matrices PreA orPostA . We associated the addresses to the corresponding places in the set P in the Petri Net N . From the analysis of the matrices PreA and PostA , simply counting the non zero elements, we found 4.575.888 pre-arcs and 7.352.494 post-arcs in total. The number of non zero elements L(i) on the corresponding row of PreA (p i;) represents the number of transitions occurring from the place p i through a pre-arc . The number of non zero elements L(i) in the row PostA (p i;) represents the number of transitions connected to the place p ithrough a post-arc . Using this formalism our model easily takes into account the total number of bitcoin transactions in input and output of each address. Figures 10 and 11 report the Complementary Cumu- lative Distribution Functions (CCDF) de ned as the probability PthatP(L)> x, whereLis de ned as the number of non-zero elements in the matrices PreA andPostA respectively. The gures show an uneven distribution of inand outtransactions among addresses so that there are many addresses with few transactions and relatively few addresses with many transactions, displaying a typical power-law distribution. Such distribution has been straightforwardly recovered using the Petri Nets formalism. In table 2 we report the ten most used addresses, found summing up the number of non zero elements in PreA rows to that of non zero elements in PostA rows. L= number of non zero elements in a PreA row ‒P(L)>xFIGURE 10. CCDF of the length L for PreA . L= number of non zero elements in a PostA row ‒P(L)>x FIGURE 11. CCDF of the length L for PostA . Our analysis identi es also 609,295 addresses with only zeros in PreA rows, and at least one non null element in PostA rows, namely 609,295 addresses never used to spend (until the 180,000 block), but only to accumulate. Part of them are still unused up to today. Table 3 reports the rst ten ranked by the number of post-arcs , namely the number of incoming transactions, and shows their current balances, as checked from The Computer Journal , Vol. ??, No. ??, ???? A Petri Nets Model for Blockchain Analysis 9 blockchain.info: four of these (row 1,7,8 and 9 in the tab) are never used again, and can be called dormant . Their balance can be quite high, since they've been used like sort of bitcoin deposits. In order to analyze users practices for preserving anonymity, we focused on recognizing chains of transaction where disposable addresses are involved. As already mentioned, a disposable address is an address used only two times: one time to receive bitcoins and one time to give away all these bitcoins. Transactions which involve disposable addresses have only a disposable address in the input section and one disposable address in the output section, together with other addresses. Usually, in the output section only two addresses in total are present. This practice is commonly used and can be performed automatically. Users who adopt it, usually give rise a long chain of transactions without waiting for con rmation. With our model, disposable addresses and their chains can be easily traced analyzing PreA andPostA matrices. To identify the involved transactions we identi ed the correspondent transitions having only a pre-arc and two post-arc in the Addresses Petri Net. These are transitions that correspond to columns of PreA having only one non zero element and to columns ofPostA having two non zero elements but in di erent rows. Disposable addresses are likewise identi ed through the correspondents places. Give a place, the correspondent row of the Pre and Post matrices must have one and only one non zero element. Under these conditions, it is possible that an Ad- dress Petri net transition becomes a cyclic transition in the Entities Petri net. In fact, in this case, output addresses and input addresses of the associated trans- action are ascribed to the same entity. This indicated that the owner of the transaction wanted to move coins between addresses in his possession. The algorithm developed to build the chains of this kind of transitions is described in detail in Appendix A. Applying this algorithm we found 122,155 disposable address chains, involving 1,350,010 di erent addresses and transactions. Figure 12 reports the CCDF of the chains lengths, showing that these are unevenly distributed, with the longest chain counting 3,658 transactions. We also counted how many times users repeat the same transaction in terms of the same set of addresses in input section and the same set of addresses in output section. In our model identifying these repetitions is trivial. When two or more transactions involve identical sets of addresses in input and output, the corresponding transitions are connected with the same places both in pre and in post matrices. In fact, taking the matrix PA= (PreA;PostA ), in which the two matrices are concatenated in column, L= length of a transaction chainP(L)>xFIGURE 12. CCDF of the distribution of the length of the chains. N= number of transaction in a setP(N)>x FIGURE 13. CCDF of the size L of grouped transaction set for the address net for each column tjit is possible to check the existence of other identical columns. We found that about 11% of transactions are a repetition of another one. These represent repeated transfer of bitcoins from one group of addresses to another group of addresses where the two groups are always the same, revealing steady uxes of bitcoins. Figure 13 reports the CCDF for the sizes of these groups of repeated transactions. 5.2. Results of the Entities Petri Net The reducing algorithm discussed in section 4.3 is applied to the Addresses Petri Net in order to recover the corresponding Entities Petri Net. Among the owners, we found that 2,461,010 entities hold all the 3,730,480 addresses, and the distribution of addresses among entities is highly not uniform. Figure 14 shows that also such distribution follows a power-law very closely. This means that there are many entities holding The Computer Journal , Vol. ??, No. ??, ???? 10 A. Pinna, R. Tonelli, M. Orr u, M. Marchesi Address L pre L post tags 1VayNert3x1KzbpzMGt2qdqrAThiRovi8 270,204 275,398 deepbit.net 1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp 14,606 14,605 SatoshiDICE 48% 1dice97ECuByXAvqXpaYzSaQuPVvrtmz6 13,137 13,124 SatoshiDICE 50% 159FTr7Gjs2Qbj4Q5q29cvmchhqymQA7of 8,016 8,425 - spammer ? - 1CDysWzQ5Z4hMLhsj4AKAEFwrgXRC8DqRN 6,382 9,501 Instawallet 1E29AKE7Lh1xW4ujHotoT4JVDaDdRPJnWu 7,761 8,079 - unknow - 15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC 6,999 7,888 faucet donation 15ArtCgi3wmpQAAfYx4riaFmo4prJA4VsK 6,578 6,622 faucet donation 1dice9wcMu5hLF4g81u8nioL5mmSHTApw 6,318 6,306 SatoshiDICE 73% 1Bw1hpkUrTKRmrwJBGdZTenoFeX63zrq33 5,498 5,498 - unknow - TABLE 2: Summary of rst 10 most used addresses Address L post current balance BTC 15S1TFTosxrgZxkqJR2n1AFJ22ZJE2rTCk 3,853 120.85215349 1PtnGiNvhAKbuUQ6nZ7nF3CDKCKGfeMsCX 1,199 0 129FTwWoi5H5ujasMZ6M6VjJzBJfsXVQGw 1,138 0.78425567 1FN9kKsZA9XttrAwuDDgsXjs6CXUR2fzmt 1,111 0 1DYvtKtZ2Ay9vTjzjb9BiRauMgXdjRDaD 973 14.5601 1STRonGxnFTeJiA7pgyneKknR29AwBM77 949 1.79274504 1Q3nqtUzBp6jw7opi674Pyfgu4MUmVRdrk 861 16.31551365 1Hh3eNNqR8MajEtDfvUF3hoxgf8CuUXVwY 819 257.32881319 14sx4sFdUE9YDpJ9XbD6xAUEKPKvc8QHq2 811 59.56546509 17igtzSD39ZAapsut2DQTTKFyqSp7CToMq 809 0 TABLE 3: Summary of rst 10 most imbalanced addresses S= size of a set of addressesP(S)>x FIGURE 14. CCDF of the distribution of addresses across entities. a single address but also a few entities controlling very many addresses, and thus able to control a great fraction of the bitcoins ux transactions. There are only 246,660 entities containing two or more addresses and these contains 1,516,130 addresses. The number of non null elements in the rows of matrices PreE andPostE for the Entities Petri Net is reported in Figure 15 and 16 respectively. This corresponds the number of transactions where the entities areinvolved. They clearly show a power-law distribution for transactions among the entities. In Tab. 4 we report the ten most used entities, found summing up the number of non zero elements in PreE rows to that of non zero elements in PostE rows. Their balances can be computed summing the balances of all addresses belonging to the corresponding entity and are owned by a single user. Like for the Addresses Petri Net, we computed groups of repeated transitions for the Entities Petri Net. We found that about 22 :6% of transactions are a repetition of another one occurred among the same entities in input and in output. This information allows to identify steady uxes of bitcoins at the owners level. Figure 17 reports the CCDF for the sizes of these groups of repeated transactions. 6. DISCUSSION The Petri Net formalism can be natively used to infer many information and features about Bitcoin users and the Blockchain. We used the Petri Net model to gather together group of addresses (as entities or groups of disposable addresses) trying to associate an identity to each group. We also estimated how many users have been actually involved in the rst three years and half of Bitcoin activity. Analyzing the entities we found that 1,516,130 The Computer Journal , Vol. ??, No. ??, ???? A Petri Nets Model for Blockchain Analysis 11 Entity number L pre L post size tags 95237 270,204 275,398 2 deepbit.net 2 102,186 283,973 156,725 ilovethebtc 37 51,228 147,712 78,251 jmm5699 11 49,959 97,732 10,37 - unknow - 130 20,857 58,350 23,649 Instawallet 66437 14,219 60,868 13,289 Rai, Dread88 42 9,268 31,147 10,561 Quip, iosp and other 37598 8,923 31,004 12,520 generalfault, safetyvest.com 220 11,133 27,487 9,093 zephram 1503 9,044 29,400 10,116 folk.uio.no/vegardno TABLE 4: Summary of rst 10 most active entities L= number of non zero elements in a PreE row ‒P(L)>x FIGURE 15. CCDF of the lenght L for PreE . L= number of non zero elements in a PostE row ‒P(L)>x FIGURE 16. CCDF of the lenght L for PostE . addresses are controlled by 246,660 owners at most. With our model we were able to trace transactions chains whenever disposable addresses are involved. Each chain holds addresses belonging to one owner, but one owner may control more than one chain. So, according to our results, the 1,350,010 addresses involved are owned at most by 122,155 owners. Using preandpost matrices we found that 609,295 addresses are used only as output of bitcoin transactions and are N= number of transaction in a setP(N)>xFIGURE 17. CCDF of the size L of grouped transaction set for the Entity Petri Net net not involved in entities or chains. These three facts, enable us to estimate a threshold for the number of di erent Owners or users in the Bitcoin system. We compute that there were 368,815 engaged (or expert) owners that adopted disposable addresses practice or used two or more addresses in their operations. The addresses of such owners are involved in the 72;6% of transactions. We suppose that the 609,295 addresses that appear only in output are used by some engaged owners for the purpose of bitcoin depositing. Finally, the 255,045 remaining addresses are owned by occasional users. Furthermore we tried to associate an identity to addresses showed in Tab. 2 and to entities showed in Tab. 4. Information about these addresses can be found on the Internet, in particular on blockchain explorer websites like blockchain.info , or specialized forums like bitcointalk.org . Some of theme are made more easily recognizable by attributing a tag. Take the case of the most used address we found, which appears 270,204 times as the input of a transaction. We were able to recognize that it belongs to a (now closed) Bitcoin pool which was called DeepBit . Another example regards the most used entity in The Computer Journal , Vol. ??, No. ??, ???? 12 A. Pinna, R. Tonelli, M. Orr u, M. Marchesi output that includes 156,725 addresses and regroup the 4:2% of the total number of addresses. Searching on the Internet some of its addresses, we found out that who manages this entity has used varied tags, such as ilovethebtc ,mikeo ,FredericBastiat ,edgeworth , etc.7 Several addresses in that entity have no tag. From all the reported CCDFs it is clear that all the distributions are characterized by a strongly uneven amount of transactions across the addresses, either for pre and post transactions. This means that there are many addresses where the bitcoins are hardly exchanged, and few addresses where the rate of bitcoin exchange is particularly high. This analysis can be helpful for identifying addresses which are used by pool of miners. In fact, when miners join together in a pool to share computational facilities for mining operations, they need to de ne a common address where the mining rewards is accounted to. Then they need to redistribute the amount of gained bitcoins among all the pool users. As a consequence the address will be a ected by a number of transitions in the corresponding Petri Net as large as the pool's size. Finally, since we analyzed a limited window of 180,000 blocks, the amount of transitions found in the matrices are also a signature of the average rate of Bitcoin transferred between di erent entities and such rate can be used to infer information on the organizations which can manage massive Bitcoin transfers. 6.1. Advantages of the PT modeling In this section we discuss the motivations for preferring the PT formalism in modeling the bitcoin transactions on the blockchain (as well as other possible transactions) and describe the intrinsic advantages carried by this formalism. Part of this discussion will include proposals for further research. First, PT formalism allows for the "non determinism criteria" in the system's dynamics. Such criteria accounts for respecting the locality principle in the system's evolution. In other words, PT nets formalism natively includes independence between events generated by enabled transactions so that one enabled transaction can occur regardless the occurrence of other transactions for any given marking. Once an (or a set of) enabled transaction occurs he new marking has to be evaluated in order to understand which transactions are enabled in the new marking. Such formalism perfectly ts into the blockchain transactions system where only transactions with non null UTXO are "enabled" and can occur, and their occurrence is independent from other 7It is possible to nd a portion of the addresses included in that entity, in the input section of a Bitcoin transaction, available on blockchain.info and reachable from this short link http://tinyurl.com/ilovethebtc . Some of theme have a tag.transactions occurrence. A transaction occurrence is not deterministic and depends not only by the owner decision of sending bitcoin to another address, but also on the winning miners and on the probability that such transaction is included into the block validated by the hashing mechanism, which in turn has a di erent probability depending on the fee the owner accepts to pay. In such model enabled transactions natively correspond to UTXO and the marking corresponds to the set of all UTXO determined by the last block validated. The validation of a new block, where transactions are included in an independent fashion, determines a new "marking" of the bitcoin PT net with a renewed set of UTXO. This enabling mechanism is hardly accounted for using a simple bipartite graph or a matrix representation for the bitcoin network and its transactions, even if many properties illustrated in this paper can be recovered by using such representations. The advantage of the PT nets formalism is that it natively includes such features. The second aspect we discuss is related to simulation modeling which allows to analyze systems dynamics and which is a typical advantage provided by the PT nets formalism. Di erently from bipartite graphs, which account for a static analysis, PT nets formalism includes systems dynamics and allows for non deterministic system's dynamics modeling. In fact in PT simultaneous transactions can occur provided they are not in con ict. Again this is a characterizing feature of bitcoin transactions dynamics where many non con icting transfers of bitcoin between addresses can be included into the same validated block in the blockchain. Con icting transactions, like for example double spending, are controlled and not allowed. Furthermore PT nets can include into the dynamics modeling priorities between transactions and this can be used in a statistical modeling of the di erent probabilities the bitcoin transactions have to occur depending on the fee the owner accepts to pay. A third feature natively included into the PT nets formalism is the sequence of transactions: two transactions t1 and t2 are in a sequence if t1 precedes t2 with t1 enabled and t2 not enabled for a given marking, and when the occurrence of t1 enables t2 in the new marking. The bitcoin transactions network natively contains sequences of transactions, like for example the sequences of UTXO generated into a single chain of disposable addresses monitored in our work and used for preserving bitcoin anonymity. Once again sequences of transactions can hardly accounted for using di erent representations, like bipartite graphs or matrices, without inserting ad hoc constraints into such representations. Another important advantage is that PT nets formalism includes the possibility to set state equations for the evolution dynamics. Given an initial marking the state equation allows the determination of the new marking according to the rules xed for choosing The Computer Journal , Vol. ??, No. ??, ???? A Petri Nets Model for Blockchain Analysis 13 the enabled transaction that e ectively occur. The rules can be chosen with great freedom (respecting network constraints) and in particular a stochastic or probabilistic approach can be used in order to simulate the evolution of the blockchain from a statistic point of view. For example, one of the future improvements the authors are presently working on is to collect statistics on the bitcoin uxes between addresses paying attention to address clustered in entities, to addresses corresponding to exchanges and to addresses owned by miners pools, in order to assign transitions probabilities for bitcoin ux exchanges between such addresses to be used for choosing the enabled transactions to choose into the corresponding PT nets to make evolve its marking using a statistical approach. This will provide a set of possible future marking, each with its own probability of occurrence, which will correspond to future states of the blockchain. Such statistical modeling can provides hints on which addresses are going to get richer with a given probability, which pools of miners are going to exploit the future mining and at which rate and so on. The possibility of performing such a statistical simulation for the blockchain dynamics is straightforward within the PT nets model whilst is hardly accounted for using di erent approaches which are mainly static. Last but not least, the formalism, through the use of pre and post matrices, allows to recover many di erent and independent results following straightforwardly from standard computations over the pre and post matrices associated to the blockchain transaction network. For example, counting the number of rows and columns of matrices PreA orPostA it is straightforward to nd the number of addresses and transactions, or we can nd bitcoin addresses never used to spend looking at addresses with only zeros in PreA rows and at least one non null element in PostA rows, or we can recover disposableaddresses looking at transitions that correspond to columns of PreA having only one non zero element and to columns of PostA having two non zero elements but in di erent rows. 7. CONCLUSIONS In this paper we introduced a novel approach, based on a Petri Net model to parse the Blockchain. Our purpose was to de ne a single useful model in which all main information about transactions and addresses are represented. Collecting the rst 180 thousand blocks, we were able to associate a place for each address and a transition for each bitcoin transaction. Our Petri net includes preandpost-incidence matrices where all links between addresses and transactions are modeled. We are aware about the limitation of computational problem of a matrix approach. The portion of Blockchain which we chosen was processed without speci c hardware resources. Anyway, the current size of the Blockchain (over 480,000 blocks and the totalnumber of transaction is over 240 million) could not allow us to handle easily all the blocks information. However, by using this model, we were able to pick out signi cant and original results. This formalism has proven powerful methodology for performing many kinds of measurements and analysis. Analyzing the number of pre and post arcs, we had proof of the presence of power-law like distributions. We made use of both incidence matrices for determining all transactions chains, identifying a typical disposable addresses usage by Bitcoin users. By measuring the chains' lengths, we found again power-law like distributions. We were also able to determine that some transactions involve the same group of address in input and in output. We gathered these transaction in sets and the size of such sets follow again a power-law like distribution. By reading information of pre-incidence matrix, we were able to identify the entities and we built the Entities Petri Net, repeating on such Petri net all the measures done for the Addresses Petri Net. Furthermore, despite the current Blockchain size is about two order of magnitude greater than the size of the portion that we have studied, our approach can be adopted to study a speci c portion of the Blockchain. For example starting from a speci c set of addresses which we want to investigate and analyze. In fact, it is always possible to build the addresses Petri Net containing only the part of blockchain of interest. On the basis of all the obtained results, we believe that our model can be used for studying a large set of other issues related to other systems based on Blockchain technology, such as Ethereum. Today, Ethereum attracts increasing attention and will be one of our future research topic. The Computer Journal , Vol. ??, No. ??, ???? 14 A. Pinna, R. Tonelli, M. Orr u, M. Marchesi REFERENCES [1] Satoshi, N. (2009) Bitcoin: A Peer-to-Peer Electronic Cash System. Url: http://www.bitcoin.org/bitcoin.pdf . [2] A. Pinna, M. Marchesi, R. Tonelli (2018) "Blockchain technology: analysis and applications" University of Cagliari, Ph.D. program in Software Engineering, Advisors M. Marchesi and R. Tonelli, 2014-2017 [3] Porru, S., Pinna, A., Marchesi, M., and Tonelli, R. (2017). Blockchain-oriented software engineering: challenges and new directions. In Proceedings of the 39th International Conference on Software Engineering Companion (pp. 169-171). IEEE Press. [4] Pinna, A. A Petri net-based model for investigating disposable addresses in Bitcoin system. Proceedings of the 2nd International Workshop on Knowledge Discovery on the WEB, KDWeb 2016, Cagliari, Italy, September 8-10, 2016. CEUR Workshop Proceedings [5] Ron, D., and Shamir, A. (2013) Quantitative Analysis of the Full Bitcoin Transaction Graph. Financial Cryptography and Data Security: 17th International Conference, FC 2013, Okinawa, Japan, April 1-5, pages 6{24, Springer Berlin Heidelberg, Berlin, Heidelberg. [6] Concas, G., Monni, C., Orr u, M., and Tonelli, R. (2013) A study of the community structure of a complex software network. 4th International Workshop on Emerging Trends in Software Metrics (WETSoM), San Francisco, CA, 2013, pp. 14-20, IEEE Press.. [7] Newman, M. E. J. (2003) The Structure and Function of Complex Networks SIAM Review, Philadelphia, PA, USA [8] Fortunato, S., and Castellano, C. (2012) Community Structure in Graphs In Meyers, R. A. Computational Complexity: Theory, Techniques, and Applications, 490{512, Springer New York, New York, NY, USA [9] Turnu, I., Concas, G., Marchesi, M., Pinna, S., and Tonelli, R. (2011) A modi ed Yule process to model the evolution of some object-oriented system properties In Information Sciences, 181(4):883{902, Amsterdam, Netherlands [10] Rung, T., Moreno-Sanchez, P., and Kate, A. (2014) CoinShue: Practical Decentralized Coin Mixing for Bitcoin. Proceedings of the Computer Security - ESORICS 2014: 19th European Symposium on Research in Computer Security, Wroclaw, Poland, September 7-11, pages 345{364, Springer International Publishing, Cham.. [11] Ziegeldorf, J. H., Grossmann, F., Henze, M., Inden, N., and Wehrle, K. (2015) CoinParty: Secure Multi- Party Mixing of Bitcoins. Proceedings of the 5th ACM Conference on Data and Application Security and Privacy - CODASPY '15, San Antonio, Texas, USA, March 2-4, 2015, pages 75{86, ACM Press, New York, USA. [12] Biryukov, A., Khovratovich, D., and Pustogarov, I. (2014) Deanonymisation of Clients in Bitcoin P2P Network. Proceedings of the ACM SIGSAC Conference on Computer and Communications Security - CCS '14, Scottsdale, Arizona, USA, November 3 - 7, 2014, pages 15{29, ACM Press, New York, USA. [13] Reid, F., and Harrigan, M. (2013) An Analysis of Anonymity in the Bitcoin System. In Altshuler, Y., Elovici, Y., Cremers, A. B., Aharony, N., and Pentland,A. Security and Privacy in Social Networks, Springer New York, New York, NY. [14] Concas, G., Monni, C., Orr u, M., and Tonelli, R. (2014) Are Refactoring Practices Related to Clusters in Java Software?. Proceeding of the 15th International Conference on Agile Processes in Software Engineering and Extreme Programming, XP 2014, Rome, Italy, May 26-30, pages 269{276, Springer, Berlin, Heidelberg [15] Androulaki E., Karame, G. O., Roeschlin, M., Scherer, T., and Capkun, S. (2013) Evaluating User Privacy in Bitcoin. Proceedings of the Financial Cryptography and Data Security: 17th International Conference, FC 2013, Okinawa, Japan, April 1-5, pages 34{51, Springer, Berlin, Heidelberg. [16] Meiklejohn, S., Pomarole, M., Jordan, G., Levchenko, K., McCoy, D., Voelker, G. M., and Savage, S. (2013) A Fistful of Bitcoins. Proceedings of the Internet Measurement Conference - IMC '13, Barcelona, Spain, October 23-25, pages 127{140, ACM Press, New York, USA. [17] Kondor, D., P osfai, M., Csabai, I., Vattay, G., and L Dobos. (2014) Do the Rich Get Richer? An Empirical Analysis of the Bitcoin Transaction Network. PLoS ONE , 9(2):e86197. [18] Lischke, M., and Fabian, B. (2016) Analyzing the Bitcoin Network: The First Four Years. Future Internet , 8(1):7. [19] Cocco, L., Concas, G., and Marchesi, M. (2015) Using an Arti cial Financial Market for studying a Cryptocurrency Market, Journal of Economic Interaction and Coordinations , 12(2):345{365. [20] Cocco, L., Marchesi, M. (2016) Modeling and Simulation of the Economics of Mining in the Bitcoin Market. PLOS ONE , 11(10):e0164603. [21] Bri ere, M., Oosterlinck, K., and Szafarz, A. (2015) Virtual currency, tangible return: Portfolio diversi - cation with bitcoin. Journal of Asset Management , 16(6):365{373. [22] Hernandez, I., Bashir, M., Jeon, G., and Bohr, J. (2014) Are Bitcoin Users Less Sociable? An Analysis of Users' Language and Social Connections on Twitter. Proceedings of the HCI International Conference 2014, Heraklion, Crete, Greece, June 22-27, pages 26{31, Springer International Publishing, Cham. [23] Saxena, A., Misra, J., and Dhar, D. (2014) Increasing Anonymity in Bitcoin. Proceedings of the Financial Cryptography and Data Security: FC 2014 Workshops, BITCOIN and WAHC 2014, Christ Church, Barbados, March 7, pages 122{139. Springer, Berlin, Heidelberg. [24] Weber, B. (2016) Bitcoin and the legitimacy crisis of money. Cambridge Journal of Economics , 40(1):17{41. [25] Wilson, M. G., and Yelowitz, A. (2014) Characteristics of Bitcoin Users: An Analysis of Google Search Data. SSRN Electronic Journal . [26] Cocco, L., Pinna, A., and Marchesi, M. (2017) Banking on Blockchain: Costs Savings Thanks to the Blockchain Technology. Future Internet , 9(3):25. [27] Aymerich, F. M., Fenu, G. and Surcis, S.. (2009) A real time nancial system based on grid and cloud computing. Proceedings of the 2009 ACM symposium on Applied Computing (SAC '09). ACM, New York, NY, USA, 1219-1220. DOI=http://dx.doi.org/10.1145/1529282.1529555 The Computer Journal , Vol. ??, No. ??, ???? A Petri Nets Model for Blockchain Analysis 15 [28] Murata, T. (1989) Petri nets: Properties, analysis and applications. Proceedings of the IEEE , 77(4):541{580. [29] Bornholdt, S., and Sneppen, K. (2014) Do Bitcoins make the world go round? On the dynamics of competing crypto-currencies. Url: https://arxiv.org/pdf/1403.6378.pdf. [30] Christin, N. (2012) Traveling the Silk Road: A measurement analysis of a large anonymous online marketplace. Proceedings of the 22nd International Conference on World Wide Web, WWW '13, Rio de Janeiro, Brazil, May 13-17, pages 213{224, ACM Press, New York, NY, USA. [31] Hanley, B. P. (2013) The False Premises and Promises of Bitcoin. Url: https://arxiv.org/pdf/1312.2048.pdf APPENDIX A. CHAINS OF DISPOSABLE ADDRESSES We model the Blockchain as a Petri net, a bipartite oriented graph N, de ned as N= (P ;T;Pre;Post ), whereP is the set of the places (addresses) ,Tis the set of the transitions (transactions) ,Pre is the Pre-incidence matrix and Post is the Post-incidence matrix. The element ijin the Pre matrix de nes how many times the address iis in the input section of the transaction j, instead, in the Post matrix, it de nes how many times the address iis in the output section of the transaction j. After having built of the Petri net N, we focus our attention on the chains of disposable addresses, and hence on the transactions having only one address, a, in the input section and only two addresses, band c, in the output section. In more detail, the address ain the input section is used by a useru1to send bitcoins to one of the addresses in the output section, b, belonging to a user u2. The other address, c, in the output section is created by the useru1to collect the change. We created the set of potentially disposable addresses Ad, starting from the setAof the addresses and from the set  of thetransactions in the Blockchain. Let dbe the set of transaction dsuch that: d =fd:jIN(d)j= 1;jOUT (d)j= 2;IN(d)2Ad; 9 2OUT (d) : 2Ad;8d2dg: In order to build a chain, for each dwe need to know the previous transactions dp=PREV (d). Using Pre andPost matrices, it is very easy to look for these previous transactions. We call  dsdthe set of transaction dsthat could be considered the starting point of a chain because it does not have a previous transaction inside  d. We denote with dsthe address in input to a transaction ds. Finally, we call NEXT (d) the transaction d0which has, in the input section, the disposable address that is contained in the output section of the transaction d. To nd the chains cof disposable addresses, we de ned and implemented the following algorithm: 1. LetC=;be a set of empty chains, c, 2. for each ds2ds: (a) take an empty chain, c, (b) insertdsinc endfor 3. for each c2C (a) take the last element inserted in c,d, (b) while9d0=NEXT (d) i. insertd0in c endwhile endfor The algorithm returns a set Cof chainsc. Each chain ccontains the transactions ordered by execution order. The Computer Journal , Vol. ??, No. ??, ????
{ "id": "1709.07790" }
1708.09721
Blockchain Based Intelligent Vehicle Data sharing Framework
The Intelligent vehicle (IV) is experiencing revolutionary growth in research and industry, but it still suffers from many security vulnerabilities. Traditional security methods are incapable to provide secure IV data sharing. The major issues in IV data sharing are trust, data accuracy and reliability of data sharing data in the communication channel. Blockchain technology works for the crypto currency, Bit-coin, which is recently used to build trust and reliability in peer-to-peer networks having similar topologies as IV Data sharing. In this paper, we have proposed Intelligent Vehicle data sharing we are proposing a trust environment based Intelligent Vehicle framework. In proposed framework, we have use the blockchain technology as backbone of the IV data-sharing environment. The blockchain technology is provide the trust environment between the vehicles with the based on proof of driving.
http://arxiv.org/pdf/1708.09721v1
Madhusudan Singh, Shiho Kim
cs.CR
cs.CR
Blockchain Based Intelligent Vehi cle Data sharing Framework Madhusudan Singh Yonsei Institute of Convergence Technology Yonsei University, Songdo, South Korea msingh@yonsei.ac.kr Shiho Kim School of Integrated T echnology Yonsei University, Seoul, South Korea shiho@yonsei.ac.kr ABSTRACT The Intelligent vehicle (IV) is experiencing revolu tionary growth in research and industry, but it still suf fers from many security vulnerabilities. Traditional se curity methods are incapable to provide secure IV dat a sharing . The major issue s in IV data sharing are trus t, data accuracy and reliability of data sharing data in the communication channel. Blockchain technology works for the crypto currency, Bit-coin, which is rece ntly used to build trust and reliability in peer -to-peer networks having similar topologies as IV Data sharin g. In this paper, we have proposed Intelligent Vehicle data sharing we are proposing a trust environment ba sed Intelligent Vehicle framework . In proposed frame work, we have use the blockchain technology as back bone of the IV data sharing environment . The blockc hain technology is provide the trust environment betw een the vehicles with the based on proof of dr iving. Keywords Blockchain, intelligent vehicles, security, component; vehicular cloud , ITS 1. INTRODUCTION V ANET is the encapsulation of Vehicle -to-Vehicle (V-to-V) and Veh icle-to-Infrastructure (V -to-I), for providing notification of any safety critical incident and hazard to the drivers [1]. This information is gathered by the feedback of the nearby vehicles. This system is prone to security attacks , by marking incorrect feedback , which result s in higher congestion and severe hazard s [2]. In IV data sharing network , security is a very crucial issue during comm unication. These networks require trust and privacy [3]. We have proposed a IV- TP element, to build trust and transmit reliable data among IV data sharing . IV-TP is a unique crypto number, which is attach ed to the message format and transmit ted during communication time . The cloud storage based on Blockchain manages the IV-TP, and is accessed ubiquitously . This IV-TP mechanism is also based on Blockchain technology, enabled to create the crypto unique ID, self -executing digital contracts and details of IV, controlled over the Blockchain Cloud [4]. Fig. 1 shows the intelligent vehicle Information sharing environment , showing V2V , V2I communication . Fig. 1. Intelligent Vehicles Information Environment Previously , some researchers combined automotive and blockchain technology but most of them considered application s based on services and smart contracts . However, our proposal concentrate s on secure and fast communication between intelligent vehicles (self-driving cars) [5]. We have proposed a blockchain based trust environment for intelligent vehicle information sharing based on blockchain technology. We organize our articles as follows; Section II presents the motivation of using Blockchain based trust environment for data sharing among Intelligent Vehicles over traditional security methods. Section III presents the introduction of blockchain technology and existing work of blockchain technology for Intelligent Vehicles data sharing . Section V, concludes our paper , and discuss our future work for our proposed mechanism. 2. MOTIVATION Current ITS system use s ad-hoc networks for Vehicle communication such as DSRC, WA VE, Cellular Network , which does not guarantee secure data transmission. Currently, vehicle communication application security protocols are based on cellular and IT standard security mechanism which are not up -to- date and suitable for ITS applications. Still many researchers are working to provide standard securi ty mechanism for ITS. Our proposed mechanism is advantages as it is easy to implement, it’s a peer -to - peer communication, it provides a secure and trust environment for Vehicle communication with immutable database and ubiquitous data access in a secure way. Our proposal is based on a very simple concept of using Blockchain based trust environment for data sharing among Intelligent Vehicles using the IV-TP (Intelligent Vehicle -Trust Point). We are exploiting the features of Blockchain i.e. distributed and open ledger which is encrypted with Merkel tree and Hash function (SHA -256) and are based on Consensus Mechanism (Proof of Work Algorithm). We have not mentioned the details of the Blockchain mechanism for our application Intelligent Vehicle data sharing due to the limitation of space. 3. RELATED WORK 3.1.Blockchain Technology Blockchain technology is distributed, open ledger , saved by each node in the network, which is self- maintained by each node. It provides peer -to-peer network without the interference of the third party. The blockchain integrity is based on strong crypto graphy that validates and chain blocks together on transactions, making it nearly impossible to tamper with any individual transaction without being detected [ 6]. Fig. 2. Blockchain technology Fig.2 shows the Blockchain technology features such as shared ledger, Cryptography, Sig ned blocks of transactions, and digital sign atures [6]. 3.2.Previous work: Blockchain technology for Intelligent Transportation System . Yong yuan, et.al [7] has proposed the blockchain technology for ITS for establishment of secured, trusted and decentralized autonomous ecosystem and proposed a seven -layer conceptual model for the blockchain. Benjamin et.al [8], have also proposed the blockchain technology for vehicular ad -hoc network (V ANET). They have combine d Ethereum ’ blockchain based smart contracts system with vehicle ad -hoc network. They have proposed combination of two application s, mandatory applications ( traffic regulation, vehicle tax, vehicle insurance ) and optional application s (applications which provides inf ormation and updates on traffic jams and weather forecasts) of vehicles. They have tried to connect the blockchain with V ANET services. Blockchain can use multiple other functionalities such as communication between vehicles, provide security, provide peer -to-peer communication with out disclosing personal information etc. Ali dorri et.al. [9] have proposed the blockchain technology mechanism without disclosing any private information of vehicles user to provide and update the wireless remote software and other emerging vehicles ser vices. Sean Rowen et.al. [10] have described the blockchain technolo gy for securing intelligent vehicles communication through the visible light and acoustic side channels. They have verified their proposed mechanism through a new session cryptographic key , leveraging both side -channels and blockchain public key infrastruc ture. We define our blockchain mechanism for the intelligent vehicles communication environment. We propose a framework for secure trust based environment with peer-to-peer communication between intelligent vehicles without interfering/disturbing other intelligent vehicles. 4. BLOCKCHAIN BASED TRUST ENVIORNMENT FOR INTELLIGENT VEHICLES DATA SHARING We propose a reward based intelligent vehicles communication using blockchain technology . Our proposed mechanism has three basics technologies including communication network enabled connected device , Vehicular Cloud Computing (VCC) and blockchain technology (BT). Fig.3 has shown the complete data-sharing environment for intelligent vehicles . Fig. 3. Proposed blockchain Intelligent Vehicle Communication 4.1.Network enabled connected device It is an internet -enabled device, which can organize , communicate in V ANET s uch as Smartphone, PDA, Intelligent Vehicles, etc. 4.2.Vehicular Cloud Computing VCC is a hybrid technology that has a remarkable impact on traffic management and road safety by instantly using vehicle resources, such as computing, data storage, and internet decision -making. 4.3.Blockchain supported intelligent vehicles Blockchain consists of a technically unlimited number of blocks which are chained together crypt ographically in chronological order. In this, each block consists of transactions, which are the actual data to be stored in the chain. In fig . 6 we present a s even-layer conceptual model for standardizing blockchain architecture for the intelligent commun ication network. W e briefly explain the key features of our proposed network model. Due to space limitation, we did not explain the technical details of the proposed model. The implementation of proposed model is beyond the scope of this paper and thus is omitted. Physical layer: This layer presents the communication network enabled devices such as, IoT devices, mobile, intelligent vehicles, camera, GPS, PDA, etc ., which can involve during communication and easily adopt the blockchain mechanism. Fig. 4. Proposed Blockchain based Intelligent Vehicle Communication Network Framework Data Layer: This layer process the data blocks with cryptogra phy features such as hash algorithm, merkle tree to make secure blocks. The structure of block is shown in fig. 5, where header pa rt specifies the previous hash and nonce with current hash (root). Hash is made by double SHA 256 algorithm and is not easily hackable. Fig. 5. The structure of blocks. Network Layer: This layer represent s the data forwarding peer-to-peer communication and verification of the communication. This layer verifies the legality of the broadcasted message and manage s the peer connection between two IVs. Handshake Layer: This feature is called consensus layer in blockchain technology. It provides decentralized commu nication with in network and helps to develop trust between unknown users in the communication environment . In intelligent vehicles communication networks, more feasible consensus algorithm is proof of driving (PoD), which verif y and validate the vehicles involved in the communication networks. Reward layer: It provide s some crypto data, which is called IV-TP in this paper. The IV-TP has a crypto data which is assign ed to each vehicle and whenever any vehicle wins the consensus competition, its get s some IV-TP from t he benefiter IV . The vehicle having the maximum IV-TP, lead s in the communication network . IV-TP helps to make trust ed environment between the vehicles communication . Presentation Layer: The presentation layer encapsulate s multiple scripts, contracts and algorithms, which are provide d by the vehicles involve d in the network. Service Layer: This layer represents the scenario and use cases of intelligent vehicles communication system. However, a lot of research organization and startup companies are implementing blockchain in different areas. One such area is , build ing ITS communication trust enviro nment. Section VI, explains our proposed mechanism through an intersection scenario based use case example . 5. CONCLUSION In this paper, we have presented a reward based intelligent vehicle communication based on blockcha in technology and not for specific services as previously proposed by other researchers. We have proposed crypto IV-TP that will help to improve the privacy of IVs. IV-TP provide fast and secure communication between IV s. It also helps to detect the detailed history of IV s communication. IV communication data will be stored on the VC, as long as the user wants . During any accident, the IVs communication history and their reputation s are ubiquitously available to authorize d organization s (hosp ital, insurance company, police etc.) and home via VC. In future , we will simulate our proposed framework mechanism on real-time traffic data of vehicle information sharing scenario s as well as analyze with multiple use cases with a solution . 6. ACKNOWLEDGMENT This work was supported by the MSIP (Ministry of Science, ICT and Future), Korea, under the “ICT Con silience Creative Program” (IITP -2017 - 2017 -0—1-01 015) supervised by the IITP (Institute of Information & Communications Technology Promotion). 7. REFERENCES [1] G. Yan and S. Olariu, “A probabilistic analysis of link duration in vehicular ad hoc networks, ” IEEE Trans. Intell. Transp. Syst. , vol. 12, no. 4, pp. 1227 –1236, Dec. 2011. [2] D. Singh, M. Singh, I. Singh and H. J. Lee, "Secure and reliable cloud networks for smart transportation services," 2015 17th International Conference on Advanced Communication Technology (ICACT) , Seoul, 2015, pp. 358 -362. doi: 10.1109/ICACT.2015.7224819 [3] S. Olariu, M. Eltoweissy, and M. Younis, “Toward autonomous vehicular clouds, ” ICST Trans. Mobile Commun. Comput. , vol. 11, no. 7–9, pp. 1–11, Jul.–Sep. 2011. [4] C. Wang, Q. Wang, K. Ren, and W. Lou, “Privacy - preserving public auditing for data storage security in cloud computing, ” in Proc. IEEE INFOCOM , San Diego, CA, 2010, pp. 1–9. [5] M. Singh, D. Singh, and A. Jara, "Secure cloud networks for connected & automated vehicles," 2015 International Conference on Connected Vehicles and Expo (ICCVE) , Shenzhen, 2015, pp. 330 -335. doi: 10.1109/ICCVE.2015.94 [6] Satoshi Nakomoto, Bitcoin: A Peer -to-Peer Electronic Cash System , BITCOIN.ORG 3 (2009). [7] Yong Yuan, and Fei -Yue Wang, “Towards Blockchain - based Intelligent Transportation Systems ”, 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC), Windsor Oceanico Hotel, Rio de Janerio, Brazil, Nov.1 -4, 2016. [8] Benjamin Leiding, Parisa Memarmoshrefi, and Dieter Hogrefe. 2016. Self -managed and blockchain -based vehicular ad -hoc networks. In Proceedings of the 2016 ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct (UbiComp '16). ACM, New York, NY , USA, 137 -140. [9] Ali Dorri, Marco Steger, Salil S. Kanhere, and Raja Jurdak, “Blockchain: A distributed solution to automotive security and privacy ”, eprint arXiv:1704.00073, March, 2017 [10] Sean Rowan, Michae l Clear, Meriel Huggard and Ciaran Mc Goldrick, “Securing vehicle to vehicle data sharing using blockchain through visible light and acoustic side -channels ”, eprint arXiv:1704.02553, April,2017
{ "id": "1708.09721" }
1810.00349
IDMoB: IoT Data Marketplace on Blockchain
Today, Internet of Things (IoT) devices are the powerhouse of data generation with their ever-increasing numbers and widespread penetration. Similarly, artificial intelligence (AI) and machine learning (ML) solutions are getting integrated to all kinds of services, making products significantly more "smarter". The centerpiece of these technologies is "data". IoT device vendors should be able keep up with the increased throughput and come up with new business models. On the other hand, AI/ML solutions will produce better results if training data is diverse and plentiful. In this paper, we propose a blockchain-based, decentralized and trustless data marketplace where IoT device vendors and AI/ML solution providers may interact and collaborate. By facilitating a transparent data exchange platform, access to consented data will be democratized and the variety of services targeting end-users will increase. Proposed data marketplace is implemented as a smart contract on Ethereum blockchain and Swarm is used as the distributed storage platform.
http://arxiv.org/pdf/1810.00349v1
Kazım Rıfat Özyılmaz, Mehmet Doğan, Arda Yurdakul
cs.CR, cs.NI
cs.CR
Presented at Crypto Valley Conference on Blockchain Technology (CVCBT 2018), 20-22 June 2018 Published version may differ IDMoB: IoT Data Marketplace on Blockchain Kazım Rıfat Özyılmaz Computer Engineering Department Bogazici University Istanbul, Turkey kazim@monolytic.comMehmet Do ˘gan Computer Engineering Department Bogazici University Istanbul, Turkey mehmet.dogan1@boun.edu.trArda Yurdakul Computer Engineering Department Bogazici University Istanbul, Turkey yurdakul@boun.edu.tr Abstract —Today, Internet of Things (IoT) devices are the pow- erhouse of data generation with their ever-increasing numbers and widespread penetration. Similarly, artificial intelligence (AI) and machine learning (ML) solutions are getting integrated to all kinds of services, making products significantly more "smarter". The centerpiece of these technologies is "data". IoT device vendors should be able keep up with the increased throughput and come up with new business models. On the other hand, AI/ML solutions will produce better results if training data is diverse and plentiful. In this paper, we propose a blockchain-based, decentralized and trustless data marketplace where IoT device vendors and AI/ML solution providers may interact and collaborate. By facilitating a transparent data exchange platform, access to consented data will be democratized and the variety of services targeting end-users will increase. Proposed data marketplace is implemented as a smart contract on Ethereum blockchain and Swarm is used as the distributed storage platform. I. I NTRODUCTION A new age of always listening, monitoring and commu- nicating IoT devices are at our doorstep. Quoting IBM: "90 percent of the data in the world today has been created in the last two years alone – and with new devices, sensors and technologies emerging, the data growth rate will likely accelerate even more" [1]. Increased amount of data enforces companies to create and maintain large scale infrastructure projects in the cloud. Unfortunately, every company, com- petent or not, tackles these problems in their own way. In the meantime, almost every company is building Artificial Intelligence (AI) and Machine Learning (ML) solutions. Using both publicly available and privately collected data, companies aim to provide customized user experiences targeting each individual differently. Vast amount of consented data is still not tapped and currently there is no platform to search for it. Today, IoT manufacturers use cloud-based solutions to im- plement their data storage and business intelligence/dashboard services. However implementing predictive, prescriptive and adaptive solutions necessary for future businesses requires an additional data processing step that extracts actionable triggers from all the collected data [2] [3]. These next generation of services, which is pushed by recent technology trends like Industry 4.0 and Smart Agriculture, force IoT manufacturers to develop a new skill set that they currently do not possess. On the other side, there are plenty of AI and ML startups trying to create insight using only tiny scraps of data. The solution is straightforward: having a trustable, neutral platform that data Fig. 1. Multi-party, multi-layer IoT solution producers (IoT manufacturers) and data consumers (AI/ML providers) can seamlessly trade. We propose blockchain to facilitate such a trustless and secure digital trading platform. Once the platform is in place, a complete “business intel- ligence solution” can be created just like designing a layered software stack. However, it will differ from existing solutions as follows: our solution will be consisting of multiple stake- holders (data providers and processors) that are connected to each other in a certain way using the blockchain infrastructure, to create actionable insights, i.e. information that can be acted upon, for consumers (Figure 1). One of the many benefits of using a blockchain-based solution is that it almost always comes with a cryptocurrency attached, therefore it is very easy to make economic incentives work. Consequently, as observed in current blockchain/cryptocurrency realm (SegWit, block size debate etc.), governance is yet another big aspect that needs to be addressed in order to establish a living and working marketplace. Eliminating IoT manufacturers that provide bad data or ranking good data sets higher should be built while designing the infrastructure. Proposed idea facilitates an open environment with a low barrier, where businesses or regular consumers will be able to get the services or information from multiple providers. These services may be acquired in exchange for sharing device data with consent, instead of explicitly paying for the services. Proposed marketplace is not designed for time- critical systems or services that need complete user privacy or had to comply with law and data protection requirements such as General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679) [4].arXiv:1810.00349v1 [cs.CR] 30 Sep 2018 Fig. 2. Example benefit network with multiple stakeholders In short, by creating a common, decentralized and trustless infrastructure it will be possible to provide a) an always- on data store for IoT manufacturers b) a searchable data marketplace for AI/ML companies. In this paper, we aim to give insights of how such a solution can be built by using blockchain technology and lay out the mechanics and governance guidelines for such a system. Organization of this paper is as follows: an overview of the IoT data marketplace concept and its benefits are presented in the next section (Section II). Then, the requirements and limitations for such a system is described in Section III. In "Candidate Platforms" (Section IV), prospective blockchain platforms for implementing the data marketplace are evaluated. "Implementation Concepts" (Section V) and "Smart Contract" (Section VI) sections focus on the implementation while pro- viding insights on key features of the contract and the skeleton code, respectively. Implementation sections are followed by a discussion (Section VII) on the pain points and improvement opportunities regarding the proposed system. II. I OT M ARKETPLACE ON BLOCKCHAIN Having a decentralized IoT data platform has multi dimen- sional benefits for all of the contributing parties as detailed in this section. Such a system will not only provide economical benefits, but also technical and user-facing benefits as well. As seen in Figure 2, IoT data can be collected, processed and finally consumed by different parties. In this figure, there are two IoT devices: a smart watch and a holter monitor. The device manufacturer must have already listed the data of these devices by using the proposed marketplace. Three different AI/ML providers buy the data of these devices and process them with their algorithms to produce insights such as tracking a team's or an athlete's performance, location of a certain or a group of individuals or non-real time monitoring of patients. As a result, these insights may be exploited by individuals, companies or organizations like hospitals, sport clubs or asingle patient. In the end, this approach will democratize the way data is managed and will accelerate IoT adoption, creating a positive feedback loop. As a side note, although the concept of the decentralized, trustless data marketplace is fairly new, IOTA platform [5] has also proposed a data marketplace. In the last part of this section, previous experiments and proposals for building such systems are reviewed. A. Benefits 1) Technical Benefits: Having a common, blockchain-based data backend has clear technical benefits for all the parties in the system: IoT manufacturers don’t have to create and maintain cloud backends for sensor data, because our solution will provide the necessary data analytics services over blockchain. IoT manufacturers will use well-tested, maintained and optimized code for their devices to interact with Swarm and Ethereum. Software development cycles will be re- duced and time-to-market for new products will decrease significantly. AI/ML providers may be able to tap into a vast pool of data that they are unable to reach before. Therefore AI/ML solutions will improve due to increased amount of training and test data. Consumers of the actionable insights, e.g. businesses, organizations and end users will be able to build new kinds of products and services. They will be able to browse through a vast library of behavioural patterns that are created by AI/ML providers. 2) Economical Benefits: Obviously, the most direct benefit of the system will be in economic terms. Specifically, IoT manufacturers, AI/ML providers and end users will benefit directly and indirectly as detailed below: IoT manufacturers will be able to monetize consented user data which may ignite a new wave of business models where IoT device costs may reduce to zero due to the subsidies coming from data monetization. AI/ML providers will be able to sell actionable insights to businesses and users. Businesses may finally provide predictive, prescriptive and adaptive solutions to their customers. End users may be able to use IoT devices and services freely in exchange for their consent on data usage. The scope of data collection is determined by both user’s consent and legal framework that allows or denies it. 3) User-facing Benefits: In general, there is a skeptical ap- proach to systems where user data is collected and processed, mostly due to privacy concerns. However this is not a zero- sum game. A transparent and trustless data marketplace that only contains consented data may result high quality products and services for consumers. In the proposed model, there are two factors that will reduce IoT device prices: the first one is the lack of cloud backend management burden and the second one is the data monetization capability. Assuming IoT device manufacturers reflect decreased costs to device prices, there will be a net incentive for end users to use these products and services. It is likely that free-to-use or free- if-consented business models bloom in every industry. Such a data marketplace will bring democratization by means of data access. This is one of the problems that Web technologies have created, considering the enormous amount of personal data accumulated and controlled by Google and Facebook. In our proposed system, data is intertwined with protocol. Hence, there is no way to monopolize the data in the system. A rich ecosystem filled with IoT manufacturers and AI/ML providers will create a universal library, consisting raw and processed data. It will be open to anyone who wants to search for correlations for any set of inputs and outputs. B. Experiments At the end of 2017, IOTA announced that it is going to support a decentralized marketplace, "to open up the data silos that currently keep data limited to the control of a few entities. Data is one of the most imperative ingredients in the machine economy and the connected world" [6]. Although the exact number of IoT vendors and devices that use this platform is not exactly known, IOTA's marketplace approach shares a lot of goals and ambitions with the proposed design. The main difference in our proposed approach is that there is no entity that oversees the marketplace in any form. Only a transparent, independent and auditable smart contract is in place, which takes care of connecting data providers and consumers. The data marketplace application is decentralized and trustless in itself. It is also imperative to mention about a previous experiment, named "Contract Market" [7] where users can subscribe to IoTdevices. Hence, IoT vendors are able to manage them via a smart contract. However, the details regarding where and how the data is stored and accessed, or how the system economics would work is missing. There are also non-blockchain based attempts to create a common data platform. One of them is "Big IoT Market- place" [8] by the European IoT Platforms Initiative. Big IoT Marketplace is a platform where IoT data providers will be able to sell their data. However, it is both centralized and does not provide a generic method to store and access data. III. S YSTEM REQUIREMENTS AND LIMITATIONS Finding the right blockchain platform for implementing an IoT data infrastructure requires consideration of multiple key aspects: data storage mechanism (on-chain or off-chain), tools and capabilities for creating an IoT data platform and financial incentivization for sustainability. A. Data Storage “Data storage mechanism” is a general term to describe how IoT sensor data is pushed and where it will be stored. First generation public blockchains have a cap on number of transactions, either in form of block size (Bitcoin) or gas limit per block (Ethereum). Pushing IoT data directly into these systems is not feasible for the majority of IoT applications, due to the high amount of transactions and the high amount of data. Bitcoin is able to process 4.5 transactions per second (2704 transactions per block on 21th of December, 2017) [9] and Ethereum is able to clear out 15.6 transactions per second (1349890 transactions on 4th of January, 2018) [10] at their peak. On the other side, there are private blockchain platforms like Hyperledger that has low latency requirements for consensus but do not fully satisfy decentralization goals. Benchmarking of Hyperledger platform shows that it fails to scale beyond sixteen nodes [11]. Quorum [12] and Corda [13], which are both permissioned and blockchain-inspired platforms targeting financial institu- tions, proposing a different model where data is not stored publicly on blockchain. Instead, data is kept off-chain by the participating peers (financial institutions) and the consensus function is designed to ensure agreements among interacting parties. Although this approach may be practical for financial institutions in terms of creating "business flows", it eliminates one of our design goals where IoT device manufacturers use this system as an "always-on data store". In addition, there are custom blockchain platforms targeting IoT and decentralized application development, such as IOTA [14] and EOS [15], which will be analyzed separately below. Although pushing the complete IoT data into blockchain is problematic, it should be possible to push a so-called “file handle”, that is tied to a specific IoT data chunk. Hence, our proposed data marketplace targets non-real time and non- critical IoT systems that push monitoring data to the data backend in large time intervals (>30 mins). However, this approach will need a secondary decentralized file storage layer. IPFS [16] and Swarm [17] are two prominent alternatives that can be used for this purpose. Both technologies are peer-to- peer (P2P) with decentralized file transfer systems in which files are addressed by the hash of their content. Moreover, they are compatible with the concept of edge computing if IPFS or Swarm nodes are executed on IoT gateways. On top of that, highly used data sources will be retrieved with low latency as mentioned in Swarm guide: “Nodes cache content that they pass on at retrieval, resulting in an auto scaling elastic cloud: popular (oft-accessed) content is replicated throughout the network decreasing its retrieval latency” [18]. B. Decentralized Application Proposed IoT data platform should be completely decen- tralized and always in working condition in all circumstances. Therefore not only the financial part of the trade, i.e., the transactions, but also the application logic of the platform should be in the blockchain. As a result, this narrows down the list of blockchain platforms to the ones that utilize smart contracts to ensure an always-on decentralized platform. C. Financial Incentives There are already clear benefits for IoT device manufac- turers and AI/ML providers to use the proposed system. IoT device manufacturers will be able to break free of developing and maintaining a cloud backend. Besides, they will be able to sell collected data in an open marketplace. AI/ML providers, on the other hand, will be able to access a vast data library where they can browse and buy as much as they can afford. In addition, nodes in the decentralized storage network should also be incentivized in order to keep bulk IoT sensor data available, at least based on their usage [17]. This mechanism is similar to Amazon Web Services (AWS) Simple Storage Service (S3) in terms of functionality. Yet, it consists of multiple independent peers committing their resources instead of a single entity, where they are rewarded based on their contribution. Storage incentivization can be done only if decentralized storage system is deeply integrated with the blockchain client. Having a built-in currency is a vital tool for embedding incentives at the transaction level. Unfortunately, permissioned blockchains like Hyperledger and Corda lack this mechanism. IV. C ANDIDATE PLATFORMS The requirements and the challenges for such a system is detailed in the previous section. Now we will study two avail- able candidate platforms: one is customized for addressing IoT needs (IOTA) and the other one is proposed for decentralized application development (EOS). Then, we will briefly describe our proposal, Ethereum and Swarm platform. A. IOTA IOTA is a relatively new project which uses "Tangle", a directed acyclic graph data structure to store transactions. It aims to provide a decentralized infrastructure and a data mar- ketplace for IoT devices [14]. However due to centralization concerns and persistent storage needs (permanode), IOTA is not picked as the implementation platform for the time being."Coo" (Coordinator), which is a full node controlled by IOTA Foundation, is employed to clear out transactions. If "Coo" is down by any reason, IOTA network stops working. IOTA plans to shutdown "Coo" when the system is able to resist to a %34 attack. However, at the time of this writing, it is still on. In addition, IOTA uses a mechanism called "snapshot" where they prune history of transactions and the attached data in order to prevent bloat. As a result, IOTA full nodes will not be storing any data by default (even a pointer to an external file) except the account balance. In order to access persistent data, IoT vendors should run so-called “permanodes” that store all the data starting from the genesis block. This will be a huge burden for IoT vendors in terms of storage compared to just incentivized independent Swarm nodes for storage in a Ethereum-Swarm setup. As a part of the announced milestones, IOTA is planned to take automatic snapshots. B. EOS and EOS Storage EOS is another blockchain project aiming to create scalable, decentralized applications on top of an existing blockchain architecture [15]. EOS project addresses important aspects like creating peer-to-peer terms of service agreements, separating authentication from application. These aspects are very im- portant if the aim is to create a decentralized peer-to-peer data marketplace. Similar to the authors’ line of thinking, EOS Whitepaper [15] emphasizes that the piece of data to be stored in blockchain should be relevant to the application. In other words, instead of the content itself, i.e. bulk IoT data, a pointer to it should be stored in blockchain. Just like Swarm, EOS recently proposed a decentralized storage layer built on top IPFS technology [19]. In order to have a replicated file on EOS Storage, two transactions should be processed, one for creating the file on the blockchain and the other one for the confirmation of a successful upload [19]. In general, EOS is a well-thought platform tailored for the needs of the next generation of application developers, However, for our specific use case EOS storage mechanics will double the amount transactions needed to store the file handles. C. Ethereum and Swarm Ethereum, being the first decentralized application platform, has already established itself a high ranking among cryptocur- rencies and sparked developer interest with its decentralized application platform. Ethereum currently offers a widely used programming language, called “Solidity”, and a complete web based development environment, called “Remix IDE”. In addition, Ethereum is deeply integrated with Swarm, a decentralized, torrent-like storage service. As the result of this deep integration, Swarm nodes can be financially incentivized directly from Ethereum. Lastly, Ethereum platform’s currency “Ether” is widely used which makes instant trades to fiat currency possible. Such a feature may accelerate adoption of the proposed system exponentially. Based on the aspects detailed above, Ethereum is selected as the blockchain and Swarm as the decentralized storage platform based on the maturity of the platforms and deep integration with each other. V. I MPLEMENTATION CONCEPTS This section will first go over the concepts used in the development of our smart contract. Designing a generic IoT backend on the blockchain requires some challenges which can be listed as follows: a flexible querying mechanism for data consumers (filter data by vendor, sensor type, geo-location, time) a voting system to rank data sources a token-based economy where marketplace payments are not exposed to heavy market fluctuations payment channels to execute instant transfers A. Data-as-a-Contract Implementing the IoT data marketplace as a smart con- tract, i.e. a decentralized application deployed as a part of blockchain, facilitates a transparent data collection and shar- ing environment. In addition, by being trustless, blockchain infrastructure inherently provides a global safe-trade environ- ment. Quoting Nick Szabo, “trusted third parties are security holes” [20]. The presence of such a system proactively eliminates op- erational risks of IoT device manufacturers, as there will be no need to develop and maintain an actual data backend. In our previous research, we demonstrated how the blockchain platform can be used for integrating IoT devices [21] and creating a generic data backend [22]. IoT device manufacturers may maintain a custom data backend for certain purposes like privacy, but in any case, a blockchain-based system will enforce transparency and data democratization. Nowadays, it is very common for cloud provides to create solutions labeled as Software-as-a-Service (SaaS) or Platform- as-a-Service (PaaS) that offer their customers pay-per-use access. Following that model, consumers of the IoT data such as AI/ML providers, or consumers of the actionable insight such as business, organizations, regular end users who give consent to data sharing, will pay as much as they use the provided services. B. Geographical Data on Blockchain One of the key features for Internet of Things is geolocation where the interaction with environment takes place. There are many researches for determining geolocation of IoT end devices without trusting the location information from IoT device or IP packets, which may be blocked or compromised by an adversary [23]. Still, detecting the geolocation of an IoT device is not ethical due to violation of privacy. Actually, it is possible to verify the geolocation of an IoT end-device by the consensus of nearby IoT end devices on a mature ecosystem unless more than 33% of devices behave maliciously. Hence, we propose to use GeoHex that divides whole world map into hexagons and map these hexagons with strings [24]. It is very practical when it comes to searching for nearby geolocations. Whereas most of geolocation systems requirefloating point arithmetics, GeoHex limits the geolocation to a string of at most 17-bytes. Considering its importance for a data scientist in picking-up data from the market, we prefer using GeoHex due to its ease of use in querying geolocations. C. Validation and Feedback V oting is a straightforward feedback mechanism that is used by the AI/ML providers to rank the quality of the IoT device manufacturers. Consumers of the data marketplace will mark bad providers, which will in turn increase the overall data quality in the system. V oting is one of the early concepts explored in blockchain systems and due to its immutable and trustless nature, such applications proved to be working successfully. D. Data Tokens Ethereum tokens are ERC20-compatible smart contracts that can act like a currency on top of Ethereum [25]. By creating Ethereum tokens, it is possible to define a custom currency, which can be used to interact with the proposed, underlying system. In short, smart contracts can be extended to define their own economic model. A direct benefit of such an abstraction is the isolation of the token value from the price fluctuations of Ethereum. The proposed data marketplace uses Ether (Ethereum's currency) as the medium of exchange. However, by extend- ing the smart contract to support ERC20 standard, proposed marketplace will be able to offer a custom token to be used as a currency, therefore providing a stable and deterministic data pricing. Even though it is purely economic, these type of changes are required to facilitate mass adoption of the proposed system. E. Payment Channels Blockchain systems process transactions by packaging them into blocks, which inherently adds latency expressed in block creation time. Average block creation time is 14 seconds in Ethereum. This latency, however, is not ideal for scenarios where high amount of small payments are taking place be- tween two parties. In order to address this issue, an off-chain scaling solution called payment channels has emerged. Pay- ment channels are near-instant and low-fee payment networks, complementing the original blockchain platform. Currently, Lightning Network [26] provides this service for Bitcoin and Bitcoin-variant currencies, and Raiden Network [27] provides it for Ethereum blockchain and works with any ERC20 com- patible token. The proposed data marketplace will benefit from payment channels, because marketplace should offer instant exchange of token and data with its dedicated ERC20 token. By us- ing Raiden micropayment network and instant token trans- fers, it will become possible to introduce pay-as-you-go or subscription-based solutions for data consumers. Ethereum Swarm IoT Manufacturer AI/ML ProviderIoT Gateway Device vendor_register(prefix,sensors,costs) return vendor_adress add_valid_device(device_address) return device_address upload_data return swarm_url return vendor_adress sensor_data_pull(vendor_address, type,index) return (schema,timestamp,spatial,price)[] request_for_data(vendor_address, type, index)return vendor_adress[]query_sensor(type,index)sensor_data_push(vendor_address,type,schema,timestamp,spatial,swarm,key_index, encryption_id) emit payload_request(from,to,pub_key ,type,index)customer_register(pub_key) return customer_adress transfer_key_and_data(dec_key ,to,type,index) emit payload_response(from,to,dec_key ,type,index,swarm)Fig. 3. Data Flow Sequence Diagram 1 function vendor_register ( string prefix, uint [] sensors, uint [] costs) public returns (address); 2 function customer_register ( string pub_key) public returns (address); 3 function add_valid_device (address device_address) public returns (address); 4 function vendor_length () public view returns ( uint length); 5 function get_vendor (address addr) public view returns ( string prefix); 6 function vote_for_vendor (address vendor_address, uint vote) public returns ( uint ); 7 function query_sensor ( uint sensor_type, uint index) public view returns (address result); 8 function sensor_data_push (address vendor_address, uint sensor_type, string schema, uint timestamp, 9 string spatial, string swarm, uint key_index, uint enc_id ) public returns (address); 10 function sensor_data_pull (address vendor_address, uint sensor_type, uint index) 11 public view returns ( string schema, uint timestamp, string spatial, uint price); 12 function sensor_data_length (address vendor_address, uint sensor_type) public view returns ( uint len); 13 function get_sensor_price ( uint sensor_type_index) public view returns ( uint ); 14 function update_sensor_price ( uint sensor_type, uint price) public returns ( uint ); 15 function request_for_data (address vendor_address, uint sensor_type, uint index) public returns (address); 16 function transfer_key_and_data ( string dec_key,address _to, uint sensor_type, uint index) public returns ( string ); Listing 1: Data Marketplace Core Functions VI. S MART CONTRACT A. Overview of Development Environment Ethereum blockchain with a built-in Turing-complete pro- gramming language allows us to write smart contracts [28]. In this paper, the smart contract implementation is done in Solidity which is designed to target Ethereum Virtual Machine (EVM). During the smart contract development process, we used web-based Remix IDE, which contains Solidity compiler and debugger. Ethereum client version geth 1.7.3, Solidity version 0.4.19 and Remix IDE Online version 0.1.3 are used for development. The contract written in Solidity generates two components: the bytecode to run on EVM and the Application Binary Interface (ABI). Bytecode runs whenever a function is called from the application, and stored into Ethereum blockchain under contract address. ABI defines the structures and func- tions that can be invoked explicitly. In other words, ABI grants access to call functions in smart contracts. To sumup, three requirements should be satisfied to interact with a smart contract: 1) Bytecode must be deployed to blockchain 2) Address of bytecode must be known 3) ABI of smart contract must be known. Our proposed system will be able to provide IoT device data to many users when the system reaches its maturity. The relation between the data and its users is similar to one-to-many relationship in traditional databases. Based on this relationship, our platform can be seen as a decentralized exchange platform that requires more reading operation from smart contract than writing to it. B. Action Flow The main stakeholders of the application are “vendors” and “customers”, who correspond to an IoT Manufacturer and an AI/ML provider, respectively, in Figure 3. When a vendor wants to get economic benefits from devices, it creates a new registry on the application by calling vendor_register (List- ing 1, line 1). For blocking an unauthorized device pushing 1 /*payload from a specific sensor type */ 2 struct payload { 3 address device_id; 4 uint timestamp; 5 string swarm; 6 string schema; 7 string spatial; 8 uint key_index; 9 EncryptionScheme encryption_scheme; 10 string encrypted_key; 11 } 12 /*everything about vendors */ 13 struct vendor { 14 string prefix; 15 // vendor supported sensor types 16 mapping( uint =>bool ) types; 17 // unit prices for every sensor type 18 mapping( uint =>uint ) prices; 19 // payload from a specific sensor type 20 mapping( uint => payload[]) payloads; 21 // devices belong to specific vendor 22 mapping(address => bool ) devices; 23 // total count of votes 24 uint votes; 25 } 26 struct customer { 27 payload[] paid_arr; 28 mapping(address => bool ) vote_map_used; 29 string pub_key; 30 } 31 mapping(address => vendor) private vendor_map; 32 mapping(address => customer) private customer_map; 33 address[] private vendor_arr; 34 mapping(address => uint ) balances; Listing 2: Data Marketplace Core Data Structure data to market on behalf of the vendor, vendor must declare its device addresses by using add_valid_device method (Listing 1, line 3).Then, any valid (registered by vendor) device can push data to the system by stating the vendor, pre-defined schema, file handle, timestamp, and geolocation (Listing 1, line 8). In this manner, devices can upload many datasets from different sensor types into the system. Then any user, such as an AI/ML provider, can query data sets of a sensor by calling query_sensor (Listing 1, line 7). It returns list of vendors who own the datasets of the queried sensor type. From this point on, the user selects a vendor and the application calls sensor_data_pull to have more descriptive details such as timestamp, geolocation or schema of the sensor data (Listing 1, line 10). After desired dataset is matched, payload data can be claimed by calling request_for_data (Listing 1, line 15). When the user retrieves the data, voting option for the user is enabled to evaluate the vendor. Through vote_for_vendor (Listing 1, line 6), the user is able to vote as up or down according to his/her experience. C. Data Structures and Optimization IoT device data is a form of digital asset which is controlled by the smart contract in data market application. It is con- sidered as a digital asset because data collection is a costly operation for IoT vendors and the collected data provides value for businesses. IoT device data or namely the payload (Listing 2, line 2-11) is the fundamental structure, around which the whole ecosystem gets shaped. Storing this data directly on blockchain creates lots of transactions and incurs high financial costs. Instead, IoT device data is uploaded fromgateway to Swarm file system in an encrypted form. Swarm client returns file handle, which is cryptographic hash of the data. The file handle is unique identifier and address of data. Data schema, which will be used for parsing the payload, is an important concern for AI/ML providers. Therefore, it is also included in the payload structure. In addition, the identifier of the device that uploads the data, the name of the encryption scheme and the index of the encrpytion key is also present in the payload structure. Details on encryption and security will be given in the next subsection "Encrpytion and Data Security" VI-D. Second structure in the contract is vendor (Listing 2, line 13-25). Vendor is located at the lowest level in the stack- like approach which is shown in (Figure 1). To show human- readable names instead of addresses, we store prefix for each vendor. In our implementation, we used a unique number instead of a string to represent each sensor type. For example, “1” for smart watch data, “2” for holter monitoring data, etc. By doing so, we decrease the cost of transactions [29]. Based on this representation, we used sensor type as key fortypes ,prices , and payloads mappings. Types store for which sensor types registered by the vendor. Prices store the corresponding prices for each sensor type. A vendor has the ability to push multiple payloads per sensor type, with each payloads store array of payload structures (Listing 2, line 20). Device addresses that are allowed to push data in the name of the vendor are also stored for automatization. This allows the IoT device to export its data to Swarm with a script and add a new payload to the application with a file handle on behalf of vendor. Reliability and convenience of datasets can be provided with a voting mechanism, so votes is also defined in the vendor structure as a field. The last structure of the system is customer , which can be an AI/ML provider or an individual user. It stores the public key of the AI/ML provider to be used in later stages during data decryption. For browsing and voting purposes, paid_arr and vote_map_used mappings are defined in this structure (Listing 2, line 26-30). Vote_map_used stores address of vendor as the key and a boolean value that shows whether the customer has the right to vote or not. While implementing functions, our main concern was to minimize gas cost which is spent on each execution of opcodes in EVM. Considering this cost, we avoided loops and mapped data structures accordingly. We used two mapping structures as global variables (Listing 2, line 31-32) for getting or setting any field within stakeholders (customers and vendors) of the system. Instead of storing whole vendor structs in an array, we stored addresses of them for querying sensors and corresponding prices (Listing 2, line 33). Any operation like registering as a vendor with a fake ID or adding random devices to vendor's space is punished by Ethereum network itself. Therefore, we did not implement an additional blocking mechanism. D. Encryption and Data Security Swarm file handles are openly visible on the blockchain. In order to prevent a non-paying user get all the Swarm handles and fetch the corresponding files, IoT data uploaded to Swarm should be encrypted with a symmetric key before the upload. To ensure that, payload metadata should contain the name of the encryption scheme (DES, AES) and a key index beside the device identifier. We propose that IoT device vendors store the master keys of their gateway devices and configure the devices to create new symmetric encrpytion keys for each upload using a hierarchically deterministic method as it is done in BIP32 Wallets [30]. This way, every Swarm file will be encrypted with a different symmetric key and IoT device vendor will be able to calculate any given key by using the master key and the key index provided inside the metadata. IoT device manufacturers store and manage master keys per device even today, especially for low-power, long range protocols like LoRa where a master key is used to encrypt data messages on the field [31]. If a data consumer wants to buy a certain chunk of IoT data, the payment and acquisition of the data will happen as described in previous sections. The decryption process of the acquired data will happen as follows, where the whole process can be automated by Javascript code interacting with the Ethereum client: 1) AI/ML provider will request data and pay for it by using a smart contract function 2) IoT device vendor will be notified by the event invoked by that call, passing the address of the AI/ML provider 3) IoT device vendor will use the address to get the public key of the AI/ML provider 4) IoT device vendor will calculate the symmetric key that is used to encrypt that particular Swarm file by using that device's master key and key index 5) IoT device vendor will encrypt symmetric key with AI/ML providers public key and create a transaction 6) AI/ML provider will receive the encrypted symmetric key, decrypt it using its private key and then decrpyt the Swarm file using the symmetric key VII. D ISCUSSION Encryption: Ethereum blockchain does not store data in encrypted form. Similarly, the proposed data marketplace does not impose any restrictions on the IoT data uploaded to Swarm. It only sets the mechanics between data vendors and data consumers. In the current design, it is assumed that the IoT data sent to the platform is anonymized due to the rules and regulations, like GDPR, that IoT device vendors are facing. Although IoT device manufacturers may decide to encrypt data and share the keys with data consumers by using an off- chain method in the current system, it is not very practical. It is planned to extend the data marketplace to support some form of encryption where encrypt/decrypt operations can be conducted in a decentralized manner.Real-Time Systems: Public blockchain systems add blocks, i.e. packaged transactions, to the blockchain at every block creation interval on average. On top of this, there is a block propagation delay which adds additional latencies if a data consumer tries to follow a real-time data feed using the data marketplace. Therefore, with the current consensus functions on widely used public blockchain platforms, proposed solution does not support real-time or safety-critical applications due to high latencies. Data Collection and Consent: European Union has data protection requirements such as General Data Protection Reg- ulation (GDPR) (Regulation (EU) 2016/679) [4] already in place, so IoT device manufacturers should comply with cur- rent rules and regulations as data providers. Although data marketplace smart contract does not store any user data (just Swarm handles), data replication on Swarm filesystem should be managed by device vendors. VIII. C ONCLUSION In our previous research, we have already explored ways to integrate low-power IoT devices to a blockchain-based infras- tructure [21] and created a decentralized data backend [22]. In this paper, we extend that goal to a broader data marketplace involving multiple parties, targeting non-real time, non-critical IoT applications. Creating a decentralized and trustless plat- form for storing and accessing IoT data will positively impact IoT device manufacturers, AI/ML providers, and, obviously, the end-users. Such a marketplace will democratize access to consented data and increase both service quality and variety of offerings, which will turn out to be beneficial for the users in the end. A proof-of-concept data marketplace is implemented as a smart contract on Ethereum platform and uses Swarm as its storage system. It provides a flexible querying mechanism for data consumers and contains a voting mechanism for eliminating unreliable data providers. Smart contract code is open sourced on GitHub as "IDMoB: IoT Data Marketplace on Blockchain" [32]. ACKNOWLEDGMENT This project has been partially supported by Scientific Research Fund of Bogazici University under grant number: 13500 REFERENCES [1] IBM. (2017) 10 Key Marketing Trends for 2017. [On- line]. Available: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias? htmlfid=WRL12345USEN [2] D. Schatsky, N. Kumar, and S. Bumb. (2017) Intelligent IoT: Bringing the power of AI to the Internet of Things. [Online]. Available: https://www2.deloitte.com/insights/us/en/focus/signals-for-strategists/ intelligent-iot-internet-of-things-artificial-intelligence.html [3] PricewaterhouseCoopers. (2017) Leveraging the upcoming disruptions from AI and IoT. [Online]. Available: https://www.pwc.com/gx/en/ industries/communications/assets/pwc-ai-and-iot.pdf [4] European Parliament. (2016, Apr.) General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679). [Online]. Avail- able: http://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX: 32016R0679&from=EN [5] IOTA. (2017, Oct.) IOTA. [Online]. Available: https://iota.org [6] D. Sønstebø. (2017, Nov.) IOTA Data Marketplace. [Online]. Available: https://blog.iota.org/iota-data-marketplace-cb6be463ac7f [7] J. Uchiyama. (2016) Contract Market. [Online]. Available: https: //github.com/juchiyama/contractmarket [8] E. I. P. Initiative. (2017) BIG IoT Marketplace. [Online]. Available: https://market.big-iot.org [9] Blockchain.info. (2018) Bitcoin: Average Number Of Transactions Per Block. [Online]. Available: https://blockchain.info/charts/ n-transactions-per-block?timespan=all [10] Etherscan.io. (2018) Ethereum: Transactions Per Day. [Online]. Available: https://etherscan.io/chart/tx [11] T. T. A. Dinh, J. Wang, G. Chen, R. Liu, B. C. Ooi, and K.-L. Tan, “Blockbench: A framework for analyzing private blockchains,” in Proceedings of the 2017 ACM International Conference on Management of Data . ACM, 2017, pp. 1085–1100. [12] Quorum. (2016) Quorum Whitepaper v0.1.pdf. [Online]. Available: https://github.com/jpmorganchase/quorum-docs/blob/master/ Quorum%20Whitepaper%20v0.1.pdf [13] R. G. Brown, J. Carlyle, I. Grigg, and M. Hearn, “Corda: An introduc- tion,” R3 CEV , August , 2016. [14] S. Popov. (2017, Oct.) The Tangle. [Online]. Available: http: //iotatoken.com/IOTA_Whitepaper.pdf [15] EOS. (2017, Jun.) EOS.IO Technical White Paper. [On- line]. Available: https://github.com/EOSIO/Documentation/blob/master/ TechnicalWhitePaper.md [16] J. Benet, “Ipfs-content addressed, versioned, p2p file system,” arXiv preprint arXiv:1407.3561 , 2014. [17] V . Trón, A. Scher, D. A. Nagy, Z. Felföldi, and N. Johnson. (2016, May) Swap, Swear and Swindle: Incentive system for Swarm. [Online]. Available: http://swarm-gateways.net/bzz:/theswarm. eth/ethersphere/orange-papers/1/sw%5E3.pdf [18] Swarm. (2017) Swarm Documentation. [Online]. Available: https: //swarm-guide.readthedocs.io/en/latest [19] EOS. (2017, Sep.) Introducing EOS.IO Storage. [Online]. Available: https://github.com/EOSIO/Documentation/blob/master/EOS. IO%20Storage.pdf [20] N. Szabo. (2001) Trusted Third Parties Are Security Holes. [Online]. Available: http://nakamotoinstitute.org/trusted-third-parties [21] K. R. Özyılmaz and A. Yurdakul, “Integrating Low-power IoT Devices to a Blockchain-based Infrastructure: Work-in-progress,” in Proceedings of the Thirteenth ACM International Conference on Embedded Software 2017 Companion , ser. EMSOFT ’17. New York, NY , USA: ACM, 2017, pp. 13:1–13:2. [Online]. Available: http://doi.acm.org/10.1145/3125503.3125628 [22] K. R. Özyılmaz and A. Yurdakul, “Designing a blockchain-based IoT infrastructure with Ethereum, Swarm and LoRa,” IEEE Consumer Electronics Magazine , "In press". [23] M. N. Islam, V . C. Patil, and S. Kundu, “Determining proximal geolo- cation of IoT edge devices via covert channel,” in Quality Electronic Design (ISQED), 2017 18th International Symposium on . IEEE, 2017, pp. 196–202. [24] GeoHex. (2009) Hexagonal geo-coding system. [Online]. Available: https://sites.google.com/site/geohexdocs [25] F. V ogelsteller and V . Buterin. (2015) ERC-20 Token Standard. [Online]. Available: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20. md [26] J. Poon and T. Dryja, “The bitcoin lightning network: Scalable off-chain instant payments,” draft version 0.5 , vol. 9, p. 14, 2016. [27] Raiden. (2017) Raiden Network. [Online]. Available: https://raiden. network/faq.html [28] V . Buterin. (2014) A Next-Generation Smart Contract and Decentralized Application Platform. [Online]. Available: https://github.com/ethereum/ wiki/wiki/White-Paper [29] Solidity. (2017) Dynamically-sized byte array. [On- line]. Available: https://solidity.readthedocs.io/en/develop/types.html# dynamically-sized-byte-array [30] Bitcoin. (2017) BIP32: Hierarchical Deterministic Wallets. [On- line]. Available: https://github.com/bitcoin/bips/blob/master/bip-0032. mediawiki [31] N. Sornin, M. Luis, T. Eirich, T. Kramp, and O. Hersent, “LoRaWAN Specification V1,” 0. Technical report, LoRa Alliance, Tech. Rep., 2015. [32] K. R. Özyılmaz and M. Do ˘gan. (2017) IDMoB. [Online]. Available: https://github.com/kozyilmaz/idmob
{ "id": "1810.00349" }
2007.09098
Actor-based Risk Analysis for Blockchains in Smart Mobility
Blockchain technology is a crypto-based secure ledger for data storage and transfer through decentralized, trustless peer-to-peer systems. Despite its advantages, previous studies have shown that the technology is not completely secure against cyber attacks. Thus, it is crucial to perform domain specific risk analysis to measure how viable the attacks are on the system, their impact and consequently the risk exposure. Specifically, in this paper, we carry out an analysis in terms of quantifying the risk associated to an operational multi-layered Blockchain framework for Smart Mobility Data-markets (BSMD). We conduct an actor-based analysis to determine the impact of the attacks. The analysis identified five attack goals and five types of attackers that violate the security of the blockchain system. In the case study of the public permissioned BSMD, we highlight the highest risk factors according to their impact on the victims in terms of monetary, privacy, integrity and trust. Four attack goals represent a risk in terms of economic losses and one attack goal contains many threats that represent a risk that is either unacceptable or undesirable.
http://arxiv.org/pdf/2007.09098v2
Ranwa Al Mallah, Bilal Farooq
cs.CR
cs.CR
arXiv:2007.09098v2 [cs.CR] 4 Dec 2020Actor-based RiskAnalysis forBlockchainsin Smart Mobilit y Forthcomingin theproceedingsofCryBlock/MobiCom2020 Ranwa AlMallah Ryerson University Toronto,Ontario ranwa.almallah@ryerson.caBilalFarooq Ryerson University Toronto,Ontario bilal.farooq@ryerson.ca ABSTRACT Blockchain technology is a crypto-based secure ledger for d ata storage and transfer through decentralized, trustless pee r-to-peer systems.Despiteitsadvantages,previousstudieshavesho wnthat thetechnologyisnotcompletelysecureagainstcyberattac ks.Thus, it is crucial to perform domain specific risk analysis to meas ure how viable the attacks are on the system, their impact and con - sequently the risk exposure. Specifically, in this paper, we carry out an analysis in terms of quantifying the risk associated t o an operationalmulti-layered Blockchainframework forSmart Mobil- ity Data-markets (BSMD). We conduct an actor-based analysi s to determinetheimpactoftheattacks.Theanalysisidentified fiveat- tackgoalsandfivetypesofattackersthatviolatethesecuri tyofthe blockchain system. In the case study of the public-permissi oned BSMD,wehighlight thehighest riskfactorsaccordingtothe irim- pact on the victims in terms of monetary, privacy, integrity and trust.Fourattackgoalsrepresentariskintermsofeconomi closses andoneattackgoalcontainsmanythreatsthatrepresentari skthat is either unacceptableorundesirable. CCS CONCEPTS •Securityandprivacy →Databaseand storagesecurity . KEYWORDS blockchain,mobility,security,risk analysis ACMReference Format: Ranwa Al Mallah and Bilal Farooq. 2020. Actor-based Risk Analysis f or Blockchains in Smart Mobility: Forthcoming in the proceedings of Cry- Block/MobiCom2020.In ProceedingsofACMConference(Conference’17). ACM, NewYork, NY, USA,6 pages.https://doi.org/10.1145/nnnnnnn.nnnnnnn 1 INTRODUCTION Nowadays, transportationdata are shared across multiplee ntities and stored in central servers that are susceptible to cybera ttacks. In the recent years, many cybersecurity breaches have occur red in transportation systems. In 2015, a group of civic hackers deci- phered and exposed the unstandardized bus system location d ata of Baltimore [13]. The San Francisco transit was hacked to gi ve Permission to make digital or hard copies of all or part of thi s work for personal or classroomuseisgrantedwithoutfeeprovidedthatcopiesar enotmadeordistributed for profit or commercial advantage and that copies bear this n otice and the full cita- tiononthefirstpage.Copyrightsforcomponents of thiswork owned byothersthan ACMmustbehonored.Abstractingwithcreditispermitted.T ocopyotherwise,orre- publish,topostonserversortoredistributetolists,requ irespriorspecificpermission and/or afee. Request permissionsfrompermissions@acm.or g. Conference’17,July 2017,Washington,DC,USA © 2020 Associationfor Computing Machinery. ACM ISBN978-x-xxxx-xxxx-x/YY/MM...$15.00 https://doi.org/10.1145/nnnnnnn.nnnnnnnfreeaccesstocommutersfortwodays[14].Itwasrecentlydi scov- ered that Google keeps collecting user locationdata even if users explicitlydeactivatethetrackingsystem intheir mobiles [12]. Blockchain technology creates a distributed consensus, pr ovid- ing entities with a secure platform that maintains past reco rds of digitalevents [4].Inthecontextoftransportation,amult i-layered Blockchain framework for Smart Mobility Data-market (BSMD ) wasrecentlyproposedbyLópezandFarooq[8].BSMDisapermi s- sionedblockchainandisdesignedtosolvetheprivacy,secu rityand management issues related to the sharing of passively as wel l as activelysolicitedlarge-scalemobilitydata.Inanothers tudy,López andFarooq[9]proposedadistributedtoolformobilitychoi cemod- elling over BSMD, where participants do not share personal r aw data, while all computations are done locally. Eckert et al. devel- oped a user-centric emission monitoring and trading system for multi-modal mobility over the BSMD [2]. Another applicatio n in transportationused BSMDfor modechoice inference using fe der- atedlearning over blockchain[10]. However, security issues related to blockchain are critica l in termsofcybersecurity.Inthissense,securityexpertsnee dtofully understand the risk in terms of scope and impact of the securi ty andprivacychallenges relatedtoblockchainbeforepredic tingthe potentialdamage from an attack. Furthermore, verifying wh ether thecurrenttechnologycanwithstandpersistenthackingat tempts is alsoof utmostimportance. In 2017,Li et al.conducted a comprehensive cybersecurityr isk analysisofblockchain[7].Theysystematicallystudiedth esecurity threatstoblockchainandsurveythecorrespondingrealatt acksby examining popular blockchain systems. Although they ident ified the threats and their nature, the real scope of the risk that t hose threats entail was not described and evaluated.Unlike thei r work, we aim at quantifying the risk. We present ordinal values for the identifiedrisks.Anotherdifferenceisthatinourwork,wean alyze a real blockchainsystem developed fortransportationappl ication i.e. BlockchainforSmart MobilityData-markets. Theaim ofourworkis moreextensive thanthetraditionalris k assessment.Weestimatetheriskthroughanactor-basedris kanal- ysis based on the impact that the exploitation of vulnerabil ities will have on the transportationsystems using BSMD. Efficient de- tection mechanisms are desired in this context to reduce the risk thatvariousthreatsentailontheblockchainsystemsusedi ntrans- portationdomain.Countermeasurestoavoidcyberattacksm ustbe implemented as a security-by-design practice. This paper is organized as follows.Related work is provided in Section 2. In Section 3, we present the methodology followed by Conference’17, July 2017,Washington, DC,USA Ranwa AlMallahandBilalFarooq the actor-based risk analysis of a blockchain in transporta tiondo- maininsection4.Finally,conclusionandfutureworkareou tlined in Section5. 2 RELATED WORK In the last decade, several studies have exposed vulnerabil ities in thetechnologiesemployedinblockchain.Particularly,fo rresearch in blockchain cybersecurity risk analysis, we summarize th e find- ings in Table1. Lietal.[7]performedasystematicexaminationoftherisks asso- ciatedwiththepopularblockchainsystems(i.e.Ethereum, Bitcoin, Monero, RSK, Counterpaty, Stellar, Monax, Lisk), the corre spond- ing real attacks, and the security enhancements. They evalu ated the real attacks on popularblockchain systems from 2009 to 2 017 and analyzed thevulnerabilities exploitedinthese cases. Ratherthanpopularblockchainsystems,Atzeietal.[1]foc used on Ethereum smart contracts. From a security programming pe r- spective,theirworkanalyzedthesecurityvulnerabilitie sofEthereum smart contracts, and provided a taxonomy of common program- ming pitfalls that may lead to vulnerabilities. They show a s eries of attacks on smart contracts that exploit these vulnerabil ities, al- lowing anadversary tosteal money orcauseother damage. In contrast to previous studies, Homoliak et al. [5] propose d a security reference architecture based on models that demon strate thestackedhierarchy ofvariousthreats(similartotheISO /OSI hi- erarchy). In order to isolate the various nature of security threats, thestackedhierarchyconsistedoffourlayers(Networklay er,con- sensus layer,replicated statemachine layer and applicati onlayer). Theyalsoproposedathreat-riskassessmentofthereferenc earchi- tectureusingtheISO/IEC15408template.Withthestackedm odel, differentthreat-agentsandthreatsappearateachlayer.Th eyiden- tified four threat-agents: service providers, consensus no des, de- velopers and users.Theyare maliciousentities whoseinten tion is tosteal assets, break functionalities, ordisruptservice s. Although the previous studies identified the threats and the ir nature, the real scope of the risk that those threats entail i s not described.Weconsiderthatalthoughtherearevulnerabili ties ina system, it is the impact that certain exploitationhas on the nodes oftheblockchainnetworkthatdetermineswhetherthevulne rabil- ity represents a significant risk or not. In this line of thoug ht, we havecarriedoutanactor-basedriskanalysisthatweapplie dtothe multi-layered blockchainfor smartmobilitydata-market. 3 METHODOLOGY Theaimofourworkistoperformanactor-basedriskanalysis .Itis moreextensivethanthetraditionalriskassessment inthem anner thatthemethodologyenables ustoquantifytherisk.Quanti fying theriskrefinestheanalysisandgivesanorderofmagnitudeo fthe riskexposure.Also,measuringtheriskenables tobettergr aspthe impact of theattacks on large-scale systems or ecosystems w here many technologies are tobeevaluated bytherisk assessment . In the following, we define some cybersecurity and risk asses s- ment termsin ordertofacilitatethereading of ourwork. •Actor:Anentitythatviolatesintegrity,privacyorconfiden- tialitytoobtaincertainbenefit. •Victim:An entitythatis thesubjectof a cyberattack.•Attackgoal: Finaleffectdesiredbytheactoraimingonpro- ducingan impactonthevictim. •Scenario: Set ofactions carriedoutbytheactortoachieve its attackgoal. •Impact:Quantificationoftheattackgoal’seffectonthevic- tim. •Threat:Often called the actor scenario pair, is the combi- nationoftheentitywhocommitstheact,theactor,andthe wayitiscommitted,thescenario,inordertoproduceaneg- ative impact. •Vulnerability: A flaw that offers the opportunity to dam- age asystem. Thefirststepoftheactor-basedriskanalysisistoidentify poten- tialattackers,i.e.actorswhowouldbeinterestedintheec osystem under study. The next step is to determine the attack goals of the actors.Finally,Table2isusedtoquantifytheimpactonthe victim ofsuch attackgoals according toa four-level scale. We follow this methodology to determine the impact that re- sults from attacks on the BSMD ecosystem, a realistic blockc hain system.Specifically,LopezandFarooq[8]proposedtheBloc kchain forSmartMobilityData-markets, which is composedofnodes :In- dividuals,Companies,UniversitiesandGovernment(trans port,cen- sus, planing and development agencies). The nodes collect t heir owndataandstoreitinidentifications.Eachnodeisthesole owner of their data and can share their information by showing othe r nodes their identifications or parts of it. In the blockchain there are smart contracts available that the nodes need to sign bef ore any transaction of information is conducted. An actor-base d risk analysis is conductedonthis system. 4 ACTOR-BASED RISK ANALYSIS OF BSMD The methodology in our work can be applied to any cybersecu- rity analysis. Here, we describe its application on BSMD, a c yber physical transportation system, but the risk evaluation me thodol- ogy is not constrained to blockchain and can be applied to oth er technologies orgeneric blockchainsystems. Inthefirststep,weneedtoidentifycyberthreatsources(po ten- tialattackers) andtheir attackgoalsinthecontextofsmar tmobil- itydata-markets. 4.1 Cyber threat sources Cyber attackers exploit the systems for financial gains, obt aining information, conducting sabotage activities, creating di sinforma- tion, and degrading confidence in the ecosystem. The Industr ial ControlSystemsCyberEmergencyResponseTeam(ICS-CERT)h as characterizedacyberthreatsourceas:“personswhoattemp tunau- thorizedaccesstoacontrolsystem deviceand/ornetwork us inga datacommunicationspathway[3].”Itfurtherclassifiesthe sethreat sourcesintofourgroups(A1throughA4).Thetaxonomyofcyb er threat sources was introduced for traditional threats to pu rely In- formation Technology (IT) infrastructure. We propose to us e the same taxonomy in the context of cyber threats against the BSM D ecosystem—since it is composed of both IT elements and of cy- berphysicalsystemsthathaveanITcomponent.Inthecontex tof threatsagainsttheBSMDecosystem,weaddedanewthreatgro up that we call “insider threat”. We suppose it is a determined n ode Actor-based Risk Analysis forBlockchains in SmartMobilit y Conference’17, July 2017,Washington, DC, USA Table 1: Previousstudiesin blockchain cybersecurityrisk analysis. Studies Methodology Drawbacks Li etal., [7]- Systematic examination on security risks for popularblockchainsystems.- The real scope of the risk that those threats entail is notdescribed. -Survey therealattacksonblockchainsystems (Ethereum,Bitcoin,Monero,RSK,Counterpaty, Stellar,Monax,Lisk).- Do not consider therisk as being a func- tionofprobabilityand impact. - Analyze relatedvulnerabilities exploited. Atzei etal., [1]- Analyzed the security vulnerabilities of Ethereum smartcontracts.-Isolatedtheanalysis fromasecuritypro- gramming perspectiveonly. - Show a series of attacks which exploit these vulnerabilities.- They do not account for the various na- tureofsecuritythreats. Homoliaket al.,[5]- Stacked hierarchy of fourlayers. -They don’t quantifytherisk. - Identified fourthreat agents. - Generic architecture was not evaluated ona realistic blockchainsystem. - Reportvulnerabilities at each layer. Table2: Impactlevels for mobility data-marketadaptedfro m ICS-CERT[3] Type LevelDescription of theimpact Monetary1Minor monetaryloss 2Significant monetaryloss 3Severe monetaryloss 4Catastrophic monetary loss Privacy1Minor impactontheprivacyof any ofthenodes in BSMD(Individuals, Companies, Universities and Government) 2Significant ontheprivacy ofthenodes inBSMD 3Severe ontheprivacy ofthenodes inBSMD 4Catastrophic ontheprivacyof thenodes in BSMD Integrity1Minor impactontheintegrity of themobilitydata, transactions and integrity oftheusers 2Significant impactontheintegrity ofthemobility data,transactions and integrityof theusers 3Severe impactontheintegrity ofthemobilitydata, transactions and integrity oftheusers 4Catastrophic impact ontheintegrity of themobility data,transactions and integrityof theusers Trust1Minor impactonthetrustoftheBSMDnetwork 2Significant impactonthetrustof theBSMDnetwork 3Severe impactonthetrustof theBSMDnetwork 4Catastrophic impact onthetrustoftheBSMD with elevated economic means and high motives. The details o f various actorsaredescribed below: A1.Cybercriminals: Thisgroupincludestraditionalcybercrim- inals that use compromised computer systems to commit ident ity theft and leverage the blockchain network for a variety of ma li- cious activities, mostly for monetary gain. They may be pass ive nodessuchassmallbusinesses,individuals,datacollecto rs,oroth- ers. A2.Industrialspies: Organizations thatcompromisethecom- putersystemstoillegallyacquireintellectualproperty, know-how, trade, and commercial secrets, or other kinds of corporate c onfi- dential information. This kind of espionage may occur betwe en competingcorporations,foreconomic reasons. A3.ForeignIntelligenceAgencies: Foreignstate-basedorga- nizations that use computer systems to acquire sensitive in forma- tion on opposingstates, corporationsor individuals, or ot herwise influence their actions.A4. Terrorist groups: Organizations seeking to create public disorderorsow nationalterror,bycommittingdestructive violent acts. A5. Insider threat: The insider threat is a corrupted active node of the blockchain network (Government, University, Co m- panyorother),oraninfrastructurenodesuchasanetworkop era- tor,anInternetServiceProvider(ISP)thatmaliciouslyex ploitsthe blockchainsystem. 4.2 Attackgoals We identify five attack goals and present them in Table 3. We de - scribethem herein. G1- Gainknowledgeaboutthe data-market There is significant competition between companies that pro - ducetransportationinformation.Forexample,telecommun ication companies generate data thatcanbeusedfor transportation mod- eling. Similarly, the logs of available mobile devices regi stered by cellphonetowers canbeusedtomonitortraffic.Companies are in controloftheirdata.Accordingly,theBSMDecosystemcoul dbea Conference’17, July 2017,Washington, DC,USA Ranwa AlMallahandBilalFarooq Table 3: Attackgoals againsttheblockchain framework for s martmobilitydata-markets Goal Example G1 - Gain knowledge about the data- marketIn 2015, a group of civic hackers deciphered and exposed the u nstan- dardizedbussystem locationdataof Baltimore[13]. G2-Accesssensitivedataonthenodesof thenetworkIt was recently discovered that Googlekeeps collecting use r location dataeveniftheyexplicitlydeactivatethetrackingsystem intheirmo- biles [12]. In 2016,information of 57 million Uber customer s and dri- vers wereleaked [15]. G3 - Manipulate and modify blockchain informationIn 2016, criminals manipulated Smart contracts in the Ether eum blockchain with a DAO hack (Decentralized Autonomous Organ iza- tion),tosteal around 60milliondollars[11]. G4- Sabotageactivities In 2016, the San Francisco transit was hacked to give free acc ess to commutersfortwodays [14]. G5-Induceparticipantsintheblockchain network tomakeerrorsIn the Bitcoin network, with a double spending attack on fast pay- ments,itwasshownin[6]thatnodesinthenetworksmaynotde tect aninvalidtransactions andadditintothesecureledger.Th eattacker thusenjoys a service withoutpaying. target for industrial spies (A2) aiming to obtain knowledge about the data-market. Subsequently, such information could be s old to competing companies. Furthermore, this information is als o valu- able for criminal groups (A1), intelligence services (A3) a nd ter- rorist groups (A4) because it allows them to undertake attac ks by maliciouslyexploitingtheknowledge aboutthedata-marke t. G2- Accesssensitivedataon the nodesof the network Mobility data is continuously generated by different nodes o f the BSMD network. According to the identification layer of th e multi-layered blockchain model for smart mobility data mar ket, transportationdata is storedin files calledIdentification . Each en- tity contains metadata, static data and dynamic data. Nodes need consentfromtheownertoaccessthestaticanddynamicdataw hich can beattractivetomany actors. On the other hand, nodes communicate with each other using DecentralizedIdentifiers(DID).DIDsarethegatesforshar ingdata via peer-to-peerconnections wheretheinformationistran sferred using an asymmetric encryption. DIDs represent sensitive i nfor- mation because a given nodewill have one unique DID per trans - action. Any leakage of this information enables to correlat e DIDs intheledgertotracksinglenodesandobtaininformationon trans- actions.Intelligence services (A3) andterroristgroups( A4) would be interested in having this information because it would al low them to attain their ultimate goal of surveillance, assassi nation, etc.Cybercriminalgroups(A1)wouldbeinterestedinthisi nforma- tion to obtain monetary gain since mobility data is highly va lued. Through unsolicitedsharing of information,their clients couldbe forexampleinsurancecompanies(medicalorautomotive)th atmay useinformationonanindividual’sdailyactivitypatterns toassess the cost of insurance premiums or simply refuse coverage. In dus- trial spies (A2) may take advantage of the blockchain to find c us- tomers and improve their business. G3– Manipulateandmodifyblockchain information Blockchainsaremadetobepracticallyimmutable,where,in the- ory no one can modify the blockchain’s ’distributed ledger’ of all committed blocks. The blockchain relies on the distributed con- sensusmechanismtoachieveimmutabilityandtoestablishm utual trust.Vulnerabilitiesintheconsensusmechanismcanbeex ploitedbyattackerstocontroltheblockchainbymanipulatingandm odify- ingtheblockchaininformation.Criminalgroups(A1),inte lligence services (A3) and terrorist groups (A4) may want to reverse, ex- cludeormodifytheorderingoftransactions.Aninsiderthr eat(A5) mayhampernormalminingoperationsofotherminersorimped e theconfirmationoperationof normaltransactions. G4– Sabotageactivities Cybercriminals (A1)mayusetheblockchainecosystemforsa b- otageactivities.Sincetheprocessisanonymous,itishard totrack user behaviors, let alone subject to legal sanctions. For ex ample, criminals can leverage smart contracts for a variety of mali cious activities,whichmayposeathreattoourdailylife.Crimin alSmart Contracts can facilitate the leakage of confidential inform ation, theftof cryptographickeys, and various real-world crimes . Sabotage activities may also be conducted by intelligence s er- vices (A3) and terrorist groups (A4) to disrupt the blockcha in net- workormakevictimsviewoftheblockchainfiltered.Asprogr ams running intheblockchain,smartcontractsmayhavesecurit yvul- nerabilities caused by program defects. Attackers may expl oit the vulnerabilities to send malware and infect nodes or to initi ate De- nial of Service (DoS) attacks on the nodes of the blockchain. The attacks may cause a waste of hard disk resources and decrease d node speed. An insider threat (A5) may be a corrupted node who wants to intercept the network traffic of the blockchain to pot en- tiallydelay network messages. An attacker may want tomonop o- lizeall of the victim’s incoming and outgoingconnections, which isolates thevictim from the other peersin the network. Then , the attacker can filter the victim’s view of the blockchain, or le t the victim cost unnecessary computing power on obsolete views o f theblockchain. G5 – Induce participants in the blockchain network to makeerrors Thereareseveralcompanies,municipalitiesandindividua lspro- ducing transportation information which is valuable to gov ern- ments,researchersandpeople.Forexample,oneoftherespo nsabil- itiesofthegovernmentistocollectdatainordertomodel,m anage andimprovetransportationnetworks.Somemaliciousactor smay inject the ecosystem with falsified transportationinforma tion via Actor-based Risk Analysis forBlockchains in SmartMobilit y Conference’17, July 2017,Washington, DC, USA hackedtrafficdetectors,tolls,parkingandsmartcards.The partici- pantsoftheblockchainnetworkwouldendupmakingsub-opti mal decision. Theattackers maybeinterested indamaging there puta- tionofsomecompany,ortheymaysowdistrustinthegovernme nt oranyentityofthenetwork.Attackerscouldincludeactors A1,A3, A4andA5identifiedintheprevioussection.Thus,inducingp artic- ipantstomakeerrorsnotonlywouldtheybeachieving theirg oal, buttheywouldalsobeevadingtheresponsibilitiesoftheir actions bymaking theirinterference less detectable. 4.3 Impact ofattackgoals Independently ofthevariousactorsgoals,attackswillhav eanim- pact on the victim. The victim may be the individuals, the BSM D network or any of the active or passive node in the BSMD (data collectors, Companies, Universities and Government). In o rder to account for the various types of consequences that these att acks couldhaveonthem,wemeasuretheimpactaccordingtofourse p- arateaspects:Monetary(M),Privacy(P),Integrity(I)and Trust(T). The impact scale ranges from 1 to 4, with 4 being the highest im - pactlevel(mostsevere). Theimpactlevelsaredescribedin Table2. Theactor-basedriskanalysis ispresented inTable4.Theex plana- tionof theimpact analysis byattack goalfollows. G1(M) Mobility data is very profitable, and competition be- tweencompanies thatseek totakeadvantageoftheblockchai nto usethedatatoimprovetheirbusinessisfierce.(P)Whilecon fiden- tial,theinformationdisclosedwouldnothavesevereconse quences ontheindividuals.(T) Theattackwillhaveaminor impacton the trustintheBSMDnetwork. G2(P) Whileconfidential, theinformationdisclosedwouldnot have severe consequences (except maybe in terms of insurabi lity) andislikelytobeotherwiseavailabletoactorsthroughoth ermore traditionalformsofcyberattacksnotrelatedtotheBSMD.( M)The disclosureofthisinformationmaybegroundsforlegalacti onagainst theagency,government bodiesandconcernedcompanies.(T) The attack willhave a significant impact onthetrustand will deg rade confidence intheBSMDnetwork. G3(M) In the context of data markets, tampering of a service canproducelossesofmillionsofdollarstocompanies.Fore xample companiesthattakeadvantageoftheblockchaintofindcusto mers. Also,governmentandtransportagencies activitiestoimpr ovemo- bilitywillsuffersevere monetarylosses.(P)Modifyingblo ckchain information will have a significant impact on the privacy of a ny of the nodes in BSMD (Individuals, Companies, Universities and Government). (I) Atamperednode’s blockchainaccountwill have catastrophic impact on the integrity of the mobility data, t ransac- tions and integrity of the user. (T) Similarly, the attack wi ll have catastrophicimpactonthetrustoftheBSMDnetworkbecause the nodes will have no belief in the reliability or truth of the tr ansac- tions in theledger. G4(M)Maliciousactivitieswillinduceseveremonetarylosso n the victim of the attack. For example, network hijacking, cr imi- nalsmartcontractsandransomwareswillexploitthevictim inex- change of money. Also, sabotage activities will induce the v endor tonotgetrewardsforitsservice.(I)Theattackswillhavea signifi- cantimpactontheintegrityofthemobilitydata,transacti onsandintegrity of the users. (T) Finally, disruption of the netwo rk will have severe impactonthetrustoftheBSMD. G5(M)Injecting theecosystemwithfalsifiedtransportationi n- formation will induce significant monetary loss on the victi m of theattack.(I)Theattackwillhaveasevereimpactontheint egrity of the mobility data, transactions and integrity of the user s. (T) Also, if participants relying on the mobility data acquired from theblockchainmakeerrorsinthemodeling,management and i m- provement of transportationnetworks, it will degrade confi dence and have a severe impactonthetrustof theBSMD. 4.4 Discussion Thisanalysisrespondstotheneedsofseveralgroupssuchas com- panies,regulators,manufacturers,transportationagenc iesandeven individuals.Eachwillbeabletoidentifytheriskiestthre at,theone totreatwithpriority.FromtheresultsinTable4,dependin gonthe rankingobtained,aspecificgivenriskmanagementstrategy canbe applied.There are many strategies for managing therisk, na mely: refuse, accept,transfer orreducetherisk. Themostdrasticoneis refusing therisk. Itisappliedwhent he latter is unacceptable because of the catastrophic consequ ences it mayhave onthevictims. Thevictims may betheindividuals, u ni- versities, companies,transportagencies oranyofthegove rnment nodes of the blockchain network. In this case, vulnerabilit ies in theblockchainsystemthatareexploitedbyattackersshoul dbere- moved from the system because of the security threat they pos e. The strategy of accepting the risk is applied when the risk is ei- thernegligible oracceptable.Inthiscase,thebenefitstha tthesys- tembringsaregreaterthanthepotentialrisk.Transferrin gtherisk strategy consists in giving the risk management responsibi lity to a thirdparty,i.e. insurance companies. Finally, therisk m itigation strategy consists on reducing the risk as much as possible. T his can be done through different means, such as the deployment of preventivemechanisms,securityupdatesofthesystemsors tricter regulations. Interms of monetary, privacy, integrity and trust,we notet hat G1 does not represent a potential risk that needs to be manage d. However, G3 contains many threats that represent a risk that is either unacceptableorundesirable. From another angle, in terms of monetary impact, attack goal s G2, G3, G4 and G5 represent a risk in terms of economic losses. Forexample,networkhijacking, criminalsmartcontractsa ndran- somwares willexploitthevictim inexchange ofmoney. Also, sab- otage activities will induce the vendor to not get rewards fo r its service. This monetary impact may concern certain groups or or- ganizationsmorethananother.Thus,theywouldwanttomana ge the risk by implementing the appropriate security defense m ech- anisms. For example, it is essential to ensure that cryptogr aphic keys are stored or maintained properly so that the attacker a im- ingataccessingsensitive dataonthenodesofthenetworkdo not exploit improper key protection mechanisms to attain the at tack goal. Ontheotherhand,intermsofprivacyimpact,theresultsrev eal that G2 is the riskiest attack goal. For example, attacks con ducted by A1 may represent an undesirable risk that needs to be man- aged, i.e. cybercriminals that use compromised computersy stems Conference’17, July 2017,Washington, DC,USA Ranwa AlMallahandBilalFarooq Table4: Impacton thevictimsbyattackgoal-Monetary(M),P rivacy(P),Integrity(I)andTrust(T).Impactscaleranges from 1to 4, with 4being themostsevere. Attackgoals MPIT G1-Gain knowledgeaboutthedata-market 12-1 G2-Access sensitive data onthenodes of thenetwork 23-2 G3-Manipulateand modifyblockchaininformation 3244 G4-Sabotageactivities 3-23 G5-Induce participants in the blockchain network to makeerrors2-33 tocommitidentitytheft.Thecompromisecouldleadtofraud ulent transactions. Vulnerabilities should be eliminated by imp lement- ing efficient privacy preservation techniques and adopting m ore robustVPN solutions. In terms of integrity impact, particularly when it comes to t he manipulation and modificationof blockchain information, w e no- ticefromtheresultsthatthisattackgoalrepresentsamajo rriskin termsofintegrity.Also,thissameattackgoalhasacatastr ophicim- pact on the trust of the blockchain system because the nodes w ill have no belief in the reliability or truth of the transaction s in the ledger. Among other solutions, threats should bemanaged by set- tingproperidentitymanagement (MembershipServiceProvi ders). Finally,whenitcomestoinducingparticipantsintheblock chain network to make errors, we notice from the results, that this at- tack goal represents a major risk in terms of integrity and tr ust intheblockchainecosystem.Tomanagetherisk,solutionss hould beimplemented specificallyregarding unauthenticateddat afeeds producingwrongdata. 5 CONCLUSION We have proposed an actor-based risk assessment for the mult i- layered Blockchain framework for Smart Mobility Data-mark ets (BSMD), a public-permissioned blockchain. Traditionally , the aim of the risk assessment is to evaluate the risk in order to iden tify the riskiest threat. The aim of our work is more extensive in t hat we propose a risk analysis enabling the quantification of the risk associated not only to the blockchain technology, but also t o its ecosystem.Moreover,weconductedtheriskassessmentmeth odol- ogyonarealisticblockchainforsmartmobilitydata-marke tswith analysis of the attacks with regards to their impact at four s cales (economy, privacy, integrity and trust). We quantify the ri sk by presenting ordinalvalues,whichgives thedecisionmakers aclear ranking interms ofprioritization. Thisworkisthefirststepofasystematicriskassessmentfra me- work.We consider thatalthoughthereare vulnerabilities i na sys- tem, it is their probabilityof exploitation and the impact t hat this exploitation has that determines whether the vulnerabilit y repre- sents a significant risk or not. In future work, we will extend the analysis and propose a scenario-based risk assessment foll owed by a combined risk assessment. The scenario-based analysis de- termines the probability of occurrence of each threat. The c om- bined analysis aims at determining which attack outcomes ha ve thehighestriskaccordingtotheirimpactonthevictims.We hope touncover specificblockchaintechnologysecurityvulnera bilities in the transportation ecosystem by exposing new attack vect ors.The systematic risk analysis can then be used to develop poss ible countermeasuresagainstcybersecurityvulnerabilitiesi nthesmart mobilityimplementations oftheblockchaintechnology. REFERENCES [1] NicolaAtzei,MassimoBartoletti, and TizianaCimoli.2 017. A surveyof attacks on ethereum smart contracts (sok). In International conference on principles of security and trust .Springer,164–186. [2] Johannes Eckert, David López, Carlos Lima Azevedo, and B ilal Farooq. 2019. A blockchain-based user-centric emission monitoring and t rading system for multi-modal mobility.1–6. [3] GAO. 2005. Cyber Threat Source Descriptions. https://www.us-cert.gov/ics/content/cyber-threat-so urce-descriptions[Online; accessed20-March-2020]. [4] Huru Hasanova, Ui-jun Baek, Mu-gon Shin, Kyunghee Cho, a nd Myung-Sup Kim. 2019. A survey on blockchain cybersecurity vulnerabil ities and possible countermeasures. International Journal of Network Management 29, 2 (2019), e2060. [5] IvanHomoliak,SaradVenugopalan,QingzeHum,andPawel Szalachowski.2019. Asecurityreferencearchitectureforblockchains.In 2019IEEEInternationalCon- ference on Blockchain (Blockchain) . IEEE, 390–397. [6] GhassanOKarame,ElliAndroulaki,andSrdjanCapkun.20 12. Double-spending fastpaymentsinbitcoin.In Proceedingsofthe2012ACMconferenceonComputer and communicationssecurity . 906–917. [7] Xiaoqi Li, Peng Jiang, Ting Chen, Xiapu Luo, and Qiaoyan W en. 2017. A sur- veyonthesecurityofblockchainsystems. FutureGenerationComputerSystems (2017). [8] DavidLopez andBilal Farooq. 2020. A multi-layeredbloc kchainframeworkfor smartmobilitydata-markets. TransportationResearchPartC:EmergingTechnolo- gies111(2020), 588–615. [9] D.LópezandB.Farooq.2019. Privacy-AwareDistributed MobilityChoiceMod- elling overBlockchain.In 2019IEEEInternationalSmartCitiesConference(ISC2) . 187–192. [10] D. López, A. Yazdizadeh, B. Farooq, and Z. Patterson. 20 19. Mode Choice In- ference using Federated Learning overBlockchain. In 2019International Choice Modelling Symposium (ICMC) .1–13. [11] Muhammad Izhar Mehar,Charles Louis Shier, Alana Giamb attista,Elgar Gong, Gabrielle Fletcher, Ryan Sanayhie, Henry M Kim, and Marek La skowski. 2019. Understanding arevolutionaryand flawedgrandexperimenti nblockchain:the DAO attack. Journal of Caseson InformationTechnology (JCIT) 21, 1(2019), 19– 32. [12] Ryan Nakashima. 2018. AP Exclusive: Google tracks your move- ments, like it or not. AP News (August 13), https://www. apnews. com/828aefab64d4411bac257a07c1af0ecb (2018). [13] KRector.2018. MTAreal-timebusdata’hacked,’offered onprivatemobileappli- cation. [14] JackStewart.2016. SF’STRANSITHACKCOULD’VEBEENWAY WORSE-AND CITIES MUST PREPARE. Wired, Nov (2016). [15] JuliaCarrieWong.2017. Uberconcealedmassivehackth atexposeddataof57m usersand drivers. TheGuardian 22 (2017).
{ "id": "2007.09098" }
2209.13431
MTTBA- A Key Contributor for Sustainable Energy Consumption Time and Space Utility for Highly Secured Crypto Transactions in Blockchain Technology
A Merkle tree is an information construction that is used in Blockchain to verify data or transactions in a large content pool in a safe manner. The role of the Merkle tree is crucial in Bitcoin and other cryptocurrencies in a Blockchain network. In this paper, we propose a bright and enhanced verification method, Merkle Trim Tree-based Blockchain Authentication (MTTBA) for the hash node traversal to reach the Merkle Root in a minimum time. MTTBA is a unique mechanism for verifying the Merkle Tree's accumulated transactions specifically for an odd number of transactions. The future impact of cryptocurrency is going to be massive and MTTBA proves its efficacy in transaction speed and eliminating node duplication. Our method enables any block to validate transactions' full availability without duplicating hash nodes. Performance has been evaluated in different parameters and the results show marked improvement in throughput(1680ms), processing time(29700kbps), memory usage(140MB), and security(99.30%). The energy consumption factor is crucial in the scenario, and MTTBA has achieved the lowest of 240 joules.
http://arxiv.org/pdf/2209.13431v1
M. Gracy, B. Rebecca Jeyavadhanam
cs.CR
cs.CR
MTTBA - A Key Contributor for Sustainable Energy Consumption Time and Space Utility for Highly Secured Crypto Transactions in Blockchain Technology M. Gracy1, B. Rebecca Jeyavadhanam2 * 1 SRM Institute of Science and Technology , Kattankulathur , India 2 SRM Institute of Science and Technology , Kattankulathur , India *corresponding author. Email address : rebec caram2022@gmail.com ABSTRACT A Merkle tree is an information construction that is used in Blockchain to verify data or transactions in a large content pool in a safe manner. The role of the Merkle tree is crucial in Bitcoin and other cryptocurrencies in a Blockchain network. In this p aper, we propose a bright and enhanced verification method, Merkle Trim Tree -based Blockchain Authentication (MTTBA) for the hash node traversal to reach the Merkle Root in a minimum time. MTTBA is a unique mechanism for verifying the Merkle Tree's accumul ated transactions specifically for an odd number of transactions. The future impact of cryptocurrency is going to be massive and MTTBA proves its efficacy in transaction speed and eliminating node duplication. Our method enables any block to validate trans actions' full availability without duplicating hash nodes. Performance has been evaluated in different parameters and the results show marked improvement in throughput(1680ms), processing time(29700kbps), memory usage(140MB), and security(99.30%). The ener gy consumption factor is crucial in the scenario, and MTTBA has achieved the lowest of 240 joules. Keywords : Blockchain, Bitcoin, Merkle Tree, MTTBA , and Hashing. 1 Introduction The internet has become an integral aspect of data transmission in our daily lives as a result of the improved de velopment of Information Technologies . Blockchain Technology was first presented as a public, decentralized, and trust -less digital currency ledger [1] and it has gained prevalent acceptance in many fields . Blockchain [2] (e.g., Bitcoin and Ethereum) chron ologically keep track of transactions , grouped into a chain of blocks. Network nodes add to the ledger by creating and adding new blocks, starting with the genesis block. Full nodes that download the whole block tree validate the transactions in the receiv ed blocks. However, a blockchain must include light nodes [3], which may just be interested in confirming a few specific transactions, for better scalability. In the original Bitcoin protocol [4], which is a public database of financial transactions , the b lockchain is used to keep track of coins [5]. The ledger network is also known as a decentralized peer -to-peer network [2]. The characteristics of bilinear mapping can be used to achieve data integrity in the form of blockchain transactions [6]. In this paper, we proposed a new optimized Merkle tree structure called MTTBA , to do the verification process faster and easier with no duplication of nodes. This idea makes transaction verification easier especially when the block consists of an odd number of tra nsactions. To solve the space occupied by the duplicate nodes in the traditional Merkle tree method, the proposed technique, MTTBA handles the problem in a novel way and helps in finding the tampered node with a quick traversal of nodes. The traditional Me rkle tree uses node duplication when the block is accumulated with an odd number of transactions . It needs extra memory space to accommodate the duplicate nodes. Usharani et al suggested an idea [7], the Modi fied Merkle Tree data structure, which is used t o design a system that handles data authentication, consistency verific ation, and data synchroni zation. According to our design, the number of hash nodes appending to reach the root is reduced and storage space is considerably reduced. The proposed MTTBA h as high throughput with low energy consumption and has no compromise in terms of energy consumption, processing time utilization , and security. The authentication process is inevitably fast [8]. The results and analysis section will deliberately prove that this MTTBA variant is superior in all parameters. Further sections can be divided as follows: S ection 2 gives the background of the Blockchain, Merkle tree and Hashing. Related work presented in Section 3 , while Section 4 explains about the proposed method. Imple mentation of the proposed work is presented in S ection 5 . Finally, the Conclusion and Future directions are in Section 6. 2 Background 2.1 Blockchain Cryptography, Mathematics, Consensus Algorithms, and Economic Models are among the technologies that make up Blockchain Technology [9]. It is a safe distributed ledger (dataset) that records all transactions as blocks. The blockchain uses peer -to-peer networks and consensus procedures to solve the problem of distributed data synchronisation, eliminating the need for a trusted centralized authority. A SHA256 cryptographic hash algorithm on the block header can be used to identify each block [10]. Bitcoin is one of the most well -known blockchain -based applications. Each transaction includes information on the sender and receiver and the numb er of coins to be exchanged. Once confirmed by peers, a group of such transactions forms a new block [11]. Fuad Shamieh et al. [12] envisioned a heuristic for selecting transactions from miners' transaction pools to form blocks with a desired operational value to achieve predefined production outputs over blockchain -based networks. The primary data is a list of transactions [ 13], whereas the header is a hash of the previous and current blocks, Me rkle root, timestamp, nonce, and other information. Blockchains are used in many scenarios like healthcare, IoT [14], and many more. Figure 1 gives the structure of the Block . The basic features of Blockchain [15] [16]are transparency , decentralization and immutability . Figure 1. Blockchain S tructure 2.2 The Merkle Tree The Merkle trees are information constructions that are used to verify data in a big content pool in a secure manner. It is an awesome concept and acclaim for coming up with a nice idea goes to Ralph Merkle [4]. Merkle roots [ 17] are vital in the computation required to keep cryptocurrencies such as bitcoin and ether operational . In their paper, Haojun Liu et al. [ 18] explain systematical insights into Merkle trees in terms of their concepts, attributes, bene fits, and applications. . Merkle trees also provide a way to authenticate [19][20]. The traditional Merkle tree construction is shown in Figure 2. Figure 2. Traditional Merkle tree structure All blocks are hashed using cryptographic string hash methods, such as SHA256 [21]. The data is stored at the leaf nodes of a Merkle Tree, which is a binary tree [22][23]. The Merkle hash tree technique can be used in securing smart g rid communication with smart meters having computation -constrained resources [24] and enha ncing security with timestamps [25]. Figure 3 shows the clear architecture of the Merkle root, which forms from the group of transactions in Block 3. Figure 3. Merkle root architecture Figure 4 shows five transactions and the Me rkle root is formed from the five transactions. Green - colored hash nodes represent the verification of the transaction T3, which is in orange color . The hash nodes involved in verifying T3 = H4, H7, H12 Figure 4. Transaction verification in Merkl e tree 2.3 Hashing The hashing process is critical to the data integrity of blockchain. Hashing is a one -way fixed -size visualisation that transforms any size of the file into a distinc tive, collision -restricted code . Ashok Kumar Yadav [26] uses random pr ivate keys to implement ECC and RSA public generat ion, encryption, and decryption. Yoon -Su Jeong[ 27] demonstrated an optimised hash computation method that enables for stratified multiple processors on an n -bit blockchain. Monika et al . [28] propose that hash functions be studied and that different cryptography algorithms be compared utilizing blockchain technology . 3 Related Work In this section, we present a detailed survey on related papers with the Merkle Tree and transactions in the blockchain. Dong e t al found a new way in the form of Merkle tree-based operational online authentication [29]which tells a simple modification that involves the addition of random inputs with two tangibly separate d entities, prover and approver . Merkle Quad -Tree technique [ 30] is a method that displays steady advantages with various levels of modifications and consumes about 1% of the time of the traditional Merkle Tree method. Similar to Lamports' authentication approach, Yuji et al proposed a method [31] in which the authe ntication act is carried out by releasing the digest values associated with nodes that are higher in the hash chain than the digests of the leaf node. Lum Ramabaja et al. [32] proposed a standard sparse Merkle multi -proof that involves storing an index for every non - leaf hash in the multi -proof. To replace the Merkle tree, which has network delay, Patgir i et al . developed an alternative model called H ex-Bloom [33]. Jia Kan et al [34] present MTFS, a blockchain -based solution for private file storage. Marku s et al [35] propose an efficient algorithm for traversing Merkle trees, as well as a technique for producing a classification of leaves and their associated authentication paths. Using Merkle tree authentication, author Dong et al . [36] presented a novel technique to safeguard outsourcing data. Wang et al. [ 37] propose a revised Merkle tree structure for efficacious payment transactions i n blockchain -based IIoT systems . Ceaser Castellon et al.[38] proposed an idea that employs an energy -saving algorithmic engineering technique for Merkle Tree root calculations, a key component of blockchain simulations, to maintain the predicted protection while sacrificing less system availability. Rasmus et al. proposed a sparse Merkle tree definition that allows efficien t space -time exchange for different caching strategies when using SHA -512/256. For to reduce the bandwidth required for Merkle Trees, John Kuszmaul [39] proposed a new data structure called Verkle Trees, but this comes at the cost of increasing the computa tional power. Bruschi et al.[40] proposed a system based on a Merkle tree representation to yield compact justification of the content of web documents. Bayardo et al. [ 41] proposed using Merkle trees to support 200 and 404 response authentication while re quiring only a single cryptographic hash of trusted data per storage system. Table 1 details the investigated five existing methods , including their methodology, benefits, and drawbacks. Section 5 contains the detailed experimental results of the same. S.No Author Title Methodology Benefits Drawbacks 1. Dongyoung Koo et al. 2018 MTDALR [29] Insert ing ancillary random sources into the integrity verification proof on the prover side. Maintains steady reliability without being harmed by continual data leaka ge caused by authentication process repetitions. More energy consumption and more memory space are needed. 2. Pavol Zajac 2021 EKAMT [42] A server -authenticated key that is appropriate for TLS - like handshake protocols . Provides efficient protocols suitabl e for Internet of Things application Use in constrained devices limited due to the operating time and memory requirements. 3. Yi-Cheng Chen et al. 2019 IASMTM[ 43] Tampered region detection on the tampered image using peak signal -to-noise ratio value Subst antiates the reliability of the image and repairs the damaged area in the image. Takes more time for authentication, Less Throughput time , and more end -to-end delay. 4. Teasung Kim et al. 2020 SELCOM [44] SELCOM is used to solve the storage problem for blockchain nodes with limited resources. It allows each node to choose to maintain blocks through the proposed checkpoint chain . Security is a concern and processing time is not high nor low. 5. Mingchao Yu et al. 2019 CMT[ 45] Using a peeling -decoding techni que, a succinct proof for data availability attack on any layer is possible. Any node can validate the entire availability of every data block generated by the system. It has an average throughput time and need s more memory space Table 1. Existing papers methodology and its advantages and limitations for Experimental Analysis 4 Proposed Method 4.1 Preliminaries We denote t n as the total number of nodes for the scheme . Let n= {1,2,3,..} be the number of nodes. For any n≥1ϵ N, [N] denotes a set of even nu mber of transactions. N= {21,22,23,24,..2n}. for any n≥1ϵ N-1, [N -1] denotes a set of the odd number of transactions. N=2n and N -1transactions are said to be the odd number of transactions . 4.2 Construction of the Proposed Scheme Traditional Merkle trees are time -consuming data structures that waste a significant amount of computational resources. Figure 5 depi cts the MTTBA construction, where node duplication is commletely removed . After successfully downloading a data block using Merkle root, it permits verification of the data block's validity and integrity and takes a few hash values and does not impose the Merkle tree on its whole . A block can accommodate 1MB of transactions, if the number of transactions is even in number, the construction of the Merkle tree is done traditionall y. If the block holds an odd number of transactions, then our proposed scheme MTTBA will be a handy one. As the Blockchain has a high level of data integrity, transactions accommodat ed in a block cannot be manipulated by any th ird person. The construction steps of the MTTBA for the block are as follows: 1) Set index (1) for the first node n1 with hash 1 in the Merkle Trim Tree for a block. 2) Append left and right nodes consecutively leaving the first block , index (1) all alone for an y t n transactions, for example, if the block has 2810 transactions, the hash nodes will keep on appending in pairs until it reaches 2810 leaving the first hash node aside. 3) From 1 to tn, apply the hash function to each of the divided nodes. 4) After that , build the top level of the Merkle Tree until the Merkle Root is reached. Figure 5. Construction of Merkle Trim Tree -Based Blockchain Authentication Verification Method Furthermore, the traditional Merkle tree has significant time complexit y and the Merkle tree server takes a large amount of memory to keep all of the hash values; nevertheless, a user does not need to save the complete Merkle tree. In contrast to traditional Merkle Tree construction and various proposed ideas for verificatio n and validation of transactions, we proposed a method called Merkle Trim Tree -based blockchain authentication , which is constructed using a combination of the Merkle Tree's fundamental principle and the Merkle Trim Tree partition methods. Figur e 6a. The comparison of transactions in the traditional Merkle tree (TMT) and Merkle Trim tree (MTT) to form the root for three transactions. The comparison of transactions in the traditional Merkle tree (TMT) and Merkle Trim tree (MTT) to form the roo t is shown in Figures 6a and 6 b for three and five transactions respectively. The difference in the nodes has been shown clearly in ‘n’. Figure 6 b. The comparison of transactions in the traditional Merkle tree (TMT) and Merkle Trim tree (MTT) to form the root for five transactions. Merkle Trim Tree (MTT) stands tall as it can eliminate duplication as well as the number of nodes it creates for forming the tree transactions. When the Merkle Trim Tree is compared with Traditional Merkle Tree, the duplication of nodes is eliminated and the number of nodes has been reduced. The number of nodes reduced can be shown in an equation Number of nodes tn=n+(n -1) tn=2n-1 Our proposed method of MTTBA helps in transaction verification and its Authentication. The primary contribution is in eliminating node duplication . The objective of the Merkle Trim Tree is to take out the duplication nodes when a block accommodates an odd number of transactions. When the nodes are fewer, traversal becomes fast. The node dup lication happens when the block has an odd number of transactions. MTTBA has incredible security when nodes are verified. The Merkle Trim Tree is structured as, leaving the first node and pairing starts from the second node onwards. If the final node in th e particular block is left with none to pair, the first node will pair with the left -out node. This scenario happens when the transactions accumulated in the block were odd in number. The Merkle Trim Tree -based blockchain authentication is an efficient dat a structure for the verification of nodes and checking the integrity of data when transactions are odd in number. Our implementation results show security is high and the packet delivery rate is glaringly good with very less collisions . The overview of the proposed system with the neat setup and the different cases we are going to consider the deal with the methodology. Figure 7. Overview of the proposed scheme Setup : Blockchain consists of a series of blocks in chronological order. Every block will have components like block header, nonce, timestamp, hash, previous hash , and transactions. Consensus mechanism s are used to validate a blockchain and add new blocks. Transactions will be selected to join the block from the pool of transactions. This has been shown in Figure 7 . A block can hold 1MB of transactions and after that new block will be appended and transactions continue to fill. The accommodated transactions will be accessed with a single hash called Merkle root. The transactions can be odd or even i n number. Our proposed work gives the methodology for verification of the odd number of transactions. The verification of even the number of the transaction remains the same as the traditional one. Case 1 : Even the number of transactions for N=2n transacti ons, will be an even number of transactions , and no duplication is needed till reaches the root. n=1, 2, 3… nodes N = 21, 22,23,…2n . [ 2,4,8,16,32,64,128,…] these number of transactions no need duplication. Case 2 : Odd number of transactions. Needs du plication in the first level for appending. N=2n and N -1 transactions are an odd number of transactions. if n=4, then 24 = 16 transactions and in case 2, it is N -1 and here 15 transactions. [1,3,5,7,9,11,…] these number of transactions need duplication in the first level itself to find the pair to concatenate. 4.4.1 Algorithm Set up the scenario for transaction verification. N = set of even numbers, N-1 = set of odd numbers tn is the total number of transactions, H is the hash of the node . If t n =N, then the block contains an even number of transactions For any n≥1 and 1 ϵ N, n++ Append t1(H1) and t 2(H2) to form H 5. H 5 = hash of n1 and hash of n 2 (H1+H 2) Append t 3(H3) and t 4(H4) to form H 6. H 6 = hash of n3 and hash of n 4 (H3+H 4) H7 = H 5+H 6, H 7 is the root node or H n is the Merkle root The n umber of nodes for the set of even numbers is tn=2n-1 If t n =N-1, then the block contains an odd number of transactions t1(H1) is left idle for initial appending For any n≥1 and 1 ϵ N -1, n++ Append t 2(H2) and t 3(H3) to form H 6. H 6 = hash of n2 and hash of n 3 (H2+H 3) Append t 4(H4) and t 5(H5) to form H 7. H 7 = hash of n4 and hash of n 5 (H4+H 5) H8 = H 1+H 7, H 8 is the root node or H n is the Merkle root The n umber of nodes for the set of odd numbers is tn=2n-1 5. Implementation of MTTBA All experiments were run on a single machine running Windows 10 with a 2.6 GHz CPU (Intel i5 - 3320M) and 16.0GB RAM (2601MHz 2x8 GB). Using the Hyper Caliper , a crypt analytic tool, each algorithm was built as a Visual Studio 16.0 program. In addition, when the Merkle Trim tree was bu ilt, the data was separated into 256 -byte blocks to allow for consistent comparison. Each parameter was repeated numerous times in the same environment to produce the optimi zed report comparing the proposed approach with the existing method, and then the p arameters were calculated and reported. The computation time for each experiment was measured based on CPU time. The performance of each algorithm for varying data sizes is analy zed and compared with various parameters like throughput, end-to-end delay, av erage processing time, average authentication time, average energy, packet delivery ratio, security, and memory utilization. 5.2.1 Throughput MTTBA's throughput time has proven to be consistent, thus it was included in the experiment as a baseline metric of efficiency . Figure 8 shows the graph ical representations to prove the proposed MTTBA outperforms in throughput when compar ed with other existing methods. Figure 8 . Throughput time 5.2.2 Average Processing Time Processing time for a job is very important and this will de fine a genuine work methodology. In 1750 milliseconds, MTTBA performs the given task. This can be verified in various timestamps. Figure 9 gives a detailed representation of the graph . Figure 9 . Average Processin g Time 5.2.3 Average Energy In Blockchain, energy consumption [46] [47] is an important factor to be considered and different methods consume different joules of energy when the process runs in different timeframe s. Figure 10 shows clear evidence of low e nergy consumption by MTTBA with the lowest of 240 joules . Figure 10. Average Energy C onsumption 5.2.4 Average Authentication Time The average authentication time of the proposed MTTBA is less than 100 milliseconds when compar ed with IASMTM hav ing maximum authentication time and MTDALR having medium authentication time. The comparisons have been shown in Figure 11 . Figure 11. Average Authentication T ime 5.2.5 Security Security plays a pivotal role in any application or tool, specifica lly in the decentrali zed form of systems. Blockchain is a decentrali zed application and the security of data plays a major role . Figure 12 shows the ability of MTTBA, which stands tall in security. MTTBA never compensates for security with any metrics. Figure 12 . Security 5.2.6 Memory Memory is the talk of argument whenever a new application or tool or method is developed. Blockchain technology never hesitates this parameter. Blockchain’s main issue is its scalability since every data inside the block will have a hash value and this will be duplicated as a ledger. Chances are there for more memory consumption and relevant experiment in Figure 13 , where our proposed MTTBA consumes less memory when compar ed with our existing methods. This can be easily achieved by MTTBA as it completely obliterates the duplication nodes in the traditional Merkle Tree. Figure 13 . Memory Consumption The convenient way of sending data in the network is via packets, but the primary problem that arises during packet delivery is data collision. If 100 or more packets are sent at a time, then there is a chance of collision. Our proposed MTTBA variant’s Packet delivery ratio is very high. If the packet delivery ratio is high, then the latency is obliviou sly low. Because throughput in KBPS is directly proportional to the packet delivery ratio. 6 Conclusion a nd Future Work The results of the studies show that hash duplication has been taken out with the help of the Merkle Trim Tree construction. The Merkl e Trim Tree structure, especially when an odd number of transactions is present in a block, helps to reduce duplication by appending with the initial transaction. Energy consumption is always in check and MTTBA with its unique style can able to achieve its goal of transaction verification more competitivel y. The data appending method proposed in MTTBA results in limited and constant size and appears to be the source of the significant improvement . Memory usage and Security help MTTBA to dominate the entire experimentation process. The Merkle Trim Tree aiding approach, on the other hand, is identical to the different degrees of alterations and takes around 1% of the time of the old way. In future work, we will merge Merkle Trim Tree with the Bloom -filter alg orithm to create an advanced Merkle Trim Tree that can arrive with a high level of data integrity as its main focus. Author Contributions : Project administration, R.J.; Supervision, M.G.; Writing -original draft, M.G.; Writing -review and editing, M.G. and R.J. All authors have read and agreed to the published version of the manuscript. Funding : This research received no external funding. Institutional Review Board Statement : Not applicable. Informed Consent Statement : Not applicable. Data Availability S tatement : Not applicable. Conflicts of Interest : The authors declare no conflict of interest References 1. Saurabh Dhumwad, Mandar Sukhadeve, Chetan Naik, Manjunath KN, Srikanth Prabhu, “A Peer To Peer Money Transfer using SHA256 and Merkle Tree”, 2018 IEEE DOI 10.1109/ADCOM.2017.00013, 23rd Annual Conference on Advan ced Computing and Communications 2. S. Nakamoto, “Bitcoin: A Peer -to-Peer Electronic Cash System”. Technical report (2008). https://bitcoin.org/bitcoin.pdf . 3. Ryunosuke Nagayama, Ryohei Banno, Kazuyuki Shudo, “T rail: A Blockchain Architecture for Light Nodes”, 2020 IEEE Symposium on Computers and Communications (ISCC) DOI: 10.1109/ISCC50000.2020.9219673 4. Ralph C. Merkle, “A Digital Signature Based on a Conventional Encryption Function”, Advances in Cryptology - CRYPTO '87, A Conference on the Theory and Applications of Cryptographic Techniques, 1987, Springer. 5. Peter D. DeVries, “An Analysis of Cryptocurrency, Bitcoin, and the Future”, International Journal of Business Management and Commerce Vol. 1 No. 2; September 2016 6. HAIYAN WANG AND JIAWEI ZHANG, “ Blockchain Based Data Integrity Verification for Large -Scale IoT Data”, IEEE Access ,SPECIAL SECTION ON DATA MINING FOR INTERNET OF THINGS , November 22, 2019. Digital Object Identifier 10.1109/ACCESS.2019.2952635 7. Usha rani Chelladurai , Seethalakshmi Pandian, “HARE: A new Hash based Authenticated Reliable and Efficient Modified Merkle Tree Data Structure to Ensure Integrity of Data in the Healthcare Systems” Springer Nature 2021, Journal of Ambient Intelligence and Huma nized Computing https://doi.org/10.1007/s12652 -021-03085 -0 8. Engin Arslan, Ahmed Alhussen, “ Fast Integrity Verification for high -speed file transfers”, Nov 2018, IEEE Access 9. Yassine Maleh, Mohammad Shojafar, Mamoun Alazab and Imed Romdhani, “Blockchain for Cybersecurity and Privacy Architectures, Challenges, and Applications”, First edition published 2020 by CRC Press, Taylor and Francis group,6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487 -2742 10. Lukman Adewale Ajao, James Agajo , Emmanuel Adewa le Adedokun and Loveth Karngong, “ Crypto Hash Algorithm -Based Blockchain Technology for Managing Decentralized Ledger Database in Oil and Gas Industry” , MDPI, 8 August 2019, https://doi.org/10.3390/j2030021 11. M. Gracy and B. Rebecca Jeyavadhanam, "A Syste matic Review of Blockchain -Based System: Transaction Throughput Latency and Challenges," 2021 International Conference on Computational Intelligence and Computing Applications (ICCICA), 2021, pp. 1 -6, doi:10.1109/ICCICA52458.2021.9697142. 12. Fuad Shamieh;Xian bin Wang;Ahmed Refaey Hussein “Transaction Throughput Provisioning Technique for Blockchain -Based Industrial IoT Networks”, IEEE Transactions on Network Science and Engineering, Year: 2020 | Volume: 7, Issue: 4 13. Avi Mizrahi, Noam Koren, Ori Rottenstreich, “ Optimizing Merkle Proof Size for Blockchain Transactions”, 2021 International Conference on COMmunication Systems & NETworkS (COMSNETS) | 978 -1-7281 -9127 - 0/20/$31.00 ©2021 IEEE | DOI: 10.1109/COMSNETS51098.2021.9352820 14. P. Ray, N. Kumar and D. Dash, “BLWN: Blockchain -based lightweight simplified payment verification in IoT - assisted e -healthcare,” IEEE Systems Journal, vol. 15, no. 1, pp. 134 -145, 2020 15. B.Rebecca Jeyavadhanam, M. Gracy, V. V. Ramalingam, Christopher Xavier, “Fundamental Concepts and Applicatio ns of Blockchain Technology”, Big Data Analysis for Green Computing, Taylor & Francis Group,1st Edition, 2021 16. Paul J. Taylor , Tooska Dargahi , Ali Dehghantanha , Reza M. Parizi ,Kim -Kwang Raymond Choo, “ A systematic literature review of blockchain cyber security”, Digital Communications and Networks, https://doi.org/10.1016/j.dcan.2019.01.005 17. Tries Haitz Sáez de Ocáriz Borde, “An Overview of Trees in Blockchain Technology: Merkle Trees and Merkle Patricia”, February 2022, https://www.researchgate.net/publ ication/358740207 18. Haojun Liu, Xinbo Luo, Hongrui Liu, Xubo Xia, “Merkle Tree: A Fundamental Component of Blockcha ins”, EIECS | 978 -1-6654 -1674 -0/21/$31.00 ©2021 IEEE | DOI: 10.1109/EIECS53707.2021.9588047 19. Xinming Yin, Junhui He , Yi Guo , Dezhi Han, Kuan -Ching Li and Arcangelo Castiglione, “An Efficient Two - Factor Authentication Scheme Based on the Merkle Tree”, Sensors, MDPI, 2020, 20, 5735; doi:10.3390/s20205735 20. D. Berbecaru and L. Albertalli, "On the Performance and Use of a Space Efficient Merkle Tree T raversal Algorithm in Real -Time Applications for Wireless and Sensor N etworks," IEEE International Conference on Wireless and Mobile Computing, Networking and Communications, Avignon, France, 2008, pp. 234 -240. 21. Andrew W. Appel, “Verification of a Cryptogr aphic Primitive: SHA -256”, ACM Transactions on Programming Languages and Systems, 2015 22. Henri Gi lbert, Helena Handschuh, “Security Analysis of SHA -256 and Sisters ”, SAC 2003. Lecture Notes in Computer Science, vol 3006. Springer, Berlin, Heidelberg. https: //doi.org/10.1007/978 -3-540-24654 -1_13 23. Ying -Quing Fang, Tian bin Liao , Lian you Lai, “Verifiable secret sharing scheme using Merkle tree” 2020 International Symposium on Computer Engineering and Intelligent Communications (ISCEIC) | 978 -1-7281 -8171 - 4/20/$3 1.00 ©2020 IEEE | DOI: 10.1109/ISCEIC51027.2020.00008, IEEE, 2020 24. Hongwei Li, Rongxing Lu, Member, Liang Zhou, Bo Yang, and Xuemin Shen , “ An Efficient Merkle -Tree-Based Authen tication Scheme for Smart Grid ” IEEE SYSTEMS JOURNAL,2013 . 25. Katyayani Sharma, Dr . Vairamuthu S, “ Enhancing the security through the usage of Merkle tree and timestamp in peer to peer messaging”, International Journal of Pure and Applied Mathematics, Volume 119 URL : http://www.ijpam.eu 26. Ashok Kumar Yadav, “Significance of Elliptic Curv e Cryptography in Blockchain IoT with Comparative Analysis of RSA Algorit hm”, ICCCIS , ©2021 IEEE , DOI: 10.1109/ICCCIS51004.2021.9397166 27. Yoon -Su Jeong, “Blockchain Processing Technique Based on Multiple Hash Chains for Minimizing Integrity Errors of IoT Da ta in Cloud Environments” SEN SORS, MDPI, 2021, https://doi.org/10.3390/s21144679 . 28. Monika Parmar, Harsimran Jit Kaur , “Comparative Analysis of Secured Hash Algorithms for Blockchain Technology and Internet o f Things”,IJACSA, Vol. 12, No. 3, 2021 . 29. Dong Young Koo , Young joo Shin , Joobeom Yun, and Junbeom Hur, “Improving Security and Reliability in Merkle Tree -Based Online Data Authentication with Leakage Resilience”, MDPI, Appl. Sci. 2018, 8, 2532; doi:10.3390/app8122532 . 30. WeixinZhai, Kun Qi , Jiexiong Duan, Chengqi Cheng, “Merkle Quad -Tree Based Remote Sensing Image Analysis”, IGARSS 2017, IEEE. 31. Yuji Suga, “Formulation of Information Hiding Model for One -Time Authentication Methods Using the Merkle Tree”, EIDWT 2019: Advances in Internet, Dat a and Web Technologies pp 363 -373. 32. Lum Ramabaja , Arber Avdullahu, “ Compact Merkle Multiproofs” arXiv:2002.07648v2 [cs.CR] 24 Feb 2020 . 33. Patgiri, and Malaya Dutta Borah, “HEX -BLOOM: An Efficient Method for Authenticity and Integrity Verification in Privacy -preserving Computing”, Ripon CRYPTOLOGY EPRINT ARCHIVE, MONTH 20YY 34. Jia Kan, Kyeong Soo Kim, “MTFS: Merkle -Tree-Based File System”, IEEE Conference Publication, 2019 . 35. Markus Jakobsson, Tom Leighton, Silvio Micali, and Michael Szydlo, “Fractal Merkle Tree Representation and Traversal”, Lecture Notes in Computer Science · April 2003 DOI: 10.1007/3 -540-36563 -X_21 . 36. Dong -young Koo, Youngjoo Shin, Joobeom Yun, JunbeomHur, “An Online Data -Oriented Authentication based on Merkle Tree with Improved Reliability”, IEEE, 24th International Conference on Web Services,2017. 37. Jin Wang, Boyang Wei, Jingyu Zhang, Xiaofeng Yu, Pradip Kumar Sharma, “An optimized transaction verification method for trustworthy blockchain -enabled IIoT”, Ad Hoc networks, Volume119,7 May 2021 . 38. Cesar Castellon, Swapnoneel Roy, Patrick Kreidl, Ayan D utta, Ladislau Bol oni, “ Energy Efficient Merkle Trees for Blockchains” IEEE 20th International Conference on Trust, Security and Privacy in Computi ng and Communications 978-1-6654-1658 -0/21/ DOI: 10.1 109/TRUSTCOM53373.2021.00149 . 39. John Kuszmaul, “Verkle Trees” PRIMES Conference - 5/19/2019 40. Francesco Bruschi, Vincenzo Rana, Alesscio Pagani, Donatella Sciuto, “Tunneling trust into the Blockchain : A Merkle tree based Proof System for Structured Documents” , IEEE Access, 2021 . 41. Roberto J. Bayardo, Jeffrey Sorensen, “Merkle tree authentication of HTTP responses” 14th internatio nal conference on WWW,May 2005, https://doi.org/10.1145/1062745.1062929, ACM Digital library . 42. Zajac.P. “Ephemeral Keys Authenticated wi th Merkle Trees and Their Use in IoT Applications”, Sensors 2021, 21, 2036. https://doi.org/ 10.3390/s21062036 . 43. Yi-Cheng Chen, Yueh -Peng Chou and Yung -Chen Chou, “An Image Authentication Scheme Using Merkle Tree Mechanisms”, Future Int ernet 2019, 11, 149; doi:10.3390/fi11070149, MDPI . 44. Teasung Kim, Sejong Lee, Yongseok K won, Jaewon Noh , Soohyeong Kim , and Sunghyun Cho, “SELCOM: Selective Compression Scheme for Lightweight Nodes in Blockchain System”, Special Section on Blockchain Techno logy: Principles and Application, IEEE Access, 2020. 45. Mingchao Yu, Saeid Sahraei, Songze Li, Salman Avestimehr, Sreeram Kannan, and Pramod Viswanath, “Coded Merkle Tree: Solving Data Availability Attacks in Blockchains”, Cryptography and Security, arXiv:191 0.01247 [cs.CR] https://doi.org/10.48550/arXiv.1910.01247 . 46. Johannes Sedlmeir, Hans Ulrich Buhl , Gilbert Fridgen, Robert Keller, "The Energy Consumption of Blockchain Technology: Beyond Myth", Bus Inf Syst Eng 62(6):599 –608 (2020), Springer Nature . 47. Jon Tru by, “Decarbonizing Bitcoin: Law and policy choices for reducing the energy consumption of Blockchain technologies and digital currencies”, Energy Research & Social Science, Elsevier, Volume 44, October 2018, Pages 399 -410 https://doi.org/10.1016/j.erss.20 18.06.009 .
{ "id": "2209.13431" }
1805.12097
Social Signals in the Ethereum Trading Network
Blockchain technology, which has been known by mostly small technological circles up until recently, is bursting throughout the globe, with a potential economic and social impact that could fundamentally alter traditional financial and social structures. Issuing cryptocurrencies on top of the Blockchain system by startups and private sector companies is becoming a ubiquitous phenomenon, inducing the trading of these crypto-coins among their holders using dedicated exchanges. Apart from being a trading ledger for tokens, Blockchain can also be observed as a social network. Analyzing and modeling the dynamics of the "social signals" of this network can contribute to our understanding of this ecosystem and the forces acting within in. This work is the first analysis of the network properties of the ERC20 protocol compliant crypto-coins' trading data. Considering all trading wallets as a network's nodes, and constructing its edges using buy--sell trades, we can analyze the network properties of the ERC20 network. Examining several periods of time, and several data aggregation variants, we demonstrate that the network displays strong power-law properties. These results coincide with current network theory expectations, however nonetheless, are the first scientific validation of it, for the ERC20 trading data. The data we examined is composed of over 30 million ERC20 tokens trades, performed by over 6.8 million unique wallets, lapsing over a two years period between February 2016 and February 2018.
http://arxiv.org/pdf/1805.12097v1
Shahar Somin, Goren Gordon, Yaniv Altshuler
cs.SI, cs.CR
cs.SI
Social Signals in the Ethereum Trading Network Shahar Somin1,3, Goren Gordon2,3, and Yaniv Altshuler1,3 1MIT Media Lab, MA, USA {shaharso ,yanival }@media.mit.edu 2Curiosity Lab, Industrial Engineering Department, Tel Aviv University, Israel goren@gorengordon.com 3Endor Ltd. Abstract. Blockchain technology, which has been known by mostly small technological circles up until recently, is bursting throughout the globe, with a potential economic and social impact that could fundamen- tally alter traditional financial and social structures. Issuing cryptocur- rencies on top of the Blockchain system by startups and private sector companies is becoming a ubiquitous phenomenon, inducing the trading of these crypto-coins among their holders using dedicated exchanges. Apart from being a trading ledger for tokens, Blockchain can also be observed as a social network. Analyzing and modeling the dynamics of the ”social signals” of this network can contribute to our understanding of this ecosystem and the forces acting within in. This work is the first analysis of the network properties of the ERC20 protocol compliant crypto-coins’ trading data. Considering all trading wallets as a network’s nodes, and constructing its edges using buy–sell trades, we can analyze the network properties of the ERC20 network. Examining several periods of time, and several data aggregation variants, we demonstrate that the network displays strong power-law properties. These results coincide with current network theory expectations, however nonetheless, are the first scientific validation of it, for the ERC20 trading data. The data we examined is composed of over 30 million ERC20 tokens trades, performed by over 6 .8 million unique wallets, lapsing over a two years period between February 2016 and February 2018. Keywords: Complex Systems, Social Physics, Network Analysis, Blockchain, Ethereum, Smart contracts, ERC20 tokens, cryptocurrency 1 Introduction The Ethereum Blockchain, launched in July 2015 [1], is a public ledger that keeps records of all Ethereum related transactions. It is shared between all par- ticipants and is based on a reward mechanism as an incentive for users to run the transactions network. A key characteristic of the Blockchain network is its heavy reliance on cryptography to secure the transactions, addressed as the consensus mechanism. Each account consists of a public and private key duo, where the private key is used to digitally sign each account’s transactions, and the public arXiv:1805.12097v1 [cs.SI] 30 May 2018 2 S. Somin, G. Gordon and Y. Altshuler key can be used by all Blockchain participants in order to verify the transaction’s validity, in a rapid, decentralized and transparent way. The ability of the Ethereum Blockchain to store not only ownership, simi- larly to Bitcoin, but also execution code, in the form of ”Smart Contracts” , has recently led to the creation of a large number of new types of ”tokens”, based on the Ethereum ERC20 protocol. These tokens are ”minted” by a variety of play- ers, for a variety of reasons, having all of their transactions carried out by their corresponding Smart Contracts, publicly accessible on the Ethereum Blockchain. In this regards, the Ethereum Blockchain’s transactions, and ERC20 trans- actions in particular, constitute a decentralized record of interactions among participants, with two interesting properties that distinguish it from most of the traditional interaction collections (such as social network activities, phone-call records, financial bank transactions): – Unlimited number of wallets — The Ethereum private key mechanism enables any participant to create an unlimited amount of unique “wallets”. Whereas the participant can control all of these wallets easily, it is impossible for an outside observer to explicitly associate the wallets to each other (with the exception of an implicit association, through a careful data analysis work, as can be seen in [2]). This can be compared to a mobile phone network, in which every participant may hold an infinite amount of different identities, addressed as phone numbers, all of which can be used at will. Had this property existed in reality, it would likely render most of recent seminal works in this field (such as [3–8] and many more) highly impractical, if not entirely obsolete, as demonstrated in [9]. – Unlimited number of tokens — The ability of participants to create not only new wallet addresses, but also an unlimited number of new tokens turns the Ethereum network from a single faceted means of communication of storage and execution related transactions, to a multi faceted (and in fact, an infinitely faceted) one, comprised of many different types of interactions, whose nature widely varies from payment, through decentralized trading in GPU resources [10], and to consumption of behavioral predictions [12]. As a result, the ERC20 ecosystem and the multitude of transactions it con- sists of, constitutes one of the most fascinating examples for decentralized net- works. However, to this day there has not been any in-depth analysis of the ERC20 tokens network properties . This work is the first attempt to analyze the ERC20 tokens through a net- work theory prism. We study two years of ERC20 transactions over the Ethereum Blockchain, by forming a social network from the participants and their corre- sponding monetary actions. We show that the ERC20 tokens data, despite being infinitely faceted and potentially comprised of unlimited amount of single-serving wallet addresses, still strongly displays several key properties known in network theory research to characterize sets of human interactions. The direct potential implication of our discovery is that the ERC20 tokens data is likely to there- fore also comply with additional known network properties – leading the way Social Signals in the Ethereum Trading Network 3 for the development of an abundance of predictive and descriptive techniques for the ERC20 tokens transactions, based on known network theory oriented approaches from other domains. The rest of the paper is organized as follows: Section 2 contains background on the topics of this work and review of previous literature related to it. In Section 3 we thoroughly describe the methodology that was used in this work, whereas the results are discussed in Section 4. Concluding remarks and discussion regarding future work appear in Section 5. 2 Background and Related Work Blockchain’s ability to process transactions in a trust-less environment, apart from trading its official cryptocurrency, the Ether , presents the most promi- nent framework for the execution of “ Smart Contracts ” [13]. Smart Contracts are computer programs, formalizing digital agreements, automatically enforced to execute any predefined conditions using the consensus mechanism of the Blockchain, without relying on a trusted authority. They empower developers to create diverse applications in a Turing Complete Programming Language, ex- ecuted on the decentralized Blockchain platform, enabling the execution of any contractual agreement and enforcing its performance. Moreover, Smart Contracts allow companies or entrepreneurs to create their own proprietary tokens on top of the Blockchain protocol [14]. These tokens are often pre-mined and sold to the public through Initial Coin Offerings (ICO) in exchange of Ether, other crypto-currencies, or Fiat Money . The issuance and auctioning of dedicated tokens assist the venture to crowd-fund their project’s development, and in return, the ICO tokens grant contributors with a redeemable for products or services the issuer commits to supply thereafter, as well as the opportunity to gain from their possible value increase due to the project’s suc- cess. The most widely used token standard is Ethereums ERC20 (representing Ethereum Request for Comment), issued in 2015. The protocol defines techni- cal specifications giving developers the ability to program how new tokens will function within the Ethereum ecosystem. In order to comply with the ERC20 standard, the token must adhere to rules regarding the form it will be transferred between addresses and the manner in which data within the token is accessed. The Contract stores the addresses of its corresponding token owners, alongside with the amount of owned tokens, and allows token transfers only if the sender proves ownership of the private key associated to the Contract address. This brand new market of ERC20 compliant tokens is fundamental to ana- lyze, as it is becoming increasingly relevant to the financial world. Issuing tokens on top of the Blockchain system by startups and other private sector companies is becoming a ubiquitous phenomenon, inducing the trade of these crypto-coins to an exponential degree. Since 2017, Blockchain startups have raised over 7 Billion dollars through ICOs. Among the largest offerings, Tezos raised $232M for developing a smart contracts and decentralized governance platform; File- 4 S. Somin, G. Gordon and Y. Altshuler coin raised $205M to deploy a decentralized file storage network; EOS raised over $185M to fund scalable smart contracts platform, Bancor managed to raise $153M for deploying a Blockchain-based prediction market, Kin$98M to build a decentralized social network and communication platform and Blockstack raised $52M towards a decentralized browser, identity and application ecosystem. Apart from being formed by countless stake-holders and numerous tokens, the ERC20 transactional data also presents full data of prices, volumes and holders distribution. This, alongside with daily transactions of anonymised individuals is otherwise scarce and hard to obtain due to confidentiality and privacy control, hence providing a rare opportunity to analyze and model financial behavior in an evolving market over a long period of time. In the past two decades, network science has exceedingly contributed to mul- tiple and diverse scientific disciplines. Applying network analysis and graph the- ory have assisted in revealing the structure and dynamics of complex systems by representing them as networks, including social networks [15–17], computer communication networks [18], biological systems [19], transportation [20, 21], IOT [22], emergency detection [23] and financial trading systems [24–26]. Most of the research conducted in the Blockchain world, was concentrated in Bitcoin, spreading from theoretical foundations [27], security and fraud [28, 29] to some comprehensive research in network analysis [30–32]. The world of Smart contracts has recently inspired research in aspects of design patterns, applications and security [33–36], policy towards ICOs has also been studied [14]. However, the comprehensive analysis of ERC20 tokens, with emphasis on the investigation of the transaction graph built from their related activity on the Blockchain, is still lacking. In this paper we aim to examine how this prominent field can enhance the understanding of the underlying structure of the ERC20 tokens trading data. 3 Methodology 3.1 Data In order to preserve anonymity in the Ethereum Blockchain, personal informa- tion is omitted from all transactions. A User, represented by their wallet, can participate in the economy system through an address, which is attained by ap- plying Keccak-256 hash function on his public key. The Ethereum Blockchain enables users to send transactions in order to either send Ether to other wal- lets, create new Smart Contracts or invoke any of their functions. Since Smart Contracts are scripts residing on the Blockchain as well, they are also assigned a unique address. A Smart Contract is called by sending a transaction to its ad- dress, which triggers its independent and automatic execution, in a prescribed manner on every node in the network, according to the data that was included in the triggering transaction. Smart Contracts representing ERC20 tokens comply with a protocol defining the manner in which the token is transferred between wallets. Among these re- quirements, is the demand to implement a transfer method, which will be used Social Signals in the Ethereum Trading Network 5 for transferring the relevant token from one wallet to another. Therefore, each transfer of an ERC20 token will be manifested by a wallet sending a transaction to the relevant Smart Contract. The transaction will encompass a call to the transfer method in its data section, containing the amount being transferred and its recipient wallet. Each such token transfer results in altering the ’to- ken’s balance’, which is kept and updated in its corresponding Smart Contract’s storage. We obtain the ERC20 transactions basing on the further requirement of the ERC20 protocol, demanding that each call to the transfer method will be followed by sending a Transfer event and updating the event’s logs with all relevant information regarding the token transfer. We therefore call an Ethereum full node’s JSON API and fetch all logs matching to the Transfer event structure [37]. Parsing these logs result in the following fields per transaction: Contract Address - standing for the address of the Smart Contract defining the transferred token, Value - specifying the amount of the token being transferred, Sender and Receiver addresses, being the wallet addresses of the token’s seller and buyer, correspondingly. We have retrieved all ERC20 tokens transactions spreading between February 2016 and February 2018, resulting in 30 ,347,248 transactions and 18 ,517 token address. Due to the restriction on changing and tempering Smart Contracts, any modification made to a token’s designated Smart Contract involves a definite change in it’s associated Contract Address. As a result, a token can change addresses throughout it’s lifespan, though for any point in time, it will only be assigned to a single relevant Contract Address . Therefore, the above mentioned amount of unique contract addresses serves merely as an upper bound to the amount of unique tokens. Since we do not restrict ourselves to a specific type of token, but observe the network as a whole trading system, this non-unique identification of tokens doesn’t affect our analysis of the network. The dataset of ERC20 tokens transactions is extremely diverse and wide- ranging, where not only any ERC20 token might correspond to multiple con- tract addresses, and therefore being considered as various different tokens by our analysis, but also the characteristics of the different tokens are extremely varied. For instance, the tokens differ in their age, their economic value, activ- ity volume and number of token holders, some merely serve as test-runs, others aren’t tradable in exchanges yet, and some, according to popular literature, are frauds, all residing next to actual real-world valuable tokens. 3.2 Graph Analysis In order to perceive the network’s structure and assess the connectivity of its nodes, one should examine the network’s degree distribution, considering both in-degree and out-degree, indicating the number of incoming and outgoing con- nections, correspondingly. The degree distribution P(k) signifies the probability that a randomly selected node has precisely the degree k. In random networks of the type studied by Erd¨ os and R´ enyi [38], where each edge is present or absent with equal probability, the nodes’ degrees follow 6 S. Somin, G. Gordon and Y. Altshuler aPoisson distribution. The degree obtained by most nodes is approximately the average degree ¯kof the network. These properties are also manifested in dynamic networks [39]. In contrast to random networks, the nodes’ degrees of social networks (such as the Internet or citation networks) often follow a power lawdistribution [40]: P(k) =k−α(1) The power law degree distribution indicates that there is a non-negligible number of extremely connected nodes even though the majority of nodes have small number of connections. Therefore the degree distribution has a long right tail of values that are far above the average degree. Power law distributions can be found in many real networks, Newman [17] summarized several of them, including word frequency, citations, telephone calls, web hits, or the wealth of the richest people. 4 Results As discussed, we study an extremely diverse and wide-ranging dataset. In order to present a first glimpse on the diversity of ERC20 tokens transactional data, we explore the distribution of token popularity, in terms of buyers and sellers amount. As Figure 1 reflects, ERC20 tokens’ popularity follows a power-law distribution, thereby expressing the diversity of token holders along a 2 years period, between February 2016 and February 2018. Particularly, it can be seen that most tokens are traded by an extremely small amount of users and on the other hand, a few popular tokens exist, traded by a very large group of users during the examined timespan. 100101102103104105106 Token popularity among buyers108 106 104 102 100Token count =1.501, R^2=0.990 (a) Tokens popularity among buyers 100101102103104105 Token popularity among sellers108 106 104 102 100Token count =1.543, R^2=0.982 (b) Tokens popularity among sellers Fig. 1: Crypto-coins popularity over a two year period lapsing from February 2016 to February 2018. Depicting the probability a coin would have certain amount of buyers (left panel) and sellers (right panel), both demonstrating a power-law distribution. We further aim to examine whether the ERC20 network satisfies the known characteristics of other real-world networks, first and foremost examining its de- gree distribution. We therefore construct the following directed graph, GFT(V,E), standing for ERC20 Full Transactions Graph , including all transactions in the Social Signals in the Ethereum Trading Network 7 timespan between February 2016 and February 2018. The resulting graph con- sists of 6,890,237 vertices and 17 ,392,610 edges. The set of vertices Vconsists of all ERC20 trading wallets in this period, where any vertex urepresents a trading wallet wu. Out-going edges depict trans- actions in which wallet wusold any type of ERC20 token to other wallets, and in-coming edges to uare formed as result of transactions in which wubought any ERC20 token from others. Formally, E⊆V×Vs.t.: E:={(u,v)/bardblwalletwusold any ERC20 token to wv} (2) Out-degree of vertex urepresents the number of unique wallets buying tokens fromwuand its in-degree depicts the number of unique wallets selling tokens to it. Surprisingly, despite the great variance between the traded tokens in the network, we discovered that the degree distribution depicts a strong power-law pattern, as presented in Figure 2. Hence the ERC20 Full Transactions Graph , GFT, displays similar connectedness structure to other real-world networks, pre- senting a non-negligible number of extremely connected nodes even though the majority of nodes have small number of connections, both in buying and selling transactions. 100101102103104105 In-degree1011 109 107 105 103 101 density =2.281, R^2=0.988 (a) In Degree Distribution 100101102103104105106 Out-degree1011 109 107 105 103 101 density =1.935, R^2=0.992 (b) Out Degree Distribution Fig. 2: Analysis of Blockchain network dynamics for a 2 years period from February 2016 to February 2018. The networks nodes represent ERC20 wallets and edges are formed by ERC20 buy-sell transactions. Outgoing degree of a node reflects the number of unique wallets receiving funds from that node, and vice-versa for incoming degree. Both outgoing and incoming degrees present a power-law distribution. We have additionally analyzed ERC20 transaction graphs based on varying length periods between 3 days to 3 months, and validated our findings across 20 different points in time. We have observed that in all cases the power-law degree distribution is preserved and presents roughly similar γvalues. We omit these results from the current version, due to space limitations, and they will appear in a future, extended version. 8 S. Somin, G. Gordon and Y. Altshuler 5 Concluding Remarks and Future Work In this paper, we have demonstrated for the first time that the ERC20 tokens transactional data displays several properties known to be associated with net- works that are comprised of human interactions, and social networks specifically. This occurs despite the fact that the Blockchain protocol enables the creation of an unlimited number of “tokens”, causing diverse sub-domains to reside to- gether over the same protocol, and regardless of an unlimited amount of wallets, resulting in different identities controlled by a single individual. Specifically, we have modeled the transactions as a network that is comprised of wallets, connected through transactions, and found that the degree distribu- tion of nodes in the network presents a power-law pattern. In addition, we have shown that tokens popularity among buyers and sellers also follows a power-law model. These preliminary results indicate that (somewhat surprisingly) despite its diversity, ERC20 data presents a social behavior. This leads us to explore whether other aspects of network theory can emerge from this data. Such fields include short path lengths and clustering coefficient analysis [41], centrality mea- sures [42], connected components behavior [5] and community structure study [43]. We have already been able to demonstrate some of these phenomena using the ERC20 data as well, however they were not included in this work due to space considerations. References 1. V. Buterin et al. , “A next-generation smart contract and decentralized application platform,” white paper , 2014. 2. Y. Altshuler, Y. Elovici, A. B. Cremers, N. Aharony, and A. Pentland, Security and privacy in social networks . Springer Science & Business Media, 2012. 3. M. C. Gonzalez, C. A. Hidalgo, and A.-L. Barabasi, “Understanding individual human mobility patterns,” Nature , vol. 453, pp. 779–782, 06 2008. 4. A. Barabasi, “The origin of bursts and heavy tails in human dynamics,” Nature , vol. 435, no. 7039, pp. 207–211, 2005. 5. J. Candia, M. C. Gonz´ alez, P. Wang, T. Schoenharl, G. Madey, and A.-L. Barab´ asi, “Uncovering individual and collective human dynamics from mobile phone records,” Journal of physics A: mathematical and theoretical , vol. 41, no. 22, p. 224015, 2008. 6. N. Eagle, A. Pentland, and D. Lazer, “Inferring social network structure using mobile phone data,” Proceedings of the National Academy of Sciences (PNAS) , vol. 106, pp. 15274–15278, 2009. 7. Y. Altshuler, N. Aharony, A. Pentland, Y. Elovici, and M. Cebrian, “Stealing reality: When criminals become data scientists (or vice versa),” Intelligent Systems, IEEE , vol. 26, pp. 22–30, nov.-dec. 2011. 8. J.-P. Onnela, J. Saram¨ aki, J. Hyv¨ onen, G. Szab´ o, D. Lazer, K. Kaski, J. Kert´ esz, and A.-L. Barab´ asi, “Structure and tie strengths in mobile communication net- works,” Proceedings of the National Academy of Sciences , vol. 104, no. 18, pp. 7332– 7336, 2007. Social Signals in the Ethereum Trading Network 9 9. Y. Altshuler, N. Aharony, M. Fire, Y. Elovici, and A. Pentland, “Incremental learning with accuracy prediction of social and individual properties from mobile- phone data,” CoRR , 2011. 10. “Golem,” 2017. 11. Y. Altshuler Arxiv , 2017. 12. “Endor – inventing the “Google for Predictive Analytics” ,” 2017. 13. G. Wood, “Ethereum: A secure decentralised generalised transaction ledger,” Ethereum Project Yellow Paper , vol. 151, pp. 1–32, 2014. 14. C. Catalini and J. S. Gans, “Initial coin offerings and the value of crypto tokens,” tech. rep., National Bureau of Economic Research, 2018. 15. A. Barrat, M. Barthelemy, and A. Vespignani, Dynamical processes on complex networks . Cambridge university press, 2008. 16. M. E. Newman, “The structure and function of complex networks,” SIAM review , vol. 45, no. 2, pp. 167–256, 2003. 17. M. E. Newman, “Power laws, pareto distributions and zipf’s law,” Contemporary physics , vol. 46, no. 5, pp. 323–351, 2005. 18. R. Pastor-Satorras and A. Vespignani, Evolution and structure of the Internet: A statistical physics approach . Cambridge University Press, 2007. 19. A.-L. Barabasi and Z. N. Oltvai, “Network biology: understanding the cell’s func- tional organization,” Nature reviews genetics , vol. 5, no. 2, p. 101, 2004. 20. E. Shmueli, I. Mazeh, L. Radaelli, A. S. Pentland, and Y. Altshuler, “Ride shar- ing: a network perspective,” in International Conference on Social Computing, Behavioral-Cultural Modeling, and Prediction , pp. 434–439, Springer, 2015. 21. Y. Altshuler, R. Puzis, Y. Elovici, S. Bekhor, and A. S. Pentland, “On the ra- tionality and optimality of transportation networks defense: a network centrality approach,” Securing Transportation Systems , pp. 35–63, 2015. 22. Y. Altshuler, M. Fire, N. Aharony, Y. Elovici, and A. Pentland, “How many makes a crowd? on the correlation between groups’ size and the accuracy of modeling,” in International Conference on Social Computing, Behavioral-Cultural Modeling and Prediction , pp. 43–52, Springer, 2012. 23. Y. Altshuler, M. Fire, E. Shmueli, Y. Elovici, A. Bruckstein, A. S. Pentland, and D. Lazer, “The social amplifier—reaction of human communities to emergencies,” Journal of Statistical Physics , vol. 152, no. 3, pp. 399–418, 2013. 24. Y. Altshuler, W. Pan, and A. Pentland, “Trends prediction using social diffusion models,” in International Conference on Social Computing, Behavioral-Cultural Modeling and Prediction , pp. 97–104, Springer, 2012. 25. W. Pan, Y. Altshuler, and A. Pentland, “Decoding social influence and the wisdom of the crowd in financial trading network,” in Privacy, Security, Risk and Trust (PASSAT), 2012 International Conference on and 2012 International Confernece on Social Computing (SocialCom) , pp. 203–209, IEEE, 2012. 26. E. Shmueli, Y. Altshuler, et al. , “Temporal dynamics of scale-free networks,” in International Conference on Social Computing, Behavioral-Cultural Modeling, and Prediction , pp. 359–366, Springer, 2014. 27. J. Bonneau, A. Miller, J. Clark, A. Narayanan, J. A. Kroll, and E. W. Felten, “Sok: Research perspectives and challenges for bitcoin and cryptocurrencies,” in Security and Privacy (SP), 2015 IEEE Symposium on , pp. 104–121, IEEE, 2015. 28. S. Meiklejohn, M. Pomarole, G. Jordan, K. Levchenko, D. McCoy, G. M. Voelker, and S. Savage, “A fistful of bitcoins: characterizing payments among men with no names,” in Proceedings of the 2013 conference on Internet measurement conference , pp. 127–140, ACM, 2013. 10 S. Somin, G. Gordon and Y. Altshuler 29. H. Shrobe, D. L. Shrier, and A. Pentland, New Solutions for Cybersecurity . MIT Press, 2018. 30. D. Ron and A. Shamir, “Quantitative analysis of the full bitcoin transaction graph,” in International Conference on Financial Cryptography and Data Secu- rity, pp. 6–24, Springer, 2013. 31. D. D. F. Maesa, A. Marino, and L. Ricci, “Uncovering the bitcoin blockchain: an analysis of the full users graph,” in Data Science and Advanced Analytics (DSAA), 2016 IEEE International Conference on , pp. 537–546, IEEE, 2016. 32. M. Lischke and B. Fabian, “Analyzing the bitcoin network: The first four years,” Future Internet , vol. 8, no. 1, 2016. 33. M. Bartoletti and L. Pompianu, “An empirical analysis of smart contracts: plat- forms, applications, and design patterns,” in International Conference on Financial Cryptography and Data Security , pp. 494–509, Springer, 2017. 34. L. Anderson, R. Holz, A. Ponomarev, P. Rimba, and I. Weber, “New kids on the block: an analysis of modern blockchains,” arXiv preprint arXiv:1606.06530 , 2016. 35. K. Christidis and M. Devetsikiotis, “Blockchains and smart contracts for the in- ternet of things,” IEEE Access , vol. 4, pp. 2292–2303, 2016. 36. N. Atzei, M. Bartoletti, and T. Cimoli, “A survey of attacks on ethereum smart contracts (sok),” in International Conference on Principles of Security and Trust , pp. 164–186, Springer, 2017. 37. “Json prc api,” 2018. 38. P. Erd¨ os and A. R´ enyi, “On random graphs, i,” Publicationes Mathematicae (De- brecen) , vol. 6, pp. 290–297, 1959. 39. P. Erdos and A. Renyi, “On the evolution of random graphs,” Publications of the Mathematical Institute of the Hungarian Academy of Sciences , vol. 5, pp. 17–61, 1960. 40. R. Albert and A.-L. Barab´ asi, “Statistical mechanics of complex networks,” Re- views of modern physics , vol. 74, no. 1, p. 47, 2002. 41. D. J. Watts and S. H. Strogatz, “Collective dynamics of ‘small-world’networks,” nature , vol. 393, no. 6684, p. 440, 1998. 42. S. P. Borgatti, “Centrality and network flow,” Social networks , vol. 27, no. 1, pp. 55–71, 2005. 43. M. Girvan and M. E. Newman, “Community structure in social and biological net- works,” Proceedings of the national academy of sciences , vol. 99, no. 12, pp. 7821– 7826, 2002.
{ "id": "1805.12097" }
2102.01249
Blockchain-based Transparency Framework for Privacy Preserving Third-party Services
Increasingly, information systems rely on computational, storage, and network resources deployed in third-party facilities such as cloud centers and edge nodes. Such an approach further exacerbates cybersecurity concerns constantly raised by numerous incidents of security and privacy attacks resulting in data leakage and identity theft, among others. These have, in turn, forced the creation of stricter security and privacy-related regulations and have eroded the trust in cyberspace. In particular, security-related services and infrastructures, such as Certificate Authorities (CAs) that provide digital certificate services and Third-Party Authorities (TPAs) that provide cryptographic key services, are critical components for establishing trust in crypto-based privacy-preserving applications and services. To address such trust issues, various transparency frameworks and approaches have been recently proposed in the literature. This paper proposes TAB framework that provides transparency and trustworthiness of third-party authority and third-party facilities using blockchain techniques for emerging crypto-based privacy-preserving applications. TAB employs the Ethereum blockchain as the underlying public ledger and also includes a novel smart contract to automate accountability with an incentive mechanism that motivates users to participate in auditing, and punishes unintentional or malicious behaviors. We implement TAB and show through experimental evaluation in the Ethereum official test network, Rinkeby, that the framework is efficient. We also formally show the security guarantee provided by TAB, and analyze the privacy guarantee and trustworthiness it provides.
http://arxiv.org/pdf/2102.01249v3
Runhua Xu, Chao Li, James Joshi
cs.CR, cs.NI
cs.CR
1 Blockchain-based Transparency Framework for Privacy Preserving Third-party Services Runhua Xu, Member, IEEE, Chao Li, Member, IEEE, and James Joshi, Senior Member, IEEE Abstract —Increasingly, information systems rely on computational, storage, and network resources deployed in third-party facilities such as cloud centers and edge nodes. Such an approach further exacerbates cybersecurity concerns constantly raised by numerous incidents of security and privacy attacks resulting in data leakage and identity theft, among others. These have, in turn, forced the creation of stricter security and privacy-related regulations and have eroded the trust in cyberspace. In particular, security-related services and infrastructures, such as Certificate Authorities (CAs) that provide digital certificate services and Third-Party Authorities (TPAs) that provide cryptographic key services, are critical components for establishing trust in crypto-based privacy-preserving applications and services. To address such trust issues, various transparency frameworks and approaches have been recently proposed in the literature. This paper proposes TABframework that provides transparency and trustworthiness of third-party authority and third-party facilities using blockchain techniques for emerging crypto-based privacy-preserving applications. TABemploys the Ethereum blockchain as the underlying public ledger and also includes a novel smart contract to automate accountability with an incentive mechanism that motivates users to participate in auditing, and punishes unintentional or malicious behaviors. We implement TABand show through experimental evaluation in the Ethereum official test network, Rinkeby, that the framework is efficient. We also formally show the security guarantee provided by TAB, and analyze the privacy guarantee and trustworthiness it provides. Index Terms —Transparency, Trustworthiness, Third-party Authority, Blockchain, Ethereum, Smart Contract, Functional Encryption F 1 I NTRODUCTION INCREASINGLY , information systems are being built on the third-party facilities or use external services. This is beneficial to many enterprises as it lowers costs and allows them to keep their focus on business missions. On the other hand, increasing cybersecurity incidents such as cyberse- curity attacks including those leading to data leakage and identity theft are amplifying users’ concerns with regards to their sensitive personal data that is collected, stored, and processed on the third-party facilities. Furthermore, regula- tions such as General Data Protection Regulation (GDPR) and California Consumer Privacy Act (CCPA) introduce stricter compliance requirements for enterprise informa- tion systems. Fig. 1 illustrates the architecture of a typical privacy-preserving third-party service enabled system, as illustrated in a variety of existing work [1], [2], [3], [4], where the personal data is protected by a cryptosystem, and the encrypted data is collected and processed by a third- party IaaS, while the public key and private key services are provided by the third-party authority (TPA). Usually, the third-party entities are assumed to be honest-but-curious , and a TPA is typically fully trusted . To address the trust and compliance issues on these service providers, especially, the security-related service providers such as certificate authorities (CAs), key directo- ries (KDs) and TPAs that provide services of certification, Runhua Xu is with the IBM Research, San Jose, CA, United States, 95120. Chao Li is with Beijing Key Laboratory of Security and Privacy in Intelligent Transportation, Beijing Jiaotong University, Beijing, China, 100044. Runhua Xu and Chao Li are corresponding authors. James Joshi is with School of Computing and Information, University of Pittsburgh, Pittsburgh, P A, United States, 15260. E-mail:runhua@ibm.com, li.chao@bjtu.edu.cn, jjoshi@pitt.edu Fig. 1. Illustration of privacy-preserving third-party service enabled sys- tem. public key lookup and private key generation in exist- ing cryptographic key infrastructures, various transparency approaches that provision openness and accountability have been recently proposed [5], [6], [7], [8], [9], [10] to increase users’ trust or confidence in such cryptographic key infras- tructures. For instance, the CAs, as the underlying public key infrastructure for SSL/TLS protocol, are responsible for issuing digital certificates that certify the ownership of a public key by the named principal of the certificate and allows others to rely upon signatures made by the private key corresponding to the certified public key. Recent research have demonstrated that a variety of attacks [11], [12] and mis-issuance problems [13], [14] might cause complications during certificate issuance procedures. For instance, Kumar et al. [13] analyze CAs’ certificate mis- issuance incidents using a certificate linter named ZLint and Scheitle et al. [14] focus on issues with certification authority authorization (CAA) DNS records. To further mitigate the threat of attack and mis-issuance, notions of certificate transparency [5], [6], CertChain [15], verifiable key directory [7], [9], [10], transparency overlay [8] and authority transparency [16] have been proposed. To be more precise,arXiv:2102.01249v3 [cs.CR] 4 Jun 2022 2 certificate transparency frameworks such as those presented in [5], [6] are intended to increase the transparency of users’ certificates, whereas the CONIKS [7], [9] and SEEMless [10] are intended to be used with general key directories in end- to-end encryption systems. Unlike the above-mentioned conventional transparency frameworks, which focus on the static binding of a public key and an identity, emerging authority transparency [16] focuses on the dynamic key generation interactions in TPA that is requisite by modern cryptosystems such as attribute-based encryption (ABE) [17], [18], functional encryption (FE) [19], [20], and multi- key homomorphic encryption (HE) [21], [22]. However, the initial and formal design of authority transparency has considerable limitations that hinder its de- ployment and application in several areas, such as emerging third-party service enabled privacy-preserving applications [1], [2], [3], [4], [23]. Specifically, these limitations include: (i) the definitions and protocols designed in authority trans- parency model only work on, and relies on, the ABE cryp- tosystems; and (ii) the implementation of authority trans- parency framework is based on a secure logging system. In short, existing authority transparency proposal does not directly support other emerging cryptosystems such as the FE and multi-key HE families that have been used to build secure computation protocols [2], [3], [4], [24]. Besides the identity-to-public-key-binding stealthy targeted attack and the private-key-service censorship attack as illus- trated in [16], FE or multi-key HE based applications have additional privacy threats; for instance, there is a potential inference attack by manipulating a malicious functionality- related vector, as illustrated in [2], [3]. Furthermore, the deployment of secure logging system based authority trans- parency solution pose a challenge with regards to being broadly accepted by the Internet community because: (i) it requires several commercial companies or non-profit orga- nizations that have the computation and storage capabilities to deploy a publicly auditable secure logging system such as that used in the certificate transparency community (e.g., secure logging systems deployed by Google and Mozilla); (ii) there is also a lack of a concrete mechanism for the entities to participate in a transparency framework and monitor and audit unintentional ormalicious behaviors. To address the aforementioned limitations, in this paper, we propose an approach that provides trans- parency and trustworthiness of third-party authority and IaaS using blockchain techniques - in short, TAB - for emerging third-party service-enabled crypto-based privacy- preserving applications. For simplicity, we use FE-based privacy-preserving systems proposed in [2], [3], [4] as the underlying application to illustrate the TAB approach. In particular, to achieve the transparency and trustworthiness goal, TAB employs the Ethereum blockchain as the un- derlying public ledger infrastructure, and also includes a novel and well designed Ethereum smart contract to sup- port automatic accountability with an additional incentive mechanism to motivate participants to participate in the auditing process and punish unintentional misbehaviors or malicious behaviors. We summarize our key contributions as follows: We first revisit the notion of authority transparency model and propose our formal TAB model with new definitionsand protocols to address the entity trust issues considering the scenarios of generic crypto-based privacy-preserving applications where the cryptographic infrastructure TPA or centralized key server is commonly assumed to be fully trusted and the application entities (e.g., third-party IaaS and data sources as illustrated in Fig. 1) is usually assumed to behonest-but-curious . Next, we design a novel smart contract to achieve auto- matic accountability based on our design of the TAB model and employ the Ethereum blockchain as the underlying public ledger infrastructure. We also design an incentive mechanism in the smart contract to (i) reward a TPA if it fulfills its obligation; (ii) punish any entity that violates its responsibility, and (iii) encourage other entities to help audit and inspect the potential malicious behaviors caused by the assumed fully trusted TPA and assumed honest participants. We finally analyze the security guarantee of TAB and present the experimental evaluation on the smart con- tract implemented in the Ethereum official test network - Rinkeby. The evaluation result shows that TAB is efficient and provides security and privacy guarantees. 2 B ACKGROUND AND PRELIMINARIES Here, we briefly present preliminaries and background of related concepts such as functional encryption and its related applications, authority transparency, blockchain, Ethereum, and smart contract. 2.1 TPA-based Cryptosystems and Applications Emerging modern cryptographic schemes, especially those that rely on a third-party authority (TP A) to provide key ser- vices, are being adopted in privacy-preserving applications, where data is encrypted and the data management opera- tions such as querying, accessing control, and computation are over the encrypted data. A TPA is a critical component in these cryptosystems, and it is generally assumed to be fully trusted. Such an assumption is very common in cryp- tography research community. However, deploying such a trusted TPA component in a real scenario is still a challenge because there is a lack of (i) incentive mechanisms to encour- age a participant (i.e., a third-party entity) to play the role of the authority and (ii) a transparent mechanism to ensure that such a TPA works as expected when considering the attacks such as identity-to-public-key-binding stealthy targeted attack and private-key-service censorship attack as illustrated in [16]. Beyond authority transparency that addresses the trust issues in a TPA caused by the aforementioned attacks, we address incentive issues related to participants’ engage- ment in a transparency framework via Ethereum blockchain techniques, and tackle additional privacy leakage issue caused by assuming that participants are hones-but-curious in crypto-based privacy-preserving applications [2], [3]. Our proposed blockchain-based TAB framework can support various TPA-based cryptosystems such as ABE-enabled ap- plications as illustrated in [16] and the emerging FE-enabled privacy-preserving applications. Here, we briefly introduce the FE cryptosystem and FE-based applications; we also dif- ferentiate between the ABE and FE structures/components. 3 2.1.1 Functional Encryption (FE) FE is a generalization of public-key encryption in which any party with an issued functional secret key allows us to compute a function of what a ciphertext is encrypting. A FE scheme for functionality Fis a tupleEFE=(Setup, KeyDerive, Encrypt, Decrypt) of four algorithms [19], [20], where the Setup and KeyDerive algorithms are run by a TPA that is assumed to be fully trusted . A data owner can adopt the Encrypt algorithm to protect its data, while a data user with the functional decryption key issued by its TPA can compute the function over the ciphertext to acquire the function result without learning the original data via Decrypt algorithm. 2.1.2 FE-based Application and Potential Privacy Leakage The feature of computing over encrypted data makes func- tional encryption a promising approach for employing se- cure multi-party protocols for privacy-preserving machine learning (PPML) [2], [3]. While employing FE, a PPML also inherits the assumption of a trusted TPA. Besides, PPML techniques typically assume that the aggregator or coordi- nator (that is, the decryption party when PPML uses a FE scheme) is honest-but-curious . Security guarantee provided by a FE scheme can ensure that the encrypted data cannot be compromised by an ad- versary [20]. However, there is still potential privacy leakage in PPML approaches that use FE schemes, as demonstrated in [2], [3]; here, an authorized honest-but-curious decryption party may exploit a manipulated vector to request a func- tional decryption key to repeatedly execute the decryption algorithm over the encrypted data and store the intermedi- ate data to infer partial information in the encrypted data. For the specific inference attack, we refer the readers to [2], [3] for more details. 2.1.3 Comparing ABE and FE ABE is also a type of public-key encryption in which cipher- texts are dependent upon access policy over a set of attribute credentials (e.g., age, affiliation, etc.) and any party with proper attribute credentials can be issued a secret key to access the encrypted data. A (ciphertext-policy) attribute-based encryption (ABE) scheme for access policy Ais a tupleEABE =(Setup, KeyGeneration, Encrypt, Decrypt) of four algorithms [25], [26]. As in ABE, the Setup and KeyGeneration algorithms are run by a TPA that is assumed to be fully trusted . A data owner uses the Encrypt algorithm with a specified access policy to protect her data, while the data user with proper attribute credentials that satisfy the access policy can access (Decrypt) the encrypted data. The main difference between ABE and FE is the creden- tials that are used to generate or derive the private key. In ABE, the private key is generated based on a set of attributes of a data user, while the functional decryption key is derived from a function-related vector in FE for the functionality of inner-product scheme. Besides, the adoption of FE may introduce potential inference threats as illustrated in [3]. Remark . Unlike authority transparency [16] that builds on the ABE scheme, for simplicity, in this paper, we use the recently proposed FE-based applications [2], [3], [4] as underlying examples to illustrate the key features of TAB. Specifically,TAB focuses on providing transparency in cases related to above-discussed assumptions, namely, a trusted TPA and a honest-but-curious participants, to increase users’ trust in a system. In Section 3.4, we analyze the applicability of TAB in other TPA-based cryptosystems. 2.2 Authority Transparency Authority transparency is defined as a publicly auditable set of a TPA’s activities. The goal is to ensure that a TPA fulfills its auditing obligations ( O) related to public parameter distribution (Opp) and trustworthy key service ( Oks), con- tinuously and transparently. We formally define authority transparency as below; here, we adopt the notation from [27]. Definition 2.1 (Authority Transparency [16]) .LetT;Land Cdenote a third-party authority, a log server, and a client, respectively, that use a set of interactive protocols. Let C:actor;C:auditor andC:monitor represent the roles of the actor, auditor, and monitor that execute the application, auditing, and monitoring modules, respectively. We define authority transparency ,ATT;L;C O, as a set of six interactive protocols: ATT;L;C O = (GenO;LogOpp;LogOks;CheckO;Inspect;Gossip ); and each protocol is defined as follows: (SOpp; SOks) Run (1;GenO;fT;C:actorg;("; ")) (1) (bT; ") Run (1;LogOpp;fT;Lg;(SOpp; ")) (2) (bT; bC; ") Run (1;LogOks;fT;C:actor;Lg;(";Oks:SC;Oks:ST)) (3) ("; bC:auditor ) Run (1;Check O;fL;C:auditorg;("; ")) (4) (bL; ") Run (1;Inspect ;fL;C:monitorg;("; ")) (5) (evidence ) Run (1;Gossip ;fC:auditor;C:monitorg;("; ")) (6) The order of parameters in the input tuple and the order of elements in the output are consistent with par- ticipating entities. For instance, in protocol (bT;") Run (1;LogOpp;fT;Lg;(SOpp;")), there exists two partici- pants:Thas the inputOppwhileLhas no input, as denoted by". We briefly introduce each interactive protocol as follows: (1) GenOis a protocol between TandC:actor that gen- erates the audit obligations to be logged; (2) LogOppis a protocol between TandLthat is used to recordOppin the public log; (3) LogOksis a protocol involving T,LandC:actor that is used to recordOksin the public log; (4) CheckOis a protocol involving L,C:actor and C:auditor that is used to check whether or not an audit obligationOpporOksis in the log; (5) Inspect is a protocol between LandC:monitor that is used to allow the monitor to inspect the contents of the log and find suspicious audit obligations fOig; (6) Gossip is a protocol between C.auditor andC.monitor that is used to compare different versions of a log and detect any inconsistencies caused by misbehavior of a participant or on behalf of the log server. Unlike the authority transparency approach proposed in [16] that is built on the secure logging system, our 4 proposed TAB relies on the Ethereum blockchain. Thus, the above-mentioned protocols are not directly applicable in our blockchain-based TAB framework. We will present our relevant definitions in Section 3.3. 2.3 Blockchain, Ethereum and Smart Contract A blockchain is a growing list of records (a.k.a, blocks) that are linked via cryptographic techniques, where each block contains a cryptographic hash of the previous block, a times- tamp, and the transaction data. In particular, the blockchain is a public distributed database of records, transactions, or digital events that have been executed and shared among various participants. In our proposed work we, employ a blockchain as the underlying public ledger infrastructure instead of the secure logging system adopted in [16]. Ethereum is an open-source and public blockchain-based distributed computing platform supporting smart contracts [28]. Usually, there are two types of accounts in Ethereum, namely External Owned Accounts (EOAs) controlled by private keys associated with users and Contract Accounts assigned to smart contracts. A smart contract in Ethereum refers to a piece of code, for instance, a Solidity1program code that usually consists of multiple functions, few pa- rameters and perhaps some modifiers. To deploy a smart contract, an ordinary user can compile the contract to gen- erate the corresponding bytecodes and application binary interface (ABI), and then send a contract creation transaction to the Ethereum network with the bytecodes and ABI. Upon receiving a transaction, the miners of the Ethereum network will include the bytecodes into the newly coming block being added. Each successfully deployed contract account can be viewed as a small decentralized computation and storage unit that can execute specific functions defined in the contract and also store data allowed by the contract. As a result, the transactions, messages, as well as the inputs of the functions are all recorded by the Ethereum blockchain, and, hence, the outputs of the functions are deterministic because the distributed miners can ensure that. Note that it is not free to either deploy a smart contract or to call a function of existing smart contracts in Ethereum. A user needs to pay Gas2that can be exchanged with Ether, the cryptocurrency used in Ethereum. 3TAB FRAMEWORK 3.1 Overview of TAB 3.1.1 Entities in TAB Fig. 2 illustrates the architecture of TAB framework. Note that the dashed lines represent the procedures of crypto- based privacy-preserving applications, while the solid lines denote the procedures of the TAB framework. TAB consists of the following entities: TPA . The TPA is the same role as in the ordinary FE cryptosystem, but in TAB it has additional responsibilities to fulfill, including: (a) submitting the public parameters obligations (in particular, identity-to-public-key bindings), (b) reporting its fulfillment of obligations in the key service 1. https://github.com/ethereum/solidity 2. https://github.com/ethereum/wiki/wiki/Whisperprocess, and (c) verifying that the submitted/reported obli- gations are permanently recorded in the blockchain. Actors . Actors include all users of an crypto-based privacy- preserving application, namely, the entities (e.g., data owner ) that employ the encryption algorithm and the entities (e.g., data user ) that perform secure computation or access control via the decryption algorithm. Besides, the actors may also need to fulfill the obligations of key service because they are involved in interaction with other actors and/or the TPA. Monitors . Monitors are responsible for inspecting the con- tents of the recorded auditing obligations to find suspicious obligations. In TAB, the encryption entities or the additional independent entities play the role of the monitors. Administrator . An administrator is responsible for the de- ployment, maintenance, and administration of the smart contract. The smart contract mainly includes three modules: (a) the obligation record module that provides various inter- action functions for the entities to carry out recording, audit- ing and inspection requirements related to the obligations, (b) the incentive mechanism that provides the payment and reward functions to the participants, and (c) the inference prevention module (IPM) , previously deployed in a TPA as illustrated in [3]. Note that the Ethereum blockchain can ensure the trustworthiness of smart contracts; it can also en- sure that the recorded obligations are distributed, open, and tamper-proof. Note that once the smart contract deployed it does not need a centralized administration. 3.1.2 Notations and Use Scenarios To elaborate our TAB, we first present the notations, entities, and scenarios of applying our TAB framework in a crypto- based privacy-preserving environment. Here we use FE as the underlying crypto scheme to present TAB framework. In Section 3.4, we analyze the applicability of TAB in other TPA-based cryptosystems. Suppose that we have a group of data ownersfCowner igi2[n]that will share their private dataxxx=fxigi2[n]encrypted by an FE scheme where for simplicity we assume that Cowner i owns dataxi, a group of data usersfCuser jgj2[m], where each data user has a vector yyyj and needs to acquire the inner-product hxxx;yyyjiover the ci- phertext ofxxx, and a TPAAthat provides public and private key services for these data owners and users. Furthermore, letfCowner kgk2[l]be the monitors. We use Bto represent the Ethereum blockchain, and let BTAB SC denotes our proposed smart contract deployed in the blockchain. 3.2 Threat Model Threat Model of Privacy-Enhanced Applications : Existing crypto-based privacy-preserving applications are usually based on some common assumptions: (i) a centralized TPA or key server is assumed to be fully trusted and (ii) both decryption and encryption entities are assumed to be honest- but-curious . Hence, the threat models in such cases typically focus on an adversary who attempts to compromise the encrypted data and a curious entity that launches potential privacy attacks (e.g., infer the private information), while honestly following the protocols/algorithms. Threat Model of TAB: As illustrated by the identity-to- public-key-binding stealthy targeted attack and the private-key- service censorship attack in [16], a TPA or key server may not 5 Fig. 2. Overview of the TAB framework. Note that the dashed lines represent the procedures of the crypto-based privacy-preserving applications, while the solid lines denote the procedures of TABframework. be trusted because of its unintentional misbehaviors and/or malicious behaviors . Similarly, the honest-but-curious entities may also behave dishonestly. In addition to addressing above threats, TAB focuses on increasing entities’ trust on the TPAs and other honest-but-curious entities through trans- parency approach. In particular, TAB mitigates the depen- dence of crypto-based privacy-preserving applications on the assumptions of a trusted TPA or key server and an honest entities. To be more precise, we assume that such a dishonest adversary may pretend to behave honestly without being detected by other entities. Adversaries may not follow the specifications in the protocols, and/or attempt to conceal their activities. In general, the dishonest adversary includes the TPA and actors, where a dishonest TPA may attempt to forge a key service proof-of-work without actually pro- viding a valid key service; and, a dishonest actor may try to incorrectly blame other entities for misbehavior. Note that misbehavior may be related to non-malicious misuse by normal actors or the behavior of compromised actors controlled by an attacker. We note that the case of potential collusion between a dishonest TPA and honest-but-curious actors is not fully con- sidered in this paper. Rather than forbidding or preventing collusion through technical means, such collusion between two stakeholders (i.e., TPA and actors) can be solved by resorting to game theory and incentive mechanism designed in the smart contracts [29]. TAB also involves the incentive mechanism from the aspects of each entity, and hence it can prevent such collusion in a game theory manner. We will not discuss that in the reset of the paper, and readers can refer to [29] for more details. Furthermore, unlike the secure logging system based authority transparency framework in [16], where the logger is treated as a potential dishonest adversary, in TAB, the Ethereum smart contract is adopted as the public ledger infrastructure that has been proved to be a trusted compu- tation platform. 3.3 Proposed TAB Framework 3.3.1 TAB Model Unlike the authority transparency approach in [16] that builds on the secure logging system for ABE cryptosystem, TAB uses the Ethereum blockchain, and to keep consistency,we adopt the similar concepts/notions of the authority transparency but it considers generic crypto-based privacy- preserving scenarios including emerging FE-based applica- tions and a blockchain-based public ledger infrastructure. Suppose that each entity einTAB is issued or self- generates an identity-based public and private key pair hpke;skei. Note that the key service interaction occurs between entityCactorand authorityA, where each entity has already received its public and private key pair. For instance, lethpkactor;skactoriandhpkTPA;skTPAirepresent the public/private key pairs of the actor and the TPA, respec- tively. Here, we first present the notion of public parameter audit obligation and key service audit obligation , and then present the formal definition of TAB. Definition 3.1 (Public Parameter Audit Obligation (PPAO)) . A PPAOOppofeis a map structure as follows: Oe pp:=H(eid) :heid;pke;Sigske(eid;pke)i; whereeidrepresents the descriptive identifier of e, H()is a hash function, pkedenotes the public key binding of entity e, and Sigskeis the signature using sk e. Definition 3.2 (Key Service Audit Obligation (KSAO)) .A KSAOOCactor;A ksis a map structure consisting of a pair of key service snapshots OCactor;A ks :=H(Cactor id;Aid;r) :hSreq;Srespi; where each snapshot is a 4-tuple as follows: Sreq:=H(Cactor id;Aid;r) :hr;f;tCactor;Sigskactor(r;f;tCactor)i; Sresp:=H(Cactor id;Aid;r) :hr;;tA;SigskTPA(r;;tA)i; such that Sreq:H(Cactor id;Aid;r) =Sresp:H(Cactor id;Aid;r) Sresp:tAS req:tCactor>0 Sreq:tAS resp:tCactor<t whereris a nonce selected by the key service requester, t is the timestamp of key service processed by each entity, f denotes the request content such as function related vector, represents the proof-of-work that TPA has issued the key, tis the threshold of timestamp difference indicating the expected time of processing of the key service request by the TPA. 6 Remark . In particular,Oppis an identity-to-public-key binding with the issuer’s signature, while OCactor;A ksis the proof-of-key- service . In theOCactor;A ks, for simplicity, to provide the proof- of-work of issuing the functional decryption key sk ffor the function related materials f, let Sigmabe H (skf). Based on the notion of public parameter audit obligation and key service audit obligation , we present the formal TAB model as follows: Definition 3.3 (TAB Model) .LetA;BandCdenote a third- party A uthority, a B lockchain, and an A ctor, respectively, which are parties involved in the interactive protocols. Let C:actor andC:monitor represent the roles of the actor and monitor that execute the functional and monitoring modules, respectively. We define TAB model,M, as a set of five interactive protocols: MA;B;C O = (GenO;LogOpp;LogOks;Inspect ); and each protocol is defined as follows: (SOpp; SOks) Run (1;GenO;fA;C:actorg) (bA; ") Run (1;LogOpp;fA;Bg;(SOpp; ")) (bA; bC; ") Run (1;LogOks;fA;C:actor;Bg;(Oks:SA;Oks:SC; ")) (bB; ") Run (1;Inspect ;fB;C:monitorg;("; ")) Theorem 3.1 presents similar security guarantee as used in [16]. We present the details in Section 4.1. Theorem 3.1. If the hash function is collision-resistant and the signature scheme is unforgeable, then TAB model com- prises a secure transparency framework. Remark . Note that the formal definition of our TAB model is inherited from the authority transparency model [16] with needed changes considering the underlying Ethereum blockchain infrastructure. Specifically, in the authority trans- parency model, the gossip protocol essentially ensures the consistency of distributed logs without being tampered by an adversary, while the check protocol guarantees that the submitted obligations are recorded by the logging system. AsTAB adopts the Ethereum blockchain as the underlying public ledger infrastructure, there is no need to run the gossip and check protocols because these logging-related functions are the features provided by the Ethereum smart contract. 3.3.2 Design ofBTAB SC The TAB smart contract is a critical component in our framework. To support the goal of TAB framework,BTAB SC includes various types of modules: administrative module , access control module ,obligation module ,inspection module , and incentive module . As illustrated in Fig. 3, the access control module verifies a user’s role within an application and determines whether or not to execute corresponding mod- ules or functions. The administrative module keeps track of theTAB smart contract’s status and registration procedures. The obligation module is concerned with the collection of various obligation records and the prevention of inference in privacy-preserving applications. The inspection module enables authorized users to examine misbehavior or mali- cious activity. The incentive module coordinates the above modules in order to reward or punish users using the Fig. 3. Overview of the TABSmart Contract Interface. Ethereum network’s payment functionalities. We discuss each module in details next. Administrative module . This module allows the adminis- trator role to deploy the smart contract into the Ethereum network. The module also includes functions such as open- ing and locking the enrollment, and allowing the partici- pants to drop out. Access control module . This module supports a basic role based access control (RBAC) mechanism that allows the account (a.k.a, the participating entities) have role-related permissions to call various functions. In BTAB SC, we define four types of roles: the TP A, the actors of data owner , the actors of data user , the monitors and the administrator (i.e., the smart contract owner). The administrative entity that deploys the smart contract becomes the smart contract owner . The ownership can be transferred to a new account if necessary. Besides, it is also possible to relinquish this administrative privilege, which is a common pattern after an initial stage when there is a need for a decentralized administration. After the deployment, each entity needs to register to its role by calling the corresponding function before it can use the ordinary features of the smart contract. Obligation module . This module assists in recording the audit obligation into the public ledger. It also publishes its identity-to-public-key binding to the Ethereum blockchain, as illustrated above. Note that the identity of the entity is the unique public address (i.e., 42 hex string characters without case-sensitivity) of the blockchain account, which is derived from the entity’s private key. With regards to the key service audit obligation procedure, the key service requestor (i.e., data owner) can call the corresponding function (that includes role verification) with a randomly generated re- quest identifier, the key-related request parameters, and the corresponding signature. The function then automatically analyzes the request parameters via the inference prevention module (IPM) . Note that the IPM, previously deployed inside the centralized trusted TPA in vanilla FE-based applications, is now deployed in the smart contracts in a decentralized trust setting in the TAB. Upon receiving the key service request with the request identifier, the TPA first checks the verification result of IPM. If the request passes the verification, the TPA will issue the functional decryption key and then publish a response snapshot to fulfill the key service obligation. Inspection module . This module mainly inspects the com- 7 pleteness of a pair of the key service snapshots to check whether the TPA has fulfilled its key service obligation or not. Besides, it also allows checking for the published identity-to-public-key binding. Besides the inspection module that can prevent potential misbehaviors, we have intro- duced the RBAC mechanism to prevent partial misbehav- iors and malicious behaviors as each entity only will be allowed to call corresponding functions with limited privi- lege. Incentive module . This module, as part of BTAB SC, includes several functions to enforce the incentive mechanism, as depicted in Fig. 3. The incentive mechanism is based on payment features of the Ethereum network, where the to- ken can be exchanged for real currency. As illustrated in Fig. 3, we design several functions as ”publicly payable”, which indicates that the smart contract is able to receive the transaction value (e.g., the Ether) when the function is successfully called and executed. In general,mdata users need to pay equally for the cost of calling the registration function for themselves as well as forndata owners and the TPA. Each data user also needs to pay for the cost of calling the request obligation record function and that of calling the response obligation record function by the TPA. Additionally, there exists a mechanism to punish the misbehaviors and malicious activities by a dishonest TPA and data users. To achieve that, the data owners and the TPA first need to register and pay the cost by themselves. The data users make a deposit equally for all the entities’ registration cost after the enrollment phase. Then, the data owners and the TPA can call the disposable reward function to withdraw the registration cost. Besides, we make the TPA and data users make a guaranteed deposit after the registration phase. The monitors can register and pay the cost by themselves, and then calls the inspection function to check the suspicious behaviors. If monitors find the malicious behaviors, they will acquire the reward from a fine to the corresponding entity (i.e., the guaranteed deposit of the entity). Without the guaranteed deposit, the corresponding entity is not allowed to operate in/join the system. We discuss the quantitative analysis of the cost of each entity inBTAB SCin Section 4.2. 3.3.3 TAB Procedures As depicted in Fig. 4, we illustrate the four phases of the TAB framework with specific procedures in a typical FE- based privacy-preserving application scenario. Note that the dashed arrows represent the functional procedures of a typical FE-based application, while the solid arrows denote procedures specific to TAB. In our design, each entity in the FE-based application can also play the role of the auditor and monitor, and we also allow additional monitors to help inspect the misbehaviors and malicious behaviors. Below, we present the specific procedures of each phase in TAB. Phase I: entity initialization : For each entity ewith roleerole and identifier eidin the framework, it generates a public and private key pair hpke;skei. Then, entity eregisters its roleerole toBTAB SC, and publishes its id-to-public-key binding heid;pkeiwith its signature Sigske(eid;pke)toBTAB SC. Phase II: FE (crypto) initialization . The TPAAsets up the FE cryptosystem with the master public key and master private key pairhmpkFE;mskFEi. Using the master key, theTPA generates and sends the common public key pkFE com for all entities (i.e., data owners and data users) in the FE-based application. Then, the TPA publishes the binding hAid;pkFE comiwith its signature SigskA(Aid;pkFE com)toBTAB SC. Phase III: secure data publishing . For each data owner Cowner i , it first selects a nonce ras the key service identifier. Then Cowner i requests the entity-specific public key pkFE Cowner ifrom the TPA with r. Meanwhile,Cowner i also sends a request key service snapshotSCowner ireq toBTAB SCas follows: SCowner ireq =hr;0;tCowner i;SigskCowner i(r;0;tCowner i)i: Then, the TPA generates pkFE Cowner iforCowner i using its master keys, and also publishes a corresponding response key service snapshotSA resp toBTAB SCto fulfill its key service audit obligationOCowner i;A kswith mapping key H (Cowner i;id;Aid;r)as follows: SA resp=hr;H(pkFE Cowner i);tA;SigskA(r;H(pkFE Cowner i);tA)i: Each data owner then uses pkFE eowner ito encrypt its data as follows:fEncpkFE eowner i(xi)gi2[n]. Finally, the data owner pub- lishes a receipt for the received pkFE eowner i. Phase IV: secure data computation . Suppose that a data user Cuser j who has a vector yyyj= (y1;:::;yn)jwould ap- ply inner-product functionality over the encrypted data fEnc(x1);:::;Enc(xn)g.Cuser jalso selects a key service iden- tifierr0first, and then requests the functional decryption key skFE yyyjto the TPA with the vector yyyjandr0. At the same time,Cuser jalso sends the request key service snapshot SCuser j req toBTAB SCas follows: SCuser j req =hr0;yyyj;tCuser j;SigskCuser j(r0;yyyj;tCuser j)i: Unlike the approaches proposed in [2], [3] that deploy the inference prevention module (IPM) within a TPA, we propose to deploy IPM in a smart contract as the TPA is not fully trusted in TAB. Thus, the TPA needs to query BTAB SCto check the validity of yyyi. Ifyyyiis valid, the TPA generates skFE yyyjfor Cuser jusing its master keys, and then publishes a correspond- ing response key service snapshot SA resptoBTAB SC to fulfill its key service audit obligation OCuser j;A kswith mapping key H(Cuser j;A;r0)as follows: SA resp=hr0;H(skFE yyyj);tA;SigskA(r0;H(skFE yyyj);tA)i: Otherwise, the TPA refuses the key service and also pub- lishes key service snapshot indicating that it has refused the key service,SA;refuse resp , with refusing symbol ?toBTAB SC to fulfill its key service audit obligation as follows: SA;refuse resp =hr0;H(?;yyyj);tA;SigskA(r0;H(skFE yyyj);tA)i: With the received skFE yyy, a data user can compute the inner- product ofhxxx;yyyiby decryting as follows: hxxx;yyyji=DecskFE yyyj(fEncpkFE Cowner i(xi)gi2[n]): Finally, the data owner publishes a receipt for the received skFE yyy. 8 Fig. 4. Illustration of the four phases with specific procedures in TABin a FE-based privacy-preserving application scenario. Remark . To avoid redundant description, we do not present the roles of auditor and monitor in the above-mentioned pro- cedures. In particular, as illustrated in Fig. 4, the data users , data owners and the TP A also play the role of auditor that checks whether the audit obligations are recorded into the blochchain permanently. In our design, the data owners also play the role of a monitor to check the suspicious obligations caused by misbehaviors and malicious behaviors from the TPA and adversarial data users . For instance, as illustrated in [2], [3], an adversarial data user may infer the private vectorxxxby manipulating a vector to request the functional decryption key. The monitor can inspect Oeuser;eTPA ksto find the adversary’s suspicious behaviors. Furthermore, our design can also address the case of intentionally issuing an incorrect functional decryption key. For example, suppose the key request material (i.e., xxx) from the authorized user is correct after IPM checking, while the key is incorrect. In TAB, the data user is also the monitor/auditor and can file a claim by manually calling the inspect function based on existing logged key service materials, where the inspection is based on the rule defined in the formal model presented above. 3.4 Applicability of TAB TAB is applicable to other popular TPA-based cryptosystems as well. Specifically, we analyze the applicability of TAB in the attribute-based encryption (ABE) scheme that is the focus of authority transparency proposed in [16]. Differences in key service audit obligations in FE and ABE schemes are as shown in TABLE 1. The main differ- ence in the key service is the credential type, namely, the function-related vector and the attributes that are usually represented in a character string. These credentials are used to generate or derive the private key in the Setup and KeyGeneration phases. As presented in Section 3.3, TAB is a general framework and is not restricted to the type of audit obligation that builds on different key service credentials. Specifically, the request content fand response proof-of-TABLE 1 Different key service audit obligations in FE and ABE Types obligations in FE obligations in ABE Setup-Output private key public parameter KeyGen-Input function-related vector attribute set KeyGen-Output functional decryption key attribute private key workin Definition 3.2 are not limited to a function- related vector and corresponding hashed generated key as illustrated in Section 3.3.3. TAB is applicable to ABE-based applications by replacing the following audit obligations: SCuser j req =hr0;yyyj;tCuser j;SigskCuser j(r0;yyyj;tCuser j)i; SA resp=hr0;H(skFE yyyj);tA;SigskA(r0;H(skFE yyyj);tA)i; by the corresponding audit obligations: SCuser j req =hr0;SSSj;tCuser j;SigskCuser j(r0;SSSj;tCuser j)i; SA resp=hr0;H(skABE SSSj);tA;SigskA(r0;H(skFE SSSj);tA)i; whereSSSjis the attribute set and H (skABE SSSj)is the correspond- ing access control private key generated by the TPA using the attribute set SSSjin the hash format. 4 E VALUATION 4.1 Security, Privacy and Trustworthiness 4.1.1 Security Guarantee The security for the transparency framework is defined in terms of three properties [8], [16]: (i) log-consistency - a dishonest public ledger cannot remain undetected if it tries to present inconsistent versions of the recorded obligations; (ii)unforgeable-service - a dishonest TPA cannot forge a key service by sending valid key service snapshots, but not provide the key service to the actors; (iii) non-fabrication - a dishonest TPA or actors cannot blame the public ledger for 9 misbehavior if it has behaved honestly, and dishonest actors cannot prove the TPA for misbehavior if it has behaved honestly. We note that log-consistency relies on the security prop- erties of the Ethereum blockchain. The unforgeable-service and non-fabrication properties depend on the designed smart contract functions and the adopted signature scheme. Here, we use the game simulation-based reduction methodology to prove Theorem 3.1. Proof. TAB is built on three fundamental security compo- nents: the Ethereum blockchain as the public ledger in- frastructure, the Secure Hash Algorithm 3 (SHA3) as the collision-resistance hash function, the Elliptic Curve Digital Signature Algorithm (ECDSA) to sign and validate the origin and integrity of messages. The security of three components has been proved in corresponding related work [28], [30], [31]. We only prove the above-mentioned three security properties. Log-consistency . Unlike the existing transparency frame- work, [8], [16], that relies on the customized public ledger, TAB uses the public blockchain that has already been proved to provide secure consistency feature [28], and hence we do not present it here to avoid redundancy. Unforgeable-service . In TAB, there are two possible issues related to forgeable-service: a dishonest TPA may publish SA respto the blockchain, but does not send the key sk fto the actors; the dishonest TPA may send an invalid key sk0 fto the actors, but publishes correct SA respgenerated from the valid key sk f. For the first issue, the confirmation phase of key service audit obligation cannot be accomplished in our designed smart contract, and then such adversarial behavior is easily detected by the monitors. For the second issue, suppose that the dishonest TPA has the non-negligible advantage to break the unforgeable-service security guarantee, and hence it can forge the hashed key component HSHA3(sk0 f)for skf with advantage AdvA HSHA3(sk0 f)!skf. To achieve that, the dishonest TPA hence needs the ability to find potential collision HSHA3(skf) = HSHA3(sk0 f). According to the security promise of SHA3, it is impossible to find that collision with non-negligible advantage [30]. Thus, dishonest TPA does not have a non-negligible advan- tage to provide an unforgeable key service without being detected. Non-fabrication . InTAB, a possible fabrication case is that dis- honest actors may attempt to blame the TPA by publishing SCactor req to the blockchain but does not actually send the key request to the TPA. Suppose that a dishonest actor has the non-negligible advantage to break the non-fabrication secu- rity promise. To launch the fabrication case, the dishonest actor needs to forge a fake SA respso that it can accomplish the confirmation phase. Thus, the dishonest actor is able to forge a fake signature of the TPA with advantage AdvCactor skA. However, it is impossible to break the ECDSA [31], as has been proved, namely, the unforgeability of the signature scheme. Thus, the actors do not have a non-negligible ad- vantage to frame up the TPA.4.1.2 Privacy Guarantee Typically, authorized users request public and private keys from a TPA using (attribute) identities in privacy-preserving applications built on cryptosystems like as ABE, FE, and multi-key HE. The major objective of authority transparency [16] and TAB is to audit the interactive key service discussed previously without invading the original key service. As a result, privacy assurance of TAB focuses on preventing data leaking from audit materials. Unlike the initial authority transparency that focuses on ABE-based applications where partial attribute identities are privacy-sensitive, TAB also supports the privacy-enhanced computing applications that built on FE or multi-key HE schemes. There is no privacy concern regarding the identity in an FE or multi-key HE because those identities could be any unique characters without any privacy-sensitive information. For example, the identity of each entity in TAB could be the Ethereum network’s public account address, which is a random 64-character hex string produced from the entity’s private key. Additionally, the TAB framework only receives the hash of attribute identifiers in ABE-based applications, not potentially sensitive attribute information. As a result, such account identifiers or hash of auditing materials do not reveal any private identifiable information. 4.1.3 Trustworthiness Goal The purpose of the TAB approach is to deal with the trust issues raised by potential dishonest entities by providing transparency. TAB is able to prevent the attacks such as stealthy targeted attack and censorship attack as illustrated in [16]. Specifically, each dishonest entity needs to publish the key service snapshot to prove that it has fulfilled its obligation of public parameter distribution and private key service. The designed smart contract can ensure that each entity’s submitted audit obligations can be automatically cross-validated based on our designed protocols before be- ing honestly and permanently recorded into the blockchain. Our security analysis has shown that the misbehaviors or malicious behaviors of a TPA and the actors are easily de- tected. Furthermore, the IPM is a critical component in FE- based applications [2], [3] that helps to mitigate the inference threats. In TAB, the IPM, which was deployed in a TPA in the scheme proposed in [3], is moved to the smart contract, is automatically executed in a publicly auditable environment, and hence increase the transparency and trustworthiness of IPM. 4.2 Experimental Evaluation 4.2.1 Implementation and Setup The TAB model does not rely on the specific privacy- enhanced applications that are built on FE or multi-key HE cryptosystems, and hence for generality, we only present the evaluation on a pure TAB model with the simulated audit obligations where the key-related components are generated by the FE-based application in an off-line manner. Implemented Smart Contract : We implement the smart contracts in Solidity programming language using a Truf- fledevelopment environment, testing framework and as- set pipeline for blockchains using the Ethereum Virtual Machine (EVM). Fig. 3 illustrates the core modules and 10 interfaces of TAB smart contract, while the whole implemen- tation is publicly available on Github3. We direct the reader to the Github repository for implementation specifics and discuss the fundamental implementation considerations be- low.TAB mainly includes four types of functions as follows: Access Control Modifiers . The modifier can be used to change the behavior of functions in a declarative way. In our imple- mentation, we use the modifier to automatically check the privilege of each account that is defined in RBAC module prior to executing the function. We employ Ownable and AccessControl smart contracts from OpenZeppelin4as the basis for our access control mechanism. To be specific, we define various access control modifiers in which the basic RBAC functions are integrated to satisfy our access control requirement. Except for the registration related functions, other functions are restricted by these modifiers. Administrative and Incentive Functions . We define several administrative functions such as ‘enrollLock()’ ,‘enrollOpen()’ , ‘dropout()’ that allow the administrator to control the enroll- ment status. In TAB, each entity can register if and only if the enrollment is set as open by the administrator. After the enrollment is locked, the deposit operations are opened to the related entities. Besides, TAB also inherits the adminis- trative functions such as ‘transferOwnership(newOwner)’ ,‘re- nounceOwnership()’ . These two functions allow transferring the ownership of the contract and leave the contract without owner, respectively. Furthermore, we also define several withdraw and deposit functions that help to establish a basis for the incentive and penalty mechanisms. Registration Functions . The registration functions mainly fo- cus on the initialization phases of TAB (i.e., Phases I and II, as illustrated in Section 3.3.3), where each entity is allowed to register a role, and publish its identity-to-public-key bind- ing in the blockchain. Obligation Functions . The obligation functions address the core features of the TAB model. As illustrated in Sec- tion 3.3.3 Phases III and IV , we use a three-phase com- mitment approach to achieve the obligation features. To be specific, ‘recordKSPKReq’, and ‘recordKSSKReq’ allow the actors to publish the key service request snapshots, while ‘recordKSPKResp’, and ‘recordKSSKResp’ allow the TPA to record corresponding key service response snapshots. Then, ‘recordKSPKResp’ function allows us to confirm the receipt of the key service. Inspection Functions . The inspection functions address the monitoring task for the recorded audit obligation as dis- cussed in Section 3.3.3. To be specific, ‘inspectObligationKS’ allows to automatically inspect the completeness of the key service obligations, while ‘inspectObligationPP’ permits the monitor to verify the published identity-to-public-key bind- ing. Regarding the incentive design, if a dishonest behavior is detected, the corresponding entity will be fined a fixed number of ethers that will be provided as an incentive reward to the monitor. Experimental Setup : Our experiments have been performed on a Macbook Pro platform with 2.3GHz 8-Core Intel Core i9 processors and 32GB DDR4 memory. Besides, we use the Ethereum official test network, Rinkeby, as the experimental 3. https://github.com/iRxyzzz/tab 4. https://openzeppelin.com/contracts/ 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0 training round020406080100120140time cost (min)party=6, Without TAB party=6, with TAB party=8, Without TAB party=8, with TAB party=10, Without TAB party=10, with TABFig. 5. The time cost of TAB-enhanced privacy-preserving FL environment to deploy our smart contract. Furthermore, we write several JavaScript test-cases using the automated testing framework of Truffle that is built on Mocha5and provides a cleanroom environment. Specifically, for demonstration, we use five Ethereum accounts to simulate various entities in TAB, namely, the role of the administrator , the TP A, the data owner , the data user and the monitor . With regards to various scenarios, we write corresponding test-cases to evaluate the performance (i.e., the gas cost and the time cost for scenarios such as administrative, registration, obligation, etc). 4.2.2 Experimental Results We report the performance of TAB for selected functions for various test scenarios in TABLE 2. In particular, the performance includes two aspects: the gas cost and the test time. Gas is spent in Ethereum for deploying smart contracts or calling functions. As reported in TABLE 2, most functions cost very little. Specifically, except for the smart contract deployment, the cost of each function is at the level of 105gas in general. Regarding the most called functions for obligation and inspection, to record an audit obligation for one key service, the functions related to three-phase commit- ment (i.e., recordKSSKReq ,recordKSSKResp ,recordKSConfirm ) cost 3:7105gas, 8:4105gas, 4:3105gas, respectively. Besides, the cost of inspection for key service and public parameter audit obligations is 2:4105gas and 3:7105 gas, respectively. Furthermore, we also measure the time it takes to test the selected functions. Except for the administrative functions, the calling time of rest of the functions is less than 100ms. Note that the time to test each function is measured in the Ethereum test network. The testing time is related to execution time instead of time taken to confirm the trans- action . Thus, the deployment time of the smart contract is only 183msrather than the general time taken to confirm a transaction, namely, about 6 minutes. To further assess the TAB framework’s scalability, we integrate it into a specific privacy-preserving federated learning application built on the FE cryptosystem with a TPA for key service, where the number of enrolled data owners (i.e., called party in the FL system) increased from 6 to 10 and the task of FL is to train a CNN model over MNIST dataset. Due to the fact that TAB focuses exclusively on the key interactions between the user and the TPA, and 5. https://mochajs.org/ 11 TABLE 2 The gas cost and test time of selected functions in various test case scenarios in the TAB. Test Cases Functions Gas Cost Time Description Administrativedeployment 4125603 183ms deploy the smart contract enrollOpen 44126 42ms open the enrollment enrollLock 14531 46ms lock the enrollment dropout 28293 178ms allow to drop out and withdraw the balance IncentivedepositGuarantee 28083 48ms deposit the guarantee rewardRegisterCost 52949 43ms reward registration cost for non-payable entity rewardDeploymentCost 51584 41ms reward deployment for the administrator RegisterationregisterAuthority 38276 80ms register the role of third-party authority registerActorDataOwner 38335 71ms register the role of data owner registerActorDataUser 36555 70ms register the role of data user registerMonitor 36521 72ms register the role of monitor ObligationrecordKSSKReq 43173 96ms publish the key service request snapshot recordKSSKResp 84211 55ms publish the key service response snapshot recordKSConfirm 43402 49ms confirm receipt of the key service obligation InspectioninspectObligationKS 24511 41ms inspect the key service audit obligation inspectObligationPP 37482 46ms check the correct of the public parameter the time cost is negligible in comparison to the time cost of FL training, the introduction of the TAB framework has slight effect on the time performance of the original privacy- preserving FL training, as shown in Fig. 5. Additionally, an increase in the number of participants has an effect on the amount of time spent on the supported privacy-preserving application (i.e., FL training), but not obvious on the amount of time spent on TAB. 5 R ELATED WORK Privacy Enhanced Applications . Emerging FE schemes [19], [20] have been shown to be a promising candidate for secure computation in privacy-preserving application scenarios where data is encrypted and outsourced, and the computation is carried out over the encrypted data. Especially, recently proposed functional encryption for the functionality of computing the inner-product such as in [20], [32] raises the possibility of applying functional encryption in complex applications such as the federated learning and deep neural networks, as demonstrated in [2], [3], [23], [24], [33], [34]. Both HE and FE schemes are required to allow privacy- enhanced computing in crypto-based federated learning applications. While HE makes use of a centralized crypto dealer to synchronize key pairs, FE makes use of a third- party authority (TPA) to assist in the generation of public parameters and the provision of functional decryption keys for each function. The crypto dealer or TPA is a vital component of those applications and is typically regarded to be fully trustworthy . Furthermore, the entities such as a coordinator in federated learning are also assumed to behonest-but-curious . However, the trust issues caused by malicious insiders in the TPA infrastructure [8], [16] and the privacy inference issues caused by curious entities [2], [3] have not been investigated adequately. Transparency and Blockchain . The concept of transparency issues have received more and more attention due to ma- licious activities or misbehavior in various secure com- puting infrastructures and components. For instance, the certificate transparency proposed in [5], [6] aims to mitigate the certificate-based threats caused by fake or forged SSL certificates that are mistakenly or maliciously issued byinsiders. Most recent and related work such as CONIKS [7] and its following up work EthIKS [9],SEEMless [10], and transparency overlay [8] target the key transparency in end-to- end encrypted communications systems and provide a for- mal transparency model. The work closest to this proposed work is the authority transparency framework proposed in [16] that addresses the issues related to potentially dishonest TPAs in ABE-based applications using a secure logging based approach. Further, blockchain based techniques have also been introduced to help increase the transparency of existing certificate transparency framework, such as in [15], [35]. However, there is still a lack of a mechanism to ad- dress the authority transparency issues for emerging crypto- based privacy-preserving applications without relying on the complex secure logging systems. Such a transparency approach is important to ensure the trustworthy deploy- ment of generic crypto-enabled systems. 6 C ONCLUSION This paper proposed the TAB framework to address trans- parency and trustworthiness of third-party authorities (TP As) and honest-but-curious entities for generic modern crypto enabled privacy-preserving applications, as well as other schemes that have components similar TPAs and many entities that interact with them. TAB employs the Ethereum blockchain as the underlying public ledger infrastructure and also incorporates a novel smart contract to support accountability with an additional incentive mechanism that motivates participants to engage in auditing and punish misbehaviors or malicious behaviors in the environment. Our evaluation shows that TAB is efficient in the simulated Ethereum, and achieves the security, privacy and trustwor- thiness goals. ACKNOWLEDGMENT This work was performed while James Joshi was serving as a Program Director at NSF; and the work represents the views of the authors and not that of NSF. Chao Li is supported in part by Beijing Natural Science Foundation (No. M22039) and National Key R&D Program of China (No. 2020YFB2103802). 12 REFERENCES [1] E. D. Sans, R. Gay, and D. Pointcheval, “Reading in the dark: Classifying encrypted digits with functional encryption.” IACR Cryptol. ePrint Arch. , p. 206, 2018. [2] R. Xu, J. B. Joshi, and C. Li, “Cryptonn: Training neural networks over encrypted data,” in ICDCS . IEEE, 2019, pp. 1199–1209. [3] R. Xu, N. Baracaldo, Y. Zhou, A. Anwar, and H. Ludwig, “Hy- bridalpha: An efficient approach for privacy-preserving federated learning,” in ACM AISec , 2019, pp. 13–23. [4] T. Ryffel, D. Pointcheval, F. Bach, E. Dufour-Sans, and R. Gay, “Partially encrypted deep learning using functional encryption,” inNeurIPS , 2019, pp. 4517–4528. [5] B. Laurie, A. Langley, and E. Kasper, “Certificate transparency,” IETF, Tech. Rep., 2013. [6] B. Laurie, “Certificate transparency,” Queue , vol. 12, no. 8, p. 10, 2014. [7] M. S. Melara, A. Blankstein, J. Bonneau, E. W. Felten, and M. J. Freedman, “Coniks: Bringing key transparency to end users.” in USENIX Security , 2015, pp. 383–398. [8] M. Chase and S. Meiklejohn, “Transparency overlays and applica- tions,” in ACM CCS , 2016, pp. 168–179. [9] J. Bonneau, “Ethiks: Using ethereum to audit a coniks key trans- parency log,” in IACR FC . Springer, 2016, pp. 95–105. [10] M. Chase, A. Deshpande, E. Ghosh, and H. Malvai, “Seemless: Secure end-to-end encrypted messaging with less trust,” in ACM CCS , 2019, pp. 1639–1656. [11] D. Basin, C. Cremers, T. H.-J. Kim, A. Perrig, R. Sasse, and P . Szalachowski, “Design, analysis, and implementation of arpki: an attack-resilient public-key infrastructure,” TDSC , vol. 15, no. 3, pp. 393–408, 2016. [12] J. Yu, M. Ryan, and C. Cremers, “Decim: Detecting endpoint compromise in messaging,” TIFS , vol. 13, no. 1, pp. 106–118, 2017. [13] D. Kumar, Z. Wang, M. Hyder, J. Dickinson, G. Beck, D. Adrian, J. Mason, Z. Durumeric, J. A. Halderman, and M. Bailey, “Tracking certificate misissuance in the wild,” in S&P . IEEE, 2018, pp. 785– 798. [14] Q. Scheitle, T. Chung, J. Hiller, O. Gasser, J. Naab, R. van Rijswijk- Deij, O. Hohlfeld, R. Holz, D. Choffnes, A. Mislove et al. , “A first look at certification authority authorization (caa),” SIGCOMM CCR , vol. 48, no. 2, pp. 10–23, 2018. [15] J. Chen, S. Yao, Q. Yuan, K. He, S. Ji, and R. Du, “Certchain: Public and efficient certificate audit based on blockchain for tls connections,” in INFOCOM . IEEE, 2018, pp. 2060–2068. [16] R. Xu and J. Joshi, “Trustworthy and transparent third party authority,” TOIT , 2020. [17] N. Gorasia, R. Srikanth, N. Doshi, and J. Rupareliya, “Improving security in multi authority attribute based encryption with fast decryption,” Procedia Computer Science , vol. 79, pp. 632–639, 2016. [18] S. Agrawal and M. Chase, “Fame: fast attribute-based message encryption,” in ACM CCS , 2017, pp. 665–682. [19] D. Boneh, A. Sahai, and B. Waters, “Functional encryption: Defini- tions and challenges,” in TCC . Springer, 2011, pp. 253–273. [20] M. Abdalla, D. Catalano, D. Fiore, R. Gay, and B. Ursu, “Multi- input functional encryption for inner products: function-hiding realizations and constructions without pairings,” in CRYPTO . Springer, 2018, pp. 597–627. [21] P . Ananth, A. Jain, Z. Jin, and G. Malavolta, “Multi-key fully- homomorphic encryption in the plain model,” in IACR TCC . Springer, 2020, pp. 28–57. [22] H. Chen, I. Chillotti, and Y. Song, “Multi-key homomorphic en- cryption from tfhe,” in Asiacrypt . Springer, 2019, pp. 446–472. [23] R. Xu, N. Baracaldo, Y. Zhou, A. Anwar, J. Joshi, and H. Ludwig, “Fedv: Privacy-preserving federated learning over vertically par- titioned data,” in ACM AISec , 2021, pp. 181–192. [24] R. Xu and J. Joshi, “Revisiting secure computation using functional encryption: Opportunities and research directions,” in IEEE TPS- ISA. IEEE, 2020, pp. 226–235. [25] V . Goyal, O. Pandey, A. Sahai, and B. Waters, “Attribute-based encryption for fine-grained access control of encrypted data,” in ACM CCS , 2006, pp. 89–98. [26] J. Bethencourt, A. Sahai, and B. Waters, “Ciphertext-policy attribute-based encryption,” in S&P . IEEE, 2007, pp. 321–334. [27] M. Bellare and S. Keelveedhi, “Interactive message-locked encryp- tion and secure deduplication,” in PKC . Springer, 2015, pp. 516– 538.[28] G. Wood et al. , “Ethereum: A secure decentralised generalised transaction ledger,” Ethereum project yellow paper , vol. 151, no. 2014, pp. 1–32, 2014. [29] C. Dong, Y. Wang, A. Aldweesh, P . McCorry, and A. van Moorsel, “Betrayal, distrust, and rationality: Smart counter-collusion con- tracts for verifiable cloud computing,” in ACM CCS , 2017, pp. 211–227. [30] M. J. Dworkin, “Sha-3 standard: Permutation-based hash and extendable-output functions,” Tech. Rep., 2015. [31] D. Johnson, A. Menezes, and S. Vanstone, “The elliptic curve digi- tal signature algorithm (ecdsa),” International journal of information security , vol. 1, no. 1, pp. 36–63, 2001. [32] M. Abdalla, F. Bourse, A. De Caro, and D. Pointcheval, “Sim- ple functional encryption schemes for inner products,” in PKC . Springer, 2015, pp. 733–751. [33] R. Xu, J. Joshi, and C. Li, “Nn-emd: Efficiently training neural networks using encrypted multi-sourced datasets,” IEEE TDSC , 2021. [34] S. R. Pokhrel and J. Choi, “Federated learning with blockchain for autonomous vehicles: Analysis and design challenges,” IEEE Transactions on Communications , vol. 68, no. 8, pp. 4734–4746, 2020. [35] Z. Wang, J. Lin, Q. Cai, Q. Wang, D. Zha, and J. Jing, “Blockchain- based certificate transparency and revocation transparency,” TDSC , 2020.
{ "id": "2102.01249" }
2307.14812
Impact of Black Swan Events on Ethereum Blockchain ERC20 Token Transaction Networks
The Ethereum blockchain and its ERC20 token standard have revolutionized the landscape of digital assets and decentralized applications. ERC20 tokens developed on the Ethereum blockchain have gained significant attention since their introduction. They are programmable and interoperable tokens, enabling various applications and token economies. Transaction graphs, representing the flow of the value between wallets within the Ethereum network, have played a crucial role in understanding the system's dynamics, such as token transfers and the behavior of traders. Here, we explore the evolution of daily transaction graphs of ERC20 token transactions, which sheds light on the trader's behavior during the Black Swan Events -- 2018 crypto crash and the COVID-19 pandemic. By using the tools from network science and differential geometry, we analyze 0.98 billion of ERC20 token transaction data from November 2015 to January 2023. Our analysis reveals that ERC20 financial ecosystem has evolved from a localized wealth formation period to a more mature financial ecosystem where wealth has dispersed among the traders in the network after the crypto crash and during the pandemic period. Before the crash, most sellers only sell the tokens, and buyers only buy the tokens. However, after the crash and during the pandemic period, sellers and buyers both performed buying and selling activities. In addition, we observe no significant negative impact of the COVID-19 pandemic on user behavior in the financial ecosystem.
http://arxiv.org/pdf/2307.14812v1
Moturi Pradeep, Uday Kumar Reddy Dyapa, Sarika Jalan, Priodyuti Pradhan
nlin.AO
nlin.AO
arXiv:2307.14812v1 [nlin.AO] 27 Jul 2023Impact of Black Swan Events on Ethereum Blockchain ERC20 Tok en Transaction Networks Moturi Pradeepa, Uday Kumar Reddy Dyapab, Sarika Jalanc, Priodyuti Pradhanb, aDepartment of Physics & Astrophysics, University of Delhi, India. bDepartment of Computer Science & Engineering, Indian Insti tute of Information Technology Raichur, Karnataka - 584135, India cComplex Systems Lab, Department of Physics, Indian Institu te of Technology Indore, Khandwa Road, Simrol, Indore-453552, India Abstract The Ethereum blockchain and its ERC20 token standard have revolu tionized the landscape of digital assets and decentralized applications. ERC20 tokens developed on the Ethereum blockchain have gained significant attention since their introduction. They are programma bleand interoperable tokens, enabling variousapplications and token economies. Transactiongraphs, re presentingthe flow ofthe value between wallets within the Ethereum network, have played a crucial role in und erstanding the system’s dynamics, such as token transfers and the behavior of traders. Here, we e xplore the evolution of daily transaction graphs of ERC20 token transactions, which sheds light on the trad er’s behavior during the Black Swan Events – 2018 crypto crash and the COVID-19 pandemic. By using t he tools from network science and differential geometry, we analyze 0 .98 billion of ERC20 token transaction data from November 2015 to January 2023. Our analysis reveals that ERC20 financial ecosyste m has evolved from a localized wealth formation period to a more mature financial ecosystem where wealt h has dispersed among the traders in the network after the crypto crash and during the pandemic per iod. Before the crash, most sellers only sell the tokens, and buyers only buy the tokens. However, af ter the crash and during the pandemic period, sellers and buyers both performed buying and selling activitie s. In addition, we observe no significant negative impact of the COVID-19 pandemic on user behav ior in the financial ecosystem. Keywords: Ethereum Blockchain, Financial Networks, Transaction gra ph, Forman-Ricci Curvature 1. Introduction The growing enthusiasm worldwide to understand the financial ecos ystem is largely due to several Black Swan events like the credit crisis of 1772, the great depressio n of 1929 −39, the OPEC oil price shock of 1973, the Asian crisis of 1997, and 2007 −2008 financial crisis [1, 2]. Modeling a financial system as a network has helped us to understand a wide range of ph enomena crucial for financial professionals, economists, and researchers [3]. Analysis of a finan cial network sheds light on underlying salient features which may not be evident without the holistic approa ch of network science [5], thereby providing a better understanding of how the traders interact with each other and how their interactions affect the whole system [6, 7]. However, it was not as much of a succe ss as thought it would be, as there exist constraints in modeling the underlying networks of tr aditional financial systems arising due to many reasons; for example, confidentiality issues where a fin ancial institution or bank may not fully provide all the transaction details due to the intellectual prope rty restrictions, and privacy rules. Consequently, various features of the traditional economy still n eed to be explored. We consider the Ethereum Blockchain transaction data to analyze the trader’s beh avior during the 2018 crypto crash and the COVID-19 pandemic [8, 9]. Ethereum blockchain may be modeled using networks as entities are c onnected through transactions of many assets [10, 11, 12]. Initially, transaction graphs within the E RC20 token financial ecosystem were relatively simple and characterizedby straightforwardtrans fers between token holders. However, as Email addresses: sarika@iiti.ac.in (Sarika Jalan), priodyutipradhan@gmail.com (Priodyuti Pradhan ) Preprint submitted to Journal of L ATEX Templates July 28, 2023 the financial ecosystem evolved, transaction graphs became incr easingly complex, reflecting the growth and diversification of token-related activities [13]. New patterns, in cluding token swaps [14], lending protocols [15], and decentralized exchanges [16], led to intricate and intertwined transaction graphs. Analyzing and understanding ERC20 transaction graphs has becom e crucial for researchers, developers, and regulators seeking to comprehend token movements, identify patterns, and assess network health. Tools and techniques, such as graph analysis algorithms and visualiza tion frameworks, have emerged to extract meaningful insights from transaction graphs, aiding in r isk assessment, fraud detection, and market analysis within the Ethereum Financial Ecosystem [17, 18, 19 , 20, 21]. A few existing works analyze the ERC20 transaction data and crypto crash [22]. Howeve r, the impact of critical events and the behavior of traders still needs to be discovered as the system is continuously evolving. This article studies the impact of the crypto crash and the COVID-1 9 pandemic on the trader’s behavior of the ERC20 token transactions. We use network metho ds to model and analyze the structural and dynamic behavior of the blockchain’s transaction graphs. To ex amine the financial ecosystem, we create daily transaction graphs from November 2015 to January 2 023. We investigate the evolution of traders’ behavior in the Ethereum blockchain. Our analysis unveils t hat before the crash, most sellers only sell the tokens, and buyers only buy the tokens. Few transac tions among the small traders lead to the localization of wealth among the individual traders. However, after the crash and during the pandemic, the seller sells the token, and buyers buy the token. But at the same time, the seller buys the tokens, and the buyer sells the token leading to the dispersal of th e wealth among the traders and making the ERC20 financial ecosystem more stable during the pandemic. In addition, we show no significant negative effect of the COVID-19 pandemic on user behavior in the fin ancial system. The article is organized as follows: Section 2 discusses preliminaries of the Ethereum Blockchain and ERC20 tokens. Section 3 illustrates the details of the extractio n and preprocessing of the ERC20 transaction data and the modeling of the daily transaction network . It also contains the notations and definitions used in the later discussions. Section 4 explains the result s and analysis. Finally, section 5 summarizes the current study and discusses the open problems fo r further investigation. 2. Preliminary Blockchain is an underlying technology on which the famous cryptocu rrency, BitCoin, was built; nowadays, blockchain applications are widespread, which cover sup ply chains, financial services, health- care, and public registers [23, 4, 24, 25]. The core components of b lockchain are transparency and trustlessness, through which transactions are validated and bro adcasted. In the blockchain financial ecosystem, a block comprises several transactions and is linked to its previous block via a digital link, thus forming a chain of blocks. 2.1. Ethereum Blockchain In the year 2015, Ethereum came into existence [8]. Ethereum allow s for the creation and direct peer-to-peer exchange of digital assets without intermediaries. Ethereum platform is a software built on blockchain technology that enables the creation of cryptocurren cy (Ether), crypto-assets (e.g., ERC20 tokens, ERC721 tokens [26]), and Decentralized Applications (DAp ps) [27]. The Ethereum blockchain is a digital ledger where Ether and crypto-assets can be securely s tored and exchanged. Ether is the backbone of the platform, which facilitates transactions and pays for the deployment of smart contracts on the Ethereum Blockchain. The primary focus of the platform is to use decentralized blockchain technology for smart contracts [25, 28]. The smart contract is a computer protocol used to creat e and develop DApps, and crypto assets. Smart contracts are conditional codes on the blockchain execute d when smart contract conditions are met. In other words, they are “ if ...then... ” statements written in the form of code and deployed on the blockchain. For example, a certificate contract in which the sma rt contractwill providethe certificate when the participants attend the required number of classes of a c ourse and score more than or equal to 60 marks in that course. The usage of smart contracts is very dive rse and includes digital identity, real estate [29], insurance, flash loans [15], gaming [30], and decentralized finance [15]. In the Ethereum Financial ecosystem, users interact with the Eth ereum network through their Ethereum account. With the help of accounts, users can transfe r assets, create or invoke smart con- tracts, and interact with DApps [8]. A user account consists of a 4 0-byte public address (like a bank account number) with the prefix “0 x” (e.g., 0 x52d3fbd8fc248c...25c37c5f5), which other users use to transfer assets. A transaction in the Ethereum platform can exe cute various things, such as transferring 2 Figure 1: Illustrate the ERC20 token transaction data over t he Ethereum blockchain and the associated transaction grap h. For simplicity, we assign a unique integer number correspon ding to the ‘from’, ‘to’, and ‘token Address’ columns. Here, ‘from’ is the seller’s, ‘to’ is the buyer’s wallet, and the ed ge label shows which tokens are traded. The edge thickness re pre- sents multiple transactions of the same tokens between buye r-seller. For instance, between node 5 and 7, two transactio ns of ‘token 4’. assets (ERC20 tokens), deploying smart contracts, and trigger ing the smart contract [8]. To deploy a smart contract, a person uses an Ethereum account and sends a transaction containing compiled code of the smart contract without the recipient of the transaction [31 ]. This article limits our discussion to the transactions related to the ERC20 tokens. 2.2. ERC20 Token Ethereum Blockchain platform provides a more accessible opportun ity for companies and individuals to develop blockchain products instead of building their own blockcha in platform [13]. The Ethereum Request for Comment 20 (ERC20) standard allows developers to cr eate smart contract-enabled tokens that can be used with other products and services, such as DApps on the Ethereum network, which started on Nov 2015 [32]. Sometimes we refer to tokens and coins as the same, but they are different in what they represent and their functions. In both cases, they a re digital assets, but the coin is a native asset of the platform, which facilitates operations on the pla tform, whereas tokens are built on the platform for the creation and flow of wealth. For instance, Eth er is the native coin of Ethereum, and Polygon MATIC [33] and USDT [34] are tokens built on the Ethereum pla tform. In the Ethereum Blockchain, the digitalization of the value of a partic ular asset into tradeable digital units is known as tokenization, and the digital assets are represen ted as tokens. Tokens allow a seamless, borderless, and almost free flow of value in the form of digital asset s across the globe. Once any product is tokenized, these tokens can be managed, detected, accounte d for, and leveraged in the context of incentives that may promote fair wealth. For example, XAUt (Tethe r Gold) is a token representing gold as a digital token on the Ethereum platform. One XAUt token equals 31.1035 grams of gold. Hence, XAUt tokens digitally represent the value associated with gold asset s so that they can be traded across the globe using the Ethereum Platform. The above example of the XA Ut token is an asset-backed token; there are various other types of tokens on the Ethereum platfor m with multiple functions and features [32]. The ERC20 token can be created by any individual or organizatio n that defines the rules governing them, such as monetary policy, token features, user incentive sy stems, etc. The current market cap of 3 Figure 2: Portray the evolution of Ethereum blockchain tran saction data as wallets (nodes), transactions (edges), and the number of unique traded tokens. Tokens are the attributes on the edges. We examine the daily transaction graph from November 2015 to January 2023. The shaded region reflects the testing period of ERC20 tokens. We observe a rapid increase in all three variables between July 2016 and July 20 18. After that, the number of nodes reaches stability, and edges gradually increase, showing the growing activity bet ween the nodes. Ethereum is approximately $229 .56B, and ERC20 tokens are approximately $112 .7B, around 49% of the total Ethereum blockchain [35]. A high market capitalization implies tha t the market highly values the asset, and our interest lies in studying the trader’s behavior involve d in ERC20 token transaction. 3. ERC20 Token Transaction Data and Network Modeling 3.1. Transaction Data sets To analyze the underlying network of ERC20 transactions in the Eth ereum Blockchain, we use the past 8 years of ERC20 transaction data [36]. We analyzed 982 ,119,361 ERC20 token transaction data from November 2015 to January 2023. The data set consists of 9 c olumns (Fig. 1); each column gives us specific information regarding the ERC20 transaction data and c an be summarized as follows. 1.blockNumber: block number in which the transaction information has been stored. 2.timeStamp: time in which the block was minted, and every transaction in a block has the same timestamp. 3.transactionHash: unique identifier that serves as proof of transaction validation. 4.tokenAddress: the hash value refers to the actual smart contract address of t he ERC20 token, which also acts as an identifier for an ERC20 token. 5.from:address of the sender of ERC20 token 6.to:address of the receiver of ERC20 token 7.fromisContract: if this field value is 1, it signifies the ‘from’ column is a smart contract ad dress otherwise an externally owned account address. 8.toisContract: if this field value is 1, it signifies the ‘to’ column is a smart contract addr ess otherwise an externally owned account address. 9.value:tells about the number of tokens transferred Each row provides information about an ERC20 token transaction in the data set. The ‘from’ and ‘to’ columns are the addresses between whom the transaction has tak en place (Fig. 1). For our analysis, we use four columns ‘timeStamp’, ‘tokenAddress’, ‘from’, and ‘to’. The ‘tim estamp’ column is in seconds, which we convert into ( YYYY−MM−DD) format. For instance, after transforming the timestamp in Fig. 1, 1455451585 becomes 2016 −02−14 where base time (1970 −01−01) is considered standard time 00 : 00 : 00 UTC [37]. The rest of the three columns’ data are in h ash value which is very difficult to analyze. For better viewing and analyzing the data, we iterated o ver the ‘from’ and ‘to’ columns and mapped every unique address with a unique integer number. The sam e iteration process is carried out for the ‘tokenAddress’ column. Finally, we divide the whole data set in day-wise. 4 Figure 3: Dynamic behavior of average degree ( /angbracketleftk/angbracketright), in-degree ( /angbracketleftkin/angbracketright), and out-degree ( /angbracketleftkout/angbracketright) of daily transaction graphs. The average degree of the transaction graph provides the ave rage number of transactions a wallet carries out in a day. The average in-degree (out-degree) is around 3. The fluctuation s in the inception period arise due to a large number of parall el edges (transactions) between a pair of nodes (wallets) duri ng the testing of the ERC20 token. 3.2. Transaction Network To model the ERC20 transaction data, we use the graph model [38]. In the Ethereum Financial Ecosystem, wallets are the nodes that buy or sell ERC20 tokens, a nd transactions between two wallets are the edges (links). For instance, let wallets Amake a transaction in which Asends 1 token to B, then the link will be directed from AtoB(A/squigglerightB). Further, if a wallet, Amakes 2 transactions with 2 other wallets ( BandC) in a day, then there will be two directed edges between the nodes a sA/squigglerightBand A/squigglerightC. Here, the node Ahas out-degree 2 and B,Cboth having in-degree 1. A node can have 10 edges with another node if it makes 10 transactions with the same node in a d ay with different tokens; then, there will be 10 parallel edges between them. Therefore, ERC20 to ken transaction graph is a multi-edges directed graph consisting of source and target nodes, where sou rce nodes are the wallets that sell the ERC20 tokens, and target nodes are the wallets that buy the ERC2 0 tokens. We can think of tokens as the attributes on the edges of the transaction graphs (Fig. 1). T he transaction graph for a given day t, represented as Gt(Vt,Et) where set of vertices ( Vt) consists of all wallets trading during that day as [17] Vt={v||walletsvbuy or sell any assets at day t} (1) and the set of edges Et⊆Vt×Vtis defined as: Et={(u,v)||walletusell to wallet vany asset at day t} (2) We denote the adjacency matrices corresponding to multi-edge dir ected graph GtasAt∈Rnt×ntand which can be defined as aij=lif there are ledges from itojand 0 otherwise. The out-degree of a node, ion daytcan be represented as kout i,t=/summationtextnt j=1aijand in-degree as kin i,t=/summationtextnt j=1aji. The average out-degree and in-degree of Gtcan be defined as /an}bracketle{tkout t/an}bracketri}ht=1 nt/summationtextnt i=1kout i,tand/an}bracketle{tkin t/an}bracketri}ht=1 nt/summationtextnt i=1kin i,t, respectively. Here, we consider number of wallets participated on d aytas|Vt|=nt, and number of transactions as |Et|=/summationtextnt i=1kout i,t=/summationtextnt i=1kin i,t=mt, thus/an}bracketle{tkout t/an}bracketri}ht=/an}bracketle{tkin t/an}bracketri}ht. Further, a node that sent the maximum number of transactions in a day as a max-out-degree n ode and represented as kout max,t= maxi∈Vtkout i,t. Similarly, a node that receives a maximum number of transactions in a day as max- in-degree and defined as kin max,t= max i∈Vtkin i,t. We can define sets containing all the nodes having out-degree equal to αasDout α,t={i∈Vt||kout i,t=α,α= 1,2,...,kout max,t}and in-degree equal to βas Din β,t={i∈Vt||kin i,t=β,β= 1,2,...,kin max,t}, whereNout α,t=|Dout α,t|andNin β,t=|Din β,t|, are the number of elements inside the sets [17]. Hence, sets containing all the nodes h aving out-degree and in-degree equal to 1 asDout 1,t={i∈Vt||kout i,t= 1}andDin 1,t={i∈Vt||kin i,t= 1}, whereNin 1,t=|Din 1,t|, andNout 1,t=|Dout 1,t|. From the economic perspective – kout max,tis a wallet that is a maximum selling hub, kin max,tis a wallet that is a maximum buying hub, Nout 1,tis the number of wallets which sell once and Nin 1,tis the number of wallets which buy once on a daily basis. Note that in the later discuss ion, we omit tfrom the above notations for convenience. 5 Figure 4: Represents the dynamics of the maximum selling hub (kout max), maximum buying hub ( kin max), number of wallets buying once ( Nin 1), and number of wallets selling once ( Nout 1). We observe that Nin 1has more steeper increase than Nout 1 until July 2018, after that Nin 1reaches its stability whereas there is gradual increase in Nout 1. After July 2020, we observe strong co-movement between Nin 1andNout 1. 4. Results and Discussion In January 2018, the Ether price reached its record high of $1431 , and by the middle of December 2018, the Ether price was down by 94% [39]. This period was marked as the 2018 Crypto Market Crash, where various other cryptocurrencies also hit record lows [40]. On the other hand, in March 2020, COVID-19 was declared a pandemic by the World Health Organization, resulting in severe societal and economic ramifications worldwide [41]. During these events, significan t changes occurred in the trading behavior of the Ethereum ERC20 Financial Ecosystem. To underst and, we analyze the behavior of the daily transaction graphs. 4.1. Dynamics of the System After the inception of Ethereum ERC20 tokens, the number of walle ts and transactions was lower; however,afterJuly2016,wecanseeanotableincreaseinthedeve lopmentofnodes, edges,andthevolume of tokens traded over time (Fig. 2). After July 2018, the everyda y number of wallets (nodes) involved in trading is approximately constant. Still, the number of daily transa ctions (edges) increases gradually, which infers the growing activity between the wallets of the Ethereu m ERC20 Financial Ecosystem. From the daily transaction graph, we can also predict that on avera ge, 105wallets perform around 105 transactions, and on average, 103distinct types of tokens traded (Fig. 2). Additionally, for the initial period, the average number of transact ions carried out by wallets per day is around 4 and gradually grows to around 6 after July 2020 (Fig. 3). However, if we separately look into the average out-degree and in-degree, it is close to 3. On the cont rary, Fig. 4 reveals that the max-out- degree (kout max) is very large as compared to the average out-degree ( /an}bracketle{tkout/an}bracketri}ht). Also, we can notice a large number of nodes having one out-degree ( Nout 1). Similar, behavior for the max-in-degrees ( kin max,/an}bracketle{tkin/an}bracketri}ht andNin 1). It infers degree distribution might be heavy-tailed where N1andkmaxare the extreme points of the degree distribution [17]. If we randomly pick a daily transaction graph, it shows a heavy-tailed degree distribution for both the out-degrees and in-degrees. Th e out-degree distribution is of the seller’s wallet, and the in-degree distribution is of the buyer’s wallet of the ER C20 token. The distribution clearly shows that the Ethereum ERC20 Financial Ecosystem follows heavy-tailed distribution for daily transaction graphs, which coincides with numerous previous works showing that the degree distribution of blockchain transaction data is heavy-tailed [13, 17]. To get insights on the buyers’ and sellers’ behavior before and aft er the crypto crash, we examine the dynamical behavior of the extreme points of degree distribution – m aximum selling hub ( kout max), number of wallets which sell once ( Nout 1), maximum buying hub ( kin max), and the number of wallets which buy once (Nin 1) daily (Fig. 4). We observe that until July 2018, all four variables gr ow substantially. But after that, the number of wallets buying once daily reached stability . In contrast, the number of wallets selling once is still gradually increasing but not substantially, and ther e is a decrease in the maximum selling and buying hub until July 2020 (Fig. 4). 6 Figure 5: Evolution of Tokens. Presents the dynamics of the a ddition of new ERC20 tokens to the network. For each day, we extract the count of new tokens added to the network. F or instance, on 7thJuly 2017, 25 new tokens are added, 8thJuly 2017, 40 new tokens are added to the network, and so on. We observe that until July 2018, there is an increase in the addition of new tokens to the network, but after that, t he count remains approximately constant until July 2020. There exists a volatile behavior of the token evolution duri ng the COVID-19 pandemic. The total number of unique tokens traded over the whole period is 301428. Furthermore, we calculate the ratios between the extreme points of the degree distribution for each day. In that case, we can observe significant changes in the netwo rk’s global dynamics during the 2018 crypto crash and the COVID-19 pandemic. We can define the ratio a s follows [17] Rin(Gt) =log(Nin 1,t) log(kin max,t),andRout(Gt) =log(Nout 1,t) log(kout max,t)(3) The ratios show the interplay between the buyers’ and sellers’ beh avior of the Ethereum ERC20 token transactions and provide insight into their evolution over time. We ca n observe high volatility in the dynamics of the ratios (Fig. 6). However, close observation of RinandRoutreveals a change in the dynamicalbehaviorofthe ratiosbeforeand afterthecryptocra sh, whichsuggestsachangein the trader’s trading behavior. The moving average of the ratios denoted as /an}bracketle{tRin/an}bracketri}htand/an}bracketle{tRout/an}bracketri}htcan prominently show the behavioralchangesofthe buyers and sellers. We remarkthat before July 2018, when buyers’activity Figure 6: Dynamical behavior of buyers and sellers ratios is represented as in-degree ratio ( Rin) and out-degree ratio (Rout), respectively. For each transaction graph, we calculate Rin,Routusing Eq. (3). To observe the evolution of the Financial Ecosystem’s dynamics, we calculate the moving av erage of RinandRout(/angbracketleftRin/angbracketrightand/angbracketleftRout/angbracketright) for each day. From July 2016 to July 2018, we observe an anti-phase oscillation between RinandRout. However, after July 2018, we see a change in the dynamics of RinandRoutwith co-movement between the two, which grows stronger afte r July 2020 (COVID-19 period). For a given day t,/angbracketleftRin/angbracketrightis calculated by taking the mean of window length p+t+sthat includes the Rinvalue of the day t,pis the number of Rinvalues preceding the day tandsis the number of Rinvalues succeeding the day t. The window length is truncated at the initial and final days w hen there are insufficient Rinvalues to fill the window. The mean value is taken over only the Rinthat fill the window. Here, we consider the window size to be 70 . For the initial days, the size of pis dynamically growing, and sis kept constant until pequals 34. For final days, the size of sis dynamically growing, and pis kept constant when the successive days are less than 35. Si milarly, we calculate the /angbracketleftRout/angbracketright values over time. 7 Figure 7: Buyer’s and seller’s behavior. Illustrate the rel ation between (a) largest seller ( kout max) vs. small buyers ( Nin 1) (b) largest buyer ( kin max) vs. small seller ( Nout 1), (c) small sellers vs. small buyers and (d) largest seller v s. largest buyer. The color bar corresponds to the date. We calculate the slope bet ween the entities for two different periods. The red line refe rs to the slope from July 2016 to July 2018, and the blue line refe rs to the slope from July 2018 to January 2023. We can observe a large slope value in the initial period for panels ( a-c) (kout maxvs.Nin 1,kin maxvs.Nout 1andNout 1vsNin 1) and a decrease in the later periods. However, from July 2018 to Jan uary 2023, we can observe a larger slope value between Nout 1 vsNin 1, andkout maxvskin maxas compared to other panels. (/an}bracketle{tRin/an}bracketri}ht) increasing, sellers’ activity ( /an}bracketle{tRout/an}bracketri}ht) decreasing and vice-versa (Fig. 6). We characterize this day- wise phenomenon in transaction graphs as anti-phased oscillations [1 7]. Notably, after July 2018, there was a co-movement of the buyers’ and sellers’ activity (Fig. 6). Th e daily transaction graph size is very largeand dynamic, so it is difficult to understand the internal behavio r. Therefore, we use the correlation measureandregressionanalysisamongthevariablesinEq. (3). Ant i-phaseoscillationof /an}bracketle{tRin/an}bracketri}htand/an}bracketle{tRout/an}bracketri}ht to each other in the initial period is resulted due to a strong correlat ion between entities in Eq. (3) – maximum selling hub ( kout max) vs. number of wallets buying once ( Nin 1), and maximum buying hub ( kin max) vs. the number of wallets selling once ( Nout 1) (Fig. 7(a-b)). Simultaneously, the correlation between the number of wallets selling once vs. the number of wallets buying once, a nd a weak correlation between the maximum buying hub and maximum selling hub (Fig. 7(c-d)). The slop es in the regression analysis also show that after July 2018, the value of the slope decreases (F ig. 7)(a-b). From the correlation and slope analysis, we might conclude that during the initial period, most o f the transactions of the small traders are with big traders, fewer among small traders, and simila rly, fewer transactions between big traders. However, after July 2018, both /an}bracketle{tRin/an}bracketri}htand/an}bracketle{tRout/an}bracketri}htshow co-movement to each other, which grows stronger over the period, especially after July 2020 (COVID-19 pe riod). We observe the co-movement of the ratios lead to a decrease in the correlations between the max imum selling hub and the number of wallets buying once (Fig.7(a)), as well as the maximum buying hub and t he number of wallets selling once (Fig. 7(b)). Simultaneously, there is an increase in the correla tion between the number of wallets selling and buying once and between maximum buying and selling hubs (Fig .7(c-d)). One can notice the decrement of the slopes during the co-movement for 2 relations an d an increase in other 2 relations. In other words, the increase in the trading activity among small trade rs and among the big traders, and at the same time, a decreasein the tradingactivity between big trader sand small traders hasresulted in the co-movement of the ratios. From the above analysis of trading act ivity before and after the crypto crash, there is an evolution in the trading behavior of the traders. Before the crash, small traders perform most 8 Figure 8: From an economic perspective, we get the Forman-Ri cci curvature ( R(e)) of a transaction ( e) between two wallets uandvto be (a) R(e) = 2 when the wallet ucan not buy any token and wallet vcan not sell any token; however, wallet ucan sell and wallet vcan buy tokens. (b) Similarly, R(e) = 1, we observe the same economic scenarios that we observe inR(e) = 2, with additionally, wallet ucan buy once or wallet vcan sell once. (c) In the case of edge with R(e) = 0, the wallet ucan buy at most twice, and wallet vcan not sell, or wallet ucannot buy, and wallet vcan sell at most twice. However, the wallet ucan sell, and the vcan buy tokens. (d) Edge will have R(e)<<0 when wallet ucan buy and wallet vcan sell tokens. In other words, R(e)<<0 when in-degree of uand the out-degree of vis high (Eq. (5)). The edges in pink color contribute to the Forman-Ricci curvature of the e dgee(red) under consideration. of the transactions with the big traders, but after the crash, sm all traders make most of the transactions among themselves. Also, there was an increase in trading activity am ong the big traders after the crash. Further from the dynamics of ratios, we observe a stronger co-m ovement during the pandemic period, which indicates the absence of a significant impact of COVID-19 on th e trading behavior of the traders in the Ethereum platform. However, volatility exists in the evolution o f the new ERC20 token inclusion to the platform during the COVID-19 period, whereas, after the c rypto crash, the dynamics remained constant until July 2020 (Fig. 5). Note that the key difference bet ween correlation and regression is that correlation measures the degree of a relationship between two inde pendent variables. In other words, the correlation between two variables captures how both variables are related. In contrast, regression is how one variable affects another. Both of the measures can not say wh ether variables are directly interacting with each other or not. 4.2. Forman-Ricci curvature analysis Now we use discrete Forman-Ricci curvature of networks introdu ced by R. Forman [42] to provide better insight into the trading behavior of the system. Forman-Ric ci curvature is an edge-based concept that measures how fast edges spread in different directions [42]. Im portantly, edges with negative curva- ture are vital in spreading information in a network. Previously, it ha s been used to characterizecomplex networks, which yield insights into their dynamical structure [43]. Sin ce our networks are directed, we use the Forman-Ricci curvature of directed networks. The curv ature of a directed edge eof weight ωe, u/squigglerightvis defined as follows: R(e) =ωe/parenleftBigg ωu ωe−/summationdisplay eu∼eωu√ωeωeu/parenrightBigg +ωe/parenleftBigg ωv ωe−/summationdisplay ev∼eωv√ωeωev/parenrightBigg (4) whereeu,evare the edges connected to node u,vandωeu,ωevare weights associated with the edges, 9 Figure 9: Forman-Ricci Curvature of buyers’ and sellers’ be havior. We calculate the Forman-Ricci curvature ( R(e)) of each edge (e) in a day using Eq. (5). We consider two snapshots of the R(e) vs. frequency plot from July 2016 to January 2023. (a) theR(e) vs. frequency plot for 12thJuly 2018 shows fewer spreads of the negative curvature valu es, where n= 336542, andE= 818739. On the other hand, (b) 12thJune 2021 plots large spreads the negative Forman-Ricci cur vature, where n= 254903, E= 943758. We represent the total number of edges mt=m+ t+m− t, where m+ tandm− tare the number of edges with positive and negative Ricci curvature on day tand after normalizing m+ t+m− t= 1. (c) the light blue line represents the fraction of negative Forman-Ricci curvatur e (m−) contribution from daily transaction graphs. The dark blue line represents the moving average value ( /angbracketleftm−/angbracketright). We observe that the fraction keeps increasing after July 2 018 and becomes stable during the COVID-19 pandemic. The moving ave rage window size is 70 and calculated as in Fig. 6. respectively. Here, we only consider those directed edges that te rminate at node uand originate at node v. Since edges are unweighted, the above expression (Eq. (4)) red uces to R(e) = 2−indeg(u)−outdeg(v) (5) whereuis the seller wallet, vis the buyer wallet and eis the transaction from utov. Here,R(e)≤2 as indeg( u)≥0 and outdeg( u)≥0. The curvature infers the structural properties of a network . Fig. 8 shows some examples of the respective curvature of edges and th e structure around them. The positive curvature of an edge einfers limited types of trading activity between seller and buyer (Fig. 8). For instance, if a seller wants to buy more than 2 times or a b uyer wants to sell more than 2 times, it can not be captured by the positive curvature (Fig. 8(a-c )). In other words, positive curvature refers to buyer-seller interaction with other traders in an isolated or restricted manner. There are few in- degree of the seller and fewer out-degree of the buyer, so wealth flows across the wallets in the network will be very slow and sometimes localized among peers (Fig. 8). On the o ther hand, the negative curvature of an edge R(e)<<0 refers to various trading activities carried out by the seller and bu yer. It infers that the seller and the buyer can buy and sell multiple times. Therefore, increasing negative curvature infers dispersion of wealth across the network. We calculate the fraction of edges (m−)contributing to the negative Ricci curvatures for the daily transaction network (Fig. 9). We observe an increase in the fract ion over time; it signifies an increase in the trading activity among the traders where simultaneously the s eller sells and buys the tokens (Fig. 9(c)). Similarly, buyers can also buy and sell the tokens. It shows t he evolution in the behavior of the traders, where before the COVID-19 pandemic, most of the s ellers only sold the tokens and buyers only bought the tokens, which resulted in a small percentage of edg e with negative Ricci curvature, thus resulting in large positive Ricci curvature, and wealth localizes among the buyers (Fig. 9(c)). However, 10 after the crypto crash and during the COVID-19 pandemic, sellers and buyers both performed buying and selling activity which led to an increase in the percentage of edges having negative Ricci curvature value. Notably, onecan observethat during both events, the num ber ofdailytransactionsremainsstable; only the trader’s behaviors change. 5. Conclusion In conclusion, the evolution of transaction graphs within the Ether eum blockchain’s ERC20 token financial ecosystem from simple token transfers to complex DeFi p rotocols [15] reflects on the growth, complexity, and innovation occurring in the tokenized economy. Und erstanding and harnessing the insights from transaction graphs will be pivotal in addressing scalab ility challenges, fostering regulatory compliance, and unlocking opportunities for decentralized finance a nd digital asset utilization. Using complex network analysis and differential geometry tools, we a nalyzed the dynamic evolution of transaction graphs in the ERC20 token financial ecosystem. We observed the evolution in the trading activity of the traders and the dynamics of ERC20 tokens in the fina ncial ecosystem. We focused here on two big events - the 2018 crypto crash and the COVID-19 pande mic. We started the investigation by analyzing the evolution of wallets, transactions, and tokens for th e period of November 2015 to January 2023. There existed a constant addition of new tokens to the finan cial ecosystem until the pandemic; however, after that, there were fluctuations. Our analysis of th e daily transaction graphs unveiled that before the crash, the trading activities of the traders led to the lo calization of wealth among individual traders. However, after the crash and during the pandemic, the change in trading activity by most traders led to the dispersal or continuous flow of wealth over the n etwork. Here though, we used the extreme points of the degree distributio n, incorporating other variables (Nout α,tandNin β,t) in the analysis can provide more insight into the system which require s further investi- gation. Moreover, we use 4 fields from the extracted data, and inc luding other data, fields can provide greater insights into the financial ecosystem’s underlying feature s. For instance, if we include the ‘value’ field, the transaction networks become weighted and can provide in sights into the flow of wealth in the financial ecosystem during the black swan events. Here, we examin ed the pairwise interactions of the transaction data, which cannot capture the higher-order intera ctions of the traders’ behavior [44]. We intend to pursue higher-order interactions, which will provide insigh ts into the existence and role of si- multaneous many-body interactions in the financial market. As fina ncial ecosystems continue to mature, further research and innovation in transaction graph analysis will b e essential to unlock the full potential of ERC20 tokens and drive the adoption of decentralized application s built on the Ethereum blockchain. 6. Acknowledgement MP is thankful to the Complex Systems Lab (IIT Indore) members f or the useful discussion. SJ acknowledges DST grant SPF/2021/000136. PP acknowledges SERB grant TAR/2022/000657. References [1] N. Nicholas, The black swan: the impact of the highly impr obable, Journal of the Management Training Institut 36, no. 3, 56 (2008). [2] P. Bondarenko, 5 of the World’s Most Devastating Financi al Crises, Encyclopedia Britannica, https://www.britannica.com/list/5-of-the-worlds-mos t-devastating-financial-crises [3] M. Bardoscia, P. Barucca, S. Battiston, F. Caccioli, G. C imini, D. Garlaschelli, F. Saracco, T. Squartini, G. Caldar elli. The physics of financial networks. Nat. Rev. Phys. 3, no. 7, 49 0-507 (2021). [4] K. Patil, D. Ojha, E. M. Struckell, P. C. Patel. Behaviora l drivers of blockchain assimilation in supply chains–A soc ial network theory perspective. Technological Forecasting an d Social Change 192, 122578 (2023). [5] Caldarelli, G., Battiston, S., Garlaschelli, D., Catan zaro, M. Emergence of Complexity in Financial Networks. In: Ben- Naim, E., Frauenfelder, H., Toroczkai, Z. (eds) Complex Net works. Lecture Notes in Physics, vol 650. Springer, Berlin, Heidelberg, (2004). [6] N. Paltalidis, D. Gounopoulos, R. Kizys, Y. Koutelidaki s, Transmission channels of systemic risk and contagion in t he European financial network, Journal of Banking & Finance, Vo lume 61, Supplement 1, Pages S36-S52, (2015). [7] G. Prasanna, K. Sujit, Contagion in financial networksPr oc. R. Soc. A.4662401–2423, (2010). [8] V. Buterin, A next-generation smart contract and decent ralized application platform, white paper 3, no. 37, 2-1 (20 14). [9] A. Day, E. Medvedev, Ethereum in BigQuery: a Public Datas et for smart contract analytics, 2018. [10] L. Zhao, S. S. Gupta, A. Khan, and R. Luo, Temporal analys is of the entire Ethereum blockchain network, In Proceedings of the Web Conference 2021, pp. 2258-2269, 2021 . 11 [11] S. Somin, G. Gordon, and Y. Altshuler.Network analysis of ERC20 tokens trading on ethereum blockchain. In Unifying Themes in Complex Systems IX: Proceedings of the Ninth Inter national Conference on Complex Systems 9, pp. 439-450. Springer International Publishing, 2018. [12] X. L. Tong, A. Khan, S. S. Gupta, Y. H. Ong, and X. Liu. Meas urements, analyses, and insights on the entire ethereum blockchain network. In Proceedings of The Web Conference 20 20, pp. 155-166. 2020. [13] Victor, Friedhelm, and B. K. L¨ uders, Measuring Ethere um-based erc20 token networks, In Financial Cryptography and Data Security: 23rd International Conference, pp. 113- 129. Springer International Publishing, 2019. [14] Y. C. Lo, F. Medda, Uniswap and the Emergence of the Decen tralized Exchange, Journal of Financial Market Infras- tructures 10, no. 2, 1-25 (2021). [15] D. A. Zetzsche, D. W. Arner, R. P. Buckley, Decentralize d Finance (DeFi), Journal of Financial Regulation,6, 172–203,(2020). [16] S. Malamud, M. Rostek, Decentralized Exchange, Americ an Economic Review, 107 (11): 3320-62, (2017) [17] S. Somin, Y. Altshuler, G. Gordon, A. S. Pentland, and E. Shmueli. Network dynamics of a financial ecosystem. Scientific Reports 10, no. 1, 4587, (2020). [18] Y. Li, U. Islambekov, C. Akcora, E. Smirnova, Y. R. Gel, M . Kantarcioglu. Dissecting Ethereum blockchain analytics : What we learn from topology and geometry of the Ethereum grap h? In Proceedings of the 2020 SIAM international conference on data mining, pp. 523-531. Society for Industr ial and Applied Mathematics, 2020. [19] J. Liang, L. Li, D. Zang, Evolutionary dynamics of crypt ocurrency transaction networks: An empirical study, (2018 ) [20] Wang, J., Chen, P., Yu, S., Xuan, Q. TSGN: Transaction Su bgraph Networks for Identifying Ethereum Phishing Accounts. In: Dai, HN., Liu, X., Luo, D.X., Xiao, J., Chen, X. (eds) Blockchain and Trustworthy Systems. BlockSys 2021. Communications in Computer and Information Science, vol 1490. Springer, (2021). [21] S.Ferretti, G D’Angelo. On the Ethereum blockchain str ucture: A complex networks theory perspective, Special Iss ue on Cryptocurrencies and Blockchain for Distributed System s, Volume 32, Issue 12, (2019). [22] V. N. Soloviev, A. Belinskiy, Complex systems theory an d crashes of the cryptocurrency market, In Information and Communication Technologies in Education, Research, and In dustrial Applications: 14th International Conference, pp . 276-297, (2019). [23] D. Yaga, P. Mell, N. Roby, K. Scarfone, Blockchain Techn ology Overview, (2019). [24] J. Y. Huumo, D. Ko, S. Choi, S. Park, K. Smolander, Where i s current research on blockchain technology? - A systematic review, PloS one 11, no. 10, e0163477 (2016). [25] P. Dutta, , T. M. Choi, S. Somani, R. Butala, Blockchain t echnology in supply chain operations: Applications, challenges, and research opportunities, Transportation r esearch part E: Logistics and Transportation review 142, 10 2067 (2020). [26] F. Valeonti, A. Bikakis, M. Terras, C Speed, A. H. Smith, K. Chalkias, Crypto Collectibles, Museum Funding and OpenGLAM: Challenges, Opportunities and the Potential of N on-Fungible Tokens (NFTs). Appl. Sci. 2021, 11, 9931. [27] R. Ta¸ s, ¨O.¨O. Tanri ¨Over, Building A Decentralized Application on the Ethereum Blockchain, 2019 3rd International Symposium on Multidisciplinary Studies and Innovative Tec hnologies (ISMSIT), Ankara, Turkey, 2019, pp. 1-4, [28] K. Christidis and M. Devetsikiotis, Blockchains and Sm art Contracts for the Internet of Things, in IEEE Access, vol . 4, pp. 2292-2303, (2016). [29] A. Gupta, J. Rathod, D. Patel, J. Bothra, S. Shanbhag, T. Bhalerao, Tokenization of real estate using blockchain technology, In Applied Cryptography and Network Security W orkshops: ACNS 2020 Satellite Workshops, Proceedings 18, pp. 77-90. Springer International Publishing, (2020). [30] K. Iyer, C. Dannen, Building Games with Ethereum Smart C ontracts. New York: Apress, 2018. [31] D. Mohanty, Deploying Smart Contracts. In: Ethereum fo r Architects and Developers. Apress, Berkeley, CA, (2018). [32] O. Luis, Z. Liudmila, B. Ingrid, S. Gerhard, To Token or n ot to Token: Tools for Understanding Blockchain Tokens. In: International Conference of Information Systems (ICIS 2018). [33] J. Kanani, S. Nailwal, A. Arjun, Matic whitepaper, Poly gon, Bengaluru, India, Tech. Rep., (2021). [34] S. Aggarwal, N. Kumar, Cryptocurrencies., In Advances in Computers, vol. 121, pp. 227-266, Elsevier, (2021). [35] Ethereum Market Cap, collected on Jul 11 2023 https://ycharts.com/indicators/ethereum_market_cap [36] P. Zheng, Z. Zheng, J. Wu, H. N. Dai, Xblock-eth: Extract ing and exploring blockchain data from ethereum. IEEE Open Journal of the Computer Society, 1, 95-106, (2020). http://xblock.pro/xblock-eth.html [37] Unix time, https://en.wikipedia.org/wiki/Unix_time . [38] S. H. Strogatz, Exploring complex networks. Nature 410 , no. 6825 (2001): 268-276. [39] O. Godbole, Ether Price Now Down 94% from January’s Reco rd High, coindesk (2018). https://www.coindesk.com/markets/2018/12/07/ether-p rice-now-down-94-from-januarys-record-high/ [40] N. Kyriazis, S. Papadamou, S. Corbet, A systematic revi ew of the bubble dynamics of cryptocurrency prices, Researc h in International Business and Finance 54: 101254, (2020). [41] S.Barua, Understanding Coronanomics: The Economic Im plications ofthe Coronavirus(COVID-19)Pandemic (2020). [42] E. Saucan, A. Samal, M. Weber, J. Jost, Discrete curvatu res and network analysis, MATCH Commun. Math. Comput. Chem.80, 605-622, (2018). [43] M. Weber, E. Saucan, J. Jost, Characterizing complex ne tworks with Forman-Ricci curvature and associated geometr ic flows. Journal of Complex Networks 5, no. 4: 527-550, (2017). [44] F. Battiston, E. Amico, A. Barrat, G. Bianconi et al. The physics of higher-order interactions in complex systems. Nature Physics 17, no. 10 (2021): 1093-1098. 12
{ "id": "2307.14812" }
1703.04057
BLOCKBENCH: A Framework for Analyzing Private Blockchains
Blockchain technologies are taking the world by storm. Public blockchains, such as Bitcoin and Ethereum, enable secure peer-to-peer applications like crypto-currency or smart contracts. Their security and performance are well studied. This paper concerns recent private blockchain systems designed with stronger security (trust) assumption and performance requirement. These systems target and aim to disrupt applications which have so far been implemented on top of database systems, for example banking, finance applications. Multiple platforms for private blockchains are being actively developed and fine tuned. However, there is a clear lack of a systematic framework with which different systems can be analyzed and compared against each other. Such a framework can be used to assess blockchains' viability as another distributed data processing platform, while helping developers to identify bottlenecks and accordingly improve their platforms. In this paper, we first describe BlockBench, the first evaluation framework for analyzing private blockchains. It serves as a fair means of comparison for different platforms and enables deeper understanding of different system design choices. Any private blockchain can be integrated to BlockBench via simple APIs and benchmarked against workloads that are based on real and synthetic smart contracts. BlockBench measures overall and component-wise performance in terms of throughput, latency, scalability and fault-tolerance. Next, we use BlockBench to conduct comprehensive evaluation of three major private blockchains: Ethereum, Parity and Hyperledger Fabric. The results demonstrate that these systems are still far from displacing current database systems in traditional data processing workloads. Furthermore, there are gaps in performance among the three systems which are attributed to the design choices at different layers of the software stack.
http://arxiv.org/pdf/1703.04057v1
Tien Tuan Anh Dinh, Ji Wang, Gang Chen, Rui Liu, Beng Chin Ooi, Kian-Lee Tan
cs.DB, cs.CR, cs.DC
cs.DB
BLOCKBENCH: A Framework for Analyzing Private Blockchains Tien Tuan Anh DinhzJi WangzGang ChenxRui LiuzBeng Chin OoizKian-Lee Tanz zNational University of SingaporexZhejiang University z{dinhtta, wangji, liur, ooibc, tankl}@comp.nus.edu.sgxcg@zju.edu.cn ABSTRACT Blockchain technologies are taking the world by storm. Pub- lic blockchains, such as Bitcoin and Ethereum, enable secure peer-to-peer applications like crypto-currency or smart con- tracts. Their security and performance are well studied. This paper concerns recent private blockchain systems de- signed with stronger security (trust) assumption and perfor- mance requirement. These systems target and aim to dis- rupt applications which have so far been implemented on top of database systems, for example banking, nance and trad- ing applications. Multiple platforms for private blockchains are being actively developed and ne tuned. However, there is a clear lack of a systematic framework with which di erent systems can be analyzed and compared against each other. Such a framework can be used to assess blockchains' viabil- ity as another distributed data processing platform, while helping developers to identify bottlenecks and accordingly improve their platforms. In this paper, we rst describe Blockbench , the rst evaluation framework for analyzing private blockchains. It serves as a fair means of comparison for di erent platforms and enables deeper understanding of di erent system de- sign choices. Any private blockchain can be integrated to Blockbench via simple APIs and benchmarked against workloads that are based on real and synthetic smart con- tracts. Blockbench measures overall and component-wise performance in terms of throughput, latency, scalability and fault-tolerance. Next, we use Blockbench to conduct com- prehensive evaluation of three major private blockchains: Ethereum, Parity and Hyperledger Fabric. The results demon- strate that these systems are still far from displacing current database systems in traditional data processing workloads. Furthermore, there are gaps in performance among the three systems which are attributed to the design choices at di er- ent layers of the blockchain's software stack. 1. INTRODUCTION Blockchain technologies are gaining massive momentum in the last few years, largely due to the success of Bitcoin crypto-currency [41]. A blockchain, also called distributed ledger, is essentially an append-only data structure main- tained by a set of nodes which do not fully trust each other. All nodes in a blockchain network agree on an ordered set of blocks, each containing multiple transactions, thus the blockchain can be viewed as a log of ordered transactions. In a database context, blockchain can be viewed as a solu- tion to the distributed transaction management problems: nodes keep replicas of the data and agree on an executionorder of transactions. However, traditional database sys- tems work in a trusted environment and employ well known concurrency control techniques [36, 48, 8] to order transac- tions. Blockchain's key advantage is that it does not assume nodes trust each other and therefore is designed to achieve Byzantine fault tolerance. In the original design, Bitcoin's blockchain stores coins as the system states shared by all participants. For this simple application, Bitcoin nodes implement a simple repli- cated state machine model which simply moves coins from one address to another. Since then, blockchain has grown rapidly to support user-de ned states and Turing complete state machine models. Ethereum [2] is a well-known ex- ample which enables any decentralized, replicated applica- tions known as smart contracts . More importantly, interest from the industry has started to drive development of new blockchain platforms that are designed for private settings in which participants are authenticated. Blockchain systems in such environments are called private (or permissioned ), as opposed to the early systems operating in public (or permis- sionless ) environments where anyone can join and leave. Ap- plications for security trading and settlement [44], asset and nance management [39, 40], banking and insurance [29] are being built and evaluated. These applications are currently supported by enterprise-grade database systems like Oracle and MySQL, but blockchain has the potential to disrupt this status quo because it incurs lower infrastructure and human costs [29]. In particular, blockchain's immutability and transparency help reduce human errors and the need for manual intervention due to con icting data. Blockchain can help streamline business processes by removing dupli- cate e orts in data governance. Goldman Sachs estimated 6 billion saving in current capital market [29], and J.P. Mor- gan forecast that blockchains will start to replace currently redundant infrastructure by 2020 [40]. Given this trend in employing blockchain in settings where database technologies have established dominance, one ques- tion to ask is to what extent can blockchain handle data processing workload. Another question is which platform to choose from many that are available today, because even though blockchain is an open protocol, di erent platforms exist in silo. In this work, we develop a benchmarking framework called Blockbench to address both questions. Blockbench is the rst benchmark for studying and com- paring performance of permissioned blockchains. Although nodes in a permissioned blockchain still do not trust each other, their identities are authenticated, which allows the system to use more ecient protocols for tolerating Byzan-arXiv:1703.04057v1 [cs.DB] 12 Mar 2017 tine failure than in public settings. We do not focus on public blockchains because their performance (and trade- o s against security guarantee) is relatively well studied [27, 38, 15, 9]. Our framework is not only useful for application developers to assess blockchain's potentials in meeting the application need, but also o ers insights for platform devel- opers: helping them to identify and improve on the perfor- mance bottlenecks. We face three challenges in developing Blockbench . First, a blockchain system comprises many parts and we observe that a wide variety of design choices are made among di er- ent platforms at almost every single detail. In Blockbench , we divide the blockchain architecture into three modular lay- ers and focus our study on them: the consensus layer, data model and execution layer. Second, there are many di er- ent choices of platforms, but not all of them have reached a mature design, implementation and an established user base. For this, we start by designing Blockbench based on three most mature platforms within our consideration, namely Ethereum [2], Parity [22] and Hyperledger [31], and then generalize to support future platforms. All three plat- forms support smart contracts and can be deployed in a private environment. Third, there is lack of a database- oriented workloads for blockchain. Although the real Eth- ereum transactions and contracts can be found on the pub- lic blockchain, it is unclear if such workload is suciently representative to assess blockchain's general data processing capabilities. To address this challenge, we treat blockchain as a key-value storage coupled with an engine which can realize both transactional and analytical functionality via smart contracts. We then design and run both transaction and analytics workloads based on real and synthetic data. Blockbench is a exible and extensible framework that provides a number of workloads, and comes with Ethereum, Parity and Hyperledger as backends. Workloads are transaction- oriented currently and designed to macro-benchmark and micro-benchmark blockchain for supporting database-like ap- plications. Speci cally, the current macro-benchmark in- cludes a key-value (YCSB), an OLTP (Smallbank) workload and a number of real Ethereum smart contract workloads. For each of the consensus, data and execution layer, there is at least a micro-benchmark workload to measure its per- formance in isolation. For example, for the execution layer, Blockbench provides two workloads that stress test the smart contract I/O and computation speed. New workloads and blockchains can be easily integrated via a simple set of APIs. Blockbench quanti es the performance of a back- end system in several dimensions: throughput, latency, scal- ability and fault tolerance. It supports security evaluation by simulating network-level attacks. Using Blockbench , we conduct an in-depth comparison of the three blockchain systems on two macro benchmark and four micro bench- mark workloads. The results show that blockchain systems' performance is limited, far below what is expected of a state- of-the-art database system (such as H-Store). Hyperledger consistently outperforms the other two systems across seven benchmarks. But it fails to scale beyond 16 nodes. Our evaluation shows that the consensus protocols account for the performance gap at the application layer for Ethereum and Hyperledger. We also identify a processing bottleneck in Parity. Finally, our evaluation also reveals bottlenecks in the execution and data layer of Ethereum and Parity. In summary, our contributions are:We present the rst benchmark for understanding and comparing the performance of permissioned blockchain systems. We conduct a comprehensive evaluation of Ethereum, Parity and Hyperledger. Our empirical results present concrete evidence of blockchain's limitations in han- dling data processing workloads, and reveal bottle- necks in the three systems. The results serve as a baseline for further development of blockchain tech- nologies. In the next section, we discuss blockchain systems in more detail. Section 3 describes Blockbench design and imple- mentation. Section 4 presents our comparative performance studies of three systems. We discuss lessons learned from the results in Section 5 and related work in Section 6, and we conclude in Section 7. 2. PRIVATE BLOCKCHAINS A typical blockchain system consists of multiple nodes which do not fully trust each other. Some nodes exhibit Byzantine behavior, but the majority is honest. Together, the nodes maintain a set of shared, global states and perform transactions modifying the states. Blockchain is a special data structure which maintains the states and the historical transactions. All nodes in the system agree on the transac- tions and their order as stored on the blockchain. Because of this, blockchain is often referred to as a distributed ledger. Blockchain transactions. A transaction in a blockchain is the same as in traditional database: a sequence of opera- tions applied on some states. As such, a blockchain transac- tion requires the same ACID semantics. The key di erence is the failure model under consideration. Current transac- tional, distributed databases [46, 14] employ classic concur- rency control techniques such as two-phase commit to ensure ACID. They can achieve high performance, because of the simple failure model, i.e. crash failure. In contrast, the original blockchain design considers a much hostile environ- ment in which nodes are Byzantine and they are free to join and leave. Under this model, the overhead of concurrency control is much higher [11]. Bitcoin. In Bitcoin [41], the states are digital coins (crypto- currency) available in the network. A Bitcoin transaction moves coins from one set of addresses to another set of ad- dresses. Each node broadcasts a set of transactions it wants to perform. Special nodes called miners collect transactions into blocks, check for their validity, and start a consensus protocol to append the blocks onto the blockchain. Figure 1 shows the blockchain data structure, in which each block is linked to its predecessor via a cryptographic pointer, all the way back to the rst (genesis) block. Bitcoin uses proof-of- work (PoW) for consensus: only a miner which has success- fully solved a computationally hard puzzle ( nding the right nonce for the block header) can append to the blockchain. PoW is tolerant of Byzantine failure, but it is probabilistic in nature: it is possible that two blocks are appended at the same time, creating a fork in the blockchain. Bitcoin resolves this by only considering a block as con rmed after it is followed by a number of blocks (typically six blocks). This probabilistic guarantee causes both security and per- formance issues: attacks have been demonstrated by an ad- versary controlling only 25% of the nodes [26], and Bitcoin Smart contractBlock header Transaction roothashContract roothash Code State storageinput, outputSmart contractBlock header Transaction roothashContract roothash Code State storageinput, outputblock t block t+1 StorageCPUNetworkHardwareBlockchain Application ......Crypto-currencyCrypto-currency Asset managementAsset managementSecurities settlementSecurities settlement... Figure 1: Blockchain software stack on a fully validating node. A non-validating node stores only the block head- ers. Di erent blockchain platforms o er di erent interface between the blockchain and application layer. transaction throughput remains very low (7 transactions per second [15]). Ethereum. Due to simple transaction semantics, Bitcoin nodes execute a very simple state machine pre-built into the protocol. Ethereum [2] extends Bitcoin to support user- de ned and Turing complete state machines. In particular, Ethereum blockchain lets the user de ne any complex com- putations in the form of smart contracts. Once deployed, the smart contract is executed on all Ethereum nodes as a replicated state machine. Beside the shared states of the blockchains (crypto-currency, for example), each smart con- tract has access to its own states. Figure 1 shows the soft- ware stack in a typical Ethereum node: a fully validating node contains the entire history of the blockchain, whereas a non-validating node stores only the block headers. One key di erence with Bitcoin is that smart contract states are maintained as well as normal transactions. In fact, a smart contract is identi ed by a unique address which has its own money balance (in Ether), and upon retrieving a transaction to its address, it executes the contract's logics. Ethereum comes with an execution engine, called Ethereum Virtual Machine (EVM), to execute smart contracts. Figure 2 shows a snippet of popular contract running on Ethereum, which implements a pyramid scheme: users send money to this contract which is used to pay interests to early participants. This contract has its own states, namely the list of partici- pants, and exports a function called enter . A user invokes this contract by sending his money through a transaction, which is accessed by the smart contract as msg.sender and msg.amount . Private blockchain. Ethereum uses the same consensus protocol as Bitcoin does, though with di erent parameters. In fact, 90% of public blockchain systems employ variants of the proof-of-work protocol. PoW is non-deterministic and computationally expensive, both rendering it unsuitable for applications such as banking and nance which must han- dle a lot of transactions in a deterministic manner. Recent blockchain systems, e.g., Hyperledger, consider restrictedcontract Doubler{ struct Partitipant { address etherAddress; uint amount; } Partitipant[] public participants; unit public balance = 0; ... function enter(){ ... balance+= msg.value; ... if (balance > 2*participants[payoutIdx].amount){ transactionAmount = ... participants[payoutIdx]. etherAddress.send(transactionAmount); ... } } ... } Figure 2: An example of smart contract, written in Solidity language, for a pyramid scheme on Ethereum. ConsensusData ModelExecution EngineApplication PoW, PoS, PBFT, etc.Blocks Transactions, Indexing, etc.Compilers, VM, Dockers, etc.ContractsYCSB, Smallbank, etc. CPU-Heavy Analytics, IO-Heavy CommitsBLOCKBENCH workloadsBlockchain layers Figure 3: Abstraction layers in blockchain, and the corre- sponding workloads in Blockbench . settings wherein nodes are authenticated. Although PoW is still useful in such permissioned environments, as in the case of Ethereum, there are more ecient and determinis- tic solutions where node identities are known. Distributed fault-tolerant consensus in such a closed settings is a well studied topic in distributed systems. Zab [33], Raft [42], Paxos [35], PBFT [11] are popular protocols that are in ac- tive use today. Recent permissioned blockchains either use existing PBFT, as in Hyperledger [31], or develop their own variants, as in Parity [22], Ripple [44] and ErisDB [5]. Most of these systems support smart contracts, though in di erent languages, with di erent APIs and execution engines (see a more comprehensive comparison in the Appendix). As a result, permissioned blockchains can execute complex appli- cation more eciently than PoW-based blockchains, while being Byzantine fault tolerant. These properties and the commercial interests from major banking and nancial insti- tutions have bestowed on private blockchains the potentials to disrupt the current practice in data management. 3.Blockbench DESIGN This section discusses blockchain's common layers of ab- stractions and the benchmarking workloads. 3.1 Blockchain Layers There are many choices of blockchains: over 200 Bitcoin variants, Ethereum and other permissioned blockchains. To meaningfully compare them, we identify four abstraction layers found in all of these systems (Figure 3) and design our workloads to target these layers. The consensus layer contains protocols via which a block is considered appended to the blockchain. The data layer contains the structure, content and operations on the blockchain data. The execu- tion layer includes details of the runtime environment sup- port blockchain operations. Finally, the application layer includes classes of blockchain applications. In a related work, Croman et. al. [15] proposed to divide blockchain into several planes: network, consensus, storage, view and side plane. While similar to our four layers, the plane abstrac- tions were geared towards crypto-currency applications and did not take into account the execution of smart contracts. Our layers model more accurately the real implementations of private blockchains. We now discuss these layers in turn. 3.1.1 Consensus The role of the consensus layer is to get all nodes in the system to agree on the blockchain content. That is, if a node appends (or commits) a block, the other nodes also append the same block to their copy of the blockchain. Protocols for reaching consensus in the crash-failure model play a key role in distributed databases, wherein nodes agree on a global transaction order. Blockchain systems, on the other hand, employ a spectrum of Byzantine fault-tolerant protocols [49]. At one extreme, Ethereum, like Bitcoin, uses proof-of- work whose diculty is agreed upon and adjusted gradually to achieve a rate of (currently) one block per 14 s(Bitcoin's diculty achieves a rate of one block per 10 m). In essence, proof-of-work selects at each round a random node which can append a block, where the probability of being selected is determined by the node's total computing power. This simple scheme works against Sybil attack [20] - a common attack in open, decentralized environments in which the ad- versary can acquire multiple identities. However, it con- sumes a lot of energy and computing power, as nodes spend their CPU cycles solving puzzles instead of doing otherwise useful works. Worse still, it does not guarantee safety: two nodes may both be selected to append to the blockchain, and both blocks can be accepted. This causes fork in the block- chain, and most PoW-based systems add additional rules, for example, only blocks on the longest chain are considered accepted. Ethereum, in particular, adopts a PoW variant called GHOST [45] which accepts blocks in heavy branches. In any case, a block can be con rmed as part of the block- chain only with some high probability. At the other extreme, Hyperledger uses the classic PBFT protocol, which is communication bound: O(N2) where N is the number of nodes. PBFT can tolerate fewer thanN 3 failures, and works in three phases in which nodes broadcast messages to each other. First, the pre-prepare phase selects a leader which chooses a value to commit. Next, the prepare phase broadcasts the value to be validated. Finally, the com- mitphase waits for more than two third of the nodes to con- rm before announcing that the value is committed. PBFT has been shown to achieve liveness and safety properties in a partially asynchronous model [11], thus, unlike PoW, once the block is appended it is con rmed immediately. It can tolerate more failures than PoW (which is shown to be vul-nerable to 25% attacks [26]). However, PBFT assumes that node identities are known, therefore it can only work in the permissioned settings. Additionally, the protocol is unlikely to be able to scale to the network size of Ethereum, because of its communication overhead. In between, there are various hybrid designs that combine both scalability of PoW and safety property of PBFT [43]. For example, Bitcoin-NG [25] decouples consensus from trans- action validation by using PoW for leader election who can then append more than one block at a time. Similarly, Byz- coin [34] and Elastico [37] leverage PoW to determine ran- dom, smaller consensus groups which run PBFT. Another example is the Tendermint protocol, adopted by ErisDB [5], which combines proof-of-stake (PoS) and PBFT. Unlike PoW, PoS selects a node which can append a block by its invest- ment (or stake) in the system, therefore avoid expending CPU resources. Parity [22] implements a simpli ed version of PoS called Proof of Authority (or PoA). In this protocol, a set of authorities are pre-determined and each authority is assigned a xed time slot within which it can generate blocks. PoA makes a strong assumption that the author- ities are trusted, and therefore is only suitable for private deployment. 3.1.2 Data model In Bitcoin, transactions are rst class citizens: they are system states representing digital coins in the network. Pri- vate blockchains depart from this model, by focusing on accounts . One immediate bene t is simplicity, especially for applications involving crypto-currencies. For instance, transferring money from one user to another in Bitcoin in- volves searching for transactions belonging to the sender, then marking some of them as spent, whereas it is easily done in Ethereum by updating two accounts in one trans- action. An account in Ethereum has a balance as its state, and is updated upon receiving a transaction. A special type of account, called smart contract , contains executable code and private states (Figure 1). When receiving a transaction, in addition to updating its balance, the contract's code is in- voked with arguments speci ed in the transaction. The code can read the states of other non-contract accounts, and it can send new transactions during execution. Parity adopts the same data model as in Ethereum. In Hyperledger, there is only one type of account called chaincode which is the same as Ethereum's contract. Chaincode can only access its private storage and they are isolated from each other. A block contains a list of transactions, and a list of smart contracts executed as well as their latest states. Each block is identi ed by the cryptographic hash of its content, and linked to the previous block's identity. In Parity, the entire block content is kept in memory. In Ethereum and Hy- perledger, the content is organized in a two layered data structure. The states are stored in a disk-based key-value storage (LevelDB[4] in Ethereum and RocksDB[6] in Hyper- ledger), and organized in a hash tree whose root is included in the block header. Ethereum caches the states in memory, while Hyperledger outsources its data management entirely to the storage engine. Only states a ected by the block's transactions are recorded in the root hash. The hash tree for transaction list is a classic Merkle tree, as the list is not large. On the other hand, di erent Merkle tree vari- ants are used for the state tree. Ethereum and Parity em- ploy Patricia-Merkle tree that supports ecient update and search operations. Hyperledger implements Bucket-Merkle tree which uses a hash function to group states into a list of buckets from which a Merkle tree is built. Block headers and the key-value storage together maintain all the historical transactions and states of the blockchain. For validating and executing transactions, a blockchain node needs only a few recent blocks (or just the latest block for PBFT-based systems). However, the node also interacts via some RPC-like mechanisms with light-weight clients who do not have the entire blockchain. Such external interfaces en- able building of third-party applications on top of block- chain. Current systems support a minimum set of queries including getting blocks and transactions based on their IDs. Ethereum and Parity expose a more comprehensive set of APIs via JSON-RPC, supporting queries of account states at speci c blocks and of other block statistics. 3.1.3 Execution layer A contract (or chaincode) is executed in a runtime envi- ronment. One requirement is that the execution must be fast, because there are multiple contracts and transactions in one block and they must all be veri ed by the node. An- other is that the execution must be deterministic, ideally the same at all nodes. Deterministic execution avoid unnec- essary inconsistency in transaction input and output which leads to blocks being aborted. In both PoW and PBFT, aborting transactions wastes computing resources. Ethereum develops its own machine language (bytecode) and a virtual machine (called EVM) for executing the code, which is also adopted by Parity. EVM is optimized for Ethereum-speci c operations. For example, every code in- struction executed in Ethereum costs a certain amount of gas, and the total cost must be properly tracked and charged to the transaction's sender. Furthermore, the code must keep track of intermediate states and reverse them if the execution runs out of gas. Hyperledger, in contrast, does not consider these semantics in its design, so it simply sup- ports running of compiled machine codes inside Docker im- ages. Speci cally, chaincodes are deployed as Docker im- ages interacting with Hyperledger's backend via pre-de ned interfaces. One advantage of Hyperledger's environment is that it supports multiple high-level programming lan- guages such as Go and Java, as opposed to Ethereum's own language. In terms of development environment, Hy- perledger exposes only simple key-value operations, namely putState and getState . This is restricted, because any contract states must be mapped into key-value tuples. In contrast, Ethereum and Parity support a richer set of data types such as map, array and composite structures. These high-level data types in Ethereum and Parity make it easier and faster to develop new contracts. 3.1.4 Application layer Many applications are being proposed for blockchain, lever- aging the latter's two key properties. First, data in the blockchain is immutable and transparent to the participants, meaning that once a record is appended, it can never be changed. Second, it is resilient to dishonest and malicious participants. Even in permissioned settings, participants can be mutually distrustful. The most popular application, however, is still crypto-currency. Ethereum has its own cur- rency (Ether) and a majority of smart contracts running on it are currency related. Decentralized Autonomous Organi- Ethereum ParityHyperledgerIBlockchainConnectorDriver StatsCollectorWorkloadClient ConfigurationWorkloadClient ... ...ErisDB Figure 4: Blockbench software stack. New workloads are added by implementing IWorkloadConnector inter- face. New blockchain backends are added by implement- ingIBlockchainConnector . Current backends include Eth- ereum, Parity and Hyperledger. zation (DAO) is the most active application in Ethereum, creating communities for crowd funding, exchange, invest- ment, or any other decentralized activities. A DAO manages funds contributed by participants and gives its users voting power proportional to their contributions. Parity's main ap- plication is the wallet application that manages Ether. As major banks are now considering adopting crypto-currency, some ntech companies are building applications that take crypto-currency to mediate nancial transactions, for ex- ample, in currency exchange market [44]. Other examples include applying the currency and smart contracts for more transparent and cost-e ective asset management [39, 40]. Some applications propose to build on blockchain's im- mutability and transparency for better application work- ows in which humans are the bottlenecks. For example, security settlements and insurance processes can be sped up by storing data on the blockchain [29]. Another example is sharing economy applications, such as AirBnB, which can use blockchain to evaluate reputation and trust in a decen- tralized settings, because historical activities of any users are available and immutable. This also extends to Inter- net of Things settings, where devices need to establish trust among each other [3]. 3.2 Blockbench Implementation Figure 4 illustrates the current Blockbench 's implemen- tation. To evaluate a blockchain system, the rst step is to integrate the blockchain into the framework's backend by implementing IBlockchainConnector interface. The inter- face contains operations for deploying application, invoking it by sending a transaction, and for querying the blockchain's states. Ethereum, Parity and Hyperledger are current back- ends supported by Blockbench , while ErisDB integration is under development. A user can use one of the existing workloads (discussed next) to evaluate the blockchain, or implement a new workload using the IWorkloadConnector interface (we assume that the smart contract handling the workload's logic is already implemented and deployed on the blockchain). This interface essentially wraps the workload's operations into transactions to be sent to the blockchain. Speci cally, it has a getNextTransaction method which re- turns a new blockchain transaction. Blockbench 's core component is the Driver which takes as input a workload, user-de ned con guration (number of operations, number of clients, threads, etc.), executes it on the blockchain and outputs running statistics. Asynchronous Driver. One challenge in implement- ing the Driver is that current blockchain systems are asyn- chronous services , meaning that transactions submitted to the systems are processed at a later time. This is in con- trast to databases, especially transactional databases, in which operations are synchronous, i.e. they block until the systems nish processing. When a transaction is submit- ted, Ethereum, Parity and Hyperledger return a transac- tion ID which can be used for checking the transaction sta- tus at a later time. Such asynchronous semantics could result in better performance, but it forces the Driver to periodically poll for status of the submitted requests. In particular, Driver maintains a queue of outstanding trans- actions that have not been con rmed. New transaction IDs are added to the queue by worker threads. A polling thread periodically invokes getLatestBlock(h) method in theIBlockchainConnector interface, which returns a list of new con rmed blocks on the blockchain from a given height h. Ethereum and Parity consider a block as con rmed if it is at least confirmationLength blocks from the current block- chain's tip, whereas Hyperledger con rms a block as soon as it appears on the blockchain. The Driver then extracts transaction lists from the con rmed blocks' content and re- moves matching ones in the local queue. getLatestBlock(h) can be implemented in all three systems by rst requesting for the blockchain's current tip t, then requesting the con- tent of all blocks in the range ( h; t]. ErisDB provides a publish/subscribe interface that could simplify the imple- mentation of this function. 3.3 Evaluation Metrics The output statistics of running a workload with di erent con gurations can be used to evaluate the blockchain against three performance metrics. Throughput: measured as the number of successful transactions per second. A workload can be con gured with multiple clients and threads per clients to saturate the blockchain throughput. Latency: measured as the response time per transac- tion. Driver implements blocking transaction, i.e. it waits for one transaction to nish before starting an- other. Scalability: measured as the changes in throughput and latency when increasing number of nodes and num- ber of concurrent workloads. Fault tolerance: measured as how the throughput and latency change during node failure. Although block- chain systems are tolerant against Byzantine failure, it is not possible to simulate all Byzantine behaviors. In Blockbench we simulate three failure modes: crash failure in which a node simply stops, network delay in which we inject arbitrary delays into messages, and random response in which we corrupt the messages ex- changed among the nodes. Security metrics. A special case of Byzantine failures that is important to blockchain systems is malicious behav-Smart contracts Description YCSB Key-value store Smallbank OLTP workload EtherId Name registrar contract Doubler Ponzi scheme WavesPresale Crowd sale VersionKVStore Keep state's versions (Hyperledger only) IOHeavy Read and write a lot of data CPUHeavy Sort a large array DoNothing Simple contract, do nothing Table 1: Summary of smart contracts implemented in Blockbench . Each contract has one Solidity version for Parity and Ethereum, and one Golang version for Hyper- ledger. ior caused by an attacker. The attacker can be a compro- mised node or rouge participant within the system. Under this threat model, security of a blockchain is de ned as the safety property of the underlying consensus protocol. In par- ticular, security means that the non-Byzantine nodes have the same blockchain data. Violation of the safety property leads to forks in the blockchain. Classic Byzantine tolerant protocols such as PBFT are proven to ensure safety for a certain number of failures, thus security is guaranteed. On the other hand, in PoW systems like Bitcoin or Ethereum, forks can occur due to network delays causing two nodes to mine the same blocks. While such accidental forks can be quickly resolved, forks engineered by the attackers can be used for double spending and sel sh mining . In the for- mer, the attacker sends a transaction to a block in the fork, waits for it to be accepted by the users, then sends a con- icting transaction to another block in the main branch. In the latter, by withholding blocks and maintaining a private, long fork, the attacker disrupts the incentives for mining and forces other participants to join the attacker's coalition. By compromising 25% of the nodes, the attacker can control the entire network's block generation [26]. In this work we quantify security as the number of blocks in the forks. Such blocks, called orphan or stale blocks, rep- resent the window of vulnerability in which the attacker can perform double spending or sel sh mining. To manipulate forks, the key strategy is to isolate a group of nodes, i.e. to partition the network. For example, eclipse attack [30] exploits the application-level protocol to surround the tar- geted nodes with ones under the attacker's control. At the network level, BGP hijacking [7] requires controlling as few as 900 pre xes to isolate 50% of the Bitcoin's total min- ing power. Blockbench implements a simulation of these attacks by partitioning the network for a given duration. In particular, during partition Blockbench runtime drops network trac between any two nodes in the two partitions. Security is then measured by the ratio between the total number of blocks included in the main branch and the total number of blocks con rmed by the users. The lower the ra- tio, the less vulnerable the system is from double spending for sel sh mining. 3.4 Workloads We divide the workloads into two major categories: macro benchmark for evaluating performance of the application layer, and micro benchmark for testing the lower layers. We have implemented the smart contracts for all workloads for Ethereum, Parity and Hyperledger, whose details are sum- marized in Table 1. Ethereum and Parity use the same exe- cution model, therefore they share the same smart contract implementations. 3.4.1 Macro benchmark workloads We port two popular database benchmark workloads into Blockbench , and three other real workloads found in the Ethereum blockchain. Key-value storage. We implement a simple smart con- tract which functions as a key-value storage. The WorkloadClient is based on the YCSB driver [13]. It preloads each store with a number of records, and supports requests with di erent ra- tios of read and write operations. YCSB is widely used for evaluating NoSQL databases. OLTP (Smallbank). Unlike YCSB which does not con- sider transactions, Smallbank [10] is a popular benchmark for OLTP workload. It consists of three tables and four ba- sic procedures simulating basic operations on bank accounts. We implement it as a smart contract which simply transfers money from one account to another. EtherId. This is a popular contract that implements a domain name registrar. It supports creation, modi cation and ownership transfer of domain names. A user can re- quest an existing domain by paying a certain amount to the current domain's owner. This contract has been written for Ethereum blockchain, and can be ported to Parity without change. In Hyperledger, we create two di erent key-value namespaces in the contract: one for storing the domain name data structures, and another for users' account balances. In domain creation, the contract simply inserts domain value into the rst name space, using the domain name as the key. For ownership transfer, it checks the second namespace if the requester has sucient fund before updating the rst namespace. To simulate real workloads, the contract con- tains a function to pre-allocate user accounts with certain balances. Doubler. This is a contract that implements a pyramid scheme. As shown in Figure 2, participants send money to this contract, and get rewards as more people join the scheme. In addition to the list of participants and their con- tributions, the contract needs to keep the index of the next payout and updates the balance accordingly after paying early participants. Similar to EthereId, this contract has already been written for Ethereum, and can be ported to Parity directly. To implement it in Hyperledger, we need to translate the list operations into key-value semantics, mak- ing the chaincode more bulky than the Ethereum counter- part. WavesPresale. This contract supports digital token sales. It maintains two states: the total number of tokens sold so far, and the list of previous sale transactions. It supports operations to add a new sale, to transfer ownership of a pre- vious sale, and to query a speci c sale records. Ethereum and Parity support composite structure data types, making it straightforward to implement the application logic. In contrast, in Hyperledger, we have to translate this structure into key-value semantics by using separate key-value names- paces. 3.4.2 Micro benchmark workloads The previous workloads test the performance of block-chain as a whole. As discussed early in this section, a block- chain system comprises multiple layers, and each layer may have di erent impact on the overall performance. We design several workloads to stress the layers in order to understand their individual performance. DoNothing. This contract accepts transaction as input and simply returns. In other words, it involves minimal number of operations at the execution layer and data model layer, thus the overall performance will be mainly deter- mined by the consensus layer. Previous works on perfor- mance of blockchain consensus protocol [34, 43] use time to consensus to measure its performance. In Blockbench , this metric is directly re ected in the transaction latency. Analytics. This workload considers the performance of blockchain system in answering analytical queries about the historical data. Similar to an OLAP benchmark, this work- load evaluates how the system implements scan-like and ag- gregate queries, which are determined by its data model. Speci cally, we implement two queries for extracting statis- tics from the blockchain data: Q1: Compute the total transaction values committed be- tween block i and block j . Q2: Compute the largest transaction value involving a given state (account) between block i and block j . InClientWorkload , we pre-load the blockhain with trans- actions carrying integer values (representing money trans- ferring) and the states with integer values. For Ethereum, both queries can be implemented via JSON-RPC APIs that return transaction details and account balances at a speci c block. For Hyperledger, however, the second query must be implemented via a chaincode (VersionKVStore), because the system does not have APIs to query historical states. IOHeavy. Current blockchain systems rely on key-value storage to persist blockchain transactions and states. Each storage system may perform di erently under di erent work- loads [50]. This workload is designed to evaluate the IO per- formance by invoking a contract that performs a large num- ber of random writes and random reads to the contract's states. The I/O bandwidth can be estimated via the ob- served transaction latency. CPUHeavy. This workload measures the eciency of the execution layer for computationally heavy tasks. EVM may be fast at executing Ethereum speci c operations, but it is unclear how it performs on general tasks for which ma- chine native codes may be more ecient. We deploy a smart contract which initializes a large array, and runs the quick sort algorithm over it. The execution layer performance can then be measured by the observed transaction latency. 4. PERFORMANCE BENCHMARK We selected Ethereum, Parity and Hyperledger for our study, as they occupy di erent positions in the blockchain design space, and also for their codebase maturity. We eval- uate the three systems using both macro and micro bench- mark workloads described in the previous section1. Our main ndings are: Hyperledger performs consistently better than Eth- ereum and Parity across the benchmarks. But it fails to scale up to more than 16 nodes. 1We have released Blockbench for public use [1]. Ethereum and Parity are more resilient to node fail- ures, but they are vulnerable to security attacks that forks the blockchain. The main bottlenecks in Hyperledger and Ethereum are the consensus protocols, but for Parity the bottle- neck is caused by transaction signing. Ethereum and Parity incur large overhead in terms of memory and disk usage. Their execution engine is also less ecient than that of Hyperledger. Hyperledger's data model is low level, but its exibility enables customized optimization for analytical queries of the blockchain data. We used the popular Go implementation of Ethereum, geth v1.4.18 , the Parity release v1.6.0 and the Hyperledger Fabric release v0.6.0-preview . We set up a private testnet for Ethereum and Parity by de ning a genesis block and di- rectly adding peers to the miner network. For Ethereum, we manually tuned the difficulty variable in the genesis block to ensure that miners do not diverge in large networks. For Parity, we set the stepDuration variable to 1. In both Eth- ereum and Parity, confirmationLength is set to 5 seconds. The default batch size in Hyperledger is 500. The experiments were run on a 48-node commodity clus- ter. Each node has an E5-1650 3.5GHz CPU, 32GB RAM, 2TB hard drive, running Ubuntu 14.04 Trusty, and con- nected to the other nodes via 1GB switch. The results below are averaged over 5 independent runs. For Ethereum, we re- served 8 cores out of the available 12 cores per machine, so that the periodical polls from the client's driver process do not interfere with the mining process (which is CPU inten- sive). 4.1 Macro benchmarks This section discusses the performance of the blockchain systems at the application layer, by running them with the YCSB and Smallbank benchmarks over multiple nodes. 4.1.1 Throughput and latency We measured peak performance of the three systems with 8 servers and 8 concurrent clients over the period of 5 min- utes. Each client sends transactions to a server with a re- quest rate varying from 8 tx/s to 1024 tx/s. Figure 5 shows the throughput and latency at peak, and how these metrics change with varying transaction rates. We observe that in terms of throughput, Hyperledger out- performs other systems in both benchmarks. Speci cally, it has up to 5 :5x and 28x higher throughput than Ethereum and Parity respectively. Parity has the lowest latency and Ethereum has the highest. The gap between Hyperledger and Ethereum is because of the di erence in consensus pro- tocol: one is based on PBFT while the other is based on PoW. We measured CPU and network utilization during the experiments, and observe that Hyperledger is communica- tion bound whereas Ethereum is CPU bound (see Appendix B). At 8 servers, communication cost in broadcasting mes- sages is much cheaper than block mining whose diculty is set at roughly 2 :5sper block. The performance gap between Parity and Hyperledger is not because of the consensus protocol, as we expect Parity's PoA protocol to be simpler and more ecient than bothPoW and PBFT (indeed, we observe that Parity has the same CPU utilization and lower network utilization than Hyperledger). Figure 5[b,c] shows that Parity's throughput and latency remains constant with increasing transaction rates (beyond 40 tx/s). To understand its performance fur- ther, we measure the queue of pending transactions at the client. Figure 6 compares the queue sizes before and af- ter the systems reach their peak throughput. With only 8 tx/s, the queues for Ethereum and Hyperledger remain at roughly constant sizes, but Parity's queue size increases as time passes. More interestingly, under high loads (512 tx/s per client), Parity's queue is always smaller than Ethereum's and Hyperledger's. This behavior indicates that Parity pro- cesses transactions at a constant rate, and that it enforces a maximum client request rate at around 80 tx/s. As a conse- quence, Parity achieves both lower throughput and latency than other systems. Another observation is that there are di erences between YCSB and Smallbank workloads in Hyperledger and Eth- ereum. There is a drop of 10% in throughput and 20% increase in latency. Since executing a Smallbank smart con- tract is more expensive than executing a YCSB contract (there are more reading and writing to the blockchain's states), the results suggest that there are non-negligible costs in the execution layer of blockchains. At its peak throughput, Hyperledger generates 3 :1 blocks per second and achieves the overall throughput of 1273 tx/s. We remark that this throughput is far lower than what an in- memory database system can deliver (see Appendix B). As the throughput is a function of the block sizes and block gen- eration rate, we measured the e ect of increasing the block sizes in the three systems. The results (see Appendix B) demonstrate that with bigger block sizes, the block genera- tion rate decreases proportionally, thus the overall through- put does not improve. 4.1.2 Scalability We xed the client request rate and increased both the number of clients and the number of servers. Figure 7 il- lustrates how well the three systems scale to handle larger YCSB workloads (the results for Smallbank are similar and included in Appendix B). Parity's performance remains con- stant as the network size and o ered load increase, due to the constant transaction processing rate at the servers. In- terestingly, while Ethereum's throughput and latency de- grade almost linearly beyond 8 servers, Hyperledger stops working beyond 16 servers. To understand why Hyperledger failed to scale beyond 16 servers and 16 clients, we examined the system's logs and found that the nodes were repeatedly trying and failing to reach consensus on new views which contain batches of transactions. In fact, the servers were in di erent views and consequently were receiving con icting view change mes- sages from the rest of the network. Further investigation reveals that con icting views occurred because the consen- sus messages are rejected by other peers on account of the message channel being full. As messages are dropped, the views start to diverge and lead to unreachable consensus. In fact, we also observe that as time passes, client requests took longer to return (see Appendix B), suggesting that the servers were over saturated in processing network messages. We note, however, that the original PBFT protocol guaran- tees both liveness and safety, thus Hyperledger's failure to YCSB Smallbank101102103104#tx/s 284 255 45 461273 1122Throughput Ethereum Parity Hyperledger YCSB Smallbank10-1100101102103second92114 3 43851Latency Ethereum Parity Hyperledger(a) Peak performance 02004006008001000 #request/s101102103#tx/sThroughput Ethereum ParityHyperledger 02004006008001000 #request/s100101102secondLatency Ethereum ParityHyperledger (b) Performance with varying request rates Figure 5: Blockchain performance with 8 clients and 8 servers. 0 50 100 150 200 250 300 time (second)02004006008001000#requestsQueue length, 8 tx/s Ethereum Parity Hyperledger 0 50 100 150 200 250 300 time (second)0100002000030000400005000060000#requestsQueue length, 512 tx/s Ethereum Parity Hyperledger Figure 6: Client's request queue, for request rates of 8 tx/s and 512 tx/s. 1248121620242832 #nodes101102103104#tx/sThroughput Ethereum Parity Hyperledger 1248121620242832 #nodes10-1100101102103secondLatency Ethereum Parity Hyperledger Figure 7: Performance scalability (with the same number of clients and servers). 8 12 16 20 24 28 32 #nodes0200400600800100012001400#tx/sThroughput Ethereum Parity Hyperledger 812 16 20 24 28 32 #nodes020406080100120140160180secondLatency Ethereum Parity HyperledgerFigure 8: Performance scalability (with 8 clients). scale beyond 16 servers is due to the implementation of the protocol. In fact, in the latest codebase (which was updated after we have nished our benchmark), the PBFT compo- nent was replaced by another implementation. We plan to evaluate this new version in the future work. The results so far indicate that scaling both the number of clients and number of servers degrades the performance and even causes Hyperledger to fail. We next examined the costs of increasing the number of servers alone while xing the number of clients. Figure 8 shows that the performance be- comes worse as there are more servers, meaning that the sys- tems incur some network overheads. Because Hyperledger is communication bound, having more servers means more messages being exchanged and higher overheads. For Eth- ereum, even though it is computation bound, it still con- sumes a modest amount of network resources for propagat- ing transactions and blocks to other nodes. Furthermore, with larger network, the diculty is increased to account for the longer propagation delays. We observe that to prevent the network from diverging, the diculty level increases at higher rate than the number of nodes. Thus, one reason for Ethereum's throughput degradation is due to network sizes. Another reason is that in our settings, 8 clients send requests to only 8 servers, but these servers do not always broadcast transactions to each other (they keep mining on 0 50 100 150 200 250 300 350 400 time (second)020040060080010001200140016001800#txs#Transactions commited Ethereum-12 Ethereum-16Parity-12 Parity-16Hyperledger-12 Hyperledger-16Figure 9: Failing 4 nodes at 250thsecond ( xed 8 clients) for 12 and 16 servers. X-12 and X-16 mean running 12 and 16 servers using blockchain Xrespectively. 0 50 100 150 200 250 300 350 400 time (second)0100200300400500#blocks#Blocks generated Ethereum-bc Ethereum-totalParity-bc Parity-totalHyperledger-bc Hyperledger-total Figure 10: Blockchain forks caused by attacks that parti- tions the network in half at 100thsecond and lasts for 150 seconds. X-total means the total number of blocks generated in blockchain X,X-bc means the total number of blocks that reach consensus in blockchain X. their own transaction pool). As a result, the network mining capability is not fully utilized. 4.1.3 Fault tolerance and security To evaluate how resilient the systems are to failures by crashing, we ran the systems with 8 clients for over 5 min- utes, during which we killed o 4 servers at 250thsecond. Figure 9 shows that Ethereum is nearly una ected by the change, suggesting that the failed servers do not contributing signi cantly to the mining process. In Parity, each node gen- erates blocks at a constant rate, thus failing 4 nodes means the remaining nodes are given more time to generate more blocks, therefore the overall throughput is una ected. In contrast, the throughput drops considerably in Hyperledger. For 12 servers, Hyperledger stops generating blocks after the failure, which is as expected because the PBFT can only tol- erate fewer than 4 failures in a 12-server network. With 16 servers, the system still generated blocks but at a lower rate, which were caused by the remaining servers having to sta- bilize the network after the failures by synchronizing their views. We next simulated the attack that renders the blockchain vulnerable to double spending. The attack, described in Section 3.3, partitioned the network at 100thsecond and lasted for 150 seconds. We set the partition size to be half 1M 10M 100M input size10-210-1100101102103104second10.5279.61 x3.0124.04232.78 0.190.331.94Execution time Ethereum Parity Hyperledger 1M 10M 100M input size105106107108MB 4,15022,819 x7182,07813,090 3764731,353Peak memory usage Ethereum Parity HyperledgerFigure 11: CPUHeavy workload, `X' indicates Out-of- Memory error. of the original2. Figure 10 compares the vulnerability of the three systems running with 8 clients and 8 servers. Re- call that vulnerability is measured as the di erences in the number of total blocks and the number of blocks on the main branch (Section 3.3), we refer to this as . Both Eth- ereum and Parity blockchains fork at 100thseconds, and  increases as time passes. For the attack duration, upto 30% of the blocks are generated in the forked branch, meaning that the systems are highly exposed to double spending or sel sh mining attacks. When the partition heals, the nodes come to consensus on the main branch and discard the forked blocks. As a consequence,  stops increasing shortly after 250thsecond. Hyperledger, in stark contrast, has no fork which is as expected because its consensus protocol is proven to guaranteed safety. We note, however, that Hyperledger takes longer than the other two systems to recover from the attacks (about 50 seconds more). This is because of the syn- chronization protocol executed after the partitioned nodes reconnect. 4.2 Micro benchmarks This section discusses the performance of the blockchain system at execution, data and consensus layers by evaluat- ing them with micro benchmark workloads. For the rst two layers, the workloads were run using one client and one server. For the consensus layer, we used 8 clients and 8 servers. 4.2.1 Execution layer We deployed the CPUHeavy smart contract that is ini- tialized with an integer array of a given size. The array is initialized in descending order. We invoked the contract to sort the array using quicksort algorithm, and measured the execution time and server's peak memory usage. The results for varying input sizes are shown in Figure 11. Although Ethereum and Parity use the same execution engine, i.e. EVM, Parity's implementation is more optimized, therefore it is more computation and memory ecient. An interest- ing nding is that Ethereum incurs large memory overhead. In sorting 10 Melements, it uses 22GB of memory, as com- pared to 473MB used by Hyperledger. Ethereum runs out of 2We note that partitioning a N-node network in half does not mean there are N=2 Byzantine nodes. In fact, Byzan- tine tolerance protocols do not count network adversary as Byzantine failure memory when sorting more than 10M elements. In Hyper- ledger, the smart contract is compiled and runs directly on the native machine within Docker environment, thus it does not have the overheads associated with executing high-level EVM byte code. As the result, Hyperledger is much more ecient in term of speed and memory usage. Finally, we note that all three systems fail to make use of the multi-core architecture, i.e. they execute the contracts using only one core. 4.2.2 Data model IO Heavy. We deployed the IOHeavy smart contract that performs a number of read and write operations of key-value tuples. We used 20-byte keys and 100-byte val- ues. Figure 12 reports the throughput and disk usage for these operations. Ethereum and Parity use the same data model and internal index structure, therefore they incur sim- ilar space overheads. Both use an order of magnitude more storage space than Hyperledger which employs a simple key- value data model. Parity holds all the state information in memory, so it has better I/O performance but fails to han- dle large data (capped by over 3M states under our hard- ware settings). On the contrary, Ethereum only caches only parts of the state in memory (using LRU for eviction policy), therefore it can handle more data than Parity at the cost of throughput. Hyperledger leverages RocksDB to manage its states, which makes it more ecient at scale. Analytic Queries. We implemented the analytics work- load by initializing the three systems with over 120 ;000 ac- counts with a xed balance. We then pre-loaded them with 100;000 blocks, each contains 3 transactions on average. The transaction transfers a value from one random account to another random account. Due to Parity's overheads in signing transactions when there are many accounts, we con- sidered transactions using only 1024 accounts. We then exe- cuted the two queries described in Section 3.4 and measured their latencies. Figure 13 shows that the performance for Q1 is similar, whereas Q2 sees a signi cant gap between Hyper- ledger and the rest. We note that the main bottleneck for both Q1 and Q2 is the number of network (RPC) requests sent by the client. For Q1, the client sends the same num- ber of requests to all systems, therefore their performance are similar. On the other hand, for Q2 the client sends one RPC per block to Ethereum and Parity, but only one RPC to Hyperledger because of our customized smart contract implementation (see Appendix C). This saving in network roundtrip time translates to over 10x improvement in Q2 latency. 4.2.3 Consensus We deployed the DoNothing smart contract that accepts a transaction and returns immediately. We measured the throughput of this workload and compare against that of YCSB and Smallbank. The di erences compared to other workloads, shown in Figure 13[c] is indicative of the cost of consensus protocol versus the rest of the software stack. In particular, for Ethereum we observe 10% increases in throughput as compared to YCSB, which means that execu- tion of the YCSB transaction accounts for the 10% overhead. We observe no di erences among these workloads in Parity, because the bottleneck in Parity is due to transaction sign- ing (even empty transactions still need to be signed), not due to consensus or transaction execution.5. DISCUSSION Understanding blockchain systems. Our framework is designed to provide better understanding of the performance and design of di erent private blockchain systems. As more and more blockchain systems are being proposed, each of- fering di erent sets of feature, Blockbench 's main value is that it narrows down the design space into four distinct abstraction layers. Our survey of current blockchain sys- tems (see Appendix A) show that the four layers are su- cient to capture the key characteristics of these systems. By benchmarking these layers, one can gain insights into the de- sign trade-o s and performance bottlenecks. In this paper, for example, by running the IOHeavy workload we identify that Parity trades performance for scalability by keeping states in memory. Another example is the trade-o in data model made by Hyperledger. On the one hand, the sim- ple key-value model means some analytical queries cannot be directly supported. On the other hand, it enables opti- mization that helps answering the queries more eciently. Finally, we identify that the bottleneck in Parity is not due to the consensus protocol, but due to the server's transac- tion signing. We argue that such insights are not easy to extract without a systematic analysis framework. Usability of blockchain. Our experience in working with the three blockchain systems con rms the belief that in its current state blockchain are not yet ready for mass usage. Both their designs and codebases are still being re ned con- stantly, and there are no other established applications be- side crypto-currency. Of the three systems, Ethereum is more mature both in terms of its codebase, user base and de- veloper community. Another usability issue we encountered is in porting smart contracts from one system to another, be- cause of their distinct programming models (see Section 3). This is likely to be exacerbated as more blockchain platforms are being proposed [44, 16]. Bringing database designs into blockchain. The chal- lenge in scaling blockchain by improving its consensus proto- cols is being addressed in many recent works [34, 37]. How- ever, as we demonstrated in the previous section, there are other performance bottlenecks. We propose four approaches in applying design principles from database systems to im- prove blockchain. Decouple storage, execution engine and consensus layer from each other, then optimize and scale them independently. For instance, current systems employ generic key-value stor- age, which may not be best suited to the unique data struc- ture and operations in blockchain. UStore [19] demonstrates that a storage designed around the blockchain data struc- ture is able to achieve better performance than existing im- plementations. Embrace new hardware primitives. Many data processing systems are taking advantage of new hardware to boost their performance [47, 50, 21]. For blockchain, using trusted hard- ware, the underlying Byzantine fault tolerance protocols can be modi ed to incur fewer network messages [12]. Systems like Parity and Ethereum can take advantage of multi-core CPUs and large memory to improve contract execution and I/O performance. Sharding. Blockchain is essentially a replicated state ma- chine system, in which each node maintains the same data. As such, blockchains are fundamentally di erent to database systems such as H-Store in which the data is partitioned (or sharded) across the nodes. Sharding helps reduce the com- 0.8M 1.6M 3.2M 6.4M 12.8M # tuples102103104second377 359 337 6913291181 1087 x x5618 5411 5123 4852 4527Average throughput (write) Ethereum Parity Hyperledger(a) Write 0.8M 1.6M 3.2M 6.4M 12.8M # tuples103104second 2019 1631 1282 5129329 9234 8974 x x8785 8758 8700 8670 8605Average throughput (read) Ethereum Parity Hyperledger (b) Read 0.8M 1.6M 3.2M 6.4M 12.8M # tuples103104105MB 2,3375,45912,80430,221 2,0865,04512,104 x x3606751,2832,4774,865Disk usage Ethereum Parity Hyperledger (c) Disk usage Figure 12: IOHeavy workload, `X'indicates Out-of-Memory error. 1 10 100 1,000 10,000 # blocks scanned10-210-1100101second 0.0200.0320.1681.37413.314 0.0200.0340.1290.9158.901 0.0190.0380.1350.9848.465Latency Ethreum Parity Hyperledger (a) Analytics workload (Q1) 1 10 100 1,000 10,000 # blocks scanned10-210-1100101second 0.0250.0330.1070.5954.907 0.0240.0310.0910.4273.472 0.019 0.0200.0230.0760.533Latency Ethereum Parity Hyperledger (b) Analytics workload (Q2) Ethereum Parity Hyperledger101102103104#tx/s256 451122 284 451273 328 461285Transaction througput SmallBank YCSB DoNothing (c) DoNothing workload Figure 13: Analytics and DoNothing workloads. putation cost and can make transaction processing faster. The main challenge with sharding is to ensure consistency among multiple shards. However, existing consistency pro- tocols used in database systems do not work under Byzan- tine failure. Nevertheless, their designs can o er insights into realizing a more scalable sharding protocol for block- chain. Recent work [37] has demonstrated the feasibility of sharding the consensus protocol, making important steps towards partitioning the entire blockchain. Support declarative language. Having a set of high-level operations that can be composed in a declarative manner makes it easy to de ne complex smart contracts. It also opens up opportunities for low-level optimizations that speed up contract execution. 6. RELATED WORK Performance studies of blockchain systems have so far been restricted to public blockchains. For example, [17, 15] analyze the e ect of block sizes and network propagation time on the overall throughputs. Recent proposals for im- proving Bitcoin performance [27, 34, 37, 25, 43] have mainly focused on the consensus layer, in which analytical models or network simulations are used to validate the new designs. Various aspects of Ethereum, such as their block process- ing time (for syncing with other nodes) and transactions processing time, have also been benchmarked [24, 23]. Our analysis using Blockbench di ers from these works in that it is the rst to evaluate private blockchains systems at scale against database workloads. Furthermore, it compares two di erent systems and analyzes how their designs a ect the overall performances. Future extensions of Blockbench would enable more comparative evaluations of the key com- ponents in blockchain.There are many standard frameworks for benchmarking database systems. OLTP-Bench [18] contains standard work- loads such as TPC-C for transactional systems. YCSB [13] contains key-value workloads. HiBench [32] and BigBench [28] feature big-data analytics workloads for MapReduce-like sys- tems. Blockbench shares the same high-level design as these frameworks, but its workloads and main driver are designed speci cally for blockchain systems. 7. CONCLUSION In this paper we proposed the rst benchmarking frame- work, called Blockbench , for evaluating private blockchain systems. Blockbench contains workloads for measuring the data processing performance, and workloads for under- standing the performance at di erent layers of the block- chain. Using Blockbench , we conducted comprehensive analysis of three major blockchain systems, namely Eth- ereum, Parity and Hyperledger with two macro benchmarks and four micro benchmarks. The results showed that current blockchains are not well suited for large scale data process- ing workloads. We demonstrated several bottlenecks and design trade-o s at di erent layers of the software stack. Acknowledgment We would like to thank the anonymous reviewers for their comments and suggestions that help us improve the paper. Special thanks to Hao Zhang, Loi Luu, the developers from Ethereum, Parity and Hyperledger projects for helping us with the experiment setup. This work is funded by the Na- tional Research Foundation, Prime Minister's Oce, Sin- gapore, under its Competitive Research Programme (CRP Award No. NRF-CRP8-2011-08). 8. REFERENCES [1] BlockBench: private blockchains benchmarking. https://github.com/ooibc88/blockbench. [2] Ethereum blockchain app platform. https://www.ethereum.org/. [3] Ibm watson iot. http://www.ibm.com/internet-of-things. [4] Leveldb. https://leveldb.org. [5] Monax: The ecosystem application platform. https://monax.io. [6] Rocksdb. https://rocksdb.org. [7] M. Apostolaki, A. Zohar, and L. Vanbever. Hijacking bitcoin: Large-scale network attacks on crypto-currencies. https://arxiv.org/abs/1605.07524, 2016. [8] P. Bailis, A. Fekete, M. J. Franklin, A. Ghodsi, J. M. Hellerstein, and I. Stoica. Coordination avoidance in database systems. In VLDB . [9] J. Bonneau, A. Miller, J. Clark, A. Narayanan, J. A. Kroll, and E. W. Felten. Sok: Research perspectives and challenges for bitcoin and crypto-currencies. In 2015 IEEE Symposium on Security and Privacy , pages 104{121. IEEE, 2015. [10] M. Cahill, U. Rohm, and A. D. Fekete. Serializable isolation for snapshot databases. In SIGMOD , 2008. [11] M. Castro and B. Liskov. Practical byzantine fault tolerance. In Proceedings of the third symposium on Operating systems design and implementation , pages 173{186. USENIX Association, 1999. [12] B.-G. Chun, P. Maniatis, S. Shenker, and J. Kubiatowicz. Attested append-only memory: Making adversaries stick to their word. In SOSP , 2007. [13] B. F. Cooper, A. Silberstein, E. Tam, R. Ramakrishnan, and R. Sears. Benchmarking cloud serving systems with ycsb. In SoCC , 2010. [14] J. C. Corbett and J. D. et al. Spanner: Google's globally-distributed database. In OSDI , 2012. [15] K. Croman, C. Decker, I. Eyal, A. E. Gencer, A. Juels, A. Kosba, A. Miller, P. Saxena, E. Shi, and E. G un. On scaling decentralized blockchains. In Proc. 3rd Workshop on Bitcoin and Blockchain Research , 2016. [16] Crypti. A decentralized application platform. https://crypti.me. [17] C. Decker and R. Wattenhofer. Information propagation in bitcoin network. In P2P, 2013. [18] D. E. Difallah, A. Pavlo, C. Curino, and P. Cudre-Mauroux. Oltp-bench: An extensible testbed for benchmarking relational databases. In VLDB , 2013. [19] A. Dinh, J. Wang, S. Wang, W.-N. Chin, Q. Lin, B. C. Ooi, P. Ruan, K.-L. Tan, Z. Xie, H. Zhang, andM. Zhang. UStore: a distributed storage with rich semantics. https://arxiv.org/pdf/1702.02799.pdf. [20] J. Douceur. The sybil attack. In IPTPS , 2002. [21] A. Dragojevic, D. Narayanan, E. B. Nightingale, M. Renzelmann, A. Shamis, A. Badam, and M. Castro. No compromises: distributed transactions with consistency, availability and performance. In SOSP , 2015. [22] Ethcore. Parity: next generation ethereum browser. https://ethcore.io/parity.html. [23] Ethcore. Performance analysis. https://blog.ethcore.io/performance-analysis/. [24] Ethereum. Ethereum benchmarks. https://github.com/ethereum/wiki/wiki/Benchmarks. [25] I. Eyal, A. E. Gencer, E. G. Sirer, and R. van Renesse. Bitcoin-ng: A scalable blockchain protocol. In NSDI , 2016. [26] I. Eyal and E. G. Sirer. Majority is not enough: Bitcoin mining is vulnerable. In Fiancial Cryptography , 2014. [27] A. Gervais, G. O. Karame, K. Wust, V. Glykantizis, H. Ritzdorf, and S. Capkun. On the security and performance of proof of work blockchains. https://eprint.iacr.org/2016/555.pdf. [28] A. Ghazal, T. Rabl, M. Hu, F. Raab, M. Poess, A. Crolotte, and H.-A. Jacobsen. Bigbench: towards an industry standard benchmark for big data analytics. In SIGMOD , 2013. [29] G. S. Group. Blockchain: putting theory into practice, 2016. [30] E. Heilman, A. Kendler, A. Zohar, and S. Goldberg. Eclipse attacks on Bitcoin's peer-to-peer network. In USENIX Security , 2015. [31] Hyperledger. Blockchain technologies for business. https://www.hyperledger.org. [32] Intel. Hibench suite. https://github.com/intel-hadoop/HiBench. [33] F. P. Junqueira, B. C. Reed, and M. Sera ni. Zab: high-performance broadcast for primary-backup systems. In Dependable Systems and Networks , 2011. [34] E. Kokoris-Kogias, P. Jovanovic, N. Gailly, I. Kho, L. Gasser, and B. Ford. Enhancing bitcoin security and performance with strong consistency via collective signing. In USENIX Security , 2016. [35] L. Lamport. Paxos made simple. SIGACT News , 2001. [36] Q. Lin, P. Chang, G. Chen, B. C. Ooi, K.-L. Tan, and Z. Wang. Towards a non-2pc transaction management in distrubted database systems. In SIGMOD , 2016. [37] L. Luu, V. Narayanan, C. Zhang, K. Baweija, S. Gilbert, and P. Saxena. A secure sharding protocol for open blockchains. In CCS, 2016. [38] L. Luu, J. Teutsch, R. Kulkarni, and P. Saxena. Demystifying Incentives in the Consensus Computer. CCS '15 , pages 706{719, 2015. [39] Melonport. Blockchain software for asset management. http://melonport.com. [40] J. Morgan and O. Wyman. Unlocking economic advantage with blockchain. a guide for asset managers., 2016. [41] S. Nakamoto. Bitcoin: A peer-to-peer electronic cash system, 2008. YCSB Smallbank101102103104105#tx/s 284 255 45 461273 1122142702 21596Throughput vs. HStore Ethereum Parity Hyperledger H-StoreFigure 14: Performance of the three blockchain systems ver- sus H-Store. [42] D. Ongaro and J. Ousterhout. In search of an understandable consensus algorithm. In USENIX ATC , 2014. [43] R. Pass and E. Shi. Hybrid consensus: ecient consensus in the permissionless model. https://eprint.iacr.org/2016/917.pdf. [44] Ripple. Ripple. https://ripple.com. [45] Y. Sompolinsky and A. Zohar. Accelerating bitcoin's transaction processing: fast money grows on trees, not chains. Cryptology ePrint Archive, Report 2013/881, 2013. https://eprint.iacr.org/2013/881.pdf. [46] M. Stonebraker, S. Madden, D. J. Abadi, S. Harizopoulos, N. Hachem, and P. Helland. The end of and architectural era (it's time for a complete rewrite). In VLDB , 2007. [47] K.-L. Tan, Q. Cai, B. C. Ooi, W.-F. Wong, C. Yao, and H. Zhang. In-memory databases: Challenges and opportunities from software and hardware perspectives. SIGMOD Records , 44(2), 2015. [48] A. Thomson, T. Diamond, S. chun Weng, K. Ren, P. Shao, and D. J. Abadi. Calvin: fast distributed transaction for partitioned database systems. In SIGMOD , 2012. [49] M. Vukolic. The quest for scalable blockchain fabric: proof-of-work vs. bft replication. In Open Problems in Network Security - iNetSec , 2015. [50] H. Zhang, G. Chen, B. C. Ooi, K.-L. Tan, and M. Zhang. In-memory big data management and processing: a survey. TKDE , 2015. APPENDIX A. SURVEY OF BLOCKCHAIN PLATFORMS We compare eleven promising blockchain platforms in Ta- ble 2. We can see that all but Ripple support smart con- tracts. Ethereum, Eris-DB, D nity and Parity execute the contracts using Ehtereum Virtual Machine (EVM), whereas Corda runs them in Java Virtual Machine (JVM). Hyper- ledger, Stellar and Tezos employ Docker images, ScalableBFT takes Haskell execution environment, and Sawtooth Lake launches contracts on top of Trusted Execution Environment (TEE) such as Intel Software Guard Extensions (SGX). These platforms also support di erent languages to develop smart contracts. For example, Solidity, Serpent and LLL are mainlyused in Ethereum, D nity and Parity, while Eris-DB only supports Solidity. Hyperledger, Stellar, Corda and Sawtooth Lake exploit various mature programming languages, such as Python, Java, Golang, etc. ScalableBFT and Tezos even develop their own smart contract languages. Most block- chain platforms' data models are account-based. Two ex- ceptions in the table are Ripple and Corda. Their data models are similar to Bitcoin's unspent transaction outputs (UTXO) which represents the coins in the network. Each platform o ers di erent consensus protocols. Hy- perledger implements PBFT in the version we evaluated, while Ethereum implements a variation of PoW (Proof-of- Work). Eris-DB builds on top of Tendermint protocol but only works in the latest version (v 0.12). Ripple and Tezos deploy Proof-of-Stake (PoS) schemes (the one in Ripple is referred to Ripple Consensus Ledger) where the next block is created based on accounts' wealth, i.e., the stake. Parity takes another consensus protocol, Proof-of-Authority (PoA), which holds a prede ned set of "authorities" to create new blocks in a xed time slot and secure the blockchain network. Sawtooth Lake uses Proof-of-Elapsed-Time (PoET) as its consensus protocol, which in nature is a lottery algorithm and decides the creator of block arbitrarily. Stellar develops its own mechanism, Stellar Consensus Protocol, which is a construction for decentralized Byzantine agreement. There is no source code that helps determine which consensus pro- tocol D nity uses, but its documents suggest that a Block- chain Nervous System will govern the whole platform via a voting mechanism based on neurons that interact with each other and are controlled by users. B. MACRO BENCHMARKS We compared the performance of the three blockchain sys- tems against a popular in-memory database system, namely H-Store, using the YCSB and Smallbank workload. We ran H-Store's own benchmark driver and set the transaction rate at 100,000 tx/s. Figure 14 shows at least an order of mag- nitude gap in throughput and two order of magnitude in la- tency. Speci cally, H-Store achieves over 140K tx/s through- put while maintaining sub-millisecond latency. The gap in performance is due to the cost of consensus protocols. For YCSB, for example, H-Store requires almost no coordination among peers, whereas Ethereum and Hyperledger su er the overhead of PoW and PBFT. An interesting observation is the overhead of Smallbank. Recall that Smallbank is a more complex transactional work- load than YCSB, in which multiple keys are updated in a single transaction. Smallbank is simple but is representative of the large class of transactional workloads such as TPC-C. We observe that in H-Store, Smallbank achieves 6 :6x lower throughput and 4x higher latency than YCSB, which indi- cates the cost of distributed transaction management proto- col, because H-Store is a sharded database. In contrast, the blockchain su ers modest degradation in performance: 10% in throughput and 20% in latency. This is because each node in blockchain maintains the entire state (replicated state ma- chine), thus there is no overhead in coordinating distributed transactions as the data is not partitioned. The results demonstrate that blockchain performs poorly at data processing tasks currently handled by database sys- tems. However, we stress that blockchains and databases Table 2: Comparison of blockchain platforms ApplicationSmart contract executionSmart contract languageData model Consensus Hyperledger Smart contract Dockers Golang, Java Account-based PBFT EthereumSmart contract, Crypto- currencyEVM Solidity, Serpent, LLL Account-based Ethash (PoW) Eris-DB Smart contract EVM Solidity Account-based Tendermint (BFT) RippleCrypto- currency- - UTXO-basedRipple Consensus Ledger (PoS) ScalableBFT Smart contractHaskell ExecutionPact Account-based ScalableBFT Stellar Smart contract DockersJavaScript, Golang, Java, Ruby, Python, C#Account-basedStellar Consensus Protocol D nity Smart contract EVM Solidity, Serpent, LLL Account-basedBlockchain Nervous System Parity Smart contract EVM Solidity, Serpent, LLL Account-based Proof of Authority TezosSmart contract, Crypto- currencyDockersTezos Contract Script LanguageAccount-based Proof of Stake Corda Smart contract JVM Kotlin, Java UTXO-based Raft Sawtooth LakeSmart contract TEE Python Account-basedProof of Elapsed Time 0 20 40 60 80 100 time (second)0102030405060708090%CPU utilization Ethereum Parity Hyperledger 0 20 40 60 80 100 time (second)020406080100MbpsNetwork utilization Ethereum Parity Hyperledger Figure 16: Resource utilization. Ethereum Parity Hyperledger10-1100101#block/s 0.341.005.20 0.220.563.10 0.120.281.75Block generation rate Small Medium Large Figure 15: Block generation rate. are designed with di erent goals and assumptions. Specif- ically, the protocols for Byzantine failure tolerance are an overkill for traditional database settings where there areonly crash failures. Other features which are optional in most database systems are cryptographic signatures on ev- ery single transaction, and wide-area fully replicated state machines. Although databases are designed without security features and tolerance to Byzantine failures, we remark that the gap remains too high for blockchains to be disruptive to incumbent database systems. Nevertheless, the popular- ity of blockchain is a clear indication that there is a need for a Byzantine tolerant data processing systems which can accommodate a large number of users. Figure 15 shows the e ect of varying block sizes in the overall throughput. While it is straightforward to set the block size in Hyperledger by con guring the batchSize vari- able, there is no direct way to specify the same in Ethereum. An Ethereum miner uses gasLimit value to restrict the over- all cost in constructing a block, thus we tuned this value to simulate di erent sizes. In Parity, gasLimit is not applica- ble to local transaction and it has no e ect on the block size. Instead, we observe that the block size can be controlled by tuning stepDuration value, which essentially decides how much time a validator can use to build a block. In the exper- iments, medium size refers to the default settings, whereas large and small refer to 2x and 0 :5x of the default size. The results show that increases in block sizes lead to proportional decreases in block generation rate, meaning that the overall throughput does not improve. Figure 16 compares CPU and network utilization of the three systems over the period of 100 seconds. It is easy to see that Ethereum is CPU bound, as it fully utilizes 8 CPU cores. Hyperledger, on the other hand, uses CPU sparingly and spends the rest of the time on network communication. Parity, in contrast, has lower resource footprints than other two systems. For Ethereum and Hyperledger, the pattern is the direct consequence of the consensus protocol: PoW is CPU bound whereas PBFT is communication bound. 1248121620242832 #nodes101102103104#tx/sThroughput Ethereum Parity Hyperledger 1248121620242832 #nodes10-1100101102103secondLatency Ethereum Parity HyperledgerFigure 19: Scalability with Smallbank benchmark. type account_t struct { Balance int CommitBlock int } type transaction_t { From string To string Val int } func Invoke_SendValue(from_account string, to_account string, value int) { var pending_list []transaction_t pending_list = decode(GetState("pending_list")) var new_txn transaction_t new_txn = transaction_t { from_account, to_account, value } pending_list = append(pending_list, new_txn) PutState('pending_list', encode(pending_list)) } func Query_BlockTransactionList(block_number int) []transaction_t { return decode(GetState("block:"+block_number)) } func Query_AccountBlockRange(account string, start_block int, end_block int) []account_t { version := decode(GetState(account+":latest")) var ret []account_t while true { var acc account_t acc = decode(GetState(account+":"+version)) if acc.CommitBlock >= start_block && acc.CommitBlock < end_block { ret = append(ret, acc) } else if acc.CommitBlock < start_block { break; } version -= 1 } return ret } Figure 20: Code snippet from the VersionKVStore smart contract for analytics workload (Q1 and Q2). 100 101 102 103 time (second)0.00.20.40.60.81.0cdfLatency distribution Ethereum-YCSB Ethereum-SB Parity-YCSB Parity-SB Hyperledger-YCSB Hyperledger-SB Figure 17: Latency distribution. 0 50 100 150 200 250 300 350 time (second)01000020000300004000050000600007000080000#requestsQueue length Ethereum Parity HyperledgerFigure 18: Queue length at the client. Figure 17 shows the latency distribution. Ethereum has both higher latency and higher variance, because PoW is a randomized process which means the duration between blocks are unpredictable. Parity has the lowest variance because the server restricts the client request rate at 80 tx/s. Figure 18 illustrates the request queue at the client for the settings of 20 servers and 20 clients. The queue behav- ior of Ethereum re ects the normal case, i.e. the queue grew and shrank depending on how fast the transactions are com- mitted. Hyperledger failed to generate blocks in this case, therefore the queue never shrank. However, there are du- rations in which the queue size remains constant. Further- more, at the beginning, the queue in Hyperledger is smaller than that in Ethereum, even though the clients are send- ing at the same rate. This suggests there is a bottleneck in processing network requests at the Hyperledger servers. Figure 19 illustrates the scalability of the three systems using the Smallbank benchmark. We observe similar pat- terns to the YCSB benchmark (Figure 7), except that Hy- perledger failed to scale beyond 8 nodes instead of 16. C. ANLAYTICS SMART CONTRACT Figure 20 shows the implementation of the smart con- tract method that answer Q2 of the analytics workload. To support historical data lookup, we append a counter to the key of each account. To fetch a speci c version of an ac- count, we use key account:version . We store the latest version of the account using key account:latest , and keep aCommitBlock in the data eld for every version which in- dicates in which block the balance of this version is com- mitted. To answer query that fetches a list of balance of a given account within a given block range, the method scans all versions of this account and returns the balance values that are committed within the given block range. Ethereum and Parity provide JSON-PRC APIs getBalance(account, block) to query information of an account at a given block number. This API fetches only one version of the account per HTTP roundtrip, so it is less ecient than pushing the query logic to server side.
{ "id": "1703.04057" }
1911.10187
Linear Consistency for Proof-of-Stake Blockchains
The blockchain data structure maintained via the longest-chain rule---popularized by Bitcoin---is a powerful algorithmic tool for consensus algorithms. Such algorithms achieve consistency for blocks in the chain as a function of their depth from the end of the chain. While the analysis of Bitcoin guarantees consistency with error $2^{-k}$ for blocks of depth $O(k)$, the state-of-the-art of proof-of-stake (PoS) blockchains suffers from a quadratic dependence on $k$: these protocols, exemplified by Ouroboros (Crypto 2017), Ouroboros Praos (Eurocrypt 2018) and Sleepy Consensus (Asiacrypt 2017), can only establish that depth $\Theta(k^2)$ is sufficient. Whether this quadratic gap is an intrinsic limitation of PoS---due to issues such as the nothing-at-stake problem---has been an urgent open question, as deployed PoS blockchains further rely on consistency for protocol correctness. We give an axiomatic theory of blockchain dynamics that permits rigorous reasoning about the longest-chain rule and achieve, in broad generality, $\Theta(k)$ dependence on depth in order to achieve consistency error $2^{-k}$. In particular, for the first time, we show that PoS protocols can match proof-of-work protocols for linear consistency. We analyze the associated stochastic process, give a recursive relation for the critical functionals of this process, and derive tail bounds in both i.i.d. and martingale settings via associated generating functions.
http://arxiv.org/pdf/1911.10187v1
Erica Blum, Aggelos Kiayias, Cristopher Moore, Saad Quader, Alexander Russell
cs.CR, cs.DM
cs.CR
arXiv:1911.10187v1 [cs.CR] 22 Nov 2019/T_he combinatorics ofthe longest-chain rule: Linearconsistency for proof-of-stake blockchains∗ EricaBlum1, AggelosKiayias2,5, Cristopher Moore3,Saad/Q_uader4, andAlexander Russell4,5 1Universityof Maryland, College Park 2Universityof Edinburgh 3Santa Fe Institute 4Universityof Connecticut 5IOHK November25, 2019 Abstract Blockchain data structures maintained via the longest-cha in rulehave emerged as a powerful algorithmic tool forconsensusalgorithms. /T_hetechnique—popularizedbythe Bitcoinprotocol—hasproventoberemarkablyflexible andnowsupportsconsensusalgorithmsinawidevarietyofse /t_tings. Despitesuchbroadapplicabilityandadoption, current analytic understanding of the technique is highly d ependent on details of the protocol’s leader election scheme. Aparticularchallengeappearsintheproof-of-sta kese/t_ting, whereexistinganalyses suffer fromquadratic dependence onsuffixlength. We describe an axiomatic theory of blockchain dynamics that permits rigorous reasoning about the longest- chainruleinquitegeneral circumstancesandestablishbou nds—optimaltowithinaconstant—ontheprobabilityof a consistency violation. /T_his se/t_tles a critical open questio n in the proof-of-stake se/t_ting where we achieve linear consistency forthefirsttime. Operationally,blockchainconsensusprotocolsachieveco nsistencybyinstructingpartiestoremoveasuffixofa certainlength from their localblockchain. While theanaly sis of Bitcoinguarantees consistency with error 2−kby removing O(k)blocks, recent work on proof-of-stake (PoS) blockchains ha s suffered from quadratic dependence: (PoS) blockchainprotocols,exemplifiedbyOuroboros(Cryp to2017),OuroborosPraos(Eurocrypt2018)andSleepy Consensus (Asiacrypt 2017), can only establish that the len gth of this suffix should be Θ(k2). /T_his consistency guaranteeis a fundamental design parameter for thesesyste ms, as thelength of thesuffixis a lower boundforthe time required to wait for transactions to se/t_tle. Whether thi s gap is an intrinsic limitation of PoS—due to issues such as the “nothing-at-stake” problem—has been an urgent o pen question, as deployed PoS blockchains further rely on consistency for protocol correctness: in particula r, security of the protocol itself relies on this parameter. Our general theory directly improves the required suffix leng th fromΘ(k2)toΘ(k). /T_hus we show, for the first time, how PoS protocols can match proof-of-work blockchain protocols for exponentially decreasing consistency error. Ouranalysisfocusesonthearticulationofatwo-dimension alstochasticprocessthatcapturesthefeaturesofin- terest,anexactrecursiveclosedformforthecriticalfunc tionaloftheprocess,andtailboundsestablishedforassoc i- atedgeneratingfunctionsthatdominatethefailureevents . Finally,theanalysisprovidesanexplicitpolynomial-ti me algorithmforexactlycomputingtheexponentially-decayi ng error functionwhich candirectlyinform practice. ∗EricaBlum’sworkwaspartlysupportedbyfinancialassistanceawar d70NANB19H126fromU.S.DepartmentofCommerce,NationalInstit ute ofStandardsandTechnology. AggelosKiayias’researchwaspartl ysupportedbyH2020Grant#780477,PRIViLEDGE.CristopherMoo re’sresearch waspartly supported by NSF grant BIGDATA-1838251. Alexander Russell’swork waspartly supported by NSF Grant #1717432. 1 1 Introduction Ablockchainisadatastructureconsistingofacollectionofd atablocksplacedinlinearorder. Itfurtherrequiresthat eachblockcontainsa collision-free hash ofthe previous block : thusblocksimplicitly committo the entire prefix of theblockchainprecedingthem. /T_hiselementarydatastructure hasremarkableapplicationsindistributedcomputing, and now appears as an essential component of consensus protocols in a wide variety of models and se/t_tings; this notablyincludes boththe “permissionless” se/t_ting popularized by Bitcoin andthe classic “permissioned” model. Suchconsensusprotocolscallforplayerstocollaboratively assembleablockchainbyrepeatedlyselectingplayers to add blocks. Specifically,the protocoldetermines a stocha stic process resembling a lo/t_tery: each “leader” selected by the lo/t_teryis then responsible for broadcasting a new block. W hile the algorithmicdetails of thislo/t_tery depend heavily on the protocol, the outcome can be privately determ ined and provides the winning player a proof of lead- ership that can be publicly demonstrated. Assuming that the ex pectedwait time for some player to win the lo/t_tery is constant,the blockchainexperiences steady growthwhen pla yersfollow theprotocol. Networkinfelicities, adversarial behavior,orthepossibi lity that two playerssimultaneously win thelo/t_tery can leadtodisagreementsamongtheplayersaboutthecurrentblock chain. /T_husprotocolsadopta“chainselectionrule” that determines how players should break ties among the variou s chains they observe on the network; ideally, the combinationofthechainselectionruleandthelo/t_teryshouldg uaranteethattheplayers’blockchainsagree,perhaps withtheexceptionofashortsuffix. /T_heemblematicchainselec tionstrategyamongsuchsystemsisthe longest-chain rule,whichcallsforplayersto adopt the longestchain amongvario uscontenders. /T_hefirstblockchainprotocolwasthecoreofthesensationalBit coinsystem[18];itadoptedalo/t_terymechanism based on a cryptographic puzzle [7, 1]—also known as proof-of-work or PoW, for short —and a chain selection rule favoring chains that represent more work. /T_he system is particul arly notable for its ability to survive in a permis- sionlessse/t_ting—whereplayersmayfreelyjoinanddepart—even whenaportionoftheplayersareactivelya/t_tacking the protocol. Unfortunately, the proof-of-work mechanism mak es quite striking energy demands: the system cur- rently consumes as much electricity as a small country.1/T_his motivated the blockchain community to exploring alternative lo/t_tery mechanisms, e.g., proof-of-stake (PoS) [ 3, 21, 13], proof of space [8, 20] and others [16]. /T_he proof-of-stakemechanismis particularly a/t_tractive from th e perspective of efficiency,asit makesno assumption of external computational resources. /T_he fundamental consistency property—critical in all these bloc kchain systems—is common-prefix (cf. [9]). It precisely captures the intuition described above: by trimmi ng ak-block suffix from the chain held by any honest playertheresultingblockchainisaprefixoftheblockchainp ossessedbyanyhonestpartyatanyfuturepointofthe execution. Aprincipalgoalintheanalysisofthesesystemsisa toguaranteecommonprefix,foranappropriatevalue ofk,evenifsomeoftheplayerscolludetodisrupttheprotocol. Commonprefixistypicallyonlyshowntoholdwith high probability 1−ε, whereεis an error term that is a function of k. /T_he exact dependency of εonkis critically important: it determines the length of the suffix that is to be remo ved from a blockchain in order to ensure that the remaining prefix will be retained at any future point of the exec ution. /T_his directly imposes a lower bound on howlongonehastowait forinformationintheblockchain(sucha sapaymenttransaction)to“se/t_tle.” Additionally, manyblockchainprotocolsinternallyrelyoncommonprefix forc orrectness;thustherelationship between εandk is criticalto establishing the regime ofcorrectnessofthe ent ire protocol. Arelativelystraightforwardlowerboundfor εisε≥exp(−αk)forsomeα >0. /T_hislowerboundapplieswhen thereisacoalitionofadversarialplayersofconstantfracti on,thecaseofprimaryinterestinpractice. /T_heresultiseasy toinferfromtheanalysisof[18],whereastrategyisdemonstra tedthatviolatescommonprefixwithsuchprobability (this is referred to as a “double-spending” a/t_tack in that paper ). /T_he tightness of this bound is an important open problem. For the special case of proof-of-work an upper bound ofexp(−Ω(k))was shown first in [9] and further verified in extended security models by [11, 24]. In the proof- of-stake se/t_ting, on the other hand, the tightness of the bound remains open. While recent proof-of-stake algorithms have been presented with rigorous analyses that rival proof-of-work in many regards, they suffer from a quadra tic relationship between kandlog(ε). For example, the Ouroboros protocols [13, 6, 2], as well as Snow White [4], p rovide an upper bound on εofexp(−Ω(√ k)); this should be compared with ε= exp(−Θ(k))for proof-of-work. /T_he significant gap from the known lower bound 1See e.g.,https://digiconomist.net/bitcoin-energy-consumption where it is reported that Bitcoin annual energy consumption is on theorderof at least50Twhrat thetime ofwriting. 2 wasa/t_tributedtoanotable,generala/t_tackthatdistinguishedPo SfromPoW:Knownasthe nothing-at-stake problem, this refers to the ability of an adversarial coalition of pla yers to strategically reuse a winning PoS lo/t_tery to extend multiple blockchains. Our results. Our objective is to control the common-prefix error εas tightly as possible while making minimal assumptions on the underlying blockchainprotocol. We work in a general model formulated by a simple family of blockchainaxioms . /T_heaxiomsthemselvesareeasytointerpretandfewinnumber. /T_hi spermitsustoabstractmany features of the underlying blockchain protocol (e.g., the det ails of the leader-election process, the cryptographic security ofthe relevant signature schemesandhash functions,and randomnessgeneration),while still establishing results that are strong enoughto directlyincorporateinto exis ting specificanalyses. Ourmostinteresting findingisaquitetighttheoryofcommonprefi xthatdepends onlyonthescheduleofpartic- ipantscertified to addablock . Undercommonassumptions about thisschedule,we achieve the optimal relationship ε= exp(−Θ(k)). /T_his directly improves the common prefix guarantees (and se/t_tle ment times) of existing proof- of-stake blockchains such as Snow White [4], Ouroboros [13], O uroboros Praos [6], and Ouroboros Genesis [2]. Specifically, this improves the scaling in the exponent from√ ktokand establishes a tight characterization for ε= exp(−Θ(k)). (In fact, we even obtain reasonable control of the constants.) W e remark that our assumptions about the schedule distribution can be weakened—without any e ffect on the final bounds—to apply to martingale- style distributions such asthose that arise in theanalysis of adaptive adversaries [6,2]. Ournewanalysisoffersanadditional,butlowerorder,improvem entforseveraloftheseblockchains./T_heexisting analysis of, e.g., Ouroboros Praos[6], required a union bound t o be taken over the entire lifetime of the protocol in order to rule out a common prefix violation at a particular poi nt of time; thus such events were actually bounded above by a function of the form Texp(−Ω(√ k)), whereTis the lifetime of the protocol. While this event does dependontheentiredynamicsoftheprotocol,weshowhowtoavoi dthispessimistictailboundtoachievea“single shot” commonprefix violation—at a particular time of interest —of form exp(−Θ(k)); this removes the dependence onT. Froma technicalperspective,we contrastthe structure ofour proofswith existing techniquesfor thePoWcase. /T_he PoW results find a direct connection between common-prefix and th e behavior of a biased, one-dimensional random walk. Interestingly, our results give a tight relationsh ip between the general (e.g., PoS) case and a pair of coupledbiased random walks. A major challenge in the analysis is to bound the behavior of this richer stochastic process. Ourtoolsyieldprecise,explicitupperboundsonth eprobabilityofpersistenceviolationsthatcanbedirectly appliedto tunetheparametersofdeployed PoSsystems. SeeAp pendixAwherewe recordsomeconcreteresultsof the general theory. /T_he importance of these results in the pract ice of PoSblockchainsystems cannot be overstated: theyprovide,forthefirsttime,concreteerrorboundsforse/t_tl ementtimesforPoSblockchainsthatfollowthelongest chainrule. Furtheranalyticdetails. Ourapproachbeginswiththegraph-theoreticframeworkof forksandmargindeveloped fortheanalysisoftheOuroboros[13]protocol.(Aforkisana bstractionoftheprotocolexecutiongiventheoutcomes oftheleader-electionprocess.) Webeginbygeneralizingthe notionofmargintoaccountforlocal,ratherthanglobal, features ofa leader schedule,and provide an exact,recursiv e closedformforthis new quantity (see Section 5). /T_his proof identifies an optimal online adversary (i.e., a fork-buil ding strategy whose current decisions do not depend on the future) for PoS blockchain algorithms with the remark able property that the sequence of forks produced by this adversary simultaneously achieve the worst-case (slot) common-prefix violations assoc iated with all slots (see Section 8). We then study the stochastic process generat ed when the characteristic string —a Boolean string representing theoutcomeoftheleader electionscheme—isgiv en by afamilyofi.i.d. Bernoullirandomvariables. In thiscase,weidentifyageneratingfunctionthatboundsthetaile ventsoffinterest, andanalyticallyupperboundthe growth of the function. We then show how to extend the analysis to t he se/t_ting where the characteristic string is drawn from a martingale sequence. Asit happens, this more genera ldistribution arises naturally in the analysesof PoS protocols that survive adaptive adversaries; e.g., Our oboros Genesis [2]. We obtain the pleasing result that the commonprefix error probability in the martingalecase is nomor e thanthat in the i.i.d. Bernoullicase. 3 Directconsequences. Ourresultsestablishconsistencyboundsinaquitegeneralse/t_ti ng—seebelow: Inparticular, theydirectlyimply exp(−Θ(k))consistencyfortheSleepyconsensus(SnowWhite)[21],Ouroboro s[13],Ouroboros Praos [6],and Ouroboros Genesis [2] blockchainprotocols. (/T_h e Ouroboros Praosand Ouroboros Genesis analyses in factdirectly relied on an earlier e-print version of thepr esent article fortheir se/t_tlement estimates.) Related work. Blockchain protocol analysis in the PoW-se/t_ting was initiated i n [9] and further improved in [24, 11]. /T_he established security bounds for consistency are linear i n the security parameter. Sleepy consensus [21, /T_heorem 13] provides a consistency bound of the form exp(−Ω(√ k)). Note that [21] is not a PoS protocol per se, but it is possible to turn it into one (as was demonstrated in [4]) . /T_he analysis of the Ouroboros blockchain [13] achievesexp(−Ω(√ k)). We remarkthat theanalysesofOuroborosPraos[6]andOurobor osGenesis [2]developed significant new machineryforhandling otherchallenges(e.g.,adap tive adversaries, partial synchrony),but directly referred to apreliminary version ofthis article toconcludet heir guaranteesof exp(−Ω(k)). Our results complement the recent results of [5], which also co nsiders longest-chain PoS protocols. [5] focuses on identifying dynamics unique to longest-chain PoS protocols. I n particular, they show that longest-chain PoS protocols that are predictable (i.e., for which some portion of the schedule of slot leaders is known ahead of time) are necessarily vulnerable to “predictable double-spends.” /T_h e conventional defense against such a/t_tacks is to wait for the specified se/t_tlement time to elapse before accepting a tr ansaction, which (until now) has resulted in slow confirmation times. As such, [5] raised the question of whethe r long confirmation times are a necessary evil in longest-chainPoSblockchains. Asdouble-spendinga/t_tacksimpl yaconsistencyviolation,ourresultsshowthatPoS protocols can safely decrease se/t_tlement times to asymptotic ally match PoW protocols without sacrificing security against double-spends. Becausewefocusonthelongest-chainrule,ouranalysisisnota pplicabletoprotocolslikeAlgorand[15]which, in fact, offer se/t_tlement in expected constant time without invoki ng blockchain reorganisation or forks; however, Algorand lacksthe ability to operate in the “sleepy” [21] or “ dynamic availability” [2] se/t_ting. In our combinatorial analysis, synchronous operation is assumed against a rushing adv ersary; this is without loss of generality vis-a-vis the result of [6] where it was shown how to reduce the combinato rial analysis in the partially synchronous se/t_ting tothesynchronousone. Wenotethatanumberofworkshaveshownhow touseablockchainprotocoltobootstrap acryptographicprotocolthatcanofferfasterse/t_tlementtime understrongerassumptionsthanhonestmajority,e.g., Hybrid Consensus [22] or /T_hunderella [23]; our results are ortho gonal and synergistic to those since they can be used to improve the se/t_tlement time boundsofthe blockchainpro tocolthatoperatesasa fallbackmechanism. Outline. We begin in Section 2 by describing a simple general model for bl ockchain dynamics. Section 3 builds on this model to set down a number of basic definitions required fo r the proofs. /T_he first part of the main proof is described in Section 5, which develops a “relative” version of the theory of margin from [13]; most details are then relegatedtoSection7inordertomovequicklytotheconsiste ncyestimatesinSection6. InSection8,wepresentan optimalonlineadversarywhocansimultaneouslymaximizether elativemarginsforallprefixesofthecharacteristic string. Finally, in Appendix A, we compute exact upper bounds on k-se/t_tlement error probabilities for various valuesof kand describe a simple O(k3)-time algorithmto compute these probabilities in general. 2 /T_heblockchainaxioms and thesettlement security model Typical blockchain consensus protocols call for each partici pant to maintain a blockchain ; this is a data structure thatorganizestransactionsandotherprotocolmetadataintoano rderedhistoricalrecordof“blocks.” Abasicdesign goal of these systems is to guarantee that participants’ block chainsalwaysagree on a commonprefix; the differing suffixesofthechainsheldbyvariousparticipantsroughlycorr espondtothepossiblefuturestatesofthesystem. /T_hus the majoranalytic challengeis to ensure that—despite evolving adversarial control ofsome of the participants—the portion of honest participants’ blockchainsthat might pairwi se disagree is confined to a short suffix. /T_his analysis in turn supports the fundamental guarantee of consistency for these algorithms, which asserts that data appearing deep enoughin the chaincanbe considered to bestable, or “se/t_tl ed.” Weadoptadiscretenotionoftimeorganizedintoasequenceof slots{sl0,sl1,...}andassumeallprotocolpartic- ipantshavetheluxuryofsynchronizedclocksthatreportthecu rrentslotnumber. Asdiscussedabove,theprotocols 4 we consider rely on two algorithmicdevices: • Aleader election mechanism , which randomly assigns to each time slot a set of “leaders” per mi/t_ted to post a new blockin that slot. • /T_helongest-chain rule , which calls for the leader(s) of each slot to add a block to th e end of the longest blockchainshe hasyet observed, and broadcastthis new chain t oother participants. /T_he Bitcoin protocol uses a proof-of-work mechanism to carry o ut leader election, which can be modeled using a random oracle [9, 24, 11]. Proof-of-stake systems typically require more intricate leader election mechanisms; for example, the Ouroboros protocol [13] uses a full multi-part y private computation to distribute clean randomness, whileSnowWhite[4],Algorand[15],andOuroborosPraos[6]use hashingandafamilyofvaluesdeterminedon-the- fly. Despite these differences, all existing analyses show that t he leader election mechanism suitably approximates an ideal distribution, whichis also theapproachwe will adop t forouranalysis. 2.1 /T_he blockchain axioms and forks Tosimplifyouranalysis,we assumeasynchronouscommunication networkinthepresence ofa rushingadversary: in particular,anymessagebroadcastbyanhonest participant a t thebeginningofaparticular slotisreceived bythe adversary first, who may decide strategically and individuall y for each recipient in the network whether to inject additional messages and in what order all messages are to be del ivered prior to the conclusion of the slot. (See §2.5 below forcommentson thisnetwork assumption.) Given this, the behavior of the protocol when carried out by a group of honest participants (who follow the protocol in the presence of an adversary who may only reorganize messages) is clear. Assuming that the system is initialized withacommon“genesisblock”correspondingto sl0andtheleaderelectionprocessinfactelectsasingle leader perslot, theplayersobserve a common,linearly growing blockchain: 012... Herenode irepresentstheblockbroadcastbytheleaderofslot iandthearrowsrepresentthedirectionofincreasing time. (Note that the requirement of a single leader per slot is i mportant in this simple picture; it is possible for a network adversary to induce divergent views between the player s by taking advantage of slots where more than a single honest participant iselecteda leader.) /T_he blockchain axioms: Informal discussion. /T_he introduction of adversarial participants or multiple slot leaders complicates the family of possible blockchains that could emerge from this process. To explore this in the context of our protocols, we work with an abstract notion of a bl ockchain which ignores all internal structure. We consider a fixed assignment of leaders to time slots, and assume th at the blockchain uses a proof mechanism to ensure that anyblocklabeled with slot sltwasindeed producedbya leader ofslot slt; thisis guaranteedin practice byappropriate use of asecure digital signature scheme. Specifically,we treat a blockchain asa sequenceofabstract blocks,eachlabeledwith a slot numbe r,so that: A1. /T_heblockchainbeginswith a fixed “genesis” block,assigned to s lotsl0. A2. /T_he(slot) labelsofthe blocksare in strictly increasing orde r. Itisfurtherconvenienttointroducethestructureofadirected graphonourpresentation,whereeachblockistreated as a vertex; in light of the first two axioms above, a blockchai n is a path beginning with a special “genesis” vertex, labeled0,followedby vertices with strictly increasing labelsthat ind icate whichslot is associatedwith theblock. 024579 /T_he protocolsofinterest callforhonest playersto add a singleblockduringany slot. Inparticular: 5 A3. If a slot sltwas assigned to a single honest player, then a single blockis crea ted—during the entire protocol— with thelabel slt. Recallthatblockchainsare immutable inthesensethatanyblockinthechaincommitstotheentireprev ioushistory of the chain; this is achieved in practice by including with each block a collision-free hash of the previous block. /T_hesepropertiesimplythatifaspecificslot sltwasassignedtoauniquehonestplayer,thenanychainthatinclude s the unique blockfrom sltmust also includethat block’sassociated prefix in its entiret y. Asweanalyzethedynamicsofblockchainalgorithms,itisconve nienttomaintainanentirefamilyofblockchains at once. As a ma/t_ter of bookkeeping, when two blockchains agree on a common prefix, we can glue together the associated pathsto reflectthis, asindicated below. 024579 89 Whenwegluetogethermanychainstoformsuchadiagram,wecall ita“fork”—theprecisedefinitionappearsbelow. Observe thatwhilethesetwoblockchainsagreethroughtheve rtex (block)labeled5,theycontain(distinct)vertices labeled 9; this reflectstwo distinct blocksassociated with s lot 9 which,in light of the axiom above, must have been producedbyan adversarial participant. Finally, as we assume that messages from honest players are del ivered without delay, we note a direct conse- quenceof thelongest chain rule: A4. If two honestly generated blocks B1andB2are labeled with slots sl1andsl2for which sl1<sl2, then the length of the unique blockchain terminating at B1is strictly less than the length of the unique blockchain terminating at B2. Recall that the honest participant assigned to slot sl2will be aware of the blockchain terminating at B1that was broadcast by the honest player in slot sl1as a result of synchronicity; according to the longest-chain rul e, it must have placed B2on a chain that was at least this long. In contrast, not all partic ipants are necessarily aware of all blocks generated by dishonest players, and indeed dishonest play ers may o/f_ten want to delay the delivery of an adversarial block to a participant or show one block to some par ticipants and show a completely different block to others. Characteristic strings, forks, and the formal axioms. Note that with the axioms we have discussed above, whetherornotaparticularforkdiagram(suchastheonejustab ove)correspondstoavalidexecutionoftheprotocol depends on how the slots have been awarded to the parties by the leader election mechanism. We introduce the notion of a “characteristic” string as a convenient means of repres enting information about slot leaders in a given execution. Definition1 (Characteristic string) .Let sl1,...,slnbeasequence of slots. A characteristic string wis an element of {0,1}ndefinedfora particular execution of ablockchain protocol s o that wt=/braceleftBigg 0if sltwas assigned to asinglehonest participant , 1otherwise. Fortwo Booleanstrings xandw,we write x≺wiffxisastrict prefixof w. Similarly,we write x/√recedesequalwiffeither x=worx≺w. /T_heemptystring εisaprefixtoanystring. Withthisdiscussionbehindus,wesetdo wntheformal object we use to reflect the various blockchains adopted by hone st players during the execution of a blockchain protocol. /T_hisdefinition formalizestheblockchainsaxiomsdi scussed above. Definition 2 (Fork; [13]) .Letw∈{0,1}nand letH={i|wi= 0}. Aforkfor the string wconsists of a directed androotedtree F= (V,E)withalabeling ℓ:V→{0,1,...,n}. Weinsistthat each edgeof Fisdirectedaway from the rootvertex and further requirethat 6 (F1.) therootvertex rhaslabel ℓ(r) = 0; (F2.) thelabels ofvertices along any directedpath are stri ctly increasing; (F3.) each index i∈Histhe label for exactly one vertex of F; (F4.) forany vertices i,j∈H, ifi < j, then thedepth of vertex iinFisstrictly less than thedepth of vertex jinF. IfFis a fork for the characteristic string w, we write F⊢w. Note that the conditions (F1.)–(F4.) are direct analogues of the axioms A1–A4 above. See Fig. 1 for an example f ork. A final notational convention: If F⊢xand ˆF⊢w,wesaythat FisaprefixofˆF,wri/t_tenF⊑ˆF,ifx/√recedesequalwandFappearsasaconsistently-labeledsubgraphof ˆF. (Specifically,eachpath of Fappears,with identical labels,in ˆF.) w=01 122 03 14 44 05 06 17 18 09 0 Figure1: Afork Fforthecharacteristicstring w= 010100110 ;verticesappearwiththeirlabelsandhonestvertices arehighlightedwithdoubleborders. Notethatthedepthsof the(honest)verticesassociatedwiththehonestindices ofware strictly increasing. Note, also,that thisforkhastwo dis joint pathsofmaximumdepth. Letwbe a characteristic string. /T_he directed paths in the fork F⊢woriginating from the root are called tines; these are abstract representations of blockchains. (Note that a tine might not terminate at a leaf of the fork.) We naturallyextend thelabelfunction ℓfortines: i.e., ℓ(t)/definesℓ(v)wherethetine tterminates atvertex v. /T_helengthof a tinetis denotedby length(t). Viable tines. /T_he longest-chain rule dictates that honest players build on ch ains that are at least as long as all previously broadcast honest chains. It is convenient to distingui sh such tines in theanalysis: specifically,a tine tof Fis calledviableif its length is at least the depth of any honest vertex vfor which ℓ(v)≤ℓ(t). A tinetisviable at slotsiftheportionof tappearingover slots 0,...,shaslengthatleast thatofanyhonestverticeslabeledfromthis set. (Asnoted,the properties(F3.) and(F4.) togetherimplyt hat anhonestobserver at slot swillonlyadoptaviable tine.) /T_he honest depth functiond:H→[n]gives the depth of the (unique) vertex associated with an hones t slot; by(F4.),d(·)isstrictly increasing. 2.2 Settlement and thecommon prefixproperty We are now ready to explore the power of an adversary in this se/t_t ing who has corrupted a (perhaps evolving) coalition of the players. We focus on the possibility that su ch an adversary can blatantly confound consistency of thehonestplayer’sblockchains.Inparticular,weconsiderth epossibilitythat,atsometime t,theadversaryconspires toproducetwoblockchainsofmaximumlengththatdivergeprio rtoapreviousslot s≤t;inthiscasehonestplayers adopting the longest-chainrule mayclearlydisagree about th e history of theblockchaina/f_ter slot s. We call sucha circumstancea se/t_tlement violation . To reflect this in our abstract language, let F⊢wbe a fork corresponding to an execution with characteristic stringw. Such a se/t_tlement violation induces two viable tines t1,t2with the same length that diverge prior to a particular slot ofinterest. We recordthisbelow. Definition3 (Se/t_tlementwithparameters s,k∈N).Letw∈{0,1}nbeacharacteristic string. Let F⊢w1...wtbe aforkforaprefixof wwiths+k≤t≤n. Wesaythataslot sisnotk-se/t_tledinFiftheforkcontainstwotines t1,t2 7 of maximum length that “diverge prior to s,” i.e., they either contain different vertices labeled with s, or one contains a vertexlabeledwith swhiletheotherdoesnot. Notethatsuchtinesareviablebyde finition. Otherwise, slotsisk-se/t_tled inF. We say that a slot sisk-se/t_tled(for the characteristic string w) if it isk-se/t_tled in every fork F⊢w1,...wt, for eacht≥s+k. Common prefix. Se/t_tlement violations are a convenient and intuitive proxy for the not ion of common prefix discussed in the introduction. Indeed, as we show in Section 4, t he two notions are equivalent, so we have the luxuryofdiscussing se/t_tlementviolationswhichhavetheadvant ageofamorereadyinterpretation. Concretely,we will simultaneously upper bound—using the same analytic techniq ues—the probability of se/t_tlement violations and commonprefix violations. Recallthatthecommonprefixpropertywithparameter kassertsthat,foranyslotindex s,ifanhonestobserver atslots+kadoptsablockchain C,theprefixC[0 :s]willbepresentineveryhonestly-heldblockchainatora/f_tersl ot s+k. (Here,C[0 :s]denotestheprefix oftheblockchain Ccontainingonlytheblocksissued fromslots 0,1,...,s.) Wetranslatethispropertyintotheframeworkofforks. Conside ratinetofaforkF⊢w. /T_hetrimmedtinet⌈kis definedastheportionof tlabeledwithslots{0,...,ℓ(t)−k}. Fortwotines,weusethenotation t1/√recedesequalt2toindicate that the tine t1is a prefix oftine t2. Definition 4 (Common Prefix Property with parameter k∈N).Letwbe a characteristic string. A fork F⊢w satisfiesk-CPslotif, forall pairs (t1,t2)ofviabletines Fforwhich ℓ(t1)≤ℓ(t2), wehave t⌈k 1/√recedesequalt2. Otherwise, wesay that the tine-pair (t1,t2)isa witness to a k-CPslotviolation. Finally, wsatisfiesk-CPslotif every fork F⊢wsatisfies k-CPslot. If a string wdoes not possess the k-CPslotproperty, we say that wviolatesk-CPslot. Observe that we defined the common prefix property in terms of deleting any blocks assoc iated with the lastktrailing slots from a local blockchainC. Traditionally (cf. [10]), this property has been defined in te rms of deleting a suffix of (block-)length kfromC. We denote the block-deletion-based version of the common pre fix property as the k-CPproperty. Note, however, that a k-CPviolation immediately implies a k-CPslotviolation, so bounding the probability of a k-CPslot violation issufficient to ruleout both events. 2.3 Adversarialattacks onsettlementtime;thesettlement game To clarify the relationship between forks and the chains at play in a canonical blockchain protocol, we define a game-based model below that explicitly describes the relat ionship between forks and executions. By design, the probabilitythattheadversary winsthisgameisatmostthepr obabilitythataslot sisnotk-se/t_tled. Weremarkthat whilewe focusonse/t_tlement violations forclarity,onecouldeq uallywell have designedthe gamearound common prefix violations. Considerthe (D,T;s,k)-se/t_tlementgame ,playedbetweenanadversary AandachallengerCwithaleaderelec- tion mechanismmodeledbyan ideal distribution D. Intuitively, thegameshould reflecttheability oftheadver sary to achieve a se/t_tlement violation; that is, to present two maxima lly-long viable blockchains to a future honest ob- server, thus forcing them to choose between two alternate hist ories which disagree on slot s. /T_he challenger plays the role(s)of the honest playersduringthe protocol. Notethat in typicalPoSse/t_tingsthe distribution Disdetermined bythecombinedstake heldbythe adversarial players, the leader election mechanism,and the dynamicsof the protocol. /T_he most commoncase (asseen in Snow White [21] and Ouroboros [13]) guarantees that the characteri stic string w=w1...wTis drawn from an i.i.d. distribution for which Pr[wi= 1]≤(1−ǫ)/2; here the constant (1−ǫ)/2is directly related to the stake held by the adversary. Se/t_tings involving adaptive adversaries (e.g., Ouroboros Praos [6] and Ouroboros Genesis [2]) yield the weakermartingale-type guaranteethat Pr[wi= 1|w1,...,w i−1]≤(1−ǫ)/2. 8 /T_he(D,T;s,k)-settlementgame 1. A characteristic string w∈{0,1}Tis drawn fromDand provided toA. (/T_his reflects the results ofthe leaderelection mechanism.) 2. LetA0⊢εdenotetheinitial forkfortheemptystring εconsisting ofasinglenodecorresponding tothe genesis block. 3. Foreachslot t= 1,...,Tin increasing order: (a) Ifwt= 0, this is an honest slot. In this case, the challenger is given th e forkAt−1⊢ w1...wt−1and must determine a new fork Ft⊢w1...wtby adding a single vertex (la- beledwith t)totheendofalongestpathin At−1. (Ifthereareties,Amaychoosewhichpath the challengeradopts.) (b) Ifwt= 1, this is an adversarial slot. Amay setFt⊢w1...wtto be an arbitrary fork for whichAt−1⊑Ft. (c) (Adversarial augmentation.) Adeterminesan arbitrary fork At⊢w1...,wtfor which Ft⊑ At. Recallthat F⊑F′indicates that F′contains, asaconsistently-labeled subgraph,the fork F. Awinsthe se/t_tlement game if slotsis notk-se/t_tled in some fork At(witht≥s+k). Definition5. LetDbea distribution on {0,1}T. /T_hen definethe (s,k)-se/t_tlement insecurity ofDto be Ss,k[D]/definesmax APr[Awinsthe(D,T;s,k)-se/t_tlementgame ], this maximum taken over all adversaries A. Remarks. Observe that the adversarial augmentation step permits the a dversary to “suddenly” inject new paths in the fork between two honest players at adjacent slots; this c orresponds to circumstances when the adversary chooses to deliver a new blockchain to an honest participant whi ch may consist of an earlier honest chain with someadversarial blocksappendedtotheend. Observe, additio nally,thatthebehaviorofthechallengerin thegame is entirely deterministic, as it simply plays according to the l ongest-chain rule (even permi/t_ting the adversary to break ties). /T_hus the result of the game is entirely determined b y the characteristic string wdrawn fromDand the choicesof theadversary A. We recordthe followingimmediate conclusion: Lemma 1. Lets,k,T∈N. LetDbeadistribution on {0,1}T. /T_hen Ss,k[D]≤Pr w∼D[slotsisnotk-se/t_tled for w]. Inthesubsequentsections,wewilldevelopsomefurthernotati onandtoolstoanalyzethisevent. Wewillinvesti- gatetwodifferentfamiliesofdistributions,thosewithi.i.d .coordinatesandthosewithmartingale-typeconditioning guarantees. For T∈Nandǫ∈(0,1), letBǫ= (B1,...,B n)denote the random variable taking values in {0,1}n sothat the Biareindependent and Pr[Bi= 1] = (1−ǫ)/2;we letBǫdenotethedistribution on {0,1}nassociated withBǫ. Whenǫcan beinferred fromcontext,we simplywrite BandB. We also study amore generalfamilyof distributions, defined next . Definition 6 (ǫ-martingale condition) .LetW= (W1,...,W n)be a random variable taking values in {0,1}n. We say thatWsatisfies the ǫ-martingalecondition iffor each t∈{1,...,n}, E[Wt|W1,···,Wt−1]≤(1−ǫ)/2. Equivalently, Pr[Wt= 1|W1,...,W t−1]≤(1−ǫ)/2. /T_he conditioning on the variables W1,···,Wt−1isarbitrary in both cases; as a consequence, Pr[Wt= 1]≤(1−ǫ)/2. As a ma/t_ter of notation, we let Wdenote the distribution 9 associated with the random variable W. We use the term “ ǫ-martingale condition” to qualify both a random variable and itsdistribution. /T_here are se/t_tings, such as Genesis [2], where this martingale-ty pe conditioning is important. Note that Bǫ satisfies the ǫ-martingalecondition. Now we are ready to state ourmain theore m. /T_heorem 1 (Main theorem) .Letǫ∈(0,1),s,k,T∈N. LetWandBǫbe two distributions on {0,1}TwhereBǫis definedabove andWsatisfies the ǫ-martingalecondition. /T_hen Ss,k[W]≤Ss,k[Bǫ]≤exp/parenleftbig −Ω(ǫ3(1−O(ǫ))k)/parenrightbig . (Here, the asymptotic notation hidesconstants that donot d ependon ǫork.) Bytechniques similar to the ones used to prove this result, we o btain the following theorem pertaining directly tok-CPslot(andk-CP). /T_heorem2 (Maintheorem; k-CPversion).Letǫ∈(0,1)andT∈N. Letw∈{0,1}Tbearandomvariablesatisfying theǫ-martingalecondition. /T_hen Pr[wviolatesk-CP]≤Pr[wviolatesk-CPslot]≤T·exp/parenleftbig −Ω(ǫ3(1−O(ǫ))k)/parenrightbig . /T_he proofs of these theoremsare presented in Section 6.5. Addi tionally, we provide a O(k3)-time algorithm for computingan explicit upperbound onthese probabilities; cf. AppendixA. 2.4 Survey oftheproofsof themain theorems A central object in our combinatorial analysis is an “ x-balanced fork” for a characteristic string w=xy. Such a fork contains two distinct, maximum-lengthtines that are disjoi nt overy; see Definition 9 for details. A se/t_tlement violation for the slot |x|+1implies an x-balanced fork for the string xy; see Observation 1. In particular, for any distribution oncharacteristic strings in {0,1}nands+k≤n, Pr w[slotsis notk-se/t_tled]≤Pr w there isa decomposition w=xyzand a forkF⊢xy, where|x|=s−1and |y|≥k+1,so thatFisx-balanced . (/T_hisis avariant ofLemma5fromSection 6.5.) Aspromisedabove,commonprefixviolationscanbehandledthes ameway: welikewiseestablish(seeSection4; /T_heorem3)thatacommonprefixviolationimpliesthatthereex istsabalancedforkforsomeprefixof w. Specifically, forany distribution ofcharacteristicstrings, Pr w[wviolatesk-CPslot]≤Pr w/bracketleftBiggthereisa decomposition w=xyzand a forkF⊢xy, where|y|≥k+ 1, so thatFisx-balanced/bracketrightBigg . (1) Next,inSection5,wegivearecursiveexpressionforthecom binatorialquantity“relative margin,”wri/t_ten µx(y) (seeDefinition13inSection3). Weestablishthat,foranarbi trarydecompositionofthecharacteristicstring w=xy, theevent “thereisan x-balancedforkfor xy”isequivalenttotheevent “therelative margin µx(y)isnon-negative;” thisisFact1. InLemma3,wedevelopanexactrecursiveprese ntationfor µx(y);hencewecanboundtheprobability ofacommonprefixviolation(orase/t_tlementviolation)byreaso ningaboutthenon-negativityoftherelativemargin and,in particular,without reasoning directly aboutforks. InSection 6,we prove two boundsforthe probability Prw=xy |x|=s[µx(y)≥0], fora fixed length s. /T_he first boundpertains to the se/t_ting where w=xyis drawn fromBǫ. /T_he secondpertains to anydistributionWsatisfyingthe ǫ-martingalecondition. Forcharacteristicstringswithdistri butionBǫ,weidentify 10 arandomvariablewhichstochasticallydominates µx(y)andisamenabletoexactanalysisviageneratingfunctions; this yieldsthe bound Pr w=xy[µx(y)≥0]≤exp(−Ω(|y|)). Noticethatthisbounddoesnotdependon s,thelengthof x. /T_heresult fordistributions satisfying the ǫ-martingale condition then followsfromstochastic dominance(Lemma4). Se e Section 6fordetails. Itimmediatelyfollowsthatan (s,k)-se/t_tlementviolation(ora k-CPslotviolation)isarareeventfordistributions ofinterest. /T_hemultiplicative factor Tin /T_heorem2 comesfroma union boundtaken over all prefixes of w. 2.5 Comments onthemodel Analysisinthe ∆-synchronoussetting. /T_hesecuritygameabovemostnaturallymodelsablockchainpro tocol over a synchronous network with immediate delivery (because ea ch “honest” play of the challenger always builds on a fork that contains the fork generated by previous honest play s). However, the model can be easily adapted to protocolsinthe ∆-synchronousmodeladoptedbytheSnowWhiteandOuroborosPraos protocolsandanalyses. In particular, David et al. [6] developed a “ ∆-reduction” mapping on the space of characteristic strings tha t permits analysesofforks(and therelatedstatistics ofinterest, cf. § 3)in the∆-synchronousse/t_ting byadirectappeal tothe synchronousse/t_ting. Publicleaderschedules. Onea/t_tractivefeatureofthismodelisthatitgivestheadvers aryfullinformationabout the future schedule of leaders. /T_he analysis of some protocols indeed demand this (e.g., Ouroboros, Snow White). Other protocols—especially those designed to offer security against adaptive adversaries (Praos, Genesis)—in fact contrive to keep the leader schedule private. Of course, as ou r analysis is in the more difficult “full information” model,it appliesto all ofthese systems. Bootstrappingmulti-phasealgorithms;stakeshi/f_t. Weremarkthatseveralexistingproof-of-stakeblockchain protocols proceed in phases, each of which is obligated to ge nerate the randomness (for leader election, say) for the next phase based on the current stake distribution. /T_he block chain security properties of each phase are then individually analyzed—assumingcleanrandomness—whichyields arecursivesecurityargument;inthiscontextthe gameoutlined above precisely reflectsthe single phase analysi s. 3 Definitions WerelyontheelementaryframeworkofforksandmarginfromKia yiasetal.[13]. Werestateandbrieflydiscussthe pertinent definitions below. With these basic notions behind us, we t hen define a new “relative” notion of margin, whichwill allow usto significantly improve theefficacyofthese toolsforreasoning aboutse/t_tlement times. Recallthatfora given execution oftheprotocol,we recordt he result ofthe leaderelectionprocessvia a charac- teristicstring w∈{0,1}T,definedsuchthat wi= 0whenauniqueandhonestpartyisassignedtoslot iandwi= 1 otherwise. Avertex ofa forkissaid to be honestif it islabeledwith an index isuchthat wi= 0. Definition7 (Tines,length,andheight) .LetF⊢wbeaforkforacharacteristicstring. A tineofFisadirectedpath starting from the root. For any tine twe define its lengthto be the number of edges in the path, and for any vertex v we define its depthto be the length of the unique tine that ends at v. If a tine t1is a strict prefix of another tine t2, we writet1≺t2. Similarly, if t1isa non-strictprefixof t2, we write t1/√recedesequalt2. /T_helongest common prefixof two tines t1,t2 is denoted by t1∩t2. /T_hat is,ℓ(t1∩t2) = max{ℓ(u) :u/√recedesequalt1andu/√recedesequalt2}. /T_heheightof a fork (as usual for a tree) isthe length of thelongest tine, denoted height(F). Definition 8 (/T_he∼xrelations) .For two tines t1andt2of a fork F, we write t1∼t2whent1andt2share an edge; otherwise we write t1≁t2. We generalize this equivalence relation to reflect whether tines share an edge over a particular suffix of w: forw=xywe define t1∼xt2ift1andt2share an edge that terminates at some node labeled with an index in y; otherwise, we write t1≁xt2(observe that in this case the paths share no vertex labeled b y a slot 11 associated with y). We sometimes call such pairs of tines disjoint(or, ift1≁xt2for a string w=xy,disjoint over y). Note that∼and∼εarethe same relation. /T_hebasic structure we use touse to reason aboutse/t_tlement time sis that ofa “balancedfork.” Definition 9 (Balanced fork; cf. “flat” in [13]) .A forkFisbalanced if it contains a pair of tines t1andt2for which t1≁t2andlength(t1) = length( t2) = height( F). We definea relative notion ofbalance as follows: afork F⊢xyis x-balanced if itcontains apair of tines t1andt2for which t1/ne}ationslash∼xt2andlength(t1) = length( t2) = height( F). /T_hus, balanced forks contain two completely disjoint, maximum- length tines, while x-balanced forks contain two maximum-lengthtines that may share edgesin xbut must be disjoint over the rest of the string. See Figures 2 and 3forexamplesof balancedforks. w=01 12 03 14 05 16 0 Figure 2: Abalancedfork w=01 02 03 14 05 16 0 Figure 3: An x-balancedfork,where x= 00 Balanced forks and settlement time. A fundamental question arising in typical blockchain se/t_tings is how to determine se/t_tlementtime ,thedelaya/f_terwhichthecontentsofaparticularblockofablo ckchaincanbeconsidered stable. /T_he existence of a balanced fork is a precise indicator fo r “se/t_tlement violations” in this sense. Specifically, consider a characteristic string xyand a transaction appearing in a block associated with the first s lot ofy(that is, slot|x|+1). One clear violation of se/t_tlement at this point of the executio n is the existence of two chains—eachof maximumlength—whichdiverge priortoy;inparticular,thisindicatesthatthereisan x-balancedfork Fforxy. Let usrecordthis observation below. Observation 1. Lets,k∈Nbe given and let wbe a characteristic string. Slot sis notk-se/t_tled for the characteristic stringwif there exist adecomposition w=xyz,where|x|=s−1and|y|≥k+1,and anx-balanced forkfor xy. In fact, every k-CPslotviolation produces a balanced fork as well; see /T_heorem 3 in Sec tion 4. In particular, to provide a rigorous k-slot se/t_tlement guarantee—which is to say that the transaction can be considered se/t_tled once kslots have gone by—it suffices to show that with overwhelming pro bability in choice of the characteristic string determinedbytheleaderelectionprocess(ofafullexecutio noftheprotocol),nosuchforksarepossible. Specifically, if the protocol runs for a total of Ttime steps yielding the characteristics string w=xy(wherew∈{0,1}Tand thetransactionofinterest appearsinslot |x|+1asabove)thenit sufficestoensurethatthere isno x-balancedfork 12 forxˆy,whereˆyisanarbitraryprefixof yoflengthatleast k+1;seeCorollary1in Section6. Notethatforsystems adoptingthelongestchainrule,thisconditionmustnecessaril yinvolve the entirefuturedynamics oftheblockchain. We remarkthat our analysisbelow will in fact let ustake T=∞. Definition10 (Closedfork) .AforkFisclosedifeveryleafishonest. Forconvenience, wesaythetrivialf orkisclosed. Closed forks have two nice properties that make them especial ly useful in reasoning about the view of honest parties. First, a closed fork must have a unique longest tine (si nce honest parties are aware of all previous honest blocks,andhonest parties observe the longestchain rule). Sec ond,recallingour description of these/t_tlement game, closedforksintuitively capturedecisionpointsfortheadve rsary. /T_headversarycanpotentiallyshowmanytinesto manyhonestparties,butonceanhonestnodehasbeenplacedontopo fatine,anyadversarialblocksbeneathitare partofthepublicrecordandare visible toallhonestparties. Forthesereasons, wewill o/f_ten findit easier to reason about closedforksthanarbitrary forks. /T_he next few definitions are the start of a general toolkit for reaso ning about an adversary’s capacity to build highlydiverging pathsin forks,based onthe underlyingcharac teristic string. Definition 11 (Gap, reserve, and reach) .For a closed fork F⊢wand its unique longest tine ˆt, we define the gapof a tinetto begap(t) = length( ˆt)−length(t). Furthermore, we define the reserveoft, denoted reserve(t), to be the numberof adversarial indicesin wthat appeara/f_ter theterminating vertex of t. Moreprecisely, if visthelast vertex of t, then reserve(t) =|{i|wi= 1andi > ℓ (v)}|. /T_hesequantities together definethe reachof atine: reach(t) = reserve( t)−gap(t). /T_he notion of reach can be intuitively understood asa measurement of the resources available to our adversary inthese/t_tlementgame. Reserve tracksthenumberofslotsinwhi chtheadversaryhastherighttoissue newblocks. When reserve exceeds gap (or equivalently, when reach is nonnega tive), such a tine could be extended—using a sequenceof dishonest blocks—untilit is aslongasthelongest tine . Sucha tine couldbe offered to an honest player who would prefer it over, e.g., the current longest tine in the fo rk. In contrast, a tine with negative reach is too far behind to bedirectly useful to the adversary at that time. Definition12 (Maximumreach) .Foraclosedfork F⊢w, wedefine ρ(F)tobethelargestreacha/t_tainedbyanytine ofF, i.e., ρ(F) = max treach(t). Note that ρ(F)is never negative (as the longest tine of any forkalways has r each at least 0). We overload this notation to denote the maximum reach over all forksfor agiven charact eristic string: ρ(w) = max F⊢w Fclosed/bracketleftbig max treach(t)/bracketrightbig . Definition13 (Margin)./T_hemarginofa forkF⊢w, denoted µ(F), isdefinedas µ(F) = max t1≁t2/parenleftbig min{reach(t1),reach(t2)}/parenrightbig , (2) wherethismaximumisextendedoverallpairsofdisjointtin esofF;thusmarginreflectsthe“secondbest”reachobtained overalldisjointtines. Inordertostudysplitsinthechain overparticularportionsofastring,wegeneralizethistod efine a“relative” notion of margin: If w=xyfortwo strings xandyand, as above, F⊢w, we define µx(F) = max t1≁xt2/parenleftbig min{reach(t1),reach(t2)}/parenrightbig . Note that µε(F) =µ(F). Forconvenience, weonceagainoverload thisnotation toden otethemarginofastring. µ(w)referstothemaximum value ofµ(F)over all possibleclosed forks Fforacharacteristic string w: µ(w) = max F⊢w, Fclosedµ(F). 13 Likewise, if w=xyfortwo strings xandywedefine µx(y) = max F⊢w, Fclosedµx(F). Notethat,atleastinformally,“second-best”tinesareofnatur alinteresttoanadversaryintentontheconstruction ofanx-balancedfork,whichinvolves two (partially disjoint) long ti nes. Balanced forks and relative margin. Kiayias et al. [13] showed that a balanced fork can be construct ed for a given characteristicstring wif andonlyif thereexists someclosed F⊢wsuchthat µ(F)≥0. We recordarelative version ofthistheorembelow,whichwill ultimatelyallow u stoextend the analysisof[13]to moregeneralclassof disagreement and se/t_tlement failures. Fact 1.Letxy∈{0,1}nbeacharacteristic string. /T_hen there isan x-balanced fork F⊢xyif andonly if µx(y)≥0. Proof./T_he proofis immediatefrom thedefinitions. We sketchthe detail s forcompleteness. SupposeFis anx-balanced fork for xy. /T_henFmust contain a pair of tines t1andt2for which t1/ne}ationslash∼xt2and length(t1) = length( t2) = height( F). We observe that (1) gap(ti) = 0forbotht1andt2,and (2)reserve isalways a nonnegative quantity. Together with the definition of reach, these two facts immediately imply reach(ti)≥0. Becauset1andt2are edge-disjoint over yandmin{reach(t1),reach(t2)}≥0,we conclude that µx(y)≥0, as desired. Supposeµx(y)≥0. /T_hen there is some closed fork Fforxysuch that µx(F)≥0. By the definition of relative margin, we know that Fhas two tines t1,t2such that t1≁xt2andreach(ti)≥0. Recall that we define reach by reach(t) = reserve( t)−gap(t), and so in this case it follows that reserve(ti)−gap(ti)≥0. /T_hus, an x-balanced forkF′⊢xycanbe constructedfrom Fbyappending apath of gap(ti)adversarial vertices to each ti. Asindicated above,we candefine the “forkability” ofa charact eristic string in termsofits margin. Definition 14 (Forkable strings) .A charactersitic string wisforkableif its margin is non-negative, i.e., µ(w)≥0. Equivalently, wisforkable ifthere isabalanced forkfor w. Althoughthisdefinition is notnecessary forour presentation, it reflectstheterminologyof existing literature. 4 Common prefix violation and balanced forks In this section, we show that a common prefix violation implies the existence of a balanced fork. /T_his allows us to bound consistency errors by reasoning about balanced forks. In par ticular, inequality (1) is a direct consequenceof the theorembelow. /T_heorem 3. Letk,T∈N. Letw∈{0,1}Tbe a characteristic string which violates k-CPslot. /T_hen there exist a decomposition w=xyzand afork ˆF⊢xy, where|y|≥k+1, so thatˆFisx-balanced. Proof.Recall that ℓ(t)is the slot index of the last vertex of tine t. DefineA/defines/uniontext F⊢wAFwhere, for a given fork F⊢w,define AF/defines/braceleftBigg (τ1,τ2) :τ1,τ2are two viable tines in the fork F, ℓ(τ1)≤ℓ(τ2), and the pair (τ1,τ2)is a witness to a k-CPslotviolation/bracerightBigg . Define the slot divergence of two tines as divslot(τ1,τ2)/definesℓ(τ1)−ℓ(τ1∩τ2)whereτ1∩τ2denotes the common prefix of thetines τ1andτ2. Recallingthe definition ofa k-CPslotviolation, it isclearthat divslot(τ1,τ2)≥k+1forall(τ1,τ2)∈A. (3) Notice that there must be atine-pair (t1,t2)∈Awhichsatisfies the followingtwo conditions: divslot(t1,t2)ismaximalover A,and (4) |ℓ(t2)−ℓ(t1)|isminimal amongalltine-pairs in Aforwhich(4)holds. (5) /T_he tines t1,t2will play aspecial rolein ourproof;let Fbea forkcontainingthese tines. 14 /T_he prefix x, forkFx, and vertex u.Letudenote the last vertex on the tine t1∩t2, as shown in the diagram below,andlet α/definesℓ(u) =ℓ(t1∩t2). Letx/definesw1,...,w αandletFxbethefork-prefixof Fsupportedon x. Wewill arguethat umustbehonestand,inaddition,that Fxmustcontainauniquelongesttine tuterminatingatthevertex u. We will also identify a substring y,|y|≥k+1such that wcanbe wri/t_ten as w=xyz. /T_hen we will construct a balanced fork ˜Fy⊢yby modifying the subgraph of Fsupported on y. We will finish the proof by constructing an x-balancedforkbysuitably appending ˜FytoFx. ut1 t2 umustbeanhonestvertex. We observe,first ofall,thatthe vertex ucannotbeadversarial: otherwise it iseasy to construct an alternative fork F′⊢wand a pair of tines in F′that violate (4). Specifically, construct F′fromF byaddinganew(adversarial)vertex u′toFforwhich ℓ(u′) =ℓ(u),addinganedgeto u′fromthevertexpreceding u, and replacing the edge of t1following uwith one from u′; then the other relevant properties of the fork are maintained,but the slot divergence of the resulting tines hasincr eased by atleast one. (See the diagrambelow.) uu′ t1 t2 Fxhasaunique,longest(andhonest)tine tu.Asimilarargumentimpliesthatthefork Fxhasauniquevertex of depthdepth(u): namely, uitself. In the presence of another vertex u′(ofFx) with depth depth(u), “redirecting” t1throughu′(as in the argument above) would likewise result in a fork with a larger slot divergence. To see this, noticethat ℓ(u′)mustbestrictlylessthan ℓ(u)sinceℓ(u)isanhonestslot(whichmeans uistheonlyvertexatthat slot). /T_hus ℓ(·)wouldindeed beincreasing alongthisnew tine (resulting fromredir ectingt1). Asαisthelast index of the string x, this additionally implies that Fxhas no vertices of depth exceeding depth(u). Lettu∈Fxbe the tine with ℓ(tu) =α. /T_hehonest tine tuis the unique longest tine in Fx. (6) Identifying y.Letβdenotethesmallesthonestindex of wforwhich β≥ℓ(t2),with theconvention thatifthere is no such index we define β=T+ 1. Observe that β−1≥ℓ(t1). (Ifℓ(t2)is an honest slot then β=ℓ(t2)but ℓ(t1)< ℓ(t2). /T_he case ℓ(t1) =ℓ(t2)is possible if ℓ(t2)is an adversarial slot; but then β > ℓ(t2).) /T_hese indices, α andβ,distinguish thesubstrings y=wα+1...wβ−1andz=wβ...wT;wewillfocuson yintheremainderofthe proof. Since the function ℓ(·)is strictly increasing alonganytine, observe that |y|=β−α−1≥ℓ(t1)−ℓ(u)≥k+1. Henceyhasthe desired length and it sufficesto establish that it is fork able. We canextract from Fa balancedfork (fory)intwosteps: (i.) wesubjectthefork Ftosomeminorrestructuringtoensurethatall“long”tinespassth rough u; (ii.) we construct a flat fork by treating the vertex uas the root of a portion of the subtree of Flabeled with the indices of y. At the conclusion of the construction, the segments of the two ti nest1andt2will yield the required “long,disjoint, equal-length”tines satisfying thedefinition of a balancedfork. Honestindicesin xyhavelowdepths. /T_heminimalityassumption(5)impliesthatanyhonestindex hforwhich h < βhasdepth no morethan min(length( t1),length(t2)): specifically, h < β =⇒d(h)≤min(length( t1),length(t2)). (7) 15 Toseethis,consideranhonestindex h,h < β andatine thforwhich ℓ(th) =h. Recallthat t1andt2areviableand thath < ℓ(t2). (Ifℓ(t2)is honest, it is obvious. Otherwise, h < ℓ(t2)< βsinceℓ(t2)is adversarial.) As t2is viable, it follows immediately that d(h) = length( th)≤length(t2). Similarly, if h≤ℓ(t1)thend(h)≤length(t1)since t1is viable aswell. /T_he remaining case,i.e., when ℓ(t1)< h < ℓ(t2),canbe ruledout bythe argumentbelow. /T_hereisno honest indexbetween ℓ(t1)andℓ(t2).We claim that /T_here is nohonest index hsatisfying ℓ(t1)< h < ℓ(t2). (8) /T_he claim above is trivially true if ℓ(t1) =ℓ(t2). Otherwise, suppose (toward a contradiction) that his an honest index satisfying ℓ(t1)< h < ℓ(t2). Letthbe the (honest) tine at slot h. /T_he tine-pair (t1,th)may or may not be in A. We will show that bothcaseslead to contradictions. • If(t1,th)isinAandℓ(t1∩th)≤ℓ(u),divslot(t1,th)isatleast divslot(t1,t2). Infact,dueto(4),thisinequality must bean equality. However, the assumption ℓ(t1)< h < ℓ(t2)contradicts(5). • If(t1,th)isinAandℓ(t1∩th)> ℓ(u),it followsthat divslot(th,t2)>divslot(t1,t2). Asthe la/t_terquantity is atleastk+1,(th,t2)must be in A. /T_he precedinginequality,however, contradicts(4). • If(t1,th)/ne}ationslash∈A,divslot(t1,th)is at most k. Asdivslot(t1,t2)is at least k+ 1,thandt1must share a vertex a/f_terslot ℓ(u). Sinceℓ(t1)< h < ℓ(t2)byassumption, divslot(th,t2)>divslot(t1,t2)≥k+1and,asaresult, (th,t2)∈A. However, the precedingstrict inequality violates condition (4). A forkF⊲u⊳where all long tines go through u.In light of the remarks above, we observe that the fork F may be “pinched” at uto yield an essentially identical fork F⊲u⊳⊢wwith the exception that all tines of length exceeding depth(u)pass throughthe vertex u. Specifically,the fork F⊲u⊳⊢wis defined to be the graphobtained fromFby changing every edge of Fdirected towards a vertex of depth depth(u) +1so that it originates from u. To see that the resulting tree is a well-defined fork, it suffices t o check that ℓ(·)is still increasing along all tines of F⊲u⊳. Forthispurpose,considertheeffectofthispinchingonanindiv idualtine tterminatingataparticularvertex v—it is replacedwith a tine t⊲u⊳defined so that: • Iflength(t)≤depth(u),thetine tisunchanged: t⊲u⊳=t. • Otherwise, length(t)>depth(u)andthas a vertex vof depthdepth(u)+1; note that ℓ(v)> ℓ(u)because Fxcontains no vertices of depth exceeding depth(u). /T_hent⊲u⊳is defined to be the path given by the tine terminating at u, a (new) edge from utov, and the suffix of tbeginning at z. (Asℓ(v)> ℓ(u)this has the increasing labelproperty.) /T_hus the tree F⊲u⊳is a legal fork on the same vertex set; note that the depths of ve rtices inFandF⊲u⊳are identical. Constructing a shallow fork Fy⊢y.By excising the tree rooted at ufrom this pinched fork F⊲u⊳, we may extract a fork for the string wα+1...wT. Specifically, consider the induced subgraph Fu⊳ofF⊲u⊳given by the vertices{u}∪{v|depth(v)>depth(u)}. By treating uas a root vertex and suitably defining the labels ℓu⊳of Fu⊳sothatℓu⊳(v) =ℓ(v)−ℓ(u),thissubgraphhasthedefiningpropertiesofaforkfor wα+1...wT. Inparticular, consideringthat αishonestitfollowsthateachhonestindex h > αhasdepth d(h)>length(u)andhence hlabels avertex in Fu⊳. Foratine tofF⊲u⊳,welettu⊳denotethesuffixofthistine beginningat u,whichformsatine in Fu⊳. (Iflength(t)≤depth(u), we define tu⊳to consist solely of the vertex u.) Note that t1u⊳andt2u⊳share no edgesin thefork Fu⊳. Finally,let Fydenotethesubtreeobtainedfrom Fu⊳astheunionofalltines tu⊳ofFu⊳sothatalllabelsof tu⊳ are drawn from y(asit appearsasa prefix of wα+1...wT),and length(tu⊳)≤max h≤|y| hhonestd(h). (9) It isimmediate that Fy⊢y. 16 Two longest viabletines in Fy.Consider the tines t1u⊳andt2u⊳. As mentioned above, they share no edges in Fu⊳and hence the prefixes ˇt1andˇt2(oft1u⊳andt2u⊳) appearing in Fyshare no edges. We wish to show that these prefixes have the maximal length in Fy, making Fybalanced, as desired. Let hbe the largest honest index in y. Sincethelengthsofthetinesin Fyareatmost d(h),itsufficestoshowthatthelengthsof ˇti,i∈{1,2}isatleast d(h). /T_hisisimmediateforthetine ˇt1sincealllabelsof t1u⊳aredrawnfrom yand,considering(7),itsdepthisatleast that of all relevant honest vertices. As for ˇt2, observe that if ℓ(t2)is not honest then β > ℓ(t2)so that, as with ˇt1, thetineˇt2islabeledby yso thatthesameargument,relying on(7),ensures thatthe length(ˇt2)isat least thedepth of all relevant honest vertices. If ℓ(t2)is honest, β=ℓ(t2), and the terminal vertex of t2u⊳does not appear in Fy (asℓ(t2u⊳)falls outside y). In this case, however, length(t2u⊳)>d(h)for any honest index hofy. It follows that length(ˇt2), which equals length(t2u⊳)−1, is at least the depth of any honest index of y, as desired. /T_hus we have proved ˇt1andˇt2are two maximallylongviable tines in Fy⊢y. (10) Constructingaflatfork ˜Fy⊢y.Letusidentifytheforkprefix ˜Fy⊑Fywhichiseitheridenticalto Fyordiffers fromFyin only one of the tines ˇt1,ˇt2. In particular, if length(ˇt1) = length( ˇt2), we set˜Fy=Fy. Otherwise, let ˇta be the longer of the two tines ˇt1,ˇt2; letˇtbbe the shorter one. We modify Fyby deleting some trailing adversarial nodes from ˇtauntil it has the same length as ˇtb; we set˜Fyas the resulting fork and, in addition, set ˜tb=ˇtband˜ta asthe tine a/f_ter trimming ˇta. We claim that ˜Fyis balanced. /T_he claim is obvious if length(ˇt1) = length( ˇt2). Otherwise, thanks to (10), it remains to show that the longer tine, ˇta, has sufficiently many trailing adversarial nodes which, if delet ed, yields length(˜t1) = length( ˜t2). Tothat end,let hibe theindex ofthe last honest vertex on ˇti∈Fy,i∈{1,2}. Supposelength(ˇt2)>length(ˇt1). By (8), we also have length(ˇt1)≥d(h2)and hence we can trim some of the trailing adversarial nodes from ˇt2to get the tine ˜t2whose length is the same as that of ˇt1. Otherwise, suppose length(ˇt1)>length(ˇt2). Sincet2is a viable tine in F, we also have length(ˇt2)≥d(h1). /T_hus we can trim some of the trailing adversarial nodes from ˇt1to have a tine ˜t1whose length is the same as that of ˇt2. In any case, the quantitymin(length( ˜t1),length(˜t2))remainsthesameas min(length( ˇt1),length(ˇt2)). /T_husthefork ˜Fyhasatleast two tines, ˜t1and˜t2,that achieve the maximumlength ofalltines in ˜Fy;hence˜Fyis balanced. Anx-balanced fork ˆF⊑F.Let us identify the root of the fork ˜Fywith the vertex uofFxand letˆFbe the resulting graph(a/f_ter“gluing”therootof ˜Fytou). By(6),itiseasytoseethatthefork ˆF⊑Fisindeedavalidfork onthestring xy. Moreover, ˆFisx-balancedsince ˜Fyisbalanced. /T_heclaimin/T_heorem3followsimmediatelysince |y|≥k+1. 5 Asimple recursive formulation of relative margin A significant finding of Kiayias et al. [13] is that the margin of a ch aracteristic string µ(w)—the maximumvalue of a quantity taken over a (typically) exponentially-large famil y of forks—can be given a simple, mutually recursive formulationwith the associated quantity of reach ρ(w). Specifically,they prove the followinglemma. Lemma 2 ([13,Lemma4.19]) .ρ(ε) = 0whereεistheempty string, and, forall nonempty strings w∈{0,1}∗, ρ(w1) =ρ(w)+1,andρ(w0) =/braceleftBigg 0 ifρ(w) = 0, ρ(w)−1otherwise.(11) Furthermore, marginsatisfies themutually recursive relat ionshipµ(ε) = 0and for all w∈{0,1}∗, µ(w1) =µ(w)+1,andµ(w0) =/braceleftBigg 0 ifρ(w)> µ(w) = 0, µ(w)−1otherwise.(12) Additionally, there exists aclosed fork F⊢wsuch that ρ(F) =ρ(w)andµ(F) =µ(w). 17 We prove ananalogousrecursive statement forrelative margin, recordedbelow. Lemma 3 (Relative margin) .Given a fixed string x∈{0,1}*,µx(ε) =ρ(x)whereεis the empty string, and, for all nonempty strings w=xy∈{0,1}*, µx(y1) =µx(y)+1,andµx(y0) =/braceleftBigg 0 ifρ(xy)> µx(y) = 0, µx(y)−1otherwise.(13) Additionally, there exists aclosed fork F⊢xysuch that ρ(F) =ρ(xy)andµx(F) =µx(y). We delay the proof of Lemma 3 to Section 7, preferring to immedi ately focus on the application to se/t_tlement times in Section 6. Discussion. /T_heproofofLemma3sharesmanytechnicalsimilaritieswiththe proofofLemma2givenbyKiayias etal.[13]. However,thereisanimportantrespectinwhichth eproofsdiffer. Eachoftheproofsrequiresthedefinition of a particular adversary (which,in effect, constructs a fork achieving the worst case reach and margin guaranteed by the lemma). /T_he adversary constructed by [13] can create a ba lanced fork for wwhenever µ(w)≥0(i.e.,wis “forkable”). However, the adversary onlyfocuseson theprob lem ofproducingdisjoint tines over the entirestring w (consistent with the definition of µ(·)). /T_he “optimal online adversary,” developed in Section 8, uses a more sophis- ticated rule for extending chains (tines) of the fork. Notably, t his adversary can simultaneously maximize relative marginover all prefixes of thestring . 6 General settlement guarantees and proof ofmain theorems With the recursive formulation for relative margin in hand, w e study the stochastic process that arises when the characteristic string wis chosen from a distribution satisfying the ǫ-martingale condition. Let us write w=xy (where the decomposition is arbitrary) and let Ebe the event that the relative margin µx(y)is non-negative. As Fact 1and Observation 1 point out,thisevent hasa direct bearing on the se/t_tlement violation on w. In this section, we prove two bounds on the probability of the ev entE. /T_he first bound corresponds to the distributionBǫwhereasthesecondboundappliestoanydistributionthatsatis fiestheǫ-martingalecondition. (Recall thatthedistribution Bǫ,mentionedin/T_heorem1,satisfiesthe ǫ-martingaleconditionwithequality.) Ourexposition in this section culminatesin the proofsof ourmain theorems. We start with thefollowing theoremwhichisa directconsequenc esof these bounds;see Section 6.1foraproof. /T_heorem 4. LetT,k∈N. Letw∈{0,1}Tbea random variable satisfying the ǫ-martingale condition. Consider the decomposition w=xy,|y|=k. /T_hen Pr w=xy[there isan x-balanced forkfor xy] = Pr w=xy[µx(y)≥0]≤exp(−Ω(k)). (/T_heasymptotic notation hidesconstants that dependonly on ǫ.) Notice how the final bound does not depend on |x|. Indeed, as we show in Lemma 4, the reach of a Boolean stringxdrawn from the distribution Bǫconverges to a fixed exponential distribution as |x|→∞. /T_his limiting distribution“stochasticallydominates”anydistributiont hatsatisfiesthe ǫ-martingalecondition;seeSection6.2. /T_he followingcorollaryis immediate. Corollary1. LetT,s,k∈N. Letw∈{0,1}Tbearandom variablesatisfying the ǫ-martingalecondition. /T_hen Pr w/bracketleftbigg thereisadecomposition w=xyz,where|x|= s−1and|y|≥k, so thatµx(y)≥0/bracketrightbigg ≤O(1)·exp(−Ω(k)). (14) Proof.Notice that /T_heorem 4works for anyprefixxof the characteristic string w=xy. /T_huswe can fix the prefix xwith length s−1and sum the bound in /T_heorem 4 over all suffixes ywith length at least k. /T_his would give an upper boundto the le/f_t-hand side of ourclaim,the boundbeing/summationtext t≥kexp(−Ω(t)) =O(1)·exp(−Ω(k)). 18 We obtain anotherimporant corollarybyse/t_ting |x|= 0and|y|=nin /T_heorem4. Corollary2. Letw∈{0,1}nbea randomvariablesatisfying the ǫ-martingalecondition. /T_hen Pr[wisforkable ] = Pr[µ(w)≥0]≤exp(−Ω(n)). /T_husforkable strings are rare where “forkable” is defined in Definition 14. /T_his result significa ntly strengthens theexp(−Ω(√n))bound obtained in /T_heorem 4.13 of [13]. /T_he improvement comes in tw o respects: first, Corol- lary 1 improves the exponent from√nton, and second, the characteristic string is allowed to be drawn fr om any distribution satisfying the ǫ-martingalecondition. For comparison,the characteristic str ing in /T_heorem 4.13of [13] hasthe distribution Bǫ,i.e., the bits were i.i.d. Bernoullirandomvariableswith ex pectation (1−ǫ)/2. 6.1 Two boundsfornon-negative relative margin /T_he main ingredients to proving /T_heorem 4 are two bounds on the event t hat for a characteristic string xy, the relative margin µx(y)is non-negative. Bound1. Letx∈{0,1}mandy∈{0,1}kbeindependentrandom variables, each chosen according to Bǫ. /T_hen Pr[µx(y)≥0]≤exp(−ǫ3(1−O(ǫ))k/2). Bound 2. Letx∈{0,1}mandy∈{0,1}kbe random variables (jointly) satisfying the ǫ-martingale condition with respect to the ordering x1,...,x m,y1,...,y k. Letx′∈{0,1}mandy′∈{0,1}kbe independent random variables, each chosen independentlyaccording to Bǫ. /T_hen Pr[µx(y)≥0]≤Pr[µx′(y′)≥0]≤exp(−ǫ3(1−O(ǫ))k/2). Proofof/T_heorem4. /T_he equalityis Fact 1and theinequality is Bound 2. 6.2 A stochastically dominant prefix distribution Stochastic dominance plays an important role in the argumentsbe low. First of all, we observe that the distribution Bǫstochastically dominatesany distribution satisfying the ǫ-martingalecondition; thisyields the first inequality in /T_heorem1. Amoredelicate applicationofstochasticdominance isusedin ordertoachieving bounds,suchasthose of Section 6.1, that are independent of the length of x. /T_his follows from the fact that reach(Bǫ)converges to a particular,dominant distribution asits argumentincreases in length. For notational convenience, we denote the probability distributi on associated with a random variable using up- percase script le/t_ters; for example, the distribution of a ra ndom variable Ris denoted byR. /T_his usage should be clearfromthe context. Definition 15 (Monotonicity and stochastic dominance) .LetΩbe a set endowed with a partial order ≤. A subset A⊂Ωis monotone if for all x≤y,x∈Aimpliesy∈A. LetXandYbe random variables taking values in Ω. We say thatXstochastically dominates Y, wri/t_tenY/√recedesequalX, ifX(A)≥Y(A)for all monotone A⊆Ω. As a special case, whenΩ =R,Y/√recedesequalXifPr[X≥Λ]≥Pr[Y≥Λ]for every Λ∈R. We extend this notion to probability distributions in thenatural way. Observe that for any non-decreasing function udefined on Ω,Y/√recedesequalXimpliesu(Y)≤u(X). Finally, we note that for real-valued random variables X,Y, andZ, ifY/√recedesequalXandZis independent of both XandY, then Z+Y/√recedesequalZ+X. Lemma 4. SupposeW= (W1,...,W n)∈{0,1}nsatisfies the ǫ-martingale condition. Let ǫ∈(0,1)andB= (B1,...,B n)∈{0,1}nwhere each Biis independent with expectation (1−ǫ)/2. LetR∞∈{0,1,...}be a random variablewhose distribution R∞isdefinedas R∞(k) = Pr[R∞=k]/defines/parenleftbigg2ǫ 1+ǫ/parenrightbigg ·/parenleftbigg1−ǫ 1+ǫ/parenrightbiggk fork= 0,1,2,... . (15) /T_henρ(W)/√recedesequalρ(B)/√recedesequalR∞. 19 Proof.We begin by observing that Bstochastically dominates W. As a ma/t_ter of notation, for any fixed values w1,...,w k∈{0,1}k,let θ[w1,...,w k] = Pr[Wk+1= 1|Wi=wi,fori≤k]≤(1−ǫ)/2 andθ[ε] = Pr[W1= 1]whereεis the empty string. /T_hen consider nuniform and independent real numbers (A1,...,A n),eachtakingavalueintheunit interval [0,1];weusethese randomvariablestoconstructamonotone coupling between WandB. Specifically, define β: [0,1]n→{0,1}nby the rule β(α1,...,α n) = (b1,...,b n) where bt=/braceleftBigg 1ifαt≤(1−ǫ)/2, 0ifαt>(1−ǫ)/2, and define B= (B1,...,B n) =β(A1,...,A n); theseBis are independent zero-one Bernoulli random variables withexpectation (1−ǫ)/2. Likewisedefinethefunction ω: [0,1]n→{0,1}nsothatω(α1,...,α n) = (w1,...,w n) where each wtis assigned bythe iterative rule wt+1=/braceleftBigg 1ifα≤θ[w1,...,w t], 0ifα > θ[w1,...,w t], and observe that the probability law of ω(A1,...,A n)is precisely that of W= (W1,...,W n). For convenience, we simply identify the random variable Wwithω(A1,...,A n). Note that for any α= (α1,...,α n)and for each i, theith coordinates of β(α)andω(α)satisfyω(α)i≤β(α)i(which is to say that Wi≤Biwith probability 1). But this is equivalent to saying W/√recedesequalB. (See [14, Lemma 22.5].) Now consider the following partial or der≤on then-bit Boolean strings: for x,y∈{0,1}n, we write x≤yif and only if xi= 1impliesyi= 1,i∈[n]. Since ρis non-decreasing with respect to this partial order, we have ρ(ω(α))≤ρ(β(α))with probability 1 and hence ρ(W)/√recedesequalρ(B)aswell. Tocompletetheproof,wenowestablishthat ρ(B)/√recedesequalR∞. Weremarkthattherandomvariables ρ(B)(andR∞) haveanimmediateinterpretation intermsoftheMarkovchain correspondingtoabiasedrandomwalkon Zwitha “reflectingboundary” at-1. Specifically,consider the Markovc hainon{0,1,...}given bythe transition diagram 012... where edges pointing right have probability (1−ǫ)/2and edges pointing le/f_t—including the loop at 0—have prob- ability(1 +ǫ)/2. Examining the recursive description of ρ(w), it is easy to confirm that the random variable ρ(B1,...,B n)is precisely given by the result of evolving the Markov chain a bove for nsteps with all probabil- ity initially placed at 0. It is further easy to confirm that the d istribution given by (15) above is stationary for this chain. Toestablishstochasticdominance,itisconvenienttoworkwitht heunderlyingdistributionsandconsiderwalks ofvaryinglengths: let Rn:Z→Rdenotetheprobabilitydistributiongivenby ρ(B1,...,B n);likewisedefineR∞. For a distributionRonZ, we define [R]0to denote the probability distribution obtained by shi/f_ting all probability masson negative numbersto zero; thatis, for x∈Z, [R]0(x) =  R(x) ifx >0,/summationtext t≤0R(t)ifx= 0, 0 ifx <0. We observe that if A/√recedesequalCthen[A]0/√recedesequal[C]0for any distributions AandConZ. It will also be convenient to introduce the shi/f_t operators: for a distribution R:Z→Rand an integer k, we define SkRto be the distribution given by the rule SkR(x) =R(x−k). With these operatorsin place,we maywrite Rt=/parenleftbigg1−ǫ 2/parenrightbigg S1Rt−1+/parenleftbigg1+ǫ 2/parenrightbigg/bracketleftbig S−1Rt−1/bracketrightbig 0, 20 withtheunderstandingthat R0isthedistributionplacingunitprobabilityat 0. /T_heproofnowproceedsbyinduction. It isclearthatR0/√recedesequalR∞. Assuming thatRn/√recedesequalR∞,we note thatfor any k SkRn/√recedesequalSkR∞and,additionally,that [S−1Rn]0/√recedesequal[S−1R∞]0. Finally,itisclearthatstochasticdominancerespectsconvexc ombinations,inthesensethatif A1/√recedesequalC1andA2/√recedesequalC2 thenλA1+(1−λ)A2/√recedesequalλC1+(1−λ)C2(for0≤λ≤1). We concludethat Rt+1=/parenleftbigg1−ǫ 2/parenrightbigg S1Rt+/parenleftbigg1+ǫ 2/parenrightbigg/bracketleftbig S−1Rt/bracketrightbig 0/√recedesequal/parenleftbigg1−ǫ 2/parenrightbigg S1R∞+/parenleftbigg1+ǫ 2/parenrightbigg/bracketleftbig S−1R∞/bracketrightbig 0. Byinspection, theright-hand side equals R∞,asdesired. Hence ρ(B)/√recedesequalR∞. Remark. In fact, the random variable ρ(B)actually converges to R∞asn→∞. /T_his can be seen, for example, bysolvingforthestationary distribution oftheMarkovchain intheproofabove. However,wewillonlyrequirethe dominance for our exposition. Importantly, since µx(ε) =ρ(x), andPr[µx(y)≥0]increases monotonically with an increase in Pr[µx(ε)≥r]for anyr≥0, it suffices to take |x|→∞when reasoning about an upper bound on Pr[µx(y)≥0]. 6.3 Proof ofBound 1 Anticipating the proof, we make a few remarks about generating fu nctions and stochastic dominance. We reserve the term generating function to refer to an “ordinary” generating function which represents a s equencea0,a1,... of non-negative real numbers by the formal power series A(Z) =/summationtext∞ t=0atZt. WhenA(1) =/summationtext tat= 1we say thatthegeneratingfunctionisa probabilitygeneratingfunction ;inthiscase,thegeneratingfunction Acannaturally be associated with the integer-valued random variable Afor which Pr[A=k] =ak. If the probability generating functions AandBareassociatedwith therandomvariables AandB,itiseasy tocheckthat A·Bisthegenerating function associated with the convolution A+B(whereAandBare assumed to be independent). Translating the notion of stochastic dominance to the se/t_ting with generating fu nctions, we say that the generating function A stochastically dominates Bif/summationtext t≤Tat≤/summationtext t≤Tbtfor allT≥0; we write B/√recedesequalAto denote this state of affairs. If B1/√recedesequalA1andB2/√recedesequalA2thenB1·B2/√recedesequalA1·A2andαB1+βB2/√recedesequalαA1+βA2(foranyα,β≥0). Moreover,if B/√recedesequalA then it can be checked that B(C)/√recedesequalA(C)for any probability generating function C(Z), where we write A(C)to denote the composition A(C(Z)). Finally, we remark that if A(Z)is a generating function which converges as a function of a complex Zfor |Z|< Rforsomenon-negative R,Riscalledthe radiusofconvergence ofA. Itfollowsfrom[26,/T_heorem2.19]that limk→∞akRk= 0and|ak|=O(R−k). In addition, if Ais a probability generating function associated with the randomvariable Athen it followsthat Pr[A≥T] =O(R−T). We define p= (1−ǫ)/2andq= 1−pand asin the proofof Bound 2,consider the independent {0,1}-valued random variables w1,w2,...wherePr[wt= 1] =p. We also define the associated {±1}-valued random variables Wt= (−1)1+wt. Although our actual interest is in the random variable µx(y)from (13) on a characteristic string w=xy, we begin byanalyzing thecase when |x|= 0. Case1:xistheemptystring. Inthiscase,therandomvariable µx(y)is identical to µ(w)from(12)with w=y. Our strategy isto study the probability generatingfunction L(Z) =∞/summationdisplay t=0ℓtZt whereℓt= Pr[tisthe last time µt= 0]. Controlling the decay of the coefficients ℓtsuffices to give a bound on the probability that w1...wkisforkablebecause Pr[w1...wkis forkable ]≤1−k−1/summationdisplay t=0ℓt=∞/summationdisplay t=kℓt. 21 It seems challenging to give a closed-form algebraic expressi on for the generating function L; our approach is to developaclosed-formexpressionforaprobabilitygenerati ngfunction ˆL=/summationtext tˆℓtZtwhichstochasticallydominates Land apply the analytic properties of this closed form to bound th e partial sums/summationtext t≥kˆℓk. Observe that if L/√recedesequalˆL then the series ˆLgives rise to anupper boundon the probability that w1...wkis forkableas/summationtext∞ t=kℓt≤/summationtext∞ t=kˆℓt. /T_he coupled random variables ρtandµtare Markovian in the sense that values (ρs,µs)fors≥tare entirely determined by (ρt,µt)and the subsequent values Wt+1,...of the underlying variables Wi. We organize the se- quence(ρ0,µ0),(ρ1,µ1),...into “epochs” punctuated by those times tfor which ρt=µt= 0. With this in mind, we define M(Z) =/summationtextmtZtto be the generating function for the first completion of such an e poch,corresponding to the least t >0for which ρt=µt= 0. As we discuss below, M(Z)is not a probability generating function, but ratherM(1) = 1−ǫ. It followsthat L(Z) =/parenleftBigg 1+(1−ǫ)·M(Z) M(1)+/parenleftbigg (1−ǫ)·M(Z) M(1)/parenrightbigg2 +···/parenrightBigg ·ǫ = (1+M(Z)+M(Z)2+···)·ǫ =ǫ 1−M(Z). (16) /T_heexpressionaboverepresentsthefollowinggeometricproce ss: beforethebeginningofanepoch,we“ask”whether thewalkisevergoingtocomebacktozero. Withprobability ǫ,theansweris“no”andwestoptheprocess. Otherwise, i.e., with probability 1−ǫ,we commencean epochwhichis guaranteedto finish; thenwe askag ain. Below we develop an analytic expression for a generating functio nˆMfor which M/√recedesequalˆMand define ˆL=ǫ/(1− ˆM(Z)). We then proceed as outlined above, noting that L/√recedesequalˆLand using the asymptotics of ˆLto upper bound the probability thata string is forkable. In preparation for defining ˆM, we set down two elementary generating functions for the “descent” and “ascent” stoppingtimes. Treatingtherandomvariables W1,...asdefininga(negatively)biasedrandomwalk,define Dtobe the generating function for the descent stopping time of the walk; this is the first time the random walk, starting at 0,visits−1. /T_henaturalrecursiveformulationofthedescenttimeyieldsa simplealgebraicequationforthedescent generating function, D(Z) =qZ+pZD(Z)2,and fromthis we mayconclude D(Z) =1−/radicalbig 1−4pqZ2 2pZ. We likewise consider the generating function A(Z)for theascent stopping time , associated with the first time the walk,starting at 0,visits 1: we have A(Z) =pZ+qZA(Z)2and A(Z) =1−/radicalbig 1−4pqZ2 2qZ. Note that while Dis a probability generating function, the generating function Ais not: according to the classical “gambler’s ruin” analysis [12], the probability that a negativ ely-biased random walk starting at 0 ever rises to 1 is exactlyp/q;thusA(1) =p/q. Returning to the generating function Mabove, we note that an epochcan have one oftwo “shapes”: in the fi rst case,theepochisgiven byawalkforwhich W1= 1followedbyadescent(so that ρreturnstozero); inthe second case, the epoch is given by a walk for which W1=−1, followed by an ascent (so that µreturns to zero), followed by the eventual return of ρto 0. Considering that when ρt>0it will return to zero in the future almost surely, it follows that the probability that such a biased random walk wi ll complete an epoch is p+q(p/q) = 2p= 1−ǫ, as mentioned in the discussion of (16) above. One technical difficu lty arising in a complete analysis of Mconcerns the second case discussed above: while the distribution of th e smallest t >0for which µt= 0is proportional to A above,thedistributionofthesmallestsubsequenttime t′forwhich ρt′= 0dependsonthevalue t. Morespecifically, the distribution of the return time depends on the value of ρt. Considering that ρt≤t, however, this conditional distribution (ofthereturn time of ρtozero conditionedon t)is stochasticallydominated by Dt,the timeto descend tsteps. /T_his yieldsthe following generatingfunction ˆMwhich,asdescribed,stochasticallydominates M: ˆM(Z) =pZ·D(Z)+qZ·D(Z)·A(Z·D(Z)). 22 It remains to establish a bound on the radius of convergence of ˆL. Recall that if the radius of convergence of ˆLisexp(δ)it follows that Pr[w1...wkis forkable ] =O(exp(−δk)). A sufficient condition for convergence of ˆL(z) =ǫ/(1−ˆM(z))atzis that that all generating functions appearing in the definition of ˆMconverge at zand that the resulting value ˆM(z)<1. /T_he generating function D(z)(andA(z)) converges when the discriminant 1−4pqz2is positive; equivalently |z|<1/√ 1−ǫ2or|z|<1 +ǫ2/2 +O(ǫ4). Considering ˆM, it remains to determine when the second term, qzD(z)A(zD(z)),converges;this is likewise determined bypositivity ofthe d iscriminant, whichis to saythat 1−(1−ǫ2)/parenleftBigg 1−/radicalbig 1−(1−ǫ2)z2 1−ǫ/parenrightBigg2 >0. Equivalently, |z|</radicalBigg 1 1+ǫ/parenleftbigg2√ 1−ǫ2−1 1+ǫ/parenrightbigg = 1+ǫ3/2+O(ǫ4). Note thatwhentheseries pz·D(z)converges,it convergesto avalue lessthan 1/2;thesameistrue of qz·A(z). It followsthat for|z|= 1+ǫ3/2+O(ǫ4),|ˆM(z)|<1andˆL(z)converges,asdesired. We concludethat Pr[w1...wkis forkable ] = exp(−ǫ3(1+O(ǫ))k/2). (17) Case 2:xis non-empty. /T_he relative margin before ybegins is µx(ε). Recalling that µx(ε) =ρ(x)and condi- tioning ontheevent that ρ(x) =r,let usdefine therandomvariables {˜µt}fort= 0,1,2,···asfollows: ˜µ0=ρ(x) and Pr[˜µt=s] = Pr[µx(y) =s|ρ(x) =rand|y|=t]. If the˜µrandom walk makes the rth descent at some time t < n, then˜µt= 0and the remainder of the walk is identical to an (k−t)-stepµrandom walk which we have already analyzed. Hence we investigate the probability generating function Br(Z) =D(Z)rL(Z)with coefficients b(r) t:= Pr[tis the last time ˜µt= 0|˜µ0=r] wheret= 0,1,2,···. Our interest lies in the quantity bt:= Pr[tisthe last time ˜µt= 0] =/summationdisplay r≥0b(r) tRm(r), where the reach distributionRm:Z→[0,1]associated with the randomvariable ρ(x),|x|=mis defined as Rm(r) = Pr x:|x|=m[ρ(x) =r]. (18) LetRm(Z)be the probability generating function for the distribution Rm. Using Lemma 4 and Definition 15, we deducethat Rm/√recedesequalR∞forevery m≥0sinceRm/√recedesequalR∞. Inaddition,itiseasytocheckfrom(15)thattheprobabilit y generatingfunctionfor R∞isinfactR∞(Z) = (1−β)/(1−βZ)whereβ:= (1−ǫ)/(1+ǫ). /T_husthegenerating function correspondingto the probabilities {bt}∞ t=0is B(Z) =∞/summationdisplay t=0btZt=∞/summationdisplay r=0Rm(r)∞/summationdisplay t=0b(r) tZt=∞/summationdisplay r=0Rm(r)Br(Z) =L(Z)∞/summationdisplay r=0Rm(r)D(Z)r=L(Z)Rm(D(Z))/√recedesequalˆL(Z)R∞(D(Z)) =(1−β)ˆL(Z) 1−βD(Z). (19) 23 /T_he dominancenotation above followsbecause L/√recedesequalˆLandRm/√recedesequalR∞. ForB(Z)toconverge,weneedtocheckthat D(Z)shouldnever convergeto 1/β. Onecaneasily checkthatthe radius of convergenceof D(Z)—whichis 1//radicalbig 1−ǫ2—is strictly less than 1/βwhenǫ >0. We concludethat B(Z) convergesif both D(Z)andL(Z)converge. /T_he radius ofconvergence of B(Z)would be the smallerof the radiiof convergenceof D(Z)andL(Z). Wealreadyknowfromthepreviousanalysisthat ˆL(Z)hasthesmallerradiusofthe two; therefore,the boundin (17)applies to the relative marg inµx(y)for|x|≥0. 6.4 Proof ofBound 2 Letǫ∈(0,1),W∈{0,1}m,W′∈{0,1}kwhere both (W1,...,W n)and(W′ 1,...,W′ n)satisfy the ǫ-martingale condition. Let B∈{0,1}m,B′∈{0,1}kwherethecomponentsof B,B′areindependentwithexpectation (1−ǫ)/2. ByLemma4, W/√recedesequalBandW′/√recedesequalB′. (∗) Letusdefine the partial order ≤onBooleanstrings {0,1}k,k∈Nasfollows: a≤bif andonlyif forall i∈[k], ai= 1impliesbi= 1. Letµ:{0,1}k→Zbe the marginfunctionfromLemma3. Observe that forBooleans trings a,a′,b,b′with|a|=|a′|and|b|=|b′|, (i.)b≤b′impliesµa(b)≤µa(b′)and (ii.)a≤a′impliesµa(b)≤µa′(b). /T_hat is, µa(b)is non-decreasingin both aandb. (†) Using (∗)and (†),it followsthat µW(W′)/√recedesequalµB(B′). Writing x=Wandy=W′,we have Pr[µx(y)≥0] = Pr[µW(W′)≥0]≤Pr[µB(B′)≥0] wheretheinequalitycomesfromthedefinition ofstochasticdo minance. Aboundontheright-handsideisobtained in Bound 1. InAppendixB,wepresentaweakerboundon Pr[µx(y)≥0]wherethesequence x1,...,x m,y1,...,y ksatisfies ǫ-martingaleconditions. /T_heproofdirectlyusestheproperties ofthemartingaleandAzuma’sinequalitybutitdoes not use a stochastic dominance argument. Although it gives a bound of3exp/parenleftbig −ǫ4(1−O(ǫ))k/64/parenrightbig , the reader mightfind theproofof independent interest. 6.5 Proof ofmain theorems Proof of /T_heorem 1. Let us start with the following observation. It allows us to for mulate the (s,k)-se/t_tlement insecurity of adistribution Ddirectly in termsofthe relative margin. Lemma 5. Lets,k,T∈N. LetDbeany distribution on {0,1}T. /T_hen Ss,k[D]≤Pr w∼D/bracketleftBiggthere is a decomposition w=xyz, where |x|=s−1and|y|≥k+1,sothatµx(y)≥ 0/bracketrightBigg . Proof.Lemma1impliesthat Ss,k[D]isnomorethantheprobabilitythatslot sisnotk-se/t_tledforthecharacteristic stringw. By Observation 1, this probability, in turn, is no more than th e probability that there exists an x-balanced forkF⊢xywhere we write w=xyz,|x|=s−1,|y|≥k+ 1,|z|≥0. Finally, Fact 1 states that for any characteristic string xy, the two events “exists an x-balanced fork F⊢xy” and “µx(y)is non-negative” have the same measure. Hencethe claimfollows. IfthedistributionDin thelemmaabove satisfies the ǫ-martingalecondition,the probability in thislemmaisno morethantheprobabilityinthele/f_t-handsideofCorollary1. Finally,byretracingtheproofofCorollary1usingthe explicitprobabilityfromBound2,weseethattheboundinCoro llary1isO(1)·exp/parenleftbig −Ω(ǫ3(1−O(ǫ))k)/parenrightbig . SinceBǫ satisfies the ǫ-martingalecondition, we concludethat Ss,k[Bǫ]isno morethan thisquantity aswell. Foranyplayerplayingthese/t_tlementgame,thesetofstringsonwh ichtheplayerwinsismonotonewithrespect to the partial order ≤defined in Section 6.4. To see why, note that if the adversary wins with a specific string 24 w, he can certainly win with any string w′wherew≤w′. AsBǫstochastically dominates W, it follows that Ss,k[W]≤Ss,k[Bǫ]. Proof of /T_heorem 2 For the first inequality, observe that if wviolatesk-CP, it must violate k-CPslotas well. It remainstoprove thesecondinequality. Let Dbeanydistribution on {0,1}T. WecanapplyFact1onthestatement of/T_heorem 3to deducethat Pr w∼D[wviolatesk-CPslot]≤Pr w∼D/bracketleftbiggthere is a decomposition w=xyz, where|y|≥k,so thatµx(y)≥0/bracketrightbigg . Byusing aunion bound over |x|, the above probability is atmost T−k+1/summationdisplay s=1Pr w/bracketleftbiggthere is a decomposition w=xyz,where |x|=s−1and|y|≥k,sothatµx(y)≥0/bracketrightbigg . Sincewsatisfies the ǫ-martingale condition, we can upper bound the probability inside the sum using Corollary 1. Aswe have seen in the proofof /T_heorem1,the bound in Corollary1 isO(1)·exp/parenleftbig −Ω(ǫ3(1−O(ǫ))k)/parenrightbig . It follows that the sumabove isat most Texp/parenleftbig −Ω(ǫ3(1−O(ǫ))k)/parenrightbig . It remains to prove the recursive formulation of the relative margin from Section 5; we tackle it in the next section. 7 Proof oftherelative margin recurrence We set thestage by formallydefining forkprefixes . Definition16 (Forkprefixes) .Letw,x∈{0,1}∗so thatx/√recedesequalw. LetF,F′betwo forks for xandw, respectively. We saythatFisaprefixofF′ifFisaconsistently labeledsubgraphof F′. /T_hatis,allvertices andedgesof Falso appear inF′andthe label of any vertex appearingin both FandF′isidentical. Wedenote thisrelationship by F⊑F′. Whenspeakingaboutatine thatappearsinboth FandF′,weplacetheforkinthesubscript ofrelevant properties, e.g.,writing reachF,etc. Observe that for any Boolean strings xandw,x/√recedesequalw, one can extend(i.e., augment) a fork prefix F⊢xinto a larger fork F′⊢wso thatF⊑F′. Aconservative extension is a minimal extension in that it consumes the least amountofreserve(cf.Definition11),leavingtheremainingreser vetobeusedinfuture. Extensionsand,inparticular, conservative extensions playa critical role in the exposition thatfollows. Definition17 (Conservative extension ofclosedforks) .LetwbeaBoolean string, Faclosedforkfor w, andletsbe an honest tine in F. LetF′be a closed fork for w0so thatF⊑F′andF′contains an honest tine σ,ℓ(σ) =|w|+1. Wesaythat F′isanextension of For,equivalently, that σisanextension of s,ifs≺σ. If, inaddition, length(σ) = height(F)+1,we call this extension a conservative extension . Clearly,σisthelongesttinein F′. Sinceσishonest,itfollowsthat length(σ)≥1+height( F) = 1+length( s)+ gap(s). /T_he root-to-leaf path in F′that ends at σcontains at least gap(s)adversarial vertices u∈F′so that ℓ(u)∈[ℓ(s)+1,|w|]andu/ne}ationslash∈F. Ifσisaconservative extension, thenumberofsuchverticesisexact lygap(s)and, in particular,the height of F′is exactlyone morethan theheight of F. /T_he main ingredients to proving Lemma 3 are a fork-building strate gy for the string xyand Propositions 1 and 2. Specifically,recallequation (13). /T_he first propositio n shows that the fork F⊢xy0built by the said strategy achieves µx(F)≥µx(y0)while the second proposition shows that this value, in fact, i s the largest possible, i.e., µx(y0)≤µx(y0). In addition, any fork-building strategy whose forks satisfy t he premise of Proposition 1 can be used to prove Lemma3. 25 7.1 A fork-buildingstrategyto maximize x-relative margin Any fork F⊢xycontains two tines tx,tρso thatreach(tρ) =ρ(F),reachF(tx) =µx(F), and the tines tx,tρare disjoint over the suffix y. We say that the tine-pair (tρ,tx)is awitnesstoµx(F). Letx,y∈{0,1}∗andwrite w=xy. Recursivelybuildclosedforks F0,F1,...,F |w|whereFi⊢w1...wi,i≥1 andF0⊢εisthetrivialforkconsistingofasinglevertexcorrespondingto thegenesisblock.For i= 0,1,...,|w|−1 inincreasingorder,doasfollows. If wi+1= 1,setFi+1←Fi. Ifwi+1= 0,setFi+1⊢w0asaconservativeextension ofFi⊢wso thatσ∈Fi+1,ℓ(σ) =i+ 1is a conservative extension of a tine s∈Fiidentified as follows. If Fi containsnozero-reachtine, sistheuniquelongesttinein Fi. Otherwise,firstidentifyamaximal-reachtine tρ∈Fi asfollows: if i≥|x|+1,tρisamaximal-reachtinein Fiwhichbelongstoatine-pair witnessing µx(Fi);otherwise, tρcan be an arbitrary maximal-reachtine in Fi. Finally, sis the zero-reach tine in Fithat diverges earliest from tρ. Ifthere are multiple candidates for sortρ,breaktie arbitrarily. Proposition1. Letx,ybearbitraryBooleanstrings, |y|≥1andw=xy. LetF⊢wandF′⊢w0betwoclosedforks built by the strategy above so that F⊑F′and suppose, in addition, that ρ(F) =ρ(xy)andµx(F) =µx(y). /T_hen ρ(F′) =ρ(xy0)andµx(F′)≥µx(y0). 7.2 Proof ofProposition1 Beforeweproceedfurther,letusrecordtwousefulresultsr elatedtoconservativeextensionsandclosedforkprefixes. Claim 1 (A conservative extension has reach zero) .Consider closed forks F⊢w,F′⊢w0such that F⊑F′. If a tinetofF′isaconservative extension then reachF′(t) = 0. Proof.We have assumed that tis a conservative extension, so its terminal vertex must be the new honest node. By definition, reachF′(t) =reserve F′(t)−gapF′(t). Honest players will only place nodes at a depth strictly greate r than all other honest nodes, so we infer that tis the longest tine of F′, and so gapF′(t) = 0. Moreover, we observe that there are no 1s occurring a/f_ter this point in the characteris tic string, and so reserve F′(t) = 0. Plugging these valuesinto ourdefinition of reachwe see that reachF′(t) = 0−0 = 0. Claim2(Reachofnon-extendedtines) .Consideraclosedfork F⊢wandsomeclosedfork F′⊢w0suchthat F⊑F′. Ift∈FthenreachF′(t)≤reachF(t)−1. /T_he inequality becomes and equality if F′is obtained via a conservative extension from F. Proof.Definitionally, we know that reachF′(t) =reserve F′(t)−gapF′(t).FromFtoF′, the length of the longest tine increases by at least one, and the length of tdoes not change, so we observe that gapF′(t)≥gapF(t) + 1 with equality only for conservative extensions. /T_he reserve of tdoes not change, because there are no new 1s in the characteristic string. /T_herefore, reachF′(t) =reserve F′(t)−gapF′(t)≤reserve F(t)−gapF(t)−1 = reachF(t)−1. Assume the premise of Proposition 1. /T_hat is, Fis a forkfor xyso thatρ(F) =ρ(xy),µx(F) =µx(y), and the tinetρidentified bythefork-buildingstrategyinSection7.1belongs toanF-tine-pair (tρ,tx)thatwitnesses µx(F). To recap, this means reachF(tρ) =ρ(F) =ρ(x),reachF(tx) =µx(F) =µx(y), and the tines tρ,txare disjoint overy(i.e.,ℓ(tρ∩tx)≤|x|). In addition, since σ∈F′is a conservative extension of s, we have reachF′(σ) = 0. Finally,let Sbe theset ofall zero-reachtines in F. We will breakthis part ofthe proofinto several casesbased on the relative reachand marginofthe fork. Case 1:ρ(xy)>0andµx(y) = 0.We wish to show that ρ(F′) =ρ(xy0)andµx(F′)≥0. Sinceρ(F)>0, s/ne}ationslash=tρand therefore, By (11) and Claim 2, /T_hus ρ(F′)≥reachF′(tρ) = reach F(tρ)−1 =ρ(xy)−1 =ρ(xy0). /T_herefore, ρ(F′) =ρ(xy0). Sinceµx(y) = 0,txisacandidateforbeingselectedas sandhence ℓ(s∩tρ)≤ℓ(tx∩tρ)≤|x|. /T_husσ,tρ∈F′ are disjoint over y0and,therefore, µx(F′)≥reachF′(σ) = 0. 26 Case 2:ρ(xy) = 0.We wish to show that ρ(F′) =ρ(xy0)andµx(F′)≥µx(y)−1. Since there is at least one zero-reach tine, reachF(s) = 0and, in addition, tρ∈S,|S|≥1. SincereachF′(σ) = 0 = ρ(xy0)by (11),σhas the maximal reach in F′and, in particular, ρ(F′) =ρ(xy0). Depending on Sands, there are three possibilities. Ifs=tρ, this means S={tρ},tx’sF′-reach is one less than its F-reach, and σ,txare still disjoint over y0. Henceµx(F′)≥reachF(tx)−1 =µx(y)−1. Ifs=tx, thentρ’sF′-reach is one less than its F-reach and σ,tρare disjoint over y0. Henceµx(F′)≥reachF(tρ)−1 =ρ(xy)−1≥µx(y)−1. Finally, suppose s/ne}ationslash=tρ ands/ne}ationslash=tx. /T_henµx(y) = reach F(tx)<0and, in addition, s(andσ) must share an edge with tρsomewhere overysince otherwise, we would have achieved µx(y) = 0. As a result, txandσmust be disjoint over y0. Hence µx(F′)≥reachF′(tx) = reach F(tx)−1 =µx(y)−1. Case 3:ρ(xy)>0,µx(y)/ne}ationslash= 0.We wish to show that ρ(F′) =ρ(xy0)andµx(F′)≥µx(y)−1. In this case, s/ne}ationslash=tρands/ne}ationslash=txand therefore, reachF′(ti) = reach F(ti)−1fori= 1,2. /T_he tines tρ,txare still disjoint over y0. Inaddition, tρwillstill havethemaximalreachin F′sincereachF′(tρ) =ρ(xy)−1 =ρ(xy0)by11. /T_herefore, ρ(F′) =ρ(xy0)and,in addition, µx(F′)≥reachF′(tx) = reach F(tx)−1 =µx(y)−1. /T_hiscompletethe proofof Proposition 1. 7.3 Proof ofLemma 3 LetFbe a closed fork for the characteristic string xy. Lettρ,tx∈Fbe the two tines that witness µx(F), i.e., reach(tρ) =ρ(F),reachF(tx) =µx(F),andtρ,txare disjoint over y. Letˆtbe thelongest tine in F. Inthebasecase,where y=ε,weobservethatanytwotinesof Faredisjointover y. Moreover,evenasingletine tρisdisjointwithitselfover ε. /T_herefore,therelativemargin µx(ε)mustbegreaterthanorequaltothereachofthe tinetthat achieves reach (t) =ρ(x). /T_herelative marginmust also be lessthan orequal to ρ(x), because that is,by definition, the maximumreachover alltines in allforks F⊢w. Pu/t_ting these factstogether,we have µx(ε) =ρ(x). Moving beyond the base case, we will consider a pair of closed for ksF⊢xyandF′⊢xybsuch that F⊑F′, x,y∈{0,1}∗,|y|≥1,andb∈{0,1}.Ifb= 1,wehaveset F′=F. /T_hereachofeachtineincreasesby1from Fto F′since the gaphasnot changedbut the reserve hasincreased byone. /T_h erefore,µx(y1) =µx(y)+1,asdesired. Ifb= 0,however, thingsare more nuanced. Consider the following propos ition: Proposition2. Letx,ybearbitrary Boolean strings, |y|≥1, andw=xy0. /T_henµx(y0)≤0ifρ(xy)> µx(y) = 0, andµx(y0)≤µx(y)−1otherwise. Recall that µx(F′)≥µx(y0)by Proposition 1. Combining this with Proposition 2 above, we c onclude that µx(F′) =µx(y0)and,inaddition,thatthefork F′actuallyachievesthemaximumreachandthemaximumrelative marginforthe characteristic string xy0. It remainsto prove Proposition 2. Proof of Proposition 2. SupposeF′⊢xy0is a closed fork such that ρ(xy0) =ρ(F′)andµx(y0) =µx(F′). Let tρ,tx∈F′to be a pair of tines disjoint over yinF′such that reachF′(tρ) =ρ(F′)andreachF′(tx) =µx(F′) = µx(y0). LetF⊢xybe the unique closed fork such that F⊑F′. Note that while F′is an extension of F, it is not necessarily a conservative extension. Case 1:ρ(xy)>0andµx(y) = 0.We wish to show that µx(y0)≤0. Suppose (toward a contradiction) that µx(y0)>0. /T_hen neither tρortxis a conservative extension because, as we proved in Claim 1, co nservative extensionshavereachexactly0. /T_hismeansthat tρandtxexistedin F,andhadstrictlygreaterreachin Fthanthey do presently in F′(byClaim 2). Because tρandtxare disjoint over y0,they must also be disjoint over y; therefore theµx(F)must be at least min{reachF(tρ),reachF(tx)}. Following this line of reasoning, we have 0 =µx(y)≥ mini∈{1,2}{reachF(ti)}>mini∈{1,2}{reachF′(ti)}=µx(F′) =µx(y0)>0,a contradiction,asdesired. Case 2:ρ(xy) = 0.We wish to show that µx(y0)≤µx(y)−1or, equivalently, that µx(y0)< µx(y). First, we claimthat tρmustarise fromanextension. Suppose,toward acontradiction,t hattρisnot anextension, i.e., tρ∈F. /T_he fact that tρachieves the maximum reach in F′implies that tρhas non-negative reach since the longest honest tine alwaysachievesreach0. Furthermore,Claim 2states tha talltines otherthantheextended tine see their reach 27 decrease. /T_herefore, tρ∈Fmust have had a strictly positive reach. But this contradicts the central assumption of the case, i.e., that ρ(xy) = 0. /T_herefore, we conclude that tρ∈F′,tρ/ne}ationslash∈F, and, since F′differs from Fby a single extension, tx∈F. Lets∈Fbe the tine-prefix of tρ∈F′so thattρis an extension of s. SincereachF′(tρ) =ρ(xy0) = 0by (11), reachF(s)must be at least 0. Additionally, since ρ(xy) = 0,reachF(s)≤0. Together, these statements tell us thatreachF(s) = 0. Restricting our view to F, we see that sandtxare disjoint over yand so it must be true that min{reachF(s),reachF(tx)}≤µx(y). Because reachF(s) = 0andreachF(tx)≤ρ(xy) = 0,we can simplify that statement to reachF(tx)≤µx(y). Finally, since tx∈F, Claim 2 tells us that reachF′(tx)<reachF(tx). Taken together,these two inequalities show that µx(y0) = reach F′(tx)<reachF(tx)≤µx(y). Case 3:ρ(xy)>0,µx(y)/ne}ationslash= 0.We wish to show that µx(y0)≤µx(y)−1or,equivalently, that µx(y0)< µx(y). Note that by11, ρ(xy0) =ρ(xy)−1≥0. We will breakthis case into two sub-cases. If bothtρ,tx∈F./T_hentρ,tx∈Fand,consequently, min{reachF(tρ),reachF(tx)}≤µx(y)sincetρandtxmust be disjoint over y. Furthermore, by Claim 2, reachF′(ti)<reachF(ti)fori∈{1,2}. /T_herefore, µx(y0) = reachF′(tx) = min{reachF′(tρ),reachF′(tx)}<min{reachF(tρ),reachF(tx)}≤µx(y),asdesired. If eithertρ/ne}ationslash∈Fortx/ne}ationslash∈F.It must be true that reachF′(tx)≤0, because either txis the extension (and therefore has reach exactly 0) or tρis the extension and we have reachF′(tx) =µx(y0)≤ρ(xy0) = reach F′(tρ) = 0. Recall that we have assumed µx(y)/ne}ationslash= 0. Ifµx(y)>0,we are done: certainly µx(y0)≤0< µx(y). If, however, µx(y)<0, there is more work to do. In this case, we claim that tx∈F, i.e.,txdid not arise from an extension. To see why, consider the following: if txarose from extension, then there must be some s∈Fso thats≺txandreachF(s)≥0. Additionally, by our claim about non-extended tines, we see thatreachF(tρ)>reachF′(tρ) =ρ(xy0)≥0. /T_herefore, µx(y)≥min{reachF(tρ),reachF(s)} ≥0, contradictingour assumption that µx(y)<0. /T_hustx∈F. /T_he only remaining scenario is the one in which µx(y)<0andtρarises from an extension of some tine s∈F,reachF(s)≥0. In this scenario, txcannot have been the extension (since there is only one). By Claim 2,reachF(tx)>reachF′(tx). Using a now-familiar line of reasoning, note that the two tines txand sare disjoint over yand, therefore, µx(y)≥min{reachF(s),reachF(tx)}. Since,µx(y)<0by assumption andreachF(s)≥0,it followsthat µx(y)≥reachF(tx)>reachF′(tx) =µx(y0),asdesired. /T_hiscompletestheproof ofLemma3. 8 Canonical forks and an optimal onlineadversary Letwbe a characteristic string, wri/t_ten w=xy, and recall the online fork-building strategy from Section 7.1. In Proposition 1, we showed that the fork produced by this strat egy (for the string w) always contains a tine-pair (tρ,tx)thatwitnesses µx(y). Inthissection,wepresentanonlinefork-buildingstrategywhi chproducesaforkthat simultaneously contains, for every prefix x/√recedesequalw, a tine-pair that witnesses µx(y). /T_hese forks are called canonical forks,defined below. Definition 18 (Canonical forks) .Letw1...wT∈ {0,1}T. Forn= 0,1,...,T, acanonical fork Fnforw= w1...wnis inductively defined as follows. If n= 0thenF0is the trivial fork for the empty string; it consists of a single (honest) vertex and no edge. If n≥1, the following holds: Fnis a closed fork so that Fn−1⊑Fn.Fncontains an honest tine τρso thatreach(τρ) =ρ(Fn) =ρ(w). For every decomposition w=xy,x≺w,Fncontains two honest tines τx,τρxso that the tine-pair (τρx,τx)witnesses µx(Fn) =µx(y). /T_he (possibly non-distinct) designated tinesτρ,τρx,τx,x≺warecalled the witness tines . Note that if one’s objective is to create a fork which contains ma ny early-diverging tine-pairs witnessing large relative margins,a canonicalforkisthe best one canhopefor. 28 8.1 Anonline strategyfor building canonical forks Letwbeacharacteristicstring,wri/t_tenas w=xy,andletFbeaforkfor w. Ifthetines t1,t2∈Faredisjoint over y, we sayt1andt2arey-disjoint, or equivalently, t1isy-disjointwith t2. Note that this means ℓ(t1∩t2)≤|x|. Let ≤πbethelexicographicalorderingofthetineswhereeachtineisr epresentedasthelistofvertexlabelsappearingin thetine’sroot-to-leafpath. Iftwotineshavethesamevertex labels,≤πmustbreaktieinanarbitrarybutconsistent way. For a fixed fork, let A,Bbe two sets of tines. We define the early-divergence witness for (A,B)as follows. Let CABbe an ordered set of tine-pairs (t′ a,t′ b),a′∈A,b′∈Bthat minimize ℓ(ta∩tb),ta∈A,tb∈B. /T_he order of the elements in CABis the following: (t1,t2)≤(t′ 1,t′ 2)if and only if t1≤πt′ 1andt2≤πt′ 2. /T_he first element of CABis calledtheearly-divergence witness for (A,B). /T_he fork-building strategy A∗presented in Figure 4 builds canonicalforksin an online fashion,i .e., it scans the characteristicstring wonce,fromle/f_ttoright,maintainsa“currentfork,”andupdatesit a/f_terseeingeachnewsymbol byonlyaddingnewvertices. Sincethefinalfork F⊢wiscanonical,itsatisfies µx(F) =µx(y)simultaeneouslyfor all decompositions w=xy;hencewe callA∗theoptimal onlineadversary . /T_he strategyA∗ Letw=w1...wn∈{0,1}nandwn+1∈{0,1}. Ifn= 0, setF0⊢εas the trivial fork comprising a single vertex. Otherwise, for n≥0, letFnbe the closedfork built recursively by A∗forthe string w. If wn+1= 1, setFn+1=Fn. Otherwise, the closed fork Fn+1⊢w0is the result of a single conservative extension of a tine s∈Fninto a new honest tine σ∈Fn+1,ℓ(σ) =n+1; /T_he tine scan be identified asfollows. If Fncontainsno tine with reach zero, sisthe unique longest tine in Fn. Otherwise, sis the reach-zero tine that diverges earliest with respect to the se t of maximal-reach tines in Fn. If there are multiple candidates for s,selectthe one with the smallest ≤π-rank. Designatingthewitnesstines Writingw′=wwn+1,F=Fn,andF′=Fn+1,identify thetines τρ,τw,τx,τρx∈F′,x≺wasfollows. LetR(resp.R′) be the set of F-tines (resp. F′-tines) with the maximal F-reach (resp. F′-reach). Set τρ as the element of R′with smallest≤π-rank. Set (τw,τρw)as the early-divergence witness for (R,R′). For every decomposition w=xy,|y|≥1,|x|≥0, do as follows. Let Bxbe the set of F′-tines that are ywn+1-disjoint with somemaximal-reach tine in R′. LetCx⊆Bxcontain the tines with the maximal F′-reach,the maximumtaken over Bx. Set(τx,τρx)asthe early-divergence witness for (Cx,R′). Figure 4: Optimal online adversary A∗ /T_heorem5 (A∗builds canonicalforks) .Letw∈{0,1}nandb∈{0,1}. LetF⊢wandF′⊢wbbetwo closed forks builtbythe strategy A∗so thatF⊑F′and suppose, inaddition, that Fiscanonical. /T_hen F′iscanonical aswell. We remark that the fork-building strategy A∗would certainly satisfy Proposition 1 and, therefore, satisf y the recurrencerelation (13)aswell. 8.2 Winning the (D,T;s,k)-settlementgame, optimally Consider the player in the (D,T;s,k)-se/t_tlement game who, at the first step, samples a characterist ic stringw∼ D,w=w1w2...wT. Since thechallengerisdeterministic, thegameiscompletely determinedbythecharacteristic stringandthechoicesoftheplayer. Inparticular,foragiven prefixx≺w,|x|=s−1,considerthedecompositions w=xyz. /T_heplayer’schanceofwinningthegamewillbemaximizedif,fore veryy,|y|≥k+1(sothatn=|xy|≥ s+k),thefork Fn⊢xycontainsatine-pair (τρx,τx)thatwitnesses µx(y). Infact,if µx(y)≥0forsome ythen,as shown in Fact 1,theplayer wins the gamebyaugmenting Fntoanx-balancedfork An⊢xy. 29 Note,in addition, that if Fnis canonical,the player canoptimally play (D,T;s,k)-se/t_tlementgames simultane- ouslyforevery s∈[n−k]. /T_hatis,givenadistribution D,acanonicalfork Fngivestheplayerthelargestprobability ofcausing a se/t_tlement violation at asmanyslots s∈[n−k]aspossible, at once. 8.3 Proof of/T_heorem5 For convenience,let us recordthe followingfactwhichcompacts Claims1and 2. Fact2.LetF⊢wandF′⊢w0beclosedforkssothat F⊑F′andF′differsfrom Fbyasingleconservativeextension σ∈F′,ℓ(σ) =|w|+1. /T_henreachF′(t) = reach F(t)−1for everyt∈Fand,in addition, reachF′(σ) = 0. In the rest of the proof, we will frequently use the above fact a long with Lemma 2 and Lemma 3, o/f_ten without an explicit reference. Byassumption, Fisacanonicalfork. /T_hus reachF(tρ) =ρ(w)andforeveryprefix x≺w,reachF(tx) =µx(y). Letw′=wband letτρ,τw,τρw,τx,τρx∈F′,x≺wbe the purported witness tines in F′. Note that τxmust beyb- disjointwith τρxbyconstruction. Similarly, τwmustbewn+1-disjointwith τρwsincebothcannotcontaintheunique vertexfromslot n+1. Itisevidentfromtheconstructionthat ρ(F′) = reach F′(τρ) = reach F′(τρw) = reach F′(τρx) forx≺w. /T_herefore,wewishtoshowthat reachF′(τρ) =ρ(wb),reachF′(τw) =µw(b)andreachF′(τx) =µx(yb) forx≺w. Ifb= 1.In this case, F′=Fandw′=w1. Examining the rule for assigning τρ,τx,τρx, andτw, we see that τρ=tρ,τw=tρ,τx=tx, andτρx=tρxfor allx≺w. SinceF′=Fandb= 1, theF′-reach of every F-tine is one plus its F-reach. /T_hus for any x,x≺w, writing w′=xy1, we have µx(y1) = 1 + µx(y) = 1 +reach F(tx) = reach F′(tx) = reach F′(τx). Similarly, ρ(w1) = 1 + ρ(w) = reach F′(tρ) = reach F′(τρ). By construction, τwhasthe largest reach in F; but this means reachF′(τw) = reach F′(tρ) =ρ(F′) =ρ(w1) but,onthe other hand, µw(1) = 1+ µw(ε) = 1+ρ(w) =ρ(w1); hencereachF′(τw) =µw(1). Ifb= 0./T_he contingenciesof thiscase are covered byPropositions 3,4,and 5 below. Proposition3. Assumethepremiseof/T_heorem5with b= 0. /T_henF′containsawitnesstine τρsothatreachF′(τρ) = ρ(w0). Proof.Recall that the tine σ∈F′,ℓ(σ) =|w|+ 1is a conservative extension to a tine s∈F,reachF(s) = 0so thatreachF′(σ) = 0. Also recall that µz(ε) =ρ(z)for any characteristic string z. Finally, note that it suffices to show that reachF′(τρ)≥ρ(w0). Supposeρ(w)>0. Using Fact 2, Lemma 3, and examining the rule for assigning τρ, we see that reachF′(τρ)≥ reachF′(tρ) = reach F(tρ)−1 =ρ(w)−1 =ρ(w0). On the other hand, if ρ(w) = 0thenρ(w0)is zero as well. It followsthat reachF′(τρ)≥reachF′(σ) = 0 =ρ(w0). Proposition 4. Assume the premise of /T_heorem 5 with b= 0. /T_henF′contains a tine-pair (τρw,τw)that witnesses µw(0). Proof.Recallthatthetine σ∈F′,ℓ(σ) =|w|+1isaconservative extension toatine s∈F,reachF(s) = 0sothat reachF′(σ) = 0. Inaddition,since F′containsa singlevertex atslot |w|+1,τwandτρware disjoint over thesuffix wn+1and, moreover, reachF′(τρw) =ρ(F′) =ρ(w0)by Proposition 3. Now consider the following contingencies based on ρ(w). Ifρ(w)>0./T_husµw(0) =µw(ε)−1 =ρ(w)−1 =ρ(w0). /T_here are two mutuallyexclusive scenariosbased on τρwandσ. Ifτρw=σthen,byconstruction, τw/ne}ationslash=σ(sinceℓ(τρw,τw)≤|w|) and,in addition, reachF(τw) = ρ(w). /T_his implies reachF′(τw) = reach F(τw)−1 =ρ(w)−1 =µw(0). On theother hand,if τρw/ne}ationslash=σthen τρw∈F. Sinceτwis theF-tine with the largest F′-reach, it follows that reachF′(τw) = reach F′(τρw) = ρ(w0) =µw(0). 30 Ifρ(w) = 0.Sinceρ(F) =ρ(w) = 0,Fact2tellsusthatevery F-tinemusthaveanegativereachin F′. Sinceρ(F′) is non-negative, it must be the case that τρw=σ. We can reuse the argumentfrom the subcase “ τρw=σ” of theprecedingcase and concludethat reachF′(τw) =µw(0). Proposition 5. Assume the premise of /T_heorem 5 with b= 0. Letx≺wand write w=xy. /T_henF′contains a tine-pair(τρx,τx)that witnesses µx(y0). Proof.Byconstruction, reachF′(τx) =µx(F′)and,bythedefinition ofrelative margin, µx(F′)≤µx(y0). Inlight of (13),it sufficestoshow that reachF′(τx)≥0ifρ(xy)> µx(y) = 0,andreachF′(τx)≥µx(y)−1otherwise. LetRbethesetof F-tineswiththemaximal F-reachandlet R′bethesetof F′-tineswiththemaximal F′-reach; thusτρx∈R′. We knowthat txisy-disjoint with tρinF. Consider the followingmutually exclusive cases. Ifρ(w)>0andµx(y) = 0.Inthiscase, µx(y0) = 0using Lemma3. Since reachF(s) = 0<reachF(tρx) =ρ(w), itfollowsthat s/ne}ationslash=tρx. Inaddition,observethat tρxmustbein R′. Byourchoiceof s,ℓ(s∩tρx)≤ℓ(tx∩tρx) sincereachF(tx) =µx(y) = 0 = reach F(s). Sincetxisy-disjoint with tρx,soiss. Recallthat reachF′(τx)is thelargest amongalltines that are y0-disjoint with τρx. Ifτρx=tρx./T_hustxisy0-disjoint with τρx. Sinceℓ(σ) =|w|+1,σmust bey0-disjoint with tρx=τρx, it followsthat reachF′(τx)≥reachF′(σ) = 0 =µx(y0). Ifτρx/ne}ationslash=tρx./T_his happens when ρ(w) = 1,ρ(w0) = 0, andtρx,σ∈R′. Note that|R′|≥2since both σ,tρx∈R′butσ/ne}ationslash=tρx. If there are two y0-disjoint tines r′ 1,r′ 2∈R′thenreachF′(τx)≥0 =µx(y0). Otherwise, all tines r′∈R′share a vertex indexed by y. Sincetxisy-disjoint with tρx,txmust be y-disjoint (and thus y0-disjoint) with every r′∈R′as well. Examining the rule for assigning τx, we concludethat τx=txand,therefore, reachF′(τx) = reach F′(tx) =µx(y) = 0 =µx(y0). Ifρ(w) = 0.Letx≺wand note that µx(y0) =µx(y)−1. Sinceρ(w) = 0,reachF(s) = 0allF-tines will have a negative reach in F′; by Fact 2, σis the only tine in F′with the maximal reach ρ(F′) =ρ(w0) = 0, i.e., τρx=τρ=σ. In addition, we must also have reachF(s) = 0,i.e.,s∈R; we conclude that shasthe smallest ≤πrank among all members of Rand, therefore, s=tρ. It follows that τxisy0-disjoint with s=tρand, in particular, τx∈F. Considering tx, if it isy-disjoint with tρthen we must have τx=tx; in this case, reachF′(τx) = reach F′(tx) = reach F(tx)−1 =µx(y)−1 =µx(y0). Otherwise, ℓ(tx∩tρ)≥|x|+ 1 and there must be a tine tρx∈Fthat isy-disjoint with tx(and hence, with τρx). /T_herefore, reachF′(τx)≥ reachF′(tρx)≥reachF′(tx) = reach F(tx)−1 =µx(y)−1. Here, the first inequality follows from the constructionof τxandthe secondone followssince tρx)hasthe maximalreachin F. Ifρ(w)>0andµx(y)/ne}ationslash= 0./T_here canbe two casesdepending onwhether shaszero reachin F. IfreachF(s) = 0./T_hens/ne}ationslash∈{tρx,tx}. Observe that reachF′(tρx) = reach F(tρx)−1 =ρ(w)−1 =ρ(w0). It follwos that tρx∈R′. Sincetxisy0-disjoint with tρx∈R′and, in addition, that τxhas the largest reach among all tines that are y0-disjoint with some member of R′, we conclude that reachF′(τx)≥ reachF′(tx) = reach F(tx)−1 =µx(y)−1 =µx(y0). IfreachF(s)≥1.In this case, sis the longest tine in F. Considering fork F′, if some tine r′∈R′isy0- disjoint with txthenreachF′(τx)≥reachF′(tx) = reach F(tx)−1 =µx(y)−1 =µx(y0). Otherwise, ℓ(r′∩tx)>|x|for every tine r′∈R′, i.e., no maximal-reach F′-tine isy0-disjoint with tx. Since ℓ(tx,tρx)≤|x|by assumption and τρx∈R′, it follows that ℓ(τρx∩tρx)≤|x|, i.e.,tρxisy0-disjoint withτρx. /T_herefore, reachF′(τx)≥reachF′(tρx) = reach F(tρx)−1 =ρ(w)−1≥µx(y)−1 =µx(y0). Here,the secondinequality istrue since µx(y)≤ρ(xy) =ρ(w). 31 /T_hiscompletestheproof of/T_heorem5. In regards to the canonical fork F⊢wproduced by the strategy A∗(see Figure 4), it is possible to maintain witness tines τρ,τ′ m∈F, for integers m=−|w|,...,|w|, so that for every prefix x≺w, the tine-pair (τρ,τ′ µx(y)) witnesses µx(y). In particular, a single maxmimal-reach tine τρappears in every witness tine-pair. We omit futher details. Acknowledgments WearegratefultoShreyasGandlurandBruceHajek(UIUC)forth eirsuggestionaboutusingthedominanceargument in the proofofBound 2. References [1] AdamBack. Hashcash. h/t_tp://www.cypherspace.org/hash cash,1997. [2] Christian Badertscher, Peter Gazi, Aggelos Kiayias, Al exander Russell, and Vassilis Zikas. Ouroboros genesis: Composable proof-of-stake blockchains with dynamic availab ility.IACR Cryptology ePrint Archive , 2018:378, 2018. [3] Iddo Bentov, Ariel Gabizon, and Alex Mizrahi. Cryptocurrenc ieswithout proof of work. CoRR, abs/1406.5694, 2014. [4] IddoBentov,RafaelPass, andElaine Shi. Snow white: Provabl y secureproofsof stake. IACR CryptologyePrint Archive, 2016:919,2016. [5] Jonah Brown-Cohen, Arvind Narayanan, Christos-Alexandros Pso mas, and S. Ma/t_thew Weinberg. Formal barriersto longest-chainproof-of-stakeprotocols. CoRR,abs/1809.06528,2018. [6] Bernardo David, Peter Gazi, AggelosKiayias, and Alexander Russell. Ouroboros praos: An adaptively-secure, semi-synchronousproof-of-stakeblockchain. InNielsen and Ri jmen[19],pages66–98. [7] Cynthia Dwork and Moni Naor. Pricing via processing or comba/t_ti ng junk mail. In Ernest F. Brickell, editor, Advances in Cryptology – CRYPTO’92 , volume 740 of Lecture Notes in Computer Science , pages 139–147, Santa Barbara,CA,USA,August 16–20,1993.Springer,Heidelberg, Germany. [8] StefanDziembowski,SebastianFaust,VladimirKolmogo rov,andKrzysztofPietrzak. Proofsofspace. InRosario Gennaro and Ma/t_thew J. B. Robshaw, editors, Advances in Cryptology – CRYPTO 2015, Part II , volume 9216 ofLecture Notes in Computer Science , pages 585–605, Santa Barbara, CA, USA, August 16–20, 2015. S pringer, Heidelberg,Germany. [9] Juan A. Garay, Aggelos Kiayias, and Nikos Leonardos. /T_he bit coin backbone protocol: Analysis and applica- tions. InElisabethOswaldandMarcFischlin,editors, AdvancesinCryptology-EUROCRYPT2015-34thAnnual InternationalConferenceonthe/T_heoryandApplicationsofC ryptographicTechniques,Sofia,Bulgaria,April26-30, 2015,Proceedings, PartII , volume 9057of Lecture Notes inComputer Science ,pages281–310.Springer, 2015. [10] Juan A. Garay, Aggelos Kiayias, and Nikos Leonardos. /T_he bi tcoin backbone protocol with chains of variable difficulty. In Jonathan Katz and Hovav Shacham, editors, Advances in Cryptology – CRYPTO 2017, Part I , vol- ume 10401 of Lecture Notes in Computer Science , pages 291–323, Santa Barbara, CA, USA, August 20–24, 2017. Springer,Heidelberg,Germany. [11] Juan A. Garay, Aggelos Kiayias, and Nikos Leonardos. /T_he bi tcoin backbone protocol with chains of variable difficulty. In JonathanKatz andHovavShacham,editors, Advances inCryptology-CRYPTO2017-37th Annual International Cryptology Conference, Santa Barbara, CA, U SA, August 20-24, 2017, Proceedings, Part I , volume 10401ofLecture Notes in Computer Science , pages291–323.Springer,2017. 32 [12] CharlesM.GrinsteadandJ.LaurieSnell. IntroductiontoProbability . AmericanMathematicalAssociation,1997. [13] Aggelos Kiayias, Alexander Russell, Bernardo David, and R oman Oliynykov. Ouroboros: A provably secure proof-of-stake blockchain protocol. In Jonathan Katz and Hov av Shacham, editors, Advances in Cryptology - CRYPTO 2017 - 37th Annual International Cryptology Confere nce, volume 10401 of Lecture Notes in Computer Science, pages357–388.Springer,2017. [14] David A Levin, Yuval Peres, and Elizabeth L Wilmer. Markov chains and mixing times , volume 58. American MathematicalSociety,2009. [15] Silvio Micali. ALGORAND:the efficient anddemocraticledg er.CoRR, abs/1607.01341,2016. [16] Tal Moran and Ilan Orlov. Proofs of space-time and rational proofs of storage. Cryptology ePrint Archive, Report2016/035,2016. http://eprint.iacr.org/2016/035 . [17] Rajeev Motwani and Prabhakar Raghavan. Randomized Algorithms . Cambridge University Press, New York, NY,USA,1995. [18] SatoshiNakamoto. Bitcoin: Apeer-to-peerelectronicca sh system. h/t_tp://bitcoin.org/bitcoin.pdf,2008. [19] Jesper Buus Nielsen and Vincent Rijmen, editors. Advances in Cryptology - EUROCRYPT 2018 - 37th Annual International Conference on the /T_heory and Applications of C ryptographic Techniques, Tel Aviv, Israel, April 29 - May3, 2018Proceedings, Part II ,volume 10821of Lecture Notes in Computer Science , 2018.Springer. [20] Sunoo Park, Krzysztof Pietrzak, Albert Kwon, Jo ¨el Alwen, Georg Fuchsbauer, and Peter Gazi. Spacemint: A cryptocurrencybased onproofsofspace. IACR CryptologyePrint Archive , 2015:528,2015. [21] Rafael Pass and Elaine Shi. /T_he sleepy model of consensus. In T suyoshi Takagi and /T_homas Peyrin, editors, Advances in Cryptology - ASIACRYPT 2017 - 23rd Internationa l Conference on the /T_heory and Applications of Cryptology and Information Security, Hong Kong, China, Dec ember 3-7, 2017, Proceedings, Part II , volume 10625 ofLecture Notes in Computer Science , pages380–409.Springer,2017. [22] Rafael Pass and Elaine Shi. Hybrid consensus: Efficient consensu s in the permissionless model. In Andr ´ea W. Richa, editor, 31st International Symposium on Distributed Computing, DI SC 2017, October 16-20, 2017, Vienna, Austria, volume 91of LIPIcs, pages39:1–39:16.SchlossDagstuhl- Leibniz-Zentrum fuer I nformatik,2017. [23] Rafael Pass and Elaine Shi. /T_hunderella: Blockchains with op timistic instant confirmation. In Nielsen and Rijmen[19],pages3–33. [24] Rafael Pass, Lior Seeman, and Abhi Shelat. Analysis of the b lockchain protocol in asynchronous networks. In Jean-S ´ebastien Coron and Jesper Buus Nielsen, editors, Advances in Cryptology - EUROCRYPT 2017 - 36th AnnualInternational Conferenceonthe/T_heoryandApplicati onsofCryptographicTechniques, Paris,France, April 30- May4, 2017, Proceedings,Part II ,volume 10211of Lecture Notes in Computer Science , pages643–673,2017. [25] Saad /Q_uader and Alexander Russell. C++source code to compute se/t_tlement error estimates. https://github.com/saad0105050/forkable-strings-cod e, 2018. Accessed: 2019-10- 14. [26] HerbertSWilf. generatingfunctionology . AKPeters/CRCPress, 3 edition,2005. 33 A Exact settlement probabilities Letm,k∈Nandǫ∈(0,1]. Letwbe a characteristic string of length T=m+ksuch that the bits of ware i.i.d. Bernoulli with expectation α= (1−ǫ)/2. Writewasw=xywhere|x|=m,|y|=k. /T_he recursive definition of relative margin(cf. Lemma3)impliesanalgorithmforcompu tingtheprobability Pr[µx(y)≥0]intimepoly(m,k). Intypicalcircumstances,however,itismoreinterestingtoes tablishanexplicitupperboundon Pr[µx(y)≥0]where |x|→∞; this corresponds to the case where the distribution of the ini tial reach ρ(x)is the dominant distribution R∞in Lemma 4. Due to dominance, R∞(m)serves as an upper bound on ρ(x)for any finite m=|x|. For this purpose,onecanimplicitlymaintainasequenceofmatrices (Mt)fort= 0,1,2,···,ksuchthat M0(r,r) =R∞(r) forall0≤r≤2kandthe invariant Mt(r,s) = Pr y∼B(t,α)[ρ(xy) =randµx(y) =s] issatisfied forevery integer t∈[1,k],r∈[0,2k],ands∈[−2k,2k]. Here,M(i,j)denotestheentry atthe ithrow andjthcolumnofthematrix M. Observe that Mt(r,s)canbecomputedsolelyfromtheneighboringcellsof Mt−1, that is, fromthe values Mt−1(r±1,s±1). Of course,only the transitions approved by the recursions in Le mma2 and Lemma3should beconsidered. Finally, one can compute Pr[µx(y)≥0]by summing Mk(r,s)forr,s≥0. Table 1 contains these probabilities whereαrangesfrom 0.05to0.40andkrangesfrom 50to1000. Inaddition,Figure5showsthebase- 10logarithmof these probabilities. /T_he pointscorresponding to a fixed αappear to forma straight line. /T_his meansthe probability decaysexponentially in k,or equivalently,that theexponent dependslinearly on k,as stipulated by Bound1. AC++implementationoftheabovealgorithmispubliclyavailable ath/t_tps://github.com/saad0105050/forkable-strings-cod e[25]. Table 1: Exact probabilities Pr[µx(y)≥0]where the bits of the characteristic string xyare i.i.d. Bernoulli with expectation α. Eachrow ofthe table correspondstoa different k=|y|. kα 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 505.37E-15 1.16E-09 1.02E-06 8.68E-05 1.96E-03 1.86E-02 9.36E-02 2.92E-01 1001.23E-28 5.10E-18 3.52E-12 2.28E-08 1.03E-05 8.00E-04 1.72E-02 1.37E-01 1502.83E-42 2.24E-26 1.22E-17 6.05E-12 5.54E-08 3.57E-05 3.30E-03 6.74E-02 2006.49E-56 9.82E-35 4.21E-23 1.61E-15 2.98E-10 1.60E-06 6.40E-04 3.36E-02 2501.49E-69 4.31E-43 1.46E-28 4.27E-19 1.61E-12 7.21E-08 1.25E-04 1.69E-02 3003.42E-83 1.89E-51 5.05E-34 1.14E-22 8.67E-15 3.25E-09 2.44E-05 8.52E-03 3507.84E-97 8.29E-60 1.75E-39 3.02E-26 4.67E-17 1.46E-10 4.78E-06 4.31E-03 4001.80E-110 3.64E-68 6.06E-45 8.02E-30 2.52E-19 6.59E-12 9.37E-07 2.18E-03 4504.13E-124 1.60E-76 2.10E-50 2.13E-33 1.36E-21 2.97E-13 1.84E-07 1.11E-03 5009.47E-138 7.00E-85 7.26E-56 5.67E-37 7.32E-24 1.34E-14 3.60E-08 5.62E-04 5502.17E-151 3.07E-93 2.51E-61 1.51E-40 3.95E-26 6.02E-16 7.05E-09 2.86E-04 6004.98E-165 1.35E-101 8.70E-67 4.00E-44 2.13E-28 2.71E-17 1.38E-09 1.45E-04 6501.14E-178 5.91E-110 3.01E-72 1.06E-47 1.15E-30 1.22E-18 2.71E-10 7.37E-05 7002.62E-192 2.59E-118 1.04E-77 2.83E-51 6.19E-33 5.51E-20 5.31E-11 3.75E-05 7506.02E-206 1.14E-126 3.61E-83 7.52E-55 3.33E-35 2.48E-21 1.04E-11 1.91E-05 8001.38E-219 4.99E-135 1.25E-88 2.00E-58 1.80E-37 1.12E-22 2.04E-12 9.69E-06 8503.17E-233 2.19E-143 4.33E-94 5.31E-62 9.69E-40 5.04E-24 4.00E-13 4.93E-06 9007.27E-247 9.61E-152 1.50E-99 1.41E-65 5.23E-42 2.27E-25 7.84E-14 2.50E-06 9501.67E-260 4.22E-160 5.19E-105 3.75E-69 2.82E-44 1.02E-26 1.54E-14 1.27E-06 10003.83E-274 1.85E-168 1.80E-110 9.98E-73 1.52E-46 4.61E-28 3.01E-15 6.48E-07 34 0 200 400 600 800 1 ,000−300−200−1000 Lengthof ylog10Pr[µx(y)≥0]α= 0.40 α= 0.35 α= 0.30 α= 0.25 α= 0.20 α= 0.15 α= 0.10 α= 0.05 Figure 5: /T_he probabilities from Table1drawn in the base- 10logarithmicscale. B Aforkability boundforstrings satisfying the ǫ-martingale condition Below we present a bound (Bound 3) on the probability that a chara cteristic string satisfying the ǫ-martingale con- dition has a non-negative relative margin. We remark that the bou nd below is weaker than Bound 2. Before we proceed,recallthefollowing standard largedeviation bound f orsupermartingales. /T_heorem6 (Azuma’sinequality (Azuma;Hoeffding). See[17,4.16]fora di scussion).LetX0,...,X nbeasequence of real-valued randomvariables sothat, forall t,E[Xt+1|X0,...,X t]≤Xtand|Xt+1−Xt|≤cfor someconstant c. /T_henPr[Xn−X0≥Λ]≤exp/parenleftbig −Λ2/2nc2/parenrightbig foreveryΛ≥0. Bound 3. Letx∈{0,1}mandy∈{0,1}kbe random variables, satisfying the ǫ-martingale condition (with respect to the ordering x1,...,x m,y1,...,y k). /T_hen Pr[µx(y)≥0]≤3exp/parenleftbig −ǫ4(1−O(ǫ))k/64/parenrightbig . Proof.Letw1,w2,...be random variables obeying the ǫ-martingale condition. Specifically, Pr[wt= 1|E]≤ (1−ǫ)/2conditionedonanyevent Eexpressedinthevariables w1,...,w t−1. Forconvenience,definetheassociated {±1}-valuedrandomvariables Wt= (−1)1+wtand observe that E[Wt]≤−ǫ. Ifxis empty. Observe that in this case, the relative margin µx(y)reduces to the non-relative margin µ(y)from Lemma2. Sincethesequence y1,y2,...inthestatementoftheclaimisidenticaltothesequence w1,w2,...defined above, we focus on the reach and margin of the la/t_ter sequence. Sp ecifically, define ρt=ρ(w1...wt)andµt= µ(w1...wt)to be the two random variables from Lemma 2 acting on the string w=w1...wt. /T_he analysis will relyontheancillaryrandomvariables µt= min(0,µt). Observethat Pr[wforkable] = Pr[µ(w)≥0] = Pr[µk= 0], sowemayfocusontheeventthat µk= 0. Asanadditionalpreparatorystep,definetheconstant α= (1+ǫ)/(2ǫ)≥1 and define the randomvariables Φt∈Rbythe inner product Φt= (ρt,µt)·/parenleftbigg1 α/parenrightbigg =ρt+αµt. /T_heΦtwill act as a “potential function” in the analysis: we will establ ish thatΦk<0with high probability and, considering that αµk≤ρk+αµk= Φk,thisimplies µk<0,asdesired. Let∆t= Φt−Φt−1; we claim that—conditioned on any fixed value (ρ,µ)for(ρt,µt)—the random variable ∆t+1∈[−(1+α),1+α]has expectation no more than −ǫ. /T_he analysis hasfour cases, depending on the various 35 regimes of ρandµfrom Lemma 2. When ρ >0andµ <0,ρt+1=ρ+Wt+1andµt+1=µ+Wt+1, whereµ= max(0,µ);then∆t+1= (1+α)Wt+1andE[∆t+1]≤−(1+α)ǫ≤−ǫ. Whenρ >0andµ≥0,ρt+1=ρ+Wt+1 butµt+1=µso that∆t+1=Wt+1andE[∆t+1]≤−ǫ. Similarly,when ρ= 0andµ <0,µt+1=µ+Wt+1while ρt+1=ρ+max(0 ,Wt+1); we maycompute E[∆t+1]≤1−ǫ 2(1+α)−1+ǫ 2α=1−ǫ 2−ǫα=1−ǫ 2−ǫ/parenleftbigg1 ǫ·1+ǫ 2/parenrightbigg =−ǫ. Finally,when ρ=µ= 0exactlyoneofthetworandomvariables ρt+1andµt+1differsfromzero: if Wt+1= 1then (ρt+1,µt+1) = (1,0);likewise, if Wt+1=−1then(ρt+1,µt+1) = (0,−1). Itfollowsthat E[∆t+1]≤1−ǫ 2−1+ǫ 2α≤−ǫ. /T_husE[Φk] =E/summationtextk t=1∆t≤−ǫk. We wish to apply Azuma’s inequality to conclude that Pr[Φk≥0]is exponen- tially small. For this purpose, we transform the random variab lesΦtto a related supermartingale by shi/f_ting them: specifically,define ˜Φt= Φt+ǫtand˜∆t= ∆t+ǫso that˜Φt=/summationtextt i˜∆t. /T_hen E[˜Φt+1|˜Φ1,...,˜Φt] =E[˜Φt+1|W1,...,W t]≤˜Φt,˜∆t∈[−(1+α)+ǫ,1+α+ǫ], and˜Φk= Φk+ǫk. ItfollowsfromAzuma’sinequality that Pr[wforkable] = Pr[µk= 0]≤Pr[Φk≥0] = Pr[˜Φk≥ǫk] ≤exp/parenleftbigg −ǫ2k2 2k(1+α+ǫ)2/parenrightbigg = exp/parenleftBigg −/parenleftbigg2ǫ2 1+3ǫ+2ǫ2/parenrightbigg2 ·k 2/parenrightBigg ≤exp/parenleftbigg −2ǫ4 1+35ǫ·k/parenrightbigg . (20) Ifxis not empty. In this case, we go back to study the sequences xandyas in the statement of the claim. Recall the reach distribution (i.e., the distribution of th e random variable ρ(x))Rm:Z→[0,1]from (18). Since x= (x1,...,x m)satisfies the ǫ-martingalecondition,Lemma4states that Rm/√recedesequalR∞. Wereserve thesymbol µ(r) x for the relative margin random walk µxwhich starts at a non-negative initial position r. /T_husρ(x) =µx(ǫ) =r, and Pr[µx(y)≥0] =/summationdisplay r≥0Rm(r)Pr[µ(r) x(y)≥0]≤/summationdisplay r≥0R∞(r)Pr[µ(r) x(y)≥0] (21) since the sequence (Pr[µ(r) x(y)≥0])∞ r=0is non-decreasing and Rm/√recedesequalR∞. Fix a “large enough” positive integer r∗whosevalue will beassigned later in theanalysis. Let usdefine t he followingevents: •EventBr: it occurswhen r∈[0,r∗]and theµ(r) xwalk is strictly positive on every prefix of ywith length at mostk/2;and •EventCr,s:itoccurswhen r∈[0,r∗]andˆyisthesmallestprefixof yoflength s∈[r,k/2]suchthat µ(r) x(ˆy) = 0. We say that ˆyisa witnesses to the event Cr,s. /T_he right-handside of (21) canbe wri/t_ten as /summationdisplay r>r∗R∞(r)Pr[µ(r) x(y)≥0]+/summationdisplay r≤r∗R∞(r)Pr[Br]·Pr/bracketleftBig µ(r) x(y)≥0|Br/bracketrightBig +/summationdisplay r≤r∗R∞(r)k/2/summationdisplay s=rPr[Cr,s]·Pr[µ(r) x(y)≥0|Cr,s]. 36 We observe that the probabilities Pr[µ(r) x(y)≥0]andPr[µ(r) x(y)≥0|Br]are at most one. In addition, recall that for two non-negative sequences (ai),(bi)of equal lengths,we have/summationtextaibi≤maxbiif/summationtextai≤1. /T_hus (21) canbe simplified as Pr[µx(y)≥0]≤/summationdisplay r>r∗R∞(r)+/summationdisplay r≤r∗R∞(r)Pr[Br] +/summationdisplay r≤r∗R∞(r) max r≤s≤k/2Pr[µ(r) x(y)≥0|Cr,s] ≤/summationdisplay r>r∗R∞(r)+max r≤r∗Pr[Br]+ max r≤r∗ r≤s≤k/2Pr[µ(r) x(y)≥0|Cr,s]. (22) /T_hefirstterm in (22) istheright-tail ofthe distribution R∞. Using Lemma4,thisquantity is atmost βr∗where β:= (1−ǫ)/(1+ǫ). Furthermore,it canbe easily checkedthat theabove quantit y is at most exp(−5ǫ/3). /T_hesecond term in (22) concernstheevent Brand callsformorecare. Define S(r) k:=k/summationdisplay t=0Wt whereW0=rand the random variables Wtare defined at the outset of this proof for t≥1. We know that the µ(r) xwalk starts with ρ(x) =µ(x) =r≥0. SinceBrholds, both the margin µx(ˆy)and the reach ρ(xˆy)remain non-negative for all prefixes ˆyof length t= 1,2,···,k/2. /T_hese two facts imply that the random variable µ(r) x(ˆy) is identical to the sum S(r) tforallprefixes ˆyoflength t= 1,2,···,k/2. Tobe precise, Pr[Br] = Pr[S(r) t≥0forallt≤k/2]. /T_he la/t_terprobability isat most Pr[S(r) k/2≥0]becausetheevent S(r) k/2≥0doesnotconstrain theintermediate sums S(r) tfort < k/2. SincePr[S(r) k/2≥0]increases monotonically in r, we conclude that the second term in (22) is at mostPr[S(r∗) k/2≥0]. Now we are free to shi/f_t our focus from the relative margin wal k to the sum of a martingale sequence. For notational clarity, let us write S:=S(r∗) k/2. Since the sequence (wt)obeys the ǫ-martingale condition, ESis at mostM:=r∗−kǫ/2. Letus set r∗=W0=kǫ/4. /T_henESisat most−kǫ/4and Azuma’sinequality gives us Pr[S≥0] = Pr[( S−ES)≥kǫ/4]≤exp/parenleftbigg −(kǫ/4)2 2(k/2)·22/parenrightbigg = exp/parenleftbigg −kǫ2 64/parenrightbigg . /T_his isan upper boundon thesecond termin (22). /T_hethirdtermin (22)concernstheevent Cr,sanditcanbeboundedusingourexistinganalysisofthe |x|= 0case. Specifically,suppose y= ˆyzwhereˆyisawitnesstotheevent Cr,s. Sincethe µ(r) xwalkremainsnon-negativeoverthe entirestring ˆy,itfollowsthat ρ(xˆy) =µ(xˆy) = 0andasaconsequence,the µxˆywalkonzisidenticaltothe µwalkon z. Ouranalysisinthe |x|= 0casesuggeststhat Pr[µ(z)≥0]isatmost A(k−s,ǫ)where|z|=k−sandA(k,ǫ)isthe boundin(20). Since A(·,ǫ)decreasesmonotonicallyinthefirstargument, A(k−s,ǫ)isatmost A(k/2,ǫ). However, since the last quantity isindependent of r, the third term in (22)is at most A(k/2,ǫ) = exp/parenleftbig −kǫ4/(1+35ǫ)/parenrightbig . Returningto (22) andusing r∗=kǫ/4,we get Pr[µx(y)≥0]≤exp/parenleftbigg −5ǫ 3·kǫ 4/parenrightbigg +exp/parenleftbigg −2ǫ4 1+35ǫ·n 2/parenrightbigg +exp/parenleftbigg −kǫ2 64/parenrightbigg . It iseasy to checkthat theabove quantity is at most 3exp/parenleftbig −kǫ4/(64+35ǫ)/parenrightbig = 3exp/parenleftbig −ǫ4(1−O(ǫ))k/64/parenrightbig . 37
{ "id": "1911.10187" }
2107.08970
Indexing structures for the PLS blockchain
This paper studies known indexing structures from a new point of view: minimisation of data exchange between an IoT device acting as a blockchain client and the blockchain server running a protocol suite that includes two Guy Fawkes protocols, PLS and SLVP. The PLS blockchain is not a cryptocurrency instrument; it is an immutable ledger offering guaranteed non-repudiation to low-power clients without use of public key crypto. The novelty of the situation is in the fact that every PLS client has to obtain a proof of absence in all blocks of the chain to which its counterparty does not contribute, and we show that it is possible without traversing the block's Merkle tree. We obtain weight statistics of a leaf path on a sparse Merkle tree theoretically, as our ground case. Using the theory we quantify the communication cost of a client interacting with the blockchain. We show that large savings can be achieved by providing a bitmap index of the tree compressed using Tunstall's method. We further show that even in the case of correlated access, as in two IoT devices posting messages for each other in consecutive blocks, it is possible to prevent compression degradation by re-randomising the IDs using a pseudorandom bijective function. We propose a low-cost function of this kind and evaluate its quality by simulation, using the avalanche criterion.
http://arxiv.org/pdf/2107.08970v2
Alex Shafarenko
cs.CR, C.4; H.3.1
cs.CR
Indexing structures for the PLS blockchain Alex Shafarenko∗ University of Hertfordshire, AL10 9AB, UK; Ada Finex Ltd ∗Correspondence address: University of Hertfordshire, U.K.; email: a.shafarenko@herts.ac.uk 1arXiv:2107.08970v2 [cs.CR] 3 Aug 2021 Abstract This paper studies known indexing structures from a new point of view: minimisation of data exchange between an IoT device acting as a blockchain client and the blockchain server running a protocol suite that includes two Guy Fawkes protocols, PLS and SLVP. The PLS blockchain is not a cryptocurrency instrument; it is an immutable ledger o ering guaranteed non-repudiation to low-power clients without use of public key crypto. The novelty of the situation is in the fact that every PLS client has to obtain a proof of absence in all blocks of the chain to which its counterparty does not contribute, and we show that it is possible without traversing the block's Merkle tree. We obtain weight statistics of a leaf path on a sparse Merkle tree theoretically, as our ground case. Using the theory we quantify the communication cost of a client interacting with the blockchain. We show that large savings can be achieved by providing a bitmap index of the tree compressed using Tunstall's method. We further show that even in the case of correlated access, as in two IoT devices posting messages for each other in consecutive blocks, it is possible to prevent compression degradation by re-randomising the IDs using a pseudorandom bijective function. We propose a low-cost function of this kind and evaluate its quality by simulation, using the avalanche criterion. keywords: PLS blockchain, Guy Fawkes protocol, content-addressable storage, data{structure statistics, Tunstall coding, pseudorandom bijections 1 Introduction This paper gives statistical analysis of some known data structures required for the implementation of the PLS (permissioned) blockhain [12] or PLSB for short, whose purpose is to support a swarm of IoT devices, or things operating on the premises of a single administrative authority, for example a smart hospital. The use of a blockchain is for the purposes of audit trail, authentication and non- repudiation of allactors, both human and unmanned, including small, bare-metal microcontrollers that supply critical sensor data and those which drive actuators. The utility of permissioned distributed ledger systems (permissioned blockchains, or PBCs for short) is based on two fundamentals: (i) distributed validity check of messages and (ii) an immutable, linearly-ordered ledger. In IoT applications, especially in sensor-networks, (ii) tends to be more important than (i). Indeed, typically messages are not transactions in the nancial sense, so checks such as double spending are not relevant; value checks are domain-speci c and are best performed by smart contracts, which leaves the authenticity and provenance of each message posted on the ledger as the only general validity concerns. The PLS blockchain [12] assures (ii) by employing Guy-Fawkes Protocols (GFPs) [2]. A GFP is a post-quantum signature protocol based on an unlimited series of interlocking crypto- graphic hashes. GFP computations are fast, messages short and secrets neither moved nor kept for a long time; the GFPs are resistant to quantum computing as they do not use operations such as prime-number factorisation or discrete logarithm. Finally, by their recursive nature, GFPs de ne a single sequence of signatures that is very hard to split; this makes them quite suitable as a basis of a blockchain. In the next section we will brie y outline the architecture and protocols of the PLS blockchain published in an earlier paper[12]. Operational di erences between the PLS and other blockchains, such as Etherium, call for re-evaluation of major data structures required for its implementation. 2 In Section 4 we argue that the limited number of users (IoT devices on the premises and human actors1) and the limit on their communication duty cycle and disposable energy need ecient secure data structures to avoid communicating irrelevant data. We propose a Merkle-Tunstall Tree for that purpose (Section 5) and provide a statistical evaluation of its eciency. The eciency of the Tunstall compressor depends on the lack of correlations between di erent user's contributing to the same block. To decorrelate block access we propose to use a random permutation function to map users' true IDs onto local IDs for a given block, see Section 6. To illustrate how proposed technologies work together we give one illustrated example in section 7. Finally, there is a section on related work and some conclusions. The main contributions of the paper are as follows: 1.Statistical analysis of a sparse Merkle tree with uniform, uncorrelated probabilistic leaf occu- pancy. We have obtained the path-weight probability distribution function (as a recurrence relation in the tree height) analytically, without Monte-Carlo simulation. It is easy to quantify the function numerically for any given height. 2.The proposal and evaluation of a compressed bitmap and local enumeration of block users. This makes it possible for a user to obtain the proof of absence in the block directly from the broadcast root of trust without accessing the Merkle tree. We have also shown that the local enumeration results in a path weight similar to that on the original sparse Merkle Tree on average, but the variation is tightly bounded from above, which makes it possible to limit the packet length when communicating a secure leaf path using our structure. By contrast, the path across the original tree varies more widely depending on the leaf statistics and may result in paths exceeding the maximum packet size. 3.The proposal and evaluation of shift-shue as a low-cost pseudorandom permutation tech- nique sucient to break a possible correlation between occurrences of di erent users' records in block contents. We quanti ed the number of rounds in the permutation algorithm to be used taking the avalanche criterion as a basis. 2 PLS blockchain: architecture and protocols. The details of the protocols and their security analysis are available from [12]. We present them here for completeness. However, for the contributions of the present paper we only need to discuss the logistics of the PLSB, whose architecture is shown in gure 1. Blocks are formed from transactions communicated by things viaproxies that make it possible for allthings to rely on low-power radio communication. To authorise a transaction, things run another GFP protocol, called SLVP. That protocol's messages are forwarded by one or more proxies to the Fog Server (FS) to be included in the next block. The FS forms blocks regularly, on a xed wall- clock schedule, by validating incoming SLVP messages from things , and adding them to the current block. 1In the sequel, when it is not important what kind of actor is meant we will call all actors users for short and apply the pronoun 'it'. 3 Sequencer Fog Server Proxy … CAS Local TCP/IP Subnet Proxy Thing Thing Thing hard shell … Figure 1: Architecture of a PLS-blockchain system Chain. By regular deadlines the current blocks are stored in CAS and their hash is signed by producing messages of the main protocol, PLS. All PLS messages are generated and transmitted by radio via a sealed unit, Sequencer, which receives the current block's hash from the FS on a private radio channel. The Sequencer does not contain a changeable program and is not connected to the Internet, so it is not hackable. The PLS sequence, i.e. the sequence of PLS messages, requires a short-term secret, which is produced inside the Sequencer using a physical source of randomness in one time interval and is revealed in the next interval at the same time as selecting a new random secret. All things must receive each PLS message, validate it, and unlock the corresponding block's hash, which is a le name of the block in CAS, see g 2. P- and L- messages cross-validate as shown in the gure, and S-messages contain some redundancy, which, after deciphering, indicates whether the message is valid or not. For example, Jcan include a run of zeros at the end; this would be sucient to thwart a \random message" attack, which is a possible DoS action of the attacker jamming the radio channel2. Also notice that blocks of the blockchain are, as usual, key-value collections, where the key is the originator's ID. Any invalid messages, possibly sent by an attacker will fail the validity check with a very high probability. Progress is assured by limiting the number of invalid messages using various tech- niques discussed in [12], but those are exclusively DoS countermeasures which do not in uence the semantics of the blockchain. The initial message P0is authenticated by all blockchain users via external credentials. Users joining the system later would require external authentication of the latest P-message instead of P0. The unlocked hashes of all the subsequent blocks are as secure as the weaker of the credential and the computational hardness of the full hash preimage problem (i.e. nding allbit-strings of a given length whose hash is a given value). The latter is not feasible for a SHA-2 hash even Post Quantum. Also notice that the veri cation and unlocking computa- 2Since the attacker does not know the preimage of Pat the time when an attack is possible, it can only send an arbitrary message; after unlocking, it would produce a near-random bitstring as a would-be block hash. The requirement for it to have rtrailing zeros will only be satis ed with the probability 2r 4 tions are fast (single microseconds) even for a small bare-metal microcontroller equipped with a crypto-accelerator, e.g. ESP32[7]. Transactions. As mentioned earlier, a thing publishes a transaction on the blockchain by running the SLVP protocol with the FS. A transaction requires one round of the SLVP protocol, which takes three blockchain blocks. For the security of the protocol it is required that the originating thing check that the latest sent SLVP message has appeared on a block. As soon as it has, the next protocol message can be sent. The rst message to send is an S-message, which contains the data object to be signed. Then an LV-message is posted on the blockchain, which provides interlocking hashes and veri cation data (the latter is needed to thwart jam-spoof attacks, see [12]). Finally, thething posts a (proof) P-message. The FS validates the P-message using the data contained in the previous round's P-message and the content of the LV-message sent in between. The FS will only include a P-message in a block if the P-message is valid, while LV- and S- are posted right away, the reason being that invalid LV- or S-messages will be recognised as such by the protocol itself only after the next P-message is posted. In practice The FS and a user may share a secret to help the FS to authenticate incoming messages early to make it dicult for an attacker to post a large number of invalid S- and LV-messages. However, this does not help a counterparty that must be mistrustful of the FS. So additional authentication, if present, is purely a DoS countermeasure; we needn't focus on it as we concern ourselves only with the machinery of the blockchain. The protocol is summarised in gure 3. The diagram shows two users, blue and brown, posting their SLVP messages on the blockchain using the transmissions shown in the table below, which is presented on behalf of a single blockchain user. Users are independent in transmitting protocol messages for themselves and in verifying messages sent by others. The veri cation formulae in the penultimate column enable users (as well as the FS that does it rst) to prove to themselves that the other party has genuinely signed its data object M. If the next P-message, Pk+1checks out, they use its value to unlock the data object Mkas de ned in the bottom of the gure3. Just like blockchain blocks, the data objects have some redundancy. For example, a certain number of leading zeroes, not necessarily very few as this does not require computation, will adequately defend against random S messages, sent by an attacker. Notice that the SLVP protocol de nes variable length encryption for S-messages using a block cipher in PCBC mode. Encryption is bijective, i.e. information-preserving, and the redundancy required for validation in the presence of a random- message attack is just a few bytes (e.g. 4 bytes gives the attacker 1 chance in a few billion to post valid random data, but even then it only subverts a single S-message). Also note that the FS has authority to introduce a new user by posting their very rst P-message. The rst P-message is always marked as such on the blockchain for other users exchanging trans- actions to recognise it as the originator's identity. Operations. Transactions can be posted by both things and human users. Each thing has one or more masters , which are typically users (but could be other things ). Not only does each thing check the posting of each of its SLVP messages on the blockchain, it also monitors the postings of all its masters and any relevant counterparties, and validates their data objects by applying the SLVP protocol. Alternatively, the thing can participate in a smart contract which would only require it to follow and validate messages from the contract engine. In this paper we limit ourselves to the 3The original paper [12] has a slightly di erent arrangement for S-messages since in the original design CAS was trusted for progress, but in the present paper we eliminate this requirement. 5 Interval Transmit/Receive Verify Unlock [T0;T1]L0=H(N1)N0 S0=EN0(J0H(N1))P0out of band P0=H(N0) [T1;T2]L1=H(N2)N1 S1=EN1(J1H(N2))H(L0P1) =P0H(B0) =P1DL0P1(S0) P1=H(N1) ... ... ... ... [Tk;Tk+1]Lk=H(Nk+1)Nk Sk=ENk(JkH(Nk+1))H(Lk1Pk) =Pk1H(Bk1) =PkDLk1Pk(Sk1) Pk=H(Nk) Notation: H(): a cryptographic hash function Ji: a digest of blockchain block Bi, e.g.H(Bi) E : encipherment under symmetric key ; use PCBC mode if Jexceeds cipher block size D : decipherment under symmetric key , matching E Figure 2: Structure of the PLS protocol 6 id1id2id3… Block … id1 S S id1 LV CAS t id1id2id3… Block … … LV id1id2id3… Block id1id2id3… Block P id3 S id3 LV S LV id1 P id3 P Block Transmit Verify BC Action b0P1=H(N1) Out of Band (Enrolment) Post b1S1=E N1(H(N2);M1) | Post b2LV1=H(N2)N1jjH(H(N2)jjN1) | Post ... ... ... ... bnPk=H(Nk) as forbn+3, assume success Post bn+1Sk=E Nk(H(Nk+1);Mk) | Post bn+2LVk=H(Nk+1)NkjjH(H(Nk+1)jjNk)| Post bn+3Pk+1=H(Nk+1) forbn<b<bn+3: nd rst LV such that H(Pk+1jjLPk+1) =V if found in block ^b: unless9b2(bn;^b);L02Bb: H(L0Pk+1) =Pk Post else Reject To unlock the data object MkcomputeM=D LPk+1(Pk+1;S) for every S-message in the interval [bn;^b) and accept the rst valid M. HereE k(a;b) is the encryption of bunder keykin PCBC mode withaas IV;D k(a;b) is the matching decryption. Figure 3: Structure of the SLVP protocol. Table on behalf of a single user 7 mechanics of transaction processing, while leaving higher-level protocol to further work. We will assume in the sequel that each thing is interacting with a very small number of other actors and needs to follow a few SLVP threads (perhaps 2 or 3). Our focus will be on how to make these interactions as computationally and communicationally ecient as possible. Addresses. Each PLS user has an address, which is a small number. Since we concern ourselves with a localised enterprise solution (e.g. a smart hospital) covered by a direct link radio network (e.g. smart sensors equipped with a LoRa[1] transceiver), we do not expect the number of things greater than circa 1000. The total number of actors should be a small factor of that to account for human users and smart contracts, so 2{4K addresses is our target. Transactions have an originating address and a destination. Frequency. In IoT networks of interest, communication is limited by the duty cycle to save the limited bandwidth that all things have to share. This is in addition to the constraints imposed by the energy budget of an individual IoT device. Consequently a small fraction (typically a few percent) of the registered users will be posting a transaction in any given block. 3 Block structure and optimisation challenge Immutable dictionary. In the previous section blockchain blocks were shown in the diagrams that consisted of records attributed to various users as key-value pairs, where the key is the user ID. In a given block only some of the registered users would be represented by records. Since the frequency of posting on the blockchain in our case is severely limited by the things ' communication duty cycle (if using LoRa) or energy budget (if using public networks or LoRa), the proportion of users posting to any given block is expected to be very small. Still, the user can only authenticate the block by the S-message of the PLS protocol, which, when unlocked, contains the block hash. On the other hand, as we mentioned in the previous section the user is typically interested in two or three other users' contributions, which, given a typical enterprise IoT network of a thousand things , is still much less than the expected volume of activity in a block. Indeed, given a block production rate of 4 blocks per hour and a thing data production rate of 2{4 samples per day, and bearing in mind that each data post requires 3 blocks according to the SLVP protocol, we arrive at 6 to 12 blocks per device per day and circa 100 blocks per day in total. This means that in the absence of correlated activities we should expect about 5 to 10 percent of the swarm to post in every given block. For a 1000-strong swarm, the block may contain an estimated 50 to 100 user records authenticated by a single hash. If a thing wishes to access just a few of these, it would have to rst read the whole block and check the hash to validate it, and then dispose of most of these records as they would be irrelevant. Merkle tree. The standard solution to the above problem is called the Merkle Tree (MT)[11], see gure 4. It is a labelled binary4tree each node of which has two children, with some labels L andR, and its own label is =H(LjjR). A child can either be a leaf or a full node in its own right; in both cases it has a label but in the latter case it also has two children of its own. It is quite clear that a change in any leaf will change the root label (also known as the root hash ), so the 4The tree does not have to be binary, but higher-based trees, and higher-based MPTs, discussed later, are inecient for a small number of leaves. 8 r !00 !000 !001 !01 !010 !011 !0 !1 !10 !100 !101 !11 !110 !111 Figure 4: Merkle Tree. authenticated root makes the whole tree authentic. For each node except the root there exists one other node with the same parent, which we call adjunct . What makes the MT useful is that it can also authenticate a single leaf by providing a root-path list of adjunct nodes' labels, or root-adjunct path for short. For example, to authenticate the leaf 101shown in red in the gure, given the root labelr, we only need to know the labels of the blue (adjunct) nodes: 100,11and0, since r=H(0jjH(H(100jj101)jj11)): Generally speaking, for a tree with Kleaves one needs to communicate h=dlog2Kehashes, which is much less than Kfor the number of leaves in the hundreds that we are considering. The tree thus represents an array of leaves indexed by the path: a left edge represents 0 and a right edge 1; the edges traversed en route to the leaf form a bit-string that represents the key. The leaf itself represents the value of the key-value pair. Blocks represented as Merkle trees. Common practice in Blockchain construction is to rep- resent a block as an MT, each leaf of which carries the hash of a user's record included in the block, with the user ID being the key gleaned from the leaf's root path. A user requesting another user's record (or the one of its own) from an intelligent CAS could just receive the root-adjunct path corresponding to the requested ID and hash it through to match with the root hash value. If the PBC signs the root hash of every block it creates, no further security is required to authenticate any user records. Our investigation is of a special case when the maximum number of users is small and is known in advance, and where good communication eciency is important. We could use an MT with the tree height hclose to 10 (to accommodate our expected 2101000 users). Since, as we have mentioned earlier, we expect only around 50 (maybe up to 100) users to contribute to any given block, a great majority of the leaves will not be used. Mask-controllable sparse MT. The number of leaves in an MT does not have to be a power of 2. Also leaves can have no value associated the root-path key. We can think of such leaves as unoccupied. An MT with no-value leaves is called a sparse MT, or SMT. There are several ways of 9 organising an SMT, but proposals usually focus on mutable trees that are used for secure updatable key-value storage. Our interest is in immutable SMTs, where eciency is understood in narrow terms as eciency of retrieval only. Below we de ne our own version of the SMT, geared towards our objectives. We can assume that a leaf without value has a special label NULL and the parent of two NULL nodes has the label NULL as well. This assumption does not diminish security due to the fact that a NULL child of any node is implicitly associated with the node height. Consequently, the shape of the NULL subtree associated with the child is completely de ned by its root position. All such NULL trees are identical anyway, so a single label value fully represents them. For the veri er to be able to verify a path with NULL nodes, it requires a bit mask of length h, where bit-value 1 indicates that the corresponding adjunct node is non-NULL; and the bit-value 0, that it is NULL. The NULL labels can then be omitted from the path. Finally we extend the domain ofH(x) to include NULL-concatenated strings by de ning that for any bit-string x H(xkNULL) =H(xkx0); (1) H(NULLkx) =H(x0kx); wherex0is the bit string obtained form xby ipping all bits. Interestingly, a simpler exten- sion H(xkNULL) =H(NULLkx) =H(x) would not be secure, as it allows one to construct a second preimage by rotating the subtree or swapping nodes along a NULL path. It is easy to see that the hashing process introduced by Eq 1 is not invariant to any such transformation. It is impossible to create a new valid SMT with the same root hash and a di erent leaf sequence without solving the second preimage problem. If the path is mask-controlled, CAS only needs to communicate up tohhashes in addition to the bit mask for the veri er to successfully compute the root hash. Extending the above example, if 11were unoccupied, CAS could supply the bit mask 101 (the second adjunct is missing in path order), and the values of 0and100. Notice that the bit mask does not need to be secured: if it is incorrect, the veri er will compute an incorrect path expression and the result will not match the root hash. Also notice that the mask is very small compared to the hash length: for a tree of 1024 leaves (counting both NULL and non-NULL) the root-adjunct path contains from 1 to 10 hashes 256 bits each, i.e. 256 to 2560 bis, but the mask length is only 10 bits regardless. Merkle-Patricia Trie. The idea of mask-control path is similar to that of the so called Merkle- Patricia Trie (MPT)[15] where not only the nodes but also the edges can be labelled. If a node has a single active edge (i.e the other edge leads to a NULL subtree), the node is eliminated and its parent uses the pre x of the other edge as its label, see gure 5. The example in the gure is of a block where, out of the maximum 8, only users 2, 4, 5, and 7 (010, 100, 101, 111 in binary) are present. Notice that we still have a binary tree, but the root-adjunct path augmented with edge labels requires from one (for 010) to three (for 100 and 101) adjunct hashes for validation, depending on the leaf. The edge labels are typically much shorter bit-strings than a single cryptographic hash (log2K256) and so can be neglected in determining the communication eciency of the access scheme. The same is true of masks with our version of the SMT. 10 r !00 !000 !001 !01 !010 !011 !0 !1 !10 !100 !101 !11 !110 !111 010 11 Figure 5: Merkle-Patricia Trie. All unlabelled edges are assumed to have the label `0' if they lean to the left and `1' if they lean to the right. How is the edge label secured? It is simply hashed together with its child content in determining the node label: =H(0jj1jj0jj1); where0;1are the edge labels of the left and right child, respectively. It is easy to see that there is a direct correspondence between the MPT and the SMT with mask- controlled paths. Our construction requires more work when validating a path: each node, irre- spective of its path quality involves hhash calculations for veri cation, where his the height of the tree, but in the MPT case the number of times a hash is calculated is the same as the number of adjunct hashes supplied with the MPT path, although each hash calculation also involves edge labels, which may increase the cost. The total length of edge labels along the root path in the MPT case is equal to the length of the mask in the SMT case. However, an MPT path requires markers to partition the path string into individual edge labels. Our construction is slightly more frugal in this respect, and it is simpler, which is why we prefer it. 4 Motivation and optimisation idea It is obvious from the SLVP protocol that an actor engaging in transactions with another on the PLSB must check each block to determine the presence of a transaction message from the counterparty. Due to the low duty-cycle of thing -to-FS communication, the counterparty will not be present in a great majority of blocks. However, to securely establish the absence the actor must traverse the block and verify that the counterparty's record is not there. In the MT case we can use the mask-controlled path to the unoccupied leaf which can contain up to hadjunct hashes. In the MPT case CAS will supply the longest path in the direction of , rather than to, the unoccupied leaf. By examining the last node on that path the user will be able to verify that the necessary edge is missing. For example, looking at the MPT in gure 5, if an actor requested the unoccupied 11 leaf 110, the one-step path r!1with adjunct material will be sent back for validation: 010;1;010 0;11;10;111 The number of hashes to be communicated is the same as that for the mask-controlled MT: in the current example the latter would require hashes 111,10, and0. An advantage of the MPT is that it saves the veri er extra hash computations by providing segments of the path as (hashed- controlled) edge labels. While saving some compute time, the e ect of it is negligible, since the maximum root-adjunct path length is logarithmic in the number of leaves ( .12), and a modern microcontroller can compute tens of thousands of hashes per second. A disadvantage of the MPT is that it requires communication of edge labels in addition to the hash for each node on the path, but again, compared to the hash length this is negligible, too. What is considerably more important here is that neither mask-controlled MT, nor MPT reduce the maximum root-adjunct path length. In our example the number of leaves present is 4, but the hight of the MPT as a binary tree is 3, not log24 = 2; it is as if all leaves were present. As a result, the system would require to accommodate longer communication packets, which may a ect the guaranteed duty cycle limit of an IoT device. This brings us to the central idea of the paper: to index a block, one might prefer to locally renumber the users to achieve a contiguous range of IDs rather than a scattering over a regular structure with subsequent remedies such as the MPT. However, before proceeding to our solution, we would like to evaluate the base case, the mask- controlled MT. We would like to establish some quantitative characteristics of MT paths under a random distribution of leaf occupancy. 4.1 Sparse MT Statistics Let us number the levels of the MT from the leaves up, starting with 0. We will call the number of adjunct hashes associated with a path its weight . Let function PDF k(i) of integer ibe the probability for a path from a given leaf to a hight- knode on the tree to be of weight i. Recall that we only count nodes on the path with both children being non-NULL as those require an adjunct hash for a Merkle proof. Let us take a closer look at an example path, see gure 6. From level 0 we move to level 1 as a left child, then to level 2 as the left child, and nally to the level 3 as the right child. Clearly di erent leaves' paths di er by the choice of left- and right- ascension at each level, but the signi cance of the node does not depend on it: the node is only counted when bothits children are non-NULL. The shaded triangles signify the subtrees that represent the other, non-path child of the corresponding path node, which, if non{NULL, produces what we termed above the adjunct hash. If the non-path node is NULL, this fact is noted in the path bit mask, but no adjunct hash is produced. At level 0, the subtree is of height 0 (it is a leaf), at level 1 it is of height 1 (connects two leaves), etc. Statistical model. We adopt a model relevant to the IoT case that the PLS blockchain was developed for. A thing submits a message for inclusion in a block very infrequently. It does so at 12 3 2 1 0 Figure 6: A path across a sparse MT random with some small probability p, whose value depends on the duty cycle restriction, urgency of the sensor data and the available energy budget. Without loss of generality let us assume that p0:1 in our examples, which will give us some intuition of what kind of gures may arise in practical work. This level of activity means that a thing participates in roughly one block out of 10 or that about 1/10 of all blockchain users are active in any given PLS round. We also assume that the activities of di erent things are uncorrelated, so any given leaf is either present or absent (NULL) irrespective of the presence/absence of other leaves. Path weight. The subtrees in gure 6 will consequently be NULL-valued with the probabil- ity k= (1p)2k; (2) wherekis the level at which the subtree is rooted. Let us introduce the Probability Distribution Function PDF k(L) as the probability for the weight of a path from level kto a leaf to be equal to L. Clearly PDF k(L>k ) = 0, and we also assume for convenience that for all k, PDFk(L<0) = 0. It is easy to calculate PDF 1directly: PDF 1(0) = 1p;PDF 1(1) =p: (3) Indeed, the other child of a given leaf of a height-1 tree is NULL with the probability 1 p, producing no adjunct hash, so L= 0 with that probability; otherwise (with the probability p) the other leaf is non-NULL, supplying a single adjunct hash. For a hight- kpath we have a combinatorial problem of calculating the probabilities of 2kcombina- tions of absence/presence of each adjunct hash (remember that these probabilities are completely independent as per our chosen statistical model). Instead of doing this, we observe the following recurrence relation between the paths to neighbouring levels: PDFk+1(i) = kPDFk(i) + (1 k)PDFk(i1) (4) Indeed, if the non-path child of the height-( k+ 1) path node is NULL (this happens with the probability k) the number of adjunct hashes that the path to height k+ 1 produces is the same as that to height k. Alternatively, if the non-path child is non-NULL, it produces one adjunct hash, and so the probability to produce L hashes for the whole path is the same as the probability to 13 k mean 0 1 2 3 4 5 6 7 8 9 10 ============================================================================== 2 0.200 81.0 18.0 1.0 3 0.390 65.6 30.0 4.2 0.2 4 0.734 43.0 42.2 13.1 1.6 0.1 5 1.303 18.5 42.7 29.7 8.1 0.9 0.0 6 2.118 3.4 23.0 40.3 25.7 6.8 0.8 0.0 7 3.084 0.1 4.1 23.6 39.8 25.0 6.6 0.7 0.0 8 4.083 0.0 0.1 4.1 23.6 39.8 25.0 6.6 0.7 0.0 9 5.083 0.0 0.0 0.1 4.1 23.6 39.8 25.0 6.6 0.7 0.0 10 6.083 0.0 0.0 0.0 0.1 4.1 23.6 39.8 25.0 6.6 0.7 0.0 Table 1: Numerical evaluation of Eq 2{4. Probability Distribution Function (%) of path weight vs height in a sparse MT ( p= 0:1) produceL1 for the path to height k. The above equation is the weighted sum of those two outcomes, a mixture distribution. The signi cance of Eqs. 2{4 is in the fact that they permit direct calculation of the PDF at any level above 1 very cheaply given the value of p. The PDF obtained can deliver various practical parameters: the average path weight: Lk=X iiPDFk(i); the standard deviation, the probability that a certain limit Lmaxis exceeded, etc., which are useful in designing bandwidth-limited communication protocols. Table 1 presents the outcome of a direct calculation of Eqs. 2{4 for p= 0:1 and also includes the value of Lkin the second column (heading \mean"). The table shows the value (%) of PDF k(i), whereiruns horizontally. For obvious reasons nontrivial evolution only happens until kdrops to small values, whereupon Eq. 4 degenerates to PDFk+1(i)PDFk(i1) making the PDF( i) shift to the right by 1 without change of shape as kincreases. For p= 0:1 sparsity is present in the rst 7 levels of the tree; from level 8 up the tree becomes dense. Another noteworthy feature of the distribution is its breadth: 95% of the paths require from 4 to 8 hashes, with the mean being around 6, which would necessitate variable length communication, since a factor of 2 di erence cannot be ignored. This variability comes despite the compression we have already applied by introducing the bitmap-controlled MT. The sparse MT is indexed by the user ID, and a set of active users for an individual block is random as de ned by our statistical model. To get a feel of how ecient the sparse MT is in terms of path weights, we compare its mean path weight with that of a truncated dense tree carrying the same number of non-NULL leaves. We use the least sucient hight of the dense tree to accommodate all non-NULL leaves, and place all NULLs on the right hand side of level 0, so that the non-NULL leaves may be contiguous, and use Eqs: 1 to deal with none values (that is what we mean by truncation). Figure 7 compares the path weights of the two trees. The dependence of the path- weight averaged across the truncated tree on the number of non-NULL leaves is not smooth, as the 14 0 1 2 3 4 5 6 7 8 0.05 0.06 0.07 0.08 0.09 0.10 0.11 0.12 0.13 0.14 0.15 W pFigure 7: Mean path weights. The curve: sparse MT, n= 1024 leaves each occupied with probability p. Scattered dots: the average path weight of a truncated dense MT with 2dlog2(np)eleaves tree hight leaps up when the number of non-NULLs crosses power-of-two boundaries. Nevertheless, one can clearly see that the dense tree has a lighter path weight at the majority of probability values, becoming slightly worse just before the probability reaches a value that the equivalent dense tree must grow at. Challenge. Now we are prepared to argue our case. A user engaging in the SLVP protocol as veri er must examine every consecutive block to see if the prover has placed a message in it (i.e. an S-, LV- or P-message). According to our statistical model, in a great majority of the blocs, in fact, in a factor of 1pof them, the prover's message is likely to be absent. Nevertheless, the veri er needs to satisfy itself that indeed, no message from the prover is present. With the classic MT as well as MPT and our own version of sparse MT, the absence of a leaf is almost as expensive to prove as its presence with a particular value. The di erence is that for an absent leaf the label is NULL and it is not communicated, but that is a di erence of 1 against, as our calculation shows, circa 6 adjunct hashes to be communicated when 1024 users participate at probability p= 0:1. This means that on average 60 (!) hashes would be required to certify the start of an SLVP round. Worse still, each active user, even when all it does is wait for a possible signed message from a counterparty, will be actively requesting the counterparty's root-adjunct path from CAS every time a block is released, which pretty much destroys the advantages of a low-bandwidth Guy Fawkes protocol. However, a simple remedy exists, which we consider next. 15 5 Tunstall-Merkel Tree Basic idea. We kill two birds with one stone by providing a one-time renumbering of users in each block while broadcasting the renumbering information together with the root of the tree. The purpose of the renumbering is to achieve a contiguous range of ID numbers. This way absent users will be recognised as such immediately by any counterparty involved. As a result the cost of absence proof will be zero (plus the cost of the one-for-all broadcast message, which need not be requested). The indexing structure in terms of new IDs will be the kind of tree we have already studied and shown the superior access cost of: a dense, truncated one. How do we enumerate users that are present? Imagine a bitmap sized 2h, wherehis the height of the original (sparse) MT. In the bitmap 1s mark the presence of the corresponding user/leaf and 0s its absence. Under our statistical model (see page 12) on average 2kpbits (as per binomial distribution) of the bitmap will be 1s. Users are renumbered according to the bitmap: the user's new ID is the number of 1s in the bitmap preceding the bit that corresponds to the user's actual ID. Our statistical model assumes that all users are engaged the whole time. A user that decides not to use the blockchain for a while will not be able to maintain a factor of pmessages per block on average until the user becomes active again; the user's bit position in the bitmap will be 0 during that period. If there are many such users, the bitmap may have signi cantly fewer 1s than the aforementioned expectation 2kp. In this sense the expectation is pessimistic. The maximum number of users is within a near-unity factor from the number of things in the swarm, since non-IoT users have typically a one-to-many relation with things : a human or a server would be in control of several IoT devices. The majority of the users tend to be always-on, active things , which work according to a near-periodic schedule. Another useful circumstance here is that the bitmap can be e ectively and eciently compressed to a fraction of its length, provided that the distribution of 1s is close to random and that the number of 1s is known to both the sender and the recipient. The former can be made true by pseudorandomisation, and the later is easy to achieve by including a small integer (typically 10-12 bits in length) in the message that broadcasts the bitmap. In this section we describe the compression technique, and in the next one we will propose a simple and ecient pseudorandomisation. Tunstall code. Given a bit string of length nwhich is expected to contain m=pn;p< 1 ones in random positions (which makes pa true probability), or alternatively a bit string which is known to containmones,m=pnin random positions (which makes panempirical probability), with the positions of ones pairwise uncorrelated (this is called a zero-order environment), we set ourselves the task of nding a bijective function C:Bn!Brw,rw<n that maps the string to a sequence of rcodewords of length w. We wish to minimise rw, or, for a given w, to minimise r. The theoretical limit of compression is well known from information theory: rwH0n, where the zero-order per-bit entropyH0is de ned thus: H0=plog2p(1p) log2(1p): The mapping Cis realised by partitioning the source bit string into (generally unequal length) chunks and assigning a codeword to each. A chunk b0;b1;:::;bkis found at any given position in 16 1−p 0 1 p 1−p 0 1 p0.4 0.6 (1−p)2 0 1 p(1−p)0.24 0.36 0.4 1−p 0 1 p (1−p)2 0 1 p(1−p)0.24 0.36 p(1−p) 0 1 p20.16 0.24 startstep 1step 2Figure 8: Tunstall Tree for p= 0:4. First two steps of the algorithm. our random string with the likelihood pc=kY i=0pbi(1p)1bi: (5) The best code with the word length wshould assign its 2wcodewords to the 2wchunks with the highest likelihood. It must also make sure that the code is complete, i.e. any bit sequence can be represented as a sequence of codewords. It is intuitive that such a code would be optimal, and it can be proven that it is also asymptotically e ective, i.e. that its compression ratio tends to the entropy limit as wtends to in nity. It is not easy, however, to turn Eq. 5 into a practical encoder/decoder. The main reason for it is that the value of kis not bounded, and neither is the search for suitable chunks to nd the top 2w ones in terms of their likelihood. The problem is not so much the amount of work required for the search, since we could take the logarithm of Eq 5 and maximise the linear form logpc=llogp+ (kl) log(1p); (6) where l=kX i=0bi; in the (0lk;k > 0) area of the ( l;k)-plane starting at the maximum (0 ;1). The problem is that each (l;k) point corresponds tok l chunks of length kwithl1s in each. Their enumeration and mapping at di erent kwould be rather awkward. Tunstall in his PhD thesis[13] proposed a greedy search which at the same time builds a compact dictionary structure (the Tunstall tree) that can be used for encoding/decoding eciently, without sharing the dictionary (as long as pis known to both the encoder and the decoder). The greedy search turns out to be of excellent quality, too, delivering the entropy limit asymptotically[13], and, 17 as a recent study shows [9], with a rapidly decreasing redundancy as wincreases. The redundancy formula from [9] being useful for our analysis, we present it below (without derivation and rewritten in our notation): rwnH0+O(nH0log(1=p) w): (7) We will return to Eq 7 later and present our own measurements for the relevant range of parameters, but let us rst introduce the dictionary idea, see gure 8. The dictionary is a (generally imbalanced) labelled binary tree. Both the nodes and the edges are labelled. The edge labels are 0 and 1 as usual, and a node's label is the likelihood value of the chunk composed by reading the edge labels along the path from the root to the node. The algorithm builds the tree node-by-node, as follows: 1. Create a root node with two edges labelled 1 and 0 to two child nodes labelled with the value ofpand 1p, respectively. 2. Find and mark the maximum likelihood leaf node. Denote its label as R. 3. Create two leaf children of the marked node and connect them with edges labelled 1 and 0. Make the node labels the value of RpandR(1p), respectively. 4. Repeat steps 2 and 3 until the tree has 2wnodes besides the root. 5. Now relabel each leaf by its consecutive leaf number while visiting the leaves in some order agreed between the encoder and decoder5. Tunstall encoding is achieved by running the source bit-string down the Tunstall tree bit by bit until a leaf is reached, at which point the codeword is read o from the leaf label and the process returns to the root. Tunstall decoding requires a 2w-entry table where variable-length path sequences are set against codewords, with the former read o from the path to the leaf labelled by the latter. We notice with satisfaction that Tunstall decoding has the cost O(1). Implementation. Tunstall encoding (and especially decoding) is very undemanding, well within reach of a small, system-on-chip smart sensor. To avoid accuracy/under ow problems with repeated multiplication in generating the dictionary at the receiver (Step 3 of the algorithm above), one could use log-likelihoods as node labels. Then instead of multiplication, log pand log(1p) are added to the parent label to produce labels for the 1- and 0-child, respectively6. This way for any reasonable table size, computational accuracy will not be a problem. We implemented the algorithm to see what kind of residual redundancy we could be getting from a speci c Tunstall code. The results of our running a Tunstall compressor through 1 million random bits are presented in table 2. Comparing this with Eq 7, we conclude that at p= 0:05 the compressor already reaches asymptotic mode when doubling the codeword length roughly halves the redundancy . At the same time, the dependency (p) in the interesting range of p, i.e. in the area around p= 0:1 is not quite asymptotic: the contrast in redundancy between p= 0:05 andp= 0:15 is nowhere near a factor of 2 that the formula suggests. From the practical point of view, if we target a blockchain with 1Kusers, with 10% of them posting messages in any given block, p= 0:1 suggests a compressed bitmap of at least 1024 0:47 = 5For example, left to right, or in pre x order. The properties of the code remain the same under any permutation of the codeword assignments but the practicalities of encoding/decoding require a shared order 6We use the fact that the greatest number has the greatest logarithm 18 w p  H 0(%) 4 0.05 0.37 0.29 30.4 4 0.10 0.50 0.47 7.5 4 0.15 0.65 0.61 6.9 8 0.05 0.32 0.29 13.4 8 0.10 0.49 0.47 4.6 8 0.15 0.63 0.61 3.8 Table 2: Observed redundancy of Tunstall code. Sample length before compression: 106. Column headers:w, codeword length; p, probability of 1; , compression ratio; H0, per-bit entropy; = (H)=H, residual redundancy(%) codewordlog2pcchunk 0000 3.06 0000000000000 0001 5.55 0000000000001 0010 5.32 000000000001 0011 5.08 00000000001 0100 4.85 0000000001 0101 4.61 000000001 0110 4.38 00000001 0111 4.14 0000001 1000 3.91 000001 1001 3.67 00001 1010 3.44 0001 1011 3.20 001 1100 3.20 010 1101 5.70 011 1110 2.97 10 1111 5.47 11 Table 3: 4-bit Tunstall code for p= 0:15 482 bits or 61 bytes. An 8% residual redundancy would increase this by only 5 bytes. However, the bitmap is broadcast together with the root hash, 32 bytes long, and a few extra bytes of forced redundancy for the purposes of S-message veri cation (as per PLS protocol). This increases the length of the S-message up to nearly 100 bytes, and at this level a redundancy of the compressor to the tune of 5 to 10 bytes makes little di erence. If the number of users drops to 0.05, even the poor compression quality for w= 4 results in only 379 bits (though 82 bits, or 11 bytes, more than the entropy limit), which is still less than the already acceptable 482 bits we observed for p= 0:1. An alternative is to use a list of raw ID numbers, circa 52 in total, each requiring 10 bits. This is 520 bits, far worse than the compressor's output, but not signi cantly worse than 482, and the list length would decrease in proportion to p. Ifpwere to drop further below 0.05, and if the Tunstall compressor further deteriorated, the uncompressed `list' option could at some point be preferred, with the switch controlled by a single additional bit in the message. 19 o set eld size description (bits) (bits) 0 Ti 256 root hash of the Merkle Tree for the new block Bi built using new user-IDs 256 n,m 24n: total number of users, m: how many present 280 ags  8 bits 0,1: bitmap type (plain, compressed, list, empty) bit 2: (0:w= 4, 1:w= 8) bits 3{7: pre-randomisation parameter (see next section) 288 bitmap M L 1024 processed bitmap content L+ 288 redundancy 32 all zeros, for PLS validation Table 4: Structure of the proposed block root-of-trust Ji We conclude that a four-bit Tunstall code is all that is required to implement the PLS S-message within half of the maximum LoRa message length (250 bytes). To aid the reader's intuition, we present an example of a 4-bit Tunstall code for p= 0:15 in table 3. For each codeword we additionally show its log-likelihood. Notice that unless the log-likelihoods are exactly identical, as is the case for codewords 1010 and 1100 which correspond to chunks with the same number of 1s and 0s, the di erences between log-likelihoods manifest themselves in the rst (decimal) fractional digit already, so computational accuracy should not be a concern7. New structure of the root of trust. In the original PLS protocol [12] the S-record was a message that contains the block's root of trust Ji, which was the root hash of the Merkle tree representing the new block Bi. In the light of our analysis of indexing costs presented in Section 4.1 and the properties of Tunstall encoding described in the current section, we propose to modify the root of trust Jias shown in Table 4. The total message length is L+320 bits or L+40 bytes. We expect Lto be close to 60 bytes in most cases (which is the entropy limit for 1024 users at 10% occupancy per block on average), which makes the S-message circa 100 bytes long, but if necessary Lcan be increased to 128 bytes resulting in the packet length 168 bytes, still well within the length limit (255 bytes) for LoRa communications. A 128-byte bitmap would support the number of users up to 1024 without Tunstall compression, or about twice as many if Tunstall compression is used at 10% occupancy. The hashTrequires the server to renumber the users, building a new Merkle tree and computing its root hash. The client will recompute Tfrom any leaf hash, adjunct hashes and the path mask { all sent to it by CAS (unauthenticated, unsigned) at request, and then check it against the Tin the S-record. Notice that the redundancy eld is only 32 bits, since it is impossible to crack the S-message directly: both the plaintext and the key are unknown, the former due to the XORing of the next P-message, yet to be received, to the plain text, see Figure 2. As mentioned earlier, the purpose of the redundancy eld is to thwart a random message attack for the DoS purposes, and so a 32-bit redundancy translates into a less than 1-in-a-billion chance to cause the recipient to accept a false message, which is more than sucient in the IoT world. 7the main danger would be that the sender and the receiver use di erent oating-point arithmetic, incur di erent rounding errors and end up using di erent dictionaries; this example shows that for a small dictionary there is no such danger 20 Finally, let us dwell a little on the block's MT whose root Tiis included in the block's root-of-trust Ji. The leaves of that tree are hashes of the user records with the user ID corresponding to the path label sequence as usual, except the IDs are now new IDs calculated from the block bitmap and occupying a range from 0 to m1 without gaps. Since mis not necessarily a power of 2, the MT generally consists of a complete half with leaf labels in the interval [0 ;2blog2mc) without gaps and a truncated half with labels in the interval [2blog2mc;m), also without gaps, with the rest of the leaves labelled with NULL. The shape of the MT depends solely on one parameter, m, which is part of the root-of-trust. Consequently, no further information, such as path masks, etc, is required for access and validation of the root hash, Ti, except, of course, we must use Eqs. 1 to calculate the root-adjunct paths in the truncated half. For our running example of 10% occupancy and the total number of users 1024, the value of mwill have an expectancy of around 102, which means this path will be between 1 and 7, and never longer. Table 1 indicates that the standard (MPT or mask-controlled MP) would require from 3 to 9 adjunct hashes. The di erence between 7 and 9 is not big, but notice that 8 hashes would already require more than one LoRa packet to transmit. We would like to emphasise here that the main e ect of using the Tunstall-Merkle Tree (TMT, which is how we wish to call our construction) rather than, say, MPT is notthat fewer hashes have to be communicated with the former than the latter, but the fact that the latter requires a full path irrespective of the presence or absence of the leaf for secure retrieval. By contrast, a TMT provides an absence proof directly from the root-of-trust bypassing the Merkle Tree entirely. Since the SLVP protocol requires every thing to check the presence of its own S- and LV- messages before advancing the protocol, and since a thing would typically monitor another user's infrequent activity, the cost of absence proof dominates over the cost of secure retrieval. Nevertheless, it is reassuring to see that the latter is also improved, in terms of limits if not necessarily average, by our approach. The price we are paying is some additional calculations well within the capabilities of resource-limited systems such as most things tend to be. Returning to the compression issue, there is one factor yet to be accounted for. We remarked earlier that our statistical calculations are based on the zero-order assumption, i.e. that di erent users' behaviours are uncorrelated. Obviously it is not the case when users engage in a higher-level protocol with one another, e.g. producer/consumer. This may skew the chunk statistics resulting in a longer codeword sequence for the block bitmap. In the next section we will propose a simple remedy. 6 Pre-randomisation The idea is to apply a bijective function to the source user ID which depends on an extra parameter, block number i. A di erent block number should result in a very di erent permutation. This way a position in the block bitmap will have the value 1 in a proportion of bitmaps that does not depend on the value of other positions. A user ID will be associated with a pseudorandom sequence of positions as new blocks are produced. Invertibility (bijection) is very important, as it prevents di erent users from being mapped on the same bit-position in the bitmap, thus ensuring that the mapping a pseudorandom permutation. A simple and e ective pseudorandom permutation based solely on the block number ican be achieved by analogy with randomising the order in a deck of playing cards. One player performs 21 the deck shue: for the card in position iin the deck i2[0;n= 2d) represented in binary as i=idid1:::i 0, the new position of the card i0, represented in binary as i0 di0 d1:::i0 0is obtained from the current position by applying the following operator i0 di0 d1:::i0 0=id1id2:::i 0id=(i); which is a cyclic shift left. This corresponds to dividing the deck into two halves and interleaving them, exactly as an experienced dealer would. When the shue is nished, the other player shifts the deck, i.e. divides it into two unequal parts and transposes them. In terms of card numbers, this corresponds to adding a pseudorandom value vmodulo 2d: i0=i+vmodn=v(i) Applying the shue-shift operator Qv=vto a range= [0;n)ttimes with a pseudorandom choice ofv: Qvt:::Qv1Qv0 has the same e ect as repeatedly shuing/shifting a deck of cards, which, the intuition suggests, delivers a rather arbitrary permutation. We call tthe number of rounds. Note that the operators andvhave a negligible cost even when executed by the least powerful platform, as they take literally a few machine instructions. The cost of pseudorandom generator that produces a series of v-values is similarly small if we use a standard Linear Congruential Generator (LCG): vk+1=Fvk+ 1 modn;0k<t; wherenis a power of 2, v0is set to the block number, and the factor Fis any positive integer that satis es the well-known Hull-Dobell constraint: F= 5 mod 8. We chose for Fthe hex value 5EED which satis es the constraint and which has more than enough signi cant digits for any reasonable n. Our solution appears quite attractive from the point of view of its cost; however, while bijectiveness is guaranteed by construction, we need to be reassured that the solution can deliver sucient randomness of mapping at a reasonably small number of rounds t. Avalanche test. How do we judge the quality of a pseudorandom mapping? A common test is based on the so-called avalanche criterion[14], used in evaluation of symmetric ciphers and hash functions. We consider it next in relation to our mapping Q. Select the block-number v0for the test. Next, select a number xfrom the range and some integer 0k<d and prepare two numbers x1=xandx2same asx1, except bit kof it is ipped. Apply the mapping Qto both and take the bitwise XOR of the results: Ai(x;k) =Q(x1)Q(x1). Let Ai(x;k;l ) be thelth bit ofAi(x;k). De ne the correlation matrix Kklthus: Kkl=hAi(x;k;l )ix;i; (8) Here the averaging is done over values of x2and block numbers v0. Good randomness of the mapping manifests itself in the closeness of all matrix elements of Kklto 1/2: max kl(Kkl1=2)1=2: (9) 22 d t  d t  d t  10 100 0.061 11 100 0.113 12 100 0.164 10 150 0.014 11 150 0.026 12 150 0.042 10 200 0.008 11 200 0.009 12 200 0.013 Table 5: Avalanche test of the pre-randomiser. d: input length (bits), t: number of rounds, : mapping quality, = maxkl(Kkl1=2), see Eq 9 This means that if we ip a random bit in a random value xthe probability that any bit in the image ofxunderQ ips in response is close to 1/2. In other words, if we ip one bit in x, on average close to one half of the bits in the result will ip. The name \avalanche e ect" is to do with the fact that small changes cascade through the rounds of the computation causing further changes until all bits of the result are a ected in a complex and unpredictable, though of course deterministic, way. We have applied the avalanche criterion to our proposed randomiser to estimate the acceptable minimum value of t, the number of rounds. As it is impossible to average over all potential values of the block number v0, we limited ourselves to 50 random samples taken from the interval [0 ;10000] The results have proven quite insensitive to the averaging over v0, which in not surprising given that we established that the required t-numbers are in the hundreds. The averaging over xwas done by sweeping the whole range . The results of the avalanche test are presented in Table 5. For practical purposes we limited ourselves ton= 1024, 2048 and 4096, since more users are unlikely to be supported by the communication infrastructure of a single site. The results show that a surprisingly large number, around 200, of rounds is required to achieve good randomisation. It is large compared to the number of rounds one expects to be necessary to randomise a deck of cards (of the order of 10), but it is not large technically: a microprocessor would have to execute only a few thousand instructions to compute the imagei0giveni. This has to be done as many times per block as the number of counterparties that the user has to monitor on the blockchain. For a thing this would be a number of the order unity, hence the cost would be negligible even on a tight energy budget. On the other hand, setting tto 200 would ensure that possible correlations between bits in the image do not exceed 3% (0.013 normalised by 1/2), which should be good enough for practical purposes. Finally, let us recall that the IoT platform is low-power, but the server running the PLS protocol via the Sequencer is not. It has ample capacity to analyse the quality of the permutation in terms of its in uence on Tunstall compression. We have reserved 5 bits in to pass to the shue-shifter an integer value in the interval [0 ;32). It is convenient to use the value 0 to indicate that a random permutation is not required8, whereas a nonzero value is added to the round counter t. The server can try up to 31 additional rounds and choose the one that gives the best compression. The users receiving the root of trust will be aware of how many additional rounds should be performed and will maintain consistency. 23 T block i = 26920 user 45 shuffle-shifter 45 0000 0100 0010 0101 0000 1000 0010 0 1 2 3 4 5 0 1 2 3 4 5 CAS ! Tunstall decoder ! n,! n,m PLS protocol S-message for block 269 n,m,! block bitmap 0 4 8 12 16 20 24 Figure 9: Retrieving a user record from block 269 for ID= 45; for this block m= 5. T block i = 30523 user 17 shuffle-shifter 17 0000 0011 0000 1000 0001 0000 0100 01 2 3 4 ! Tunstall decoder ! n,! n,m PLS protocol S-message for block 305 n,m,! block bitmap 0 4 8 12 16 20 24 Figure 10: Obtaining proof of absence. 24 7 Putting it all together Next we consider a complete example of a user attempting to retrieve a contribution to a block that has been made either by itself or a counterparty. Figure 9 presents the ow of data when a block-269 S-message is received and successfully unlocked by a user. The user is about to request the contribution to block 269 from user ID 45. To accomplish this, it needs to decode the received block bitmap by feeding it to the Tunstall decoder together with the parameters nandm(total number of users and the number of users contributing to block 269, respectively). The decoder produces the uncompressed bitmap. At the same time the user ID (45) and the block number (269) along with the total number of users and con guration parameters are fed to the shue-shifter, which will extract the number of additional rounds from and produce its output value, 20. The bit in position 20 of the uncompressed bitmap happens to be 1, which means that the contribution from ID 45 is present in block 269. The number of 1s in the bitmap to the left of position 20 is 4, so the index in the truncated Merkle tree for the contribution in question will be 4. The path to leaf 4 is highlighted in red in the gure. The user's CAS request will include the block number, 269, and the ID index, 4. CAS will respond with the leaf hash h4and the adjunct sequence V0=h5; V2=H(H(h0kh1)kH(h2kh3)); which consists of the labels of the two nodes of the tree marked in blue. Because the user acquired mfrom the unlocked S-message, i.e. the root of trust, it knows the shape of the tree. Consequently, no mask is communicated, but the user is able to reconstruct the mask anyway. To validate the requested h4, the user checks that the following equation holds: H(V2kH(h4kV0)kH(h4kV0)0)) =T: whereTis the root hash received with the unlocked S-message. An alternative scenario is shown in gure 10. When attempting to retrieve the contribution of user ID=17 to block 305, it turns out that the output of the shue-shifter points to a 0 in the uncompressed block bitmap. Since the unlocked S-message is the root of trust, this constitutes a proof that block 305 has no contribution from user 17. Notice that CAS is not involved in the process at all. 8 Related work The PLS blockchain and the protocols in basic form were proposed in [12]. The idea of sparse Merkle Tree has an unclear origin. To the best of our knowledge it was rst put forward by Bauer[5] and was recently improved on in [6]. Both studies are concerned with mutable trees, with objectives very di erent from ours, although, like ourselves, the authors remark on the importance of proofs of absence (non-membership). Tree statistics is tackled theoretically in [4] in the context of optimising mutable MTs for the Bitcoin blockchain in the context of Bitcoin transactions. The objectives of this study are similar to ours as the authors attempt to group the leaves together to minimise the 8This could be advantageous when, for example, no compression is used. 25 proof length, but they do it using tree transformations (taking the data structure red-black tree as a starting point), while we achieve a similar objective by renumbering the keys (user IDs in our case). The compression technique we use is due to Tunstall [13] and this seems to be uniquely suitable for our case since it is based on empyrical probability of leaf occupancy, which is available to the Fog Server running PLS and which takes next to no resources to communicate to the client. The eciency of our technique depends on this method. We used our own pseudorandom permutation as a combination of a perfect shue and a random shift, using a classical LCG source [10]. There exist various methods of pseudorandom permutation, an oft-cited one being Fisher-Yates shue[8], rst published in the 1930s (citation unavailable). The idea there is to choose a (pseudo)random element of a sequence of source items and exchange it with the rst element on the sequence. Clearly, if this is repeated enough times then any possible permutation could be achieved9. A recent paper [3] presents a fast, parallel algorithm that mimics the technique of merge-sort except the merge makes a pseudorandom choice when ordering two elements for the output. However, our situation is quite di erent. Not because we are dealing with a contiguous range of numbers rather than an abstract sequence of objects: one could enumerate the objects and the problem would boil down to the one we are faced with. Our situation is di erent because the sender and the recipient must choose the same permutation. To encode an arbitrary permutation ofnnumbers would take close to ( m1) log2mbits, which is the same order of magnitude as the block bitmap we are trying to make more compact. Of course the ability to perform an arbitrary permutation is not required: all we want is break correlations between user IDs in a series of block bitmaps, and for this any suciently rich subgroup would do. Conclusions Statistical analysis of a sparse Merkel Tree under the assumption of uniform, uncorrelated leaf occupancy has been presented. The model obtained allows direct computation of the Probability Distribution Function for path lengths given the leaf-value probabilities. The path weight was quanti ed in terms of the number of adjunct hashes required for its leaf proof. We determined that the mean path weight of a sparse MT tree is close to that of a dense, truncated MT tree, with the latter being slightly better at most leaf-probability values pin the practically interesting interval. We proposed an alternative structure, a Tunstall-Merkle tree, which combines a dense, truncated MT and a Tunstall-compressed bitmap indicating leaf ocupancy. We tested the compressor at several practical values of code size and quanti ed its residual redundancy. We found that a very small code table (16 or 256 codewords) proves sucient for achieving near-limit compression, which means that Tunstall decoding presents no storage problem whatsoever to an IoT platform. To improve the e ect of compression we further proposed a decorellation facility in the form of a shue- shifting algorithm and tested its properties using the standard avalanche criterion to determine the number of rounds. Both the Tunstall decoder and the shue-shifter with the codes size and the number of rounds, respectively, sucient for our purposes are quite processor-ecient as well, since they involve inexpensive operations (table indexing, cyclic shift and binary addition) and short instruction sequences in implementation. 9unless the pseudorandom generator producing the selections is caught in a cycle rst 26 The main e ect of the proposed technology is a drastic improvement in the cost of the SLVP proto- col. Indeed an SLVP veri er has to check every block for the presence of counterparty (prover) con- tributions, and no such contribution would be present in a great majority of blocks. Our proposed Tunstall-Merkle tree has zero proof-of-absence cost, and when a leaf is present the communication cost of retrieval is in most cases better than that for the standard MT and MPT. Obviously our technique o ers no advantage to a system with an unlimited and dynamic number of users, but it is bene cial for at least the PLS blockchain situation. The statistical analysis of a sparse MT/MPT has signi cance beyond the area of our study; it could be useful for planning and designing any secure storage structure that involves Merkle trees. Future work will concentrate on higher-level protocols which control the interaction of things with a smart contract within the same limited-resource set of assumptions. References [1] LoRa and LoRaWAN: A Technical Overview. Technical report, Sentech Corporation, December 2019. [2] Ross Anderson, Francesco Bergadano, Bruno Crispo, Jong-Hyeon Lee, Charalampos Mani- favas, and Roger Needham. A new family of authentication protocols. SIGOPS Oper. Syst. Rev., 32(4):9{20, October 1998. [3] Axel Bacher, Olivier Bodini, Alexandros Hollender, and J er emie Lumbroso. Mergeshue: A very fast, parallel random permutation algorithm. CEUR Workshop Proceedings , 2113:43{52, 2018. [4] Bolton Bailey and Suryanarayana Sankagiri. Merkle trees optimized for stateless clients in bitcoin. IACR Cryptol. ePrint Arch. , 2021:340, 2021. [5] Matthias Bauer. Proofs of zero knowledge. CoRR , cs.CR/0406058, 2004. [6] Rasmus Dahlberg, Tobias Pulls, and Roel Peeters. Ecient sparse merkle trees - caching strategies and secure (non-)membership proofs. In Billy Bob Brumley and Juha R oning, editors, Secure IT Systems - 21st Nordic Conference, NordSec 2016, Oulu, Finland, November 2-4, 2016, Proceedings , volume 10014 of Lecture Notes in Computer Science , pages 199{215, 2016. [7] Espressif Systems. ESP32 Technical Reference Manual. Available as https://www.espressif. com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf . [8] R. A. Fisher and F Yates. Statistical Tables for Biological, Agricultural and Medical Research . Oliver & Boyd, Edinburgh and London, 6th edition, 1963. [9] Seungbum Jo, Stelios Joannou, Daisuke Okanohara, Rajeev Raman, and Srinivasa Rao Satti. Compressed Bit vectors Based on Variable-to-Fixed Encodings. The Computer Journal , 60(5):761{775, 12 2017. [10] Derrick H. Lehmer. Mathematical methods in large-scale computing units. In Proceedings of the Second Symposium on Large Scale Digital Computing Machinery , pages 141{146, Cambridge, United Kingdom, 1951. Harvard University Press. 27 [11] Ralph C. Merkle. A digital signature based on a conventional encryption function. In Carl Pomerance, editor, Advances in Cryptology | CRYPTO '87 , pages 369{378, Berlin, Heidel- berg, 1988. Springer Berlin Heidelberg. [12] Alex Shafarenko. A PLS blockchain for IoT applications: protocols and architecture. Cyber- security , 4(1):4, 2021. [13] B.P. Tunstall. Synthesis of noiseless compression codes . PhD thesis, Georgia Tech, 1967. [14] A F Webster and S E Tavares. On the design of s-boxes. In Lecture Notes in Computer Sciences; 218 on Advances in Cryptology|CRYPTO 85 , pages 523{534, Berlin, Heidelberg, 1986. Springer-Verlag. [15] Cong Yue, Zhongle Xie, Meihui Zhang, Gang Chen, Beng Chin Ooi, Sheng Wang, and Xiaokui Xiao. Analysis of indexing structures for immutable data. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data , SIGMOD '20, page 925{935, New York, NY, USA, 2020. Association for Computing Machinery. 28
{ "id": "2107.08970" }
2101.00378
Speeding up Block Propagation in Blockchain Network: Uncoded and Coded Designs
We design and validate new block propagation protocols for the peer-to-peer (P2P) network of the Bitcoin blockchain. Despite its strong protection for security and privacy, the current Bitcoin blockchain can only support a low number of transactions per second (TPS). In this work, we redesign the current Bitcoin's networking protocol to increase TPS without changing vital components in its consensus-building protocol. In particular, we improve the compact-block relaying protocol to enable the propagation of blocks containing a massive number of transactions without inducing extra propagation latencies. Our improvements consist of (i) replacing the existing store-and-forward compact-block relaying scheme with a cut-through compact-block relaying scheme; (ii) exploiting rateless erasure codes for P2P networks to increase block-propagation efficiency. Since our protocols only need to rework the current Bitcoin's networking protocol and does not modify the data structures and crypto-functional components, they can be seamlessly incorporated into the existing Bitcoin blockchain. To validate our designs, we perform analysis on our protocols and implement a Bitcoin network simulator on NS3 to run different block propagation protocols. The analysis and experimental results confirm that our new block propagation protocols could increase the TPS of the Bitcoin blockchain by 100x without compromising security and consensus-building.
http://arxiv.org/pdf/2101.00378v1
Lihao Zhang, Taotao Wang, Soung Chang Liew
cs.NI, cs.CR
cs.NI
JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 1 Speeding up Block Propagation in Blockchain Network: Uncoded and Coded Designs Lihao Zhang, Taotao Wang, Member, IEEE, and Soung Chang Liew, Fellow, IEEE Abstract —We design and validate new block propagation protocols for the peer-to-peer (P2P) network of the Bitcoin blockchain. Despite its strong protection for security and privacy, the current Bitcoin blockchain can only support a low number of transactions per second (TPS). In this work, we redesign the current Bitcoin’s networking protocol to increase TPS without changing vital components in its consensus-building protocol. In particular, we improve the compact-block relaying protocol to enable the propagation of blocks containing a massive number of transactions without inducing extra propagation latencies. Our improvements consist of (i) replacing the existing store-and-forward compact-block relaying scheme with a cut-through compact-block relaying scheme; (ii) exploiting rateless erasure codes for P2P networks to increase block-propagation efficiency. Since our protocols only need to rework the current Bitcoin’s networking protocol and does not modify the data structures and crypto-functional components, they can be seamlessly incorporated into the existing Bitcoin blockchain. To validate our designs, we perform analysis on our protocols and implement a Bitcoin network simulator on NS3 to run different block propagation protocols. The analysis and experimental results confirm that our new block propagation protocols could increase the TPS of the Bitcoin blockchain by 100x without compromising security and consensus-building. Index Terms —Blockchain, Networking Protocol, Cut-through Forwarding, Rateless Coding. F 1 I NTRODUCTION BLOCKCHAIN was proposed as a supporting technol- ogy for Bitcoin [1], the first decentralized cryptocur- rency. After Bitcoin, other decentralized cryptocurrencies (e.g., Litecoin [2], Ethereum [3]) quickly emerged. The blockchains of these cryptocurrencies use the Nakamoto’s proof-of-work (PoW) protocol to build consensus among distributed nodes. Blockchain has, by now, become a cutting-edge technology in the fields of FinTech, Internet of Things (IoT), and supply chains [4], [5], [6], thanks to its ability to enable Byzantine agreement over a permission-less decentralized network [7]. A weakness of the current blockchains is the low on- chain transaction throughput. For example, the throughput of Bitcoin is around 5 7 transactions per second (TPS), and that of Ethereum is around 40 TPS [8]. Both are ex- tremely low compared to around 110 TPS of PayPal and 1700 TPS of Visa. Its low transaction throughput hampers the widespread adoption of today’s blockchain technology. A straightforward method to increase TPS is to enlarge the block size so that a block can carry more transactions. However, the propagation of large blocks in the network may incur huge delays that compromise the blockchains’ security and integrity [9], and thus it is not a good idea to increase the TPS by merely increasing the block size. Consequently, new consensus-building protocols and new specially deployed networking infrastructures have been Lihao Zhang and Soung Chang Liew are with the Department of Informa- tion Engineering, ,The Chinese University of Hong Kong, Hong Kong. E-mail: zl018@ie.cuhk.edu.hk, soung@ie.cuhk.edu.hk Taotao Wang is with the College of Electronics and Information Engineering, Shenzhen University, Shenzhen 518060, China. E-mail: ttwang@szu.edu.cn Manuscript received xxx, xxx; revised xxx, xxx.proposed as solutions to increase the TPS of blockchains (see discussions of these related works in Section 2). In this work, we put forth a new block propagation pro- tocol to propagate large blocks containing a large number of transactions without increasing the block relay delay. Unlike the existing solution that requires changing the consensus- building protocol or deploying new network infrastructures, we build our block propagation protocol upon the compact- block relaying protocol that is already adopted by the cur- rent Bitcoin network [10]. Compact-block relaying reduces the block relay delay by compressing blocks that contain transactions (around 250 Bytes each in Bitcoin) into compact blocks that contain transaction hashes (6 Bytes each). There- fore, compact-block relaying can include more transactions into each compact block while maintaining the same relay delay, thus increasing the TPS without compromising the blockchain’s security. In this paper, we further boost TPS by further increas- ing compact-block size including even more transaction hashes into each compact block. However, simply increasing compact-block size induces extra propagation delays that may compromise blockchain’s security. We devise methods to keep the propagation delays at bay while increasing the compact-block size. We adopt a two-pronged approach: 1) we replace the store-and-forward compact-block relaying scheme with a cut-through forwarding scheme; 2) we apply rateless erasure codes to increase the efficiency of block propagation. The contributions of this work are listed as follows. 1) We put forth a new block propagation protocol that replaces the store-and-forward compact-block relaying scheme with a cut-through forwarding scheme. Our new cut-through compact-block re-arXiv:2101.00378v1 [cs.NI] 2 Jan 2021 JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 2 laying scheme can propagate large compact blocks without inducing extra relay. The original compact- block relaying [10], [11] is a store-and-forward scheme in which a whole compact block must be re- ceived before it is forwarded. With cut-through for- warding, a node receives small chunks of a compact block while forwarding earlier-received chunks, al- lowing reception and forwarding of a compact block to progress in parallel. 2) We apply rateless erasure codes to compact blocks. Rateless erasure codes allow the recovery of the source symbols using a subset of the encoded sym- bols. Instead of distributing the original compact block’s source symbols, the compact block’s source distributes the compact block’s encoded symbols. Importantly, rateless erasure codes allow a peer to construct source symbols by retrieving the encoded symbols from multiple peers. Our coded design benefits from the peer-to-peer (P2P) network topol- ogy of the Bitcoin blockchain by efficiently utilizing the upload bandwidths of all peers [12]. 3) We perform a theoretical analysis of our protocols assuming a simple linear network. The analysis results confirm that our protocols can obtain signif- icant TPS gain. Moreover, to evaluate our protocols in a practical network, we implemented a Bitcoin network simulator. We simulated propagating huge compact blocks containing a large number of trans- action hashes to improve TPS. Our results indicate that our block propagation protocols can increase TPS by 100x while maintaining the same propaga- tion delay as the conventional block propagation protocols. Since our design is built upon compact-block relaying that has been implemented into the Bitcoin network, we be- lieve our design can be readily deployed in the existing blockchain networks. The rest of this paper is organized as follows. Section 2 discusses related works. Section 3 presents the background of blockchain. Section 4 and Section 5 introduce our un- coded and coded designs. Section 6 analyzes the perfor- mance of our two-pronged approach. Section 7 discusses our experimental results, and Section 8 concludes this work. 2 R ELATED WORK To improve the TPS of the Bitcoin blockchain, [13], [14] changed the Nakamoto’s PoW consensus protocol . These clean-slate designs modified data structures and many crypto functional components in the Bitcoin blockchain’s consensus protocol. Consequently, these new consensus pro- tocols are incompatible with the today’s Bitcoin blockchain. By contrast, our work aims to increase TPS by redesigning the networking protocol without changing other key func- tional components. Furthermore, our work does not require the building of new network infrastructures. There has been little prior work along this line. Ref. [15] discussed the shortcoming of the networking aspects of the Bitcoin blockchain. To reduce block propa- gation delay, [10], [11] devised compact-block relaying that transmits a compressed block consisting of the hashes oftransactions in the block; transactions are transmitted (upon feedback from the receiver) only if they are missing at the receiver. Investigation in [16] preemptively announce a block’s availability before the complete reception of the whole block. Exploiting the multicasting capability of net- work nodes in blockchain, [17] employs fountain codes [18] to enable a full node to obtain a block from multiple peers. However, [17] still relies on store-and-forwarding rather than cut-through forwarding. Several works advocated building new network infras- tructures for speeding up the block propagation of the Bitcoin blockchain. For example, [19] used a blockchain distribution network (BDN) with high throughput servers to speed up the propagation of large blocks. In particular, [19] adopted cut-through forwarding within the BDN, but not at distributed blockchain nodes. The BDN approach requires building a new infrastructure controlled by a cen- tral authority, partially offsetting decentralized blockchain systems’ many advantages. FIBRE (Fast Internet Bitcoin Relay Engine) in [20] is a transport-layer protocol that uses UDP with forward error correction to decrease the delays caused by packet loss. It also introduces data compression to reduce the amount of network traffic. Our work, focusing on the blockchain networking protocol1, is fully compatible with FIBRE and can be merged with it. The idea of using cut-through forwarding to improve block propagation is also employed by Falcon [21]. The dif- ferences between Falcon and our work here are as follows: i) Falcon implements cut-through forwarding on specially deployed relay nodes rather than on the existing blockchain nodes; ii) Falcon is a commercial project and there lacks performance analysis on its block propagation; iii) Falcon does not employ rateless erasure codes to increase the efficiency of block propagation. 3 B ITCOIN BLOCKCHAIN BACKGROUND This section reviews the background for the Bitcoin blockchain, including its data structure, PoW consensus pro- tocol, network topology, and block propagation protocols. After that, we present our compact block relaying scheme. 3.1 Data Structure of Blockchain Blockchain is a decentralized append-only ledger for digital assets. A blockchain is replicated and shared among par- ticipants. The transactions in the system are contained in concatenated blocks in the blockchain. A block contains a header and multiple transactions. The state of a blockchain maintained by a participant changes according to the blocks in the blockchain. We can write a block as B= [H; T 1; T2;; TK]where Hdenotes the header, fT1; T2;; TKgdenotes the transac- tions in the block, and Kdenotes the number of transactions in a block. The header Hcontains the hash computed from the content of the preceding block, the Merkle root of the transactions in this block, a nonce generated by the PoW consensus protocol and a number indicating the mining 1. In the TCP/IP and OSI nomenclature, the blockchain networking protocol resides in the application layer. In this paper, we do not change IP or TCP protocol at all. JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 3 target. Each block must refer to its preceding block by placing the hash of its preceding block in its header, and the blocks form a chain of blocks arranged in chronological order. 3.2 PoW Consensus Protocol A consensus protocol coordinates the blockchain’s updates to ensure chronological ordering of the blocks and to ensure the blockchain’s integrity and consistency across geograph- ically distributed nodes. Bitcoin [1], as the first implemen- tation of blockchain, introduces the Proof-of-Work (PoW) consensus protocol. Tens of thousands of distributed nodes adopt the PoW consensus protocol to achieve data consis- tency (i.e., ensuring the blockchains maintained by them are the same). Before adding blocks to the blockchain, a Bitcoin node has to prove that it has performed some work known as PoW. In essence, a node must find a nonce input to a hash function so that the hash value is less than a target number, as expressed by h(n; p; m )< D (1) where nis the nonce, pis the hash of the preceding block, mis the Merkle root of the transactions in the block, h() is a hash function, and Dis the mining target that is small with respect to the whole range of possible hash function outputs. The target Dis determined by a difficulty level set by the Bitcoin network. The header Hof a block contains n,p,mandD. The difficulty level is dynamically tuned by the Bitcoin protocol, which ensures that the participating nodes, as a whole, produce an average of one block every ten minutes. The process of solving the PoW puzzle is called mining, and the nodes that perform the mining function are known as miners. When other nodes receive a new block broadcasted from the miner, they verify the block locally and independently. The verification of a block can be divided into two parts: 1) the verification of the PoW solution, i.e., verifying whether the nonce ncontained in the block header fulfills (1) given the other block header’s contents; 2) the verification of the transactions contained in the block body, i.e., verifying the validity of each transaction and verifying whether the Merkle root of all the transactions included in the block body is consistent with the Merkle root contained in the block header. If block passes verification, this block is ap- pended to the local blockchain of the node. 3.3 Blockchain Network Topology The network of the Bitcoin blockchain is based on an unstructured P2P network. The Bitcoin Core project [22] implements the Bitcoin networking protocol. When a node initializes, it attempts to discover a set of peers to establish outgoing or incoming2TCP connections. These connections are used for transaction and block propagation. Each node 2. Outgoing connections are initiated by the node itself, and incoming connections are initiated by other nodes. When a Bitcoin node boots up, it asks the DNS seed nodes for a list of Bitcoin nodes’ IP addresses. Then, it selects a subset of these addresses and initiates up to 8 outgoing connections. Meanwhile, this node’s IP address will be logged and, going forward, sent to other nodes by the DNS seed nodes. This node will accept up to 117 incoming connections. Super nodes may establish more than 8 outgoing connections.maintains a list of peers’ IP addresses. According to the default protocol in the Bitcoin Core client, a node in the Bitcoin network initiates up to 8 outgoing connections and accepts up to 117 incoming connections. While the Bitcoin infrastructure does not support the discovery of the overall network topology — this is to secure the network from potential network attacks such as Eclipse [23], Sybil [24] — there have been works that acquire the network topology using the information in the Bitcoin blockchain protocol messages. A Bitcoin P2P Network Sniffer [25] can connect to a Bitcoin node and listen to network events such as block broadcast or transaction broadcast. The collected data can be used to infer the size of the Bitcoin P2P network and the geographic distributions of nodes. We use this type of network topology information to model our blockchain network simulator, as discussed in Section 7. 3.4 Transaction and Block Dissemination The network that supports the dissemination of transactions and blocks in the blockchain is a P2P network overlaid over the Internet. Each node keeps a replica of the com- plete blockchain. There is no central coordinator to ensure the consistency of the replicas across the different nodes. Rather, the nodes use a simple gossip protocol to propagate messages containing transactions and blocks to update and synchronize their ledger replicas. Let us first describe the block propagation protocol of standard relaying (SR) as illustrated in Fig. 1(a). To avoid unnecessary block forwarding, a peer does not forward blocks to its peer immediately. Instead, an inv [16] contain- ing a summary of the blocks available—specifically, hashes of the blocks—is sent to a neighbor (node B in Fig. 1(a)). When a node receives an inv message, it issues a getdata message to the sender, only requesting for blocks that it does not have. The SR protocol, although simple, is inefficient and incurs large propagation delay and has low transaction throughput. Compact-block relaying (CBR) [10], as illustrated in Fig. 1(b), is a solution to decrease propagation delay. CBR also announces blocks available at the sender through an inv. However, upon receiving a getdata message, the sender only returns a compact block containing a summary of the transactions included in the entire block (i.e., the hashes of the transactions). The receiver then only requests for the transactions in the block that it does not have (blocktxn in Fig. 1(b)) rather than the whole block (block in Fig. 1(a)). Since blocktxn contains only a fraction of all transactions in a block, the bandwidth needed for data propagation is reduced. Although CBR decreases the propagation delay, the sender still needs to have the whole compact block in hand before relaying it. This relaying is called ”stored-and- forward”. While store-and-forward relaying works well for small compact blocks, if we intend to increase the block size to boost TPS, the compact blocks become large themselves. When relaying compact blocks of large size, the store-and- forward CBR can incur large latency. JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 4 Node P Node Q block inv getdata Node R inv (a) Original block propagation protocolgetdata Node P Node Q block getblocktxn Node R blocktxn (b) Compact block relaying protocol compact blockinv getdata inv getdata Compact block (c) Compact block relaying protocol with Cut-through forwarding Node P Node Q block getblocktxn Node R blocktxnblock header Query blockblock header Query getblocktxn blocktxn Fig. 1: The forwarding of a block over two hops by three different block propagation protocols: (a) the original block propagation protocol; (b) the compact block relaying protocol; (c) the cut-through compact block relaying. 4 U NCODED DESIGN : COMPACT -BLOCK RELAY - ING WITH CUT-THROUGH FORWARDING This section presents the design of a new CBR protocol. Al- though the original store-and-forward CBR can increase the TPS to some extent, according to our experiment result (see Section 7.2), using the store-and-forward CBR to propagate compact blocks of large size can lead to large propagation delays. As illustrated in Fig. 1(c), the main essence of our new CBR protocol is to allow parallel relaying of large compact blocks. A node P forwards a compact block to another node Q in small chunks. Node Q then forwards the earlier chunks to node R as later chunks are received. In particular, node Q does not wait for all the chunks of the compact block to be received before forwarding the earlier received chunks. We refer to our block propagation protocol as cut-through compact-block relaying (Cut-through CBR). We elaborate on the details of Cut-through CBR in the following. For a block B= [H; T 1; T2;; TK], the original CBR constructs the compact block as Bc= [H; I 1; I2;; IK], where His the header of the block and Ikis a the 6- byte short hash of transaction Tk. When relaying a compact block, instead of sending out the inv message first as in the original CBR, the sender node in our Cut-through CBR immediately broadcasts the block header Hto its adjacent peers. In particular, our Cut-through CBR requires the nodes to check whether the block header is valid. Specifically, after receiving the block header, the nodes need to perform the header validation by checking whether the nonce contained inHfulfills (1) to validate the PoW solution. Compared with the full validation3of a compact block in the original CBR, this header validation is provisional. As soon as the 3. In the original CBR for Bitcoin, the full validation of a compact block consists of the header validation and the transaction validation. The header validation checks whether the PoW is valid, while the transaction validation check whether the transactions conveyed by the compact block are valid.header His received, the provisional header validation can begin before the whole compact block is received, consum- ing much less computation time. This provisional header verification can prevent malicious nodes from generating fake blocks at low cost. Furthermore, to maintain security, if a node in our Cut-through CBR finds an invalid transaction later during the compact block relaying, this node will suspend the compact-block relaying and alert its peers by sending an abort message, as explained in the following. To further elaborate our protocol, as illustrated in Fig. 1(c), we consider a scenario in which a peer P sends out H, and peer Q is one of P’s neighbors. After peer Q receives H from peer P , peers Q and P execute the following operational steps in order: 1) Peer Q first checks whether the received His in its local pool. If it is, peer Q does nothing and discards H. If it is not, peer Q sets peer P as this block’s seed peer and goes to the next operation. 2) Peer Q performs the provisional header validation ofHto verify the PoW solution. If the provisional header validation passes, peer Q puts Hinto its local pool and broadcasts it to all adjacent peers (except the peer P). Furthermore, peer Q sends a query message to peer P to ask for the transaction hashes in the compact block and then goes to step 4). If the provisional header validation is not fulfilled, peer Q suspends all the operations related to this block. 3) After receiving the query message from peer Q, peer P sends peer Q the transaction hashes in chunks. Specifically, every consecutive Mtransaction hashes are grouped into a hash chunk, and the hash chunks are sent one after another. Peer P keeps sending the hash chunks to peer Q as long as it has any of the hash chunks (either generated from peer P itself if peer P is the miner of this block or received from peer P’s seed peers). JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 5 4) Peer Q receives the hash chunks sent from peer P and performs the chunk validation by validating the transactions indexed by the transaction hashes. In case peer Q lacks some of the transactions on its local storage, it requests the missing transactions from other nodes by sending the getblocktxn mes- sage, as in the original CBR [10]. Meanwhile, peer Q also listens for query messages from other peers who treat peer Q as their seed peer of the compact block. As illustrated in Fig. 1(c), peer Q receives a peer R’ query message, peer Q then answers peer R with its validated hash chunks. 5) If peer Q finds an invalid transaction during the chunk validation, it will suspend the propagation of this compact block. Furthermore, it will clear all the compact-block related messages related to the compact block from its storage and send an abort message to alert its peers that query for the same compact block. If all transactions pass validation, this block is valid, and peer Q reconstructs the block and appends it to the blockchain. Our Cut-through CBR protocol processes the reception and the forwarding of a compact block’s small chunks in paral- lel, in a pipeline manner. It thus speeds up the propagation of a huge compact block. 5 C ODED DESIGN : LEVERAGING RATELESS COD- ING In Cut-through CBR, a peer can only retrieve the compact block’s chunks from one peer. This section leverages rateless erasure codes to allow a peer to retrieve the chunks from multiple peers. This coded design incorporates fountain codes [18] (a kind of rateless erasure codes) into Cut-through CBR to efficiently utilize the upload bandwidths of multiple peers [12]. In the coded design, instead of sending Mtransac- tion hash chunks fp1; p2;; pMg, the block miner per- forms fountain coding over the hash chunks to generate the equal-size coded symbols fx1; x2;xi;g accord- ing to the coding scheme proposed in [26]. Specifically, the coding scheme chooses a set of Mcoding cofficients Ci=fc1; c2; c3: : : ; c Mgin a finite field. Then we have xi=MX j=1cjpj (2) We refer tofx1; x2: : : ; x i; :::gas the coded hash chunks. Then the miner sends these coded hash chunks ( Ciis also sent out together with xi) to the peers querying this compact block. After receiving a coded hash chunk, a peer relays it to some of its peers querying for the same compact block. In this way, each node can be the seed peer of a number of its peers during the compact-block relaying process. Furthermore, fountain code guarantees that the likelihood of decoding a set of coded chunks into the compact-block approaches 1when n=M(1 +")coded chunks have been received, where "is typically less than 2%[18]. We name the rateless-erasure-codes enhanced protocol Coded Cut-through CBR. We describe the operational steps of Coded Cut-thought CBR using an example networktopology illustrated in Fig. 2, where peer P is a miner with two neighbor peers: peer Q and peer S. In particular, peer Q and peer S are also the neighbors of each other. After peer P mines a block, it sends the block header Hto peer Q. After peer Q receives H, peers Q and P execute the following operational steps in order (these operational steps are illustrated in Fig. 3): 1) Peer Q first checks whether it has the block using in H. If it has the block, peer Q does nothing. If it does not have the block, peer Q sets peer P as this block’s seed peer and goes to step 2. 2) Peer Q performs the provisional header validation over Hto validate the PoW. If the PoW is valid, peer Q puts Hinto its local pool and relays Hto its neighbor peer (in this case, its neighbor peer is peer S). After that, peer Q sends a query message to peer P querying the transaction hashes. If the PoW is not valid, peer Q aborts and does not relay this compact block. 3) After receiving the query message from peer Q, peer P sends peer Q the coded hash chunks gener- ated by fountain coding. Specifically, peer P keeps generating and sending the coded hash chunks xi; i= 1;2;to peer Q until peer Q sends back an ACK message announcing that it receives sufficient coded hash chunks to decode the fountain code. In Fig. 3, peer P sends a total of ncoded hash chunks to peer Q. 4) When receiving coded hash chunks xi;1in from peer P , peer Q also relays its received coded hash chunks to peer S that queries the chunks after receiving Hfrom peer Q. 5) After receiving the ACK, peer P stops sending its coded hash chunks to peer Q. Peer P then sends H to peer S seeking to be a potential seed peer of peer S. Once receiving the query message sent from peer S, peer P starts generating and sending coded hash chunk xi; in+ 1to peer S. 6) At this time, peer S has two seed peers of this compact block, namely, peer P and peer Q. Peer S keeps receiving the coded hash chunks sent from either peer P or peer Q. Once it gets sufficient coded hash chunks for decoding the compact block, peer S sends the ACK to peer P and peer Q one after another. In Fig. 3, peer S receives j; jncoded hash chunks from peer Q and k; kn0coded hash chunks from peer P . Here, for peer S, we have j+k=n0,n0is the number of coded hash chunks required to decode the compact block. After receiving sufficient coded chunks, peer Q and peer S decode the fountain-code and validate all transactions. If all transactions pass validation, each peer reconstructs this block and appends it to the blockchain. In Fig. 3, if the peer Q’s upload bandwidth is much lower than that of other peers, then we have jn. In this case, if using standard relaying (SR) (see Section 3.4) and Cut- through CBR, peer S can do nothing except receiving the information sent from peer Q. In Coded Cut-through CBR, however, the available upload bandwidth of other nodes (in this case, the available upload bandwidth of peer P) JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 6 Q P Coded Hash Chunk n+k S Block Header Coded Hash Chunk 2 Coded Hash Chunk n Coded Hash Chunk 1 Block Header Coded Hash Chunk 2 Coded Hash Chunk 1 Block Header Coded Hash Chunk j Coded Hash Chunk 1 Coded Hash Chunk n+1 Coded Hash Chunk n+k Coded Hash Chunk 3 Fig. 2: The network topology of three nodes (peer P , peer Q, and peer S) relaying one compact block using Coded Cut- through CBR. Node P is the miner of the compact block in this example. P Q P Coded Hash Chunk 1 Coded Hash Chunk 2 Coded Hash Chunk nS Peer P starts to communicate with peer S Peer P stops the communication with peer Q here Peer S receives sufficient coded hash chunks from peer Q and peer P Fig. 3: The illustration for Coded Cut-through CBR. can be further used to relay the compact block to peer S. Hence, Coded Cut-through CBR leverages the P2P network topology to use the upload bandwidths of all peers effi- ciently. Thus, it can speed up the information propagation in the Bitcoin blockchain. We theoretically analyze our Cut- through CBR and Coded Cut-through CBR protocols to validate their potential gains in the next section. 6 P ERFORMANCE ANALYSIS This section presents the effect of the block propagation delay on the Bitcoin blockchain’s TPS and the analysis of the block propagation latencies of the four propagation pro- tocols (SR, CBR, Cut-through CBR and Coded Cut-through CBR). 6.1 The effect of the block propagation delay on TPS We first calculate the TPS of the Bitcoin blockchain. We denote the block size by Sblock , the average transaction sizebyStransaction , and the inter-block generation time by TB. The TPS of the blockchain is calculated as TPS =Sblock Stransaction TB(3) In Bitcoin, we have Sblock = 1 MB,Stransaction = 380 :04B andTB= 600 s, and thus the TPS of Bitcoin is TPS Bitcoin = 1048576 380:046004:6. According to (3), a simple way to increase the TPS is to increase Sblock or to decrease TB. However, merely increasing Sblock or decreasing TBcannot increase the TPS, as explained below. It takes a certain time to propagate a block over the p2p network of the blockchain. Let Ldenote the time latency of propagating a block from the miner to almost all nodes in the whole network (e.g., 90% of the nodes in the network). First, the increase of Sblock leads to an increase of L, which, in turn, may compromise the security of the blockchain [9]. In particular, Lshould be sufficiently smaller than TB. The closer Lgets to TB, the more forks, more orphan blocks, and more chain re-organizations there will be. According to [19], the probability for a fork to occur at another miner is approximately P(forkjTB= 600) = 1eL TB (4) In the extreme case, the system will be exposed to security vulnerabilities such as double-spend attacks [9]. Motivated by (4), this paper uses a performance metric, propagation divergence factor, to quantify the effect of block propagation latency. Propagation Divergence Factor : The propagation diver- gence factor is defined as  =L TB(5) where 0since L0. The larger , the larger the divergence (e.g., asynchronies and discrepancies) is among the different local replicas of the blockchain maintained by different nodes. In the extreme case where L= 0, we have  = 0 meaning that the blockchains of all the nodes in the network become instantaneously synchronized. The main purpose of our protocols is to suppress the increase of Lwhen we increase Sblock . In this way, we can boost the TPS of the Bitcoin blockchain while maintaining the security of the blockchain. According to (3), increas- ingSblock by 100x can increase the TPS by 100x, yielding TPS Bitcoin460. In the next subsection, we analyze the block propagation latency Lcaused by different block propagation protocols. 6.2 The comparison of the block propagation latency using different protocols We next analyze the block propagation latencies of the four propagation protocols (SR, CBR, Cut-through CBR and Coded Cut-through CBR). For simple illustration, we consider a network with a linear topology consisting of n+1 nodes as shown in Fig. 4. We assume the communication bandwidth of each node is B. We calculate the block prop- agation latency of propagating a block from node 0to node nin this linear network. LetSipbe the IP packet’s payload size and Shbe the IP packet header size. When using SR to propagate blocks, JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 7 ch cb chSVOCut-through CBR and Coded Cut -through CBR cb cbSOCBR bbSOSR bV bV cb CBRSO Node 0 Node 1 Node 2Node n Node 0 Node 1 Node 2Node n Node 0 Node 1 Node 2Node n Fig. 4: A simple linear network with n+ 1nodes. with IP packet fragmentation, a block needs to be cut into Sblock SipIP packets. The block propagation latency from node 0to node ncaused under the SR protocol is given by LSR=n(Sblock+Ob) B+nVb (6) where Ob=Sblock SipShis the overhead caused by the IP packet fragmentation when relaying a block over one hop between two neighbor nodes, and Vbis the time incurred by a full-block validation process. LetNtbe the number of transactions in a block. The size of a compact block is given by Scb=NtSI+Shcb (7) where SIis the size of a short transaction hash and Shcb is the size of the compact-block header. When using CBR, a compact block needs to be cut intoScb SipIP packets. Recall that in Bitcoin, nodes have 10 min ( TB= 10 min) to propagate their collected transactions to all other nodes before the transactions are announced in the latest block. For the sake of simplicity, we assume that all transactions within the block are already available at the nodes given the long duration of 10 min, and there is no need to go and fetch the transactions. In fact, [10] found that in the Bitcoin network, before a new block is found, transactions obtained by all nodes are almost synchronized. Then, the block propagation latency from node 0to node nunder CBR is given by LCBR =n(Scb+Ocb) B+nVb (8) where Ocb=Scb SipShis the overhead caused by the IP packet fragment when relaying a compact block over one hop. From (6) and (8), we can see that CBR speeds up the block propagation significantly, since ScbSb. In particu- lar, if Vbis negligible, CBR can reduce the block propagation latency bySblock Scbtimes compared with SR. However, LCBR is still proportional to nScb. Consequently, the increase of Scbcan lead a significant increase of LCBR , making it impossible to increase TPS by inserting more transaction hashes into each compact block. We next analyze the propagation latency of the cut- through forwarding scheme used in both Cut-through CBR and Coded Cut-through CBR. Let k1be the number of chunks per compact block and Schbe the chunk size. We thus have Scb=kSch. LetVch=Vb kbe the time needed tovalidate the transactions in a chunk and Ochbe the overhead of IP packet fragmentation when relaying a chunk over one hop. The block propagation latency from node 0to node n under Cut-through CBR is given by LCTCBR =k(Sch+Och B+Vch)+(n1)(Sch+Och B+Vch) (9) The first term of (9) is the block propagation latency in the first hop (from node 0to node n) and the second term of (9) is the block propagation latency over the rest of the hops (from node 0to node n). We further investigate the effect ofkwhen using the cut-through forwarding scheme in the following two cases: If1kScb Sip, then we haveScb k=SchSip, which means that we need to perform IP packet fragmentation over each chunk. Specifically, a chunk needs to be cut into Sch SipIP packets and Och=Sch SipSh=Ocb k. From (9), we then have LCTCBR = (Scb+Ocb B+Vb) +(n1) k(Scb+Ocb B+Vb) (10) Compared with (8), the increase of kin (10) will significantly reduce the block propagation latency. We denote the gain obtained from the cut-through forwarding scheme over the original CBR by gCTCBR =LCBRLCTCBR . The gain gCTCBR can be computed as gCTCBR =n(Scb+Ocb) B+nVb(k+n1)(Sch+Och B+Vch) =n(Scb+Ocb)(k+n1)(Scb k+Ocb k) B+nVb(k+n1)Vb k = (11 k)(n1)((Scb+Ocb) B+Vb) (11) Note that since k1and11 k>0, we have gCTCBR>0. That is, the cut-through forwarding scheme outperforms the traditional CBR when 1kScb Sip. Eqn. (8) and Eqn. (11) lead to several conclusions: 1) When k= 1 orn= 1, both Cut-through CBR and Coded Cut-through CB downgrade to CBR. 2) When kis fixed, the gain obtained from the cut- through forwarding scheme becomes larger with the increase of Scb. The cut-through forwarding scheme hence is expected to perform well even if Scbis very large. 3) When Scbis fixed, LCTCBR is a decreasing func- tion of k. The increase of kachieves lower propaga- tion latency. Ifk >Scb Sip, then we haveScb k=Sch< Sip. In this case, we use one IP packet to transmit one chunk with the IP packet size smaller than the maximum IP packet size. Hence Och=Shand the gain gCTCBR is given by gCTCBR =n(Scb+Ocb) B+nVb(k+n1)(Sch+Och B+Vch) =n(Scb+Ocb)(k+n1)(Scb k+Sh) B+nVb(k+n1)Vb k(12) From (12), we can see that LCTCBR is no more a decreas- ing function of k. To find the optimal k that maximizes the gain expressed in (12), we can set the derivative of JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 8 TABLE 1: PARAMETERS OF THE BITCOIN SIMULATOR Parameter Bitcoin Simulator # of the nodes 6000 Block interval 10 min # of the connectionDistribution according to Miller et al. [30] Geographical distributionDistribution according to actual blockchains Bandwidth propagation delay6 regional bandwidth and propagation delay LCTCBR with respect to kto zero:dgCTCBR dk= 0, and solve the equation. The optimal k is given by k=s B(n1)(Vb+Scb) Sh(13) where the gain LCTCBR achieves its maximum. The above analysis for a linear network shows the poten- tial gain brought by our Cut-through CBR protocol. In the next section, we will investigate the performances of our Cut-through CBR and Coded Cut-through CBR protocols under a practical network setup. 7 S IMULATION RESULTS This section presents simulation results comparing the per- formance of the four block-propagation protocols: SR, CBR, Cut-through CBR, and Coded Cut-through CBR. Specifi- cally, using the network simulator 3 (NS3) [27], we inves- tigate the block-propagation latencies of these four propa- gation protocols in a simulated Bitcoin network. 7.1 Simulation Setup Our investigation is performed on a simulator extended from the Bitcoin simulator implemented by [9]. The Bitcoin simulator, written in NS3, is designed to simulate Bitcoin nodes’ behavior in the Bitcoin network. The Bitcoin simula- tor can simulate a Bitcoin network with thousands of nodes. The Bitcoin simulator retrieved the current geographical node distribution from bitnodes.21.co and adopted the dis- tribution to define its simulated nodes’ locations. In the simulated Bitcoin network, the connection between two nodes is established as a point-to-point (P2P) link. Each P2P link has a random bandwidth and transmission delay (according to the geographical location) following a statis- tical distribution from Verizon [28] and testmy.net [29]. The parameters in Table I presents the parameters used in the Bitcoin simulator [9]. The original Bitcoin simulator already included the SR protocol. We implemented CBR, Cut-through CBR and Coded Cut-through CBR in the simulator. The extended simulator allows us to set parameters such as the block size and the chunks per block for Cut-through CBR and Coded Cut-through CBR. We performed simulations to investigate the effect of block size on the network block propagation latency and the propagation divergence factor defined in (5) under different block propagation protocols. Our overall simulation experiment consists of several simulation runs. We fixed a block size for each run and then ran separate simulations to evaluate SR, CBR, Cut-through CBR, and Fig. 5: Median block propagation latency versus block size for different block propagation protocols. Coded Cut-through CBR. Each simulation run, for a specific relay protocol, monitored the statistics of up to 10 000 blocks created during the simulation to smooth the experimental results. 7.2 Experimental Results Fig. 5 and Fig. 6 show the median and the CDF of the block propagation latency, respectively. We have the following observations: 1) When relaying a large block, cut-through forward- ing can significantly speed up block propagation with respect to SR and CBR. For example, Fig. 5 and Fig. 6 show that when relaying a block larger than 25MB, Cut-through CBR and Coded Cut-through CBR reduce both the median and the tail of block propagation latency by up to three times compared with CBR and by up to more than one hundred times compared with SR. 2) Coded Cut-thought CBR can further speed up the block propagation compared to Cut-through CBR. For example, Fig. 5 and Fig. 6 show that the median and the tail of block propagation latency of Coded Cut-through CBR are both up to two times smaller than that of cut-through CBR for different k. Fig. 7 shows the stale-block rate versus the propagation divergence factor . We can see that large increases stale-block rate significantly. The reason is that when the block propagation divergence factor is large, a miner cannot receive the latest announced block (mined by others) in time and may still announce its mined block with the same block height, leading to a large stale-block rate. Fig. 8 shows the propagation divergence factor of different protocols when different block sizes are used. From Fig. 8, we can see that the propagation divergence factors of SR and CBR increase significantly when the block size is large, leading to a large stale-block rate. For example, increasing block size from 1 MB to 100 MB (100x) increases the propagation divergence factor by 30x and increases the stale-block JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 9 (a) BLOCK SIZE: 1 MB (b) BLOCK SIZE: 25 MB (c) BLOCK SIZE: 50 MB (d) BLOCK SIZE: 100 MB Fig. 6: CDF of block propagation latency for different block propagation protocols. Fig. 7: Stale-block size versus propagation divergence factor derived using (4). Fig. 8: Propagation divergence factor versus block size for different block propagation protocols. rate by around 30x for CBR. However, Cut-through CBR and Coded Cut-through CBR can suppress the increase of with the increase of block size. In particular, the of Coded Cut-through CBR with the optimal k(the optimal k is obtained through experiments), when the block size is 100 MB, is roughly equal to the of SR when the block size is 1MB. In summary, Cut-through CBR and Coded Cut-through CBR can be used for propagating 100 MB blocks while maintaining the propagation latency to the level of the traditional block propagation protocol that propagates 1 MB blocks, hence increasing the TPS capacity by 100x. 8 C ONCLUSION We proposed a new blockchain networking protocol to increase the TPS of the Bitcoin blockchain. When a large block size is used in the Bitcoin blockchain, original block propagation protocols, such as SR and CBR, suffer from large block propagation delays to large stale-block rate, JOURNAL OF LATEX CLASS FILES, VOL. XX, NO. X, DECEMBER 2020 10 compromising the blockchain’s security. In this work, we put forth a two-pronged approach to increase the block size without inducing extra propagation latency. First, we design a Cut-through CBR that enables parallel reception and forwarding of compact blocks at relay nodes. Second, we design a Coded Cut-through CBR that incorporates rateless erasure codes into Cut-through CBR to further increase efficiency. Our simulation results demonstrate that our protocols can significantly reduce the block propagation latency and suppress the stale-block rate. Specifically, our protocols can increase the TPS of the Bitcoin blockchain by 100x without compromising the blockchain’s security. More importantly, our approach only needs to rework the communication and networking architecture of the current Bitcoin blockchain without changing the data structures and crypto-functional components in them. Therefore, our protocols can be seamlessly incorporated into the existing Bitcoin blockchain. The implementation of our protocols in Bitcoin-like blockchains may allow the blockchains to be used in many use cases not possible currently. REFERENCES [1] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” Manubot, Tech. Rep., 2019. [2] J. Reed, “Litecoin: An introduction to litecoin cryptocurrency and litecoin mining,” 2017. [3] G. Wood et al. , “Ethereum: A secure decentralised generalised transaction ledger,” Ethereum project yellow paper , vol. 151, no. 2014, pp. 1–32, 2014. [4] W. D. Du, S. L. Pan, D. E. Leidner, and W. Ying, “Affordances, experimentation and actualization of fintech: A blockchain im- plementation study,” The Journal of Strategic Information Systems , vol. 28, no. 1, pp. 50–65, 2019. [5] N. Kshetri, “Can blockchain strengthen the internet of things?” IT professional , vol. 19, no. 4, pp. 68–72, 2017. [6] M. Kouhizadeh and J. Sarkis, “Blockchain practices, potentials, and perspectives in greening supply chains,” Sustainability , vol. 10, no. 10, p. 3652, 2018. [7] S. Singh and N. Singh, “Blockchain: Future of financial and cy- ber security,” in 2016 2nd international conference on contemporary computing and informatics (IC3I) . IEEE, 2016, pp. 463–467. [8] J. G ¨obel and A. E. Krzesinski, “Increased block size and bitcoin blockchain dynamics,” in 2017 27th International Telecommunication Networks and Applications Conference (ITNAC) . IEEE, 2017, pp. 1–6. [9] A. Gervais, G. Karame, K. W ¨ust, V . Glykantzis, H. Ritzdorf, and S. Capkun, “On the security and performance of proof of work blockchains,” in Proceedings of the 23nd ACM SIGSAC Conference on Computer and Communication Security (CCS) . ACM, 2016. [10] M. Corallo, “Compact block relay. bip 152,” 2017. [11] A. P . Ozisik, G. Andresen, G. Bissias, A. Houmansadr, and B. Levine, “Graphene: A new protocol for block propagation using set reconciliation,” in Data Privacy Management, Cryptocurrencies and Blockchain Technology . Springer, 2017, pp. 420–428. [12] C. Gkantsidis and P . R. Rodriguez, “Network coding for large scale content distribution,” in INFOCOM 2005. 24th Annual Joint Confer- ence of the IEEE Computer and Communications Societies. Proceedings IEEE , vol. 4. IEEE, 2005, pp. 2235–2245. [13] W. Wang, D. T. Hoang, P . Hu, Z. Xiong, D. Niyato, P . Wang, Y. Wen, and D. I. Kim, “A survey on consensus mechanisms and mining strategy management in blockchain networks,” IEEE Access , vol. 7, pp. 22 328–22 370, 2019. [14] C. Natoli, J. Yu, V . Gramoli, and P . Esteves-Verissimo, “Decon- structing blockchains: A comprehensive survey on consensus, membership and structure,” arXiv preprint , 2019, [Online]. Avail- able: https://arxiv.org/abs/1908.08316. [15] T. Neudecker and H. Hartenstein, “Network layer aspects of permissionless blockchains,” IEEE Communications Surveys & Tu- torials , vol. 21, no. 1, pp. 838–857, 2018. [16] C. Decker and R. Wattenhofer, “Information propagation in the bitcoin network,” in IEEE P2P 2013 Proceedings . IEEE, 2013, pp. 1–10.[17] N. Chawla, H. W. Behrens, D. Tapp, D. Boscovic, and K. S. Candan, “Velocity: Scalability improvements in block propagation through rateless erasure coding,” in 2019 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) . IEEE, 2019, pp. 447–454. [18] M. Luby, “Lt codes,” in The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002. Proceedings. IEEE, 2002, pp. 271–280. [19] U. Klarman, S. Basu, A. Kuzmanovic, and E. G. Sirer, “bloxroute: A scalable trustless blockchain distribution network whitepaper,” IEEE Internet of Things Journal , 2018. [20] M. Corallo, “Fibre: Fast internet bitcoin relay engine,” 2017. [21] falcon@systems.cs.cornell.edu, Falcon Network , 2015. [Online]. Available: https://www.falcon-net.org/ [22] B. Project, bitcoin-core , 2009-2020. [Online]. Available: https: //bitcoin.org/en/bitcoin-core/ [23] E. Heilman, A. Kendler, A. Zohar, and S. Goldberg, “Eclipse attacks on bitcoin’s peer-to-peer network,” in 24thfUSENIXg Security Symposium ( fUSENIXgSecurity 15) , 2015, pp. 129–144. [24] G. Bissias, A. P . Ozisik, B. N. Levine, and M. Liberatore, “Sybil- resistant mixing for bitcoin,” in Proceedings of the 13th Workshop on Privacy in the Electronic Society , 2014, pp. 149–158. [25] J. A. D. Donet, C. P ´erez-Sola, and J. Herrera-Joancomart ´ı, “The bitcoin p2p network,” in International Conference on Financial Cryp- tography and Data Security . Springer, 2014, pp. 87–102. [26] M. Wang and B. Li, “Network coding in live peer-to-peer stream- ing,” IEEE Transactions on Multimedia , vol. 9, no. 8, pp. 1554–1567, 2007. [27] T. R. Henderson, M. Lacage, G. F. Riley, C. Dowell, and J. Kopena, “Network simulations with the ns-3 simulator,” SIGCOMM demon- stration , vol. 14, no. 14, p. 527, 2008. [28] V . latency, Verizon . [Online]. Available: http://www. verizonenterprise.com/about/network/latency/ [29] testmy.net, testmy.net . [Online]. Available: http://testmy.net/ country [30] A. Miller, J. Litton, A. Pachulski, N. Gupta, D. Levin, N. Spring, and B. Bhattacharjee, “Discovering bitcoin’s public topology and influential nodes,” et al, 2015.
{ "id": "2101.00378" }
2206.08401
Is decentralized finance actually decentralized? A social network analysis of the Aave protocol on the Ethereum blockchain
Decentralized finance (DeFi) has the potential to disrupt centralized finance by validating peer-to-peer transactions through tamper-proof smart contracts, thus significantly lowering the transaction cost charged by financial intermediaries. However, the actual realization of peer-to-peer transactions and the levels and effects of decentralization are largely unknown. Our research pioneers a blockchain network study that applies social network analysis to measure the level, dynamics, and impacts of decentralization in DeFi token transactions on the Ethereum blockchain. First, we find a significant core-periphery structure in the AAVE token transaction network where the cores include the two largest centralized crypto exchanges. Second, we provide evidence that multiple network features consistently characterize decentralization dynamics. Finally, we document that a more decentralized network significantly predicts a higher return and lower volatility of the decentralized market of AAVE tokens on the Ethereum blockchain. We point out that our approach is seminal for inspiring future extensions related to the facets of application scenarios, research questions, and methodologies on the mechanics of blockchain decentralization.
http://arxiv.org/pdf/2206.08401v4
Ziqiao Ao, Lin William Cong, Gergely Horvath, Luyao Zhang
econ.GN, cs.CR, q-fin.EC, q-fin.ST, stat.CO, E.0; G.1; G.3; I.6; J.4; J.6
econ.GN
Is decentralized finance actually decentralized? A social network analysis of the Aave protocol on the Ethereum blockchain ZIQIAO AO∗†, LIN WILLIAM CONG‡∗, GERGELY HORVATH∗†§, and LUYAO ZHANG∗†§ Decentralized finance (DeFi) has the potential to disrupt centralized finance by validating peer-to-peer transactions through tamper-proof smart contracts, thus significantly lowering the transaction cost charged by financial intermediaries. However, the actual realization of peer-to-peer transactions and the levels and effects of decentralization are largely unknown. Our research pioneers a blockchain network study that applies social network analysis to measure the level, dynamics, and impacts of decentralization in DeFi token transactions on the Ethereum blockchain. First, we find a significant core-periphery structure in the AAVE token transaction network where the cores include the two largest centralized crypto exchanges. Second, we provide evidence that multiple network features consistently characterize decentralization dynamics. Finally, we document that a more decentralized network significantly predicts a higher return and lower volatility of the decentralized market of AAVE tokens on the Ethereum blockchain. We point out that our approach is seminal for inspiring future extensions related to the facets of application scenarios, research questions, and methodologies on the mechanics of blockchain decentralization. Keywords : blockchain, decentralized finance, social network analysis, AAVE, Ethereum, core-periphery, number of components, giant component ratio, modularity, degree centrality, number of cores, market return, market volatility, blockchain operation management. ACM CCS : E.0, G.1, G.3, I.6, J.4, J.6 JEL Code : C15, C22, C23, C58, C63, C81, G17 Acknowledgments : We have benefited from the intellectual conversations at the 29th Annual Global Finance Conference featuring the Keynote speaker Nobel Prize Laureate, Prof. Robert Engle in Braga, Portugal, June 20-22, 2022, the Crypto Economics Security Conference (CESC) hosted by Berkeley Center for Responsible Decentralized Intelligence (DCI) at University of California, Berkeley, C.A., United States, Oct. 31-Nov.1, 2022, and the 12th Portuguese Financial Network Conference in Madeira, Portuguese, July 2023. We Thank Prof. Claudio J. Tessone, Prof. William Goetzman, and Prof. Subrahmanyam Avanidhar for their insightful comments. Ziqiao Ao contributed to the research as an undergraduate advisee and signature work mentee of Prof. Luyao Zhang and the Summer Research Scholar (SRS) mentee of Prof. Gergely Horvath in the Class of 2022, at Duke Kunshan University, supported by the undergraduate program. Ziqiao Ao is now at McCormick School of Engineering, Northwestern University. Luyao Zhang is supported by National Science Foundation China on the project entitled “Trust Mechanism Design on Blockchain: An Interdisciplinary Approach of Game Theory, Reinforcement Learning, and Human-AI Interactions (Grant No. 12201266). The authors declare no conflict of interest. ∗Names by the alphabetical order of the last names. †Duke Kunshan University, No. 8 Duke Ave, Kunshan, Suzhou, Jiangsu, China, 215316. ‡Cornell SC Johnson College of Business, IC3, & NBER, Ithaca, NY, 14853, USA. §Contact Luyao Zhang: (email: lz183@duke.edu, institutions: Data Science Research Center and Social Science Division) and Gergely Horvath (email:gergely.horvath@dukekunshan.edu.cn, institutions: Social Science Division) at Duke Kunshan University. Authors’ address: Ziqiao Ao; Lin William Cong; Gergely Horvath; Luyao Zhang.arXiv:2206.08401v4 [econ.GN] 1 Dec 2023 2 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang 1 INTRODUCTION DeFi, short for decentralized finance, is a blockchain-powered peer-to-peer finan- cial system [Werner et al .2021]. Harvey et al .[2021] predict that DeFi could disrupt centralized finance by validating peer-to-peer transactions by tamper-proof smart contracts and thus significantly lower the transaction cost charged by financial in- termediaries. However, the actual realization of peer-to-peer transactions and the levels of decentralization are largely unknown [Cong et al .2022; Zhang et al .2022b; Zhang 2023]. Moreover, how the levels of decentralization would affect the economic performance of the blockchain platform is broadly unexplored. How can decentraliza- tion be measured? The comparative study of decentralized and centralized financial markets is not new [Canales and Nanda 2012; Miao 2006]. However, before blockchain technology existed, decentralized markets tended to have worse performance. For example, decentralized over-the-counter markets and the lack of a central market- maker induce high trading costs and give rise to intermediations between trading partners [Battiston et al .2012; Bosma et al .2017; Yun et al .2019]. Moreover, Bovet et al.[2019]; Motamed and Bahrak [2019]; Vallarano et al .[2020] find that network features, a proxy for the market structure in decentralized markets affect important market outcomes (e.g., liquidity and volatility) that individual traders, at the hub of the network, make more profit, in general, [Di Maggio et al .2017; Hollifield et al .2017; Li et al .2019]. Does blockchain live up to its promise of empowering peer-to-peer transactions in decentralized financial markets? Our research applies social network analysis [Jackson 2008; Otte and Rousseau 2002; Scott 1988] to blockchain transaction data and aims to answer the following research questions: •Realization of decentralization: Are the transactions in decentralized banks on blockchain indeed decentralized? •Blockchain network dynamics: How do different network features of blockchain transactions correlate and change over time? •Network features and market activities: How do network features predict and interact with the economic performance of decentralized markets on blockchains? We pioneer a blockchain network study that applies social network analysis to measure the level, dynamics, and impacts of decentralization in DeFi token transactions on the Ethereum blockchain. We analyze our research questions with an application to the transaction network of AAVE, the native utility token of a top-ranked decentralization finance application on Ethereum. We have three main findings. (1)There exists a significant core-periphery structure in the AAVE token transac- tion network where the cores include the two largest centralized exchanges and central smart contracts with specific functions. (2)Multiple network features including the number of components, the relative size of giant components, modularity, and standard deviation of degree cen- trality consistently characterize decentralization dynamics. Is decentralized finance actually decentralized? 3 (3)A more decentralized network as represented by the network measures sig- nificantly predicts a higher return and lower volatilities of the AAVE token transaction network. The structure of the remainder of this paper is meticulously outlined as follows: Section 2 embarks on a comprehensive review of the pertinent literature. Section 3 delineates the foundational aspects of network features and elucidates the methodol- ogy for measuring decentralization utilizing these network characteristics. Section 4 details the data source, data generating mechanics, and data processing workflow. Sec- tion 5 delineates our approach of empirical analysis and expounds upon the findings pertaining to the three posed research inquiries. Finally, Section 6 synthesizes the key takeaways, reflecting on the implications of our findings and proposing avenues for future scholarly inquiry in this domain. Additionally, to ensure transparency and replicability, the data and code supporting our analyses are made available on GitHub at [removed for anynomous review]. 2 LITERATURE REVIEW Our research contributes to the literature on the interplay of the financial market, social network studies, and crypto-economics. Fig. 1. Contribution Map of this Study. Note: This figure displays the contribution map of our study on the existing literature. 2.0.1 Social network analysis in the financial market and core-periphery structures. The application of social network analysis (SNA) to financial markets has gained momentum after the 2008-2009 financial crisis. Lending relationships among banks and other financial institutions proved to be conduits of contagion of liquidity shortages and financial distress [Anand et al .2013; Blasques et al .2018; Gai et al .2011; Langfield 4 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang et al.2014]. Regulators came to realize that studying the structure of financial networks is key to identifying sources of systemic risk, for example, in the form of financial institutions that are ‘too central to fail’, meaning that their failure may generate a cascade that ruins the whole financial system [Bardoscia et al .2017; Battiston et al.2012; Bosma et al .2017; Yun et al .2019]. The decentralized financial market on blockchain in our research thus serves as a potential solution to the “too central to fail” problem. However, one of the most important conclusions of this literature was that in many financial markets, transactions are not carried out in an anonymous market but through stable trading relationships that reduce transaction costs [Babus and Kondor 2018; Duffie et al .2005]. The peer-to-peer transactions on the blockchain are instead anonymous by default and might not benefit from stable exchange relationships like those observed in the traditional financial market. A commonly adopted notion in social network analysis is the core-periphery struc- ture, which presents two qualitatively distinct components: “core” nodes that are densely connected, and “periphery” nodes that are loosely connected to the core members but not necessarily to each other [Gallagher et al .2021]. The core-periphery structure enables us to compare and analyze the properties of the two types of nodes more accurately and efficiently under different contexts structurally and functionally [Csermely et al .2013]. SNA has already been widely applied to study financial net- works. For example, Sui et al .[2019] compares the resilience between core-peripheral networks and complete networks by analyzing the financial contagion of interbank networks. Barucca and Lillo [2016] proposes methods to identify different network architectures including bipartite and the core-periphery structure in the case of the interbank network. In the cryptocurrency market, the core-periphery structure of stable assets based on liquidity and capital inferred by a network feature has been examined to study the market impact and evolution [Polovnikov et al. 2020]. A variety of algorithms have been developed by scholars for extracting the core- periphery structure [Malliaros et al .2019], which differ typologically based on their definitions of the nature of the network and the way in which core and peripheral nodes are connected. The most popular is the Borgatti-Everett (BE) algorithm, which partitions the network into a central hub with interlacing nodes and a periphery radiating outward from the hub [Borgatti and Everett 2000]. Cucuringu et al .[2016] detected the core-periphery structure through spectral methods and geodesic paths based on the transportation networks. In addition to the classical two-block methods, there exist algorithms that build a continuous spectrum between a core and a periphery which have been applied in examples related to collaboration, voting, transportation, etc. [Boyd et al .2010; Rombach et al .2017; Rossa et al .2013]. The continuous structure enables the exploration of network components and features that are not apparently categorized as core or periphery [Rombach et al .2017]. Considering that there may be more than one core-periphery pair in the network, Kojaku and Masuda [2017, 2018a,b] propose scalable algorithms to detect multiple core-periphery groups in a network and demonstrate their application in networks of political blogs and airports. Given the diverse core-periphery structures defined by algorithms, we apply the Borgatti-Everett (BE) algorithm [Borgatti and Everett 2000] to our AAVE transfer Is decentralized finance actually decentralized? 5 network while examining algorithms of multiple pairs [Kojaku and Masuda 2018a] along with SNA to test the level of decentralization comprehensively. Details of algorithms and packages utilized will be given in the data section to provide reliable network inference and methodology for further studies. 2.0.2 Crypto tokens and decentralized banking. Crypto tokens are digital assets that utilize blockchain and cryptography technology to ensure security [Halaburda et al . 2022]. As of Jan. 20, 2022, the market value of crypto tokens was beyond 1.9 trillion U.S. dollars. Cong and Xiao [2021] categorize cryptocurrencies into general security, utility (general payment and platform), and product tokens based on their functions. Bitcoin, the first cryptocurrency, was designed as a transaction mechanism and classified as utility (general payments) tokens. Although Bitcoin dominated the market between 2009 and 2016 [Liu and Zhang 2022; Liu et al .2022b], other alternatives emerged later on [Härdle et al .2020]. Ethereum blockchain proved revolutionary in its support for smart contracts that allow automatic transactions and the issuance of Ethereum Request for Comments (ERC) tokens [Lehar and Parlour 2021; Liang et al .2018; Liu et al.2022a]. Our research studies the transaction network of AAVE, an ERC-20 token that is the native utility (platform) token of Aave, a top-ranked decentralized finance application on Ethereum. The market value of AAVE was beyond 2.9 billion U.S. dollars as of Jan. 20, 2022 [coinmarketcap 2022]. Aave is a decentralized bank that allows users to lend and borrow crypto assets and earn interest on assets supplied to the protocol [Whitepaper.io 2020]. In general, decentralized banks differ from centralized banks in two aspects: 1) they replace centralized credit assessments with coded collateral evaluation [Gudgeon et al .2020], and 2) they employ smart contracts to execute asset management automatically [Bartoletti 2020]. The open-source codes of the decentralized bank, Aave, and the transparent trading data of the AAVE token enable us to reproduce the historical network dynamics. 2.0.3 Network studies in cryptoeconomics. An extensive body of literature explores the key features of trading networks and the way in which they relate to the price dynamics of cryptocurrencies. Liang et al .[2018] show that both Bitcoin and Ethereum trading networks display fluctuations in growth rates. For example, the clustering coefficient1of Bitcoin was initially 0.15, qualifying it as a small-world network, and decreased to approximately 0.05 later [Baumann et al .2014; Kondor et al .2014]; in contrast, the clustering coefficient of Ethereum has fluctuated between 0.15 and 0.2 over time and has never been identified as a small word2[Ferretti and D’Angelo 2019]. Motamed and Bahrak [2019] built both monthly and accumulative networks of Ethereum. They found that the number of components3is approximately ten and increases over time; however, similar to that of the Bitcoin trading network, the 1The clustering coefficient describes the extent to which a network is aggregated [Baumann et al. 2014]. 2A small-world network refers to a network in which most nodes are not neighbors of each other, but most nodes can be reached from other nodes by a small number of steps [Baumann et al. 2014]. 3Components are parts of the network that are disconnected from each other [Vallarano et al. 2020]. 6 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang network density4of Ethereum decreases over time [Vallarano et al .2020]. Liang et al . [2018] also found that the largest components of Bitcoin and Ethereum have large sizes in terms of both their diameters (approximately 100 for Bitcoin and gradually increasing for Ethereum) and percentages (40-60%). The network structures differ significantly across blockchains. For instance, Chang and Svetinovic [2016] found that the Bitcoin network has grown denser over time, with more nodes tending to be connected with each other, leading to a strong community while Namecoin has shown a decrease in density, resulting in an unclear community structure. [De Collibus et al . 2021] hints that the growth and concentration indexes can be measured by network calculations via analyzing the aggregated transaction networks of Ethereum-based crypto assets, and conclude that wealth is much more concentrated than in-degree and out-degree. Polovnikov et al .[2020] demonstrate a core-periphery structure [Gallagher et al. 2021] in cryptocurrency exchange networks. The literature has also found an effect of network features on economic variables such as price and volatility. Motamed and Bahrak [2019] found that the price of Bitcoin, Ethereum and Litecoin is positively correlated with the size of the graph and the number of nodes and edges. Vallarano et al .[2020] showed that the price of Bitcoin is negatively correlated with the average outdegree. Cong et al .[2022] discovered that the current Ethereum is more and more centralized in block rewards, ownership, and transactions. Bovet et al .[2019], using a Granger causality test, found that the past degree distributions, especially the outdegree5of the Bitcoin trading network can predict future price increases [Bovet et al .2019]. Several studies have also used network features. Li et al .[2019] built an ARIMA time-series model to forecast price anomalies using network features. [Zhang et al .2022a] is a follow-up study of ours that extends the analysis to compare several decentralized banks. Our research extends network studies on Bitcoin and Ethereum to DeFi tokens. Moreover, we aim to conduct a comprehensive analysis of the blockchain network and the core-periphery structure by comparing a variety of network features including the numbers of nodes and edges, the mean and standard deviation of degree., top 10 degrees mean ratio, relative degree, modularity, the count of components, the count of core, and giant component ratio, etc. Furthermore, we identify the effects of decentralization measured by network features on economic performance at different time horizons. 3 CONCEPTUAL FRAMEWORK The computer science literature has defined three types of communication networks since [Baran 1964], these are depicted in Figure 2, borrowed from [Barabási 2016]. In a centralized network, one central node connects all other nodes, and the degree distribution is unequal since one node has N-1 links while all other nodes have only 1 link. In a decentralized network, there are several hubs that connect to peripheral 4Network density describes the portion of the potential connections in the network that are actual connec- tions [Vallarano et al. 2020]. 5Outdegree is the number of edges that are directed out of a node in the directed network graph [Vallarano et al. 2020]. Is decentralized finance actually decentralized? 7 nodes and to each other. In this network, the degree distribution is equal to that in the centralized network but there are hubs that have considerably more links than the peripheral nodes. The third type of network is the distributed network in which there are no hubs and all nodes have approximately the same number of neighbors. We regard the network on the left as the most centralized and the network on the right as the most decentralized network structure. Ideally, DeFi aims to be completely decentralized, facilitating peer-to-peer transactions, which corresponds to the distributed network in the computer science literature. Fig. 2. Different types of network structures. Note: This figure illustrates three types of communication networks, borrowed from [Barabási 2016]. [Campajola et al .2022] in their paper presents a wide array of indexes to display the different levels of decentralization of Bitcoin, including clustering index, degree distribution, core-periphery structure, etc. In our study, we introduce various network measures to capture the differences between these network features in the token networks of Aave. The first thing to note is that in Figure 2, the network consists of only one component, that is, all nodes are connected by direct or indirect paths. In our transaction data, however, the network consists of many disconnected components. In an ideally centralized market, all nodes should be connected to a single hub; thus the number of components should be one. In a very fragmented market, in contrast, we may observe many components. This argument leads to our first measure of centralization: the number of components (disconnected parts in the network) shows how centralized or fragmented the network is. We compute this measure for every day observed in the data. The second related measure is the relative size of the largest (giant) component . If the network is more centralized, we expect the largest component to cover a high fraction of nodes, in a fragmented network we observe many small components. We calculate the size of the giant component divided by the total number of nodes in the daily transaction network; the larger this value is, the more centralized the network. 8 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang A related measure is the modularity score (formally defined in Table 1) which measures the strength of division of a network into small groups (Newman 2006). A market structure with lower modularity is more centralized, which means that there are no separate communities in the transaction network. This measure can be applied to both connected and disconnected graphs. Fourth, we capture the characteristics of the structures in Figure 2 by computing thestandard deviation of the number of neighbors (degree) in the network. In a centralized network, we have the largest disparity in degree, while in the distributed case, the degree distribution is equal. Last but not least, we use the concept of core-periphery networks to measure the degree of centralization. In a core-periphery network, a limited number of core members constitute a densely connected hub that are connected to each other and to the peripheral nodes. The peripheral nodes are not connected to each other, only the core members. Note that the centralized structure in the left panel of Figure 2 corresponds to a core-periphery structure with one core member, and the decentralized structure to a core-periphery network with multiple core members. The distributed network in the right panel is not a core-periphery network. Based on these arguments, we run statistical tests to detect the core-periphery struc- ture in the data, comparing it to a random network with the same degree distribution [KOJAKU 2022]. Our first measure of decentralization is the significance level of this test, which we convert to a binary measure. This measure is equal to 1 when the p-value of the test is less than 0.05, which indicates the presence of a core-periphery structure. In the other case, when the p-value is larger than 0.05, the measure takes the value 0, which indicates that the presence of a core-periphery structure can be rejected. In addition, for the days when a core-periphery structure describes the data well, we measure the number and degree of core members in the network. In a more centralized network, the number of core members is lower and each core member has a larger degree. Table 1 summarizes the network measures that we use to capture market central- ization in the data. Turning to the economic variables of the market, we focus on two common variables of interest: price and 30-day volatility. We expect market network centralization to affect these outcome variables. Table 2 summarizes the economic variables. 4 DATA QUERYING, MECHANICS, AND PROCESSING 4.1 Data Source Our data are from three open sources: general economic variables of the AAVE token from Coinmetrics [Coinmetrics 2022], TVL in Aave from DeFi Pulse [Pulse 2022], and blockchain transaction records of AAVE token from Bigquery public datasets on the Ethereum blockchain [Bigquery 2022], ranging from Oct. 10, 2020, to Jul. 30, 2023. Our processed datasets for analysis are at a daily level. We include a detailed dataset overview and dictionary for each dataset in Section A in the Appendix. Is decentralized finance actually decentralized? 9 Table 1. Major Network Features. Note: This table gives the general definitions of the network features included in our study with an explanation and equation. Name Definition num_nodes Number of unique addresses in the daily transaction net- work. num_edges Number of transactions in the daily transaction network. Components_cnt The various disconnected parts of the network, where there is no path that can connect from a node in one component to a node in another component. Components_cnt here refers to the number of components in the daily transaction network giant_com_ratio Size of the giant component divided by the total number of nodes in the daily transaction network. DCstd Standard deviation of degree centrality. Degree centrality measures the number of neighbors one node has: the higher the number, the more central the node is. Modularity Measure of the strength of a network divided into modules. A network with a high degree of modularity has dense connections between nodes within a module but sparse connections between nodes in different modules. cp_test_pvalue P value of the significance test of the core-periphery struc- ture. cp_significance 1 if cp_test_pvalue is less than 0.05 and, else 0 otherwise. core_cnt Number of nodes in the core based on the BE core-periphery structure algorithm in the daily transaction network. avg_core_neighbor the Average number of neighbors (degree) of the core nodes detected by the core-periphery structure algorithm in the daily transaction network. Table 2. Major Economic Variables. Note: This table gives the general definitions of the economic variables used as dependent variables in regressions. Name Definition PriceUSD Fixed closing price of the asset in USD. VtyDayRet30d Volatility over 30 days, measured as the standard deviation of the natural log of daily returns over the past 30 days. 4.2 Data Generating Mechanics Explained in AAVE Token Functions In our network analysis of the AAVE token transfers on the Ethereum blockchain, we define the nodes and edges as follows: 10 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang •Nodes : In our network, nodes represent the addresses involved in AAVE token transactions. These addresses can be either the sender or receiver in a transfer ofAAVE tokens. •Edges : The edges in our network are the token transfers themselves. Each edge denotes a transfer of AAVE tokens from one address (node) to another. This framework allows us to analyze the transaction network of AAVE , providing insights into the flow and distribution of tokens between various participants in the ecosystem. There are two main types of AAVE token transfers on the Ethereum blockchain: (1)Internal Transfers : These transfers occur between addresses within the Aave protocol. Examples include a user transferring AAVE tokens from their wallet to the Aave protocol as collateral or the Aave protocol transferring AAVE tokens to a user as a reward. Internal transfers are typically faster and cheaper as they do not require gas fees to be paid to the Ethereum network. (2)External Transfers : These transfers occur between addresses outside of the Aave protocol, such as transferring AAVE tokens between wallets or from an exchange to a user’s account. External transfers can be slower and more expensive due to the required gas fees. Specific types of AAVE token transfers include: •Lending : –Deposit : Users deposit AAVE tokens into the protocol as collateral to borrow other assets. –Withdrawal : Users withdraw assets from the lending pool by burning their AAVE tokens. –Borrow : Users borrow assets using AAVE tokens as collateral. –Repay : Borrowers repay loans, returning assets to the lending pool. –Liquidation : If a loan is not repaid, the collateral can be liquidated. •Staking : –Stake : Users stake AAVE tokens to earn rewards. –Unstake : Users remove their tokens from the staking pool. •Governance : –Proposing : Suggesting changes to the AAVE protocol. –Voting : Casting votes on proposals related to the AAVE protocol. •Exchange : –Transfer : Transferring AAVE tokens between addresses. –Swap : Swapping AAVE tokens for other assets. These are the main examples of the many types of AAVE token transfers that can occur on the Ethereum blockchain, depending on the features of the Aave protocol and the Ethereum network.6 6Readers can check the details of each AAVE token tranfer at https://etherscan.io/token/ 0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9 Is decentralized finance actually decentralized? 11 4.3 Data Processing Workflow 4.3.1 Calculate network features. Using the Python NetworkX package [Hagberg et al . 2008], we build daily transaction network graphs using from_address, to_address as nodes and the values as weights. We consider an undirected network between the addresses with weights equal to the total value of transactions between the accounts. This means that we add the transaction values between two duplicate accounts without considering the direction before network building. Based on the daily network, we calculate 24 network features using the NetworkX algorithms [Hagberg et al .2008], given in Appendix A. We keep only the network features listed in Table 1 to answer the research questions of this paper but open source the rest for future research. 4.3.2 Extract the core-periphery structure. To extract the core-periphery structure, we utilize the Python cpnet package [KOJAKU 2022], which contains algorithms implemented in Python for detecting core-periphery structures in networks. cpnet.BE [KOJAKU 2022] is the algorithm used for the Borgatti-Everett (BE) algorithm, which, identifies nodes either as either core or periphery in a single group [Borgatti and Everett 2000]. cpnet.KM_config [KOJAKU 2022] is used for examining multiple pairs of core-periphery nodes, which can return the coreness and pair of each node. This package also allows us to conduct significance testing via the q-s test on the core- periphery structure of the daily network to assess the fitness of this algorithm for our data, where we use 0.05 as the significance level. The core-periphery structure detected for the input network is considered significant if it is stronger than those detected in randomized networks [Kojaku and Masuda 2018b]. We calculate the number of cores and the average number of neighbors of the core nodes to further investigate the levels of decentralization given the core-periphery structure. Additionally, based on the daily networks constructed using the core-periphery algorithm, we record all core addresses that appear during the period and the number of days that they become core. The type (contract or address) and information links of those cores are extracted from Etherscan.io [etherscan.io 2019] and recorded for further comparison. 4.3.3 Analyze interactions with economic variables. Among the economic metrics queried as shown in Appendix B, the price in USD PriceUSD , 30-day volatility Vty- DayRet30d and total value locked (TVL) in USD tvlUSD are chosen as the dependent variables in our regression models since they are significant and commonly used economic metrics in market valuation. Specifically, the price intuitively reflects the market value of the AAVE token, which is perfectly correlated with the market capital- ization for the Aave protocol7during the time range of our data. The 30-day volatility can reflect the degree of volatility in the token market over the past month and the potential existence of risks or tendencies [Coinmetrics 2022]. The total value locked, which is the overall value of crypto assets deposited in the Aave protocol in USD [George 2022], is a unique economic metric in the context of the cryptocurrency 7Rather than matching a lender to a borrower, lenders deposit funds into the Aave liquidity pools, en- suring a continuous supply of funds, which leads to market capitalization perfectly correlated with price [Whitepaper.io 2020]. 12 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang market. Furthermore, before regression, we need to ensure stationarity of time-series data-that is, that the mean, variance, and autocorrelation structure remain constant over time [Brownlee 2017], and the values give an approximately normal distribution. We transform the variables using methods including differencing the data and taking the logarithm difference, or percentage change based on the Dickey-Fuller test results to ensure that they become stationary. After that, we scale all the stationary variables between 0 and 1 for scale comparison and test the correlation for all the independent variables (after transformation) to avoid high correlation in the regressions. 5 EMPIRICAL ANALYSIS METHODS AND RESULTS 5.1 The realization of decentralization (the core-periphery structure) 5.1.1 Construct core-periphery structures. As introduced and discussed in the previous sections, we apply the Borgatti-Everett (BE) algorithm [Borgatti and Everett 2000] and the multiple-pairs core-periphery structure algorithm [Kojaku and Masuda 2018b] to the AAVE transaction network to investigate whether the daily graphs can be separated into dense transactions between some active addresses (defined as the core) and some other loose transactions between some small addresses (defined as the periphery) in either a single pair or multiple pairs. In this section, we connect the properties of the core-periphery structure in the AAVE transaction network with the real functions and types of the specific addresses (some typical addresses) to further explore the question of centralization vs. decentralization. We test the significance of all 365 observations. The results indicate that the AAVE daily transaction network is insignificant in the multiple-pair core-periphery structure, but partially significant in the one-pair structure with 232 significant (64%) and 133 insignificant (36%) days. Comparing the distribution (displayed in Figure 3) of the number of nodes in the core and the average number of degrees of the core nodes (described in Table 1) in the significant and nonsignificant daily graphs that we tested, we find that the number of nodes in the core in the significant graph is much smaller. The average number of neighbors of the core nodes is more prominent in those significant graphs and vice versa. By interpretation, when the transaction network significantly fits the core-periphery structure, it can be divided into small groups of denser and looser connections. The transaction difference between nodes is larger; thus, the degree of centralization is greater. In this case, a few addresses are likely to dominate most transactions. To depict the structure and comparison in a more intuitive and explainable way, we pick two representative days of the significant and nonsignificant graph to visualize the network, as displayed in Figure 4. It shows the core-periphery network graphs of transactions among the identified core accounts based on the cpnet.BE algorithms in a spiral layout on 2020-10-12 (left panel) and 2021-02-22 (right panel), where the dark dots represent the core nodes and the light dots are the periphery nodes. The two panels clearly illustrate that on a significant core-periphery graph (left panel), all core nodes are closely linked, and each core node forms an aggregation group with periphery nodes (each with a high degree) so that any two nodes can connect in a Is decentralized finance actually decentralized? 13 Fig. 3. Core-periphery structure features distribution box plots. Note: This figure plots the distribu- tion of the number of core nodes (left panel) and the average number of neighbors of core nodes (right panel) on days with significant (p-value smaller than 0.05) and insignificant core-periphery test results. few steps. The overall network structure of the transactions among the identified core accounts is very compact and cohesive, resulting in a significant core-periphery structure, which is also more centralized in the transaction since the core nodes are dominant. In contrast, the right panel shows a looser overall connection. Each identified core node has a smaller degree, with many scattered periphery nodes; some nodes require a long step size to connect to other nodes, which prevents the structure from being significantly certified as core-periphery and adds to the level of decentralization in the transaction network. 5.1.2 Compare the core-periphery structure for externally owned and contract account. Furthermore, we investigate addresses/accounts that were once identified as core members in the graphs. There are two types of accounts defined on Ethereum: exter- nally owned accounts (EOAs) and contract accounts (CAs, also called smart contracts) [Hu et al .2021]. EOAs are created and owned by users with a private key set and can be utilized to deposit and transfer assets and call smart contracts [Hu et al .2021]. The CAs are execution programs composed of smart contract code, which also possesses asset balance and will be automatically executed if the trigger condition in met [Szabo 1997]. We record the accounts that appear to be identified as core nodes during the period and the number of days that they become core, based on the daily networks constructed by the Borgatti-Everett (BE) algorithm [Borgatti and Everett 2000]. We extract the type of account (EOA or CA) according to Etherscan.io [etherscan.io 2019]. 14 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang Fig. 4. Network graphs on 2020-10-12 (left panel) and 2021-02-22 (right panel). Note: This figure shows the core-periphery network graphs of transactions among the identified core accounts based on the cpnet.BE algorithms in a spiral layout on 2020-10-12 (left panel) and 2021-02-22 (right panel), where the dark dots represent the core nodes and the light dots are the periphery nodes. The left panel returns a. significant p-value in the significance test, while the right panel is nonsignificant. Figure 5 plots the distribution of the number of core days for EOAs and CAs. From the graph, the range of day counts is generally larger for the contract accounts, where the extreme value is much larger than its counterpart for externally owned accounts. The four outliers identified (two for CA and two for EOA) appear to be in the core for many of the days, resulting in a centralized transaction that could significantly affect the level of decentralization. We investigate the detailed account information of these four accounts by Etherscan.io [etherscan.io 2019] for further explanation. The two outliers among EOAs are Binance andCoinbase , which are the two top centralized exchanges in the cryptocurrency market. A centralized exchange is a significant online platform for users to buy and sell cryptocurrencies, offering secu- rity and monitoring for the individual to complete the transaction in a trustworthy environment [Reiff 2019]. Due to the popularity of these two centralized exchanges, a tremendously large number of transfers occur through these two accounts daily between the same and different types of cryptocurrencies by many EOAs. Given the results of the core-periphery structure, the centralized exchange exerts a signif- icant influence on the AAVE daily transaction network and brings a high level of “centralization” to it. The two outliers among CAs are decentralized exchanges, we find that one of them is an automated market maker on Uniswap, a decentralized exchange for transactions between AAVE and Ether. Automated market makers (AMMs), first introduced by Hanson’s logarithmic market scoring rule (LMSR) [Hanson 2003], are contracts that allow liquidity to be automatically provided to the crypto market automatically [Fritsch and Zürich 2021]. Based on the AMM, this contract is built on Uniswap, which allows agents to trade between AAVE and Ether at the price and rates specified by the pricing function, and the price is kept enormous centered transaction network around this account, which greatly influences the core-periphery structure and increases the centralization of the AAVE transaction graph. Another is the smart contract of Is decentralized finance actually decentralized? 15 Fig. 5. Core day count distribution box plots. Note: This figure plots the distribution of the number of core days for EOAs and CAs, where the y-axis is the number of days in which the node is in the core. Stated AAVE, which performs the functions in the Aave decentralized bank of staking (moving assets to long-term saving account), redeeming (getting collateral back), getting rewards (claiming interest rates), etc. [Whitepaper.io 2020]. On the one hand, the two outliers of centralized exchanges put the promise of blockchain decentralization in doubt; on the other hand, the two outliers of decen- tralized exchanges evidence that blockchain can mitigate the dependence on trusted centralized entities. 5.2 Blockchain network dynamics and correlations In addition to the core-periphery structure, we use other network properties to capture market centralization. We find that all the intertemporal network features indicate consistent dynamics whereby the AAVE token transaction network first becomes more decentralized and then reverts to being more centralized. 5.2.1 Numbers of components. When the market is more centralized, we expect to have fewer components in the network since most transactions go through a central node that connects most nodes indirectly, forming a network component. The left upper panel of Figure 6 plots the number of components over time. The graph suggests that the AAVE market first became increasingly decentralized, as indicated by the increase in the number of components up to February 2021, and then showed a tendency to centralize as the number of components increased. The network structure of the market converged to approximately 100 components after July 2021. 16 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang Fig. 6. Time-series plots of network features. Note: This figure gives time-series plots of network features included in our study, with the feature name in the title of each panel. 5.2.2 Giant component size ratio. A related network property is the relative size of the giant component. In a centralized market, the giant component covers a large fraction of the nodes, while in a decentralized market, the giant component is relatively small. The lower right panel of Figure 6 shows that the relative size of the giant component first decreased and then increased. This again suggests that the market was initially decentralized and then became more centralized. 5.2.3 Modularity score. The modularity score is small when the market is centralized, meaning that there are no separate communities in the network. In contrast, in a decentralized market, many communities are not or are only weakly connected to each other, implying a high modularity score. The right upper panel of Figure 6 shows the evolution of modularity. The modularity score increased first, indicating a tendency to decentralize, and then it started to decrease, suggesting centralization. 5.2.4 The standard deviation of degree centrality. The standard deviation of degree centrality is large (small) when the market is centralized (decentralized) since, in a centralized market, a few hubs have a high degree while the other nodes have only a few connections. In the right middle panel of Figure 6, we see that the standard deviation Is decentralized finance actually decentralized? 17 of degree centrality first decreased and then increased, suggesting that the market first showed a tendency toward decentralization and then toward centralization. Fig. 7. Correlation heatmap of network features. Note: This figure plots the correlation between network features, red represents a positive correlation while blue represents a negative correlation. The depth of the color is proportional to the correlation coefficient value. 5.3 The impact of network features on market return and volatility 5.3.1 Background and Methods. Liu and Tsyvinski [2018]’s study demonstrated that there is strong evidence of time-series momentum at various time horizons of the cryptocurrency network features; this evidence could potentially indicate a momentum effect of the network on DeFi economic metrics. We utilize the Python package smf.ols for the OLS regression to test the following two hypotheses: •Return of Investment (ROI) : The decentralization level measured by network features predicts higher future ROI. •Market Volatility Growth Rate (MVGR) : The decentralization level mea- sured by network features predicts a lower increase in volatility. We utilize Python smf.ols for the OLS regressions with return (ROI) to test the two hypotheses. We generate the results for ROI and MVGR at different windows from one-day, one-week, to nighty-day horizons. Each dependent variable is regressed on each of the network features and control variables. To avoid the issues of heterogeneity and autocorrelation, we generalize the regressions with Newey-West estimators [Liu and Tsyvinski 2018]. 5.3.2 Results on market returns. Figure 8 displays the outcomes of our analysis on token market returns (in USD), utilizing a 7-day moving average of network variables. Detailed regression results are provided in Table 4 and Table 5 in the Appendix. Upon examining token market returns, we observe a notable correlation: a higher degree of market decentralization appears to be a predictive factor for long-term token returns. Specifically, in markets characterized by greater decentralization, token returns tend to be more substantial. This finding aligns with the prevalent expectation among stakeholders that a blockchain’s value increases with its decentralization. For instance, a more decentralized transaction network in DeFi tokens correlates 18 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang Fig. 8. Results of the token market returns (USD). Note: This figure reports the results of predicting the token market returns (USD) using the 7-day moving average of network variables. with optimistic stakeholder projections about future returns, culminating in a self- reinforcing equilibrium of enhanced returns. Our regression analyses, centered on network attributes, corroborate this trend. We note a significant and positive correlation between the number of network components— a marker of decentralization—and token returns after a 14-day period. Similarly, an elevated modularity value, indicative of market decentralization, demonstrates a sig- nificant and positive association with market returns over a 21-day span. In contrast, lower values in the standard deviation of degree centrality and the rela- tive size of the largest network component, both indicative of decentralization, exhibit a significant and negative correlation with long-term market returns. Additionally, the core-periphery structure’s significance, representative of a centralized network, bears a negative correlation with market returns for most periods exceeding 7 days. It is crucial to note the high volatility of short-term market returns, which renders our network measures less predictive in this timeframe. This observation is mirrored in the R-squared values of our regressions: they approach zero for short-term fore- casts but increase with longer time horizons. The premise that short-term returns of cryptocurrency tokens are less predictable by network features is in agreement with Is decentralized finance actually decentralized? 19 the findings of Liu et al. (2022) [Liu and Zhang 2022]. PC1=−0.26×Components_cnt+0.87×giant_com_ratio −0.32×modularity+0.26×DCstd , (1) PC2=0.78×Components_cnt+0.41×giant_com_ratio +0.08×modularity−0.47×DCstd , (2) PC3=0.56×Components_cnt−0.19×giant_com_ratio −0.43×modularity+0.68×DCstd . (3) To further substantiate our results, we employed principal component analysis (PCA) to distill the essence of the five network features representing centralization measures. The PCA formulas are presented in the collection of Equations 1, 2, 3. The optimal number of factors was determined by maximizing the variance explained by these features. In our regression outputs, we found Factor 3, which quantifies decentralization, to be significantly and positively correlated with market returns. This reaffirms our earlier observations: a heightened level of decentralization is consistently associated with increased market returns. Fig. 9. Interpretation of PCA. Note: This figure depicts the correlation coefficient between the original variables and the components. Positive and negative values in the graph reflect the positive and negative correlation of the variables with the PCs. Red represents a positive correlation, blue represents a negative correlation, and the depth of the color is proportional to the correlation coefficient value. 5.3.3 Results on market volatility. In our examination of market volatility, as depicted in Figure 10, we conducted a parallel analysis, the results of which are detailed in Table 6 and Table 7 in the Appendix. Our findings indicate a discernible positive correlation between the degree of decentralization and the growth rate of market volatility. Specifically, an increase in the number of network components, a proxy for market decentralization, is significantly and positively correlated with future 20 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang market volatility, particularly for mid-range horizons of 42, 49, and 56 days. This observation suggests that markets with higher levels of decentralization are prone to increased volatility. Interestingly, this result aligns with the theoretical expectation that decentralized markets should exhibit lower volatility, as the impact of market shocks tends to be more dispersed in such environments. Fig. 10. Results of the 30-day volatility growth rate. Note: This figure reports the results of predicting the 30-day volatility growth rate using the 7-day moving average of network variables. 6 CONCLUSIONS AND DISCUSSION 6.1 Extensions in three facets Our study shows that social network analysis is instrumental in characterizing the level, dynamics, and impacts of decentralization in DeFi token transactions. Our research is also seminal in terms of inspiring future research on the three facets of application scenarios, research questions, and methodology. (1)Application Scenarios . Our methods can be generally applied to trans- action tokens issued by other DeFi protocols, such as decentralized pay- ment, exchange, assets, derivatives and even non-financial applications on blockchains.8 (2)Research Questions . We can extend our analysis to study the interplay of other network features and economic variables. For example, one straightfor- ward follow-up research is to extend the analysis to include other network features for which we have provided open-source data as defined in Appendix A. 8Refer to [Zhang et al. 2022b] and the references therein. Is decentralized finance actually decentralized? 21 (3)Methodology . We can further explore the interplay of network dynamics and token economics by causal inference through advanced econometrics and prediction algorithms in machine learning [Athey 2015]. 6.2 On the mechanics of blockchain decentralization Is decentralized finance actually decentralized? The answer from our pioneering blockchain network study is intriguing. We found that the current research on de- centralization tends to neglect two important aspects of the mechanics of blockchain decentralization: (1)How do incentives affect agents’ behavior in transaction network formations? (2) How do incentives affect the final realizations of network decentralization? These two gaps neglections in the literature leave a door for future research to im- prove the mechanism to support a truly decentralized economy. Why? The blockchain infrastructure only provides the possibility for peer-to-peer transactions. However, the actually realized decentralization of blockchain transaction networks depends on the behavior of stakeholders, who are affected by incentives. If we can better understand the incentives that govern the stakeholders’ behavior and the formation of transaction networks, we can design incentives schemes to support desired levels of decentralization.9Future research can experiment with other scientific methods of theoretical modeling and simulations. For example, we can further apply network game theory [Azouvi and Hicks 2020] to distributed systems to study how incen- tives affect agents’ strategic behaviors and the transaction network formations on the blockchain. We can also apply agent-based modeling [Iori and Porter 2012] to simulate the transaction networks on blockchain to systematically evaluate the effect of incentive design changes. REFERENCES Kartik Anand, Prasanna Gai, Sujit Kapadia, Simon Brennan, and Matthew Willison. 2013. A network model of financial system resilience. Journal of Economic Behavior & Organization 85 (01 2013), 219–235. https://doi.org/10.1016/j.jebo.2012.04.006 Susan Athey. 2015. Machine learning and causal inference for policy evaluation. In Proceedings of the 21th ACM SIGKDD international conference on knowledge discovery and data mining . 5–6. Sarah Azouvi and Alexander Hicks. 2020. SoK: Tools for Game Theoretic Models of Security for Cryptocur- rencies. arXiv:1905.08595 [cs] (02 2020). https://arxiv.org/abs/1905.08595 Ana Babus and Péter Kondor. 2018. Trading and Information Diffusion in Over-the-Counter Markets. Econometrica 86 (2018), 1727–1769. https://doi.org/10.3982/ecta12043 Albert-László Barabási. 2016. Network Science . Cambridge University Press. http://networksciencebook.com/ Paul Baran. 1964. ON DISTRIBUTED COMMUNICATIONS: I. INTRODUCTION TO DISTRIBUTED COM- MUNICATIONS NETWORKS,. https://apps.dtic.mil/sti/citations/AD0444830 Marco Bardoscia, Stefano Battiston, Fabio Caccioli, and Guido Caldarelli. 2017. Pathways towards instability in financial networks. Nature Communications 8 (02 2017). https://doi.org/10.1038/ncomms14416 Massimo Bartoletti. 2020. Smart Contracts Contracts. Frontiers in Blockchain 3 (06 2020). https://doi.org/10. 3389/fbloc.2020.00027 9Our results resonate with those of Zhang et al .[2022b], but with a unique perspective from social network analysis. 22 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang Paolo Barucca and Fabrizio Lillo. 2016. Disentangling bipartite and core-periphery structure in financial networks. Chaos, Solitons & Fractals 88 (07 2016), 244–253. https://doi.org/10.1016/j.chaos.2016.02.004 Stefano Battiston, Michelangelo Puliga, Rahul Kaushik, Paolo Tasca, and Guido Caldarelli. 2012. DebtRank: Too Central to Fail? Financial Networks, the FED and Systemic Risk. Scientific Reports 2 (08 2012). https://doi.org/10.1038/srep00541 Annika Baumann, Benjamin Fabian, and Matthias Lischke. 2014. Exploring the Bitcoin Network. https: //doi.org/10.5220/0004937303690374 Google Bigquery. 2022. BigQuery public datasets. https://cloud.google.com/bigquery/public-data Francisco Blasques, Falk Bräuning, and Iman van Lelyveld. 2018. A dynamic network model of the unsecured interbank lending market. Journal of Economic Dynamics and Control 90 (05 2018), 310–342. https://doi.org/10.1016/j.jedc.2018.03.015 Stephen P Borgatti and Martin G Everett. 2000. Models of core/periphery structures. Social Networks 21 (10 2000), 375–395. https://doi.org/10.1016/s0378-8733(99)00019-2 Jakob J. Bosma, Michael Koetter, and Michael Wedow. 2017. Too Connected to Fail? Inferring Network Ties From Price Co-Movements. Journal of Business & Economic Statistics 37 (05 2017), 67–80. https: //doi.org/10.1080/07350015.2016.1272459 Alexandre Bovet, Carlo Campajola, Francesco Mottes, Valerio Restocchi, Nicolò Vallarano, Tiziano Squartini, and Claudio J. Tessone. 2019. The evolving liaisons between the transaction networks of Bitcoin and its price dynamics. arXiv:1907.03577 [physics, q-fin] (07 2019). https://arxiv.org/abs/1907.03577 John P. Boyd, William J. Fitzgerald, Matthew C. Mahutga, and David A. Smith. 2010. Computing continuous core/periphery structures for social relations data with MINRES/SVD. Social Networks 32 (05 2010), 125–137. https://doi.org/10.1016/j.socnet.2009.09.003 Jason Brownlee. 2017. A Gentle Introduction to Autocorrelation and Partial Autocorrelation. https: //machinelearningmastery.com/gentle-introduction-autocorrelation-partial-autocorrelation/ Carlo Campajola, Raffaele Cristodaro, Francesco Maria De Collibus, Tao Yan, Nicolo’ Vallarano, and Claudio J. Tessone. 2022. The Evolution Of Centralisation on Cryptocurrency Platforms. arXiv:2206.05081 [physics, q-fin] (06 2022). https://arxiv.org/abs/2206.05081 Rodrigo Canales and Ramana Nanda. 2012. A darker side to decentralized banks: Market power and credit rationing in SME lending. Journal of Financial Economics 105 (08 2012), 353–366. https://doi.org/10. 1016/j.jfineco.2012.03.006 Tao-Hung Chang and Davor Svetinovic. 2016. Data Analysis of Digital Currency Networks: Namecoin Case Study. , 122–125 pages. https://doi.org/10.1109/ICECCS.2016.023 coinmarketcap. 2022. Aave price today, AAVE to USD live, marketcap and chart. https://coinmarketcap. com/currencies/aave/ Coinmetrics. 2022. GitHub - coinmetrics/data: Archives of data produced by coinmetrics.io. https: //github.com/coinmetrics/data Lin William Cong, Ke Tang, Yanxin Wang, and Xi Zhao. 2022. Inclusion and Democratization Through Web3 and DeFi? Initial Evidence from the Ethereum Ecosystem. https://papers.ssrn.com/sol3/papers. cfm?abstract_id=4162966 Lin William Cong and Yizhou Xiao. 2021. Categories and Functions of Crypto-Tokens. , 267–284 pages. https://link.springer.com/chapter/10.1007%2F978-3-030-66433-6_12 P. Csermely, A. London, L.-Y. Wu, and B. Uzzi. 2013. Structure and dynamics of core/periphery networks. Journal of Complex Networks 1 (10 2013), 93–123. https://doi.org/10.1093/comnet/cnt016 Mihai Cucuringu, Puck Rombach, Sang Hoon Lee, and Mason A. Porter. 2016. Detection of core–periphery structure in networks using spectral methods and geodesic paths. European Journal of Applied Mathe- matics 27 (12 2016), 846–887. https://doi.org/10.1017/S095679251600022X Francesco Maria De Collibus, Alberto Partida, Matija Piškorec, and Claudio J. Tessone. 2021. Heterogeneous Preferential Attachment in Key Ethereum-Based Cryptoassets. Frontiers in Physics 9 (10 2021). https: //doi.org/10.3389/fphy.2021.720708 Marco Di Maggio, Amir Kermani, and Zhaogang Song. 2017. The value of trading relations in turbulent times. Journal of Financial Economics 124 (2017), 266–284. https://econpapers.repec.org/article/eeejfinec/ v_3a124_3ay_3a2017_3ai_3a2_3ap_3a266-284.htm Is decentralized finance actually decentralized? 23 Darrell Duffie, Nicolae Garleanu, and Lasse Heje Pedersen. 2005. Over-the-Counter Markets. Econometrica 73 (11 2005), 1815–1847. https://doi.org/10.1111/j.1468-0262.2005.00639.x etherscan.io. 2019. Ethereum (ETH) Blockchain Explorer. https://etherscan.io/ Stefano Ferretti and Gabriele D’Angelo. 2019. On the Ethereum blockchain structure: A complex networks theory perspective. Concurrency and Computation: Practice and Experience 32 (08 2019). https://doi.org/ 10.1002/cpe.5493 Robin Fritsch and Eth Zürich. 2021. Concentrated Liquidity in Automated Market Makers. https: //arxiv.org/pdf/2110.01368.pdf Prasanna Gai, Andrew Haldane, and Sujit Kapadia. 2011. Complexity, concentration and contagion. Journal of Monetary Economics 58 (2011), 453–470. https://econpapers.repec.org/article/eeemoneco/v_3a58_ 3ay_3a2011_3ai_3a5_3ap_3a453-470.htm Ryan J. Gallagher, Jean-Gabriel Young, and Brooke Foucault Welles. 2021. A clarified typology of core- periphery structure in networks. Science Advances 7 (03 2021), eabc9800. https://doi.org/10.1126/sciadv. abc9800 Benedict George. 2022. Why TVL Matters in DeFi: Total Value Locked Explained. https://www.coindesk. com/learn/why-tvl-matters-in-defi-total-value-locked-explained/ Lewis Gudgeon, Sam M. Werner, Daniel Perez, and William J. Knottenbelt. 2020. DeFi Protocols for Loanable Funds: Interest Rates, Liquidity and Market Efficiency. arXiv:2006.13922 [cs, q-fin] (10 2020). https://arxiv.org/abs/2006.13922 Aric A Hagberg, Daniel A Schult, and Pieter J Swart. 2008. Exploring Network Structure, Dynamics, and Function using NetworkX. http://conference.scipy.org/proceedings/SciPy2008/paper_2/full_text.pdf Hanna Halaburda, Guillaume Haeringer, Joshua S. Gans, and Neil Gandal. 2022. The Microeconomics of Cryptocurrencies. Journal of Economic Literature (forthcoming) (2022). https://works.bepress.com/ halaburda/48/ Robin Hanson. 2003. Combinatorial Information Market Design. Information Systems Frontiers 5 (2003), 107–119. https://doi.org/10.1023/a:1022058209073 Campbell R. Harvey, Ashwin Ramachandran, and Joey Santoro. 2021. DeFi and the Future of Finance. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3711777 Burton Hollifield, Artem Neklyudov, and Chester Spatt. 2017. Bid-Ask Spreads, Trading Networks, and the Pricing of Securitizations. The Review of Financial Studies 30 (05 2017), 3048–3085. https://doi.org/10. 1093/rfs/hhx027 Teng Hu, Xiaolei Liu, Ting Chen, Xiaosong Zhang, Xiaoming Huang, Weina Niu, Jiazhong Lu, Kun Zhou, and Yuan Liu. 2021. Transaction-based classification and detection approach for Ethereum smart contract. Information Processing & Management 58 (03 2021), 102462. https://doi.org/10.1016/j.ipm.2020.102462 Wolfgang Karl Härdle, Campbell R Harvey, and Raphael C G Reule. 2020. Understanding Cryptocurrencies*. Journal of Financial Econometrics 18 (2020), 181–208. https://doi.org/10.1093/jjfinec/nbz033 G. Iori and J. Porter. 2012. Agent-Based Modelling for Financial Markets. https://openaccess.city.ac.uk/id/ eprint/1744/ Matthew O Jackson. 2008. Social and Economic Networks 1. https://web.stanford.edu/~jacksonm/netbook. pdf SADAMORI KOJAKU. 2022. A Python package for detecting core-periphery structure in networks. https: //github.com/skojaku/core-periphery-detection/blob/master/cpnet/BE.py Sadamori Kojaku and Naoki Masuda. 2017. Finding multiple core-periphery pairs in networks. Physical Review E 96 (11 2017). https://doi.org/10.1103/physreve.96.052313 Sadamori Kojaku and Naoki Masuda. 2018a. Core-periphery structure requires something else in the network. New Journal of Physics 20 (04 2018), 043012. https://doi.org/10.1088/1367-2630/aab547 Sadamori Kojaku and Naoki Masuda. 2018b. A generalised significance test for individual communities in networks. Scientific Reports 8 (05 2018). https://doi.org/10.1038/s41598-018-25560-z Dániel Kondor, Márton Pósfai, István Csabai, and Gábor Vattay. 2014. Do the Rich Get Richer? An Empirical Analysis of the Bitcoin Transaction Network. PLoS ONE 9 (02 2014), e86197. https://doi.org/10.1371/ journal.pone.0086197 24 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang Sam Langfield, Zijun Liu, and Tomohiro Ota. 2014. Mapping the UK interbank system. Journal of Banking & Finance 45 (2014), 288–303. https://econpapers.repec.org/article/eeejbfina/v_3a45_3ay_3a2014_3ai_ 3ac_3ap_3a288-303.htm Alfred Lehar and Christine Parlour. 2021. Decentralized Exchanges. https://www.snb.ch/n/mmr/reference/ sem_2021_05_20_lehar/source/sem_2021_05_20_lehar.n.pdf Yitao Li, Umar Islambekov, Cuneyt Akcora, Ekaterina Smirnova, Yulia Gel, and Murat Kantarcioglu. 2019. Dissecting Ethereum Blockchain Analytics: What We Learn from Topology and Geometry of Ethereum Graph. https://arxiv.org/pdf/1912.10105.pdf Jiaqi Liang, Linjing Li, and Daniel Zeng. 2018. Evolutionary dynamics of cryptocurrency transaction networks: An empirical study. PLOS ONE 13 (08 2018), e0202202. https://doi.org/10.1371/journal.pone. 0202202 Yulin Liu, Yuxuan Lu, Kartik Nayak, Fan Zhang, Luyao Zhang, and Yinhong Zhao. 2022a. Empirical Analysis of EIP-1559: Transaction Fees, Waiting Times, and Consensus Security. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security (Los Angeles, CA, USA) (CCS ’22). Association for Computing Machinery, New York, NY, USA, 2099–2113. https://doi.org/10.1145/ 3548606.3559341 Yukun Liu and Aleh Tsyvinski. 2018. Risks and Returns of Cryptocurrency. https://www.nber.org/papers/ w24877 Yulin Liu and Luyao Zhang. 2022. Cryptocurrency valuation: An explainable ai approach. arXiv preprint arXiv:2201.12893 (2022). Yulin Liu, Luyao Zhang, and Yinhong Zhao. 2022b. Deciphering bitcoin blockchain data by cohort analysis. Scientific Data 9, 1 (2022), 1–7. Fragkiskos D. Malliaros, C. Giatsidis, A. Papadopoulos, and M. Vazirgiannis. 2019. The core decomposition of networks: theory, algorithms and applications. The VLDB Journal (2019). https://doi.org/10.1007/s00778- 019-00587-4 Jianjun Miao. 2006. A search model of centralized and decentralized trade. Review of Economic Dynamics 9 (01 2006), 68–92. https://doi.org/10.1016/j.red.2005.10.003 Amir Pasha Motamed and Behnam Bahrak. 2019. Quantitative analysis of cryptocurrencies transaction graph. Applied Network Science 4 (12 2019). https://doi.org/10.1007/s41109-019-0249-6 Evelien Otte and Ronald Rousseau. 2002. Social network analysis: a powerful strategy, also for the in- formation sciences. Journal of Information Science 28 (12 2002), 441–453. https://doi.org/10.1177/ 016555150202800601 Kirill Polovnikov, Vlad Kazakov, and Sergey Syntulsky. 2020. Core–periphery organization of the cryptocur- rency market inferred by the modularity operator. Physica A: Statistical Mechanics and its Applications 540 (02 2020), 123075. https://doi.org/10.1016/j.physa.2019.123075 DeFi Pulse. 2022. DeFi Pulse - The Decentralized Finance Leaderboard | Stats, Charts and Guides | DeFi Pulse. https://www.defipulse.com/ Nathan Reiff. 2019. What Are Centralized Cryptocurrency Exchanges? https://www.investopedia.com/ tech/what-are-centralized-cryptocurrency-exchanges/ Puck Rombach, Mason A. Porter, James H. Fowler, and Peter J. Mucha. 2017. Core-Periphery Structure in Networks (Revisited). SIAM Rev. 59 (01 2017), 619–646. https://doi.org/10.1137/17m1130046 Fabio Della Rossa, Fabio Dercole, and Carlo Piccardi. 2013. Profiling core-periphery network structure by random walkers. Scientific Reports 3 (03 2013). https://doi.org/10.1038/srep01467 John Scott. 1988. Social Network Analysis. Sociology 22 (02 1988), 109–127. https://doi.org/10.1177/ 0038038588022001007 Peng Sui, Sailesh Tanna, and Dandan Zhou. 2019. Financial contagion in a core-periphery interbank network. The European Journal of Finance (06 2019), 1–20. https://doi.org/10.1080/1351847x.2019.1630460 Nick Szabo. 1997. Nick Szabo – The Idea of Smart Contracts. https://www.fon.hum.uva.nl/rob/Courses/ InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/idea.html Nicoló Vallarano, Claudio J. Tessone, and Tiziano Squartini. 2020. Bitcoin Transaction Networks: An Overview of Recent Results. Frontiers in Physics 8 (12 2020). https://doi.org/10.3389/fphy.2020.00286 Is decentralized finance actually decentralized? 25 Sam M. Werner, Daniel Perez, Lewis Gudgeon, Ariah Klages-Mundt, Dominik Harz, and William J. Knotten- belt. 2021. SoK: Decentralized Finance (DeFi). https://ui.adsabs.harvard.edu/abs/2021arXiv210108778W/ abstract Whitepaper.io. 2020. Aave whitepaper - whitepaper.io. https://whitepaper.io/document/533/aave- whitepaper Tae-Sub Yun, Deokjong Jeong, and Sunyoung Park. 2019. “Too central to fail” systemic risk measure using PageRank algorithm. Journal of Economic Behavior & Organization 162 (06 2019), 251–272. https: //doi.org/10.1016/j.jebo.2018.12.021 Luyao Zhang, Xinshi Ma, and Yulin Liu. 2022b. SoK: Blockchain Decentralization. arXiv preprint arXiv:2205.04256 (2022). https://arxiv.org/abs/2205.04256 Sunshine Zhang. 2023. The Design Principle of Blockchain: An Initiative for the SoK of SoKs. arXiv preprint arXiv:2301.00479 (2023). Yufan Zhang, Zichao Chen, Yutong Sun, Yulin Liu, and Luyao Zhang. 2022a. Blockchain Network Analysis: A Comparative Study of Decentralized Banks. arXiv preprint arXiv:2212.05632 (2022). A NETWORK FEATURES Table 3 contains 24 daily network features calculated from the AAVE transaction data we calculated using the NetworkX package, which can be used as a reference for further network studies. B SUPPLEMENTARY REGRESSION TABLE Table 4 gives the regression result table of the token market returns (USD). Table 5 gives the regression result table of the token market returns (USD) with the control variable. Table 6 gives the regression result table of the 30-day volatility growth rate. Table 7 gives the regression result table of the 30-day volatility growth rate with the control variable. 26 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang Table 3. Network Features. Note: This table gives the general definitions of all network features calculated in our study with the explanation. Name Definition num_nodes Number of unique addresses in daily transaction network. num_edges Number of transactions in daily transaction network. Degree mean The number of edges a node has, an average of nodes. Degree std The number of edges a node has the standard deviation of nodes. Top10Degree mean Average degree of the addresses with top 10 highest degree values during the whole period. Top10Degree std Standard deviation of the degree of the addresses with the top 10 highest degree values during the whole period. Top10 Degree mean ratio Top 10 addresses’ degree mean divided by the general degree mean. Relative degree Network density. The portion of the potential connections in a network is actual connections. DCmean The average value of degree centrality. DCstd The standard deviation of degree centrality. Cluster_mean Mean of clustering coefficient. The degree to which nodes in a graph tend to cluster together. Cluster_std Standard deviation of clustering coefficient. The degree to which nodes in a graph tend to cluster together. Modularity Modularity is a way to measure the strength of a network divided into modules. A network with a high degree of modularity has dense connec- tions between nodes within a module, but sparse connections between nodes in different modules. Transitivity Transitivity is the overall probability for the network to have adjacent nodes interconnected, thus revealing the existence of tightly connected communities. eig_mean Mean of eigenvector centrality. Measures the degree to which the division of a network into communities. eig_std Standard deviation of eigenvector centrality. Measures the degree to which the division of a network into communities. closeness_mean Mean of closeness centrality. The reciprocal of the farness. closeness_std Standard deviation of closeness centrality. The reciprocal of the farness. giant_com_ratio Size of the giant component divided by the total number of nodes in the daily transaction network. Components_cnt The components of the network are the various disconnected parts, where there is no path that can connect from a node in one component to a node in another component. Components_cnt here refers to the number of components in the daily transaction network cp_test_pvalue P-value of the significant test of the core-periphery structure. cp_significance 1 if cp_test_pvalue is less than 0.05, else 0. core_cnt Number of nodes in the core based on the BE core-periphery structure algorithm in the daily transaction network. avg_core_neighbor the Average number of neighbors (degree) of the core nodes detected by the core-periphery structure algorithm in daily transaction network. Is decentralized finance actually decentralized? 27 Table 4. Results of the token market returns (USD). Note: This table reports the results of predicting the future market return (USD) using the 7-day moving average of network variables. Columns (1)-(10) represent one day, one week to eight weeks, and 90 days respectively. *, **, and *** denote significance at the 10%, 5%, and 1% levels. The data frequency is daily. The residual standard errors are reported in parentheses. Time horizon t, t+1 t, t+7 t, t+14 t, t+21 t, t+28 t, t+35 t, t+42 t, t+49 t, t+56 t, t+90 (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) △component cnt -0.034 0.125 0.247** 0.384*** 0.323*** 0.301*** 0.234** 0.261** 0.289** 0.233*** 𝑅20 0.006 0.018 0.032 0.028 0.027 0.016 0.018 0.018 0.013 Residual Std. Error (0.105) (0.100) (0.120) (0.138) (0.123) (0.119) (0.122) (0.125) (0.138) (0.134) △giant com ratio 0.005 -0.039 -0.060* -0.065* -0.062* -0.040 -0.044 -0.099* -0.129** -0.083*** 𝑅20 0.002 0.003 0.003 0.003 0.001 0.002 0.008 0.011 0.005 Residual Std. Error (0.105) (0.101) (0.120) (0.140) (0.125) (0.120) (0.123) (0.126) (0.139) (0.135) △log(modularity) 0.008 0.057 0.127 0.191 0.201 0.142 0.158** 0.203** 0.195** 0.279*** 𝑅20 0 0.001 0.001 0.002 0.002 0.009 0.015 0.016 0.035 Residual Std. Error (0.105) (0.101) (0.121) (0.140) (0.125) (0.120) (0.122) (0.125) (0.139) (0.133) △log(DCstd) 0.012 -0.041 -0.097** -0.178*** -0.207*** -0.161*** -0.153*** -0.186** -0.189** -0.241*** 𝑅20 0 0.004 0.016 0.028 0.018 0.016 0.022 0.018 0.032 Residual Std. Error (0.105) (0.101) (0.120) (0.139) (0.123) (0.119) (0.122) (0.125) (0.138) (0.133) cp significance -0.014 -0.090** -0.163*** -0.278*** -0.322*** -0.324** -0.314* -0.188 0.056 1.834*** R2 0.007 0.031 0.039 0.061 0.046 0.028 0.018 0.005 0 0.124 Residual Std. Error (0.080) (0.242) (0.391) (0.528) (0.718) (0.931) (1.138) (1.269) (1.351) (2.432) PCA component1 -0.015 -0.027 -0.018 0.007 0.002 0.006 0.012 0.018 0.062 0.327*** PCA component2 0.046 0.091* 0.128* 0.144* 0.115* 0.097 0.076 0.062 0.057 -0.067 PCA component3 0.046 0.159*** 0.275*** 0.378*** 0.305*** 0.277*** 0.262*** 0.277*** 0.322*** 0.558*** 𝑅20.005 0.045 0.083 0.105 0.087 0.076 0.060 0.060 0.064 0.252 Residual Std. Error (0.105) (0.098) (0.116) (0.133) (0.120) (0.116) (0.119) (0.122) (0.135) (0.117) Table 5. Results of the token market returns (USD) with control variable. Note: This table reports the results of predicting the future market return (USD) using the 7-day moving average of network variables with Eth price as a control variable. Columns (1)-(10) represent one day, one week to eight weeks, and 90 days respectively. *, **, and *** denote significance at the 10%, 5%, and 1% levels. The data frequency is daily. The residual standard errors are reported. Time horizon t, t+1 t, t+7 t, t+14 t, t+21 t, t+28 t, t+35 t, t+42 t, t+49 t, t+56 t, t+90 (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) △component cnt -0.046 0.095 0.197** 0.316*** 0.258*** 0.236*** 0.164** 0.183* 0.199* 0.146*** ETHPriceUSD -0.046*** -0.110*** -0.182*** -0.249*** -0.234*** -0.235*** -0.252*** -0.274*** -0.318*** -0.308*** Adjusted R2 0.008 0.064 0.13 0.189 0.205 0.22 0.231 0.261 0.287 0.29 Residual Std. Error (0.105) (0.097) (0.112) (0.126) (0.111) (0.106) (0.108) (0.108) (0.118) (0.114) △giant com ratio 0.007 -0.033 -0.05 -0.052 -0.05 -0.027 -0.028 -0.081* -0.104** -0.058** ETHPriceUSD -0.045*** -0.112*** -0.186*** -0.255*** -0.239*** -0.240*** -0.255*** -0.277*** -0.320*** -0.310*** Adjusted R2 0.007 0.002 0.003 0.003 0.003 0.001 0.002 0.008 0.011 0.005 Residual Std. Error (0.105) (0.097) (0.113) (0.128) (0.113) (0.107) (0.108) (0.109) (0.118) (0.114) △log(DCstd) 0.024 -0.011 -0.047 -0.109** -0.142*** -0.095** -0.082* -0.109* -0.096 -0.151*** ETHPriceUSD -0.046*** -0.112*** -0.184*** -0.250*** -0.232*** -0.235*** -0.251*** -0.272*** -0.317*** -0.302*** Adjusted R2 0.008 0.061 0.121 0.174 0.199 0.21 0.228 0.26 0.283 0.297 Residual Std. Error (0.105) (0.097) (0.113) (0.127) (0.112) (0.107) (0.108) (0.108) (0.118) (0.113) △log(modularity) -0.011 0.011 0.052 0.088 0.105 0.057 0.076 0.117* 0.105 0.192*** ETHPriceUSD -0.045*** -0.112*** -0.186*** -0.256*** -0.239*** -0.240*** -0.253*** -0.274*** -0.318*** -0.302*** Adjusted R2 0.007 0.061 0.119 0.168 0.187 0.204 0.226 0.257 0.283 0.301 Residual Std. Error (0.105) (0.097) (0.113) (0.128) (0.113) (0.107) (0.108) (0.109) (0.118) (0.113) PCA component1 -0.011 -0.019 -0.004 0.026 0.02 0.025 0.027 0.035 0.082** 0.339*** PCA component2 0.046 0.092* 0.129** 0.146* 0.117* 0.098* 0.077 0.063 0.058 -0.071* PCA component3 0.031 0.124** 0.217*** 0.297*** 0.227*** 0.197*** 0.173*** 0.180*** 0.208*** 0.450*** ETHPriceUSD -0.042*** -0.100*** -0.167*** -0.231*** -0.220*** -0.224*** -0.242*** -0.264*** -0.308*** -0.286*** Adjusted R2 0.009 0.09 0.173 0.235 0.237 0.244 0.251 0.278 0.308 0.484 Residual Std. Error (0.105) (0.096) (0.110) (0.123) (0.109) (0.105) (0.106) (0.107) (0.116) (0.097) 28 Ziqiao Ao, Lin William Cong, Gergely Horvath, and Luyao Zhang Table 6. Results of the 30-day volatility growth rate. Note: This table reports the results of predicting the 30-day volatility growth rate using the 7-days moving average of network variables. Columns (1)-(10) represent one day, one week to eight weeks, and 90 days respectively. *, **, and *** denote significance at the 10%, 5%, and 1% levels. The data frequency is daily. The residual standard errors are reported in parentheses. Time horizon t, t+1 t, t+7 t, t+14 t, t+21 t, t+28 t, t+35 t, t+42 t, t+49 t, t+56 t, t+90 (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) △component cnt -0.051 -0.059 -0.026 -0.069 -0.113 -0.132 -0.218*** -0.393*** -0.423*** -0.186 𝑅20.002 0.002 0 0.001 0.002 0.002 0.006 0.014 0.016 0.004 Residual Std. Error (0.078) (0.082) (0.121) (0.134) (0.161) (0.178) (0.184) (0.220) (0.221) (0.194) △giant com ratio -0.014 -0.008 -0.028 -0.05 -0.042 -0.085 -0.085 -0.078 -0.069 0.044 𝑅20 0 0.001 0.002 0.001 0.003 0.003 0.002 0.001 0.001 Residual Std. Error (0.078) (0.082) (0.121) (0.134) (0.161) (0.178) (0.185) (0.221) (0.222) (0.194) △log(DCstd) 0.058** 0.043 0.017 0.005 0.058 0.108 0.126 0.198** 0.148 -0.042 𝑅20.006 0.003 0 0 0.001 0.004 0.005 0.008 0.005 0 Residual Std. Error (0.077) (0.082) (0.121) (0.134) (0.161) (0.178) (0.185) (0.220) (0.222) (0.194) △log(modularity) 0 0.027 0.006 -0.001 0.001 0 0.037 0.042 0.026 0.055 𝑅20 0.001 0 0 0 0 0 0 0 0.001 Residual Std. Error (0.078) (0.082) (0.121) (0.134) (0.161) (0.178) (0.185) (0.221) (0.223) (0.194) PCA component1 -0.037 -0.076*** -0.139*** -0.172*** -0.212*** -0.255*** -0.262*** -0.283*** -0.245*** -0.286*** PCA component2 -0.039 -0.062* -0.099** -0.123** -0.140** -0.156** -0.113 -0.055 0.078 0.310*** PCA component3 -0.028 -0.091*** -0.167*** -0.215*** -0.268*** -0.300*** -0.356*** -0.442*** -0.413*** 0.150** 𝑅20.008 0.036 0.052 0.067 0.071 0.075 0.073 0.066 0.052 0.103 Residual Std. Error (0.077) (0.081) (0.118) (0.130) (0.155) (0.172) (0.178) (0.214) (0.217) (0.184) Table 7. Results of the 30-day volatility growth rate with control variable. Note: This table reports the results of predicting the 30-day volatility growth rate using the 7-days moving average of network variables with Eth price as a control variable. Columns(1)-(10) represent one day, one week to eight weeks, and 90 days respectively. *, **, and *** denote significance at the 10%, 5%, and 1% levels. The data frequency is daily. The residual standard errors are reported in parentheses. Time horizon t, t+1 t, t+7 t, t+14 t, t+21 t, t+28 t, t+35 t, t+42 t, t+49 t, t+56 t, t+90 (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) △component cnt -0.048 -0.055 -0.021 -0.065 -0.109 -0.127 -0.212** -0.384*** -0.408*** -0.144 ETHPriceUSD 0.012 0.012 0.017 0.015 0.016 0.016 0.019 0.033 0.052 0.148*** Adjusted R2 0.001 0.001 -0.001 0 0.001 0.001 0.005 0.013 0.017 0.034 Residual Std. Error (0.078) (0.082) (0.121) (0.134) (0.161) (0.178) (0.185) (0.220) (0.221) (0.191) △giant com ratio -0.015 -0.009 -0.029 -0.051 -0.043 -0.087 -0.087 -0.081 -0.074 0.033 ETHPriceUSD 0.013 0.013 0.018 0.017 0.019 0.02 0.026 0.044 0.063 0.151*** Adjusted R2 0 -0.001 0 0.001 0 0.002 0.002 0.002 0.003 0.032 Residual Std. Error (0.078) (0.082) (0.121) (0.134) (0.161) (0.178) (0.185) (0.221) (0.222) (0.191) △log(DCstd) 0.055** 0.04 0.012 0 0.053 0.104 0.121 0.188* 0.132 -0.089 ETHPriceUSD 0.01 0.011 0.017 0.016 0.015 0.013 0.018 0.032 0.054 0.157*** Adjusted R2 0.004 0.002 -0.001 -0.001 0 0.002 0.003 0.007 0.006 0.034 Residual Std. Error (0.077) (0.082) (0.121) (0.134) (0.161) (0.178) (0.185) (0.220) (0.222) (0.191) △log(modularity) 0.004 0.032 0.012 0.003 0.006 0.006 0.045 0.054 0.044 0.1 ETHPriceUSD 0.013 0.014 0.018 0.016 0.018 0.019 0.026 0.045 0.064 0.156*** Adjusted R2 -0.001 0 -0.001 -0.001 -0.001 -0.002 -0.001 0 0.002 0.034 Residual Std. Error (0.078) (0.082) (0.121) (0.134) (0.161) (0.178) (0.185) (0.221) (0.222) (0.191) PCA component1 -0.038 -0.076*** -0.139*** -0.172*** -0.212*** -0.255*** -0.262*** -0.284*** -0.247*** -0.291*** PCA component2 -0.039 -0.062* -0.099** -0.123** -0.140** -0.156** -0.113 -0.055 0.079 0.315*** PCA component3 -0.024 -0.087*** -0.163*** -0.213*** -0.266*** -0.299*** -0.355*** -0.435*** -0.398*** 0.221*** ETHPriceUSD 0.012 0.009 0.01 0.005 0.004 0.003 0.004 0.016 0.039 0.185*** Adjusted R2 0.005 0.032 0.049 0.063 0.067 0.071 0.069 0.062 0.05 0.149 Residual Std. Error (0.077) (0.081) (0.118) (0.130) (0.155) (0.172) (0.178) (0.214) (0.217) (0.179)
{ "id": "2206.08401" }
1812.10345
Bitcoin Payment-channels for Resource Limited IoT Devices
Resource-constrained devices are unable to maintain a full copy of the Bitcoin Blockchain in memory. This paper proposes a bidirectional payment channel framework for IoT devices. This framework utilizes Bitcoin Lightning-Network-like payment channels with low processing and storage requirements. This protocol enables IoT devices to open and maintain payment channels with traditional Bitcoin nodes without a view of the blockchain. Unlike existing solutions, it does not require a trusted third party to interact with the blockchain nor does it burden the peer-to-peer network in the way SPV clients do. The contribution of this paper includes a secure and crypto-economically fair protocol for bidirectional Bitcoin payment channels. In addition, we demonstrate the security and fairness of the protocol by formulating it as a game in which the equilibrium is reached when all players follow the protocol.
http://arxiv.org/pdf/1812.10345v1
Christopher Hannon, Dong Jin
cs.CR
cs.CR
1 Bitcoin Payment-Channels for Resource Limited IoT Devices Christopher Hannon, Student Member, IEEE, and Dong Jin, Member, IEEE, Abstract —Resource-constrained devices are unable to maintain a full copy of the Bitcoin Blockchain in memory. This paper proposes a bidirectional payment channel framework for IoT devices. This framework utilizes Bitcoin Lightning-Network-like payment channels with low processing and storage requirements. This protocol enables IoT devices to open and maintain payment channels with traditional Bitcoin nodes without a view of the blockchain. Unlike existing solutions, it does not require a trusted third party to interact with the blockchain nor does it burden the peer-to-peer network in the way SPV clients do. The contribution of this paper includes a secure and crypto-economically fair protocol for bidirectional Bitcoin payment channels. In addition, we demonstrate the security and fairness of the protocol by formulating it as a game in which the equilibrium is reached when all players follow the protocol. I. I NTRODUCTION INTERNET of Things (IoT) services and devices are ex- panding at an exponential pace due to the rapid expan- sion of networking technologies. Today many companies are jumping into an IoT arms race across various application domains including smart home, connected health, wearables, connected car, smart retail, supply chain, and many more. One key observation is that smart IoT devices are increasingly replacing our physical credit cards, enabling a faster and easier way for us to order products and pay services on demand. However, many problems exist concerning payment services through IoT devices, such as identity verification, security and privacy (e.g., financial information protection), scalability and flexibility (e.g., accidental ordering, refunds). Blockchain technology has been proposed to play a pow- erful role to address those challenges in IoT payment ser- vices. Blockchains are based on cryptographically secured, immutable distributed ledger technology which operate in a distributed fashion, and thus have the potential to enhance IoT solutions with better automated resource optimization, data security and reliability. For example, [1] describes how blockchain can facilitate sharing of services and the automa- tion of work flows; [2] overviews the blockchain integration and projects within the energy sector including markets, op- erations and stability, and security of the grid. The integration of IoT and blockchain has huge potential in revolutionizing IoT. IoT devices that interact with the physical world can transfer value in exchange for services and blockchains can provide a value transfer protocol. Applications C. Hannon and D. Jin are with the Department of Computer Science, Illinois Institute of Technology, Chicago, IL, 60616 USA e-mail: channon@iit.edu, dong.jin@iit.edu. Manuscript received December 18, 2018.in Industrial IoT such as metering infrastructure in utilities including gas, electricity and water as well as electric vehicle charging and supply chain management can benefit from value transfer using blockchain technology. Transactions on blockchains can build trust between devices without relying on a trusted third party intermediary. Decentralized trustless value ledgers in the form of blockchains have gained increasing traction as trust-less value transfer protocols. Another novelty of blockchain technology is the design of a crypto-economic consensus algorithm which relaxes the assumption that some number of agents are honest to economically rational. This creates a state that as long as participants value money (or digital cash), they will behave in a way that results in their own best interest, i.e., highest profits. By design, blockchain consensus ensures correct operations of a decentralized public database that records users’ account balances. Blockchain technology allows for users to transfer value to other users without the help of trusted third parties such as PayPal or Visa. The main advantage of blockchain is its trust-less value transfer protocol, which is securely maintained through de- centralized participants. However, the blockchain technology does not solve all problems, specifically, blockchains suffer from limited scalability due to their decentralized nature. Additionally, the limited scalability can drive up the cost of using the blockchain network through high fees. In this work, we focus on using blockchain payment channels which enables scalability. We design a payment channel protocol based on the Lightning Network, which enables IoT devices with few computational and storage resources to transfer value. In particular, our protocol enables a party to transact with another using the Bitcoin blockchain without storing the complete blockchain using untrusted third parties. Figure 1 shows the architecture of our blockchain protocol in reference to the rest of the blockchain. The remaining paper is organized as follows: Section II provides background on blockchain and its payment channels. Section III presents a protocol design that enables real-time payment channels for IoT devices to gateway services. We analyze the security of the protocol by formulating it as a game in Section IV. Finally, we describe the related work in Section V and conclude in Section VI with future work directions. II. B ACKGROUND Blockchain technology at its core is an immutable pub- lic digital ledger containing transactions. The novelty ofarXiv:1812.10345v1 [cs.CR] 26 Dec 2018 2 IoT Gateway IoT Device Blockchain Bitcoin Node IoT Field Device IoT Gateway P2P Link TCP/IP Payment Channel Fig. 1. IoT devices in the Bitcoin Blockchain context. The IoT device has a payment channel open to a gateway service and does not have a local copy of the blockchain. Instead, the IoT device relies on untrusted third parties to connect on its behalf through economic incentives. blockchain is its ability to unequivocally agree on the state of the ledger in a decentralized setting. Through the process ofmining , the global state of the blockchain advances. The Bitcoin blockchain [3] provides the ability to send transactions which consist of inputs, outputs, and rules gov- erning the redemption of the outputs. Inputs to transactions map to the source of the funds (a previous transaction) while the outputs represent the destination of the transaction value. The governing rules included in the transaction dictate how the recipient of the transaction is able to spend the received value in the future. A common rule is for the recipient to prove ownership of a private key associated with the destination address in the transaction. However, more detailed rules can be expressed to provide more complicated value redemption logic. In general, Bitcoin follows the UTXO model which says that an input to a new Bitcoin transaction is the output of an unspent previous transaction along with a script that redeems the previous transactions output. The output of the new transaction provides the recipient and a script telling the recipient how to redeem the values. Since the blockchain is an immutable public database, transactions cannot be revoked and the total of all unspent transaction outputs represent the current state of the Blockchain. Thus, there is no concept of users or accounts included in the Bitcoin Blockchain. Transactions are organized into blocks which remain pend- ing until a partial pre-image is found for the sha-256 hash algorithm which meets a specific criteria quantified as the blockchain’s difficulty. This difficulty is a dynamic variablethat corresponds to the processing power of participants work- ing to add new blocks and transactions into the blockchain. The result of this process maintains that on average new blocks are added to the blockchain every 10 minutes. In alternative blockchain implementations, the target block interval varies, e.g., 15 seconds in Ethereum [4]. This interval is important to note because until a transaction is included in a block it is not considered verified by the blockchain network. Furthermore, due to the consensus algorithm that governs the blockchain, there may be a temporary fork where multiple valid blocks are at the same height. A block is only valid if it is part of the longest blockchain. Confidence of immutability grows exponentially in relation to the depth of the block, i.e., number of subsequent blocks. The original Bitcoin white paper [3] provides a more detailed analysis. However, one heuristic used in practice is 6 blocks (about 60 minutes)[5]. Figure 2 shows the cost of sending a transaction converted to USD over four months in 2018. The cost of a transaction on the blockchain as well as the time required to publish the transaction makes frequent real-time transactions impos- sible. Another method to reduce fees is to use an alternative blockchain that has larger block sizes or more frequent blocks. Although alternative blockchains can have weaker security, and greater price volatility that does not satisfy our goals in this work. In this paper, we propose a protocol using off-chain payment channels that can provide real-time payment but do not incur large fees with frequent posting to the blockchain. A. Off-Chain Bitcoin Transactions Bitcoin’s Forth-like scripting language enables more com- plex functionality by placing conditions on the redeeming of transaction outputs. For example, time locks can be used on transactions and transaction outputs to place temporal restric- tions on the ability to spend or create transactions. Time locks can be both relative and absolute and can prevent a transaction output from being spent until after a certain time. Time locks are one of the most important building blocks in off-chain Bitcoin Transactions, such as in the Bitcoin Lightning Network [6]. Multisignatures can require multiple keys to spend a transaction output. One use case for multisignatures is joint savings accounts where both parties need to agree to make a transaction. Time lock contracts include primitives [5] such as nLockTime specifies the minimum height of the blockchain that a transaction can be included in. CheckLockTimeVerify requires that the blockchain be at a certain height for the output of an already included transaction to be spent. Relative LockTime places restrictions on the inclu- sion of an input to a new transaction based on the time that the input was included in the previous transaction. CheckSequenceVerify provides a relative time that the output of a transaction becomes valid after inclusion in a block. Multisig can be used to require mofnsignatures to become valid. nLockTime andRelative Locktime are corresponding counterparts for absolute and relative time respectively for in- clusion into the blockchain while CheckLockTimeVerify 3 andCheckSequenceVerify are counterparts for absolute and relative time respectively for making outputs of a valid transaction spendable. Hashlocks on the other-hand provide encumbrance on the outputs of transaction that requires a specified secret value being publicly revealed. Upon unlocking the hashlock, all other hashlocks with the same secret value are also unlocked due to the secret value being recorded on the blockchain. The combination of hashlocks and timelocks can create timed hashlock contracts (HTLCs) which can be used to put Bitcoin transactions ’off-chain’ through what is called L2 or layer 2 scaling solutions, such as the Lightning Network [6], Duplex micropayment channels[7], and Raiden [8]. Our protocol uses CheckSequenceVerify andMultisig for payment channels similar to Lightning Network Transactions. Off-chain transactions are properly formatted Bitcoin transac- tions that are deferred from being published immediately on the blockchain. The benefit is that off-chain transactions can be updated many times before published to the blockchain result- ing in reduced on-chain transactions and ultimately fewer fees. In [7], channels can be created unidirectional or in duplex, and transactions can be updated so that the final channel balances are guaranteed to be included. This is accomplished by newer transactions having smaller timelocks than earlier transactions, and thus being able to be published sooner than old invalidated transactions. A limitation of this approach is that channels will have finite lives. References [6] and [8] allow for channels to remain open indefinitely or until the owners decide to close the channel. In those solutions, transactions are properly formatted so that either party involved can post the transaction at any time to the blockchain in case of dispute. This property allows for the protocol to remain trustless. To avoid the problem of excessive fees, transactions are updated off-chain to reflect a new balance and only publish them upon closure to the blockchain. Therefore, fees only need to be paid when opening and closing a channel and updating the balance within the channel is fee-less. Because IoT devices are resource limited, it is infeasible to assume that they can remain connected to the blockchain. Therefore, we need to adopt the state channel model to allow for one (or both) parties to be offline from the Bitcoin blockchain. In this work, we assume that the IoT devices have networking capability to untrusted third parties. By providing financial incentives to the third parties, the IoT devices do not need to have direct access to the blockchain and can instead rely on the untrusted third parties to act as a bridge to ensure correct operation of the protocol. III. P ROTOCOL DESIGN The intuition of our protocol is to use a multisig transaction to fund the channel. Intermediate states are made revocable as developed in [6]. Our contribution is to ensure correctness and crypto-economical fairness when one party does not have access to the blockchain. To do this, we use a third party to post transactions to the blockchain by creating an additional output that is spendable by the third party. By creating an Feb 2018Mar Apr May Jun0246810121416USDAverage Transaction fee in USDFig. 2. Average transaction fee from Feb. to June 2018 in USD. Calculated using the blocksci library [9]. economic incentive, a third party is willing to participate in the protocol. Furthermore, to ensure that the second party does not violate the protocol by publishing a revoked state, a third party is used as a watchdog , which informs the first party when the funding transaction’s output is used as an input to a new transaction. This watchdog will report when an intermediate state is posted to the blockchain, which prevents publishing an expired state. Additionally, to prevent collusion between the second party and the third parties, we use a pool of third parties for each service. Since any member in the third party is able to take the role, the incentive needs to be higher than any incentive from colluding. In Section IV, we formulate the problem as a game and show that the equilibrium is reached by following the protocol. The details of the protocol are as follows. For each IoT device A, the IoT payment gateway Bcreates a payment channel. Both AandBgenerate 3 sets ofjkeypairs (pkfBjAgjfajbjcg;skfBjAgjfajbjcg)such that each intermediate transaction uses a different key- pair making jthe number of intermediate states. Ad- ditionally, we generate a keypair for opening and clos- ing the channel, (pkfBjAgfFTjcloseg;skfBjAgfFTjcloseg), and another pair for Atransacting with the third parties, (pkA3rdfajrcg;skA3rdfajrcg). To minimizes the IoT de- vices’ memory requirements, we use BIP32 that provides a deterministic hierarchical key generation algorithm with a highly compacted data structure [10]. All keys can then be generated with a given master key and an index in the data structure. Effectively this enables the storing of an index in place of a keypair, as the total requirements for storing a state is the key index and the balances. The two parties agree to place a Funding Transaction TFT on the blockchain that sends Aand Bas input funds from A andBrespectively. The output of the channel is a 2-of-2 multi- signature requiring both AandB’sskfBjAgFTto spend. Additionally, the two parties agree on an initial commitment transactionTC1that is a valid spending of the funds from TFT 4 as the input and returning Aand Bas the outputs. Note that the transaction is not published to the blockchain, and its purpose is to denote the starting balance in the payment channel. Reference [6] shows how two transactions, TC1B andTC1Acan be constructed so that Bis the only party that can publish TC1AandAis the only party that can publish TC1B. This mechanism is accomplished by supplying one of the 2-of-2 input signatures required to spend TFT’s output, i.e., partially signing the transaction. Furthermore, the transactions TC1BandTC1Aare made revocable by encumbering the outputs of the corresponding party’s ability to send the output. For example, if Apublishes TC1B, the output of Bcan be redeemed immediately by B. However, Afunds are locked. There are two ways to redeem the locked funds. The first is to use AandB’s secret keyssk1s for a 2-of-2 multi-signature. The second is to use a timelock to redeem the fund to AafterWblocks, where W is the number of blocks specified in the timelock. Bmay use the first mechanism to steal all ofAs funds after both parties update the state of the channel to the new transactions TC2B andTC2A. Upon updating, Asendssk1toB(andBsends sk1toA). The stealing of funds relies on the mechanism to prevent oldtransactions from being published, which can be achieved by Bchecking the blockchain before some Wblocks afterTC1Bis published. This mechanism is a way to ensure that both parties follow the protocol even if the two parties do not trust each other. However, since the IoT devices are assumed not to have a di- rect access to the blockchain, two disjoint groups of untrusted third parties are used to interface between the IoT device and the blockchain. Each group has multiple members, K1and K2respectfully, to prevent collusion with B. The first group is used to publish a transaction to the blockchain incentivized through a small fee as an output to the transaction. The second group ensures that if Bpublishes an old transaction that the IoT device is notified of the transaction and is able to spend the transaction output before the timelock Wexpires for B to redeem their funds. This second group is also incentivized through small fees in Bitcoin smart contracts. Transactions 3-5 show the method to do this. In order to prevent third parties colluding with each other or B, the number of members in each third party has to be chosen with respect to the quantity of fees as well as to the channel balances. When both parties agree on the closing of a channel, they can create a new transaction TFin that uses Afin and Bfin as the final output balances, and post it to the blockchain. If both parties follow the protocol properly, only two transactions, TFTandTFin, are published to the blockchain. If one party tries to publish an old state of the channelTCi(B=A ), the other party can detect this and take all the funds in the channel. Transaction 1, the funding transaction, contains two or more inputs, and one or more outputs. The channel funding output is a multisignature output requiring both parties to sign in order to use as an input into a new transaction. Transaction 2, is used upon mutual channel closing, it uses the multisignature output from the funding transaction and uses multiple outputs to both AandB. If the IoT devicewishes to post the transaction, a fee can be placed in an input for a third party to be incentivized to publish. Transaction 3 takes the funding transactions output as input and creates 3 outputs. The first output is local to A, the party with the ability to publish it. This output is encumbered by a timelock of Wblocks toA’s address to ensure that if the transaction is old. In other words, A has given a key pair (pkfAgjfcg;skfAgjfcg)to B, and B can redeem this input. The second output is the remote output to B. Finally, there is a third output, which is the incentive for a third party to send the transaction to the blockchain and make sure the transaction gets included in a block. Transaction 4 takes the funding transactions output as input and creates 2 outputs. Because Apartially signs the input to this transaction, only Bis able to publish it. The first output is timelocked by Wblocks with an output to B.Ais also able to redeem this input given (pkfBgjfcg;skfBgjfcg). There is a third party watching the blockchain, whose key is required for Ato redeem this input. By doing so, the third party also gets a fee in return. Transaction 5 takes this as input and can be presigned. This recovery transaction is used as a smart contract to incentivize a third party to watch the blockchain by providing a fee determined by the members of the third party. The second output to Transaction 4 is used for a remote output to A. The Bitcoin Scripts used for all the aforementioned transac- tions are shown in Appendix A to provide a real-time payment channel for IoT devices with an IoT gateway. IV. S ECURITY ANALYSIS To prove that our protocol design is crypto-economically fair, we model the protocol as a game and demonstrate that the equilibrium can always be reached as long as the players follow the protocol and fees are appropriately set. The payment channel in the Bitcoin Lightning Network [6] can be modeled as a game between two actors. After the channel is funded, Player I may post any previous states and then Player II may choose to follow the protocol or deviate. Following the protocol means to take the maximum amount of funds, i.e., the remote transaction as well as the local transaction, if the transaction is rescinded. Deviating means to do nothing or to take just the remote funds. Let us consider 3 transactions with Players I and II balances , respectively. We define TX 1= ( 1; 1),TX 2= ( 2; 2), and TX 3= ( 3; 3), such that 2> 1> 3and 3> 1> 2, whereTX 1is the current state of the channel, and TX 2and TX 3are previous states where and are the values each party has respectively in the channel at a state. Additionally, 1+ 1= 2+ 2= 3+ 3since the total amount of funds in the channel is fixed. Player I’s strategies are which TX to publish to the blockchain. Following the protocol, the strategy is publishing TX 1, whileTX 2andTX 3is deviating from the protocol. Player II’s strategies are Follow, Deviate 1, and Deviate 2 as described above. The payoff matrix for this game is shown in Table I. Player I experiences a maximum payout under strategy D 1 if Player II chooses a deviating strategy. However, since Player II has a pure strategy always to follow 5 I/II F D 1 D 2 F 1/ 1 2+ 2/0 3+ 3/0 D1 1/ 1 2/ 2 3/ 3 D2 0/ 1 0 / 2 0 / 3 TABLE I PAYOFF MATRIX OF PAYMENT CHANNEL GAME BETWEEN 2PARTIES the protocol, the equilibrium is reached when Player I also follows the protocol. In this game, we show that in the life of the channel, no player will be able to increase their profit if the other player follows the protocol. In our approach, we assume that one party does not have access to the blockchain, and also with the addition of more players, the game gets further complicated. The interesting cases to evaluate are when one of the parties posts an inter- mediate state to the blockchain. Let us consider four players in the game, the IoT gateway, an IoT device, and two groups of untrusted third parties. Player 1 is the IoT gateway with three strategies, using the same set of transactions as the previous game. Each strategy refers to posting a transaction to the blockchain where strategy 1 is following the protocol. In the first game where player 1 goes first (see Figure III), Player 4, the 3rd party that watches the blockchain for an output of the funding transaction in a new transaction plays next. Player 4 can either tell player 2 about the transaction (Strategy F) or deviate from the protocol. Since Player 4 represents a group of players, K2, any one of them can follow the protocol. Therefore, in order to deviate, all Players in the group must collude. If the players collude to perform a denial-of-service attack, then no profit is gained. Therefore, it is not rational. On the other hand, if the Player 4 members collude with Player 1 (Strategy D), then they can receive some payoff 2 K2, whereK2 is the number of members in the group and 2is the amount that Player 1 offers which is bounded by 1. If we show that 2 K2is less than 1, then Player 4 will not be incentivized to deviate from the protocol. Player 2 will not deviate from the protocol because they have a pure strategy to follow the protocol. Finally, similarly to Player 4, Player 3 can follow the protocol where any one member of K1will earn 1. After many games, the average payout is1 K1.1must be large enough to cover the fee of spending the transaction as well as for the bandwidth requirements in order to maintain a connection to the IoT device. Additionally, in order to prevent collusion between all the members in Player 3 and Player 1,2 K1is less than 1. This forced inequality is the reason for using multiple members in each group. If2 K1<  1and 2 K2< 1are true, then the equilibrium is reached when all players follow the protocol correctly. In order to ensure these inequalities hold, a minimum/maximum channel balance must be enforced. Recall that 2> 1> 3, to evaluate the fees ofand , we can set TX 2to the intermediate state where 2=8i MAX ( i)and similarly TX 3, 3=8i MIN ( i) Player 1 has the potential to maximize their potential earnings when they deviate with strategy 2, by posting TX 2 to the blockchain with earnings of 22and 2 2andby colluding with Players 3 and 4 respectively. By enforcing that 1>2 K11> 2 3 K1 and similarly for Player 4, 1> 2 K2 1> 2 3 K2 we can show that the equilibrium is met when all players follow the protocol because Player 3 and Player 4 will not collude with Player 1. If Player 2 makes the first move by posting a transaction to the blockchain, the game is similar to the original payment channel game shown in Table I. Player 1 will have a pure strategy to follow the protocol. However, Player 3 can deviate from the protocol by performing a denial-of-service attack against Player 2. If Player 3 does this through collusion, the game actually restarts. By incentivizing Player 3 and because there is a pool of members in Player 3, it is not economically rational to take that strategy. Therefore, using the fee structure foras in the game when Player 1 goes first, equilibrium is reached when all players follow the protocol. Although in both equilibrium cases Player 4 does not get an incentive, they do not know which strategy Player 1 has taken, thus their profit is still maximized when following the protocol. V. R ELATED WORK There are many alternative blockchains with various prop- erties including privacy, support for more complex smart con- tracts, and client software for interfacing with the blockchain, as well as with various uses of blockchain technology in IoT. A. Simplified Payment Verification Simplified Payment Verification (SPV) clients are lightweight Bitcoin clients [3], that do not need to store the full state of the blockchain. Instead, they store the 80-byte block headers. The block header contains a lot of information as they are chained together and contain the Merkle root of the transactions in each block. By providing an SPV client with a Merkle proof, any node can convince an SPV client that a transaction is included in the blockchain with high security as it is not efficient to create fake block headers. However, SPV clients rely on blockchain nodes to watch for payments. With many IoT devices making payments, there is no incentive for regular Bitcoin nodes to watch the blockchain for specific transactions. Therefore, we argue that SPV clients are a burden to the Bitcoin network and we design our protocol to avoid these scalability limitations. In practice, if the IoT device has storage for approximately 4 MB per year for storing block headers, then it is reasonable to include the SPV client in addition to our protocol for even greater security. However, our solution requires significantly less data storage for IoT devices. 6 P1 P4 P2 P3 ( 1; 11;1 K1;0)F ( 1;0;0;0)DF ( 1;0;0;0)DF ( 1;0;0;0)DS1 P4 P2 P3 (0; 2+ 21 1;1 K1; 1 K2)F ( 22; 2;2 K1;0)DF ( 2+ 2;0;0;0)DF ( 2+ 2 2;0;0; 2 K2)DS2 P4 P2 P3 (0; 3+ 31 1;1 K1; 1 K2)F ( 32; 3;2 K1;0)DF ( 3+ 3;0;0;0)DF ( 3+ 3 2;0;0; 2 K2)DS3 Fig. 3. Extensive form when Player 1 goes first. The optimal solution is reached when all players follow the protocol. P2 P3 P1 ( 1; 11;1 K1;0)F (0; 12;2 K1;0)DF (0;0;0;0)DS1 P3 P1 ( 2+ 21;0;1 K1;0)F ( 2; 22;2 K1;0)DF (0;0;0;0)DS2 P3 P1 ( 3+ 31;0;1 K1;0)F ( 2; 22;2 K1;0)DF (0;0;0;0)DS3 Fig. 4. Extensive form when Player 2 goes first. The optimal solution is reached when all players follow the protocol. B. Payment Channels This work expands the Lightning Network [6] payment channel system for IoT devices. The full Lightning Network enables payments to be routed through third parties too while we leave routing through third parties as future work in order to fully integrate with the Lightning Network. Bolt [11], is a protocol that enables private off-chain pay- ment channel transactions. Because of the privacy-preserving nature, it is a challenge to interface with such a system on low resource devices commonly seen in IoT. However, privacy preservation in state channels can be a desired property in IoT payment systems, such as smart meters in the power grid. Raiden [8], is an Ethereum based payment channel similar to the Lighting Network. Our protocol can also be adapted to this style network. Plasma [12], is a scaling solution designed on Ethereum that enables payment channels as well as more complex smart contracts to be deployed. IOTA (MIOTA) [13], is a blockchain designed with low computation for IoT and web 3.0 protocols. In our case, how- ever, the security model of this blockchain is quite different ofthat from Bitcoin and Ethereum. Additionally, we choose to use Bitcoin because it is the most widely used and thus easier to adopt in practice. C. IoT Integrated with Blockchain Christidis and Devetsikiotis explore the challenges and opportunities of blockchain and smart contracts for IoT in [1]. Their work focuses on discovering use cases that distributed ledger technology can solve and challenges found with inte- gration of IoT. One challenge that they do not discuss is the resource limitations of IoT, which is the problem we propose a solution for. Our solution only covers the value transfer portion of blockchain technology. In [14], Aitzhan and Svetinovic propose a token-based system similar to Bitcoin and coupled with an anonymous messaging system to provide security and privacy for peer- to-peer energy trading. They also include the ability to open unidirectional payment channels for partial payment. Their ap- proach designs an anonymous market revolving around energy 7 trading. In our work, we focus solely on bidirectional payment channels for the Bitcoin blockchain. While application-specific blockchains and token systems including [15] may provide a solution in specific domains, we would like to explore general purpose solutions within IoT payment systems. In [16], the authors focus on creating a local energy market for matching energy orders in a decentralized manner. Their proposals call for a private or permissible blockchain, which operates as a decentralized trusted application. In this work, we focus on integrating the existing end-user devices to IoT gateways on public trustless blockchains. In [17], Blockchain is evaluated for use in smart homes for IoT, but the blockchain proposed does not use a trustless con- sensus algorithm, which makes it a decentralized database for recording internet-of-things devices activity. Reference [18] attempts a similar objective for smart grid sensors and actua- tors. In our work, we design a protocol that can be generally applied to public trustless blockchains. Additionally, we aim to solve the problem of value transfer rather than information assurance. Our approach uses the Bitcoin blockchain for our protocol design. There are many other blockchains that have useful properties, such as Ethereum [4], Litecoin, various Bitcoin forks, and many others which have a different block time and can implement Turing-complete scripting languages or provide differing features, such as privacy and anonymity. However, payment channels are still in development and on- chain transactions will still suffer from the high fee problem that Bitcoin on-chain transactions do. In our future work, we will analyze trade-offs between blockchain ecosystems for IoT and cyber-physical system payments. VI. C ONCLUSION We design a real-time blockchain-based payment channel for IoT devices to gateway services, which is less resource intensive than existing solutions, and show that off-chain pay- ment channels are feasible for applications where IoT devices transfer value. We also demonstrate that the protocol is crypto- economically fair by modeling the protocol as a game, in which the equilibrium is reached as long as the players follow the protocol and set the fees appropriately. In the future, we would like to expand our protocol for IoT devices to interact with other IoT devices as well as generalize the protocol to work with payment channels including interoperability with the existing Lightning Network [6]. We would also like to explore the ability of privacy-preserving blockchain payment channels, such as Bolt [11], in order to protect the rights of end-users in IoT and cyber-physical systems. APPENDIX A BITCOIN TX S CRIPTS REFERENCES [1] K. Christidis and M. Devetsikiotis, “Blockchains and smart contracts for the internet of things,” IEEE Access , vol. 4, pp. 2292–2303, 2016. [2] J. Basden and M. Cottrell, “How utilities are using blockchain to modernize the grid,” Harvard Business Review , 2017. [3] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system.” http: //bitcoin.org/bitcoin.pdf, 2008.Transaction 1 Funding Transaction Script OUT1 1:Redeem Script (rS) 2: 2<pkAFT> <pkBFT>2 CHECKMULTISIG 3:Locking Script (lS) 4: HASH160<rSHash>EQUAL 5:Unlocking Script (uS) 6: 0<sigAFT> <sigBFT> < rS> < lS> 7:where 8: rSHash = RIPEMD160 (SHA256 (r S)) Transaction 2 Mutual Close Transaction 1:In1 .FT 2: Funding Transaction (FT) 3:Out1 .A 4: Locking Script (lS) 5: DUP HASH160 <H(pkAclose)> EQUALVERIFY CHECKSIG 6: Unlocking Script (uS) 7:<sigAclose> <pkAclose> 8:Out2 .B 9: Locking Script (lS) 10: DUP HASH160 <H(pkBclose)> EQUALVERIFY CHECKSIG 11: Unlocking Script (uS) 12:<sigBclose> <pkBclose> 13:where 14: H(pk) = RIPEMD160 (SHA256 ( pk)) [4] V . Buterin, “Ethereum white paper: A next gerneration smart contract and decentralized application platform,” tech. rep., 2014. [5] “Bitcoin wiki.” https://en.bitcoin.it/wiki. Accessed: 2018-05-28. [6] J. Poon and T. Dryja, “The bitcoin lightning network,: Scalable off-chain instant payments,” 2016. [7] C. Decker and R. Wattenhofer, “A fast and scalable payment network with bitcoin duplex micropayment channels,” in Proceedings of the 17th International Symposium on Stabilization, Safety, and Security of Distributed Systems - Volume 9212 , (Berlin, Heidelberg), pp. 3–18, Springer-Verlag, 2015. [8] brainbot, “The raiden network.” https://raiden.network, 2018. Accessed: 2018-05-28. [9] H. A. Kalodner, S. Goldfeder, A. Chator, M. M ¨oser, and A. Narayanan, “Blocksci: Design and applications of a blockchain analysis platform,” CoRR , vol. abs/1709.02489, 2017. [10] P. Wuille, “Bip32: Hierarchical deterministic wallets.” https://github. com/bitcoin/bips/blob/master/bip-0032.mediawiki. Accessed: 2018-05- 28. [11] M. Green and I. Miers, “Bolt: Anonymous payment channels for decentralized currencies.” Cryptology ePrint Archive, Report 2016/701, 2016. https://eprint.iacr.org/2016/701. [12] J. Poon and V . Buterin, “Plasma: Scalable autonomous smart contracts.” https://plasma.io/plasma.pdf, 2017. Accessed: 2018-10-28. [13] S. Popov, “The tangle.” https://www.iota.org/research/academic-papers, 2018. Accessed: 2018-10-28. [14] N. Z. Aitzhan and D. Svetinovic, “Security and privacy in decentralized energy trading through multi-signatures, blockchain and anonymous messaging streams,” IEEE Transactions on Dependable and Secure Computing , pp. 1–1, 2016. [15] M. Mihaylov, S. Jurado, N. Avellana, K. Van Moffaert, I. M. de Abril, and A. Now ´e, “Nrgcoin: Virtual currency for trading of renewable energy in smart grids,” in European Energy Market (EEM), 2014 11th International Conference on the , pp. 1–6, IEEE, 2014. [16] E. Mengelkamp, B. Notheisen, C. Beer, D. Dauer, and C. Weinhardt, “A blockchain-based smart grid: towards sustainable local energy markets,” 8 Transaction 3 Commitment ia(Publishable by A) 1:In1 .FT 2: Funding Transaction (FT) 3:Out1 .A 4: Locking Script (lS) 5: IF 6: W CHECKSEQUENCEVERIFY DROP DUP HASH160 <H(pkAia)>EQUALVERIFY CHECKSIG 7: ELSE 8: DUP HASH160 <H(pkBib)>EQUALVERIFY CHECKSIG DROP DUP HASH160 <H(pkAic)>EQUALVERIFY CHECKSIG 9: ENDIF 10:Out2 .B 11: Locking Script (lS) 12: DUP HASH160 <H(pkBib)>EQUALVERIFY CHECKSIG 13:Out3 .3rd Party A (Economically Incentivized to publish to the blockchain) 14: 1<pk 3rda0> <pk 3rdaK> K 1CHECKMULTISIG Transaction 4 Commitment ib(Publishable by B) 1:In1 .FT 2: Funding Transaction (FT) 3:Out1 .B 4: Locking Script (lS) 5: IF 6: W CHECKSEQUENCEVERIFY DROP DUP HASH160 <H(pkBia)>EQUALVERIFY CHECKSIG 7: ELSE .3rd Party B (Economically Incentivized to watch the blockchain) 8: 1<pk 3rdb0> <pk 3rdbK> K 2CHECKMULTISIG DROP DUP HASH160 <H(pkBic)>EQUALVERIFY CHECKSIG DROP DUP HASH160 <H(pkAib)>EQUALVERIFY CHECKSIG 9: ENDIF 10:Out2 .A 11: Locking Script (lS) 12: DUP HASH160 <H(pkAib)>EQUALVERIFY CHECKSIG Transaction 5 Recovery Transaction 1:In1 .Commitment TX b 2: (Transaction 4, Output 1) 3: Unlocking Script (uS) 4:<sigAib> <pkAib> <sigBic> <pkBic> <pk 3rdb > 5:Out1 .A 6: Locking Script (lS) 7: DUP HASH160 <H(pkAirc)>EQUALVERIFY CHECKSIG 8: Unlocking Script (uS) 9:<sigAirc> <pkAirc> 10:Out2 .3rd Party b 11: Locking Script (lS) 12: DUP HASH160 <H(pk 3rdb!)>EQUALVERIFY CHECKSIG 13:Out3 .3rd Party a 14: Locking Script (lS) 15: 1<pk 3rda0> <pk 3rdaK> K 1CHECKMULTISIG DROP 9 Computer Science-Research and Development , vol. 33, no. 1-2, pp. 207– 214, 2018. [17] A. Dorri, S. S. Kanhere, R. Jurdak, and P. Gauravaram, “Blockchain for iot security and privacy: The case study of a smart home,” in 2017 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops) , pp. 618–623, March 2017. [18] G. Liang, S. R. Weller, F. Luo, J. Zhao, and Z. Y . Dong, “Distributed blockchain-based data protection framework for modern power systems against cyber attacks,” in IEEE Transactions on Smart Grid (Early Access) , 2018.
{ "id": "1812.10345" }
1803.09028
(Short Paper) Towards More Reliable Bitcoin Timestamps
Bitcoin provides freshness properties by forming a blockchain where each block is associated with its timestamp and the previous block. Due to these properties, the Bitcoin protocol is being used as a decentralized, trusted, and secure timestamping service. Although Bitcoin participants which create new blocks cannot modify their order, they can manipulate timestamps almost undetected. This undermines the Bitcoin protocol as a reliable timestamping service. In particular, a newcomer that synchronizes the entire blockchain has a little guarantee about timestamps of all blocks. In this paper, we present a simple yet powerful mechanism that increases the reliability of Bitcoin timestamps. Our protocol can provide evidence that a block was created within a certain time range. The protocol is efficient, backward compatible, and surprisingly, currently deployed SSL/TLS servers can act as reference time sources. The protocol has many applications and can be used for detecting various attacks against the Bitcoin protocol.
http://arxiv.org/pdf/1803.09028v2
Pawel Szalachowski
cs.CR
cs.CR
(Short Paper) Towards More Reliable Bitcoin Timestamps Pawel Szalachowski SUTD pawel@sutd.edu.sg Abstract —Bitcoin provides freshness properties by forming a blockchain where each block is associated with its timestamp and the previous block. Due to these properties, the Bitcoin protocol is being used as a decentralized, trusted, and secure timestamping service. Although Bitcoin participants which create new blocks cannot modify their order, they can manipulate timestamps almost undetected. This undermines the Bitcoin protocol as a reliable timestamping service. In particular, a newcomer that synchronizes the entire blockchain has a little guarantee about timestamps of all blocks. In this paper, we present a simple yet powerful mechanism that increases the reliability of Bitcoin timestamps. Our protocol can provide evidence that a block was created within a certain time range. The protocol is efficient, backward compatible, and surprisingly, currently deployed SSL/TLS servers can act as reference time sources. The protocol has many applications and can be used for detecting various attacks against the Bitcoin protocol. I. I NTRODUCTION Bitcoin [18] is a cryptocurrency successful beyond all expectations. As a consequence of this success and properties of Bitcoin, developers and researchers try to reuse the Bit- coin infrastructure to build new or enhance existing systems. One class of such systems is a decentralized timestamping service. For instance, the OpenTimestamps project [1] aims to standardize blockchain timestamping, where a timestamp authority, known from the previous proposals [2], is replaced by a blockchain. Other, more focused applications that rely on the blockchain timestamps include trusted record-keeping service [10], [15], decentralized audit systems [16], [20], document signing infrastructures [14], timestamped commit- ments [5], or secure off-line payment systems [7]. Reli- able timestamps are also vital for preventing various attacks against the Bitcoin protocol. For instance, Heilman proposed a scheme [13] which with unforgeable timestamps can protect from the selfish mining strategy [9]. By design, the Bitcoin protocol preserves the order of events (i.e., weak freshness ), however, accurate time of events (i.e., strong freshness ) is questionable, despite the fact that each block has a timestamp associated. In practice, Bitcoin timestamps can differ in hours from the time maintained by Bitcoin participants ( nodes ), and in theory can differ radically from the actual time (i.e., time outside the Bitcoin network). Effectively, the accurate time cannot be determined from the protocol, which limits capabilities of the Bitcoin protocol as This work was supported in part by the National Research Foundation (NRF), Prime Minister’s Office, Singapore, under its National Cybersecurity R&D Programme (Award No. NRF2016NCR-NCR002-028) and administered by the National Cybersecurity R&D Directorate.a timestamping service, and which impacts the security of the protocol [11]. In this work, we propose a new mechanism for improving the security of Bitcoin timestamps. In our protocol, external timestamp authorities can be used to assert a block creation time, instead of solely trusting timestamps put by block creators. Our scheme is efficient, simple, practical, does not require any additional infrastructure nor any changes to the Bitcoin protocol, thus can be deployed today. Interestingly, currently existing SSL/TLS servers can act as time authorities. II. B ACKGROUND AND PRELIMINARIES A. Freshness in the Bitcoin Blockchain Bitcoin is an open cryptocurrency and transaction system. Each transaction is announced to the Bitcoin network, where nodes called miners collect and validate all non-included transactions and try to create ( mine ) ablock of transactions by solving a cryptographic proof-of-work puzzle, whose difficulty is set such that a new block is mined about every 10 minutes. Each block has a header that contains the block’s metadata. Transactions are represented as leaves of a Merkle tree [17] whose root is included in the header ; hence, with the header, it is possible to prove that a transaction is part of the given block. Every block header contains also a field with a hash of the previous header to link the blocks together. Due to this link, the blocks create an append-only blockchain . Additionally, headers include Unix timestamps that describe when the corresponding block was mined. These timestamps are used as an input for proof-of-work puzzles and are designed to impede an adversary from manipulating the blockchain. Freshness properties offered by the Bitcoin protocol are unclear. Since the blockchain is append-only, weak freshness is provided by design (i.e., blocks are ordered in the chronolog- ical order). Timestamps associated with blocks are validated in a special way. Namely, a node considers a new block’s timestamp Tas valid if: 1)T > the median timestamp of previous eleven blocks, and 2)T2h < network time (defined as the median of the timestamps returned by all nodes connected to the node). Each node maintains its local Bitcoin timer, which is defined as the node’s local system time plus the difference between this time and the network time. However, the timer cannot be adjusted more than 70 minutes from the local system time. As it is not required that all nodes have accurate time, timestamps encoded in headers may not be even in order,arXiv:1803.09028v2 [cs.CR] 18 May 2018 and their accuracy is estimated to hours. Manipulation of the Bitcoin network time is possible and can result in severe attacks [4]. Furthermore, as Bitcoin timestamps depend only on time of nodes, timestamps can differ radically from the actual time, outside the network. Another issue is that nodes synchronizing the entire blockchain have hardly any guarantees about the previous blocks’ creation times. Given that, it is clear that the Bitcoin protocol does not provide strong freshness, what limits the Bitcoin blockchain applicability for time- sensitive applications (like accurate timestamping). B. Timestamping Service The time-stamp protocol (TSP) [2] is a standard timestamp- ing protocol built on top of the X.509 public key infrastructure (PKI). In the protocol, a client that wishes to timestamp data contacts a timestamp authority (TSA) with the data’s hash. The TSA signs the hash along with the current timestamp and returns the signed message to the client. The message, with the TSA’s certificate and the data, allows everyone to verify that the data was timestamped at the given time. For simple description, we present our protocol as com- pliant with TSP. However, with minor or no changes, our scheme can be combined with other services, like currently existing PKIs or secure time synchronization services (see subsection V-B). C. System Model Our protocol introduces the two following parties: Timestamping authority (TSA) runs a service that timestamps documents according to the TSP protocol presented in subsection II-B. Verifier is an entity that wants to verify when a new (upcoming) blockchain’s block was mined. A verifier can interact with the Bitcoin network by reading blocks and sending transactions and can interact with a (chosen) trusted TSA. We assume that the used cryptographic primitives are secure. We assume an adversary able to mine Bitcoin blocks, and her goal is to introduce a new block with an incorrect timestamp (i.e., deviating from the TSA’s time) undetected. D. Notation Throughout the paper we use the following notation: fmsggAdenotes the message msg signed by A, h(:) is a cryptographic hash function, k is the string concatenation, rR S denotes that ris an element randomly selected from the set S, f0;1gnis a set of all n-bit long strings, Bi denotes the ith blockchain’s block, Hi denotes the ith block header, Tx is a Unix timestamp expressed in seconds. III. D ESCRIPTION OF THE PROTOCOL A. High-Level Overview The main idea behind our scheme is to combine an external TSA with the blockchain, such that a verifier can create acryptographically-provable series of events that asserts when a given block was mined (i.e., when all transactions associated with the block were published). A simplified description of our protocol is presented in Figure 1. VerifierTSAprev: h(Hi-1) time: 1508135779 ... trans: h( )prev: h(Hi-2) time: 1508104751 ... trans: ...prev: h(Hi) time: 1508139750 ... trans: ...BlockchainBi-1BiBi+1h( )h( ) (1a) timestamp Hi-1(1b) timestamped Hi-1(2) publish the timestamped Hi-1(3a) timestamp Hi(3b) timestamped Hi Fig. 1. A high-level overview of the protocol. The protocol starts, when a verifier sees a new block Bi1. The verifier extracts the block header Hi1and contacts a TSA to timestamp Hi1. Then, the TSA returns a timestamped and signed Hi1to the verifier. This message states that the block Bi1is older than the message itself (i.e., than its timestamp). Next, the verifier publishes the timestamped and signed message in the blockchain. The corresponding transaction is published in the subsequent block Bi. As the transaction is included in the block, it implies that the block is newer than the transaction (i.e., the block is newer than the timestamp associated with the transaction). Finally, the verifier extracts the header Hiof this block and timestamps it with the TSA. Now, the verifier has evidence that the block Biwas created between the timestamped messages (i.e., between their timestamps). B. Details As presented above the verifier interacts with the TSA and the Bitcoin network. Everyone can act as a verifier, and TSAs can be chosen arbitrarily by verifiers. The protocol is initiated independently by a verifier by executing the following: 1) On receiving the (i1)th block Bi1with the block header Hi1, the verifier: a) selects a random value R0R f0;1gn, b) prepares data D0=h(R0kHi1)to be timestamped. 2) The verifier contacts a TSA to timestamp D0. 3) The TSA returns a timestamped and signed message fD0; T0gTSA. 4) On receiving this message the verifier: a) computes C=h(fD0; T0gTSA)as a commitment, b) encodes Cwithin a Bitcoin transaction, and c) propagates the transaction across the network, such that it is included in the subsequent block Bi. 5) On receiving the ith block Bi, with the block header Hi, the verifier: a) selects a random value R1R f0;1gn, b) prepares data D1=h(R1kHi)to be timestamped, c) creates PCas a Merkle tree inclusion proof of the transaction containing C. 6) The verifier contacts the TSA to timestamp D1. 7) The TSA returns a signed message fD1; T1gTSA. 8) Now, the verifier has the following information R0; Hi1;fD0; T0gTSA; R1; Hi;fD1; T1gTSA; PC;(1) which constitutes a proof that the block Biwas mined between T0andT1. 9) To verify whether the block has a correct timestamp, the verifier checks if the following is satisfied: T0< H i’s timestamp < T 1: The verifier can terminate the protocol at the step 9. However, to verify the creation time of the subsequent block, he can compute a new commitment C=h(fD1; T1gTSA)and conduct the protocol from the step 4b onwards. For the sake of a simple presentation, we include D0and D1in the proof (see Equation 1), but they are redundant as can be computed from R0; Hi1andR1; Hi, correspondingly. We also describe the protocol with a single TSA. However, it is easy to extend the scheme to multiple TSAs. In such a case, the verifier timestamps the D0andD1messages with multiple TSAs, and computes the commitment Cas a hash over the TSAs messages corresponding to D0. IV. A NALYSIS First, we claim that the verifier executing the protocol obtains a provable series of events that given block was mined in a given time range. Hence, an adversary cannot introduce a block with an invalid timestamp undetected. (Al- though we present our protocol in the adversarial setting, invalid timestamps can be introduced by benign miners with desynchronized clocks.) The timeline of the protocol events is presented in Figure 2. When the verifier notices the block Bi1he creates D0by hashing a random value R0and the block’s header Hi1.D0is timestamped by the TSA, and the commitment Cis computed as a hash of this timestamped message. With Cthe verifier can check that it was indeed created after the Bi1as the header ofBi1(i.e.,Hi1) was used to create it. Therefore, the block Bi1is older than the timestamp T0. Then, the commitment is propagated among the network and finally included in the newly created block Bi. The verifier, with the header Hiof the new block can prove that Cis part of this block (using the Merkle inclusion proof PC), thus it has to be older than the block. Next, the verifier from a random value R1and the timeblock Bi1 is createdmining periodblock Bi is created timestamp D0 and publish Ctimestamp D1 Fig. 2. Timeline of the events in the protocol.block’s header Hicreates D1, which is timestamped by the TSA. The message from the TSA ( fD1; T1gTSA) states that D1was created before T1, and because D1is derived from Hi, it implies that the block Biwas created before T1. Finally, the verifier equipped with this information (see Equation 1) can check whether the block’s timestamp is correct (i.e., 2 [T0; T1]). Our protocol provides much better freshness properties than the Bitcoin protocol alone. As depicted in Figure 2, if the verifier creates and publishes Cimmediately after the block Bi1is observed and timestamps D1after the block Biis observed, then the accuracy of timestamping is approximately equal the block creation time (currently, estimated as 10 minutes). The verifier can increase the accuracy by creating and publishing multiple commitments in a sequence, such that the difference between timestamped D0andD1decreases. The protocol is described in the scenario where the com- mitment Cappears in transactions corresponding to the block Bi. Although the propagation in the Bitcoin network is fast when compared to the average block creation time [6], it may happen that Cis included in a later block. In such a case, our protocol still provides guarantees about the blocks in between. For example, if the commitment Cappears not in Bibut in the block Bi+1, then the proof states that blocks BiandBi+1 were mined between T0andT1. The verifier generates a random value R0that together with Hi1is timestamped by the TSA as fD0; T0gTSA, which in turn is hashed into the commitment C. The commitment is published in the blockchain, however, R0is not revealed. This construction protects the protocol from censorship by an adversary that wishes to manipulate the timestamp. Without this random value, the adversary could just keep timestamping hash of Hi1every second, learn all possible commitments for the block header, and censor the verifier’s transaction. With a large random value (e.g., chosen from f0;1g128), generating all possible commitments is infeasible, hence the adversary cannot distinguish between a regular transaction and the verifier’s transaction. Although we do not consider malicious TSAs, the protocol provides means to keep them accountable. If the TSA returns the signed messages such that T0> T 1, then the verifier has an evidence that the TSA misbehaved. More specifically, the verifier can show that D0is older than D1(by showing that D1was created using Hi, which contains Ccreated from D0 which was timestamped at T0), which proves that the TSA contradicted itself. Moreover, the TSA does not know secret random values R0,R1, hence cannot learn what is being timestamped. (However, colluding TSA and adversary could censor commitments.) V. P RACTICAL CONSIDERATIONS A. Commitments Encoding In our protocol, a verifier publishes commitments in the blockchain (see the step 4c of the protocol). This message is computed as a hash thus is short and can be encoded on the blockchain in many ways. One way is to publish a transaction with the commitment encoded within the 20-byte long receiver of transaction (pay-to-pubkey-hash ) field. An alternative could be to encode messages into other fields or to use the OP_RETURN instruction [19]. Storing non-transaction data in the Bitcoin blockchain is regarded by many members of the Bitcoin community as a spam or even a vandalism. We agree that using the Bitcoin blockchain as a highly distributed database negatively influ- ences its performance. However, we believe that our protocol will be seen as a positive contribution to the ecosystem, as firstly, it aims to improve the security of the protocol, and secondly, the overhead introduced is marginal. Moreover, this overhead can be minimized by publishing commitments through a system like OpenTimestamp, which aggregates and publishes data in the blockchain efficiently. B. Timestamping Service We describe our protocol to be compliant with the times- tamping service as defined in the RFC 3161 [2] (see sub- section II-B). There are many providers of this service, both commercial and free. However, our protocol, with minimal or no changes, can be combined with other currently existing infrastructures. Surprisingly, today’s SSL/TLS servers can act in our proto- col as TSAs. The SSL/TLS protocol supports Diffie-Hellman (DH) as a key-exchange algorithm. In such a case, a server sends to a client the ServerKeyExchange message, that among other parameters, signs the DH parameters, and client’s and server’s random values. These random values start with a timestamp field, hence it is possible to timestamp a document by the server’s key by setting the client’s random value to a document’s hash [8]. As, SSL/TLS is becoming ubiquitous and the DH exchange is widely supported [3], [21], web servers of reputable organizations (e.g., mozilla.org ) or high-profile websites (like google.com orlive.com ) can be used as TSAs. Another infrastructure that with minimal changes can im- plement the TSA functionality is secure time synchronization infrastructure. For instance, Roughtime [12], a recent proposal by Google, provides signed timestamps. To prevent replay at- tacks, a client inputs its nonce which together with a timestamp is signed by the server. To implement the TSA functionality, a client just inputs Di1as a nonce, like in the protocol. One small change is caused by the design of Roughtime where, for efficiency reasons, servers sign responses in batches. Hence, values returned by servers are encoded differently, however still are verifiable and can be used analogically as the TSA’s output from the protocol (see the steps 3 and 7). VI. C ONCLUSIONS In this paper, we presented a method of strengthening the reliability of Bitcoin timestamps. Our protocol is efficient, backward compatible, and can provide much stronger freshness guarantees than the Bitcoin protocol alone. Our method can be combined with currently existing and widespread security infrastructures like the SSL/TLS PKI. Although we presented our scheme in the Bitcoin context, it is also applicable to other blockchain-based platforms. The protocol can be deployed in many applications. Ver- ifiers can run the protocol to detect misbehaving nodes. Theprotocol can be part of a detection system against time-related attacks or can be combined with a system like OpenTimes- tamps to enhance it. Proofs can be also publicly published, so nodes that in the future download and validate the entire blockchain will have much better assurance about the event timeline. REFERENCES [1] Open timestamps. https://opentimestamps.org/, 2018. [2] C. Adams, P. Cain, D. Pinkas, and R. Zuccherato. Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP). RFC 3161 (Proposed Standard), 2001. Updated by RFC 5816. [3] D. Adrian, K. Bhargavan, Z. Durumeric, P. Gaudry, M. Green, J. A. Halderman, N. Heninger, D. Springall, E. Thom ´e, L. Valenta, et al. Imperfect forward secrecy: How diffie-hellman fails in practice. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security . ACM, 2015. [4] A. Boverman. Timejacking & bitcoin. https://culubas.blogspot.sg/2011/ 05/timejacking-bitcoin 802.html, 2011. [5] J. Clark and A. Essex. Commitcoin: Carbon dating commitments with bitcoin. Financial Cryptography and Data Security , 7397, 2012. [6] C. Decker and R. Wattenhofer. Information propagation in the bitcoin network. In Peer-to-Peer Computing (P2P), 2013 IEEE Thirteenth International Conference on . IEEE, 2013. [7] A. Dmitrienko, D. Noack, and M. Yung. Secure wallet-assisted offline bitcoin payments with double-spender revocation. In Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security . ACM, 2017. [8] B. Edstr ¨om. Fun with the tls handshake. http://blog.bjrn.se/2012/07/ fun-with-tls-handshake.html, 2012. [9] I. Eyal and E. G. Sirer. Majority is not enough: Bitcoin mining is vulnerable. In International conference on financial cryptography and data security , pages 436–454. Springer, 2014. [10] Y . Gao and H. Nobuhara. A decentralized trusted timestamping based on blockchains. IEEJ Journal of Industry Applications , 2017. [11] A. Gervais, H. Ritzdorf, G. O. Karame, and S. Capkun. Tampering with the delivery of blocks and transactions in bitcoin. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security , pages 692–705. ACM, 2015. [12] Google. Roughtime. https://roughtime.googlesource.com/, 2016. [13] E. Heilman. One weird trick to stop selfish miners: Fresh bitcoins, a solution for the honest miner. In International Conference on Financial Cryptography and Data Security . Springer, 2014. [14] C. J ¨amthagen and M. Hell. Blockchain-based publishing layer for the keyless signing infrastructure. In Ubiquitous Intelligence & Computing, Advanced and Trusted Computing, Scalable Computing and Communi- cations, Cloud and Big Data Computing, Internet of People, and Smart World Congress (UIC/ATC/ScalCom/CBDCom/IoP/SmartWorld), 2016 Intl IEEE Conferences . IEEE, 2016. [15] V . L. Lemieux and V . L. Lemieux. Trusting records: is blockchain technology the answer? Records Management Journal , 2016. [16] Z. Li. Will blockchain change the audit? 2017. [17] R. C. Merkle. A digital signature based on a conventional encryption function. In Proceedings of Advances in Cryptology , 1988. [18] S. Nakamoto. Bitcoin: A peer-to-peer electronic cash system, 2008. [19] K. Shirriff. Hidden surprises in the bitcoin blockchain and how they are stored: Nelson mandela, wikileaks, photos, and python software, 2014. [20] M. Spoke. How blockchain tech will change auditing for good, 2015. [21] P. Szalachowski. Blockchain-based tls notary service. arXiv preprint arXiv:1804.00875 , 2018.
{ "id": "1803.09028" }
1801.03528
Applications of Blockchain Technology beyond Cryptocurrency
Blockchain (BC), the technology behind the Bitcoin crypto-currency system, is considered to be both alluring and critical for ensuring enhanced security and (in some implementations, non-traceable) privacy for diverse applications in many other domains including in the Internet of Things (IoT) eco-system. Intensive research is currently being conducted in both academia and industry applying the Blockchain technology in multifarious applications. Proof-of-Work (PoW), a cryptographic puzzle, plays a vital role in ensuring BC security by maintaining a digital ledger of transactions, which is considered to be incorruptible. Furthermore, BC uses a changeable Public Key (PK) to record the users' identity, which provides an extra layer of privacy. Not only in cryptocurrency has the successful adoption of BC been implemented but also in multifaceted non-monetary systems such as in: distributed storage systems, proof-of-location, healthcare, decentralized voting and so forth. Recent research articles and projects/applications were surveyed to assess the implementation of BC for enhanced security, to identify associated challenges and to propose solutions for BC enabled enhanced security systems.
http://arxiv.org/pdf/1801.03528v1
Mahdi H. Miraz, Maaruf Ali
cs.CR
cs.CR
Annals of Emerging Technologies in Computing (AETiC) Vol. 2, No. 1, 2018 Article Applications of Blockchain Technology beyond Cryptocurrency Mahdi H. Miraz1, *, Maaruf Ali2 1School of Computer Studies, AMA International University BAHRAIN (AMAIUB), Bahrain m.miraz@amaiu .edu.bh 2Department of Science and Technology, University of Suffolk, Ipswich, Suffolk, UK m.ali2@uos.ac.uk *Correspondence: m.miraz@amaiu.edu.bh Received: 25th November 2017 ; Accepted: 15th December 2017; Published: 1st January 2018 Abstract: Blockchain (BC), the technology behind the Bitcoin crypto -currency system, is considered to be both alluring and critical for ensuring enhanced security and (in some implementations, non -traceable ) privacy for diverse applications in many other domains - including in the Internet of Things (IoT) ec o-system. Intensive research is currently being conducted in both academia and industry applying the Blockchain technology in multifarious applications . Proof -of-Work (PoW), a cryptographic puzzle, plays a vital r ôle in ensuring BC security by maintaining a digital ledger of transactions , which is considered to be incorruptible. Furthermore, BC uses a changeable Public Key (PK) to record the users’ identity , which provides an extra layer of privacy. Not only in cryptocurrency has the successful adoption of BC been implemented but also in multifaceted non -monetary systems such as in: distributed storage systems, proof -of-location, healthcare , decentralized voting and so forth. Recent research articles and projects/applications were surveyed to assess the implementation of BC for enhanced s ecurity, to identify associated challenges and to propose solutions for BC enabled enhanced security systems . Keywords: Blockchain (BC); Bitcoin ; Crypto -currency; IoT; Proof of Work (PoW); Distributed Digital Ledger 1. Introduction The goal of this research paper is to summarise the literature on implementation of the Blockchain and similar digital ledger techniques in various other domains beyond its application to crypto -currency and to draw appropriate conclusions. Bl ockchain being relatively a new technology, a representative sample of research is presented, spanning over the last ten years, starting from the early work in this field. Different types of usage of Blockchain and other digital ledger techniques, their ch allenges, applications, security and privacy issues were investigated. Identifying the most propitious direction for future use of Blockchain beyond crypto -currency is the main focus of the review study. Blockchain (BC), the technology behind Bitcoin cryp to-currency system, is considered to be essential for forming the backbone for ensuring enhanced security and privacy for various applications in many other domains including the Internet of Things (IoT) eco -system. International research is currently bein g conducted in both academia and industry applying Blockchain in varied domains. The Proof -of-Work (PoW) mathematical challenge ensur es BC security by maintaining a digital ledger of transactions that is considered to be unalterable . Furthermore, BC uses a changeable Mahdi H. Miraz and Maaruf Ali , "Applications of Blockchain Tech nology beyond Cryptocurrency ”, Annals of Emerging Technologies in Computing (AETiC), Print ISSN: 2516 -0281, Online ISSN: 2516 -029X, pp. 1 -6, Vol. 2, No. 1, 1st January 2018, Published by International Association of Educators and Researchers (IAER) , Available: http://aetic.theiaer.org/archive/v2n1/p1.pdf . AETiC 2018 , Vol. 2, No. 1 2 Public Key (PK) to record the users’ identity that provides an extra layer of privacy. The successful adoption of BC has been implemented in diverse non- monetary systems such as in online voting, decentralized messaging, distributed cloud stora ge systems, proof -of-location, healthcare and so forth. Recent research articles and projects/applications were surveyed to as certain the implementation of BC for enhanced s ecurity and to identify its associated challenges and thence to propose solutions f or BC enabled enhanced security systems. The knowledge domain of the research is in the realm of the digital ledger, specifically, in Blockchain and crypto -currency. 2. Technology Fundamentals of Blockchain This section briefly describes the fundamentals of the technology behind the Blockchain. A Blockchain comprises of two different components, as follows: 1. Transaction: A transaction, in a Blockchain, represent s the action triggered by the participant. 2. Block: A block, in a Blockchain, is a collection of da ta recording the transaction and other associated details such as the correct sequence, timestamp of creation, etc. The Blockchain can either be public or private , depending on the scope of its use. A public Blockchain enables all the users with read and w rite permissions such as in Bitcoin , access to it . However, there are some public Blockchain s that limit the access to only either to read or to write. On the contrary, a private Blockchain limit s the access to selected trusted participants only, with the aim to keep the users’ detail s concealed. This is particularly pertinent among st government al institutions and allied sister concerns or their subsidies thereof . One of the major benefits of the Blockchain is that it and its implementation technology is public. Each participating entities possesses an updated complete record of the transactions and the associated blocks. Thus the data remains unaltered, as any changes will be publicly verifiable. However, the data in the blocks are encrypted by a private ke y and hence cannot be interpreted by everyone. Another major advantage of the Blockchain technology is that it is decentralized. It is decentralized in the sense that: • There is no single device that stores the data (transactions and associated blocks), ra ther they are distributed among the participants throughout the network supporting the Blockchain. • The transactions are not subject to approval of any single authority or have to abide by a set of specific rules, thus involving substantial trust as to reac h a consensus. • The overall security of a Blockchain eco -system is another advantage. The system only allows new blocks to be appended. Since the previous blocks are public and distributed, they cannot be altered or revised. For a new transaction to be added to the existing chain, it has to be validated by all the participants of the relevant Blockchain eco -system. For such a validation and verification process, the participants must apply a specific algorithm. The relevant Blockchain eco -system defines what is perceived as “valid”, which may vary from one eco -system to another. A number of transactions, thus approved by the validation and verification process, are bundled together in a block. The newly prepared block is then c ommunicated to all other participating nodes to be appended to the existing chain of blocks. Each succeeding block comprises a hash, a unique digital fingerprint, of the preceding one. Figure 1 demonstrates how Blockchain transactions takes place, using a step -by-step example. Bob is going to transfer some money to Alice. Once the monetary transaction is initiated and hence triggered by Bob, it is represented as a “transaction” and broadcast to all the involved parties in the networks. The transaction now has to get “approv al” as being indeed “valid” by the Blockchain eco-system. Transaction(s) once approved as valid along with the hash of the succeeding block are then fed into a new “block” and communicated to all the participating nodes to be subsequently appended to the existing chain of blocks in the B lockchain digital ledger . www. aetic.theiaer .org AETiC 2018 , Vol. 2, No. 1 3 Figure 1 . Operation of the Blockchain. 3. Use of Blockchain beyond Cryptocurrency Although the Internet is a great tool to aid every sphere of the modern digital life, it is still highly flawed in terms of the lack of security and privacy, especially when it comes to FinTech and E-commerce. Blockchain, the technology behind cryto -currency, brought forth a new revolution by providing a mechanism for Peer -to-Peer (P2P) transacti ons without the need for any intermediary body such as the existing commercial banks [1]. BC validates all the transactions and preserves a permanent record of them while making sure that any identif ication related information of the users are kept incognito. Thus all the personal information of the users are sequestered while substantiating all the transactions. This is achieved by reconciling mass collaboration by cumulating all the transactions in a computer code based digital ledger. Thus, by applying Blockchain or similar crypto -currency techniques, the users neither need to trust each other nor do they need an intermediator; rather the trust is manifested within the decentralized network system itse lf. Blockchain thus appears to be the ideal “Trust Machine” [2] paradigm . In fact, Bitcoin is just an exemplary use of the Blockchain. Blockchain is considered to be a novel revolution in the domain of computing enabling limitless applications such as storing and verifying legal documents including deeds and various certificates, healthcare data, IoT, Cloud and so forth. Tapscott [3] rightly indica ted Blockchain to be the “World Wide Ledger” , enabling many new applications beyond verifying transactions such as in: smart deeds, decentralized and/or autonomous organizations/ government services etc. In the cloud [4,5] environment, the history of creation of any cloud data object and its subsequent operations performed thereupon are recorded by the data structure mechanism of ‘Data Provenance ’, which is a type of cloud metadata. Thus this is very important to provide the utmost security to the data provenance for ensuring its data privacy, forensics and accountability. Liang et al. [6] puts forward a Blockchain based trusted cloud data provenance architecture, ‘ ProvChain ’, which is fully decentralized. Such adoption of the Blockchain in a cloud environment can provide strong protection against records being altered thus enabling an enha nced transparency as well as Triggering Transaction•Bob is going to transfer some money to Alice; •Once the monetary transaction is initiated and hence triggered by Bob, it is represented as a “transaction” and broadcast to all the involved parties in the network. Validation & Verification•The transaction now has to get “approval” as being indeed “valid” by the Blockchain eco -system. •For such a validation and verification process, the participants must apply a specific algorithm; •The relevant Blockchain eco -system defines what is perceived as “valid”, which may vary from one eco-system to another. Creating a New Block•Transaction(s) once approved as valid along with the hash of the succeeding block are then fed into a new “block”. Adding Block to the Chain•The new block is then communicated to all the participating nodes to be subsequently appended to the existing chain of blocks in the blockchain digital ledger. www. aetic.theiaer .org AETiC 2018 , Vol. 2, No. 1 4 additional data accountability. This also increases the availability , trustworthiness, privacy and ultimately the value of the provenance data itself . In an IoT ecosystem [7,8], most of the communication is in the form of Machine -to-Machine (M2M) interactions . Thus establishing trust among the participating machines is a big challenge that IoT technology still has not been met extensively . However, Blockchain may act as a catalyst in this regard by enabling enhanced scalability, security, reliability and privacy [9]. This can be achieved by deploying Blockchain technology to track billion s of devices connected to the IoT eco -systems and used to enable and/or coordinate transaction processing. Applying Blockchain in the IoT ecosystem will also increase reliability by axing the Single Point of Failure (SPF). The cryptographic algorithms used for encryption of the block data as well as the hashing techniques may provide better security. However, this shall demand more processing power which IoT devices currently suffer from. Thus further research is required to overcome this current limitation . Underwood [10] considers the application of Blockchain technology to completely overhaul the digital economy. Ensuring and maintaining trust is both the primary and initial concern of the application of the B lockchain. BC can also be used to gather chronological and sequence information of transactions, as it may be seen as an enormous networked time- stamp ing system. For example, NASDAQ is using its ‘Linq B lockchain’ to record its private securities tr ansactions. Meanwhile the Depository Trust & Clearing Corporation (DTCC, USA) is working with Axoni in implementing financial settlement services such as post -trade matters and swaps. Regulators are also interested for BC’s ability to offer secure, private, traceable real -time monitoring of transactions. 4. The Future of Blockchain According to the Gartner Hype Cycle for Emerging Technologies 2017, shown in Figure 2, below, Blockchain still remains in the region of “Peak of Inflated Expectation” with forecast to reach plateau in “five to ten years” . However, this technology is shown going downhill into the region of the “Trough of Disillusionment” . Because of the wide adoption of the Blockchain in a wide range of applications beyond cryptocurrency, the authors of this paper are forecasting a shift in classification from “five to ten years” to “two to five years” to reach maturation . Blockchain possesses a great potential in empower ing the citizens of the developing countries if widely adopted by e -gover nance applications for identity management, asset ownership transfer of precious commodities such as gold, silver and diamond , healthcare and other commercial uses as well as in financial inclusion. However, this will strongly depend on national political decisions. www. aetic.theiaer .org AETiC 2018 , Vol. 2, No. 1 5 Figure 2. Gartner Hype Cycle, 2017 [11] 6. Concluding Discussions The application of the Blockchain concept and technology has grown beyond its use for Bitcoin generation and transactions. The properties of its security, privacy, traceability, inherent data provenance and time- stamping has seen its adoption beyond its initial application areas. The Blockchain itself and its variants are now used to secure any type of transactions, whether it be human- to-human communications or machine -to-machine. Its adoption appears to be secure especially with the global emergence of the Internet -of-Things. Its decentralized application across the already established global Internet is also very appealing in terms of ensuring data redundancy and hence survivability. The Blockchain has been especially identified to be suitable in developing nations where ensuring trust is of a major concern. Thus the invention of the Blockchain can be seen to be a vital and much needed additional component of the Internet that was lacking in security and trust before. BC technology still has not reached its maturity with a prediction of five years as novel applications continue to be implemented glo bally. www. aetic.theiaer .org AETiC 2018 , Vol. 2, No. 1 6 References [1] Nir Kshetri, "Can Blockchain Strengthen the Internet of Things?," IT Professional, vol. 19, no. 4, pp. 68 - 72, May 2017, Available: http://ieeexplore.ieee.org/document/801230 2/ [2] Mahdi H. Miraz, "Blockchain: Technology Fundamentals of the Trust Machine," Ma chine Lawyering, Chinese University of Hong Kong, 23rd December 2017, Available: http://dx.doi.org//10.13140/R G.2.2.22541.64480/2 [3] Don Tapscott and Alex Tapscott, Blockchain Revolution: How the Technology Behind Bitcoin Is Changing Money, Business, and the World, 1st ed. New York, USA: Penguin Publishing Group, 2016. [4] Maaruf Ali and Mahdi H Miraz, "Cloud Computing Applications," in Proceedings of the International Conference on Cloud Computing and eGovernance - ICCCEG 2013, Internet City, Dubai, Unite d Arab Emirates, 2013, pp. 1-8, Available: http://www.edlib.asdf.res.in/2013/iccceg/paper001.pdf [5] Maaruf Ali and Mahdi H. Miraz, "Recent Advances in Cloud Computing Applications and Services," International Journal on Cloud Computing (IJCC), vol. 1, no. 1, pp. 1 -12, February 2014, Available: http://asdfjournals.com/ijcc/ijcc -issues/ijcc -v1i1y2014/ijcc -001html -v1i1y2014/ [6] Xueping Liang et al., "ProvChain: A Blockchain-based Data Provenance Architecture in Cloud Environment with Enhanced Privacy and Availability," in Proceedings of the 17th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGrid '17), Madrid, Spain, May 14 - 17, 2017, pp. 468 -477, Available: https://dl.acm.org/citation.cfm?id=3101176&CFID=994896989&CFTOKEN=44228545 [7] Mahdi H. Miraz, Maaruf Ali, Peter Excell, and Picking Rich, "A Review on Internet of Things (IoT), Internet of Everything (I oE) and Internet of Nano Things (IoNT)," in the Proceedings of the Fifth International IEEE Conference on Internet Technologies and Applications (ITA 15), W rexham, UK, 2015, pp. 219 – 224, Available: http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=7317398 [8] Mahdi H. Miraz, Maaruf Ali, Peter S. Excell, and Richard Picking, "Internet of Nano -things, Things and Everything: Future Growt h Trends," (to be published) Future Internet, 2018 . [9] Mahdi H. Miraz and Maaruf Ali, "Blockchain Enabled Enhanced IoT Ecosystem Security," (accepted) in proceedings of the First International Conference on Emerging Technologies in Computing 2018 (iCETiC '18), London, UK, 23 August 2018. [10] Sarah Underwood, "Blockchain Beyond Bitcoin," Communications of the ACM, vol. 59, no. 11, pp. 15-17, November 2016, Available: https://doi.org/10.1145/2994581 [11] Gartner, "Top Trends in the Gartner Hype Cycle for Emerging Technologies, 2017," Gartner, Inc ., Gartner Hype Cycle 2017, August 2017, Available: http://www.gartner.com/smarterwithgar tner/top -trends -in-the-gartner -hype -cycle -for-emerging -technologies -2017/ © 2018 by the author (s). Published by Annals of Emerging Technologies in Computing (AETiC), under the terms and conditions of the Creative Commons Attribution ( CC BY ) license which can be accessed at http://creativecommons.org/licenses/by/4.0/ . www. aetic.theiaer .org
{ "id": "1801.03528" }
1802.01315
Gosig: Scalable Byzantine Consensus on Adversarial Wide Area Network for Blockchains
Existing Byzantine fault tolerance (BFT) protocols face significant challenges in the consortium blockchain scenario. On the one hand, we can make little assumptions about the reliability and security of the underlying Internet. On the other hand, the applications on consortium blockchains demand a system as scalable as the Bit-coin but providing much higher performance, as well as provable safety. We present a new BFT protocol, Gosig, that combines crypto-based secret leader selection and multi-round voting in the protocol layer with implementation layer optimizations such as gossip-based message propagation. In particular, Gosig guarantees safety even in a network fully controlled by adversaries, while providing provable liveness with easy-to-achieve network connectivity assumption. On a wide area testbed consisting of 140 Amazon EC2 servers spanning 14 cities on five continents, we show that Gosig can achieve over 4,000 transactions per second with less than 1 minute transaction confirmation time.
http://arxiv.org/pdf/1802.01315v1
Peilun Li, Guosai Wang, Xiaoqi Chen, Wei Xu
cs.DC
cs.DC
Gosig: Scalable Byzantine Consensus on Adversarial Wide Area Network for Blockchains Peilun Li Tsinghua UniversityGuosai Wang Tsinghua UniversityXiaoqi Chen Princeton University Wei Xu Tsinghua University Abstract Existing Byzantine fault tolerance (BFT) protocols face significant challenges in the consortium blockchain scenario. On the one hand, we can make little assump- tions about the reliability and security of the underlying Internet. On the other hand, the applications on consor- tium blockchains demand a system as scalable as the Bit- coin but providing much higher performance, as well as provable safety. We present a new BFT protocol, Gosig, that combines crypto-based secret leader selection and multi-round voting in the protocol layer with implemen- tation layer optimizations such as gossip-based message propagation. In particular, Gosig guarantees safety even in a network fully controlled by adversaries, while pro- viding provable liveness with easy-to-achieve network connectivity assumption. On a wide area testbed con- sisting of 140 Amazon EC2 servers spanning 14 cities on five continents, we show that Gosig can achieve over 4,000 transactions per second with less than 1 minute transaction confirmation time. 1 Introduction The rise of cryptocurrencies, such as Bitcoin [43], in- creases the awareness and adoption of the underly- ingblockchain technology. Blockchain offers a dis- tributed ledger that serializes and records the transac- tions. Blockchain provides attractive properties such as full decentralization, offline-verifiability, and most im- portantly, scalable Byzantine fault tolerance on the In- ternet. Thus, Blockchain has become popular beyond cryptocurrencies, expanding into different areas such as payment services, logistics, healthcare, and Internet-of- Things (IoT) [8, 54, 48]. While Bitcoin provides a permissionless protocol, where everyone can join, we focus on consortium blockchains (aka permissioned blockchains), where a participant needs offline authentication to join. It is use- ful in many commercial applications [25]. While we nolonger have to worry about Sybil attacks [21], there are still some other significant challenges. The blockchain is replicated to each participant, and the key problem is how to reach consensus on these repli- cas. Comparing to traditional distributed transaction sys- tems, the three biggest challenges of a blockchain are: 1) Players are from different organizations without mutual trust. Failures, even Byzantine failures, are com- mon. Thus, we cannot rely on a small quorum (e.g., Chubby [9] or ZooKeeper [27]) for consensus. Instead, we need Byzantine consensus and allow all players to participate, i.e., supporting a consensus group with thou- sands of servers. 2) The system runs on an open Internet. The network can drop/delay communication arbitrarily. Even worse, as the addresses of the participants are known to all, an adversary can easily launch attacks targeting any chosen participant at any time, using techniques like distributed denial-of-service (DDoS) [26, 49]. The adversary can strategically choose which players to attack, and victims will remain unavailable until the adversary adaptively choose to attack others. We call these attacks adaptive attacks , which strongly threatens the special nodes in a protocol, such as the leaders. 3) Different from Bitcoin that allows temporary incon- sistency (i.e., a fork), people usually expect a permis- sioned chain to provide more traditional transaction se- mantics, i.e., a committed transaction is durable. Also, applications on a permissioned chain [1] require much higher throughput and lower latency than Bitcoin. While there are many Byzantine fault-tolerant (BFT) protocols, most of them do not sufficiently address these three challenges. For example, PBFT [13] and its suc- cessors [33, 38] and even some Bitcoin variants [23] all depend on a leader or a small quorum to participate mul- tiple rounds of communications, and thus they are vul- nerable to adaptive attacks on the leader. Other protocols that try to avoid faulty leaders by changing leaders in a fixed order [35, 42, 51, 3] cannot avoid adaptive leader 1arXiv:1802.01315v1 [cs.DC] 5 Feb 2018 attacks, because once the adversaries know who is the next leader, they can change their target accordingly. There is a new generation of BFT protocols designed to run over the Internet. To avoid adaptive attacks, Al- gorand [24] hides the leader identity. To improve scal- ability, ByzCoin[32] combines Proof of Work (PoW) with multi-signature-based PBFT. To tolerate arbitrary network failures, HoneyBadgerBFT[41] adopts asyn- chronous atomic broadcast [11] and asynchronous com- mon subset (ACS) [4]. Unfortunately, as we will detail in Section 3.3, none of these BFT protocols offer the following properties at the same time: 1) liveness under adaptive attack , 2) scalabil- ity to 10,000s of nodes with low latency (15 seconds in our simulation) for commitment, and 3) provable safety (i.e., no fork at any time) with arbitrary network fail- ure. Also, there is no straightforward way to combine the techniques used in these protocols. We present Gosig1, a new BFT protocol for permis- sioned blockchains. Gosig can achieve all three proper- ties above, and also provide provable liveness with par- tially synchronous network (details in Section 3.2). Gosig elects different leaders secretly for every block, and it eliminates the leader’s involvement after it pro- poses a block to defend against adaptive attacks on lead- ers. At the implementation level, we use gossip-based communications to fully exploit the link redundancy on the Internet while keeping the source safe. Since we need to gather signatures during gossip, we adopt asyn- chronous multi-signature [6, 46] to largely reduce the network overhead of consensus messages. We evaluate Gosig on an Amazon EC2-based 140- server testbed that spans 14 cities on five continents. We can achieve a throughput of 4,000 tps (transactions per second) with an average transaction confirmation latency of 1 minute. Even when 1/4 of the nodes fail, we can still maintain over 3,500 tps with the same latency. With over 100 participants, it effectively doubles the through- put and reduces the latency by 80% comparing to Honey- BadgerBFT [41], the state-of-the-art protocol that offers the same level of safety guarantee. Also, using simula- tions, we show that Gosig is able to scale to 10K nodes. In summary, our major contributions are: 1) We propose a new BFT protocol that achieves scal- ability, provable safety and resilient to adaptive attack. 2) We propose a novel method of combining secret leader selection, random gossip, multi-round voting , and multi-signature into a single BFT protocol in a compati- ble way. 3) We provide a real Gosig implementation, evaluate it on a real-world geographically distributed testbed with 1The name is a combination of Gossip and Signature aggregation, two techniques we use.140 nodes, and achieve promising performance results.2 2 Related Work Bitcoin and its variants. Permissionless public blockchains like Bitcoin [43], Ethereum [53], PP- Coin [31] need proof of work (PoW) or proof of stake (PoS) to prevent Sybil attacks. They also need incen- tive mechanisms to encourage people to join the public network to keep the system safe. Other designs [17, 20] try to avoid chain forking but retain the design of PoW or PoS. We assume consortium blockchains [10, 45, 52], and mainly focus on the performance and safety of the system, instead of the other economic aspects. Byzantine fault tolerance. The most important fea- ture of a BFT protocol is safety. Unfortunately, many open source BFT protocols are not safe [12]. There are two major approaches to design provable BFT agree- ment protocols. 1) Using multi-round voting: exam- ple systems include PBFT [13] and its successors [33, 38, 14]; 2) Using leader-less atomic broadcast: Hon- eyBadgerBFT [41] and [16, 34]. To prevent malicious leaders from affecting the system, Aardvark [15] use performance metrics to trigger view changes and Spin- ning [51], Tendermint [35] or others [3, 42] rotates leader roles in a round robin manner. However, there methods can not avoid adaptive attacks because the leader role is known to all in advance, and thus can be muted by at- tacks like DDoS right before it becomes a leader. Gosig adopts similar voting mechanism like PBFT to get good performance without failure, and keeps safety and live- ness under attacks. In order to scale the system, many systems adopt the “hybrid consensus” design [30, 32, 44] that uses a Bitcoin-like protocol to select a small quorum, and use another (hopefully faster) BFT protocol to commit trans- actions. If adversaries can instantly launch adaptive at- tacks on leaders, it is hard for these protocols to main- tain liveness. Algorand [24] leverages secret leader elec- tion and quorum member replacement methods to keep liveness. Gosig lets every player participate in the con- sensus, but combines similar secret leader selection with signature-based voting to prevent such attacks. We use similar methods and adversary models pro- posed in Algorand [24]. We adopt the idea of multi- round voting from PBFT and HoneyBadgerBFT [41], and the idea of multi-signature from ByzCoin [32]. Gosig combines these incompatible methods in a coher- ent protocol and achieves good performance. We com- pare the key differences of these protocols in Section 3.3. Overlay network and gossip. Most BFT protocols and blockchains use broadcast as a communication primitive. 2We will opensouce Gosig when the paper is published. 2 To improve broadcast reliability on the Internet, people often use application-layer overlay networks. We adopt techniques like gossip from reliable multicast [5], prob- abilistic broadcast [22, 29] and other peer-to-peer (P2P) networks [28, 50]. Existing P2P networks may tolerate some Byzantine failures, but do not provide convergence guarantee [37]. By combining network optimizations like gossip with a robust protocol layer design, we can greatly improve both system resilience and availability. 3 Problem Definition and Assumptions The goal of Gosig is to maintain a blockchain. In Gosig, clients submit transactions toplayers (or servers), who pack these transactions into blocks in a specific order. All committed blocks are then serialized as a blockchain , which is is replicated to all players. On the blockchain, one block extends another by including a hash of the pre- vious block. In a blockchain, a transaction is confirmed only when the consensus group commits the block con- taining the transaction. Gosig, as a consensus protocol, ensures that all blockchain replicas are the same. In par- ticular, we want to prevent forks on the blockchain, i.e. two different blocks extending the same block. 3.1 Problem Definition We consider a system with Nplayers, p1;p2;;pn. We can tolerate bstatic Byzantine failures and c adaptive attacks where b+c=f=b(N1)=3c. The Byzan- tine faulty nodes can do anything including colluding to break the protocol. The honest players under adaptive attacks act like crash failure, but they come to life again when the attacks are over. All other (at least 2 f+1) play- ers are honest and follow the protocol. All players form a consensus group G. Each player pi outputs (commits) a series of ordered blocks Bi[1];Bi[2]; ;Bi[ni], where ni, the length of the blockchain after attaching a new block, is the height of this block. A transaction is an operation on a state machine, and we say it is valid when it is a legal operation on the cur- rent state. A block Bi[h]is valid if: 1) all transaction included are valid if executed sequentially, and 2) the block header contains the correct reference to the previ- ous block Bi[h1], like the Nakamoto blockchain [43]. The goal of Gosig is to let Greach a consensus on the blockchain , i.e. the following two conditions hold. 1. Safety : (1) Any block committed by any honest player is valid; (2) at any time, for any two honest players piandpj,Bi[k] =Bj[k]for any kmin(ni;nj). 2. Liveness : For any finite time tand any honest player pi, there exists a time t0>twhen picommits a block packed by an honest player.Here we define safety and liveness of blocks instead of transactions for simplicity. We rely on gossip mecha- nisms to ensure that a transaction will reach most play- ers, and an honest player will pack the transaction when it becomes the leader. Intuitively, the safety condi- tion requires a total order of committed blocks on the blockchains at all honest players, meaning there is no fork at any time. The liveness condition says that all honest players will always make progress, i.e., if a trans- action can reach all honest players, it will eventually be confirmed. Both conditions are based on certain assump- tions about the system, and we detail them next. 3.2 System Model and Assumptions We summarize our key assumptions that we use to prove the safety and liveness of Gosig. Strong cryptography and PKI. We only consider per- missioned chain, and there is a trusted public key infras- tructure (PKI) to authenticate each player - a common assumption in today’s Internet. We also assume the cor- rectness of the cryptographic primitives. These assump- tions are the foundation of the safety in Gosig. Asynchronous network for safety. Our protocol can keep safety under asynchronous network [41] condition, which means messages can be arbitrarily dropped, re- ordered, or duplicated. Liveness under partial synchrony. We also guarantee liveness if the network has partial synchrony , a common assumption [14, 33, 42, 51]. We say a network has partial synchrony if there exists a time t0such that for any time t>t0, all messages sent between any two honest players during the interval can be delivered within a limited time bound Dt. Specially, we assume adaptive attacks on any player only take effect after a delay of Dtat any time. Partially synchronized clock. Similar to [24], we as- sume a partially synchronized clock for getting liveness. That is, at any wall clock time t, for any two players pi andpj, their local time readings Cpi(t)andCpj(t)satisfy thatjCpi(t)Cpj(t)j<D. Practically, it is easy to ensure aDof several seconds using standard Network Time Pro- tocol (NTP) on the Internet. 3.3 Key Features of Gosig Comparing to existing blockchains and other Byzantine- fault-tolerant atomic ordered broadcast protocols, Gosig has achieved scalability ,liveness under adaptive attacks and safety under asynchronous networks at the same time. While existing protocols provide one or more of these features, to our knowledge, Gosig is the first proto- col that offers all three together. 3 ByzCoin [32] offers excellent scalability by com- bining PBFT, signature collection and proof-of-work (PoW). However, like PBFT, it loses liveness under adap- tive attacks given that it is still PBFT-based. Even with- out PBFT, its two-phase multi-signature and Bitcoin- NG [23]-like mechanism that allows elected leaders to keep serving are also vulnerable to adaptive attacks. Algorand [24] has excellent scalability, and tolerate adaptive attack using secret consortium election. How- ever, the safety of its Byzantine Agreement is based on aweak synchrony assumption about the network. This additional requirement comes from the idea of randomly selecting a small quorum, which is the key to Algorand’s scalability. We only adopt the secret leader election from Algorand to avoid adaptive attacks, but completely re- design the BFT protocol using multi-round signature col- lections to achieve provable safety in asynchronous net- works, like PBFT. We solve the scalability problem by combing protocol design with implementation optimiza- tions like multi-signatures. HoneyBadgerBFT [41] achieves provable optimal liveness and provable safety in any situation. However, each node needs to send O(N2)messages per round. Batching up O(N2logN)transactions per round helps amortize the cost, but the large batch results in a latency as high as O(N2logN), limiting the scalability. In com- parison, the network overhead for each Gosig player is O(NlogN)per round. Therefore, experimentally, we can double the HoneyBadgerBFT throughput with only 1/5 of the latency on a similar testbed with more participates. In summary, we insist that Gosig has provable safety under a strong adversary model, but we choose to relax the liveness goal a little, in exchange for better scalabil- ity. We achieve this goal by adopting some originally incompatible ideas and provide alternative implementa- tions, so they can be combined seamlessly with our ac- cordingly designed protocol. 4 Gosig Protocol Overview We provide an intuitive overview of Gosig and leave for- mal descriptions and analysis to Section 5. Players. Every players participates in the protocol, and knows all other players’ public key. It receives transac- tions submitted by clients and gossip transactions among all players. An honest player is responsible for verifying transaction validity and block validity. A player drops in- valid transactions and blocks, and blacklist the senders. Rounds and stages. Gosig is a partially-synchronous protocol. We divide the execution of Gosig into rounds with a fixed time length (30 seconds by default). Each round consists of a leader selection step (no communica- tions) and two subsequent stages with fixed length. Thus, Bp1p2p3p4PR(B)P(B)TC(B)BBBBlock commitmentBlock proposalStage IStage IIRound rRound r+1Round r-1Leader SelectionLeader SelectionFigure 1: Overview of a Gosig round (happy path only). all players know the current round number and stage by referring to the local clock. Figure 1 provides an overview of a typical round. At the start of each round, some players secretly realize they arepotential leaders of this round with the cryptographic sortition algorithm (Section 5.2). Thus, the adversary can not target the leaders except randomly guessing. At Stage I, a selected potential leader packs non- conflict uncommitted transactions into a block proposal, disseminates it with gossip, and acts just like a normal node afterwards. Note that a potential leader’s identity can only be discovered by others (including the adver- sary) after she has full-filled her leader duties. The goal of Stage II is to reach an agreement on some block proposal of this round by vote exchange. A player “votes” for a block by adding her digital signature of the block to a prepare message (“ Pmessage”) and send- ing it. An honest player only votes for a single pro- posal per round. Upon receiving at least 2 f+1 signa- tures from Pmessages for a block, the player starts send- ingtentatively-commit messages (“ TCmessage”) for it. She finally commits the block to her local blockchain replica once she receives 2 f+1TCmessages. The above process only covers the “happy path” of the protocol. We provide the details how Gosig handles fail- ures in the next section. 5 Gosig Protocol Details We formally describe the Gosig protocol details. Throughout the paper, we adopt the following notation: subscripts denote who have signed the message3and su- perscripts denote the round in which the message is sent. For example, Pr Xis aPmessage collectively signed by the set Xof players in round r4. We also use a shorthand to describe the action that pisends a Pmessage about a 3A message may be collectively signed by multiple players. 4For brevity, we denote Mr figbyMr i. 4 block Bas “piPsB”, and the action that pisends a TC message about a block Bas “piTCsB”. 5.1 Player’s Local State We describe each player as a finite state machine in Gosig. Each player maintains a local state and decides her next actions based on the state and external events (receiving a certain message or selected as a leader). The local state on player piis a 4-tuple si=hBroot; hroot;Btc;Fi. The tuple contains two types of informa- tion. The first two values are about the last committed block in her local blockchain copy. Brootis the block it- self, and hrootis the height ofBroot. The rest values in sidescribe the pending block that the player plans to add to her chain at height hroot+1.Btcis the pending block itself. Btcis non-null if pihasTCed Btc. Otherwise, Btcis a null value e. The last variable F characterizes the timeliness of the block of Btc. Besides the elements appearing in the tuple, pialso implicitly maintains two variables: crootandctc.crootis acommitment certificate that proves the validity of Broot, andctcis aproposal certificate ofBtc. We define both later in this section. For brevity, we do not explicitly include crootandctcin the situple. When Gosig starts running, a player’s local state is ini- tialized as si=hBe;0;e;0i. 5.2 Leader Selection: The First Step Leader selection is the first step of each round. The objective of this step is to secretly and randomly select thepotential leaders who are entitled to propose a next block. The greatest challenge is to keep the election re- sult unpredictable until the potential leaders have sent out thepropose messages ( PRmessage). Otherwise, the ad- versary can attack the leaders beforehand, and thus break the liveness of the system. The cryptographic sortition algorithm. We use a sim- plified version of the cryptographic sortition mechanism from Algorand [24] to select a set of potential leaders . Similarly, we use a number Qhto implement crypto- graphic sortition. In Gosig, Qhis recursively defined as Qh=H(SIGlh(Qh1)) ( h>0) (1) where his the height of a committed block B5,His a secure hash function shared by all players, lhis defined as the leader who has proposed the block B(the signer of the proposal certificate of B), and SIG i(M)is the digital signature of message Msigned with pi’s private key. Based on Qh, we define a player pi’sleader score Lr(i)at round rasLr(i) =H(SIG i(r;Qh)), where his the height of the latest committed block at round r. 5Q0is a random number shared among all players.At the beginning of each round r, each player picom- putes her Lr(i), and if the score is less than a leader prob- ability parameter q , she knows that she is a potential leader of the round. A potential leader can prove to other players about her leader status with the value SIG i(r;Qh). We define the value as the leader proof for round r,lcr i. The process requires no communication among players. The cryptographic sortition algorithm has two good properties: 1) the signature SIG iuses pi’s private key, and thus cannot be forged by others; 2) If the hash func- tionH()is perfectly random, the potential leader selec- tion is uniformly random. Thus, there is no way for the adversary to know who is selected, nor can it change any node’s chance of becoming a leader. Choosing a right qis important. If qis too small, some rounds may not have a leader and thus fail to proceed. If qis too large, there may be many competing potential leaders, wasting resources to resolve the conflict. Sim- ilar to Algorand, we set q=7=Nwhere Nis the total number of players. This qis sufficiently large to reduce the probability of no-leader rounds to less than 0.1%. Of course, a faulty node may still become a potential leader. In this case, the worst damage it can cause is to stall the round without affecting the correctness. 5.3 Potential Leaders Propose Blocks When a player pirecognizes that she is a potential leader, she needs to decide which block to propose and then gen- erate a proposal message. Given pi’s current local state si=hBroot;hroot;Btc;Fi (Btcmay be e), she first gathers a list of candidate blocks to propose. If pifinds she has a non-empty Btc, the block Btcis a good candidate to propose again, and the height stays the same as Btc. Alternatively, she can also con- struct a new block extending her own chain, at height (hroot+1). The following procedure defines which block she will propose. To make a proposal valid, a potential leader needs to provide a valid certificate c for the proposed block Bat height h. In addition to serving as a proof of the block validity, calso determines the proposal round r p(B)6of the block proposal. The leader decides which candidate block to propose based on rp(B). We can understand the proposal round as the round number when the block is first generated. Intuitively, a block with a larger proposal round is more likely to get accepted by peers. Therefore, in Gosig, we stipulate that a potential leader should propose the block with the largest proposal round among all candidate blocks. 6More precisely, the proposal round is an attribute of a proposal, which is defined in the next paragraph, rather than of a block. We use rp(B)notation for brevity. 5 A proposal certificate cisvalid if and only if it matches one of the following two cases. We also specify how we compute the proposal round in each case. Case 1 :c=TCr0 i(Br0;h) (r0<r), where Bandhare ex- actly the proposed block and its height, respectively. In this case, rp(B) =r0; Case 2 :c=TCr0 X(B0r0;h1) (r0<r), where Xcontains at least 2 f+1 different players. In this case, rp(B) = r0+1. Finally, the potential leader piassembles a proposal message ( PRmessage) in the form of PRr i(B;h;c;lc) containing: 1) the proposed block B, 2)B’s height h, 3) the proposal certificate c, and 4) the leader proof lc(de- fined in Section 5.2). Then pisigns the message with her private key. Everyone can easily verify the validity of the PRmessage by checking the included block, signatures and certificates. 5.4 Stage I: Block Proposal Broadcast After the leader selection step, Gosig enters Stage I: block proposal dissemination. The objective of this stage is to propagate blocks proposed by all potential leaders to as many honest players as possible. We use the well-known gossip protocol [47] to dissem- inate messages on the application layer overlay network formed by the same set of players. A player sends/for- wards a message to mrandomly selected players in each hop. Parameter mis called the fanout and determines how fast the message propagates. Potential leaders initiate the gossip of their PRmes- sages. Each honest player, upon receiving a PRmes- sage, will first check its validity, and then forward all valid PRmessages. Note that there can be more than one valid block proposed in the same round, either because there are multiple potential leaders, or because a mali- cious leader can propose multiple valid blocks. Players forward all valid blocks in this stage and leave the con- flict resolution to Stage II. At the end of Stage I (after a fixed time interval T1), we expect that most players have seen all block proposals in the round, assuming everything goes well. Nevertheless, Stage II is able to handle all complicated situations. 5.5 Stage II: Signature Collection The objective of Stage II is to disseminate signed mes- sages of players’ votes for the block proposals, in the hope that honest players can commit a single valid block. Same as Stage I, we use gossip to propagate all messages. Message types. There are two message types involved in this stage. Players can collectively sign a message by appending their signatures. We say a message Mr Xisk-signed ifXcontains at least k distinct players’ signa- tures. Pmessage. Aprepare message ( Pmessage) digitally signs a block. Specifically, Pr i(Br;h)means player pi signs her vote for the block Brat height hproposed in round r. In short, we say piprepares or “ P”sBr. TCmessage. Atentatively-commit message ( TCmes- sage) signs a proof of a (2f+1)-signed Pmessage. Specifically, TCr i(Br;h)proves that at least 2 f+1 play- ers (including pi) have Ped the block Brat height h in round r. In short, we say pitentatively-commits or “TC”sBr. Stage II protocol. Algorithm 1 outlines the expected behavior of an honest player piin Stage II. We model each pias a finite state machine with local states listed at the beginning of Algorithm 1. It performs actions based on current local state and the incoming messages. Lines 1 to 7 describe the initialization procedure, in which pichecks all block proposals she receives in Stage I (by calling the function DecideMsg in Algorithm 2). Ifpireceived valid proposals in Stage I, she needs to decide which block to prepare (function DecidePMsg in Algorithm 2). In general, piprefers a block proposal with larger proposal round, as it indicates a more recent block (lines 2.14 to 2.20). Finally, pichooses exactly one block ¯Bfor height h, and Ps it (line 1.4 and line 1.7, respectively). After initialization, the state machine of pistarts to handle incoming messages. Lines 8 to 29 in Algorithm 1 outlines handler routines for these three different mes- sage types. pionly signs messages about the same block that she has Ped (line 1.9 and line 1.21), she can only TCa block Bafter she collects at least 2 f+1 signatures from the Pmessage about B, and she can only commit a block Bafter she collects at least 2 f+1 signatures from theTCmessages about B(line 1.13 and 1.25). These rules ensure the safety of Gosig. 5.6 Reducing Signature Sizes Gosig protocol requires signatures from over 2/3 of the players. To reduce the storage and communica- tion overhead of signatures, we adopt the techniques in [7, 6] to aggregate these signatures into a compact multi-signature form. The cryptographic signature of a player piinvolves a hash function H, a generator G, a private key xi, and a public key Vi=Gxi. A player holding the private key xi can sign a message Mby computing Si=H(M)xi, and 7Other players’ signatures are in the received messages. 8Among all blocks with the largest proposal round in S,Bis the block whose proposer has the smallest leader score. 9Note that rp(B0)is actually the proposal round of the proposal mes- sage about B0, which is not necessarily equal to rp(Btc). 6 Algorithm 1 Stage II workflow for each player pi. Constants: –G: the consensus group of N players –r: the current round number State Variables: –si:pi’s local state, i.e.,hBroot;hroot;Btc;Fi –S: the set of all valid proposals received in Stage I 1:phase Init 2:msg DECIDE MSG .See Algorithm 2 3:ifmsg6=null then 4: P(B;h) msg .Bis the block pivotes for 5: phase Ped 6: XP fig .The players that have PedB 7: Prepare Bby gossiping msg 8:Onreceiving a valid Pr X0(B;h)message Do 9: ifphase =PedandB=Bthen 10: XP XP[X0 11: sigP signatures of players in XP7 12: Sign Pr XP(B;h)with sigP 13: ifPr XPis (2f+1)-signed then 14: phase TCed 15: XTC fig .The players that have TCedB 16: si hBroot;hroot;B;ri 17: Tentatively commit Bby gossiping TCr i(B;h) 18: else 19: Forward the signed message Pr XPwith gossip 20:Onreceiving a valid TCr X0(B;h)message Do 21: ifphase6=InitandB=Bthen 22: XTC XTC[X0 23: sigTC signatures of players in XTC 24: Sign TCr XTC(B;h)with sigTC 25: ifphase6=Ced andTCr XTCis (2f+1)-signed then 26: si hB;h;e;0i 27: Commit Bon the local blockchain 28: phase Ced 29: Forward the signed message TCr XTCwith gossip others can verify it by checking whether e(G;Si)is equal toe(Vi;H(M))with a given bilinear map e. To track which signatures we have received, we append an inte- ger array nof size Nto the signature, and by signing a message M, a player computes Si=H(M)xi, and incre- ments the i-th element of nSi. The combination is the signature for aggregation, and we denote this process by sign i(M) = ( Si;nSi). An important property of the aggregated signature is that we can put in new signatures in an arbitrary or- der, avoiding the risk of adaptive chosen-player attack that Byzcoin[32] faces. Aggregating signatures is sim- ply multiplying the BLS signature and adding up the array n. Thus, the aggregated signature (aka multi- signature ) is S=H(M)åixinS[i]. We denote the pro- cess by aggregate (S1;S2;:::) = ( S;nS). Let (S1;nS1)and (S2;nS2)be two multi-signatures, we can combine themAlgorithm 2 Deciding which block to prepare in Stage II. 1:function DECIDE MSG 2: ifS=fthen .Received no valid proposals 3: return null 4: else .Received one or more valid proposals 5: return DECIDE PM SG 6:function DECIDE PM SG 7: rp max B2Srp(B) 8: B argminBj2S;rp(Bj)=rpLr(j)8 9: Denote by PR(B;h;c)the proposal message about B 10: ifh=hroot+1then 11: ifBtc=ethen 12: si hBroot;hroot;e;0i 13: return Pr i(B;h) 14: else 15: ifrp(B)>Fthen 16: si hBroot;hroot;e;0i 17: return Pr i(B;h) 18: else if9B02Ss.t.B0=Btcand rp(B0)F9 then 19: si hBroot;hroot;B0;rp(B0)i 20: return Pr i(B0;h) return null by computing aggregate (S1;S2) = ( S1S2;nS1+nS2). The array ntracks who have signed the message. Every- one can verify the multi-signature by checking whether e(G;S) =e(ÕiVnS[i] i;H(M)). [40, 6] points out that aggregating signatures of the same message can be vulnerable to chosen-public-key attack. This attack can be avoided if the participates can prove they have the private key to their announced public key, either forced by a trusted third party or by a zero-knowledge-proof bootstrap process proposed by [40]. We choose this method because it’s acceptable with the help of PKI. Another method proposed in [6] computes H(M+VI) instead of H(M)so each player signs different messages. Since everyone knows each others’ public keys, the result is still verifiable without increasing the data size. This method does not involved a trusted third party or online bootstrap process, but it forces the algorithm to compute the bilinear map Ntimes, instead of one time when the messages are the same. It can cause the verification time 100 times slower, and thus can only be adopted when the number of players in a system is small (less than 200). The signature aggregation process significantly re- duces memory utilization. Although the multi-signature still has size O(N)asymptotically, a 4-byte integer is enough for each element in nSin most cases. With 1,000 players using a 2048-bit signature, naively it takes 256 KB to store these signatures, but with aggregation, it re- quires only 4256 bytes, or 1/60 of the original size. The 7 optimization is more efficient as the system scales larger. For the case when the number of signers is small, the array is sparse and thus easily compressible. 5.7 Player Recovery from Temporary Fail- ures In normal cases, blocks and signatures are broadcast to all players. If a player misses a block in round rdue to temporary failures, it can catch up in subsequent rounds using the following (offline) recovery procedures: If player pireceives a valid signature of enough sign- ers in round rbut fails to receive the block itself, piwill check the signature and try to contact someone who has signed the block to retrieve it. If player pirecovers from an extended crash period and/or data loss, it should try to retrieve all lost blocks and proofs. She can only continue participating in the protocol after she recovers the entire history. As the com- mitted blocks are offline-verifiable, blocks with valid sig- natures from any player are sufficient for recovery. 5.8 Security Analysis We can prove that Gosig provides safety (as defined in Section 3) in fully asynchronous networks. Adding par- tial synchrony assumption, it also achieves liveness. We only list some key lemmas here and leave the complete proofs in Appendix A and B. Lemma 1. If an honest player p icommits a block B at height h in round r, no player will ever TC any other block B0at any height h0h in any later rounds. Proof sketch. At least f+1 honest players will not P any blocks whose proposal rounds are no larger than r (line 14 to 20 in Alg. 2). Therefore, at least f+1 hon- est players will not Pany other block at height h0h after round r, proving Lemma 1. And Lemma 1 leads to safety, because no block can be committed without hon- est players signing TCmessages. The following two lemmas prove the liveness under the partial synchrony assumption. Lemma 2. If in round r, for any honest player p iwe have si=hBroot;hroot;e;0i, then there exists a round r0>r and an honest player p jsuch that p jPs some block at height h=hroot+1in round r0. Lemma 3. If in round r, there exists some honest player piwith state s i=hBroot;hroot;Btc;Fi(Btc6=e), then there exists a round r0>r and an honest player p jsuch that pjcommits a block at height h =hroot+1in round r0. Attacks beyond the protocol layer. In addition to the adaptive chosen-player attacks and other attacks causingcommunication problems, an adversary can design at- tacks on the system implementations, including: 1) com- putation resource saturation attack, where the adversary may disseminate a large number of invalid messages to the honest players, consuming their CPU cycles for use- less signature verification, and 2) signature counter over- flow attack, where the adversary may craft valid multi- signatures where some counters are close to the maxi- mum integer, and thus careless signature aggregating of honest players may cause an integer overflow resulting in incorrect signatures. Note that both attacks can only cause liveness prob- lems, rather than correctness problem. We will describe our countermeasures to both attacks in Section 6. 6 Implementation-level Optimization As we mentioned, Gosig combines protocol level design and implementation level optimizations to achieve high performance. In this section, we introduce the important optimizations. Asynchronous transaction dissemination and hash- only blocks. In our protocol, messages only con- tainhashes of the transactions to reduce message size. Raw transactions are gossiped among all players asyn- chronously, independent of protocol stages. In the case that a player does not have the raw transaction data when she receives the blocks, she retrieves the transactions from others before she can process the block. In practice, the gossip protocol often does a good job replicating the transactions, and thus this retrieval finishes fast. Continuous gossiping in Stage II voting. As we need all honest players to receive proposed blocks and oth- ers’ votes to achieve liveness, we do not limit the fanout. Instead, each player continuously sends block or P/TC messages to random neighbors until the end of the stage. However, we do put on a limit of concurrent connections to avoid overloading any player, which we set to 5 by default in our implementation. Section 7.3 provides a detailed analysis of the fanout limit. Blacklisting obvious problematic players. While there is no way to ensure message delivery, if a player detects an obvious communication problem (connection failure, timeout etc.) with a peer, she will “blacklist” the peer (i.e. stop sending to it) for a short time period To (typically half a round time). On subsequent failure with the same peer, she will additively increase To, until she receives a message from that peer, or successfully retries. This backoff mechanism effectively limits the wasted at- tempts to connect to failed nodes. LIFO processing stack. In Stage II, each node can con- currently receive multiple messages with signatures for processing (verification + aggregation). Sometimes the 8 messages arrive faster than the server can process them. We put them in a last-in-first-out (LIFO) stack , instead of a queue. This is because it is likely that later arriving messages contain more signatures, or sometimes even a super-set of signatures in earlier messages. Preventing signature overflow. In the aggregated sig- nature described in Section 5.6, we have the array nwith N B-bit integers (we have B=32 as default). An adver- sary can craft a valid signature so that the element corre- sponding to her signature is 2B1. This attack prevents honest players who have this signature from further ag- gregating the signature array because otherwise, the ele- ment will overflow. We prevent such attack by restricting the growth of the maximum element in n,max, based on the number of signers s. On receiving a new message, the player tries to aggregate it into her local signature array, and check if the result satisfies maxsor log2(max)<Bs=N. If so, the player updates her local array; otherwise, she drops the incoming message. 7 Evaluation We evaluate the performance of Gosig using both simu- lations and real testbed experiments. 7.1 Evaluation Setup Gosig prototype implementation. We implement the Gosig prototype in Java. We use pbc [39] library (with JPBC [19] wrapper) for cryptographic computation and usegrpc-java [2] for network communication. As for signature parameters, we choose the default a-type parameter provided by JPBC [18], and use it to gener- ate 1024-bit BLS signature. The entire system contains about 5,000 lines of Java code excluding comments. Testbed. We build a testbed with up to 140 t2.medium instances evenly distributed on Amazon EC2’s all 14 re- gions on 5 continents. We experimentally measure the network condition between the instances. Within a re- gion, we have less than 1ms latency and about 100 MBps bandwidth, and latencies across regions are hundreds of milliseconds with the bandwidth varying from 2 MBps to 30 MBps. We believe the testbed is a good emulation of a typical multi-datacenter WAN. Each instance acts both as client and server in the sys- tem. As the client, it generates transactions with an expo- nentially distributed inter-arrival time. Each transaction is 250 bytes, a typical Bitcoin transaction size (and used in evaluations of [41] too). These transactions are sub- mitted to the servers on the same instance. Simulation for larger scales. Limited by the testbed scale, we depend on simulations to analyze larger scalebehavior of our signature collection process. We set the network latency to an exponential distribution with a mean of 300 ms, a typical value for today’s Internet [36], and set the bandwidth to 500 KBps, a generous estima- tion after subtracting the bandwidth consumed by con- stantly gossiped transactions. We set the packet loss rate to 1% across all links (higher than many Internet links). In the simulator, we do not actually verify signatures, but set the signature verification time to be consistent with the performance we get on AWS t2.medium instances.10 All faulty players in testbed experiments and simulation simply fail by crashing. Key Configuration parameters. There are several configuration parameters to tune. The most important ones include the round time Tand maximum block size maxblock size . Both are correlated and affect sys- tem scalability and performance significantly. We dis- cuss their impacts in Section 7.4. We set T=30 sec (25 seconds for Stage I and 5 sec- onds for Stage II), and maxblock size =8MB. Re- call that in Gosig we only propagate transaction hashes (and send actual transactions asynchronously). Given that each transaction hash is 256 bit, a block can contain at most 250K transactions. With an average transaction size of 250 bytes, the corresponding raw transaction data for a block is about 62.5MB. 7.2 Real Testbed Performance Here we present the performance metrics on the EC2- based testbed. We test two configuration settings, one optimized for throughput (the default setting), and the other optimized for transaction commit latency. 7.2.1 Throughput-optimized configuration Using default parameter settings (Section 7.1), we run experiments on 35, 70, 105, 140 instances for 1200 sec- onds each using different workload from 1,000 tps to 7,000 tps. Figure 2(b) and 2(a) plot the throughput and average commit latency, respectively. We have the fol- lowing observations: 1) Without overloading the system, the average com- mit latency is a little over 40 seconds. This is consistent with our theoretically expected latency of 1.5 rounds. 2) With 35 players, we can sustain a 6,000 tps work- load. With 140 players, we can still support 4,000 tps. Comparing to the reported numbers in HoneyBad- gerBFT [41] (using similar EC2 testbeds, but fewer geo- locations), we double the throughput and reduce the la- tency by 80% with even more players and more regions. 10The verification time consists of an 11 ms constant overhead for computing bilinear map functions and another 0 :11kms for ksigners. That means 12.1ms for 10 signers and 1111ms for 10000 signers. 9 0 1000 2000 3000 4000 5000 6000 7000 Workload (tx / s)406080100120140Latency (s) N=140, max_block_size=4MB N=140, f=35 N=140 N=105 N=70 N=35(a) Latency with varying workload. 0 1000 2000 3000 4000 5000 6000 7000 Workload (tx / s)100020003000400050006000Throughput (tx / s) N=140, max_block_size=4MB N=140, f=35 N=140 N=105 N=70 N=35 (b) Throughput with varying workload 0 500 1000 1500 2000 2500 Throughput (tx / s)0102030405060Latency (s) N=140 N=105 N=70 N=35 (c) Latency vs. throughput Figure 2: Performance under different configurations. (a) and (b) are throughput-optimized. (c) is latency-optimized. 3) When the system gets overloaded, the throughput actually drops . This is because, with a 30-second round time, there is not enough time to propagate all blocks to everyone, causing incomplete rounds and thus reducing the effective throughput (aka. goodput). To prevent such situation, we limit the maxblock size as an admission control mechanism, just like most blockchains do. In fact, the dashed line in Figure 2(b) shows that when lim- iting maxblock size to 4MB (i.e. 125K transaction per block, or 4167 tps), we can sustain the maximum throughput even on overloading. Of course, overloading still causes the latency to go up, but there is no difference from any queuing system. 4) Gosig tolerates failures quite well with small over- head. As Figure 2(a) and 2(b) shows, 35 faulty ones among 140 total nodes show little influence on the sys- tem’s throughput or latency without overloading. The only impact of these failures is decreasing the maximal throughput by about 10%, from 4,000 tps to 3,600 tps. 7.2.2 Latency-optimized configuration The default setup uses large block sizes and long round time (30 seconds) to improve overall throughput. For ap- plications that are more latency-sensitive, we provide an alternative configuration. We reduce the round time Tto 10 seconds with 5 seconds for each stage. We also dis- able block-existence probing (see Section 6) to further reduce latency. Then we repeat the same set of experi- ments, and Figure 2(c) shows the latency we can achieve under different workloads. Like the previous case, we can get less-than-17-second latency and stable throughput until overloading. We can sustain over 200 tps with 140 nodes, 600+ tps with 70 nodes or 2,400+ tps with 35 nodes. However, the 10- second round offers very tight time budget for blocks to propagate. Larger blocks have little chance to com- plete propagation, causing the latency to go up quickly on overloading. Thus, a carefully controlled block size is even more essential. In comparison, HoneyBadgerBFT cannot offer a low latency configuration in a relatively large group because of its O(N2)-message-per-node complexity. Evaluation 0 1 2 3 4 5 Time in a stage (s)0.00.20.40.60.81.0CDF Stage I Stage IIFigure 3: CDF for each player’s stage completion times, using latency-optimized configuration. The error bars are 95% confidence intervals. 101 102 103 104 Total number of players (log scale)05101520253035Time for Stage II (s) Default (5) fanout w/o failures 3 fanout w/o failures 20 fanout w/o failures Default fanout w/ 3/N failures Default fanout on AWS testbed Figure 4: Simulation results for Stage II completion time. in [41] shows that the latency with only 64 players cannot even go below 200 seconds. 7.2.3 Latency breakdown While the transaction commit latency is largely deter- mined by the round time, we want to take a closer look at how fast a player can commit a block within a round. We plot the cumulative distribution (CDF) of the time taken for players to commit a block, using the same low- latency configuration with 140 nodes and 200 tps work- load. Figure 3 shows the CDF of completion time for both stages on each node. We can see that Stage II is only slightly slower than Stage I, especially at the slowest player (both at about 4 seconds). It is a little counter-intuitive as Stage II con- sists of 2 rounds of messaging (P and TC messages) vs. Stage I has only one. The reason is that to complete Stage I, every player has to receive the block from all leaders, in order to determine the least leader score . In compari- son, Stage II only need votes from any 2 f+1 players. 10 7.3 Scalability Limited by the resources on the testbed, we evaluate the scalability on systems larger than 140 nodes using sim- ulation. In the simulation, we focus on the completion time of Stage II, because it is the core and most compli- cated part of Gosig, while the performance of Stage I is no different from other gossip-based systems. Using the default settings, we show the time required to complete stage II with 10 to 10,000 players, i.e., all honest players receives a TCmulti-signature signed by more than 2/3 players. Figure 4 shows the results using different combinations of failure modes and optimiza- tions. The key observations are: 1) To calibrate the simulator, we also reproduce the testbed results (for up to 140 nodes) in Figure 4. We can see that it fits our simulation results quite well. 2) Gosig scales well. Even with 10,000 players, we can still finish Stage II within 15 seconds only. This is a direct benefit of using gossip-based application overlay network and asynchronous multi-signature, which fully exploits the redundant paths while keeping the band- width consumption small. The time grows faster when the number of players Nis large, because the over- head for signature verification increases linearly with N. But this overhead only becomes significant after the to- tal number goes beyond 3000, and can be reduces by stronger hardwares. 3) With 10000 players and 1/3 of them being faulty by crashing, Stage II completion time slowdowns from 14.97 seconds to 19.53 seconds. The robustness of the protocol comes from the gossip mechanism and the order-independent signature aggregation algorithm. 4) A small gossip fanout, i.e., the number of outbound connections, can fit most environments. A large fanout (like 20 in Figure 4) will saturate the network and cause higher latency due to queueing effects. Although a small fanout may not fully utilize the network when the system has fewer players, the cost is not significant since most time of a round is allocated to stage I. 7.4 Configuration Parameters As we have seen in Section 7.2.1 and 7.2.2, maxblock size and round time Taffect system per- formance significantly. With Nplayers, the maxblock size is proportional to three parameters [17, 47]: 1)1 logN, 2) round time T, and 3) the network bandwidth. That means, in order to increase the number of nodes from 100 to 10,000, we need to either decrease the maxblock size by half or double the round time Tgiven a fixed bandwidth. In the remaining of the section, we experimentally evaluate their impacts using all 140 nodes in the testbed. 2MB 4MB 6MB 8MB 10MB max block size0100020003000400050006000Throughput (tx / s)Throughput 020406080100120140 Latency (s) LatencyFigure 5: Influence of maxblock size on the perfor- mance. 0 10 20 30 40 50 60 70 Round time (s)0100020003000400050006000Throughput (tx / s)Throughput 020406080100120140 Latency (s) Latency Figure 6: Influence of round time on the performance. Max block size. As we have discussed, the parameter maxblock size serves as an admission control mecha- nism to avoid overloading the system. Keeping N=140 and T=30s, we vary maxblock size from 2MB to 10MB, correspond- ing to 60K to 300K transactions per block, or 2K to 10K tps. In each round, we generate workload that equals the maxblock size . Figure 5 plots the results. The dashed line in Figure 5 shows the ideal case where the system has infinite capacity. The actual throughput of the system is around 4,000 tps, as we presented in Section 7.2.1. We can see that for a maxblock size smaller than 4MB, the ac- tual throughput increases with the maxblock size and roughly follows the ideal line. At around 4,000 tps, the system saturates. If the maxblock size is significantly larger than what the system can handle, the throughput decreases because some rounds will end before the play- ers can fully propagate the blocks. Round time Tvs. throughput. Given a round time T, it is easy to calculate the expected transaction commit latency when the system is under a normal workload, which is 1 :5T. A latency significantly larger than this value indicates system overloading. Here we experimentally find the maximum throughput we can obtain under different Ts, without overloading the system. Of course, because of the global clock syn- chronization error Dand message propagation latency, we require Tbe at least 10 seconds. Figure 6 plots both the throughput and latency under different Tsettings. We verify that we are able to keep the latency very close to the expected latency of 1 :5T. We observe that choosing a small Tsignificantly reduces the maximum throughput. The throughput even drops 11 super-linearly as Tgets smaller than 30 seconds. This is because when Tandmaxblock size are both small, the network setup overhead becomes non-negligible, fur- ther reducing the number of block transfers we can com- plete during the round. Fortunately, a Tof 40 seconds already supports the max throughput in a 140-node sys- tem, still much faster than existing solutions. 8 Conclusion and Future Work There are two types of approaches to build scalable blockchain systems: Some focus on theoretically prov- able protocols (e.g. HoneyBadgerBFT) even with high performance overhead, and others adopt best-effort hacks and hope it works most of the time (e.g. Bitcoin). We believe there should be a middle ground: we insist on a system with provable safety under a very strong adversary assumption, while adopting the best-effort ap- proaches to increase the probability of staying alive. We use Gosig to demonstrate such a system. At the proto- col level, using cryto-based secrete leader election and multi-round signature-based voting, we can guarantee safety, and by adding the partial synchrony assumption, we can also prove liveness. At the same time, we adopt implementation-level techniques such as gossiping, fail- ure discovery and asynchronous signature verification to increase the probability of liveness. With evaluations on a real 140-server wide-area network, we show that Gosig both scales well and provides high performance. As the next steps, we want to extend the protocol to allow players to join/exit. We also want to explore the approaches of integrating Gosig with other data-center- focused protocols to create a hybrid protocol, further im- proving its performance. References [1] Hyperledger consensus. https://github.com/ diegomasini/hyperledger-fabric/blob/master/docs/ FAQ/consensus FAQ.md , 2016. [2] grpc-java. https://github.com/grpc/grpc-java , 2017. [3] A IYER , A. S., A LVISI , L., C LEMENT , A., D AHLIN , M., M AR- TIN, J.-P., AND PORTH , C. Bar fault tolerance for coopera- tive services. In ACM SIGOPS operating systems review (2005), vol. 39, ACM, pp. 45–58. [4] B EN-OR, M., K ELMER , B., AND RABIN , T. Asynchronous se- cure computations with optimal resilience. In Proceedings of the thirteenth annual ACM symposium on Principles of distributed computing (1994), ACM, pp. 183–192. [5] B IRMAN , K. P., H AYDEN , M., O ZKASAP , O., X IAO, Z., BUDIU , M., AND MINSKY , Y. Bimodal multicast. ACM Trans- actions on Computer Systems (TOCS) 17 , 2 (1999), 41–88. [6] B ONEH , D., G ENTRY , C., L YNN , B., AND SHACHAM , H. Ag- gregate and verifiably encrypted signatures from bilinear maps. InInternational Conference on the Theory and Applications of Cryptographic Techniques (2003), Springer, pp. 416–432.[7] B ONEH , D., L YNN , B., AND SHACHAM , H. Short signatures from the weil pairing. In International Conference on the Theory and Application of Cryptology and Information Security (2001), Springer, pp. 514–532. [8] B ONNEAU , J., M ILLER , A., C LARK , J., N ARAYANAN , A., KROLL , J. A., AND FELTEN , E. W. Research perspectives on bitcoin and second-generation cryptocurrencies. In IEEE Sympo- sium on Security and Privacy. IEEE (2015). [9] B URROWS , M. The chubby lock service for loosely-coupled dis- tributed systems. In Proceedings of the 7th symposium on Oper- ating systems design and implementation (2006), USENIX Asso- ciation, pp. 335–350. [10] C ACHIN , C. Architecture of the hyperledger blockchain fab- ric. In Workshop on Distributed Cryptocurrencies and Consensus Ledgers (2016). [11] C ACHIN , C., K URSAWE , K., P ETZOLD , F., AND SHOUP , V. Secure and efficient asynchronous broadcast protocols. In Annual International Cryptology Conference (2001), Springer, pp. 524– 541. [12] C ACHIN , C., AND VUKOLI ´C, M. Blockchains consensus proto- cols in the wild. arXiv preprint arXiv:1707.01873 (2017). [13] C ASTRO , M., L ISKOV , B., ET AL . Practical byzantine fault tol- erance. In OSDI (1999), vol. 99, pp. 173–186. [14] C LEMENT , A., K APRITSOS , M., L EE, S., W ANG , Y., A LVISI , L., D AHLIN , M., AND RICHE , T. Upright cluster services. In Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles (2009), ACM, pp. 277–290. [15] C LEMENT , A., W ONG , E. L., A LVISI , L., D AHLIN , M., AND MARCHETTI , M. Making byzantine fault tolerant systems toler- ate byzantine faults. In NSDI (2009), vol. 9, pp. 153–168. [16] C RISTIAN , F., A GHILI , H., S TRONG , R., AND DOLEV , D. Atomic broadcast: From simple message diffusion to byzantine agreement. Information and Computation 118 , 1 (1995), 158– 179. [17] C ROMAN , K., D ECKER , C., E YAL, I., G ENCER , A. E., J UELS , A., K OSBA , A., M ILLER , A., S AXENA , P., S HI, E., S IRER , E. G., ET AL . On scaling decentralized blockchains. In Interna- tional Conference on Financial Cryptography and Data Security (2016), Springer, pp. 106–125. [18] D ECARO, A., AND IOVINO , V. Jpbc benchmark. http://gas. dia.unisa.it/projects/jpbc/benchmark.html , 2011. [19] D ECARO, A., AND IOVINO , V. jpbc: Java pairing based cryptography. In Proceedings of the 16th IEEE Symposium on Computers and Communications, ISCC 2011 (Kerkyra, Corfu, Greece, June 28 - July 1, 2011), IEEE, pp. 850–855. [20] D ECKER , C., S EIDEL , J., AND WATTENHOFER , R. Bitcoin meets strong consistency. In Proceedings of the 17th Inter- national Conference on Distributed Computing and Networking (2016), ACM, p. 13. [21] D OUCEUR , J. R. The sybil attack. In International Workshop on Peer-to-Peer Systems (2002), Springer, pp. 251–260. [22] E UGSTER , P. T., G UERRAOUI , R., H ANDURUKANDE , S. B., KOUZNETSOV , P., AND KERMARREC , A.-M. Lightweight probabilistic broadcast. ACM Transactions on Computer Systems (TOCS) 21 , 4 (2003), 341–374. [23] E YAL, I., G ENCER , A. E., S IRER , E. G., AND VANRENESSE , R. Bitcoin-ng: A scalable blockchain protocol. In 13th USENIX Symposium on Networked Systems Design and Implementation (NSDI 16) (2016), USENIX Association, pp. 45–59. [24] G ILAD , Y., H EMO , R., M ICALI , S., V LACHOS , G., AND ZEL- DOVICH , N. Algorand: Scaling byzantine agreements for cryp- tocurrencies. SOSP 2017. 12 [25] G UO, Y., AND LIANG , C. Blockchain application and outlook in the banking industry. Financial Innovation 2 , 1 (2016), 24. [26] H IGGINS , S. Bitcoin mining pools targeted in wave of ddos attacks. https://www.coindesk.com/bitcoin-mining- pools-ddos-attacks/ , 2015. [27] H UNT, P., K ONAR , M., J UNQUEIRA , F. P., AND REED, B. Zookeeper: Wait-free coordination for internet-scale systems. In USENIX annual technical conference (2010), vol. 8, Boston, MA, USA, p. 9. [28] K ARP, R., S CHINDELHAUER , C., S HENKER , S., AND VOCK- ING, B. Randomized rumor spreading. In Foundations of Com- puter Science, 2000. Proceedings. 41st Annual Symposium on (2000), IEEE, pp. 565–574. [29] K ERMARREC , A.-M., M ASSOULI ´E, L., AND GANESH , A. J. Probabilistic reliable dissemination in large-scale systems. IEEE Transactions on Parallel and Distributed systems 14 , 3 (2003), 248–258. [30] K IAYIAS , A., R USSELL , A., D AVID , B., AND OLIYNYKOV , R. Ouroboros: A provably secure proof-of-stake blockchain pro- tocol. In Annual International Cryptology Conference (2017), Springer, pp. 357–388. [31] K ING, S., AND NADAL , S. Ppcoin: Peer-to-peer crypto-currency with proof-of-stake. self-published paper, August 19 (2012). [32] K OGIAS , E. K., J OVANOVIC , P., G AILLY , N., K HOFFI , I., GASSER , L., AND FORD, B. Enhancing bitcoin security and performance with strong consistency via collective signing. In 25th USENIX Security Symposium (USENIX Security 16) (2016), USENIX Association, pp. 279–296. [33] K OTLA , R., A LVISI , L., D AHLIN , M., C LEMENT , A., AND WONG , E. Zyzzyva: Speculative byzantine fault tolerance. In ACM SIGOPS Operating Systems Review (2007), vol. 41, ACM, pp. 45–58. [34] K URSAWE , K., AND SHOUP , V. Optimistic asynchronous atomic broadcast. In International Colloquium on Automata, Languages, and Programming (2005), Springer, pp. 204–215. [35] K WON , J. Tendermint: Consensus without mining. Draft v. 0.6, fall(2014). [36] L EDLIE , J., G ARDNER , P., AND SELTZER , M. I. Network co- ordinates in the wild. In NSDI (2007), vol. 7, pp. 299–311. [37] L I, H. C., C LEMENT , A., W ONG , E. L., N APPER , J., R OY, I., ALVISI , L., AND DAHLIN , M. Bar gossip. In Proceedings of the 7th Symposium on Operating Systems Design and Implemen- tation (Berkeley, CA, USA, 2006), OSDI ’06, USENIX Associa- tion, pp. 191–204. [38] L IU, S., C ACHIN , C., Q U´EMA , V., AND VUKOLI ´C, M. Xft: Practical fault tolerance beyond crashes. CoRR, abs/1502.05831 (2015). [39] L YNN , B. On the implementation of pairing-based cryptogra- phy. The Department of Computer Science and the Committee on Graduate Studies of Stanford University (2007). [40] M ICALI , S., O HTA, K., AND REYZIN , L. Accountable- subgroup multisignatures. In Proceedings of the 8th ACM confer- ence on Computer and Communications Security (2001), ACM, pp. 245–254. [41] M ILLER , A., X IA, Y., C ROMAN , K., S HI, E., AND SONG , D. The honey badger of bft protocols. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Se- curity (2016), ACM, pp. 31–42. [42] M ILOSEVIC , Z., B IELY, M., AND SCHIPER , A. Bounded de- lay in byzantine-tolerant state machine replication. In Reliable Distributed Systems (SRDS), 2013 IEEE 32nd International Sym- posium on (2013), IEEE, pp. 61–70.[43] N AKAMOTO , S. Bitcoin: A peer-to-peer electronic cash system, 2008. [44] P ASS, R., AND SHI, E. Hybrid consensus: Efficient consen- sus in the permissionless model. In LIPIcs-Leibniz International Proceedings in Informatics (2017), vol. 91, Schloss Dagstuhl- Leibniz-Zentrum fuer Informatik. [45] S WANSON , T. Consensus-as-a-service: a brief report on the emergence of permissioned, distributed ledger systems. Report, available online, Apr (2015). [46] S YTA, E., T AMAS , I., V ISHER , D., W OLINSKY , D. I., J O- VANOVIC , P., G ASSER , L., G AILLY , N., K HOFFI , I., AND FORD, B. Keeping authorities “honest or bust” with decentral- ized witness cosigning. In Security and Privacy (SP), 2016 IEEE Symposium on (2016), IEEE, pp. 526–545. [47] T ERRY , D. B., D EMERS , A. J., G REENE , D. H., H AUSER , C., I RISH , W., L ARSON , J., S HENKER , S., S TURGIS , H. E., AND SWINEHART , D. C. Epidemic algorithms for replicated database maintenance. Acm Sigops Operating Systems Review 22, 1 (1988), 8–32. [48] T SCHORSCH , F., AND SCHEUERMANN , B. Bitcoin and beyond: A technical survey on decentralized digital currencies. IEEE Communications Surveys & Tutorials 18 , 3 (2016), 2084–2123. [49] V ASEK , M., T HORNTON , M., AND MOORE , T. Empirical anal- ysis of denial-of-service attacks in the bitcoin ecosystem. In In- ternational Conference on Financial Cryptography and Data Se- curity (2014), Springer, pp. 57–71. [50] V ENKATARAMAN , V., Y OSHIDA , K., AND FRANCIS , P. Chunkyspread: Heterogeneous unstructured tree-based peer-to- peer multicast. In Network Protocols, 2006. ICNP’06. Proceed- ings of the 2006 14th IEEE International Conference on (2006), IEEE, pp. 2–11. [51] V ERONESE , G. S., C ORREIA , M., B ESSANI , A. N., AND LUNG , L. C. Spin one’s wheels? byzantine fault tolerance with a spinning primary. In Reliable Distributed Systems, 2009. SRDS’09. 28th IEEE International Symposium on (2009), IEEE, pp. 135–144. [52] V UKOLI ´C, M. The quest for scalable blockchain fabric: Proof- of-work vs. bft replication. In International Workshop on Open Problems in Network Security (2015), Springer, pp. 112–125. [53] W OOD , G. Ethereum: A secure decentralised generalised trans- action ledger. Ethereum Project Yellow Paper 151 (2014). [54] Z HENG , Z., X IE, S., D AI, H.-N., AND WANG , H. Blockchain challenges and opportunities: A survey. International Journal of Web and Grid Services (2017). A Safety Lemma A.1. If an honest player p icommits a block B at height h in round r, no player will ever TC any other block B0at any height h0h in any later rounds. Proof. An honest player icommits a block Bwith a height of h means that at least 2f+1 players have TCedBin round r, so at least f+1 honest players have TCedBin round r. Those who commit the block Bsuccessfully will reject all messages for blocks of a height no higher than h, so we only consider the case where they fail to commit the block B. There is no other block proposed before round rwhose proposal round is larger than r. These f+1 honest players should have set their local F=raccording to line 16 in Algorithm 1, so they will not Pany blocks proposed before round r. Also, these f+1 honest player will not send TCmessage for any block of height less than hafter round r, because they have committed 13 the same block of height h1. Thus, no block of height less than hcan be committed after round r, meaning no one is able to propose a new valid block with a height of h0hand with a proposal round larger than rafter round r. The only case left is that there can be more than one valid block proposed in round r, whose proposal rounds are the same with B’s. In this case, by Algorithm 1, the f+1 honest players who have PedBin round rwill not Pany other round- rblock any more, so no other blocks proposed in round- rcan be TCed, which requires Pmessages from at least f+1 honest players. To sum up, at least f+1 honest players will not Pany other block with a height of h0hafter round r, and thus no one can TCany other block with a height of h0hafter round r, which requires at least 2f+1 Pmessages.  Lemma A.2. If an honest player p icommits a block B at height h in round r, no player will ever commit any other block B0at any height h0h in any later rounds. Proof. By Lemma A.1, we get that no one can TCany new block with a height of h0hafter round r, so no honest player can commit any block with a height of h0hafter round r, as he cannot collect enough TCmessages.  Theorem 1. Gosig protocol achieves safety. Proof. Any committed block will be prepared by at least f+1 honest players. Since honest players will only Pvalid blocks, condition (1) of safety is true. Condition (2) of safety can be directly proved by Lemma A.2.  B Liveness Since our potential leaders are elected secretly, the adversaries can not prevent honest players from becoming potential leaders of the least leader score, and can not prevent the block proposed by such an honestplayer from propagation since gossip peers are also secretly randomly chosen. We base our proof on a partially synchronous network assumption. And when the network is synchronous, a transaction will fail to reach all honest players in a finite time with negligible probability. If there are always blocks packed by honest players committed, all transactions will be confirmed eventually. Lemma B.1. For any round r, there exists a round r0>r and an honest player p jsuch that p jcommits some block at height h =hroot+1in round r0. Proof. Without losing generality, we assume that at round r, the last committed Brootis the same for all honest players. (Case 1) No player has TCed. Because the network will become synchronous infinitely, there exists a round where an honest player be- comes the potential leader with the least leader score and the network is synchronous. In this round, the proposal round of the block proposed by this honest leader is equal to the local freshness Fof all honest play- ers, so it will be prepared and committed by all honest players. (Case 2) Some player has TCed. Because at most one block can beTCed in a round, if two players TCed different blocks, these two players will have different local F. Thus, all players with the largest Fwill always have the same Bp, meaning if any of them becomes the leader in a synchronous round, this Bpwill be prepared by all honest players and committed. Similar to Case 1, because the network will become synchronous infinitely, there exists a round where an honest player with the largest Fbecomes the potential leader with the least leader score and the network is synchronous, so its Bpcan be proposed, prepared and committed. To sum up, the lemma is proved.  Theorem 2. Gosig protocol achieves liveness. Proof. By Lemma B.1, the theorem is easily proved.  14
{ "id": "1802.01315" }
2009.00319
Transaction Pricing for Maximizing Throughput in a Sharded Blockchain Ledger
In this paper, we present a pricing mechanism that aligns incentives of agents who exchange resources on a decentralized ledger with the goal of maximizing transaction throughput. Subdividing a blockchain ledger into shards promises to greatly increase transaction throughput with minimal loss of security. However, the organization and type of the transactions also affects the ledger's efficiency, which is increased by wallet agents transacting in a single shard whenever possible while collectively distributing their transactions uniformly across the available shards. Since there is no central authority to enforce these properties, the only means of achieving them is to design the system such that it is in agents' interest to act in a way that benefits overall throughput. We show that our proposed pricing policy does exactly this by inducing a potential game for the agents, where the potential function relates directly to ledger throughput. Simulations demonstrate that this policy leads to near-optimal throughput under a variety of conditions.
http://arxiv.org/pdf/2009.00319v1
James R. Riehl, Jonathan Ward
eess.SY, cs.DC, cs.SY
eess.SY
Transaction Pricing for Maximizing Throughput in a Sharded Blockchain Ledger James R. RiehlJonathan Ward Fetch.ai, St. John's Innovation Centre, Cowley Road, Cambridge, CB4 0WS, UK (e-mail: fjames.riehl, jonathan.ward @fetch.ai).g Abstract: In this paper, we present a pricing mechanism that aligns incentives of agents who exchange resources on a decentralized ledger with the goal of maximizing transaction throughput. Subdividing a blockchain ledger into shards promises to greatly increase transaction throughput with minimal loss of security. However, the organization and type of the transactions also a ects the ledger's eciency, which is increased by wallet agents transacting in a single shard whenever possible while collectively distributing their transactions uniformly across the available shards. Since there is no central authority to enforce these properties, the only means of achieving them is to design the system such that it is in agents' interest to act in a way that bene ts overall throughput. We show that our proposed pricing policy does exactly this by inducing a potential game for the agents, where the potential function relates directly to ledger throughput. Simulations demonstrate that this policy leads to near-optimal throughput under a variety of conditions. Keywords: blockchain, decentralized ledger, network throughput, potential game 1. INTRODUCTION Decentralized ledgers, commonly implemented as en- crypted linked lists of transaction records, or blockchains , allow individuals to trade resources and maintain a com- mon state machine securely and without a central author- ity (Narayanan et al., 2016; Crosby et al., 2016). As the demand for such systems grows, the slow throughput of established systems, e.g. 7-15 transactions per second on Bitcoin and Ethereum (Croman et al., 2016), is becoming a major obstacle to more widespread adoption and suc- cess, especially in applications requiring high frequency or time-critical transactions. One innovation that promises to signi cantly increase transaction throughput is subdi- viding each the transaction records into distinct shards , allowing parallel communication, execution and storage of transactions that use di erent shards (Saraph and Herlihy, 2019). These subdivision methods have proven e ective in conventional databases (Corbett et al., 2013). By evenly distributing transactions across multiple shards, the sys- tem can process transactions much faster than a serial blockchain ledger. However, in a decentralized system, di erent external users submit transactions, and there is no guarantee that they will choose to distribute their transactions in a way that enables the system to operate eciently. In this paper, we investigate the use of small transaction surcharges as incentives to align the goals of the individual users with the system-wide goal of maxi- mizing throughput. Decentralized ledgers pose additional challenges due to various stakeholders having di erent and often compet-ing objectives. For example, it is in the agents' inter- est that transactions are fast and cheap, which is more likely to occur when congestion is low, but miners or validators (agents responsible for reaching a consensus on which transactions are valid) bene t when transactions are expensive, which may be the case when congestion is high. These con icting incentives must be accounted for in the design of an e ective sharding system for blockchain ledgers. Several proposals for sharding block chains have previously been put forth (Kokoris-Kogias et al., 2018; Luu et al., 2016; Zamani et al., 2018; Buterin, 2016), each of which aims to make the ledgers more scalable while maintaining appropriate levels of security. However, these approaches all rely on randomization for distributing transactions among shards and do little to explicitly mitigate the prob- lems of load imbalance and frequent cross-shard transac- tions, which consume resources in communication between shards and potentially, depending on the sharding imple- mentation, force the pausing of execution threads on one or both shards. We address these problems here with a transaction pricing policy that incentivizes agents to choose shards in a way that maximizes ledger throughput. In particular, the proposed pricing function is based on a novel transaction eciency measure that induces a potential game for the agents, where the potential function relates directly to overall transaction throughput. The problem considered here resembles that of congestion games, a classic example of potential games, in which thearXiv:2009.00319v1 [eess.SY] 1 Sep 2020 goal is to minimize congestion in transportation or commu- nication networks, for example, by setting prices to align agent incentives with this goal (Monderer and Shapley, 1996). Indeed if the only goal were to minimize congestion on the transaction network, this would be a straight- forward application of congestion game theory. However, the reduced eciency caused by cross-shard transactions introduces additional complexity that must be accounted for in the pricing mechanism. By combining transaction size and the distribution of transactions across shards into a single quantity called transaction eciency , we are able to express the throughput objective as a function of agents' shard choices and previous transactions, which we then use to set the price. Decentralized ledgers sometimes use trans- action fees as incentives for other agents to maintain the ledger by validating transactions, so our proposal would simply weight such fees to promote overall eciency. 2. LEDGER AND TRANSACTION MODEL The model consists of a set of agents who transact with their neighbors in the network via a blockchain ledger. 2.1 Agents and network The network consists of a set Aofnagents who are interconnected by the edges E  A2, where an edge (i;j)2E means that agent ican request a transaction from agent j. We denote the set of neighboring agents from which agent irequests transactions by Ni:=fj2 A: (i;j)2 Eg . Each agent imaintains a balance of resources bi:= [b1 i;:::;bm i]>, wherebs idenotes the amount of resources agent iowns in shard s2S:=f1;:::;mg, and its objective is to choose shards and execute transactions in a way that minimizes transaction fees. 2.2 Transactions Assume that transactions are fully asynchronous and ar- rive in a sequence where one agent ( i, the receiver ) requests a transaction of an amount ( a) from another agent ( j, the sender ), such that the sender is in the neighbor set of the receiver (j2Ni). LetT:= (i;j;) denote a transaction re- quested by agent ifrom agent j, where := [1;:::;m]> lists the amounts to be transferred in each shard, which we assume are non-negative (each s>= 0), and sum to the total amount (Pm s=1s=a). The cardinalityjSTjis the number of shards used in the transaction. Let Pdenote the set (or pool) of transactions that are waiting to be added to a block. We de ne the price of a transaction as a function of the transaction itself and the current transaction pool: :=f(T;P), to be given in precise terms in section 4. The transaction process proceeds as follows: (1)Request: Agentirequests a transaction from agent j2Niand speci es an amount aand a shard si2S in which to receive the transaction, with the goal of minimizing current and expected future transaction fees. Only the sender pays the transaction fees, but the receiver has an incentive to minimize these in order to maximize the probability that the sender accepts and ful lls the transactions. We can express the receiver's shard choice as si2arg min s2S rf(T;P) + (1 r)E[ij;si] ;(1)whereE[ij;si] denotes the expected price of future transactions from the sender to the receiver if the receiver requests the current transaction in shard si, and r2[0;1] denotes the priority receiving agents place on the current transaction fee relative to future transactions. Estimating E[ij;si] is a key element in the pricing mechanism and is discussed further in section 3.1. (2)Ful llment: Agentjaccepts and ful lls the trans- action if there are sucient funds (including fees) and chooses a set of shards SjS from which to send resources, with the goal of minimizing current and expected future transaction fees. Since the nal transaction always includes the receiver's requested shardsi, the transaction set is given by ST:=Sj[ fsig. The set of all feasible transaction shard sets is then Sj(a) :=n STS:X s2Sjbs ja+f(T;P)o : For a requested transaction, we assume that the sender chooses a shard set that minimizes the fol- lowing expression: Sj2arg min ST2Sj(a) sf(ST;P)+(1 s)E[ij;s] ;(2) where s2[0;1] denotes the priority sending agents place on the current transaction fee relative to future transactions. The sender withdraws the resources to be transferred plus transaction fees from the shards inS T, and the receiver adds the transferred balance to shardsi. The result is a transaction Tthat goes into the transaction pool P P[fTg. (3)Block assembly: We assume that the blockchain is divided into m shards, each of which contains slots, and that the blocks in each shard are produced synchronously. LetPsdenote the set of transactions in pool Pthat use shards: Ps:=f(i;j;)2P:s>0g: In this paper, we assume that when any shard be- comes full (i.e., there exists a shard ssuch thatjPsj> ) the block is assembled from all transactions in the pool andPis reset to empty. The maximum theoreti- cal capacity of the blockchain ( m) is reached when the cardinality of all transactions is one (no cross- shard transactions) and each shard contains exactly the maximum number of transactions. Note that it may not be possible to execute both sides of multi- shard transactions leading to failure of transactions of this type. Therefore, assuming that all transactions in the pool are executed, as we do in this study, leads to optimistic estimates of the throughput in the case of frequent cross-shard transactions. This leads to conservative estimates of the performance gains that would arise from implementing our proposed pricing policy. Although this serves as a reasonable approxi- mation for our purposes, coordinating states between shards is a nontrivial problem and provides further motivation to incentivize single-shard transactions. We note that this analysis generalizes to blockchains with complex state execution rules such as smart contracts where cross-shard transactions require at least twice the computation of an otherwise identical single-sharded transaction. 3. TRANSACTION THROUGHPUT Transaction throughput measures the number of transac- tions processed in a given unit of time, but since we do not explicitly include time in our model, we seek a time- independent alternative quantity. Speci cally, we de ne the transaction eciency of a poolPas the fraction of the theoretical maximum number of transactions that could be included in a block in which all transactions have cardinality one and are evenly distributed across shards. There are two primary factors that determine transaction eciency: cardinality and shard balance . We say that shard balance is high when the transaction pool uses the shards in roughly equal proportions and low when the transaction pool uses some shards much more than others. Figure 1 illustrates three partially completed blocks from transaction pools exhibiting varying degrees of cardinality and shard balance. We measure shard balance in terms of the deviation from uniform shard usage in the transaction pool. The usage of each shard relative to the pool is given by u(P) := [u1(P);:::;um(P)]>, where us(P) :=jPsjP T2PjSTj: Since we consider only positive transaction fees, we focus on those shards with greater usage than average and de ne the loading of shard s2Sby s(P) := max 0;us(P)1 m : These values are collected in the loading vector (P) := [1(P);:::;m(P)]>, and we can now quantify the shard balance in the transaction pool as BP(S) := 1X s2Ss(P): (3) Note that by de nition, BP(S)2[0;1). We can now ex- press the total transaction eciency as the shard balance divided by the mean cardinality of all transactions in the pool: FP:=BP(S) 1 jPjX T2PjSTj: (4) As an example, for the middle block in Figure 1, the shard usage is u(P) = (0 8;4 8;4 8;0 8)>, resulting in the loading vector (P) = (0;1 4;1 4;0)>and total shard balance BP(S) =1 2. Since the mean cardinality is one, the transaction eciency is1 2. For the left block in Figure 1, since the shard balance is one and the mean cardinality is two, the transaction eciency is also1 2. The block on the right achieves the maximum transaction eciency of 1. 3.1 Expected transaction eciency We introduce for each edge ( i;j)2 E along which a transaction can take place, a shard request distributionwij:= [wij1;:::;wijm]>, wherewijsdenotes the proba- bility that agent iwill choose shard swhen requesting a transaction from agent j. Similarly, we de ne a shard sending distribution vij:= [vij1;:::;vijm]>, wherevijs denotes the probability that agent jwill choose shard s when sending a transaction to agent i. These randomized distributions, which lie on a probability simplex (each wijs0 andPm s=1wijs= 1, and similarly for vij), model the initial uncertainty about the shards used by neigh- boring agents and how such uncertainty evolves toward deterministic choices. Expected cardinality: We can now write the expected cardinality of transactions between agents iandjas: E[jSTj] =w> ijPcardvij = [wij1wij2wijm]"1 22 2 12 ............ 2 21#2 4vij1vij2 ... vijm3 5;(5) wherePcardis a matrix that encodes the expected car- dinality when the agents request transactions from each other in the shards corresponding to the row and column of each entry. Expected shard balance: Similarly, we can express the expected shard balance as follows: E" 1X s2STs(P)# =w> ijPbalvij= [wij1wijm]2 41111211m 1121212m ............ 11m12m 1m3 5"vij1 ... vijm# ; (6) wherePbalencodes the shard balance values correspond- ing to the shards used in the transaction (we omit the argumentPfor a more compact expression). Expected transaction eciency: Based on the de - nition of transaction eciency for the entire transaction pool (4), we de ne the eciency of a single transaction in a given pool as the shard balance of the transaction shards divided by the cardinality: FP(T) :=BP(ST) jSTj: (7) Using (7), we can write the expected eciency of transac- tions from agent jtoi: E[FP(T)] =w> ijPe vij= [wij1wij2wijm]2 66411112 211m 2 112 21212m 2 ............ 11m 212m 2 1m3 7752 4vij1vij2 ... vijm3 5: (8) 4. TRANSACTION PRICING We propose the use of transaction fees to align the individ- ual goals of minimizing fees with the system-wide goal of maximizing throughput. A natural choice is to make the fee proportional to the desired objective, which we have quanti ed as the transaction eciency. Hence, we propose the following pricing function: Transaction T Lane High cardinality High shard balanceLow cardinality Low shard balanceLow cardinality High shard balanceFig. 1. Cardinality and shard balance in three di erent transaction pools assembled into blocks. Rows corresponds to shards and columns represent block slices. The gray boxes symbolize transactions on the underlying shards. f(T;P) :=p0(T) + 1BP(ST) jSTj  max; (9) wherep0(T) is the nominal transaction price, which can vary with computational requirements and market de- mand,maxis the maximum transaction fee, and is a free parameter that can be used to calibrate the cardinality estimate or to further discourage multi-shard transactions. Note that the price includes one minus the transaction eciency since the price should be low when the eciency is high. To simplify the remaining analysis, we assume that p0(T) = 0 andmax= 1 unless otherwise stated. However, it is straightforward to extend the analysis to include these parameters. While (9) de nes the price for a particular transaction, the expected price of a future transaction requested by agent ifrom agent jis given by: E[ij] = 1w> ijPvij= 1 [wij1wij2wijm]2 66411112 2 11m 2 112 2 1212m 2 ............ 11m 2 12m 2  1m3 7752 4vij1vij2 ... vijm3 5: (10) The expression (10) provides a direct link from the trans- action price (9) to the agents' optimal choice of shards in which to request transactions for the case of agents that wish to minimize long-term expected transaction fees ( r= s= 0), allowing us to rewrite (1) as follows: w ij:= arg max wij2mw> ijPvij; (11) where w ijdenotes an update to the shard request distri- bution wijand mdenotes the m-dimensional probability simplex. The update (11) is indeed a best response of agent i(in mixed-strategy space) to the mixed strategy of agent j. Similarly, the sender's optimal shard choice distribution is given by v ij:= arg max vij2mw> ijPvij; (12) Since the sender also seeks to minimize long-term expected transaction fees, this distribution update is indeed inde- pendent from the choice of the receiver. There is an important class of multi-player games called potential games , in which players choose actions to max-imize their individual utility functions, which in turn in- creases some global utility function (Monderer and Shap- ley, 1996). A key property of potential games is that when agents act to improve their utility functions, the system is guaranteed to converge to a Nash equilibrium, which is a state in which no action by any single agent will increase their utility. In potential games, Nash equilibria also correspond to maxima of the global utility function. We de ne potential games in precise terms below. LetSidenote the space of actions for a single agent and let S:=Sn idenote the set of all actions in the system. Denote byui: the utility function of agent i. Together these de ne a game for the nagents, and such a game is said to be a potential game if there exists a function H:S!Rsuch that for any agent i2Aand any pair of actions a;a02Si (whereaidenotes the actions of all agents except i): H(a0 i;ai)H(ai;ai) =ui(a0 i;ai)ui(ai;ai): Indeed we can show that the proposed pricing mechanism induces a potential game over the transaction edges with the following potential function: H:=X (k;l)2Ew> klPvkl: (13) Theorem 1. The game where nagents connected by the edgesEupdate their shard request and sending distri- butions according to the edge-utility functions uij:= w> ijPvijis a potential game with the potential function (13). Proof. Given an edge ( i;j)2E, suppose agent iupdates its shard request distribution for this edge from wijtow0 ij. Then, the change in the edge utility function is equal to u0 ijuij= (w0 ijwij)>Pvij. The resulting change in the potential function is H0H:= (w0 ijwij)>Pvij; since the only change was to agent i's shard request distribution from agent j, which is exactly equal to the change in the edge utility function uij. Similarly, if agent jupdates its shard sending distribution for this edge from vijtov0 ij, then the change in the edge utility function is equal toH0 ijHij=w>(v0 ijvij), which is also equal to the change in the potential function, completing the proof. Although the case we have analyzed is somewhat sim- pli ed, the fact that it constitutes a potential game is important because it ensures not only that the agents' incentives are aligned with the global objective, but that rational choices by the agents will result in convergence of the system to a maximum of the global potential function, which in our case corresponds to transaction throughput. And their choices need not be optimal { the only require- ment is that agents take actions that increase their local utility function (lower their expected future transaction price). This means that even deterministic shard choices (pure strategy best or better responses) will lead to conver- gence. For example, a pure strategy best response update is given by replacing the probability simplex  min (11) with the set of all pure strategies  m:=fw2m:ws2 f0;1gfor eachs2Sg . A potential problem with the approach described so far is that the update (11) assumes that agents know the shard request or sending distribution of their transacting neighbors along each edge, which would require additional communication between agents. To resolve this, let's as- sume that agents keeps estimates ( ^vijfor the receiver, ^wijfor the sender) of the shard request and sending distributions of each neighbor, constructed simply from the normalized histogram of past transaction requests. The new update rules that rely only on information available to the respective agents are then: w+ ij:= arg max wij2mw> ijP^vij; (14) v+ ij:= arg max vij2m^w> ijPvij: (15) This turns out to be an example of ctitious play in game theory, where agents estimate strategies of other players based on empirical distributions. Indeed, multiplayer po- tential games in which players act to improve their utility using ctitious play are known to converge to a Nash equilibrium (Marden et al., 2009). The optimizations (14)-(15) are readily solved via linear programming, and the deterministic (pure-strategy) case is an integer program that reduces to nding the maximum entry in am-dimensional vector: w+ ij:= arg max wij2mw> ijP^wji =es;wheres= arg max s2SPs^wji; (16) where esrefers to column sof themmidentity matrix, and Psdenotes row sof the matrix P. A similar modi cation can be made for the sending shard update. The computational complexity of the pure-strategy and mixed-strategy optimizations are linear and polynomial (due to the complexity of linear programming, e.g. (Cohen et al., 2019)), respectively. 5. SIMULATIONS In this section, we investigate the performance of a simu- lated blockchain ledger with transaction price (9) in which agents update their shard request distributions with pure strategy best response updates (16).5.1 Ideal case We begin with a simple scenario to test the pricing mech- anism under ideal conditions. Suppose that 20 agents transact with two neighbors each via a ring network on a ledger with 4 shards. Each block contains 2500 slices meaning that the maximum capacity is 10000 transac- tions per block. In this scenario, agents start with an arbitrarily large initial balance (1 e6) in one shard (such that the resources in these shards will not be depleted), staggered among the agents, and transactions of a small xed amount (10) are generated randomly by rounds. That is, each of the 38 edges in the network executes a transaction in random order, and then the process repeats in a new random sequence until 5 blocks are eventually completed. In the gures that follow, the x-axis corresponds to the transaction index, where anytime one shard reaches maxi- mum capacity, a block is assembled (indicated by the verti- cal grid lines) and the transaction pool resets to zero. The top panel shows the proportion of transactions contained in each shard, resulting in the balance value shown on the second panel. The third panel shows the mean transaction cardinality and the fourth shows the transaction eciency calculated for each block. As a baseline, Figure 2 shows the result of assigning transactions to random shards, modeling a standard hash-based sharding protocol. We observe that the randomized policy achieves a reason- ably even distribution among the shards, but since the mean cardinality is quite high, the eciency is only about 50%, yielding 25899 transactions in 5 blocks. 0.250.50trans. pool 0.81.0shard bal. 012cardinality 0 5216 10416 15603 20756 25899 trans.0.00.51.0efficiency Fig. 2. Fixed price and random shard requests on 20-agent ring network with 4 shards. Next, we apply load-minimizing pricing by setting = 0 in (9) and allowing the agents to update their shard requests with best-responses. Figure 3 shows that the loading stays very low, but the transaction eciency remains below 60%, because the agents still have no incentive to transact in a single shard and therefore engage in frequent multi-shard transactions. Finally, we see in Figure 4 that combining the proposed pricing mechanism ( = 0:001) with best-response updates results in high shard balance and low cardinality and therefore almost perfect transaction eciency. 0.250.50trans. pool 0.81.0shard bal. 01cardinality 0 6358 12837 19247 25626 31982 trans.0.00.51.0efficiencyFig. 3. Congestion pricing with best-response update on 20-agent ring network with 4 shards. 0.20.4trans. pool 0.51.0shard bal.request actual 01cardinality 0 9323 19231 29207 39197 49187 trans.0.00.51.0efficiency Fig. 4. Eciency pricing with best-response update on 20- agent ring network with 4 shards ( = 0:001). 5.2 Larger random networks In the next simulation study, we construct a directed random network with a long-tailed degree distribution using a preferential attachment model. Also, instead of generating transactions on repeated random sequences of edges, we generate them uniformly at random on the edges. Blocks in this scenario contain 12500 slices and thus a maximum capacity of 100000 transactions. In this case, we initialized the agents with arbitrarily large balances in each shard. Figure 6 shows that network still converges to a high transaction eciency compared to the baseline shown in Figure 5. The gray data in the loading plot shows how evenly distributed the shard requests are throughout the network. As the agents acquire more information about the shard preferences of their neighbors, the shard requests converge to align with the corresponding send requests while maintaining a balance across shards. The values of in both simulations were chosen by manual tuning, and the results are somewhat sensitive to small changes in this parameter. An automated tuning method for would be a useful direction for future research. 0.10.2trans. pool 0.91.0shard bal. 012cardinality 0 50340 100653 150926 201270 251549 trans.0.00.51.0efficiencyFig. 5. Fixed pricing with random shard requests on 100- agent scale-free network with 8 shards. 0.10.2trans. pool 0.81.0shard bal.request actual 01cardinality 0 98702 198385 297663 397049 495244 trans.0.00.51.0efficiency Fig. 6. Eciency pricing with best-response update on 100-agent directed random network with 8 shards ( = 0:00015). 6. CONCLUSIONS AND FUTURE WORK The pricing function (9) induces a potential game for the users of a sharded blockchain ledger, such that is in their interests to choose shards in a way that promotes ideal throughput conditions on the ledger. Both the estima- tion of shard request distributions and the deterministic best-response policy are implementable with simple and fast computations, and guarantee convergence to a Nash equilibrium under some practical simplifying assumptions. Simulations demonstrate the e ectiveness of the policy in various conditions. We plan to extend the approach in several ways. For example, there is currently no mechanism that would encourage agents to request from di erent neighbors in the same lane, although this would seem reasonable in practice, especially if resources are scarce. This could be achieved by adding a term that encourages agents to align shard requests with their resource balance. We also intend to more explicitly account for varying costs of transaction and smart contract execution and storage. ACKNOWLEDGEMENTS We are grateful to Marcin Abram and Jin-Mann Wong for insightful technical discussions and for help in editing the paper. REFERENCES Buterin, V. (2016). Ethereum: Platform review. Op- portunities and Challenges for Private and Consortium Blockchains . Cohen, M.B., Lee, Y.T., and Song, Z. (2019). Solving linear programs in the current matrix multiplication time. In Proceedings of the 51st annual ACM SIGACT symposium on theory of computing , 938{942. Corbett, J.C., Dean, J., Epstein, M., Fikes, A., Frost, C., Furman, J.J., Ghemawat, S., Gubarev, A., Heiser, C., Hochschild, P., et al. (2013). Spanner: Google's globally distributed database. ACM Transactions on Computer Systems (TOCS) , 31(3), 8. Croman, K., Decker, C., Eyal, I., Gencer, A.E., Juels, A., Kosba, A., Miller, A., Saxena, P., Shi, E., Sirer, E.G., et al. (2016). On scaling decentralized blockchains. InInternational Conference on Financial Cryptography and Data Security , 106{125. Springer. Crosby, M., Pattanayak, P., Verma, S., Kalyanaraman, V., et al. (2016). Blockchain technology: Beyond bitcoin. Applied Innovation , 2(6-10), 71. Kokoris-Kogias, E., Jovanovic, P., Gasser, L., Gailly, N., Syta, E., and Ford, B. (2018). Omniledger: A secure, scale-out, decentralized ledger via sharding. In 2018 IEEE Symposium on Security and Privacy (SP) , 583{ 598. IEEE. Luu, L., Narayanan, V., Zheng, C., Baweja, K., Gilbert, S., and Saxena, P. (2016). A secure sharding protocol for open blockchains. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security , 17{30. ACM. Marden, J.R., Arslan, G., and Shamma, J.S. (2009). Joint strategy ctitious play with inertia for potential games. IEEE Transactions on Automatic Control , 54(2), 208{ 220. Monderer, D. and Shapley, L.S. (1996). Potential games. Games and economic behavior , 14(1), 124{143. Narayanan, A., Bonneau, J., Felten, E., Miller, A., and Goldfeder, S. (2016). Bitcoin and cryptocurrency tech- nologies: a comprehensive introduction . Princeton Uni- versity Press. Saraph, V. and Herlihy, M. (2019). An empirical study of speculative concurrency in ethereum smart contracts. arXiv preprint arXiv:1901.01376 . Zamani, M., Movahedi, M., and Raykova, M. (2018). Rapidchain: Scaling blockchain via full sharding. In Pro- ceedings of the 2018 ACM SIGSAC Conference on Com- puter and Communications Security , 931{948. ACM.
{ "id": "2009.00319" }
2204.05884
A Decentralized Resource Management System Proposal For Disasters: NGO-RMSD (STK-AKYS)
Disaster and emergency management are under the responsibility of many organizations and there are serious coordination problems in post-disaster crisis management. This paper proposes a decentralized non-governmental organization resource management system for disasters (NGO-RMSD / STK-AKYS). This system is based on blockchain technology and it will enable the non-governmental organizations (NGO) and public institutions to manage and coordinate the resources in a trusted environment in the case of disasters. A proof of concept implementation is developed by using the Quorum blockchain framework which is more energy-efficient than crypto currency-based blockchain solutions. Smart contracts are developed for the autonomous working of the system. These smart contacts are used for the verification of the needs of the one who is in need, delivering resources to the right people, and identifying the urgent needs. The system aims to reach more disaster victims in a more timely manner. NGO-RMSD is designed according to the needs of the NGOs in the field. The application is shared with the free software license and further development with the community is aimed.
http://arxiv.org/pdf/2204.05884v1
Arzu Özkan, Umutcan Korkmaz, Cemal Dak, Enis Karaarslan
cs.CY
cs.CY
A Decentralized Resource Management System Proposal For Disasters: NGO-RMSD (STK-AKYS) 1stArzu ¨Ozkan Department of English Language & Literature Mu˘gla Sıtkı Koc ¸man University Mu˘gla, Turkey arzuozknn8@gmail.com2ndUmutcan Korkmaz Department of Computer Engineering Mu˘gla Sıtkı Koc ¸man University Mu˘gla, Turkey kmmzurtkcn@gmail.com3rdCemal Dak Department of Computer Engineering Mu˘gla Sıtkı Koc ¸man University Mu˘gla, Turkey cemal.dak@gmail.com 4thEnis Karaarslan Department of Computer Engineering Mu˘gla Sıtkı Koc ¸man University Mu˘gla, Turkey enis.karaarslan@mu.edu.tr Abstract —Disaster and emergency management are under the responsibility of many organizations and there are serious coordination problems in post-disaster crisis management. This paper proposes a decentralized non-governmental organization resource management system for disasters (NGO-RMSD). This system is based on blockchain technology and it will enable the non-governmental organizations (NGO) and public institutions to manage and coordinate the resources in a trusted environment in the case of disasters. A proof of concept implementation is developed by using the Quorum blockchain framework which is more energy-efficient than crypto currency-based blockchain solutions. Smart contracts are developed for the autonomous working of the system. These smart contacts are used for the verification of the needs of the one who is in need, delivering resources to the right people, and identifying the urgent needs. The system aims to reach more disaster victims in a more timely manner. NGO-RMSD is designed according to the needs of the NGOs in the field. The application is shared with the free software license and further development with the community is aimed. Index Terms —Disaster, Non-Governmental Organizations, Cri- sis management, Organization, Source management, Coordina- tion, Blockchain I. I NTRODUCTION The disaster management processes of the local govern- ments are not sufficient even in developed countries such as Japan and America [1]. Disaster and emergency management are under the responsibility of many organizations, there are critical coordination problems in post-disaster crisis manage- ment. Non-governmental organizations and volunteers have signif- icant roles and contributions in the case of disasters. Today, NGOs intensely work on the following about the disasters: Support the preparation of communities for the disasters Work on the reduction of pre-disaster risks and post- disaster losses, Work on short-term intervention, and long-term improve- ment efforts. Without the help of voluntary organizations, it does not seem possible for local governments and the state to meetthe needs of disaster victims. There is a need for Joint disaster management that is possible by assigning the roles of voluntary organizations at all stages of the disasters and establishing coordination between parties [2]. The duty of NGOs is to support local governments and the public, as needed especially in times of crisis within the framework of their chosen mission [3]. As an example; Ahbap NGO took an active role in the post-disaster process after the 6.8 magnitude earthquake in Elazig Sivrice/TURKEY , which happened in January 2020. One of our team members, who was an active Ahbap volunteer in this aid team, observed the following: Non-governmental organizations working in the disaster area act independently of each other There is a deficiency and problem to reach the real needy people The resources can not be used efficiently. When NGOs are analyzed, it is seen that there are a variety of NGOs which have different missions and visions. Each has various resources and strengths. The most significant defi- ciency that we have observed in the post-disaster management is; the coordination problem between NGOs and the govern- ment. This results in the efficient usage of the capabilities. This situation causes deficiencies in resource management and slows down the post-disaster recovery efforts. In the next section, the fundamentals will be given. Then the related works will be given in Section 3. In Section 4, details of the system proposal are given. The proof of concept implementation of NGO-RMSD system is given in Section 5. Conclusion and future works will be given in the last section. II. F UNDAMENTALS A. Blockchain Blockchain is a distributed ledger technology that ensures trust between the users without an intermediary. This is accomplished by keeping track of records linked to eacharXiv:2204.05884v1 [cs.CY] 12 Apr 2022 other[4]. The records are called transactions and transactions are bundled into blocks at the nodes (the computers that are in charge of the blockchain system). These records are stored in immutable record storage called the ledger. Since the blockchain system is distributed, there is a need for a way that the nodes can agree upon the transactions, blocks, etc. Consensus protocols are used in blockchain networks to provide that functionality to the distributed system. The consensus protocol in the blockchain is chosen according to the type of the blockchain. Different types of blockchain networks exist. Their types mainly depend on who can join as a node and participate in the network and also the visibility of the blockchain records. Public/private types are according to the visibility of the records. In public blockchain networks; all the transactions in the network are visible by anyone on the internet. Private networks only allow authorized users to reach the records. Permissioned/Permissionless type determines who can join and participate in the network. Anyone can join permissionless networks. In Permissioned networks, nodes need to be allowed by an authority of the network to join in and participate. Bitcoin [4] is an example of a Public/Permissionless network while Quorum [5] and R3 Corda [6] are examples of Pri- vate/Permissioned networks. B. Resource Management Need According to The Republic of Turkey Ministry of the Interior Disaster and Emergency Management Presidency Earthquake Office Management’s general earthquake statistics report by years in Turkey; Earthquake rates in Turkey are increasing every year. In the last century, 192 damaging earthquakes occurred in Turkey, one hundred thousand citizens died, and more than 650 thousand houses were demolished or damaged heavily [7]. After our researches and interviews, ˙It’s concluded that there is a lack of coordination and resources management in post-crisis management in Turkey. These problems are in the following areas: Coordination between NGOs Management of human resources Resource management –Logistics –Storage –Distribution Post-disaster necessity tracking –Verifying the necessity –Support tracking and management –Tracking the provided support –Preventing abuse of resources and supports Protection of trust in NGOs C. The need for coordination Between NGO’s NGOs, which have voluntary activities in disaster situations, have access to different resources such as aid and human resources. It is very important to provide coordination betweenNGOs to manage these resources correctly. The collaboration of NGOs will enhance the post-disaster recovery. Autonomous systems can be used to manage these resources effectively and promptly. In this context, utilizing the tech- nology’s facilities can have the potential to simplify resource management and ensure coordination. III. RELATED WORKS There are few studies on disaster management. The use of decision support systems for this purpose is discussed in [8]. Usage of digital twins is given in a recent study [9]. Interestingly, there are comprehensive open-source solutions such as SAHANA EDEN (https://sahanafoundation.org/) that have several functions. Interestingly, Sahane Eden or similar solutions are not that widely used. Our interviews with experts in the field and NGOs revealed some possible reasons for that. It is mainly because these solutions are not built with people in the field. Also, there is always a need for transparency of the transactions and a trust issue in the used systems. Blockchain technology can be used to overcome these needs. Blockchain technology can remove intermediaries and ensure trust. Blockchain technology was mostly used for cryptocurrency implementations and is famous for high energy usage. However, with the advance in enterprise blockchain frameworks, it is possible to obtain a trusted environment with- out high energy usage. Different fields of using blockchain are possible such as supply chain, sharing medical information, AI marketplace, DAO machines economy, etc. Also, blockchain can be used for social impact [10]. There are a few decentralized system proposals in the literature regarding this topic. These are mostly for collecting monetary aid [11] or disaster/refugee aid scenarios [12]. An interesting study [13] is about integrating IoT and blockchain in the supply chains of various units to increase the efficiency and effectiveness of humanitarian aid. These papers mostly do not contain technical details and also do not involve NGOs. A very recent study [14] gives a theoretical model which questions the applicability of a trusted supply chain for humanitarian aid. We are not aware of a resource management system for disasters that focuses on NGO collaboration. We focused on generating a prototype to make a social impact. IV. SYSTEM PROPOSAL The proposed NGO-RMSD is shown in Figure 1, nodes to be found in the blockchain network will be added by non-governmental organizations within the system by using blockchain technology. All transactions performed on the system for each node will be saved encrypted in a tamper-proof way. Actors within the distributed application to be created with smart contracts to be deployed on the blockchain network are as follows; Non-Governmental Organizations: V oluntary platforms that are approved by the ministry, supporting local gov- ernments and ministries in case of disasters. People In Need: Materially and morally damaged victims due to disasters. Fig. 1. Basic design of the NGO-RMSD System Supporter: People, institutions, or organizations that are wishing to provide in-kind and cash support to disaster victims. A. Architecture The overall system consists of two parts that are given in Figure 2. A Quorum network for the nodes of the NGO’s and the web service. Those two parts will communicate via Web3JS library from node to JS Back-End. Front-End includes HTML and CSS code to present users from varying platforms with a web page interface. Front-End and Back- End components of the web service will communicate via the ReactJS framework. To initialize the system, our research group will install the initial (startup) nodes of the network. There is no defined minimum node number, the more the better. The first node account (of the first node) added to the system will have the role “admin”. After the initialization of the system, the account with the admin role will distribute the admin roles to the regarding accounts (pre-defined accounts on the pre-defined nodes) according to the protocol of the community. At least one node for each NGO is required in the blockchain network to represent the institution. As the system will run in a docker image, there is no need to reserve the node machine only for this purpose. This machine may also be used for general computing purposes by the NGO. The volunteers or staff of the NGOs are going to create their accounts via those nodes. These accounts are needed to check the support offers or requests and take action. RAFT is chosen as the consensus protocol of the proposed system. This protocol uses the “leader-follower” role principle where the leader node is selected internally in the network. The leader and follower nodes can be thought of as minter and verifier nodes in Ethereum. The leader node mines a block to the network while follower nodes verify it. Every node has the chance to be a leader, they have to mine a block for this. Every node has an enode ID that has the raftport parameter as a query string. This parameter will be used to define the communication port that will be used for communicating with the other nodes. These definitions are grouped in the static-nodes.json file. Every node should have the same static-nodes.json file in its filesystem. The addition of another node or another NGO to the system is as follows: Fig. 2. NGO-RMSD System Architecture 1) The candidate NGO node installs the required Docker image. 2) A node can not be initialized as the leader, there is an election for it in RAFT protocol. So every node is added as a new follower node. 3) The required files with the candidate node’s information (static-nodes.json, node keys, etc. ) should be set. The details will be given in the project Github page. 4) The static-nodes.json files of all nodes in the network need to be updated. 5) One node in the network has to run eth.addPeer() command from its geth RPC console with the enode ID of the candidate node. Then, a new node is added and running functionally in the network. We are currently working on automation for this process and the automatization process will be given on the project Github page. B. Smart Contracts Although the blockchain concept is said to be decentralized, not all solutions have to be like that. Private/Permissioned networks like Quorum are not fully decentralized. The system gives privileges to some authorities to add nodes or users. The proposed system aims to form trust and transparency. NGOs have the ADMIN role which has the privileges that can set the user’s roles as CHECKER or CREATOR. Also, NGOs with the ADMIN privileges add the new NGOs to the system. Users are assigned roles in the smart contract structure. These roles are as follows: 1) Admin: Admin is the system administrator. 2) Checker: The role of the checker belongs to NGOs and is used to check whether the proposed support or request is correct. 3) Creator: The role of the creator is open to everyone and it is required to make a request or support offered. Smart contracts are written for the following functions: 1) Role Assignment and Listing Functions: These are called by the system administrator and they aim to assign the role to the user with the setUser function and to display the role of the user with the getUserAuth function. 2) Authority-Role Control Modifier Functions: These func- tions are called by the organizer to compare the hash of the user’s role with the hash of the role assigned to the user. 3) Requirement Creation Function: This function enables users in the role of “Creator” to create a new need with the data that they enter. Need; is created with features such as type, and amount. The created need is put in the need list and the label ”waiting for confirmation” is added. 4) Support Creation Function: This function enables users in the role of ”Creator” to create new support with the data that they enter. Support; is created with features such as type, amount, and shipping type. The created support is added to the support list and the label ”waiting for approval” is added. 5) Approve Functions: These functions enable users with the role of ”Checker” to confirm the needs and supports labeled ”waiting for approval”. While the approveNeed function confirms the pending needs, the approveSupport function confirms the pending supports. Once the need is approved, the label changes to ”approved” and not ”waiting for approval”. Once the support has been approved, it is added to the approved support list. 6) Request-Support Listing Functions: These functions are used to display all needs and supports. While the showSupport function listed the known support, the showSupports function shows all the supports. The showAllApprovedSupports function lists approved sup- ports. The showNeedOffers function lists all the needs records while the showNeed function lists the known need records. The last 2 functions (showNeedStatus and showSupportSta- tus) could be run by users with the role of ”Checker”, and these are in charge to list the known requests and supports confirmation status. C. System Application Flow Application flow of the system as shown in Figure 3, the user chooses their application type. That application is sent to the Quorum node and stored as an unapproved application. A transaction is sent to the network and the ledgers of nodes get updated. If there are any unapproved applications in the network, an NGO Staff checks the application by communicating with the user that applied. If the application is valid, in that case, the requirement is real or support is accurate; the information of the applicant user is written into the local database, and the application gets approved. After the application validation, the application is stored as an approved application. Then, another transaction is sent to the network, and the ledgers of nodes get updated again. If there are no unapproved applications, the application flow process is finished. Fig. 3. System Activity Diagram V. IMPLEMENTATION The default system works initially as three nodes with two NGOs. To participate in the network and the system, each NGO must add at least one node. The scenario with five nodes was executed. The proof of concept implementation of NGO-RMSD is implemented on the Quorum framework. The Quorum framework, which provides corporate solutions, is used as blockchain technology. It offers a private/permissioned blockchain structure with low energy consumption [5]. Docker container technology is used to integrate this system into every platform. The system does not need special hardware and does not need high power. Ordinary virtual machines (single CPU, 4 GB ram, 256 GB disk) are used for the nodes. Web3JS is used for the communication between the Quorum network and Web interface backend. Solidity language is used to write smart contracts. RAFT protocol is used as the consensus protocol as it can support more nodes than Istanbul Byzantine Fault Tolerance (IBFT). NodeJS is used in the backend because it provides the asynchronous functionality that this application needs. The privacy of personal data is prioritized in the design. Turkish Law on the Protection of Personal Data (KVKK) [15] and the EU General Data Protection Rules (GDPR) [16] requirements are taken into consideration. Since it is not possible to delete the data on the blockchain, the storage of personal data in the blockchain constitutes a situation that is not suitable for personal data protection laws. In our design, personal data will never be stored on the blockchain. Personal data will be stored in a private database instead, which could be deleted at any time by NGOs. In a privacy breach case, it will be the NGO’s responsibility if it didn’t take the required actions to apply to the necessary legal processes. However, Non-interactive zero-knowledge proof (NIZK) based autonomous codes can be developed to ensure privacy [17], which is out of the scope of this study. In this project, open-source and free software licensed soft- Fig. 4. Request and Support Forms Fig. 5. Interface to track approved requests ware is used, and dependency on any company or institution is minimized. This project is also published on the Github page. The prototype is created appropriately with the scenario specified. Requirement Creation, Requirement Confirmation, Support Creation, Support Confirmation, Support, and Re- quirement Listing processes are directed to smart contracts running on nodes in the Quorum network through the web interface. A. Smart Contracts The smart contract is open to improvement and updating and debugging process continues. The recent version of the contract structure and functions are given on the public Github page https://github.com/MSKU-BcRG/akys. B. GUI Design Prototype web interfaces of the system are designed. Disas- ter victims can make requests or give support through forms that are shown in Figure 4. All operations in the system are stored on the blockchain as transactions. All the users can track the status of the transactions through the web interface that is given in Figure 5.VI. ACKNOWLEDGEMENT This study won the second prize in the TUB ˙ITAK 2242 University Students Research Project Competition in the field of “Information and Communication Technologies” in 2020. VII. RESULTS AND CONCLUSION Decentralized resource management and NGO coordination system are proposed for disasters in this study. The proposed NGO-RMSD system will enable NGOs and public institutions to act in coordination in the case of disasters. A trusted system is designed where all transactions are transparent. Proof of concept implementation of the proposed system NGO- RMSD had promising results. Smart contracts which allow the autonomous working of the system is written and tested on the live platform. Coordination of NGOs will be provided with this system which will lead to improvements in workforce and resource management. The proposed system will enable NGOs to reach more people in need. Also, it will ensure urgent needs could be determined to resolve as soon as possible. Users’ personal data’s unauthorized sharing will be prevented and made sure that the data-sharing is legal. The smart contracts and project details of the system are shared on the project’s Github page with a free software license. We are in contact with related NGOs and further development with the community will continue. The live tests of the proposed system is being implemented in the DS4H blockchain research network. Dynamically establishing new nodes and the automation for the authentication will be given on the project’s Github page. Details of the project can be reached at http://wiki.netseclab.mu.edu.tr/index.php?title= STK-AKYS. In future works, it is aimed to ensure that the system is easily integrated into new laws and regulations. The personal data will be protected autonomously with new smart contracts. It is also aimed to create a more efficient system by integrating the data collected in the system with the data collected from the territory. The collected data will be processed with artificial intelligence. The requirement and support requests will be matched by using natural language processing and machine learning. A dataset for machine learning processes will be formed with the collected data on the live system. Thus, the data to be entered into the system could be cleared by using Natural Language Processing (NLP) and a classification algorithm could be applied with keywords. It will be possible to apply the need and support matching infrastructure through this classification algorithm. In all these processes, preliminary studies will be done to receive extra information from the Twitter environment with sustained queries to be made with these keywords. REFERENCES [1] Ulu ˘g, A. (2009). Nasıl bir afet y ¨onetimi [What kind of disaster man- agement], TMMOB ˙Izmir Kent Sempozyumu, ˙Izmir, 1-18. [2] Mustafa, K. A. Y . A. Afet Y ¨onetiminde Sivil Toplum Kurulus ¸ları Ve G ¨on¨ull¨ul¨uk˙Is ¸levi. [Civil Society Organizations And V olunteering Function In Disaster Management]. [3] Birles ¸mis ¸ Milletler G ¨on¨ull¨uleri. (2011). T ¨urkiye’de g ¨on¨ull¨ul¨uk [V olun- teering in Turkey] (c ¸ev. Bordo Terc ¨ume B ¨urosu ve E. Erdem). [4] Nakamoto, Satoshi. Bitcoin: A peer-to-peer electronic cash system. Manubot, 2019. [5] Baliga, A., Subhod, I., Kamat, P., & Chatterjee, S. (2018). Perfor- mance evaluation of the quorum blockchain platform. arXiv preprint arXiv:1809.03421. [6] Mohanty, Debajani. R3 Corda for Architects and Developers: With Case Studies in Finance, Insurance, Healthcare, Travel, Telecom, and Agriculture. Apress, pp. 49-50, 2019 [7] Genel istatistikler, [General statistics], AFAD, https://deprem.afad.gov.tr/genelistatistikler [8] Yaqoob, Lubna, N. Ahmed Khan, and Fazli Subhan. ”An overview of existing decision support systems for disasters management.” Sci Int (Lahore) 26 (2014): 1765-76. [9] Fan, Chao, et al. ”Disaster City Digital Twin: A vision for integrating artificial and human intelligence for disaster management.” International Journal of Information Management (2019): 102049. [10] Al-Saqaf, Walid, and Nicolas Seidler. ”Blockchain technology for social impact: opportunities and challenges ahead.” Journal of Cyber Policy 2.3 (2017): 338-354. [11] Nor, Rizal Mohd, et al. ”Blockchain sadaqa mechanism for disaster aid crowd funding.” Proceedings of the 6th International Conference on Computing and Informatics: Embracing Eco-Friendly Computing, Kuala Lumpur. 2017. [12] McIsaac, Joseph, et al. ”Blockchain Technology for Disaster and Refugee Relief Operations.” Prehospital and Disaster Medicine 34.s1 (2019): s106-s106. [13] Aranda, Daniel Arias, Luis Miguel Molina Fern ´andez, and Vladimir Stantchev. ”Integration of Internet of Things (IoT) and Blockchain to increase humanitarian aid supply chains performance.” 2019 5th Inter- national Conference on Transportation Information and Safety (ICTIS). IEEE, 2019. [14] Dubey, Rameshwar, et al. ”Blockchain technology for enhancing swift- trust, collaboration and resilience within a humanitarian supply chain setting.” International Journal of Production Research (2020): 1-18. [15] [dated 24.3.2016 numbered 6698 Personal Data Protection Law] https: //www.mevzuat.gov.tr/MevzuatMetin/1.5.6698.pdf, Last access date : 2 April 2020 [16] Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free [17] Feng, Q., He, D., Zeadally, S., Khan, M. K., & Kumar, N., 2019. A survey on privacy protection in blockchain system. Journal of Network and Computer Applications, 126, 45-58.
{ "id": "2204.05884" }
2211.01000
SoK: Play-to-Earn Projects
Play-to-earn is one of the prospective categories of decentralized applications. The play-to-earn projects combine blockchain technology with entertaining games and finance, attracting various participants. While huge amounts of capital have been poured into these projects, the new crypto niche is considered controversial, and the traditional gaming industry is hesitant to embrace blockchain technology. In addition, there is little systematic research on these projects. In this paper, we delineate play-to-earn projects in terms of economic & governance models and implementation and analyze how blockchain technology can benefit these projects by providing system robustness, transparency, composability, and decentralized governance. We begin by identifying the participants and characterizing the tokens, which are products of composability. We then summarize the roadmap and governance model to exposit there is a transition from centralized governance to decentralized governance. We also classify the implementation of the play-to-earn projects with different extents of robustness and transparency. Finally, we discuss the security & societal challenges for future research in terms of possible attacks, the economics of tokens, and governance.
http://arxiv.org/pdf/2211.01000v1
Jingfan Yu, Mengqian Zhang, Xi Chen, Zhixuan Fang
cs.CR
cs.CR
SoK: Play-to-Earn Projects Jingfan Yu1y, Mengqian Zhang2z, Xi Chen3x, and Zhixuan Fang1;4 1Tsinghua University, Beijing, China 2Shanghai Jiao Tong University, Shanghai, China 3New York University, New York, USA 4Shanghai Qi Zhi Institute, Shanghai, China Abstract. Play-to-earn is one of the prospective categories of decentral- ized applications. The play-to-earn projects combine blockchain technol- ogy with entertaining games and finance, attracting various participants. While huge amounts of capital have been poured into these projects, the new crypto niche is considered controversial, and the traditional gaming industry is hesitant to embrace blockchain technology. In addition, there is little systematic research on these projects. In this paper, we delineate play-to-earn projects in terms of economic & governance models and im- plementation and analyze how blockchain technology can benefit these projects by providing system robustness, transparency, composability, and decentralized governance. We begin by identifying the participants and characterizing the tokens, which are products of composability. We then summarize the roadmap and governance model to exposit there is a transition from centralized governance to decentralized governance. We also classify the implementation of the play-to-earn projects with different extents of robustness and transparency. Finally, we discuss the security & societal challenges for future research in terms of possible attacks, the economics of tokens, and governance. Keywords: Play-to-Earn ·Gamefi ·Tokenomics. 1 Introduction The development of blockchain, especially the emergence of fungible tokens(FTs) and non-fungible tokens (NFTs), is seeing big changes in the business model of gaming industries. By giving value back to the players, the novel play-to-earn (P2E) model has attracted huge attention from the market. In September 2022, there are over 900 thousand active wallets interacting with blockchain-based gaming projects and over 20 million transactions are sent [24]. The earliest blockchain-based gaming projects date back to 2015. These projects store the ownership of players’ in-game assets in blockchains to pro- vide crypto-assets to the players. Launched in 2015, Spells of Genesis [38] is the yyujf20@mails.tsinghua.edu.cn zmengqian.cs@gmail.com xxchen3@stern.nyu.edu Corresponding author: Zhixuan Fang ( zfang@mail.tsinghua.edu.cn )arXiv:2211.01000v1 [cs.CR] 2 Nov 2022 2 J. Yu et al. 1st blockchain-based mobile game and is partnered with Counterparty [13]. In the game, players have to collect cards and fight their enemies. Players interact with the game server governed by the creator EverdreamSoft, except that there is a ‘blockchainization’ button that converts in-game cards to blockchain-based digital assets. When a player with digital wallets of the corresponding blockchain chooses a card and clicks the button, the server will send a transaction to the blockchain to record the ownership of the card on it. Launched in 2017, Cryp- toKitties is a successful game based on Ethereum smart contract [100], hitting over 14,914 users a day at its peak [19]. In the game, players can trade and breed their CryptoKitties through the smart contract by sending transactions to the Ethereum network. Thedevelopmentoftokenstandardsanddecentralizedfinance(Defi)[97]lead to the emergence of various token designs attracting various investors, e.g.Mak- erDAO [27] established its stablecoin [81] in 2017. Defi projects affect the designs of blockchain-based games and also provide secondary markets for game assets trading. The combination of Defi and game is also called Gamefi. Launched in 2018, Axie Infinity [6] is one of the most popular Gamefis, hitting a total NFT transaction volume of over $2 billion by September 2021 [46]. It is a battling game and allows players to collect, raise, breed, battle, and trade digital pets known as Axies. The game attracted 2.8 million monthly active users at its peak by rewarding players with tokens [5]. On the other hand, the high return and the high entry cost incur criticism that there are economic bubbles in these projects, and some may consider these projects as Crypto Ponzi schemes. There- fore, many projects also offer a free-to-play mechanism to reduce the entry cost, e.g., Illuvium and a new version of Axie called Axie Origin [6]. In addition, the transparency of the blockchain may mitigate financial fraud. A P2E project is a typical Gamefi project where players can earn crypto- assets depending on the engagement level in the game as its rule suggests. The rule is called game protocol in this paper and is created by the project founder, e.g., in CryptoKitties, the entrepreneur creates the smart contract. The in-game assets like virtual land, characters, as well as skins, are in the form of crypto tokens, either FTs or NFTs. Also, there can be tokens for the monetary system of the game, such as gems, points, or coins, with which players can purchase the assets. The information of ownership, transaction activities of these tokens are stored on blockchains, which could be public blockchains like Ethereum, or program-specific chains with preferred features. Other than entertaining games mentionedabove,someprojectscalledMetaverse[92],X-to-earn5orcrypto-game ecosystems are also included in our definition of P2E projects, as long as there is a rule or a protocol and players can earn crypto-assets by taking actions defined in the protocol. The P2E project is different from the traditional game in terms of the fol- lowing properties: 5There are move-to-earn and read-to-earn projects, such as stepN [40] and ReadON [34]. SoK: Play-to-Earn Projects 3 – Robustness against single-point failure: any single party can not affect the state of the game. For example, malicious behaviors of the entrepreneur orthefailureofasingleentity’sserversthatexecutethegamewillnotchange the asset ownership of players. – Transparency: the execution of the smart contract is tractable by anyone. – Composability [97] to secondary markets: the function of the smart con- tract of tokens is callable by other contracts so that any standard token can be traded in secondary markets. – Decentralized governance: the updates of the game are decided by the players instead of the project founder. Traditional games are played in a centralized ecosystem where developers retain almost all power over the experience. Players devote their time and effort totheirfavoritegamesandcollectvariouscharacters,weapons,extrapowers,and more. These achievements, however, only value within games. When the game ends, the precious collections will be worthless. People cannot transfer their hard-earned items to another game, exchange them on third-party marketplaces or simply cash them out. In a traditional game model, players do not own the value they created. By contrast, in a P2E project, the four features mentioned above make the tokens valuable outside of the game and realize true ownership of tokens for the players. These features depend on the implementation and token designs, which will be discussed in the remaining of the paper. To the best of our knowledge, this paper is the first systematical paper to review P2E projects. We identify the participants, characterize the economic & governance model, and summarize various purposes of tokens. We discuss the technical roadmap and implementation realization and propose a classification of popular projects. We discuss the security & societal challenges of the projects. Therestofthepaperisorganizedasfollows:InSection2,wediscusstheeconomic & governance model. In Section 3, we discuss the implementation, especially how the data are stored and processed, which reflects different design principles. In Section 4, we discuss the challenges and solutions. 2 Play-to-Earn Games In this section, we discuss the economic & governance model. In Section 2.1, we identify the participants. In Section 2.2, we summarize the tokens in terms of their purposes. Section 2.3 summarizes the flow of tokens in P2E projects and Section 2.4 discusses their development roadmap. In Section 2.5, we discuss the decentralized governance of P2E projects. 2.1 Participants In this paper, we call the world in the game universe and focus on three mainly involved parties of a P2E game: entrepreneur, investor, and player. 4 J. Yu et al. –Theentrepreneur is an individual or a team who designs the game proto- col and launches the game universe. By realizing a series of new ideas, the entrepreneur aggregates capital and provides the game service for profit. –Aninvestor is the person who provides the game project with capital in the form of fiat money or cryptocurrency like Bitcoin. Meanwhile, the investor receives the token issued by the game. This investment process is mainly done through initial coin offerings (ICOs), which is a popular way for the entrepreneur to raise funds in the blockchain. Usually, investors do so out of the expectation that the received tokens will appreciate and bring high returns for them in the future. –Aplayeris the user of the game. He engages in activities allowed in the game ecosystem for entertainment. In this process, the player can obtain various tokens in the game. The players and the investors are differentiated by whether they play the game, or say, take actions that are defined by the game protocol. Investors will buy tokens before the game protocol is created, while the players won’t. 2.2 Tokens In this subsection, we discuss different token designs in P2E projects. For ex- ample, some projects use the same fungible token for funding and incentivizing players,whileotherslikeAxieInfinity[6]andstepN[40]usedualfungibletokens. There are usually many kinds of tokens in a P2E game. The aforementioned token involved in ICOs (also referred to as ICO token in this paper) is fungible and its total circulation is limited or scheduled, e.g., AXS of Axie Infinity [6]. Besides, the game may issue other fungible tokens, e.g., SLP of Axie Infinity (which is called utility token ), mainly for players’ use in the game. Its total supply can be unlimited. In addition, some NFTs will be generated during the play. All tokens in a game including the ICO token, utility token, and NFTs are collectively referred to as project tokens . The possible design purposes of project tokens are summarized as follows. – Funding: to raise money for creating or updating the game universe. For example, ICO tokens can work as funding tokens. – Incentive for players: to reward players for participating in games ( e.g., winning a tournament, or creating content). – Payment: for players to pay to the universe for assets or playing games. – Voting: for voters to participate in the voting when governing the universe. Tokens with the voting function are also called governance token . – Incentive for investors: to reward investors for their staking of funding tokens they bought. – Tokenizinguser-generatedcontent(UGC): torepresentuser-generated contentandmakethecontenttradableasassets.Itisusuallythenon-fungible tokens that achieve this function. SoK: Play-to-Earn Projects 5 – Incentive for implementation: to reward users for their implementation of the project. For example, for the project using project-specific consensus, miners receive the tokens with this purpose as the reward for mining. – Stakeproofforconsensus: toelectleadersorvoterswhenadoptingProof- of-Stake (PoS) [78,87] for the consensus. Table 2 lists the design of token purposes in several popular P2E projects. As can be seen, each project can be characterized by its token designs, e.g., whether to use different tokens as the incentive for players and investors, whether the governance token can be earned by playing, and whether there are tokens that cannot be earned by playing. In addition, we can see that one token can be used for multi-purpose [82], and there can be multiple tokens for the same purpose. This allows game designers to combine tokens with various features to design distinctive projects and deal with complex game ecology. 2.3 Tokenomics In this subsection, we summarize three mechanisms that exist in most P2E projects and introduce the overall flow of tokens. Minting Mechanism. The minting mechanism is a set of rules allowing players togeneratenewtokensinthegame.Thiscanrequireplayers’effortsandconsume players’ tokens. For example, in Axie Infinity, a player consumes its AXS and SLP to breed new Axies NFTs. After mining an NFT, players can do more other than just own it in the universe. They can use the NFT to participate in various events to earn more project tokens, rent them to other players for revenue, or sell them in the market. Staking Mechanism. Staking is a way for investors to earn in the game. Al- though the players can earn this way, we mainly consider the earnings of the investors because if players stake all their tokens, they cannot play the game. A staking mechanism requires token holders to lock their project tokens for a while and promises to pay them interest for this. The interests are also in the form of project tokens and proportional to the number of locked tokens. This could serve as a bright spot to attract investors who can gain wealth by staking to earn. In addition, regarding staking as an approach to money-making money, it can also prevent token holders from overselling their tokens by increasing interest rates. Typically, the system reserves a certain amount of tokens in advance as staking interest (stated in the whitepaper), as well as collecting assets from transaction fees and token flows in the universe ( e.g., consumed tokens for minting NFTs). Treasury Mechanism. To develop a sustainable economy, the treasury mech- anism is designed to collect assets from the universe and then allocate them to certain entities. The treasury funds are primarily in the form of fees from game-related economic activities. Specifically, when consuming tokens to mint NFTs in the game, part of them will be recycled into the treasury. Besides, when a successful NFT sale occurs in the marketplace, some transaction fees will be extracted from the trade. Also, in some activities where the entrepreneur makes money ( e.g., advertisement and subscription service), part of the revenue will 6 J. Yu et al. be put into the treasury. Later, treasury funds are allocated to the ecosystem according to some rules. For example, they can serve as the staking interest or monetary rewards to encourage active contributions to the game’s growth. Fig. 1.The flow of tokens. Flow of Tokens. In this paragraph, we describe the flow of tokens as well as currency in a P2E game, which is illustrated in Figure 1. First, as Line 1 shows, players can gain project tokens or currency through participating in the universe, i.e., taking actions specified by the universe. As a cost, this process also consumes some tokens (see Line 2). Those project tokens paid to the universe will either go to a treasury account for further use or be transferred to a burn address where the token can never be retrieved. Moreover, it may be necessary to hold an NFT when playing. For example, in Axie Infinity, players can earn AXS and SLP by participating in tournaments and attaining top rankings. To join the competition, players should have an Axie NFT in advance. For a new player without such an NFT, he can choose to buy one from other players, using project tokens, fiat money, or cryptocurrencies like ETH. Actually, all project tokens can be traded by players, investors, and the entrepreneur in the marketplace (see Lines 3, 4, and 5). As mentioned, part of the tokens or currency involved in the trade may go to the treasury in the form of transaction fees. In Axie Infinity, ETH can be used for trading an Axie NFT, and after a trade, 4.25% ETH will be paid to the Axie Common Treasury. Those collected project tokens and currencies in the treasury can be distributed to some token holders (see Lines 6 and 7). The distributed method is originally specified in the whitepaper or later decided by the token owners through weighted voting. For example, when Axie Infinity evolves into the period of decentralized organization, AXS holders will vote for the rules on how to distribute AXS and ETH in the Axie Common Treasury to the community. Lines 8 and 9 show the staking process that distributed tokens to particular token holders. In this process, this particular token needs to be staked in a dashboard for some specified period to get the reward, and can not be used for SoK: Play-to-Earn Projects 7 Fig. 2.Roadmap of P2E projects. trading during the period. The token portfolio earned can be different depending on what token is staked and how long the token is staked. 2.4 Roadmap In this subsection, we present the evolution of P2E games, which are built from scratch and then change from centralization to decentralization with the flow of tokens. Most P2E games plan to delegate the governing power to the community, using the project token as a medium. Holders of the governance token will have the right to participate in the decision-making of a certain event. Besides the ICO token, NFTs or other project tokens may be also regarded as the governance token, which varies among different P2E games. At the very beginning, the entrepreneur is the only token holder. During the ICO stage, some ICO tokens are sold to the investors for funds, as shown in Figure 2(a). Along with the token itself, these investors also have the potential rights to manage this game project in the future, if the ICO token is regarded as the governance token. Then in Phase 2, tokens are further dispersed among participants. Players also own the governance token. But in this phase, the game universe is still mainly managed by the entrepreneur. Ideally, the system will eventuallyevolvetoPhase3,namely,itiscompletelymanagedbythegovernance tokenholdersincludingplayersandinvestors.Theycanvotefortheimprovement of the game. For example, they may vote on whether to pass a proposal about addinganewfeaturetothegame.Iftheproposalpassed,theyalsoneedtodecide the amount of reward for attracting someone to implement this function. Thus, in Phase 3, the players can also earn money by contributing to the universe. 8 J. Yu et al. In addition, the original entrepreneur acts as a player or investor in this phase. Likewise, it can obtain tokens by playing, contributing, or just staking, and it can also participate in governance. 2.5 Decentralized Governance Most P2E projects will gradually evolve into the phase that uses Decentralized Autonomous Organization (DAO) to govern the universe so that players can make decisions for the development of the universe. They can vote for specified parameters or proposals proposed by the community. Their votes are usually weighted by their governance tokens either linearly or quadratically. Various rules, such as the votes threshold to pass a proposal, starting and ending time of voting, and voting rewards are initially decided by the entrepreneur and then updated by the DAO. If multiple tokens are allowed for voting, their relative weightshouldbespecified.Inaddition,participants’behaviorsmayalsoinfluence their voting weight. For example, it can be weighted by the staking period. The governance tokens can be gained through various behaviors in the uni- verse, reflecting different design principles of the project. If a project prefers the longtime or skillful players to be governors, it can make the tokens mainly main- tained by higher-level players have a larger weight when voting. For example, GMT, which is the governance token in Stepn, can only be gained when reaching level 50 and Axie Infinity’s governance token AXS is distributed to high-rank players in tournaments. 3 Implementation In this section, we discuss various implementations of the P2E projects. We focus on how the state of the game universe is stored and updated upon receiving the actions of the participants, where states are the view of the game universe shared by all the participants. Different implementations reflect the design principles of the project, e.g., decentralization, transparency, security, and performance. In Tabel 1, we briefly list the implementations of the projects mentioned in this section and summarize the implementations of several popular P2E projects in Table 3 in more detail. We discuss the principles behind these designs in this section. The structure of this section is as follows. First, we discuss decentralized data storage in Section 3.1. The data in P2E projects can be stored in either a central server or decentralized nodes connected by P2P networks. Data stored in central servers are vulnerable to single-point failure, i.e., the entity fails or becomes malicious. In addition, data operations are not transparent. On the other hand, data stored in decentralized nodes may suffer from inconsistency andpoorperformance.Therefore,consensusprotocolsareusedtoresolveconflict states, which is discussed in Section 3.2. In Section 3.3, we discuss bridges and oracles, which are used for communication between separate components. In Section 3.4, we classify these implementations into fully decentralized and hybrid architectures, and discuss the design principles of different implementations. SoK: Play-to-Earn Projects 9 Table 1. The implementations of P2E projects mentioned in Section 3. projects architecture dataimplementationpublicpermission consensusbridgea (Y/N)b(Y/N)cprotocol My Neighbordecentralized alldChromia [12] Y Y BFT -Alice [30] Gala Games [17] hybridAOEthereum [100] Y NNakamoto-otherseGala Node [18] N Nmonitoredf The Sandbox [36] hybridAOEthereum [100] Y NNakamoto - UGC IPFS [50] - - - - GP AWS - - - - Decentraland [15] hybridAOEthereum [100] Y NNakamoto - UGCBitTorrent/IPFS - - - - GPUser front-end - - - - Axie Infinity [6] hybridAOEthereum [100] Y NNakamotoYAORonin chain [35] N Y BFT Illuvium [22] hybridAOEthereum [100] Y NNakamoto - GP AWS - - - - Stepn [40] hybridAO Solana [37] Y N BFT Y AO BSC YY(PoSA) - AO Ethereum Y NNakamoto abridge: Y means the project designs its own bridge. bpublic: Y means public, N means program-specific. cpermission: Y means permissioned, N means permissionless. dincluding asset ownership (AO), UGC, game protocol & its execution (GP). eother game content. fmonitored means monitored by Gala Game. 3.1 Decentralized Data Storage In this subsection, we discuss what to store and how to store it for improving the performance of decentralized data storage. Data in P2E Projects. Various types of data needed to be stored for P2E projects, e.g., game protocols & designs of the universe, player actions, UGC, asset ownership, and various proofs. To explain these data in detail, we consider a Turing machine that stores these data and calculates the corresponding state of the game. This Turing machine is called the systemof the project. The system can contain centralized or decentralized subsystems storing different data. The game protocol and other designs of the game universe are sent to the system by the entrepreneur, to kick off the game universe. The game protocol defines how theplayerscanplaythegameandwhatplayerscanearn, e.g.,howtobattle,gain rewards, and breed Axie NFT in Axie Infinity [6]. It also defines how to update the protocol itself. Other designs can be the appearance of the environment or avatars in the game, e.g., the character design of Axie character. Actions defined by the game protocol are sent by the players to play the game, e.g., registering the identity, purchasing assets, and controlling avatars. Then, the system can calculate asset ownership from the game protocol and the actions of players. UGC is content generated by the players. The content can be tokenized as NFT by the system, and become an asset that can be traded between players. For example, in The Sandbox [36], players can create items with its custom Voxel Engine on top of the Unity engine. In addition, the system can calculate succinct 10 J. Yu et al. proofs for large data and store the proofs and the data differently to improve performance. Next, we discuss how the above-mentioned data are stored in decentralized nodes. An intuitive way is to require each node to maintain a replica of all data. However, there will be a huge cost to store the growing data this way. There- fore, it is necessary to classify the data and store them differently. According to whether it is required for nodes to reach a consensus, data in P2E projects can be basically divided into two categories, necessary data, and unnecessary data. For example, the ownership of assets is necessary because when trading an asset, nodes should verify if the seller owns it. Instead, the raw data of UGC is unnecessary because nodes can use its hash value to represent the data dur- ing the consensus. This will consume less storage and network resources. Also, some intermediate process data is unnecessary after they are aggregated. The necessary data is stored by all nodes participating in the consensus, thus easy to access during the consensus process. On the contrary, the data unnecessary for the consensus can only be saved by part of the nodes. The data inaccessibility issue caused by distributed storage will be discussed in Section 4.1. In addition, we discuss some techniques to enable secure decentralized stor- age in Appendix A, including data structure, upload and download process, and incentives for nodes that provide storage. They are different from those of cen- tralized storage because the decentralized nodes may be malicious, fail, or hard to find, for not having a registered address. 3.2 Consensus In order to have the same view of the game universe, nodes run consensus pro- tocols to maintain consistency, during which they communicate with each other to reach continuous unanimous agreements on the states. Consensus protocols should satisfy safety and liveness [56] so that participants can hold consistent states at any time and their inputs to the system will eventually act on the state. The consensus of a P2E project can be categorized in terms of whether the project relies on a public blockchain, how the nodes join the network ( i.e., permissioned or permissionless), and the protocol, i.e., how each node decides on the state. Public or Project-specific Chain. P2E projects may use a public blockchain or a project-specific chain. Different ways can affect the stability of the system. For projects that run on a project-specific blockchain, the entrepreneur or DAO can control the parameters of the chain, such as transaction fees, the number of nodes, and the type of consensus. For example, Gala Games [17] allows at most 50,000 consensus nodes and anyone who wants to join the consensus should buy a Founder’s Node License, the price of which is set by the entrepreneur. How- ever, using a project-specific blockchain means that the consensus rewards are endogenous tokens of the chain. If this niche currency is not attractive to nodes, the security and decentralization of the consensus can not be ensured, making the system vulnerable. To bootstrap the project-specific chain, an unpredictable genesis block [70] should also be prepared for the project. This block can either SoK: Play-to-Earn Projects 11 be provided by a trusted centralized party or a decentralized party, such as an existing blockchain. For example, the Ronin sidechain is boosted by a block of Ethereum. There are also plenty of P2E projects using public chains. For ex- ample, hundreds of P2E projects are based on Solana chain [42]. To maintain low transaction fees, high throughput, and fast transaction finalization, various methods are used, such as Layer-2 methods [73], sharding [95,101], and DAG- based blockchains [96]. However, some of these methods may induce security problems, which will be discussed in Section 4.1. Permissioned or Permissionless. In terms of how the nodes join the network, there can be permissionless and permissioned settings. For the latter, its identity management makes the confirmation speed faster and the realization easier, but meanwhile, the consensus nodes are more likely to collude with each other, posing a threat to the consensus security. On the other hand, consensus with permissionless nodes is considered to be more decentralized and transparent. P2E projects with permissioned designs usually adopt proof of authority (PoA) as the consensus algorithm while the consensus nodes are determined by the entrepreneur. For example, in the Ronin chain of Axie, the entrepreneur selects trusted nodes to build the consensus. Nodes can also be added upon the approval of the existing consensus nodes. In the permissionless setting, nodes use proof of work (PoW) [71], PoS, Delegated Proof-of-Stake (DPoS) [89] to elect voters and leaders [72,85] to prevent Sybil attack and claim incentives. For example, in Gala Games [17] players can purchase a Founder’s Node License, which is similar to PoS, and download the Gala Node Software to run the node. Running a Founder’s Node is motivated by project tokens. Permissioned consensus can anchor blocks in permissionless consensus. For example, Chromia [12] plans to record hashes of its blocks in Bitcoin and Ethereum. ConsensusProtocol. TherearevariousprotocolsP2Eprojectscanusetoreach a consensus, e.g., Nakamoto protocol, Byzantine Fault Tolerant (BFT) protocol, or RAFT. Different protocols resist different proportions of malicious nodes to ensure security. In Nakamoto protocol, a leader is elected at each round to in- cludeinputs,voteforpreviousstateswiththemostvotes,andcalculatethelatest state. The protocol can maintain safety and liveness with 50% malicious nodes for a synchronous network. For a partially synchronous model, where the upper bound in the delay of messages is unknown to the honest parties, the number of malicious nodes it can resist will decrease according to the delay [69]. In Byzan- tine protocol, leaders and a voting committee are elected at each round [72]. The leaders include inputs and calculate their states. Voters will initially vote for some of their received states and amplify the votes that they receive more than a threshold [56]. The protocol can resist 33% malicious nodes in the voting committee. RAFT [83] can ensure safety in a fail-stop model and can not resist any number of Byzantine malicious nodes. 3.3 Bridges and Oracles The system of the project can be made up of several subsystems. Each subsys- tem can be a P2P network of decentralized nodes or a centralized server. For 12 J. Yu et al. example, the nodes that participate in the consensus protocol and the nodes that respond to the data accessing request can be two groups in different net- works. The system can also contain several groups of nodes that run consensus severally. This subsection introduces bridges and oracles that connect different decentralized subsystems. Oracles. Oracles are used to link consensus to other information sources, e.g., discussion forums, random numbers, order of transactions, economic information such as the price of the dollar, and any other external events. In P2E projects, the update of the game protocol is often discussed in some online forums, and players can vote for the proposals proposed in these forums. Random numbers generated in the consensus may be predictable to some adversaries, therefore more unpredictable random numbers should be generated by the oracle. Also, someoftheconsensuseshavethetemporarilycentralizedproblemthattheleader candeterminepartoftheorderoftransactions, i.e.,minerextractablevalues[63]. Therefore, oracles can be used to determine the order of transactions [76]. The data source of the oracle can be software source ( e.g., online databases, websites,blockchainmempools)orhardwaresource( e.g.,sensors)[52].Anoracle that uses a single source is considered to be centralized for it is vulnerable to single-point failure, while decentralized oracles aggregate the information from multiple sources [80]. There can be a hierarchical structure for a decentralized oracle, namely, a project can aggregate the information from different oracles, and an oracle can aggregate the information from several nodes that contract with different data sources to prevent malicious behaviors at any step. Nodes in the oracle can also form a consensus to validate the data [54]. Bridges. Bridges are used to exchange or migrate assets between different con- sensuses [102]. There are many cross-chain P2E projects. For example, players can play Stepn in Solana, BNBchain, and Ethereum, which are called different realms in Stepn [41]. Bridges across these chains help the participants react to the possible risks from the chains, such as transaction fee fluctuations, enabling them to choose their preferred chain at any time. In addition, for those project- specific chains, bridges are needed for users to exchange other commonly used cryptocurrencies for the project tokens. For example, the Ronin bridge is used to connect the Ronin chain and Ethereum so that players can buy Axie NFTs and other Axie tokens by ETH. Furthermore, Bridges enables the migration process, in which assets in one subsystem can be locked in the bridge accounts and some ‘wrapped’ assets are issued in another subsystem, and if the ‘wrapped’ assets are paid back, the original assets will be unlocked. So through this, players can migrate their assets from one chain to another. Projects can add rules on the usage of the ‘wrapped’ assets. For example, in Stepn, Energy assets can only be shared across realms under specific conditions through Energy Bridge. Bridges can be realized by a centralized entity. For example, Axie Ronin bridge is controlled by the entrepreneur of Axie project. Bridges can also be realized by a decentralized third party, such as chain relay or synchronization methods like HTLC [102]. SoK: Play-to-Earn Projects 13 3.4 Hybrid Architecture In the above sections, we mainly discussed the realization when all the data are stored in decentralized nodes, while many existing P2E projects use a hybrid architecture. In a hybrid architecture, there will be centralized servers storing and processing part of the data, and communicating with the decentralized sub- systems of the project. A centralized server contains data storage and processing nodes owned by a single entity, e.g., entrepreneur, a third-party service provider likeAmazonWebServices(AWS),andInterPlanetaryfilesystem(IPFS)pinning service providers such as Pinata [31] and Infura [25]. There are several reasons to adopt a hybrid architecture. One reason is that the realization and the mod- ification of the game protocol are easier for the entrepreneur when starting the project.Althoughtherighttomodifytheprotocolmayharmplayers’interests,it is hard to design a perfect protocol that does not need subsequent modification, for there can be many uncertainties in the start-up period. Another reason is that the hybrid architecture can provide better performance because its require- ments for the network throughput and data processing speed are much less. The main concern of the hybrid architecture is the failure of the centralized server. There can be inconsistency between the centralized server and the decentralized nodes due to attacks from an attacker or misbehavior of the entity who owns or rents the server, which will be discussed in Section 4. Here, we give some examples of hybrid architecture that reflect different design principles. Usually, the most critical data like asset ownership, UGC, and the game protocol are stored in a decentralized way. In P2E projects, earning assets from the game is one of the most important features. Usually, the asset ownership will be stored by the decentralized nodes. For example, Illuvium [22] is a collection game where players can control the avatars, explore the game universe and capture the encountered Illuvials. The ownership of Illuvials is written in an Ethereum smart contract. On the other hand, the project uses centralized AWS as its backend to store other data, such as the movement of the avatars. During the game, the action data of avatars are sent to the centralized server, while the trading data related to asset ownership are widely sent to the decentralized nodes. After that, the centralized server and decentralized nodes synchronize the latest state of the system. The design principle of this hybrid architecture is the transparency of the asset transfer, for the transfer process is realized in decentralized nodes. Therefore, players can monitor the centralized server’s behavior and partially transfer their rights. For example, players can make necessary their authorization when the centralized server intends to move assets out of their accounts. The accessibility and censorship resistance of UGC can be important in some projects.Therefore, the project can store UGCin decentralized nodes. For exam- ple, in The Sandbox, after players send their created content to the centralized server of the project, the server will calculate the hash of the content, tokenize the content, and send the raw data to decentralized storage nodes. The cen- tralized server in The Sandbox is AWS and the decentralized storage is IPFS. Therefore, if the decentralized storage is properly designed, players can access 14 J. Yu et al. the contents without the centralized server. The user front-end can also be used to tokenize the content and send the content to the decentralized nodes to ensure censorship resistance. The immutability of the game protocol is essential to a P2E project. For example, My Neighbor Alice [30] emphasizes that for a game fully controlled by players, the logic of items should be stored in a decentralized way instead of only storing the ownership of the items. Some technologies can be used to improve the performance of the hybrid architecture. Trusted Execution Environments, e.g., Intel SGX [62], can be used to replace the centralized server. Then the system will be secure under the trust in the hardware and the institution that authenticates attestation keys [58]. User front-ends can be utilized to store and process data, as they are motivated to do so without incentives. For example, in Decentraland, players can play games on the servers hosted by landowners. 4 Challenges In this section, we discuss security & societal challenges of the projects. In Sec- tion 4.1, we discuss security challenges. In Section 4.2, we discuss economic challenges. In Section 4.3, we discuss governance challenges. 4.1 Security Challenges ICO Rug Pull. During the ICO phase, investors take the risk that the en- trepreneur may abruptly shut down the project after raising money. Many rug pulls have been observed in various blockchain projects [68]. In the field of P2E games, there are also such scams. Along with the shutdown of the project, the entrepreneur deletes their social accounts and transfers their raised cryptocur- rency to money launderers. Towards this problem, one possible approach for the investors is to judge the quality of a project by the sold fraction of the project token [59]. If the proportion of tokens issued in the ICO stage is quite high, such a project is likely to have the risk of rug pull. Private Key Compromise. To obtain a large amount of money, the common accounts in the game universe, bridges of multi-chain projects, and cryptocur- rency wallets are mostly targeted, especially when they are not fully decentral- ized. Attackers may try to get hold of the participants’ private keys to steal tokens in their wallets. Actually, private keys can be compromised by bribing the key owner, hacking or phishing, or just because of the reuse of private keys. In addition, they may attempt to compromise the private keys of consensus nodestocontroltheentirechaindirectly.Topursueefficiency,manyP2Eprojects use private chains or layer-2 scaling schemes instead of the public chain for recording most of the game operations. In a private chain, several specified nodes take responsibility for the consensus. The private chain is tied to other chains through two-way bridges for cross-chain coordination. If larger than 50% nodes are corrupted in a private chain, the attacker can take control of the whole chain. SoK: Play-to-Earn Projects 15 As a result, they can corrupt all the accounts, including the game treasury and all bridges, and take the tokens therein. For example, Axie Infinity uses the Ronin, which is a private sidechain linked to Ethereum. On March 29, 2022, Axie Infinity reported a loss of over $625 million caused by an attack on the Ronin sidechain. The attacker hacked to get the private keys of over half of Ronin nodes and take the cryptocurrency to Ethereum through a bridge. Likewise, Layer-2 scaling schemes also face this kind of problem. Layer-2 schemes can provide P2E games with high throughput by allowing offline pro- cesses. Layer-2 protocols rely on a set of computational nodes. A classic solution is that any computational node could provide periodic checkpoints to the main public chain while others can challenge it by offering fraud proofs. For example, the Polygon blockchain uses this kind of solution and several P2E projects ( e.g., Arc8 by GAMEE, Crazy Defense Heroes, and Pegaxy) are built on it. In such schemes, if all computational nodes are corrupted, the attacker can also operate the system arbitrarily [75,77]. Smart Contract Vulnerabilities. As a blockchain project, the P2E game de- ployssmartcontractstodealwiththegamerulesliketokenflowsandtheminting mechanism. Researchers have found that there are multiple security issues in the publicly deployed smart contracts, which may be maliciously exploited by the attackers [49,86]. Although extensive literature investigates vulnerability detec- tion and security analysis [88], some blockchain projects still get attacked due to the improper design or implementation of smart contracts, and P2E games are no exception. In P2E projects, contracts transferring NFTs are usually the target. For example, in the initial CryptoPunks contract, the ETH paid to buy the punk NFT was wrongly sent to the buyer instead of the NFT seller. As a result, attackers take advantage of the loophole to earn NFTs for free. There are also other designs of the smart contract that may cause an unexpected loss of other honest users in the community. – Rollback of randomness. In Ethereum virtual machine, some functions (e.g.,require and revertfunction) can be invoked to rollback the trans- action. Therefore when randomness is involved to determine the result of a request, the sender can roll back the transaction if the result is not satisfac- tory. For example, in Cryptozoon [14], the player can buy an egg to hatch a ZOAN NFT, which will be randomly given a Rarity Level. When initiating such a transaction, players can decide to roll back it if the obtained level is not desirable. The solution to this kind of attack can be checking whether buying function is called by a contract, and prohibiting the contract call. – Front running. The transparent nature of blockchain makes DApps highly vulnerable to the front-running attack [65]. For example, players in Polka- Monster sell their NFTs by setting a price in the marketplace. It is observed that the seller successfully earned a lot of money by front running. The at- tacker first set a low price for his NFT to attract a buyer. After that, he could monitor transactions in the network. When detecting that someone 16 J. Yu et al. issued a transaction to buy this NFT,6he immediately updated the price and set a higher gas fee for this updating transaction.7As a result, the price updating was executed first and the buyer finally paid a much higher price. The solution to this kind of attack can be letting the buyer set an acceptable price range or encrypting the transactions. NFT Content Inaccessibility. In most of the existing P2E projects, the NFT content is stored in centralized storage, or decentralized storage with improper incentives. For example, they are stored in AWS, centralized Pinning Service providers, or IFPS without incentive mechanisms, as mentioned in Section 3. In this case, the content may be lost [47]. Although we can store the content locally, in P2E projects, there are various data that need to ensure accessibility, such as game environments and character designs generated by the entrepreneur. For example, the costume of a player’s avatar should be accessed by other players to realize its social function. There will also be content generated by players that need access when players are playing the game. For example, one of the use cases of the land in Decentraland is advertising. There is no meaning if the advertisement can not be accessed publicly. 4.2 Economic Challenges Token Design. Token designs affect the economy. As mentioned in Section 2.2, some projects use a single token for multiple purposes, while others use different tokens for corresponding purposes. If fewer tokens are used, the token design will be simpler. But on the other hand, the use of multiple tokens allows the system to respond flexibly to various conditions and participants with different preferences. For example, the incentive-for-player tokens and funding tokens can be different in terms of stability and issuance schedule. To attract myopic players with the network effect, the price of incentive-for-player tokens should be stable. Otherwise, the decline of the token price may cause collective abandonment of the game. To maintain a steady user growth rate, the incentive tokens can be designed to be more valuable when the system suffers slow growth. Instead, funding tokens can be unstable to reward those visionary investors. In terms of the issuance method, there can be either a scheduled supply or an unscheduled supply. Scheduled supply means the total amount of the token is fixed or the issuance of every period is scheduled. Unscheduled supply is that the issuance amount will depend on the activity of players in the game universe, e.g., tokens can be issued every time a player wins a mini-game and in this way, the more winning events happen, the larger total supply of tokens there will be. Tokens with scheduled supply are often used for funding, while tokens with unscheduled 6Seehttps://bscscan.com/tx/0x1a31bfc4d3c4a726c931cb784f9e79606d62996b625 1c9ad959e5b2e6621fd9e for this buying transaction, the gas fee of which is 5 Gwei. 7Seehttps://bscscan.com/tx/0xb9ec7e204f186660a377beeee8e9223107f46d871 8314fbfdc4133580311442e for this updating transaction, the gas fee of which is 7.7 Gwei. SoK: Play-to-Earn Projects 17 supply will be more attractive to those players with a less available cost for playing. Irregular Issuance. With more and more players playing the game, more to- kens will be earned by players, especially those unscheduled utility tokens that can be easily earned by playing but cannot be used for staking or governance. As a result, the price of tokens may decrease. To maintain stability, designers consider reducing those tokens’ supply or increasing consumption. For example, the utility token of Axie Infinity ( i.e., SLP) experienced a rapider and earlier price drop than AXS, so Axie Infinity reduces the amount of SLP players can earn in its season 20 update. In addition, to increase the demand of these tokens, new events in the universe can be developed. For example, Axie Infinity designs NFT Runes & Charms which can be crafted by consuming SLP in its new Origin season. Therefore, tokenomics should be carefully designed to balance those impacts. There can be some swap mechanisms to make scheduled and unscheduled tokens able to be exchanged in the universe. Besides, it can enable these two kinds of tokens to have similar usage so that players can strategically choose which token to use, bringing a dynamic adjustment. Friction When Attracting New Players. High gas fees for the blockchains and the unfamiliarity of potential players with blockchain technologies can cause friction when the project wants to attract new players. To solve the problem, the project can implement the game simultaneously in public chains, private chains, and centralized servers, and build bridges between them so that players can start the game with low fees. Wash Trading. Users of the blockchains can easily lend flash loan [94] and create multiple accounts. Therefore, anyone can create multiple accounts and transfer tokens among them, which is called wash trading. For those fungible tokens, auto market makers (AMM) can prevent them from wash trading, be- cause the trading price cannot be set directly by the seller. However, there is no effective mechanism to prevent NFT wash trading nowadays [93]. Wash trading has a significant influence on P2E projects, for it leads to larger trading volume and price distortion. Some statics websites, such as CoinMark- Cap, rank P2E projects by the transaction volume, and the higher the volume is, the more visible the project will be to the potential investors and players [60]. In addition, the price of a set of similar NFTs is calculated by the average of their sale prices. Therefore, wash trading at a high price can affect the evaluated value of these NFTs. Wash trading also enables money laundry. For example, the ICO process of a malicious project may be utilized to become part of a money laundry process [8]. 4.3 Governance Challenges The P2E projects will go through a centralization phase, a decentralization phase, and an intermediate transition period. In the decentralization phase, a proposal-and-majority-voting scheme is widely used, namely, any participant in the game universe can put forward proposals and vote for them, and their vote 18 J. Yu et al. is weighted by their tokens like Apecoin [3]. We discuss the challenges in the decentralization phase in terms of voting security, voting privacy, governance efficiency, governance fairness, and the tragedy of the commons. Governance Security in the Centralization Phase. In the traditional joint equity system, everyone holds the same equity. Therefore, it is reasonable for a centralized entity that possesses the majority of the equity to conduct the governance.However,inP2Eprojects,therearetokensthatareonlypossessedby players, e.g., SLP in Axie Infinity. Since the governor (namely, the entrepreneur) doesnotholdsuchtokens,hemaymakedecisionsthatharmtheinterestsofthose token holders. For example, the entrepreneur may update the game universe, limit the usage of these tokens, and issue new tokens to attract new players but devalue the original tokens. In addition, most P2E projects did not identify when and how to enter the decentralization phase in the smart contract, for it is hard to predict the best time to do so. Therefore, the entrepreneur can arbitrarily postpone the decen- tralization phase. Governance Security in the Transition Period. During the transition pe- riod from the centralization phase to the ideal decentralization process, the vot- ing weight of the entrepreneur will decrease while that of players is the reverse. Their interests may conflict during the shift of duty. For example, before the voting weight of the entrepreneur is down to less than half, he can make most of the decisions. Therefore, the interests of the players can not be ensured. Proposal & Voting Security. After entering the decentralization stage, the consensus nodes ensure proposal and voting security, which should behave as neutral entities to collect proposals, tally the votes, and manage the encryption and delegation of votes [103]. Here, encryption is for voting privacy, and delega- tionisforgovernanceefficiency,whichwillbediscussedintherestofthissection. However, the consensus nodes may refuse to include the votes or proposals they are opposed to, especially for those projects that own their specific consensus. For example, in some projects, only miners can vote for the proposals. In this case, the rights and interests of other players that do not run consensus nodes can not be guaranteed. Voting Privacy. What an individual voter voted on should not be revealed to anyone during the voting process or even after the process. Privacy during the voting process is to mitigate the malicious behavior when tallying the votes, which may be realized by the commit-and-reveal scheme [74]. The privacy after the voting process is to prevent bribery and collusion, making the voting pro- tocol coercion-resistance [64]. To realize the privacy decryption, trustees [61] or voting committee [103] should be elected for the decryption of the aggregated votes. However, the privacy of voting is not realized prevalently in the cryp- tocurrency community, e.g., voting of Bitcoin improvement proposal [10], and Apecoin DAO Governance [3]. Since the pseudonymity of the blockchain does not ensure privacy, the voting scheme should be designed carefully. SoK: Play-to-Earn Projects 19 Governance Inefficiency. The governance inefficiency comes from two facts players can join or leave the community freely, and not all the voters are always online. When players can join or leave the community freely, voters are dynamically changing. Therefore, different or even conflict policies may be implemented. Forthevoters’offlineproblem,enoughvotingtimeshouldbesettomakesure token holders notice the vote has begun and fully discuss the proposals. Other- wise,governancemaybetakenoverbyanattacker,acentralizedentrepreneur,or other unexpected token holders. On February 12, 2022, Build Finance DAO en- counteredaGovernanceTakeoverAttack.Theattackersucceededinthetakeover by having a large enough vote in favor of the proposal to take control of the Build token contract [11]. Although the risk can be mitigated by setting a voting threshold, i.e., how many votes are needed to approve a proposal, or restricting the amount of token transfer of a single proposal. However, these solutions will take time and harm the efficiency of the governance. Delegating the votes or liquid democracy [53,103] can also be a solution to the inefficiency. In liquid democracy, the delegation can be terminated at any time, having little harm to decentralization from a long-term perspective. Governance Fairness. The governance of P2E projects does not adopt the method that each account has the same voting weight because accounts can be easily created without any cost. Usually, votes are weighted by project tokens to realize the fairness that the voting weight is proportional to the time, effort, or money a player spent on the project. However, for a token allocation proposal concerninghowtoallocatethetokensinthetreasury,playerswithalargenumber of tokens may vote for the decision that benefits them. Thus, the proposal that distributesmoretokenstothosepossessingmorevotingtokenswillbemorelikely to be accepted. In this way, rich people will become richer, which is opposite to the sense of fairness. To mitigate the unfairness, we can restrict the distribution of the governance token. For example, governance tokens can only be obtained by playing the game and further soulbound [98] to the account that obtains them, making it difficult to be traded. In addition, P2E projects usually have multiple governance tokens. When voting for a proposal, weights are set to each token, and a voter’s voting weight is the weighted addition of the amount of each token he possesses. The weight is set either exactly the same as or different from the real-time exchange rate. If the weight is different from the real-time exchange rate, malicious voters may exchange for a cheaper token with larger weights. On the other hand, if the weight is approximately the same as the real-time exchange rate, players pos- sessing the token with a small market cap will be in an inferior position. For example, if there are two groups using different tokens in the game universe, all decisions will be made by the group with tokens of a larger market cap under the proposal-and-majority-voting scheme. To meet better fairness with multiple governance tokens, other voting schemes can be used. For example, when decid- ing on a division of some resources, instead of the majority voting for a proposal 20 J. Yu et al. of a particular distribution, calculating a distribution based on the preference aggregation of voters will be fairer [66,79]. Tragedy of the Commons. When governance is conducted by the token hold- ers, the long-term benefit of the project can not be ensured, because some of the token holders can be myopic. For example, they can refuse to increase the budget on the incentives for new players that may have long-term merit on the value of the tokens. To mitigate this kind of effect, we can: 1) fix the budget ratio of different categories [103], including marketing, development, and other necessary components for a project to become sustainable; 2) force the voters to deposit their stake for a long time to make sure the voters hold the token for a long enough period before or after voting so that the voters will consider the long-term return and the financial risk of the attacker will be increased, e.g., in stepN, users will get higher voting power by locking GMT [20]; 3) use sub- DAOs to vote for different issues with proper weights of tokens. For example, in Yieldguild, issues of different games will be voted for with different subDAO tokens. 4.4 Ownership of Digital Assets One of the features of P2E projects is that players can have true ownership of the assets in the game universe. However, the ownership is not well defined. Since the entrepreneur that creates the game universe is the most considered central entity. Whether the universe can be accessed and run without the entrepreneur or whether the entity that can modify the game is chosen by the community of players may be one of the rules to test if the project is decentralized. In many current projects, the hybrid consensus is used, and the codes of the game universe are not open-sourced. If the entrepreneur becomes malicious and denial ofservice,thetokensplayersholdinthedecentralizedconsensuswillnothavethe same value as before. However, anyone can pirate the game if the source code is revealed. Therefore, the decentralization process can be seen as the entrepreneur selling the game universe to the decentralized players via the smart contract. 5 Conclusion In this paper, we discuss the implementation, token models, and governance in the play-to-earn projects and propose challenges and some solutions in terms of attacks on the implementation layer, the economic failure that may happen in player incentive, and the difficulty of governance in the play-to-earn projects. SoK: Play-to-Earn Projects 21 References 1. Aavegotchi litepaper, https://wiki.aavegotchi.com/ Accessed October 6, 2022 2. Alien worlds - blockchain technical blueprint, https://docs.google.com/docu ment/d/1JiA97Y3JZMcC6HG2VPXEiZDd7UtA5yJSRUY2DQ5VSRI/edit#heading=h.k 1xajz1gmpx4 Accessed October 6, 2022 3. Apecoin dao, https://apecoin.com/governance#voting-mechanism Accessed October 6, 2022 4. Arweave whitepaper, https://www.arweave.org/files/arweave-whitepaper.p dfAccessed October 6, 2022 5. Axie infinity: Pernicious pyramid scheme or gaming breakthrough?, https://ww w.forbes.com/sites/leeorshimron/2022/08/13/axie-infinity-pernici ous-pyramid-scheme-or-gaming-breakthrough/?sh=1b25657074b3 Accessed October 16, 2022 6. Axie infinity whitepaper, https://whitepaper.axieinfinity.com Accessed October 6, 2022 7. Battle world white paper, https://whitepaper.battleworld.game/ Accessed October 6, 2022 8. The biggest threat to trust in cryptocurrency: Rug pulls put 2021 cryptocurrency scam revenue close to all-time highs, https://blog.chainalysis.com/reports /2021-crypto-scam-revenues/ Accessed October 16, 2022 9. Binance smart chain white paper, https://github.com/bnb-chain/whitepape r/blob/master/WHITEPAPER.md Accessed October 6, 2022 10. Bitcoin improvement proposals, https://github.com/bitcoin/bips/ Accessed October 16, 2022 11. Thebuildfinancedao hasbeen thetargetofahostile governancetakeover, https: //twitter.com/finance_build/status/1493223190071554049?s=20&t=ZXnf1 ZAAGFpqQhDUBbbmtw Accessed October 16, 2022 12. Chromia, https://chromia.com/documents/Chromia-_-Platform-white-pap er2019.pdf Accessed October 6, 2022 13. Counterparty homepage, https://counterparty.io/ Accessed October 6, 2022 14. Cryptozoon whitepaper, https://cryptozoon.io/CryptoZoon-WhitePaper.pdf Accessed October 6, 2022 15. Decentraland whitepaper, https://decentraland.org/whitepaper.pdf Ac- cessed October 6, 2022 16. Filecoin whitepaper, https://filecoin.io/filecoin.pdf Accessed October 6, 2022 17. Gala games, https://support.gala.games/ Accessed October 6, 2022 18. Gala games node ecosystem roadmap, https://gogalagames.medium.com/nod e-pre-proposal-node-rewards-for-network-contribution-ea3c29cdce46 & https://gogalagames.medium.com/the-gala-games-node-ecosystem-9760d81 56af7Accessed October 6, 2022 19. Gamefi explained: How to earn money through blockchain gaming, https://ww w.binance.com/en-NG/blog/all/gamefi-explained-how-to-earn-money-thro ugh-blockchain-gaming-421499824684903406 Accessed October 16, 2022 20. Governance & ecosystem fund, https://whitepaper.stepn.com/governance-an d-ecosystem-fund Accessed October 16, 2022 21. Hive white paper, https://hive.io/whitepaper.pdf Accessed October 6, 2022 22. Illuvium whitepaper, https://docs.illuvium.io/whitepaper/technology Accessed October 6, 2022 22 J. Yu et al. 23. Immutable x white paper, https://assets.website-files.com/62535c6262b90 afd768b9b26/6304335ed396fd9c8d8dfe5e_Immutable%20X%20Whitepaper.pdf Accessed October 6, 2022 24. Industry overview, https://dappradar.com/industry-overview Accessed October 16, 2022 25. Infura document, https://docs.infura.io/infura Accessed October 6, 2022 26. Klaytn documentation, https://docs.klaytn.foundation/ Accessed October 6, 2022 27. Makerdao whitepaper, https://makerdao.com/en/whitepaper Accessed October 6, 2022 28. Mines of dalarnia lightpaper, https://www.minesofdalarnia.com/assets/MoD -Litepaper-updated-27-Oct.pdf Accessed October 6, 2022 29. Mobox document, https://faqen.mobox.io/ Accessed October 6, 2022 30. My neighbor alice whitepaper, https://static1.squarespace.com/static/601 a9e78af724f7a3932fd5f/t/6197c7a3208b111b3333c707/1637337019912/My+Ne ighbor+Alice+Whitepaper+-+final.pdf Accessed October 6, 2022 31. Pinata website, https://www.pinata.cloud/ Accessed October 6, 2022 32. Polygon lightpaper, https://polygon.technology/lightpaper-polygon.pdf Accessed October 6, 2022 33. Radiocaca, https://www.radiocaca.com/ Accessed October 6, 2022 34. Readon whitepaper, https://whitepaper.readon.me/what-is-readon/overvi ewAccessed October 6, 2022 35. Ronin network documentation, https://docs.roninchain.com/docs/intro Accessed October 6, 2022 36. The sandbox whitepaper, https://installers.sandbox.game/The_Sandbox_W hitepaper_2020.pdf Accessed October 6, 2022 37. Solana documentation, https://docs.solana.com/cluster/synchronization Accessed October 6, 2022 38. Spells of genesis homepage, https://spellsofgenesis.com/ Accessed October 6, 2022 39. Splinterlands documentation, https://docs.splinterlands.com/ Accessed October 6, 2022 40. Stepn whitepaper, https://whitepaper.stepn.com/ Accessed October 6, 2022 41. Stepn’s realms, https://whitepaper.stepn.com/realm Accessed October 16, 2022 42. Top solana nft games by market cap 2022, https://chainplay.gg/chain/solan a/Accessed October 16, 2022 43. Ufogaming, https://ufogaming.io/ Accessed October 6, 2022 44. Wax protocol white paper, https://github.com/worldwide-asset-exchange/ whitepaper Accessed October 6, 2022 45. Wemix whitepaper, https://che.wemixnetwork.net/hm/rsc/whitepaper.pdf Accessed October 6, 2022 46. What is axie infinity? the play-to-earn nft game taking crypto by storm, https: //decrypt.co/resources/what-is-axie-infinity-the-play-to-earn-nft- game-taking-crypto-by-storm Accessed October 16, 2022 47. Yes, your nfts can go missing—here’s what you can do about it, https://decryp t.co/62037/missing-or-stolen-nfts-how-to-protect Accessed October 16, 2022 48. Ateniese, G., Chen, L., Etemad, M., Tang, Q.: Proof of storage-time: Efficiently checking continuous data availability. Cryptology ePrint Archive (2020) SoK: Play-to-Earn Projects 23 49. Atzei, N., Bartoletti, M., Cimoli, T.: A survey of attacks on ethereum smart contracts (sok). In: International conference on principles of security and trust. pp. 164–186. Springer (2017) 50. Benet, J.: Ipfs-content addressed, versioned, p2p file system. arXiv preprint arXiv:1407.3561 (2014) 51. Benet, J., Dalrymple, D., Greco, N.: Proof of replication. Protocol Labs, July 27, 20 (2017) 52. Beniiche, A.: A study of blockchain oracles. arXiv preprint arXiv:2004.07140 (2020) 53. Blum, C., Zuber, C.I.: Liquid democracy: Potentials, problems, and perspectives. Journal of Political Philosophy 24(2), 162–182 (2016) 54. Breidenbach, L., Cachin, C., Chan, B., Coventry, A., Ellis, S., Juels, A., Koushan- far, F., Miller, A., Magauran, B., Moroz, D., et al.: Chainlink 2.0: Next steps in the evolution of decentralized oracle networks. Chainlink Labs (2021) 55. Canetti, R., Chen, Y., Holmgren, J., Lombardi, A., Rothblum, G.N., Rothblum, R.D., Wichs, D.: Fiat-shamir: from practice to theory. In: Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing. pp. 1082–1090 (2019) 56. Castro,M.,Liskov,B.,etal.:Practicalbyzantinefaulttolerance.In:OsDI.vol.99, pp. 173–186 (1999) 57. Chen, Y., Li, H., Li, K., Zhang, J.: An improved p2p file system scheme based on ipfs and blockchain. In: 2017 IEEE International Conference on Big Data (Big Data). pp. 2652–2657. IEEE (2017) 58. Cheng, R., Zhang, F., Kos, J., He, W., Hynes, N., Johnson, N., Juels, A., Miller, A., Song, D.: Ekiden: A platform for confidentiality-preserving, trustworthy, and performant smart contracts. In: 2019 IEEE European Symposium on Security and Privacy (EuroS&P). pp. 185–200. IEEE (2019) 59. Chod, J., Lyandres, E.: A theory of icos: Diversification, agency, and information asymmetry. Management Science 67(10), 5969–5989 (2021) 60. Cong, L.W., Li, X., Tang, K., Yang, Y.: Crypto wash trading. arXiv preprint arXiv:2108.10984 (2021) 61. Cortier, V., Gaudry, P., Glondu, S.: Belenios: a simple private and verifiable electronic voting system. In: Foundations of Security, Protocols, and Equational Reasoning, pp. 214–238. Springer (2019) 62. Costan, V., Devadas, S.: Intel sgx explained. Cryptology ePrint Archive (2016) 63. Daian, P., Goldfeder, S., Kell, T., Li, Y., Zhao, X., Bentov, I., Breidenbach, L., Juels, A.: Flash boys 2.0: Frontrunning in decentralized exchanges, miner ex- tractable value, and consensus instability. In: 2020 IEEE Symposium on Security and Privacy (SP). pp. 910–927. IEEE (2020) 64. Delaune, S., Kremer, S., Ryan, M.: Verifying privacy-type properties of electronic voting protocols. Journal of Computer Security 17(4), 435–487 (2009) 65. Eskandari, S., Moosavi, S., Clark, J.: Sok: Transparent dishonesty: front-running attacks on blockchain. In: International Conference on Financial Cryptography and Data Security. pp. 170–189. Springer (2019) 66. Fain, B., Goel, A., Munagala, K.: The core of the participatory budgeting prob- lem. In: International Conference on Web and Internet Economics. pp. 384–399. Springer (2016) 67. Fisch, B.: Tight proofs of space and replication. In: Annual International Confer- ence on the Theory and Applications of Cryptographic Techniques. pp. 324–348. Springer (2019) 24 J. Yu et al. 68. Gan, J., Tsoukalas, G., Netessine, S.: Initial coin offerings, speculation, and asset tokenization. Management Science 67(2), 914–931 (2021) 69. Garay,J.,Kiayias,A.,Leonardos,N.:Thebitcoinbackboneprotocol:Analysisand applications. In: Annual international conference on the theory and applications of cryptographic techniques. pp. 281–310. Springer (2015) 70. Garay, J.A., Kiayias, A., Leonardos, N., Panagiotakos, G.: Bootstrapping the blockchain, with applications to consensus and fast pki setup. In: IACR Interna- tional Workshop on Public Key Cryptography. pp. 465–495. Springer (2018) 71. Gervais, A., Karame, G.O., Wüst, K., Glykantzis, V., Ritzdorf, H., Capkun, S.: On the security and performance of proof of work blockchains. In: Proceedings of the 2016 ACM SIGSAC conference on computer and communications security. pp. 3–16 (2016) 72. Gilad, Y., Hemo, R., Micali, S., Vlachos, G., Zeldovich, N.: Algorand: Scaling byzantineagreementsforcryptocurrencies.In:Proceedingsofthe26thsymposium on operating systems principles. pp. 51–68 (2017) 73. Gudgeon, L., Moreno-Sanchez, P., Roos, S., McCorry, P., Gervais, A.: Sok: Layer- twoblockchainprotocols.In:InternationalConferenceonFinancialCryptography and Data Security. pp. 201–226. Springer (2020) 74. Hardwick, F.S., Gioulis, A., Akram, R.N., Markantonakis, K.: E-voting with blockchain: An e-voting protocol with decentralisation and voter privacy. In: 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and So- cial Computing (CPSCom) and IEEE Smart Data (SmartData). pp. 1561–1567. IEEE (2018) 75. Kalodner, H., Goldfeder, S., Chen, X., Weinberg, S.M., Felten, E.W.: Arbi- trum: Scalable, private smart contracts. In: 27th USENIX Security Symposium (USENIX Security 18). pp. 1353–1370 (2018) 76. Kelkar, M., Zhang, F., Goldfeder, S., Juels, A.: Order-fairness for byzantine con- sensus. In: Annual International Cryptology Conference. pp. 451–480. Springer (2020) 77. Khalil, R., Zamyatin, A., Felley, G., Moreno-Sanchez, P., Gervais, A.: Commit- chains: Secure, scalable off-chain payments. Cryptology ePrint Archive (2018) 78. Kiayias, A., Russell, A., David, B., Oliynykov, R.: Ouroboros: A provably secure proof-of-stake blockchain protocol. In: Annual international cryptology confer- ence. pp. 357–388. Springer (2017) 79. Lackner, M.: Perpetual voting: Fairness in long-term decision making. In: Pro- ceedings of the AAAI conference on artificial intelligence. vol. 34, pp. 2103–2110 (2020) 80. Mammadzada, K., Iqbal, M., Milani, F., Garc’ıa-Ba nuelos, L., Matulevičius, R.: Blockchain oracles: A framework for blockchain-based applications. In: Interna- tional Conference on Business Process Management. pp. 19–34. Springer (2020) 81. Moin, A., Sekniqi, K., Sirer, E.G.: Sok: A classification framework for stable- coin designs. In: International Conference on Financial Cryptography and Data Security. pp. 174–197. Springer (2020) 82. Oliveira, L., Zavolokina, L., Bauer, I., Schwabe, G.: To token or not to token: Tools for understanding blockchain tokens (2018) 83. Ongaro, D., Ousterhout, J.: In search of an understandable consensus algorithm. In: 2014 USENIX Annual Technical Conference (Usenix ATC 14). pp. 305–319 (2014) 84. Pagnia, H., Gärtner, F.C., et al.: On the impossibility of fair exchange without a trusted third party. Tech. rep., Citeseer (1999) SoK: Play-to-Earn Projects 25 85. Pass, R., Shi, E.: Hybrid consensus: Efficient consensus in the permissionless model. Cryptology ePrint Archive (2016) 86. Perez, D., Livshits, B.: Smart contract vulnerabilities: Vulnerable does not im- ply exploited. In: 30th USENIX Security Symposium (USENIX Security 21). pp. 1325–1341 (2021) 87. Saleh, F.: Blockchain without waste: Proof-of-stake. The Review of financial stud- ies34(3), 1156–1190 (2021) 88. Schneidewind, C., Grishchenko, I., Scherer, M., Maffei, M.: ethor: Practical and provably sound static analysis of ethereum smart contracts. In: Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security. pp. 621–640 (2020) 89. Snider, M., Samani, K., Jain, T.: Delegated proof of stake: features & tradeoffs. Multicoin Cap 19(2018) 90. Steichen, M., Fiz, B., Norvill, R., Shbair, W., State, R.: Blockchain-based, decen- tralized access control for ipfs. In: 2018 Ieee international conference on internet of things (iThings) and ieee green computing and communications (GreenCom) and ieee cyber, physical and social computing (CPSCom) and ieee smart data (SmartData). pp. 1499–1506. IEEE (2018) 91. Vakilinia, I., Wang, W., Xin, J.: An incentive-compatible mechanism for decen- tralized storage network. arXiv preprint arXiv:2208.09937 (2022) 92. Vidal-Tomás, D.: The new crypto niche: Nfts, play-to-earn, and metaverse tokens. Finance Research Letters p. 102742 (2022) 93. von Wachter, V., Jensen, J.R., Regner, F., Ross, O.: NFT wash trading: Quan- tifying suspicious behaviour in NFT markets. CoRR abs/2202.03866 (2022), https://arxiv.org/abs/2202.03866 94. Wang, D., Wu, S., Lin, Z., Wu, L., Yuan, X., Zhou, Y., Wang, H., Ren, K.: Towards understanding flash loan and its applications in defi ecosystem. arXiv preprint arXiv:2010.12252 (2020) 95. Wang, G., Shi, Z.J., Nixon, M., Han, S.: Sok: Sharding on blockchain. In: Pro- ceedings of the 1st ACM Conference on Advances in Financial Technologies. pp. 41–61 (2019) 96. Wang, Q., Yu, J., Chen, S., Xiang, Y.: Sok: Diving into dag-based blockchain systems. arXiv preprint arXiv:2012.06128 (2020) 97. Werner, S.M., Perez, D., Gudgeon, L., Klages-Mundt, A., Harz, D., Knottenbelt, W.J.: Sok: Decentralized finance (defi). arXiv preprint arXiv:2101.08778 (2021) 98. Weyl, E.G., Ohlhaver, P., Buterin, V.: Decentralized society: Finding web3’s soul. Available at SSRN 4105763 (2022) 99. Wilkinson, S., Boshevski, T., Brandoff, J., Buterin, V.: Storj a peer-to-peer cloud storage network (2014) 100. Wood, G., et al.: Ethereum: A secure decentralised generalised transaction ledger. Ethereum project yellow paper 151(2014), 1–32 (2014) 101. Yu, G., Wang, X., Yu, K., Ni, W., Zhang, J.A., Liu, R.P.: Survey: Sharding in blockchains. IEEE Access 8, 14155–14181 (2020) 102. Zamyatin, A., Al-Bassam, M., Zindros, D., Kokoris-Kogias, E., Moreno-Sanchez, P., Kiayias, A., Knottenbelt, W.J.: Sok: Communication across distributed ledgers. In: International Conference on Financial Cryptography and Data Se- curity. pp. 3–36. Springer (2021) 103. Zhang, B., Oliynykov, R., Balogun, H.: A treasury system for cryptocurrencies: Enabling better collaborative intelligence. Cryptology ePrint Archive (2018) 26 J. Yu et al. A Secure Decentralized Data Storage In this section, we discuss techniques to store data securely on decentralized nodes in terms of data structure, upload and download process, and incentives for nodes that provide storage. Data Structure. To make sure to get the correct data, data usually break into blocks and form Merkle DAGs by hashes of each block, e.g., content addressing in InterPlanetary file system (IPFS) [50]. Therefore, the data will be immutable, and all the replications of the same data will have the same address. To make the searching process easier, tags or metadata on data format can be appended to the hash. Data can also be encoded as erasure code [57] to make the replication of data more efficient. Privacy and access management [90] can be ensured by end-to-end encryption as in Storj [99]. Access management for NFT content may be essential because, in P2E projects, royalties may need to be paid to NFT creators. Upload and Download Process. To upload and download the data, storage- providing nodes can be found by a market or dissemination between nodes. For example, in Filecoin [16], there is a market matching the data owner and storage-providing nodes. The data owner can set the price and choose how many replications are needed for the data. On the other hand, in Arweave [4], nodes disseminate the data and choose whether to store the data when a data owner uploadsthedata.Duringthedownloadprocess,nodesalsodisseminatethedown- load request to neighboring nodes to find the nodes that possess the data. Incentives. The incentive for nodes to store the data should be set properly. Otherwise, unpopular files may be trashed, and nodes may deny the service to the client [91]. The data owner can pay fees either when requesting storage or requesting accessing the data. When paying for accessing the data, an atomic exchange is needed between the data and the fee. However, it is impossible without a trusted third party [84]. Erasure code [99] and payment channels may be used to mitigate the risk. To implement proper incentives, proofs are needed. According to different needs, there can be two kinds of proof, proof of replication/storage of the data or access to certain data. Proof of replication (PoRep) [51] is dedicating unique physical storage, which requires the prover to provide processed data, and the process takes time to prevent the prover from fetching the corresponding data from another storage provider. On the other hand, proof of access (PoA) lets the storage provider decide whether to store the data. Therefore, those projects that attach more importance to data accessibility can choose PoRep, while PoA may be more economic. Since using whole data for proof and continuous periodical checking bring too much burden to the network. Several methods can be used to generate succinct proof, e.g., probabilistic sampling using Merkle tree, non- interactive scheme [48] [55], zk-snark or other encodings [67]. These proofs can either check by the users or contracts on the consensus ledger. B Tables SoK: Play-to-Earn Projects 27Table 2. The purposes of tokens of the P2E projects. The Require ownership means players should own the tokens to unlock some features in the game. These tokens can also be seen as paying before playing in rewarded after playing. Exchanging tokens at a fixed exchange rate is considered a playing process in this paper. Therefore, the tokens that can be gained by a fixed rate exchange are classified in the Incentive-for-players column. projects FundingIncentive forPaymentRequireVotingIncentive for Tokenize Incentive for Stake proof players ownership* investors UGC implementation for consensus My Neighbor Alice [30] ALICE ALICE ALICE lands&items ALICE ALICE items - - Wemix Play [45] WEMIXWEMIX, WEMIX,- - WEMIX - WEMIX -GameToken GameToken Splintershards [39]SPS, card,SPS, DECSPS, DEC,card SPS SPS - SPS -CREDIT CREDIT Alien Worlds [2] TriliumTrilium,Trilium Core NFTs Trilium TriliumLandowner- -NFTsa-offered NFTs Gala Games [17] GALA GameTokenGALA-Founder’s- - GALAFounder’s GameToken Node license Node license The Sandbox [36] SANDSAND SAND, GEMSLAND SANDSAND, GEMSASSETS- - ASSETS CATALYSTS CATALYSTS Decentraland [15] MANA MANA MANA LANDMANA, LAND- UGC - -NAMES Axie Infinity [6] AXSAXS, SLPAXS, SLP Axie NFT AXS AXS - - -Axie NFT Illuvium [22] ILV Illuvium NFT ETH [100] Illuvium NFT ILV Promo NFT - - - Stepn [40] GMTGMT, GSTGMT, GST Sneaker NFT GMT - - - -Sneaker NFT RadioCaca [33] RACA NFTsbRACA, NFTs Metamon NFT RACA NFTs - - - UFO Gaming [43] UFO Genesis NFTPlasmaGenesis NFT -UFO,- - -Points Plasma Points Aavegotchi [1]AavegotchiGHST, NFTscGHST, NFTs Aavegotchi NFT GHST - - - -NFT ,GHST MOBOX [29] MBOX, GEM MBOX, MECMBOX,MOMO NFT MBOX MBOX - - -GEM, MEC Mines of Dalarnia [28] DAR, LandDAR, DAR,Land DAR - - - -mineral mineral Battle world [7] BWO BWO BWO NFTs - BWO - - - aincluding Core NFTs and Landowner-offered NFTs bincluding Metamon Egg, portion, and diamond cincluding Portals and Wearables 28 J. Yu et al.Table 3. The implementations of the P2E projects introduced in their whitepaper or documents. projects architecture data implementationpublic/ permissioned/ consensusbridgeprogram-specific permissionless protocol My Neighbor Alice [30] decentralized allaChromia [12] public permissioned BFT - Wemix Play [45] decentralizedassetbownership Klaytn [26] public permissioned BFTWemix bridgeotherscWemix chain specific permissioned RAFT Splintershards [39] decentralizedasset ownership WAX [44] public permissionless(DPoS) BFT Splinterlands game protocoldHive [21] public permissionless(DPoS) - WAX bridge Alien Worlds [2] decentralizedasset ownership BSC [9] public permissioned(PoSA) - Cross-chain main game protocol WAX [44] public permissionless(DPoS) BFT reconciling NFT images IPFS - - - - Gala Games [17] hybridasset ownership Ethereum [100] public permissionless Nakamoto-other game content Gala Node Ecosystem [18] specific permissionless monitored by Gala Game The Sandbox [36] hybridasset ownership Ethereum [100] public permissionless Nakamoto - UGC IPFS [50] - - - - game protocol AWSe- - - - Decentraland [15] hybridasset ownership Ethereum [100] public permissionless Nakamoto - UGC BitTorrent/IPFS - - - - game protocol User front-end - - - - Axie Infinity [6] hybridasset ownership Ethereum [100] public permissionless NakamotoRonin bridgeasset ownership Ronin chain [35] specific permissioned BFT Illuvium [22] hybridasset ownership Ethereum [100] public permissionless Nakamoto - game protocol AWS - - - - Stepn [40] hybridasset ownership Solana [37] public permissionless BFT Energy Bridge asset ownership BSC public permissioned(PoSA) - asset ownership Ethereum public permissionless Nakamoto RadioCaca [33]hybrid asset ownership BSC public permissioned(PoSA) --hybrid asset ownership Ethereum public permissionless Nakamoto UFO Gaming [43] hybrid asset ownership ETH(Immutable X [23]) public permissionless Nakamoto - Aavegotchi [1] hybrid asset ownership ETH(Polygon [32]) public permissionless Nakamoto - MOBOX [29] hybridasset ownership BSC public permissioned(PoSA) - - UGC IFPS - - - - MOBOX Chainf- - - Mines of Dalarnia [28] hybrid asset ownership BSC public permissioned(PoSA) - - Battle world [7] hybrid asset ownership ETH(Polygon) public permissionless Nakamoto - aincluding asset ownership, UGC, game protocol and its execution bincluding Wemix token cincluding Game token [45] ownership, game protocols and their execution dincluding game protocols and their execution eAmazon Web Services funder development(https://faqen.mobox.io/ecosystem/mobox-chain)
{ "id": "2211.01000" }
2212.00726
Predicting Digital Asset Prices using Natural Language Processing: a survey
Blockchain technology has changed how people think about how they used to store and trade their assets, as it introduced us to a whole new way to transact: using digital currencies. One of the major innovations of blockchain technology is decentralization, meaning that traditional financial intermediaries, such as asset-backed security issuers and banks, are eliminated in the process. Even though blockchain technology has been utilized in a wide range of industries, its most prominent application is still cryptocurrencies, with Bitcoin being the first proposed. At its peak in 2021, the market cap for Bitcoin once surpassed 1 trillion US dollars. The open nature of the crypto market poses various challenges and concerns for both potential retail investors and institutional investors, as the price of the investment is highly volatile, and its fluctuations are unpredictable. The rise of Machine Learning, and Natural Language Processing, in particular, has shed some light on monitoring and predicting the price behaviors of cryptocurrencies. This paper aims to review and analyze the recent efforts in applying Machine Learning and Natural Language Processing methods to predict the prices and analyze the behaviors of digital assets such as Bitcoin and Ethereum.
http://arxiv.org/pdf/2212.00726v1
Trang Tran
cs.CY, cs.CR
cs.CY
Predicting Digital Asset Prices using Natural Language Processing: a survey Trang Tran Cornell University, USA tmt59@cornell.edu Abstract The introduction of blockchain technology has changed the way people think about how they used to store and trade their assets, as it introduced us to a whole new way to transact: using digital currencies. One of the major innovations of blockchain technology is decentralization, meaning that traditional nancial intermediaries, such as asset-backed security issuers and banks, are eliminated in the process. Even though the blockchain technology has been utilized in a wide range of industries, its most prominent application is still cryptocurrencies, with Bitcoin being the rst one proposed. At its peak in 2021, the market cap for Bitcoin once surpassed 1 trillion US dollars. The open nature of the crypto market poses various challenges and concerns for both potential retail investors and institutional investors, as the price of the investment is highly volatile and its uctuations are unpredictable. The rise of Machine Learning, and Natural Language Processing, in particular, has shed some light on monitoring and predicting the price behaviors of cryptocurrencies. This paper aims to review and analyze the recent e orts in applying Machine Learning and Natural Language Processing methods to predict the prices and analyze the behaviors of digital assets such as Bitcoin and Ethereum. Keywords: blockchain; cryptocurrency, natural language processing; price prediction 1 Introduction In recent years, blockchain technology and its desirable characteristics, such as decentralization and anonymity, have motivated the industry and academia. Even though the concept of using cryptograph- 1arXiv:2212.00726v1 [cs.CY] 28 Nov 2022 ically secured chain of blocks was rst described by Haber and Stornetta (1990) in their paper "How to Time-Stamp a Digital Document", the term blockchain started to attract signi cant attention after the group of developers who go by the pseudonym Satoshi Nakamoto described the blockchain model their white paper (Nakamoto, 2008) and implemented the peer-to-peer electronic cash system in 2009. The open and anonymous nature of the market has facilitated new opportunities while introducing new risks never seen before with established nancial institutions, such as trust, unpredicted uctuations, and fraudulent crowdfunding schemes. The digital age also sees the rise of social media platforms such as Twitter and Reddit, where users can easily and conveniently express their opinions at any time and from anywhere, in the form of a simple post or a "tweet." Investment advice and opinions are among the most popular topics discussed online because of its real-time nature. While Twitter has implemented some forms of veri cations to encourage people to use their real identities, such as asking for phone numbers or emails, Reddit has done little to ensure the users' identities are traceable. As a result, the world has witnessed the infamous case of Reddit's subforum "WallstreeBets" in January 2021, where the explosive power of Internet users and their speculative investment research can manipulate the investment prices, leading to the short squeeze of Gamestop's stock (GME) (Boylston, Palacios, Tassev, & Bruckman, 2021). In an open space with less regulation and more freedom like cryptocurrency, we see a clear opportunity to utilize textual data from social media posts helping investors make informed investment decisions. The remainder of this paper is organized as follows. In Section 2, we brie y covered the background and terminologies behind blockchain. In Section 3, we similarly presented a brief literature review of the recent developments in the Natural Language Processing space. We dived deep into the recent works that use Natural Language Processing to predict the price and behaviours of cryptocurrencies in Section 4, and concluded the paper in Section 5. 2 Background on Blockchain technology At a high level, a blockchain is a distributed ledger where all transactions are recorded in a chain of blocks. As new transactions are committed, new blocks will be appended to the chain (Zheng, Xie, Dai, Chen, & Wang, 2018). A distributed ledger is a public database where all participants can contribute and maintains a synchronized copy of the data. 2.1 Key characteristics •Decentralization. A key innovation of blockchain technology is the elimination of traditional in- termediaries (central banks). Cost and ow time can be massively reduced since transactions can 2 happen peer-to-peer (P2P). There are no single points of failure, as every network participant has the same copy of the data. •Persistency. blockchain is built to be an immutable ledger, meaning it is impossible to alter or delete the data already recorded in the blocks. •Anonymity. In the blockchain network, users are not identi ed by real names but by a randomly generated address, which will be liked to each user's transaction. Even though the transactions and the user's address (or wallet address) are public, the keys to prove ownership is private to each user. •Auditability. Since all participants have a copy of the data; it is possible to verify and trace the transactions based on the public wallet address and the digital timestamp. 2.2 Types of blockchain network There are three major types of blockchain networks: Public, Private and Hybrid. •Public (Permissionless) blockchain. In this network, users can join and leave at any time without obtaining prior permission. •Private (Permissioned) blockchain. In this network, only a limited number of users with permissions can read and write. •Hybrid blockchain. This is a combination of both public and private blockchains. Transactions and private information are kept inside the network but can still be veri ed. 2.3 Bitcoin (BTC) and Ether (ETC) and other crytocurrencies Bitcoin, proposed by Nakamoto (2008), is a digital currency using blockchain technology to facilitate transactions. It is still the most popular general-purpose cryptocurrency and is considered the rst cryptocurrency ever created. There are 21 million bitcoins in total, and each bitcoin consists of 100 million smaller units (satoshis). Bitcoin is an example of public blockchain. Since Bitcoin launched, other alternative cryptocurrencies based on blockchain technology have been introduced, including Ethereum - developed by Buterin (2014). Its focus is providing a protocol for building decentralized applications (dApps) deployed on Ethereum virtual machines (EVMs). Users can create smart contracts to perform various tasks using a built-in Turing-complete programming language to be executed on the blockchain. Turing complete (or computationally universal) refers to the idea that a system needs to have the capacity to implement arbitrary computer algorithms. In other words, it needs 3 Figure 1: An example system to predict the price of bitcoin by Pant et al. (2018). The Recurrent Neural Networks (Section 3.2) take into account two inputs: a sentiment score from a tweet, and the historical price of bitcoin to predict the next price to be able to stimulate a Turing machine. Ether (ETH) is the native cryptocurrency on the Ethereum network. Other popular cryptocurrencies by market capitalization include Tether (USDT), USD Coin (USDC), Binance Coin (BNB), etc. Both Tether, USD Coin, and Binance Coin were initially built on the Ethereum network. 2.4 Predicting Prices and Trends of Cryptocurrency As cryptocurrencies are considered valuable digital assets, various studies have been done to analyze and protect cryptocurrencies, just like any other type of investment. Past works have used Machine Learning methods extensively, alongside classical time-series variables (i.e., closing prices), to predict prices of cryptocurrencies such as Bitcoin, Ethereum, etc. Popular choices for model architecture include Autoregressive Integrated Moving Average (ARIMA) (Garg et al., 2018; Roy, Nanjiba, & Chakrabarty, 2018), Support Vector Machine (SVM) (Poongodi et al., 2020). In recent years, with the advancement in Machine Learning and Natural Language Processing, we have seen broad adoption of language models to support past works in predicting the Prices and Trends of an investment. Prior research suggested that peers' in uence and public moods in the form of unstructured texts have been found to play an important role in investment decisions and market predictions (Farimani, Jahan, Fard, & Ha ari, 2021; Farrell, Green, Jame, & Markov, 2022; Vo, Nguyen, & Ock, 2019). As a result, it is common to see an architecture in recent literature comprising two parts: a sentiment analyzer (to process the textual data such as Tweets from Twitter) and a prediction model (to predict the prices). 4 Figure 2: A biological neuron (left) and its simpli ed mathematical model (right)1 3 Background on Natural Language Processing To tackle a large amount of textual data, earlier works in the area have focused on gauging the general sentiment or the polarity of the text and quantifying it using manual labels (i.e., "positive," "neutral," and "negative" that are associated with a numeric value). This is generally considered the lexicon-based approach, in which a sentence will be transformed into a vector via a simple method such as a token count matrix (S a smaz & Tek, 2021). After that, a simple classi cation model such as Logistic Regression, Support Vector Machine (SVM), or Naive Bayes classi er. Latest developments in the Natural Language Processing eld have pushed the frontier in improving the performance of sentiment classi cation system by allowing the vector representation of a word to have a context. Various recent state-of-the-arts language models introduced recently include BERT (Devlin, Chang, Lee, & Toutanova, 2018), RoBERTa (Liu et al., 2019), XLNet (Yang et al., 2019), and ELECTRA (Clark, Luong, Le, & Manning, 2020). 3.1 Arti cial Neural Networks (ANNs) An arti cial neural network, or a neural network for short, is a mathematical model primarily inspired by the structure and functionalities of the biological neural system in the brain. Figure 2 showed the connection between a biological neuron on the left and its mathematical model on the right. At a high level, they work by taking input signals from their dendrites and output signals along its axon. These axons eventually connect to the dendrites of other neurons, creating the entire network . Another name for ANNs is Feed-Forward Neural network because the input information will only be processed in the forward direction, as seen in Figure 3. 1https://cs231n.github.io/neural-networks-1/ 2https://cs231n.github.io/neural-networks-1/ 5 Figure 3: Example architecture of a simple 3-layer neural network2 3.2 Recurrent Neural Networks (RNNs) Recurrent Neural Networks (RNNs) are models for data that involve times or sequences, such as sound, video, or language. They addressed a few limitations of Feed-Forward Neural networks, such as keeping track of or "memorizing" some of the inputs to make predictions in a situation where context and historical information plays an important role. 3.3 Long short-term memory Networks (LSTMs) Long Short-Term Memory networks or LSTMs are a type of RNN introduced by Hochreiter and Schmid- huber (1997) to address the long-term dependency problem in the original RNN architecture. The original RNN cannot make an accurate prediction as the gap between the point containing the relevant information and the point where the relevant information increases. As a result, LSTMs have become the popular model architecture with signi cant use cases in Image captioning, Language Translation, Algorithmic trading, and Text Generation. 4 Applications of NLPs in price prediction We can categorize the works in this space into two major groups: Corpus-based, and Advanced methods. 4.1 Corpus-based methods Corpus-based methods are based on the actual, real, and authentic words as they showed up in the document (Almutairi, 2016). By comparing and contrasting raw words from a document with a dictionary like the Harvard-IV dictionary (Dictionary with a list of positive and negative words), researchers can quickly sense the overarching sentiment of a post by aggregating the number of times that a positive or negative word shows up. Sul, Dennis, and Yuan (2017) utilized this method to show that a trading strategy incorporating Twitter postings' sentiments could generate an annual return between 10 and 15%. 6 4.2 Advanced NLP methods Advanced NLP techniques attempt to go beyond relying purely on the count of the words as they occur in a sentence. These methods gears towards language understanding, as they allow the context to be incorporated into the vector representation of a word, as discussed in Section 3. Vo et al. (2019) built a price prediction system using both news data and historical prices of Ethereum (ETH) to generate a prediction for future prices (Figure 4). The authors created semantic vectors of the news document using a classic n-gram language model and syntactic vectors utilizing a set of NLP methods such as Dependency Parser, Coreference Resolution, and Named Entity Recognition. These two vectors are combined to predict the sentiment score. Eventually, the sentiment score and the historical cryptocurrency price are used to predict the future price. The text data used in this work is crypto- related, obtained from NewsNow3, and manually labeled. A label of 1 indicates a positive sentiment before a rise in the historical price and vice versa. Otherwise, the news will be labeled as 0 (neutral) as there is no change in the price. Figure 5 showed that the proposed architecture achieved relatively better performance than the SVM baseline when predicting ETH prices between July 2017 and October 2018. To leverage the power of transfer learning, Cheuque Cerda (2021) used the pretrained ULMFiT and BERT model in predicting the stance of a tweet from crypto-in uencers and used these insights in building price prediction models using XGBoost and LSTM. The author showed that while there might be a weak relationship between the asset price and crypto-in uencers' opinion, this e ect was much stronger and more causal in the short term. Huang et al. (2021) proposed using news articles and social media platforms such as Sina-Weibo, WeChat, and QQ groups to build a crypto-speci c sentiment analysis model based on the Long short- term memory (LSTM) Recurrent Network Structure (Figure 6). The data used in the training process was manually labeled as positive (1), neutral (0), and negative (-1). The social media posts were tokenized using the manually-created crypto word vocabulary speci c for Chinese words and used as the input to the LSTM Sentiment Analyzer. Ortu, Vacca, Destefanis, and Conversano (2022) showed via various empirical analyses that the price of Bitcoin is highly correlated with the sentiment from the discussions on social media forums such as Reddit. Using dynamic topic modeling and Hawkes models, they were able to explain how public opinions on social media chatter can in uence each other and cause price uctuations. Ortu, Uras, Conversano, Bartolucci, and Destefanis (2022) compared the performance of four di erent deep learning models (Multi-Layer Perceptron, Multivariate Attention Long Short Term Memory Fully Convolutional Network, Convolutional Neural Network, and Long Short Term Memory in predicting 3https://newsnow.co.uk 7 Figure 4: Proposed system to predict the price of Ethereum (Vo et al., 2019) Figure 5: Result of predicting Ethereum (ETH) prices using di erent approaches (Vo et al., 2019) 8 Figure 6: Cryptocurrency sentiment analysis and price movement prediction (Huang et al., 2021) the price movements of Ethereum and Bitcoin between 2017 and 2020, utilizing BERT to extract the emotions from social media posts. The competitive results showed a lot of promise in detecting the price movements of Bitcoin and Ethereum. 5 Conclusion The e ort in using advanced machine methods to better understand cryptocurrencies has proved that investing in digital currencies is considered an alternative investment. As innovations are introduced in both the crypto world and the natural language processing eld every day, opportunities and challenges exist in this niche research area. With cryptocurrency being a new research topic, more work needed to be done in this area to create an even more robust and accurate monitoring system to better utilize the massive amount of data available, especially the textual data surrounding the topic. References Almutairi, N. D. (2016). The e ectiveness of corpus-based approach to language description in creating corpus-based exercises to teach writing personal statements. English Language Teaching ,9(7), 103{111. Boylston, C., Palacios, B., Tassev, P., & Bruckman, A. (2021). Wallstreetbets: positions or ban. arXiv preprint arXiv:2101.12110 . Buterin, V. (2014). Ethereum whitepaper. Retrieved from https://ethereum .org/en/ whitepaper/ Cheuque Cerda, G. A. (2021). Bitcoin price prediction through stimulus analysis: on the footprints of twitter's crypto-in uencers. Clark, K., Luong, M.-T., Le, Q. V., & Manning, C. D. (2020). Electra: Pre-training text encoders as discriminators rather than generators. arXiv preprint arXiv:2003.10555 . 9 Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018). Bert: Pre-training of deep bidirec- tional transformers for language understanding. arXiv preprint arXiv:1810.04805 . Farimani, S. A., Jahan, M. V., Fard, A. M., & Ha ari, G. (2021). Leveraging latent economic concepts and sentiments in the news for market prediction. In 2021 ieee 8th international conference on data science and advanced analytics (dsaa) (pp. 1{10). Farrell, M., Green, T. C., Jame, R., & Markov, S. (2022). The democratization of investment re- search and the informativeness of retail investor trading. Journal of Financial Economics , 145(2), 616{641. Garg, S., et al. (2018). Autoregressive integrated moving average model based prediction of bitcoin close price. In 2018 international conference on smart systems and inventive technology (icssit) (pp. 473{478). Haber, S., & Stornetta, W. S. (1990). How to time-stamp a digital document. In Conference on the theory and application of cryptography (pp. 437{455). Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural computation ,9(8), 1735{1780. Huang, X., Zhang, W., Tang, X., Zhang, M., Surbiryala, J., Iosi dis, V., . . . Zhang, J. (2021). Lstm based sentiment analysis for cryptocurrency prediction. In International conference on database systems for advanced applications (pp. 617{621). Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., . . . Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692 . Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Decentralized Business Review , 21260. Ortu, M., Uras, N., Conversano, C., Bartolucci, S., & Destefanis, G. (2022). On technical trading and social media indicators for cryptocurrency price classi cation through deep learning. Expert Systems with Applications ,198, 116804. Ortu, M., Vacca, S., Destefanis, G., & Conversano, C. (2022). Cryptocurrency ecosystems and social media environments: An empirical analysis through hawkes' models and natural language processing. Machine Learning with Applications ,7, 100229. Pant, D. R., Neupane, P., Poudel, A., Pokhrel, A. K., & Lama, B. K. (2018). Recurrent neural network based bitcoin price prediction by twitter sentiment analysis. In 2018 ieee 10 3rd international conference on computing, communication and security (icccs) (pp. 128{ 132). Poongodi, M., Sharma, A., Vijayakumar, V., Bhardwaj, V., Sharma, A. P., Iqbal, R., & Kumar, R. (2020). Prediction of the price of ethereum blockchain cryptocurrency in an industrial nance system. Computers & Electrical Engineering ,81, 106527. Roy, S., Nanjiba, S., & Chakrabarty, A. (2018). Bitcoin price forecasting using time series analysis. In 2018 21st international conference of computer and information technology (iccit) (pp. 1{5). S a smaz, E., & Tek, F. B. (2021). Tweet sentiment analysis for cryptocurrencies. In 2021 6th international conference on computer science and engineering (ubmk) (pp. 613{618). Sul, H. K., Dennis, A. R., & Yuan, L. (2017). Trading on twitter: Using social media sentiment to predict stock returns. Decision Sciences ,48(3), 454{488. Vo, A.-D., Nguyen, Q.-P., & Ock, C.-Y. (2019). Sentiment analysis of news for e ective cryp- tocurrency price prediction. International Journal of Knowledge Engineering ,5(2), 47{52. Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R. R., & Le, Q. V. (2019). Xlnet: Generalized autoregressive pretraining for language understanding. Advances in neural information processing systems ,32. Zheng, Z., Xie, S., Dai, H.-N., Chen, X., & Wang, H. (2018). Blockchain challenges and opportunities: A survey. International journal of web and grid services ,14(4), 352{375. 11
{ "id": "2212.00726" }
2308.02653
Incentivizing Gigaton-Scale Carbon Dioxide Removal via a Climate-Positive Blockchain
A new crypto token is proposed as an incentive mechanism to remove CO2 from the atmosphere permanently at gigaton scale. The token facilitates CO2 removal (CDR) by providing financial incentives to those that are removing CO2 and an opportunity to provide additional financial resources for CDR by the public. The new token will be native to a blockchain that uses a Proof-of-Useful-Work (PoUW) consensus mechanism. The useful work will be conducted by direct air carbon capture and storage (DACCS) facilities that will compete with each other based on the amount of CO2 captured and permanently stored. In terms of energy consumption, we require that the entire process, comprising DACCS technology and all blockchain operations, be climate positive while accounting for life cycle analysis of equipment used. We describe the underlying reward mechanism coupled with a verification mechanism for CDR. In addition, we consider security features to limit attacks and fraudulent activity. Finally, we outline a roadmap of features that are necessary to fully implement and deploy such a system, but are beyond the current scope of this article.
http://arxiv.org/pdf/2308.02653v1
Jonathan Bachman, Sujit Chakravorti, Shantanu Rane, Krishnan Thyagarajan
cs.CR, cs.CY
cs.CR
1 Incentivizing Gigaton-Scale Carbon Dioxide Removal via a Climate-Positive Blockchain Jonathan Bachman, Sujit Chakravorti, Shantanu Rane and Krishnan Thyagarajan Abstract A new crypto token is proposed as an incentive mechanism to remove CO 2from the atmosphere permanently at gigaton scale. The token facilitates CO 2removal (CDR) by providing financial incentives to those that are removing CO2and an opportunity to provide additional financial resources for CDR by the public. The new token will be native to a blockchain that uses a Proof-of-Useful-Work (PoUW) consensus mechanism. The useful work will be conducted by direct air carbon capture and storage (DACCS) facilities that will compete with each other based on the amount of CO 2captured and permanently stored. In terms of energy consumption, we require that the entire process, comprising DACCS technology and all blockchain operations, be climate positive while accounting for life cycle analysis of equipment used. We describe the underlying reward mechanism coupled with a verification mechanism for CDR. In addition, we consider security features to limit attacks and fraudulent activity. Finally, we outline a roadmap of features that are necessary to fully implement and deploy such a system, but are beyond the current scope of this article. Index Terms Direct Air Carbon Capture and Storage (DACCS), distributed consensus, Proof-of-Useful-Work, blockchain, zero- knowledge proof, crypto token I. I NTRODUCTION AND BACKGROUND As realization grows about the impact of climate change, policymakers have considered incentive mechanisms to reduce the rate of increase of carbon dioxide, CO 2, in the atmosphere. Such incentives include tax credits on the purchase of electric vehicles and subsidies for renewable energy generation. To reduce net CO 2emissions, one incentive mechanism enables polluting agents to purchase carbon credits (also called offset credits) to compensate for their emissions of CO 2and other greenhouse gases. While these credits can fund technologies to reduce the increase of CO 2in the atomosphere, they have significant limitations. We are particularly concerned that carbon credits represent an easy option for polluters, removing the incentive to make the concerted changes necessary to mitigate climate change. S. Rane, J. Bachman, and K. Thyagarajan are with Palo Alto Research Center (PARC, Inc.). S. Chakravorti is with Alliance for Innovative Regulation (AIR). August 8, 2023 DRAFTarXiv:2308.02653v1 [cs.CR] 4 Aug 2023 2 In this article, we propose a mechanism that uses a crypto token to reward carbon dioxide removal (CDR) from the atmosphere using Direct Air Carbon Capture and Storage (DACCS).1Unlike a carbon credit, that represents one metric ton of greenhouse gases removed from the atmosphere, our token does not represent an amount of CO 2 equivalent captured and stored. Our tokens are “mined” by the winning DACCS facility and its value is determined by the market for the token. Furthermore, the DACCS process including life-cycle analysis of the equipment used must be climate positive, namely capture more CO 2equivalents than greenhouse gasses emitted. The adoption and usage of the token depends on the demand of two distinct groups: those that are willing to provide financial incentives for CDR, including individuals, businesses, and governments, and those that remove CO 2from the atmosphere. Although not exact, one simple way to gauge the demand for CDR and the willingness to pay is to observe the demand for carbon credits. McKinsey estimates that the annual global demand for carbon credits could reach up to 1.5 to 2.0 gigatons of CO 2by 2030 and the market size could range from $5 billion to more than $50 billion depending on various factors [2]. To meet the climate goals of the 2015 Paris Agreement, we must substantially reduce greenhouse gas emissions, generate more energy from renewable sources, and capture and store CO 2from the atmosphere at gigaton scale. Our proposed solution focuses on the last component. CDR approaches, such as reforestation, biochar, bioenergy with carbon capture and storage (BECCS) and DACCS, should be a part of the solution to limit global warming between 1.5°C or 2°C. Smith et al. [1] estimates that novel CDR approaches would have to increase by a factor ranging from 30 to 540 by 2030 to limit warming between 1.5°C or 2°C. For the DACCS CDR, we propose a solution that: verifies and records the quantity of CO 2captured and stored by the winning DACCS facility on an immutable blockchain in real time, rewards DACCS facilities to remove and store gigatons of CO 2, and offers sufficient security against malicious attacks and fraud. Our results can be generalized to other CDR technologies as long as measurement of capture and storage can be done accurately and timely. We propose collecting telemetric data using tamper-resistant sensors and recording this information on an immutable climate-positive blockchain. In our case, we define a climate positive blockchain as the sum of CO 2 captured and stored, the amount of CO 2equivalents emitted during the operation of the DACCS facility including life-cycle analysis of the equipment used, the CO 2equivalents emitted from blockchain operations and storage of transactions along with life-cycle analysis of the equipment used. The linking of the physical world with the digital world has its challenges including security especially guarding against adversarial attacks and fraudulent transactions. We propose a process that is highly automated and secure to provide sufficient reliability and trust in the data collected in real time. By doing so, we address a major challenge to the current system of carbon offsets, namely the transparency and verifiability of the amount of CDR and stored [3]. Our proposed blockchain uses Proof-of-Useful-Work (PoUW) consensus mechanism where the useful work is 1CDR technologies do not include Carbon Capture and Storage (CCS) and Carbon Capture and Utilisation (CCU). According to Smith et al. [1], to count as Carbon Dioxide Removal (CDR) technology, “a method must be an intervention which captures CO 2from the atmosphere and durably stores it.” CCS and CCU are industrial processes aimed at reducing the emission of CO 2. August 8, 2023 DRAFT 3 CDR.2The winning DACCS facility would be determined by a weighted lottery draw based on the amount of CO 2 captured and stored. Because we require that each DACCS facility is on net removing CO 2from the atmosphere, even the non-winning DACCS facility are contributing to the removal of CO 2. Upon verification by independent validators of the telemetric data, the winning DACCS facility would be financially rewarded with a quantity of tokens and would add the new block to the chain similar to a crypto miner participating in a PoW consensus mechanism. A market would develop where those that wanted to financially contribute to the removal of CO 2could purchase these tokens from the winning facilities. These tokens represent verified CO 2removal and storage. Clearly, the DACCS facilities would only expend additional resources to participate if they are able to convert these tokens into a medium of exchange, such as fiat currency, that could be used to buy goods and services. We also discuss how these tokens themselves could become a medium of exchange used to buy goods and services directly. In other words, these tokens would not need to be converted to fiat currency or other media of exchange. When compared with the enormous amount of energy consumed by the Bitcoin network to operate its Proof- of-Work-based consensus mechanism, our approach consumes a significantly smaller amount of energy. More importantly, while the large energy consumption in Bitcoin results in massive amounts of CO 2emissions, our approach targets a massive net reduction in the amount of atmospheric CO 2.3 In other words, PoUW consensus mechanism that we propose has the advantage that the energy used to “mine” or add blocks to the blockchain is being used to remove net CO 2from the atmosphere accounting for CO 2equivalents used in the process. Crucially, all the miners – the DACCS facility that creates the next block, as well as all other DACCS facilities that do not win the competition to create the next block – contribute to CDR. This should be contrasted with other PoW cryptocurrencies where the energy consumed by the unsuccessful miners is wasted. This article is organized as follows. In Section II, we describe the DACCS technology, why this technology is suitable for a PoUW consensus mechanisms, and identify the telemetry and mass balance equations that are necessary for the PoUW consensus mechanism. In Section III, we outline the incentive mechanism using a decentralized framework. In Section IV, we describe the key steps in a notional protocol for establishing consensus in a climate positive blockchain and discuss some security considerations. In Section V, we explore how the token becomes a medium of exchange and used to purchase goods and services. In Section VI, we discuss a roadmap for next steps that were beyond the scope of the current investigation. II. D IRECT AIRCARBON CAPTURE AND STORAGE (DACCS) AS A BASIS FOR POUW In this section, we present a high-level description of direct air carbon capture and storage (DACCS) technology, an argument for why DACCS provides a compelling basis for a PoUW scheme, an outline of the telemetry and 2For general discussion of PoUW consensus mechanisms, see [4], [5], and [6]. 3For estimates of the carbon footprint of Bitcoin, the most popular cryptocurrency using a PoW consensus mechanism, see [7], [8], and [9]. For example, according to Digiconomist website on July 7, 2023, the Bitcoin network consumes 102.45 terawatt-hours per year which is similar to annual power consumption of Kazakhstan and has a carbon footprint of 57.14 million tons of CO 2per year which is similar to the carbon footprint of Portugal. August 8, 2023 DRAFT 4 mass flow monitoring that can be used in the PoUW protocol, and finally a discussion on the role of life-cycle analysis and net CO 2removal. A. Introduction to DACCS DACCS is an engineered carbon dioxide removal (CDR) process that involves separating CO 2from air and then safely and permanently storing it underground. While DACCS is a relatively new technology, there are several scale- up projects underway to demonstrate its feasibility and effectiveness as a climate mitigation strategy. Government support for DACCS is growing, with several countries and regions taking an early lead in supporting its research, demonstration, and deployment. The United States has established several policies and programs to support DACCS, including the 45Q tax credit that provides up to $180 per ton of CO 2stored. A key feature of DACCS is that it is not tied to existing energy infrastructure (i.e., fossil-fuel burning power plants), giving it the opportunity to scale by constructing stand-alone DACCS facilities rather than by retrofit. That said, DACCS deployment does rely on the availability of low-carbon energy sources and suitable geological storage. The source of energy used will determine how net-negative the system is and drives overall capture cost, and while the global capacity for storing CO 2underground is vast, specific site characterization is needed before commissioning a CO 2storage facility. The growing voluntary market is the primary driver for investment in DACCS. Large companies that are seeking to deliver on their net-zero commitments can purchase carbon dioxide removal (or a promise for future carbon dioxide removal) to offset their past, current, or future emissions. However, additional incentives for companies to conduct DACCS are needed to drive the technology to the gigaton scale. B. Why use DACCS as the basis for PoUW? The argument for using DACCS as the basis for a PoUW protocol is based first on its positive climate impact and second on its ability to be precisely measured and monitored. First, a fundamental requirement for the climate- positive blockchain is that its operation results in a net positive climate impact, i.e., CO 2removal from the atmosphere. The net removal efficiency varies by DACCS technology and energy source, with impacts ranging from –0.36 to –0.94 tCO 2eper 1t atmospheric CO 2captured and stored for a baseline grid mix in 2020 [10]. Second, when compared to nature-based CDR as well as alternative technology-based CDR, DACCS is unique in that its rate of carbon removal can be precisely measured. Using well established measurement tools (e.g., temperatures, pressures, compositions, and flow rates), CO 2removal rates from DACCS processes can be monitored in real-time. It is this measurement precision that makes DACCS well suited for a carbon negative PoUW scheme. In our vision, token generation via PoUW can occur in parallel with the voluntary removal purchases to provide additional revenue to DACCS operators, where DACCS operators can sell carbon removal as usual while also using their telemetry to mine a fungible cryptocurrency. If there was widespread adoption of this token as a medium of exchange and store of value, we believe this would greatly accelerate growth in DACCS. C. Telemetry and Mass Flow Monitoring The goal here is to propose a set of process value measurements (a.k.a., telemetry) that is general across DACCS technologies, that can be used to monitor and verify a facility’s rate of carbon dioxide removal, and that can be August 8, 2023 DRAFT 5 Fig. 1. DACCS facility, process flow diagram, and sensor telemetry for the capture and storage process. communicated to a network to demonstrate PoUW. DACCS involves a capture process coupled to a storage process. The capture rate and storage rate can be measured independently at the points of capture and points of storage, respectively. A process flow diagram and the sensor telemetry that be used to measure and report the CO 2capture and storage are shown in Figure 1. Here, we propose a monitoring scheme that involves conducting measurements on the capture process and storage process during operation, using those measurements to calculate CO 2captured and CO 2stored over a time interval. Capture is generally conducted in a cyclical or continuous process that involves contacting air with a capture media that selectively binds CO 2, regenerating the capture media to produce high purity CO 2gas, and reusing the capture media in the next cycle. There have been several capture technologies deployed with various types of capture media, wherein the binding can occur via adsorption (CO 2binding to a solid capture media) or absorption (CO 2binding to a liquid capture media). Common among capture technologies is an operation in which air is flowed across a capture media, with the concentration of CO 2in the air decreasing from inlet to outlet. There may be several capture units in parallel operation within the capture facility, so the total capture rate is determined by a sum of the capture rate from each capture unit. The CO 2concentration and mass flow rate can be measured in a variety of ways. For example, the CO 2concentration can be measured using an infrared spectrometer and the mass flow rate can be determined by measuring the volumetric flow rate, temperature, and pressure using an orifice flow meter, temperature transducer, and pressure transducer, respectively. After the CO 2is captured, it is compressed and transported to the storage site. The mass flow rate of CO 2can be measured directly using a Coriolis mass flow meter. Alternatively, the mass flow rate can also be measured using a thermal mass flow meter or a turbine mass flow meter. The mass fraction of CO 2can be measured using directly (using an infrad spectormeter) or indirectly. For an indirect measurement of the CO 2mass fraction, the pressure, temperature, and density can be used to infer the mass fraction of CO 2in the stream. The mass of CO 2stored over August 8, 2023 DRAFT 6 a time interval at the point of storage can be determined using the mass balance equation: mstored =Zt t0(CCO2∗˙m)dt where CCO2is the mass fraction of CO 2and˙mis the mass flow rate. The calculation of net removal from mstored is discussed in the next section. D. Life Cycle Analysis and Net Removal It is important to take into consideration the greenhouse gas emissions associated with constructing and operating the DACCS facility. This can be done using life cycle analysis, where the amount of CO 2eemitted per ton CO 2 stored is determined. The life cycle analysis takes into account the energy requirement per ton CO 2stored, the carbon intensity of thermal and electricity sources, the construction and material inputs of the DACCS facility, etc. The life cycle analysis yields a value assigned to the DACCS facility that represents its net removal per ton CO 2 stored. DACCS facilities which are the most efficient and use the lowest carbon intensity energy sources will have the greatest net removal per ton stored. The net removal is given by: Xi=mstored∗Yi where Xiis the net removal of CO 2by a DACCS facility over some time period (ton CO 2e), and Yiis the life cycle analysis value assigned to the DACCS facility (ton CO 2e/ton CO 2). III. T HEINCENTIVE MECHANISM To incentivize DACCS operators, we propose to create a reward mechanism coupled with a mechanism to verify a operator’s claims of CO 2capture and storage. We assume that steady state has been reached in terms of the number of DACCS operators. The verification mechanism is necessary to build trust in the reward mechanism, which is necessary to drive widespread adoption and to shift public opinion. There are several ways in which a verification mechanism can be constructed. We do not advocate the use of a trusted entity to drive the verification mechanism, because such a trusted entity is hard to find or develop in practice. Instead, in this article, we are concerned with the technological feasibility of a decentralized approach to the verification mechanism, wherein trust is placed in a network of a large number of mutually untrusting validators. No single validator is trusted, however, cryptographic mechanisms combined with verification of sensor telemetry from DACCS facilities can enable a network of validators to verify – i.e., achieve consensus on – a DACCS operator’s claims of CO 2removal. Censorship resistance implies that anybody on the planet can set up a DACCS facility and benefit from the associated reward mechanism. This would require that the technical specifications of a prototypical DACCS facility and its operating procedures be available to everybody. This is not unlike the censorship resistance achieved in cryptocurrencies such as bitcoin. In the subsequent sections, we will describe how to implement this combination of a reward mechanism coupled with a verification mechanism. For concreteness, the CDR operators in these protocols are DACCS facilities, but August 8, 2023 DRAFT 7 extensions to other approaches are possible. We describe a winner selection protocol, in which every DACCS facility performs the “useful work” of CO 2removal and wins a reward with a probability proportional to the amount of CO 2it has (provably) removed. When the reward is in the form of a crypto token, we describe how the winner selection protocol lends itself to a blockchain-based cryptocurrency based on PoUW. The verification mechanism in this case, thus establishes consensus not only on which DACCS facility wins the reward for CO 2storage, but also on the state of the resulting blockchain. We remark that, unlike popular PoW mechanisms such as bitcoin, the “work” done by allDACCS facilities (not just the winning DACCS facility) is climate positive. We contend that, if this token is widely adopted as a medium of exchange, it would provide an additional powerful incentive for CO 2removal. In other words, the token would not only support CDR activities but economic activity more broadly and would potentially become a medium of exchange. In addition, our proposed incentive mechanism takes advantage of a key benefit to issuers of most fiat currencies, such as the US dollar, called seigniorage. The actual production of these tokens is close to zero but the token represents monetary value.4The difference between the face value of the token minus the production cost is known as seigniorage. As the demand for CDR removal increases, so does the monetary value of the token. Thus, the increase in demand for the coin creates additional monetary incentive to DACCS operators. IV. D ESIGNING A C ONSENSUS MECHANISM AND REASONING ABOUT SECURITY GUARANTEES A key technical challenge is to craft a distributed consensus protocol in which mutually untrusting parties can verify claims of CO 2captured and stored, and for each round, determine a winner based on the amount of CO 2 captured and stored. The role of such a winner can be many-faceted. For example, the process of determining a winner may trigger the generation of a specified quantity of crypto tokens which are sent to the winner. The winner – in this case, the winning Direct Air Carbon Capture and Storage (DACCS) facility – could, in turn, distribute the token amongst several stakeholders, use the token, directly or converting it to medium of exchange, to fund the DACCS operation, or use it to purchase other goods and services. In a cryptocurrency application in particular, the winner records the awarded tokens in the block they create and append to the blockchain. We provide below the key steps in a notional protocol for establishing consensus about the DACCS facility that receives a reward for storing CO 2in a climate-positive blockchain. A. Participants The consensus protocol is executed by a network of mutually untrusting entities. A subset Mof these entities own or operate carbon capture facilities. For specificity, we will assume that the CO 2capture facilities employ DACCS technology. We will refer to the DACCS facilities as miners in our context for two reasons: (1) they are extracting CO 2from the air and storing it, (2) their role is analogous to miners in traditional cryptocurrency mining [12]. 4For discussion of seigniorage, see [11]. August 8, 2023 DRAFT 8 Validator network𝑀!Air𝐶𝑂"𝑀#𝑀"……𝑀$𝑀!∗Miners sending 𝐶𝑂!removal telemetryWinnerSelection𝑀!∗PreliminaryWinnerVerification of sensor telemetryPreliminary Winner SelectionInitial Storage Claim to Validators SuccessNoYes Fig. 2. DACCS operators submit sensor telemetry to a network of validators which determines a winning DACCS operator (miner). Let the set of miners be denoted by M={M1, M 2, . . . , M K}. Another subset Vof the mutually untrusting entities is tasked with receiving information from the DACCS facilities, verifying the claims of carbon capture and storage, and determining the winning DACCS facility which earns a reward in the form of a token. We denote the set of these validators as V={V1, V2, . . . , V N}. Note that N≫K, as any one with a relatively small amount of computing resources can sign up to be a validator, while setting up a DACCS facility is an expensive proposition. In some variations, there can be overlaps between the two sets, i.e., a DACCS facility can also be a validator, thus Vi≡Mjfor some i < N, j < M . For the development below, however, we consider the simpler case in which the two sets to be disjoint. B. Winner Selection Protocol We now describe how a network of untrusted miners and untrusted validators can establish consensus about the amount of CO 2captured and stored by one of the miners chosen at random (See Fig. 2). If the CO 2-capture and storage claims are verified, the chosen miner is determined the winner, and a reward – in terms of a quantity of crypto tokens – is generated and sent to the winner. We defer a discussion of the value of the token and its possible uses to subsequent sections. Winner selection occurs using the following steps: 1)CO 2Capture: At a designated time-stamp tsagreed upon by the miners and validators, each miner Mi∈ M starts capturing CO 2. The capture process continues for a designated constant period of time T. The miner stores the sensor data from the capture process. Let us denote the sensor data captured by MiasCi(t) = {C(1) i(t), C(2) i(t), . . . , C(P)(t) i}, where ts≤t≤ts+T. Here, C(1) i(t), C(2) i(t),etc, are the various physical variables that constitute the CO 2-capture process. 2)CO 2Storage: At regular intervals after time ts, each miner also performs a process of storing the captured CO 2. The cadence of capture and storage intervals can differ from miner to miner, depending upon the equipment and technology used. The storage process can be performed in chunks of time, or can be performed continuously as more and more CO 2is captured. The miner stores the sensor data from the storage process. Let us denote the sensor data captured by MiasSi(t) ={S(1) i(t), S(2) i(t), . . . , S(Q) i(t)}, where ts≤t≤ts+T. Here, S(1) i(t), S(2) i(t),etc, are the various physical variables that constitute the CO 2-storage process. The August 8, 2023 DRAFT 9 sequence of CO 2capture and storage processes, shown here in the context of direct air capture continue until a time stamp te=ts+T. 3)Initial CO 2-Storage Claim to Validators: Each miner Mi,1≤i≤Mthen sends to each validator Vj,1≤ j≤N, an initial claim of CO 2storage. This communication from Mi, received by each Vjis described as a set Ai={i, ri, ts, Xi,ZKP(Ci(t),Si(t))}. Here, ZKP (Ci(t),Si(t))is a concise non-interactive zero- knowledge proof extracted from the capture and storage telemetry.5Xiis the claimed amount of stored CO 2. riis a random number that will later be used by the validators for selecting a winning miner. To ensure message authenticity and integrity, Aiis bundled with a digitally signed hash, computed by Mi, given by Signi(h(Ai)), where h(·)is a standard hash function, e.g., SHA-256. The final message thus takes the form Bi={Ai,Signi(h(Ai))}. 4)Verification of Initial Claim: Each validator Vj, then verifies that the message received from each Mi is genuine and unmodified, using the public key of Miand the knowledge of the hash function h(·). Each validator also verifies the zero-knowledge proof ZKP (Ci(t),Si(t))for each miner. This means that each miner presents a proof to the validators that they have captured relevant sensor data during capture and storage, without revealing that data. At this point, a number of mechanisms are possible to enable the validator network to agree upon a winning miner. We describe one possible mechanism here, but many others are permissible. 5)Preliminary Winner Selection: To each miner Mi, a validator then assigns the length of a subset of the unit interval [0,1]given by: ℓi=Xi ΣM iXi(1) To maintain consistency amongst the calculations of the validators, the calculation of ℓiis performed by a validator Vjif and only if they have received the message Bifor each i∈ {1,2, . . . , M }. If not, the validator does not participate in this computation. Furthermore, the segments of length ℓiare arranged in ascending order of i, such that ΣM iℓi= 1. Let the ithsegment, having length ℓihave endpoints ui−1andui. Thus, the lengths are given by len (u0, u1) =ℓ1, len(u1, u2) =ℓ2, len(u0, u2) =ℓ1+ℓ2, len(u0, uM) = ΣM iℓi= 1, etc. Each validator Vjcomputes a random number, which – by construction – is the same across all validators, given by: ¯r=MX i=1ri The number ¯ris then hashed using a cryptographic hash algorithm, e.g., SHA-256, and mapped to the unit interval as a number br∈[0,1]. Then each Vjdetermines the winning miner as: Mi∗≡Misuch that len (u0, ui−1)≤br≤len(u0, ui) (2) 5The zero-knowledge (ZK) proof captures the physical relationships between the sensor readings in the capture and storage processes. We are not aware of such proofs existing today, but are of the opinion that succinct ZK proof approaches developed in the literature (e.g., [13], [14]) could be leveraged to construct them. We pose the development of succinct Non-Interactive Zero-Knowledge Proofs (NIZKs) to capture relationships amongst physical quantities as an interesting and open research area. August 8, 2023 DRAFT 10 Each Vjbroadcasts or gossips the identity of the winning miner Mi∗to the validator network, along with the random number brso that other validators can verify that the preliminary winning miner is chosen correctly. Concretely, Mi∗is considered to be declared as the preliminary winning miner when the number of validators confirming the choice of i∗crosses a specified (large) threshold. 6)Verification of Sensor Telemetry : When the preliminary winning miner Mi∗is determined, its identity is broadcast to the network. Mi∗then transmits its actual sensor data, i.e., Ci∗(t)andSi∗(t)to each val- idator Vj. In addition to the raw sensor data, Mi∗also sends to the validators digitally signed hashes of the capture and storage data, accompanied by the timestamp ts. We denote this signed, timestamped data by Sign (ts∥h(C(k) i∗(ts)∥C(k) i∗(ts+ 1)∥. . .∥C(k) i∗(ts+T))for1≤k≤Pon the capture side, and Sign(ts∥h(S(m) i∗(ts)∥S(m) i∗(ts+1)∥. . .∥S(m) i∗(ts+T))for1≤m≤Qon the storage side. Here again, h(·)is a standard hash function. What this means is that each sensor on the capture and storage side digitally signs its telemetry and incorporates a timestamp. Each validator then confirms whether the capture and storage data are consistent with Xi∗, the claimed amount of CO 2captured.6If the sensor telemetry is determined to be consistent by each validator, (or a large enough majority of validators), then the winning miner Mi∗is confirmed. If not, the step of preliminary winner selection is repeated after excluding Mi∗, i.e., after setting Xi∗= 0 and therefore ℓi∗=len(ui∗−1, ui∗) = 0 . This process is repeated until it is confirmed that the sensor telemetry received from the chosen miner is consistent with the claimed amount of carbon storage for ts< t < t s+T. C. Security and Privacy Considerations We presented the above protocol with clarity in mind, however, there are alternative implementations that might be more efficient from the perspective of the protocol’s communication overhead and privacy of the miners. As an example, it is conceivable that the step representing verification of sensor telemetry in Step 6 might be obviated by absorbing the verification operations inside a novel zero-knowledge proof in the step representing verification of the initial claim (Step 4). We do not yet know of an efficient zero-knowledge proof mechanism for this alternative implementation. Conceptually, it appears to be similar to zero-knowledge middleware boxes (ZKMB) [15] used to prove compliance with network protocol requirements. In that case, the winner selection process would primarily be performed in Step 5, with just the mitigations for non-compliant telemetry – i.e., disqualifying miners whose telemetry has been shown in zero-knowledge in Step 5 to be inconsistent with the claimed CO 2storage values – being performed in Step 6. In what follows, we will discuss security considerations that apply to the protocol as described above, wherein the winner selection is done in two steps, a preliminary selection (Step 5) followed by a verification of sensor telemetry (Step 6). Security considerations include: 6We remark that an alternative approach would refrain from splitting the CO 2storage claims into a preliminary check and a final check. Concretely, if the zero-knowledge proof can be designed to capture the relationship between Xiand the capture/storage sensor readings, then the last step of the protocol is not necessary. Again, development of efficient zero-knowledge proofs to accomplish this is posed as an open research problem. August 8, 2023 DRAFT 11 1)Data Authenticity and Integrity: The protocol described above ensures authenticity and integrity of the information being transmitted. In the initial storage claim, each miner Mi,1≤i≤Kdigitally signs the data sent to the validators. This prevents man-in-the-middle attacks in which the data is intercepted and manipulated in transit, before it reaches any validator. Furthermore, in the verification of the sensor telemetry, the data sent from the capture sensors and the storage sensors to the validator network is also digitally signed by the sensor manufacturer. We assume that the sensors are equipped with a trusted platform module at the time of manufacture, that allows them to sign their data. The signature verification keys of all the sensors are publicly available to all validators. This ensures that the miner operating the DACCS facility cannot modify the sensor data to claim a false amount of CO 2captured or stored. Concretely, a dishonest miner could fabricate sensor data but would not be able to produce a digital signature on the fabricated data because he does not know the sensor’s signing key. 2)Replay Attacks: A timestamp is embedded in the signed data sent by each capture and storage sensor. This ensures that a miner cannot replay sensor data from the past while fooling the network that it has newly captured or stored CO 2. 3)Faulty Initial Storage Claim Data: Suppose that a validator is not able to verify the zero-knowledge proof that a particular miner Mihas gathered relevant sensor data. Note that the protocol requires the same ZKP to be sent to all validators. If some validators discover that they are unable to verify the ZKP sent by Mi, then it means that Mihas sent a different and incorrect ZKP to some or all validators, so this miner must be disqualified from the winner selection algorithm. In this case, the validator’s gossip the identity of the miner Miand exclude that miner from the further steps in the protocol. This is essential because all validators have to maintain the same state – the same random number ¯rand the same segments of the unit interval in the preliminary winner selections step – in order to compute the preliminary winner. 4)Sensor Data Incompatible with Storage Claim: Suppose that, in the final step involving verification of the sensor telemetry, one or more validators discover that the amount of CO 2claimed as stored by Mi∗is inconsistent with the received sensor data. In this case, at a minimum, Mi∗is removed from consideration, i.e., the protocol repeats step 5 after setting Xi∗= 0. It is conceivable that stricter measures may be adopted against Mi∗to discourage dishonest CO 2storage claims by miners, such as disqualification from participation for a longer time period; We do not consider such measures in detail in this paper. 5)Validators that Intentionally Misreport Results of one or more Protocol Steps: Due to the use of digital signatures, it is computationally infeasible for a validator to forge the sensor telemetry in both the verification of the initial claim of carbon capture, and the verification of the full sensor data. Malicious action, in this case, consists of a collusion of a vast number of validators who coordinate to misreport the result of the preliminary winner selection algorithm. In essence, this is similar to a malicious attack on a cryptocurrency where a majority of the nodes refuse to confirm a block transaction, for the purpose of generating a temporary fork in the blockchain. The larger the size of the set of colluders, the more secure the protocol is from their actions. At the very least, this number should be set to be greater than 50% of the total number of validators. August 8, 2023 DRAFT 12 D. Complexity Considerations The computational complexity incurred at each DACCS facility is dominated by the computation of digital signatures and zero-knowledge proofs in Step 3. The complexity incurred at each validator is dominated by the verification of the zero-knowledge proofs in Step 4, and the verification of the sensor telemetry in Step 6. Taken together, this complexity is minuscule compared to that incurred in conventional PoW mechanisms. For e.g., in bitcoin, a hash function, such as SHA256, has to be computed billions of times (in general) until the output satisfies a stipulated mathematical condition. Since these repeated operations have been replaced by CO 2capture and storage in our approach, the computational complexity of the winner selection protocol is significantly lower than that of traditional PoW mechanisms. E. Fault Tolerance Considerations (Missing Initial Storage Claim Data) Suppose a validator does not receive the initial storage data from some miner Mi. Then, this validator cannot implement the preliminary winner selection step. We stipulate that any validator that has missing storage data does not participate further in this round of establishing consensus, i.e., the round corresponding to the time interval [ts, ts+T]. A key design parameter is the number of validators that must have all the storage claim data presented by the miners, and must stay online during the entirety of the protocol execution. This number should be large enough, otherwise the winner selection mechanism would not be credible. V. L EVERAGING THE CONSENSUS MECHANISM IN A BLOCKCHAIN -BASED CRYPTOCURRENCY A key motivation for the winner selection protocol is to develop mechanisms that incentivize CO 2capture and storage. This motivation leads to a reward mechanism and an associated cryptocurrency in a natural way as we describe below. For the purposes of this article, a cryptocurrency has the additional property versus a token that it can be used in the broader economy to buy and sell goods and services. To clarify our development below, we will often refer to the architectural components of Bitcoin [12], the world’s most popular cryptocurrency, by way of analogy. A. A Reward in Crypto Tokens Suppose that the winner selection algorithm of the previous section is executed, and a winning miner Mi∗is determined. Suppose that, as a result of being the winner, Mi∗is rewarded with a quantity Zof crypto tokens. In other words, the conclusion of the winner selection algorithm results in the creation of Znew tokens. The winner, Mi∗may then convert the token into a medium of exchange to purchase goods and services. Alternatively, the reward could be saved for future use. For the cryptocurrency application, we remark that the identity of the winning miner Mi∗need not be revealed. This can be accomplished by using an identifier, such as the miner’s public key PKirather than the index i. For the winner selection algorithm of Section IV to work with such an identifier, the steps of that protocol can all be executed by replacing iwithPKi, with one exception: The preliminary winner selection step needs an explicit ordering amongst the identifiers of the miners, to create the partitions of the unit interval using which the winning August 8, 2023 DRAFT 13 miner is randomly chosen. With the public key identifiers, we no longer have the naturally ordered identifiers in a set{1,2, ..., M }. However, we can obtain an ordering of Melements in many ways, the simplest being to order the identifiers PKi, i∈1,2, ..., M in increasing order of magnitude such that j < i =⇒f(PKj)< f(PKi), where fis a suitable function. We assume that such an falways exists. With the new ordering, it is again possible to generate a partition of the unit interval and choose a uniformly distributed random variable over the unit interval to choose the winning miner. In this case, since the index of the winning miner maps back to a public key identifier rather than a miner’s identity, it preserves the anonymity - though not the privacy - of the miner. Anonymity can be improved if the miners use new public-private key pairs in each round, and for each transaction that they engage in, thus making it difficult to link successive transactions or reward accruals. B. Crypto-Token Transactions in the Real World When a crypto token is used to purchase goods and services in the economy, the token serves as a medium of exchange. The total supply of a cryptocurrency can grow indefinitely such as for ether or be capped such as bitcoin. In addition, the supply of cryptocurrencies can also decrease by permanently removing coins from circulation. In this article, we abstract from determining the optimal supply of the new token based on the demand for the token. As noted before, although, the new crypto token is produced based on competition among DACCS facilities, the value of the token is not connected to the amount of CO 2captured and stored. We will now describe an approach in which transactions involving such a token are recorded in a blockchain that is driven by the climate-positive consensus protocol from Section IV. Consider that Alice and Bob engage in a transaction in which Alice must pay ztokens to Bob. Assume that Alice and Bob possess digital wallets similar to the ones available for cryptocurrencies today, and that they are each identified using their public keys. The transaction can then be reduced to the following quantities (1) the input address, i.e., Alice’s public key, from which the token is sourced, (2) the amount zof the transaction, (3) the output address, i.e., Bob’s public key, to which the token will be transferred when the transaction is complete, (4) optionally, an amount ∆z, consisting of the transaction fees that may be paid to the miner, (5) a time stamp of the transaction. C. Protocol for Incorporating Transactions in the Blockchain The protocol for transferring ztokens from Alice to Bob, and recording that transaction in the blockchain would then follow the steps below (See Fig. 3): 1)Creation: Bob sends his public key PKBto Alice. Alice then creates the transaction file,and signs it with her private key SKA. Thus, the transaction involves sending z+ ∆ztokens from input address PKAto output address PKBat some time t. 2) Alice sends the signed transaction to the closest node in the blockchain, which could be a miner or a validator. From there, it is propagated to the validator network using a suitable gossip protocol [16]. 3)Preliminary Verification: The transaction undergoes preliminary verification in which basic requirements are checked. These include, for example, checking that the input address has a balance greater than z+ ∆z August 8, 2023 DRAFT 14 𝑀!Air𝐶𝑂"𝑀#𝑀"……𝑀$Miners sending 𝐶𝑂!removaltelemetry& proposed blocks Winner Selection ProtocolBlock proposed by𝑀"∗containing areward for 𝑀"∗Block proposed by𝑀"∗appended to blockchain. Other proposed blocksdiscarded. … Fig. 3. The DACCS operators can leverage the winner selection protocol to propose candidate blocks of crypto-token transactions that are appended to a blockchain. tokens at the time stamp t. Once the transaction clears the preliminary verification, it is transferred to a pool, analogous to Bitcoin’s Memory Pool, where it awaits a miner. 4) Any miner Mi∈ M can then consider the transaction for inclusion in the next block of transactions to be mined. We will focus on the activity of a single miner Mi, one of possibly many that will include the transaction in a candidate block. One criteria for selecting the transaction in the proposed new block is whether the transaction includes a fee intended for the miner. 5) Each Michooses a specified number, ηof new verified transactions for inclusion in a candidate block that he will propose to the network. One approach for Mito choose transactions from the Memory Pool for inclusion into the new block is to select those with the highest transaction fee. The miner also adds the following information to the proposed block: a) A cryptographic hash of the most recent block added to the blockchain. This can be a SHA-256 hash, and it cryptographically chains the blocks. b) A Merkle tree [17] computed from the hashes of all the transactions included in the block. c) The amount of CO 2stored during the current time block, indexed by ts, in the winner selection protocol. This would be indicated by XPK i, rather than Xi, as used in the winner selection protocol. This additional information allows anyone inspecting the block to determine how much CO 2was stored by the winning miner. Note that an aggregate of the stored amounts for all blocks is significantly lower than the total amount of CO 2stored by the blockchain, because the miners that were not chosen as winners have also performed useful work by contributing to CO 2stored. This is a key beneficial aspect of the climate-positive August 8, 2023 DRAFT 15 blockchain7. 6) Each Mithen includes a special transaction in which the miner pays into its own digital wallet an amount given by θ=Z+ηX j∆zj where ∆zjis the transaction fee in the jthtransaction included in the candidate block. The value θis thus the sum of the mining reward and any transaction fees. This is similar to bitcoin’s coinbase transaction , in which new crypto tokens are created. Also, similar to bitcoin, this transaction is special in the sense that the total earnings θcannot be spent unless a specified (large) number of vaildators have confirmed that candidate block has been appended to the blockchain, thereby confirming that Miwas the winner of that round, i.e., (i≡i∗). If, on the other hand, Miis not chosen as the winner in the winner selection algorithm, the new proposed block of transactions (along with the coinbase transaction) is discarded. Miwill propose a new block in the next round. The reader will note that the structure and construction of the blocks resembles that in Bitcoin. The difference lies in the fact that, in Bitcoin, the block records the block hash as well as nonce that the winning miner used to successfully mine the block, while in the proposed climate-positive crypto-token, the block records the amount of CO 2stored by the miner and confirmed by the validator network. D. Security and Privacy Considerations Many of the security considerations for this protocol are inherited from those in the winner selection protocol, as described in Section IV-C. 1)Protocol Security We do not claim that the protocol described here is as secure as bitcoin. This is because of a fundamental difference: The Bitcoin protocol operates entirely in the digital world and is grounded in well-understood cryptographic mechanisms that have stood the test of time. Our protocol, on the other hand, attempts to connect a physical process (CO 2removal) to a digital protocol with cryptographic mechanisms. Thus, attacks on the proposed protocols can come from both the physical and the digital worlds, and crucially, at the interface of the physical and digital worlds. Security mechanisms for preventing subversion of the physical process are a work in progress. We have described how signing the sensor telemetry can help avoid security problems related to data authenticity and integrity. Incorporating a time-stamp in the digital signature is used to deter replay attacks. We anticipate the need to develop further efficient mechanisms (both physical and digital) to improve the security of the physical process, as well the security of its interface with the digital process. We hope that this work will highlight the need and catalyze further research in the field. 7Since the CO 2storage amounts are gossiped by the DACCS facilities to the network, the protocol may be modified to include the total amount of CO 2stored by allminers while mining the previous block in the blockchain. With this modification, aggregating the total CO 2 storage amounts over the entire blockchain provides an estimate of the CO 2stored since the deployment of the blockchain. The caveat is that, by construction, only the CO 2storage amount of the winning miner has been verified for each block; the storage amounts for all other miners are unverified, and therefore should only be considered as estimates. August 8, 2023 DRAFT 16 2)Anonymity of Miners : The protocol, as described, has one key difference compared to consensus mechanisms based on a cryptographically hard problem. In our protocol, the validator network knows the public key of the miner when it executes the winner selection protocol. This is slightly different from Bitcoin, in the sense that (1) the miners who propose a candidate block in the Bitcoin blockchain can do so without easily revealing their public key (2) the public key of the winning miner can only be accessed by someone who can read the scriptsig field of Bitcoin’s coinbase transaction, and then the miner can possibly be identified by analyzing transactions on mining pools. In other words, it is easier to identify the public key of the winning miner in our proposed mining process, compared to the case in bitcoin. As stated earlier, if the miners refresh their public/private key pairs for each new mining round, they achieve better anonymity. Like Bitcoin, however, their identities could still be revealed via analytics on blockchain transactions. This difference has implications for oversight into the operation of the DACCS operators (miners). The cryptographic machinery of Bitcoin ensures that it needs no oversight beyond verifying the hash computations. For CDR technologies, the scope of oversight is broader. While we verify sensor telemetry and ensure data authenticity and integrity in our protocols by means of cryptographic tools – thus making it difficult for a rogue DACCS operator to fake telemetry – it may be necessary to supervise other aspects of the DACCS operation. For example, is the storage being performed in a geologically suitable region using the correct processes so that the stored CO 2 does not escape back into the atmosphere? Are the storage readings taken at the correct stage in the process? It would be useful to perform such checks at random, sparse intervals. Who should perform this oversight? These are open questions that need to be addressed. 3)Anonymity of Transacting Entities: We remark that the level of anonymity provided to entities that engage in actual transactions of our proposed token, is identical to that in Bitcoin. That is because the transacting entities are only involved in the digital components of consensus mechanism, and have no involvement in the verification of sensor telemetry. VI. R OADMAP :SCALING NEEDS ,GENERALIZABILITY AND OPEN QUESTIONS While novel frameworks such as the one presented here, need a pathway for adoption and scaling, the technologies behind the platform will also keep improving. In this section, we deliberate on four broad areas: (a) the needs for scaling such a framework, (b) discussion of tokenomics (c) the generalizability of such a framework to other carbon capture technologies, and (d) some open unanswered questions. A. Scaling needs of the framework The proposed solution considers the steady state situation, where there are sufficient number of DACCS to capture carbon and likely enough ways of storing or upconverting the captured carbon. However, to scale up from the first established DACCS to a steady state condition of Mminers, there needs to be a suite of incentive mechanisms in place for a number of participants in the ecosystem. The following can be viewed as points aiding the scaling of the framework or also as bottlenecks which might limit scaling possibilities: August 8, 2023 DRAFT 17 1)DACCS: The ability of a miner to effectively use the awarded crypto-tokens needs the token to be liquid. This need includes a mechanism to trade it for other forms of hard or cryptocurrency and the ability to handle cross-currency swap risks. If the tokens display liquidity, adoption of the framework to newer DACCS will be much faster. Establishing a tokenomics model of the crypto-tokens will be a useful exercise in promoting the liquidity. 2)Local communities: Setting up a DACCS needs land, which needs to be procured, often from local commu- nities already established on the land. Although a general concern with DACCS, with an increased monetary value associated with the facilities as brought about by our framework, there may be several repercussions. The price of land may go up giving rise to two possible outcomes. Firstly, it may make establishing new DACCS less attractive given the returns (which may lead to more vertical facilities) thereby driving lower returns for the farms and local community. Alternately, the price rise may help local communities and create more efficient DACCS, all while increasing the amount of captured carbon. Noise pollution and the potential long term safety of stored underground carbon may prove to be a repellent, similar to wind farms. A secondary market can provide additional leverage and participation in accelerating adoption of the framework. 3)Technology companies: It can be expected that there will be frequent improvements in DACCS technologies and components including in sorbents, sensors, sequestration and upconversion processes. Being a long term investment for DACCS, it may come to pass that such technology companies are under beholden contracts with the facilities to ensure a steady dedicated supply of materials and component devices. To make the sensors used along various points of the process steps tamper-proof, they may need unique certification by the manufacturers. This may enable longer term contracts between DACCS and OEMs, thereby making it attractive to both parties. 4)Local governments: Any modification of the local environment by carbon capture opens the chance of inadvertent minor engineering of the local climate. This may need the open discussion between local, state and federal government bodies. If the DACCS are established close to the boundary between two neighboring countries, it may result in the need for a greater negotiation between multiple parties. If done well, this can have positive changes to local environments thereby reflective on local economies. B. Tokenomics Tokenomics refers to the underlying economics of tokens including factors that determine their optimal token supply based on the token demand. Although we do not discuss price dynamics of the token in detail, we can offer some insights. First, as the demand for CDR increases, the price of the token should rise given no or little change in supply. Second, as the DACCS technology improves, the price of the token falls given little change in demand. Of course, there could be increases in both supply and demand simultaneously. Furthermore, decisions regarding whether the total supply of the token will be fixed or unbounded need to be explored. Discussions about the path of optimal supply of the token over time is beyond the scope of this article. In other words, are there rules on how supply increases or decreases? Does the community determine when to burn or take tokens out of supply? August 8, 2023 DRAFT 18 Initially, the demand of the token will be based on the trust of those that want to participate in DACCS technology for CDR. What alternatives do these participants have and how does this token rank among those alternatives? If successful, the demand for this token along with its price will also increase. Once the token is established, it may be used for a host of other transactions. What token characteristics would be desirable for other types of transactions? Clearly, the positive impact on the environment resulting from the PoUW would be extremely attractive to users. Also, as the price rises, these tokens may circulate less because holders of these coins prefer to hold on to them instead of transacting with them leading to reduced liquidity. Decentralized finance platforms may evolve to increase liqudity where holders would deposit their tokens to liquidity pools. These discussions are beyond the scope this article. As new CDR technologies are adopted, how would DACCS tokens interact with other types of tokens. Would there be a market-based conversion rate between different types of CDR tokens? C. Generalizability of the Framework Thus far, the framework has been described with the DACCS as an example. However, it can be extended to many other forms of climate positive actions, not restricted to carbon capture. This includes ocean carbon capture, DACCS + S (DACCS and sequestration), DACCS + U (DACCS and utilization/upconversion), capture of other greenhouse gases such as methane ( CH 4), nitrous oxide ( N2O), (with present or future sorbent materials), and ocean de- acidification, to name a few. Any climate positive action thus, involving the capture, production or modification of a known parameter along with a relevant set of process steps having periodic measurements with multiple sensors can be amenable to this protocol/framework. D. Open Questions While goodwill is an underlying ethos behind the framework, for improving the future of humanity on earth, it also provides a financially lucrative reward for doing good. Furthermore, since the consensus mechanism that drives the reward is achieved algorithmically, it is essential that technological means be developed to ensure correctness and security of the protocols. 1)Technological Considerations : a.Sensor Design and Manufacturing: The protocols we describe require sensors to digitally sign the data they produce, because this preserves authenticity and integrity of the sensor data. To achieve this capability, it is necessary to augment current sensor technology – for example with hardware enhancements such as Trusted Platform Modules (TPMs) [18] – to enable them to sign the data. This would increase the cost of the sensors, and it remains to be seen whether the scale at which such sensors are manufactured will make the cost manageable in the long run. b.Protocol Design: As we have described, zero-knowledge proofs can enable DACCS facilities to efficiently and securely verify their sensor telemetry and their CO 2storage claims. We did not, however, provide an implementation of the proofs. Developing efficient non-interactive zero-knowledge proofs for verifying sensor August 8, 2023 DRAFT 19 telemetry and CO 2storage claims can be considered as an open research problem. These proofs constitute a crucial step in making the climate-positive blockchain feasible, secure and efficient. c.Adversarial Scenarios: We have described some adversarial situations and provided ways to mitigate them. Since the proposed approach involves connecting a physical process – carbon capture and storage – to a digital process – a distributed consensus mechanism driving a blockchain – novel adversarial scenarios arise, and need to be revealed and mitigated. For example, rogue DACCS facilities may fabricate additional fake identities and claim larger CO 2storage amounts to increase their probability of winning the mining reward. Such behavior is difficult to defend against, but it can, in principle, be mitigated using a reputation system in which validator nodes can reduce the reputation score of a suspected rogue miner. For example, CO 2storage claims from a fake location, or a location very close to an existing DACCS location, may raise suspicion of illicit activity. This approach is quite similar to reputation scoring used to prevent malicious behavior in some proof-of-stake mechanisms. d.Novel Carbon Capture Mechanisms: Though we have focused on DACCS as the carbon capture mechanism, the principles underlying the protocols apply to any alternative mechanism. It is an interesting research question to determine whether several carbon capture mechanisms can interoperate correctly, securely and fairly in the distributed consensus mechanism, and in its associated applications, such as driving cryptocurrency transactions. 2)Governance and Oversight Considerations : a. As we have described, the fact that we are interfacing a physical process (CO 2capture and storage) to a digital mechanism, creates new challenges of oversight that did not exist in previous (entirely digital) cryptocurrencies. How this oversight can be performed while preserving the benefits of decentralization and censorship resistance is a key challenge that needs to be addressed. b. How can a governing body ensure that before permitting entry into the framework, the users are screened and determined to be interested investors who align with the larger ‘carbon negative’ mindset? c. How do you ensure that geographic migration to financially more lucrative operating regions does not make this a carbon positive endeavor? d. How can we ensure that there is a standard measure of the life cycle analysis (LCA) of any new added climate positive action, to be able to compare across processes? ACKNOWLEDGMENTS We gratefully acknowledge the support received from the Alliance for Innovative Regulation (AIR) and Palo Alto Research Center (PARC). Insightful discussions with fellow participants at a January 2023 Tech Sprint organized by AIR and hosted by AlixPartners at their San Francisco Bay Area offices are also appreciated. In addition, we thank Dan Boneh and Paula Palermo for critical feedback on previous drafts. August 8, 2023 DRAFT 20 REFERENCES [1] Steve Smith, Oliver Geden, Gregory Nemet, Matthew Gidden, William Lamb, Carter Powis, Robert Bellamy, Max Callaghan, Annette Cowie, Emily Cox, et al. The state of carbon dioxide removal–1st edition. 2023. [2] Christopher Blaufelder, Cindy Levy, Peter Mannion, and Dickon Pinner. A blueprint for scaling voluntary carbon markets to meet the climate challenge. McKinsey , 5, 2021. [3] Thibaud Clisson. Exploring the carbon offset market: Issues, reforms and the future. Viewpoint, BNP Paribas Asset Management , 2023. [4] Alejandro Baldominos and Yago Saez. Coin. ai: A proof-of-useful-work scheme for blockchain-based distributed deep learning. Entropy , 21(8):723, 2019. [5] Felix Hoffmann. Challenges of proof-of-useful-work (pouw). arXiv preprint arXiv:2209.03865 , 2022. [6] Milan Todorovi ´c, Luka Matijevi ´c, Du ˇsan Ramljak, Tatjana Davidovi ´c, Dragan Uro ˇsevi´c, Tatjana Jak ˇsi´c Kr ¨uger, and Djordje Jovanovi ´c. Proof-of-useful-work: Blockchain mining by solving real-life optimization problems. Symmetry , 14(9):1831, 2022. [7] Mandy DeRoche, Jeremy Fisher, Nick Thorpe, and Megan Wachspress. The energy bomb: How proof-of-work cryptocurrency mining worsens the climate crisis and harms communities now. Sierra Club and EarthJustice . [8] Alex De Vries, Ulrich Gallersd ¨orfer, Lena Klaaßen, and Christian Stoll. Revisiting bitcoin’s carbon footprint. Joule , 6(3):498–502, 2022. [9] Accounting for cryptocurrency climate impacts. South Pole and Crypto Carbon Ratings Institute . [10] Yang Qiu, Patrick Lamers, Vassilis Daioglou, et al. Environmental trade-offs of direct air capture technologies in climate change mitigation toward 2100. Nat Commun , 13(3635), 2022. [11] Joseph H. Haslag. Seigniorage revenue and monetary policy. Federal Reserve Bank of Dallas Economic Review , pages 10–20, 1998. [12] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system. Decentralized business review , page 21260, 2008. [13] Nir Bitansky, Ran Canetti, Alessandro Chiesa, and Eran Tromer. From extractable collision resistance to succinct non-interactive arguments of knowledge, and back again. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference , pages 326–349, 2012. [14] Eli Ben-Sasson, Iddo Bentov, Yinon Horesh, and Michael Riabzev. Scalable, transparent, and post-quantum secure computational integrity. Cryptology ePrint Archive , 2018. [15] Paul Grubbs, Arasu Arun, Ye Zhang, Joseph Bonneau, and Michael Walfish. {Zero-Knowledge }middleboxes. In 31st USENIX Security Symposium (USENIX Security 22) , pages 4255–4272, 2022. [16] Ken Birman. The promise, and limitations, of gossip protocols. ACM SIGOPS Operating Systems Review , 41(5):8–13, 2007. [17] Ralph C Merkle. Protocols for public key cryptosystems. In 1980 IEEE symposium on security and privacy , pages 122–122. IEEE, 1980. [18] Steven L Kinney. Trusted platform module basics: using TPM in embedded systems . Elsevier, 2006. August 8, 2023 DRAFT
{ "id": "2308.02653" }
2212.01267
Understanding Cryptocoins Trends Correlations
Crypto-coins (also known as cryptocurrencies) are tradable digital assets. Notable examples include Bitcoin, Ether and Litecoin. Ownerships of cryptocoins are registered on distributed ledgers (i.e., blockchains). Secure encryption techniques guarantee the security of the transactions (transfers of coins across owners), registered into the ledger. Cryptocoins are exchanged for specific trading prices. While history has shown the extreme volatility of such trading prices across all different sets of crypto-assets, it remains unclear what and if there are tight relations between the trading prices of different cryptocoins. Major coin exchanges (i.e., Coinbase) provide trend correlation indicators to coin owners, suggesting possible acquisitions or sells. However, these correlations remain largely unvalidated. In this paper, we shed lights on the trend correlations across a large variety of cryptocoins, by investigating their coin-price correlation trends over a period of two years. Our experimental results suggest strong correlation patterns between main coins (Ethereum, Bitcoin) and alt-coins. We believe our study can support forecasting techniques for time-series modeling in the context of crypto-coins. We release our dataset and code to reproduce our analysis to the research community.
http://arxiv.org/pdf/2212.01267v1
Pasquale De Rosa, Valerio Schiavoni
q-fin.ST, cs.AI, cs.CR, cs.LG
q-fin.ST
arXiv:2212.01267v1 [q-fin.ST] 30 Nov 2022Understanding Cryptocoins Trends Correlations Pasquale De Rosa[0000−0001−9726−7075]and Valerio Schiavoni[0000−0003−1493−6603] University of Neuchâtel, Switzerland, first.last@unine.ch Abstract. Crypto-coins (also known as cryptocurrencies) are tradabl e digital assets. Notable examples include Bitcoin, Ether an d Litecoin. Own- ershipsofcryptocoinsareregisteredondistributedledge rs(i.e.,blockchains). Secure encryption techniques guarantee the security of the transactions (transfers of coins across owners), registered into the led ger. Cryptocoins are exchanged for specific trading prices. While history has shown the extreme volatility of such trading prices across all differe nt sets of crypto- assets, it remains unclear what and if there are tight relati ons between the trading prices of different cryptocoins. Major coin exch anges ( i.e., Coinbase) provide trend correlation indicators to coin own ers, suggesting possible acquisitions or sells. However, these correlatio ns remain largely unvalidated. In this paper, we shed lights on the trend correlations acros s a large va- riety of cryptocoins, by investigating their coin-price co rrelation trends over a period of two years. Our experimental results suggest strong cor- relation patterns between main coins (Ethereum, Bitcoin) a nd alt-coins. We believe our study can support forecasting techniques for time-series modeling in the context of crypto-coins. We release our data set and code to reproduce our analysis to the research community. Keywords: cryptocoins · correlations 1 Introduction Cryptocurrencies, also known as crypto-coins, are tradabl e digital assets, backed by secure encryption techniques to ensure the security of tr ansactions (typically, the transfer of coins across wallets). Notable examples inc lude Bitcoin [ 14], Ether (the native cryptocurrency of the Ethereum blockchain [ 8]) or Litecoin (used in a fork of the original Bitcoin network). Nowadays there exis ts thousands of cryp- tocurrencies (CoinMarketCap [ 3] lists 10039 coins as of April 2022). Cryptocoins are designed to be traded as a form of digital money: the first u seful Bitcoin trans- action was used by a peer-to-peer payment between Satoshi Na kamoto (Bitcoin’s founder) and one of its early adopters, and dates back to 2009 .1Cryptocoins are nowadays traded over online (centralized or decentralized )exchanges , including Coinbase [ 2], Kraken [ 5], Binance [ 1], Uniswap [ 6],etc. With a current estimated worldwide market-cap of 1.71 Trillion dollars, the cryptoc oins economy roughly match the GDP of South Korean in 2021 [ 4]. The ownership of cryptocoins is registered on distributed l edgers ( i.e., blockchains), together with the corresponding transactions (transfers o f coins across wallets). Cryptocoins are exchanged ( i.e., sold, bought) for specific trading prices. While 1https://www.blockchain.com/btc/block/170© 2022 Springer. Personal use of this material is permitted. Permission from Springer must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistributio n to servers or lists, or reuse of any copyrighted component o f this work in other works. This is the author’s version of the work. The final auth enticated version is available online at doi.org/10.1007/978-3-031-16092-9_3 and has been published in the proceedings of the 22nd Internatio nal Conference on Distributed Applications and Interopera ble Systems (DAIS’22). 2 Pasquale De Rosa and Valerio Schiavoni 0 0.2 0.4 0.6 0.8 1 Jan ’20Apr Jul Oct Jan ’21Apr Jul Oct Jan ’22Price (normalized)BTC ETH BNB XRP ADAAverage daily price trends for the top−5 coins Fig.1: Normalized(min-max)averagepricesofthetop-5cryptocoi nssinceJanuary2020. it is beyond the scope of this work to understand the exact nat ure of those prices, history has shown the extreme volatility of such trading pri ces across all differ- ent sets of crypto-assets. For instance, Figure 1shows the normalized average daily prices of 5 popular cryptocoins ( i.e., BTC, ETH, BNB, XRP, ADA) since January 2020. It remains unclear what and if there are tight relations betw een the trad- ing prices of different cryptocoins. Major cryptocoin excha nges, in particular given the enormous popularity that such digital assets have grown into the large public, and further facilitated by the easy access to these m arkets via mobile apps, started to provide trend correlation indicators to coin/wallet owners. Such correlation indicators can possibly drive end-users towar ds acquisitions or sells. Coinbase, among the most popular cryptocoin exchanges, ind icates the price correlation as the tendency of other asset prices to change at the same time as the asset shown on the page. In their case, correlation is computed leveraging the Pearson correlation with USD order books over the last 90 day s. However, the nature of such correlations, their intensity a s well as the evo- lution of the correlations through time, remain largely unv alidated. Thecontributions of this work-in-progress paper are twofold. First, we ex- tract the trading prices, as well as other exchange metadata (e.g., open and closing price, market cap, volume), for the top-100 cryptoc oins since the last two years from a popular cryptocoin monitoring web-site. Se cond, we leverage this dataset to carry out our preliminary study of the trend c orrelations between and across crypto-coins. Specifically, we investigate dail y, weekly and monthly correlation patterns exhibited by two principal cryptocoi ns,i.e., BTC and ETH, against the remaining set of alt-coins in our dataset. Our analysis show strong correlations between the observed trends. We will leverage these observations in our future work, where we plan to exploit the observed corr elations to fore- cast the future trading trends and by considering the proble m of time-series forecasting applied to the crypto-coin market. We follow an open science approach: our datasets will be released and made available to the research and open-source community. Roadmap. This paper is organized as follows. Section 2provides background materials on Bitcoin, Ethereum, as well as general notions o f correlation anal- ysis. Section 3describes our dataset, as well as our work-in-progress anal ysis. Understanding Cryptocoins Trends Correlations 3 We briefly cover related work in Section 4, before concluding and presenting our future work in Section 5. 2 Background Cryptocoins in a nutshell. Cryptocoins are digitally encrypted assets. They were typically designed to replace fiat currencies and used m ostly in peer-to- peer networks. Depending on the incentive natures of the und erlying blockchain, cryptocoins (or token) are rewarded to nodes in the network. We differentiate between three main types of cryptocoins: (i)Bitcoin, (ii)alt-coins, and (iii)sta- ble coins.2Alt-coins are alternative coins to Bitcoin. Notable examples include Ether (ETH), Cardano (ADA), Litecoin (LTC), or Ripple (XRP) . A stablecoin is a class of cryptocurrencies that attempt to offer price stabi lity and are backed by a reserve asset, e.g., gold or the value of the American dollar. Examples include USDT (Tether) and USDC. Time series analysis. A time series is an n-tuple of observations collected sequentially over time. Common examples of time series incl ude trends of interest rates and stock prices, daily high and low temperatures, the electrical activity of the heart, etc. The purpose of time series analysis is generally twofold: (i) to understand the mechanisms and the inner dynamics of an obs erved series, and(ii)forecast the future values of the series based on the histori cal ones. To analyze time series as sequences of random variables ( i.e., stochastic processes), it is common to assume their stationarity: a time series is stationary if the prob- ability laws that govern its behavior do not change, and its m eanµis constant over time. The Autoregressive Moving Average is a state-of- the-art stationary time series modeling approach, which combines an Autoregre ssive (AR) process of order pand of a Moving Average (MA) process of order q. Real applications do not expose stationary trends. The Auto regressive Inte- grated Moving Average model (ARIMA) differentiates a nonsta tionary process a numberdof times, until it becomes stationary. It is common to observ e the pres- ence of a seasonality in the trend of a time series, especiall y in applications where cyclical tendencies are very common (like business or econo mics). To handle pe- riodical components, a common model is the Seasonal Autoreg ressive Integrated Moving Average (SARIMA), that can be mapped to a standard ARI MA model in absence of seasonality [ 10]. A significant progress in time series modeling was introduce d bytemporally- aware ML models, i.e., Recurrent Neural Networks (RNNs) (see Figure 2). In those, the behaviour of hidden neurons is not only determine d by the activations in previous hidden layers, but also by the activations at ear lier times. The acti- vation function for every hidden layer of a RNN is: h(t)=f(h(t−1),x(t),θ). There, the hidden layer at the time t,h(t), is a function of the previous status, h(t−1), of the current input x(t)and of the activation function adopted, θ. 2Some characterizations define stable coins as sub-classes o f alt-coins, together with secure tokens, utility tokens, and more. We leave as future w ork to study in-depth the correlations between such sub-types of alt-coins. 4 Pasquale De Rosa and Valerio Schiavoni RNN LSTM GRU σx+htQt σx tanh σtanh x htCt ftitt-1 t-1 xtOttanh t-1 xtht xttanh ht-1 xht zt1- σ+ xhtx σ Fig.2: ML-based time series forecasting approaches: RNN, LSTM and GRU. Coin Open High Low Close Volume Market Cap BTC 29.39/19.55 30.18/20.07 28.50/18.92 29.42/19.53 39.63/20.41 550.41/368.54 ETH 1.57/1.44 1.63/1.49 1.51/1.39 1.57/1.44 20.48/11.05 184.19/170.90 BNB 0.20/0.21 0.21/0.22 0.19/0.20 0.20/0.21 1.63/1.91 33.18/35.39 XRP 5.64e-4/3.94e-4 5.90e-4/4.17e-4 5.36e-4/3.68e-4 5.64e-4/3.94e-4 4.59/4.91 25.70/17.96 ADA 7.97e-4/8.21e-4 8.33e-4/8.55e-4 7.60e-4/7.84e-4 7.99e-4/8.21e-4 2.29/2.77 25.67/26.77 Table 1: Mean/standard deviation for the top-5 cryptocoins since Ja nuary 2020 (Open, High, Low and Close expressed in 1K US dollars, Volume and Mar ket Cap in 1B US dollars). The training process of RNNs is usually complex, due to the unstable gradi- ent problem : the gradient of the adopted cost function tends to get small er or bigger as it is propagated back through layers, resulting in a final vanishing or exploding effect, respectively. RNNs are unable to model long term dependencies , lacking predictive ability when dealing with long sequence s of data. To solve this problem, more effective sequence models are adopted in pract ical applications, such as Long Short-Term Memory (LSTM) and networks based on t he Gated Recurrent Unit (GRU). Such gated RNN architectures allow the network to ac- cumulate information over a long time period, learning to de cide how to forget the old states once that information has been used and proces sed [11]. 3 Preliminary Evaluation We describe here our experimental evaluation of the correla tions between cryp- tocoins. First we describe our dataset, and then we show seve ral correlation patterns. Dataset. We collected our dataset from CoinMarketCap [ 3], a leading ag- gregator of cryptocurrency market data. It contains record s (High, Low, Open, Close, Volume and Market Capitalization) for 68 coins regis tered during a time frame of 25 months, namely from 24.12.2019 to 24.01.2022. "H igh" and "Low" are the highest and lowest prices reached by the asset during the considered time frame; "Open" and "Close" the opening and closing market pri ces; "Volume" the measure of how much it was traded in the last period. Final ly, "Market Capitalization" indicates the total market value of its cir culating supply. The dataset includes a total of 51884 observations. The resulti ng time series for each coin trend includes 763 steps. Table 1reports mean and standard deviation for the gathered records and across the top-5 cryptocoins in our dataset. Understanding Cryptocoins Trends Correlations 5 Jan 2020Apr Jul Oct Jan 2021Apr Jul Oct Jan 2022Open 0.00.51.0Price (normalized)BT C ETH Jan 2020Apr Jul Oct Jan 2021Apr Jul Oct Jan 2022Close 0.00.51.0Price (normalized)BT C ETH Jan 2020Apr Jul Oct Jan 2021Apr Jul Oct Jan 2022High 0.00.51.0Price (normalized)BT C ETH Jan 2020Apr Jul Oct Jan 2021Apr Jul Oct Jan 2022Low 0.00.51.0Price (normalized)Daily price trends BTC vs ETH BT C ETH Fig.3: Trend of Bitcoin and Ethereum prices during the last 2 years. The two major coins in terms of Volume and Market Capitalizat ion are Bit- coin (BTC) and Ethereum (ETH), that we selected as the benchm arks for our subsequent study. The price trend of those cryptocoins over the past two years (shown in Figure 3) showed on average a high positive correlation (with a Pear- son coefficient ≈0.9). Correlation Patterns. The aim of the present study is to identify and an- alyze the presence of cross-correlation patterns in crypto currency trends. To do so, we analyze the correlations of 66 alt-coins present in ou r dataset against BTC and ETH, and for three different time frames: daily, weekly an d monthly. For weekly and monthly correlations we define the sequence segme nts adopting a sliding window approach, where observations are grouped wi thin a window that slides across the data stream. The daily observations for ea ch coin are averaged over sliding partitions of 7 and 30 days respectively, and th en the correlations with other coins are computed on the resulting aggregated va lues. Note that we postpone the study of thumbing windows, where there is no overlapping of data clusters, to future work. We represent those correlations, averaged among all the studied variables ( i.e., High, Low, Open, Close, Volume and Market Cap), as a series of "cross-correlograms" of coins (Figure 4). The radius of each circle repre- sents the strength of the relation (in terms of Pearson coeffic ient) between each of the considered alt-coin and BTC (Figs. 4a/c/e) or ETH (Figs. 4b/d/f). The color identifies the sign of the correlation (green if positi ve, red otherwise). The analysis of the cross-correlogram clearly shows how the vas t majority of consid- ered alt-coins are strongly correlated with and follows the same trend of the two market leaders. Their average values of the Pearson coefficie nt very close to 1. Not surprisingly, the only visible exceptions are represen ted by the stablecoins available in our dataset ( i.e., USDP, TUSD, DAI, BUSD, USDC, USDT), that are pegged to the US dollar and follow standalone trends with total independence from the rest of the coins in the market. 6 Pasquale De Rosa and Valerio Schiavoni bnbusdtusdcadaxrplunadogematicbusdcrolinkwbtcltcdaialgoatomftmbchxlmtrxfttmanavethbarbtcbfilthetaetconexmrxtzleomiotaeosstxbttksmruneenjmkrbsvlrcqntzecneobatkcschzokbwaveshtdashtusdnexoxdchotxemrvniotxusdptfuelvlxomgbntboradcr openhighlowclosevol.m.cap(a) Daily Corr. BTC openhighlowclosevol.m.cap(b) Daily Corr. ETH openhighlowclosevol.m.cap(c) Weekly Corr. BTC openhighlowclosevol.m.cap(d) Weekly Corr. ETH openhighlowclosevol.m.cap(e) Monthly Corr. BTC openhighlowclosevol.m.cap(f) Monthly Corr. ETH Fig.4: Daily, weekly and monthly cross-correlations between the a lt-coins and BTC/ETH. 4 Related Work There exists studies which analyzed co-movement and cross- correlation phenom- ena in cryptocurrency market trends. Similar to our study, K atsiampa [ 12] in- vestigated the volatility dynamics of the two major cryptoc urrencies, Bitcoin and Ethereum, finding evidence of interdependencies betwee n the two and price responsiveness to major news in the market. Aslanidis et al. [7] showed that cryptocurrencies exhibit similar mean correlation among t hem, with an unsta- ble trend over time; in addition, the authors computed coins correlation against more traditional assets, detecting an independent behavio r respect to other fi- nancial markets. In [ 13], Bitcoin is identified as the leader in the cryptocurrency market using wavelet-based methods, showing how other coin s trends are de- pendent from BTC price movements: as a result, Bitcoin price drops are im- mediately reflected in other cryptocurrency prices. Finall y, [9] studied the col- lective behaviour for the cryptocurrency market discoveri ng distinct and not time-persistent community structures characterized by cr oss-correlation. Understanding Cryptocoins Trends Correlations 7 5 Conclusion and Future Work Cryptocoins present very volatile trends on public exchang es. In this work-in- progress paper, we presented our preliminary evaluation of the correlations be- tween BTC, Ether and 66 other alt-coins. Our analysis shows s trong correlations, suggesting alt-coins follow closely the trends of the two ma in ones. Following this initial study, we will further investigate the cross-c orrelation between the two market leaders and the alt-coins, in the perspective to f orecast their price trends by using the time-series techniques from § 2. We believe that our work could represent a significant starting point for further ana lyses in co-movement behaviors within the cryptocoin markets and in modeling and forecasting trends of the asset prices. Metadata, analysis data, tools and code for reproducibilit y are available to the research community at https://github.com/quapsale/cryptoanalytics/ . 8 Pasquale De Rosa and Valerio Schiavoni References 1. Binance Exchange. https://www.binance.com 2. Coinbase Exchange. https://www.coinbase.com 3. CoinMarketCap Web Service. https://coinmarketcap.com/ 4. International Monetary Fund. https://www.imf.org/en/Publications/WEO 5. Kraken Exchange. https://www.kraken.com 6. UniSwap Decentralized Exchange. https://uniswap.org/ 7. Aslanidis, N., Bariviera, A.F., Martínez-Ibañez, O.: An analysis of cryp- tocurrencies conditional cross correlations. Finance Res earch Letters 31, 130–137 (2019). https://doi.org/https://doi.org/10.1016/j.frl.2019. 04.019 , https://www.sciencedirect.com/science/article/pii/S 1544612319302168 8. Buterin, V., et al.: Ethereum white paper. GitHub reposit ory1, 22–23 (2013) 9. Chaudhari, H., Crane, M.: Cross-correlation dynamics an d community structures of cryptocurrencies. Journal of Computational Science 44, 101–130 (2020). https://doi.org/https://doi.org/10.1016/j.jocs.2020 .101130 , https://www.sciencedirect.com/science/article/pii/S 1877750320304312 10. Cryer, J., Chan, K.S.: Time Series Analysis. Springer, N ew York, NY, USA (2008). https://doi.org/https://doi.org/10.1007/978-0-387-7 5959-3 11. Goodfellow, I., Bengio, Y., Courville, A.: Deep Learnin g. MIT Press (2016), http://www.deeplearningbook.org 12. Katsiampa, P.: Volatility co-movement between bit- coin and ether. Finance Research Letters 30, 221–227 (2019). https://doi.org/https://doi.org/10.1016/j.frl.2018. 10.005 , https://www.sciencedirect.com/science/article/pii/S 1544612318305580 13. Kumar, A., Ajaz, T.: Co-movement in crypto-currency mar - kets: evidences from wavelet analysis. Financial Innovati on33 (2019). https://doi.org/https://doi.org/10.1186/s40854-019- 0143-3 , https://jfin-swufe.springeropen.com/articles/10.118 6/s40854-019-0143-3 14. Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash s ystem. Decentralized Business Review pp. 212–260 (2008)
{ "id": "2212.01267" }
1508.04364
Trends in crypto-currencies and blockchain technologies: A monetary theory and regulation perspective
The internet era has generated a requirement for low cost, anonymous and rapidly verifiable transactions to be used for online barter, and fast settling money have emerged as a consequence. For the most part, e-money has fulfilled this role, but the last few years have seen two new types of money emerge. Centralised virtual currencies, usually for the purpose of transacting in social and gaming economies, and crypto-currencies, which aim to eliminate the need for financial intermediaries by offering direct peer-to-peer online payments. We describe the historical context which led to the development of these currencies and some modern and recent trends in their uptake, in terms of both usage in the real economy and as investment products. As these currencies are purely digital constructs, with no government or local authority backing, we then discuss them in the context of monetary theory, in order to determine how they may be have value under each. Finally, we provide an overview of the state of regulatory readiness in terms of dealing with transactions in these currencies in various regions of the world.
http://arxiv.org/pdf/1508.04364v1
Gareth W. Peters, Efstathios Panayi, Ariane Chapelle
cs.CR, cs.CY
cs.CR
Trends in crypto-currencies and blockchain technologies: A monetary theory and regulation perspective Gareth W. Peters z? Efstathios Panayi y Ariane Chapelley zDepartment of Statistical Science, University College London ?Associate Fellow, Oxford Mann Institute, Oxford University Associate Fellow, Systemic Risk Center, London School of Economics. yUCL, Department of Computer Science, WC1E 6BT, London, UK August 19, 2015 Abstract The internet era has generated a requirement for low cost, anonymous and rapidly veri- able transactions to be used for online barter, and fast settling money have emerged as a consequence. For the most part, e-money has ful lled this role, but the last few years have seen two new types of money emerge. Centralised virtual currencies, usually for the purpose of transacting in social and gaming economies, and crypto-currencies, which aim to eliminate the need for nancial intermediaries by o ering direct peer-to-peer online payments. We describe the historical context which led to the development of these currencies and some modern and recent trends in their uptake, in terms of both usage in the real economy and as investment products. As these currencies are purely digital constructs, with no government or local authority backing, we then discuss them in the context of monetary theory, in order to determine how they may be have value under each. Finally, we provide an overview of the state of regulatory readiness in terms of dealing with transactions in these currencies in various regions of the world. 1 Introduction It has been 20 years since Bill Gates opined: `Banking is essential, banks are not'. The early 21st century has seen a proliferation of ntech ( nancial technology) rms, providing a wide and varied array of services, from payments and local and international money transmission through to nancing through peer-to-peer lending and crowdfunding. Venture capital funding in the UK for ntech related business has increased to over $500 million in 2014, while the sector is estimated to contribute more than GBP 20 billion to the economy1. A number of countries have stated their intention to create an eco-system in which such businesses can grow, which can only mean the continued growth of the sector in the foreseeable future. In parallel to these innovations, which aim at reducing the friction of making payments and transfers in at currency, which have been facilitated by electronic money (\e-money"), there has also been a rise in the use of virtual and crypto-currencies. While the former have traditionally been utilised in virtual economies, such as those of an online game or community [Lehdonvirta & 1Investment Trends in Fintech report by SVB, available at http://www.svb.com/News/Company-News/ 2015-Fintech-Report--Investment-Trends-in-Fintech/?site=uk 1arXiv:1508.04364v1 [cs.CR] 18 Aug 2015 Figure 1: Location and industry for 318 startups in Bitcoin. Source: http://www.creandum.com/ 318-records-and-counting-the-bitcoin-database-is-now-available-for-everyone-2/ Castronova, 2014], the latter has entered into the real economy also, see discussion in Peters et al. [2014]. The goal of the most successful crypto-currency thus far, Bitcoin, is in fact in line with that of the companies mentioned above, i.e. reducing transaction costs, but with the additional aim of completely eliminating the need for nancial intermediaries. While one of the objectives of Bitcoin was to become a form of electronic cash for online pay- ments, its main use thus far has been for speculation. However, this is beginning to change, and there are numerous emerging intermediaries that are beginning to operate within the Bitcoin net- work, which include exchanges, merchant processes and money transmitters. In fact, Bitcoin has been traded in various exchanges since at least 20102, and it has experienced various boom-bust cycles in this time with regard to its exchange to the US dollar, UK pound, Euro and other impor- tant at currencies. This price volatility is seen as an impediment to its more widespread use as a medium of exchange, and there have already been suggestions (e.g. by Brito et al. [2014]) for the creation of nancial instruments to aid in the reduction of volatility. Section 3 will highlight trends in price and trading volumes for Bitcoin over the past two years. The main innovation of crypto-currencies such as Bitcoin has been introducing technologies such as the blockchain, a ledger containing all transactions for every single unit of currency. It di ers from existing ledgers in that it is decentralised, i.e. there is no central authority verifying the validity of transactions. Instead, it employs veri cation based on cryptographic proof, where various members of the network verify `blocks' of transactions approximately every 10 minutes. The incentive for this is compensation in the form of newly `minted' Bitcoins for the rst member to provide the veri cation. The distributed ledger at the heart of the network could, of course be used for a number of other use-cases, such as smart property and smart contracts, and regulators have looked at such applications much more favourably than crypto-currencies, though this is also beginning to change. We provide more details of such use-cases and the potential of the blockchain 2Mt. Gox was launched in July 2010, and was responsible for the vast majority of Bitcoin trading until 2013. 2 in Section 3.4. Bitcoin in particular has had a fair amount of criticism questioning why its digital tokens, produced as a result of solving a computational problem, should have any value, particularly when they are not backed by any authority i.e. not at currencies. In Section 4 we discuss this question in more detail from both the traditional metalist views on currency value generation and more recent (and perhaps less orthodox) monetary theories, such as the Modern Monetary Theory (MMT) in this context. We discuss issues relating to monetary theory and resultant economic policy implications that may arise under each of these frameworks, if crypto-currencies were to interact more widely with the real economy. In this environment of fast-paced technological evolution, nancial innovation is running ahead of regulation. For example, the transaction anonymity provided by transacting in the Bitcoin network is a clear driver for several operational risks, money laundering, fraud and legal risk, as discussed at length in Peters et al. [2014]. Government responses have been mixed, and while they want to be careful not to overburden the budding sector of nancial innovation with excessive regulation and curtail growth in the area, there is a need to ensure that the new services are not used to circumvent regulation in traditional banking services. Section 5 will summarise regulatory interventions in some major economies. 2 Physical and electronic forms of money, and the devel- opment of crypto-currencies In this section we provide a brief overview of the historical context in which crypto-currencies have emerged. We touch upon government-backed and commodity backed currency and discuss the development of cryptographic protocols that enabled e-money. Finally, we describe the online communities which were rst exposed to virtual currency and the di erences between the afore- mentioned forms of money and crypto-currency. 2.1 Fiat currency and e-money We start with a brief de nition of a at currency. The European Central Bank de nes at currency as any legal tender designated and issued by a central authority that people are willing to accept in exchange for goods and services because it is backed by regulation, and because they trust this central authority. Fiat money is similar to commodity backed money in this regard with respect to its usage, but di ers in that it cannot be redeemed for a commodity, such as gold. The most common form of at currency backing is at the sovereign state's government level, but there have also been localised currencies or private monies, see discussion in Peters et al. [2014] for their use in local communities in the UK and Germany. While one is most commonly accustomed to thinking about money in its physical form, only a very small fraction of a country's total money supply is typically in the form of notes and coins. In the UK, this percentage is 2.1% of the 2.2 trillion GBP total money supply [Lipsey & Chrystal, 2011]. This then motivates the discussion of electronic money, or e-money, de ned by Al-Laham et al. [2009] as a oating claim on a private bank or other nancial institution that is not linked to any particular account. Under this rather general de nition one can consider many di erent forms of e-money such as bank deposits, electronic fund transfers, direct deposits, and payment processors (including micro-payments). Instead we put forward the rather more narrow de nition of the UK regulator de nes electronic money as follows (see Halpin & Moore [2009]): \Electronic money (e-money) is electronically (including magnetically) stored monetary value, represented by a claim on the issuer, which is issued on receipt of funds for the purpose of making 3 payment transactions, and which is accepted by a person other than the electronic money issuer. Types of e-money include pre-paid cards and electronic pre-paid accounts for use online. " Typically, e-money is stored in the same unit of account as the at denomination used to obtain the e-money. 2.2 Cryptographically secure e-money In the case of early forms of e-money one may go back to the early 1980's where David Chaum (see Chaum [1988, 1985, 1992]) developed the concept of electronic cash under the view that for it to be useable in the real world economy it would require a token of money that would emulate physical currency, and most importantly, privacy feature to enable safely and securely anonymous payments. He developed such a digital cash as an extension to the RSA encryption protocol used for most security purposes on the web at present which led to the creation of the company DigiCash. Due to complications that arose with the central bank in Amsterdam where DigiCash was founded, it was decided that such currency would only be sold as a product to banks. This e-money attempt had a lot of promise, but it was unable to gain mainstream uptake in the end due more to political and business related issues3. Following DigiCash there was an explosion of small venture capital rms established to develop e-money systems, leading to the release of a key initial regulatory response to such e-money, the 1994 EU Report by the Working Group on EU Payment Systems which was made to the council of the European Monetary Institute. After the release of this report there were three notable front runners that emerged: PayPal, Liberty Reserve and E-gold which was incidentally started by Nick Szabo, a former DigiCash employee and e-contract innovator. Whilst PayPal was careful to negotiate and avoid the challenges faced by integrating into the monetary system in a manner deemed acceptable by central banks and regulators, the other two eventually ran foul of authorities in the US due to the the suspected nature of some clients that may have taken up these services for activities related to money laundering and criminal enterprise. These three early e-money systems primarily operated as centralized systems. The impact of e-money on physical forms of currency has been discussed by Drehmann et al. [2002], while Sifers [1996] discusses policy concerns and regulatory issues. We will now be focusing on other electronic forms of money, which in contrast to e-money are not digital representations of at money, but rather new forms of currency altogether. 2.3 Virtual currencies to facilitate online gaming economies The 1990s saw the emergence of virtual currencies, typically currencies that were also centralized but restricted, at least in their early forms, to use in online messaging and virtual gaming environments. An early example was the Q coin, which could be purchased from brick and mortar shops in China for use on Tencent's online messaging platform Lehdonvirta & Castronova [2014]. Virtual currencies are now prevalent in massively multiplayer online games (e.g. World of Warcraft) or life simulation games (e.g. Second Life). Where these currencies are used as the medium of exchange in an online virtual economy, they have similarities with their at currency counterparts. To start with, the currencies are typically used by the participants in the economy for the purchase of virtual goods and services. Secondly, the currencies feature a central authority, which similar to a country's central bank4, can regulate the money supply in order to attain particular goals, such as controlling in ation or promoting economic 3http://globalcryptonews.com/before-bitcoin-the-rise-and-fall-of-digicash/ 4The Money Supply, New York Federal Reserve, accessed 10 August 2015, available at http://www.newyorkfed. org/aboutthefed/fedpoint/fed49.html 4 growth. In particular, some platforms actively manage the monetary supply, increasing money supply through in game features, or reducing money supply through in game \sinks", or desirable consumption items that remove money from the online environment Lehdonvirta & Castronova [2014]. The limited interaction of virtual currencies with the real economy stems from the fact that for many of these virtual currencies, the ows between at and the virtual currency are uni-directional, i.e. one can only purchase, but not sell the virtual currency [Peters et al. , 2014]. For some environments, such as World of Warcraft, the developer Blizzard Entertainment actively monitors and polices the use of their virtual currency to restrict its use within the virtual economy and thus avoid any legal issues that may arise. There are a minority of cases, however, such as Second Life, whose developer Linden Labs does not oppose actively the exchange of the Linden dollar with real at currency. This has led to a bi-directional cross over between the virtual currency and real at currencies. Virtual currencies cannot be fully considered as e-money since, as although they share some of its attributes, there is currently no legal founding to enforce the link between at physical money and virtual currencies as there is in regulated electronic money transactions. In addition, virtual currencies are not stored in the same unit of account as any at currency that would preserve their worth. 2.4 Crypto-currencies Unlike such virtual currencies which are centrally controlled by a game designer or online platform operator, the development of crypto-currencies has been such that they are typically not operated in a centralized manner. By far the most widely known crypto-currency is Bitcoin, introduced by Nakamoto [2008]. It is a `decentralized' currency, in that one does not need nancial intermediaries in order to perform electronic transactions and it does not have a central bank or other authority in control of monetary policy. Simply put, Bitcoin can be described as a decentralised ledger of transactions. The role of the verifying third party found in centralised systems is played by the Bitcoin network participants, who contribute computational power and are rewarded in the form of new amounts of crypto-currency. Designed to be a currency for the internet, Bitcoin is not localized to a particular region or country, nor is it intended for use in a particular virtual economy. It is not backed by any local government or private organisation and is being circulated in the real economy on an increasing scale. Because of its decentralized nature, this circulation is largely beyond the reach of direct regulation, monetary policy, oversight and money supply control that has traditionally been enforced in some manner with localized private monies and e-money. Bitcoin is certainly not the only crypto-currency, and there are numerous papers discussing both identi ed weaknesses of the current protocol, as well as possible improvements to both centralised and decentralised currency architectures, see discussions in Eyal & Sirer [2014]; Barber et al. [2012]; Carroll & Bellotti [2015] and references therein. Other examples of decentralized crypto-currencies include Litecoin, which was originally based on the Bitcoin protocol, and has a faster veri cation time, Ripple which is a monetary system based on trust networks, Dogecoin, Monero and Nxt. 2.5 The distinct nature of crypto-currencies To distinguish between centralized and decentralized currencies, one can consider for instance the de nition from the central bank of Canada5`Decentralized e-money is stored and ows through a peer-to-peer computer network that directly links users, much like a chat room. No single user controls the network.' 5http://www.bankofcanada.ca/wp-content/uploads/2014/04/Decentralize-E-Money.pdf 5 The ECB report on virtual currencies6classi ed these currencies based on their interaction with at money and the real economy. Peters et al. [2014] proposed to extend this classi cation to include the existence of a central repository and a single administrator, where the absence of both means that the currency is operated via a decentralised network consensus-type administration. Decentralised virtual currencies are then termed crypto-currencies, as the operation of these currencies is usually based on cryptographic proof provided by a network, rather than the existence of a trusted third part to verify transactions. Di erentiating between the di erent forms of virtual currencies is non-trivial as they are mul- tifaceted in their attributes and interactions in the real economy. Several di erences between cen- tralised virtual currencies and crypto-currencies were identi ed in Peters et al. [2014] and we brie y summarise some of these below: In terms of changes to their speci cation. In centralised virtual currencies the speci cation can be altered by the controlling company, whereas in crypto-currencies the speci cation is agreed by cryptographic consensus. In terms of their purpose and geographic area of operation, i.e. for use within an online community in the case of centralised virtual currencies, or in the wider economy, in the case of crypto-currencies. In terms of the existence of a centralised authority to exert control over issuance, monetary policy and administration of currency balances. In centralised virtual currencies, a central authority can step in to control money supply and reverse transactions at will. In crypto- currencies, the absence of a centralised authority means that users control these aspects ac- cording to the computational power they contribute to the network. In addition, transactions are generally irreversible, as there is no authority to appeal to. In terms of the ow of currency between users and the currencies' exchangeability with at. In terms of the value generation mechanism, which will be discussed in detail in Section 4. The distinct nature of crypto-currency is apparent in its comparison to centralised virtual cur- rency above, but also, as we will see here, to e-money. The issuance mechanism in Bitcoin is xed, with the coin generation process and nal available currency dictated by a mathematical protocol. E-money is intrinsically linked to the underlying at currency, whose issuance is controlled by a central banking authority. In addition, in the current absence of the requirements of `know your customer' that e-money transactions tend to require, one can have a more anonymous interaction with crypto-currency. In general it is acknowledged that anonymity is perhaps greater with crypto- currencies, as not all companies directly follow the Financial Action Task Force standards with regard to customer identi cation. Another key point that can distinguish the utility of crypto and virtual currencies relates to the environments they operate in. This is becoming an important feature in terms of accessibility, at present Bitcoin is limited to people with internet connections. This turns out to be signi cant as it precludes its widespread uptake in the third world and developing countries, where e-money has been very popular in mobile and paging service networks. To conclude this section on the distinct nature of crypto-currency, we also observe the comments made by Maurer et al. [2013] that in the case of Bitcoin, it is its code that is its core. They state succinctly: \...the currency functions based on the trust its community of users place in the code and, as with all free and open-source projects, the trust they place in their collective ability to review, e ectively evaluate, and agree as a group to changes to it". This is clearly di erent from 6https://www.ecb.europa.eu/pub/pdf/other/virtualcurrencyschemesen.pdf? fe92070cdf17668c02846440e457dfd0 6 e-money which involves trust in the central authority, government or state that backs the at denomination underlying the e-money. 2.6 Ful lling the functions of money Having described the historical context in which crypto-currencies emerged, as well as the di er- ences with other forms of electronic money, we now analyse whether these currencies can ful ll the traditional role of money in an economy. A widely held view is that money should serve three distinct functions: 1. It should be generally accepted as a medium of exchange.; 2. It should be a unit of account so that we can compare the costs of goods and services over time and between merchants.; and 3. It should be a store of value that stays stable over time. Both the Bank of England7and the central bank of Canada8, using Bitcoin as a case study, found that crypto-currencies do not currently ful ll these functions in the way that at currencies and e-money do. However, it is of course possible that in the future, a more widespread uptake in a particular crypto-currency may lead it to it satisfying this criteria. This is not necessarily the view held in all jurisdictions throughout the world, we will discuss recent changes proposed to this view in for instance Australia, in Section 5. Separate from the functions of money, one can also explore particular qualities of money that make it suitable for facilitating transactions. In the case of commodity money, these include dura- bility, value per weight unit (portability), and scarcity, and Graf [2015] argues that Bitcoin evaluates well on each characteristic. As these currencies were primarily oriented towards direct, online trans- actions, we can additionally consider the following qualities in the context, e.g. of online commerce [Drehmann et al. , 2002]: They should be low cost; they should provide reliable security; and they should o er a degree of privacy in transactions. See further discussions on these points in Maurer et al. [2013]. Two further distinctive feature of crypto-currency like Bitcoin, which are not readily replicated in at e-money, relate to its divisibility and fungibility, see discussion in Barber et al. [2012]. They note that one of the key practical appeals of for instance Bitcoin is \...the ease with which coins can be both divided and recombined to create essentially any denomination possible. This is an Achilles heel of (strongly anonymous) e-cash systems, because denominations had to be standardized to be unlinkable, which incidentally makes the computational cost of e-cash transactions linear in the amount. In Bitcoin, linkage is inherent, as it is what prevents double spending; but it is the identities that are anonymous." We note that such crypto-currencies as Bitcoin do not however have, compared to conventional at backed e-money payment systems, a strict governance structure other than its underlying soft- ware. The implications of this are discussed recently by both Peters et al. [2014] and B ohme et al. [2015]. Without the lack of governance a orded by traditional at e-money payment systems, the Bitcoin network is unable to impose any obligation on a nancial institution, payment processor, or other intermediary to verify a users identity or cross-check with watch-lists or embargoed countries. 7http://www.bankofengland.co.uk/publications/Documents/quarterlybulletin/2014/qb14q302.pdf 8http://www.bankofcanada.ca/wp-content/uploads/2014/04/Decentralize-E-Money.pdf 7 The implications of this for money laundering and money transmitter regulations are discussed in Brito et al. [2014]. Finally, it is clear that without central governance, one cannot impose any form of prohibition on sales of particular items, this point is discussed by MacCarthy [2010], where they point out that traditional e-money and credit card payment systems regularly monitor and disallow a range of transactions which are deemed unlawful in the place of sale. 3 Trends in the usage of crypto-currencies in the economy The discussion in the previous section should highlight the much greater potential of crypto- currencies for entering the real economy, compared to virtual currencies. We present in this section summary statistics for the uptake of Bitcoin, the most popular crypto-currency. We also discuss associated investment products, as well as views about the currency's potential use for facilitating criminal transactions. 3.1 Bitcoin trading by exchange and currency Bitcoin is by no means the only crypto-currency. Coinmarketcap9lists 590 currencies, with a total market capitalisation of $4.5 billion. As Bitcoin accounts for more than 80% of this amount, we will focus on it to exhibit trends in crypto-currency activity. Figure 2 shows the evolution of price, as well as traded volumes over a 2-year period. It is interesting to note that while trading in Bitcoin was predominantly in US dollars, it has now moved to being predominantly in Chinese Yuan. This highlights Bitcoin's nature as both a highly speculative investment and as a tool for evading currency controls10. The Bitcoin network relies on `miners', or members that contribute computational power to solve a complex cryptographic problem and verify the transactions that have occurred over a short period of time (10 minutes). These transactions are then published as a block, and the miner who had rst published the proof receives a reward (currently 25 bitcoins). The maximum block size is 1 MB, which corresponds to approximately 7 transactions per second. In order to ensure that blocks are published approximately every 10 minutes, the network automatically adjusts the diculty of the cryptographic problem to be solved. Bitcoin mining requires specialised equipment, as well as substantial electricity costs, and miners thus have to balance their technology and energy investment so that their activities are pro table. As the price of Bitcoin increased, miners invested in more hardware, increasing their computational capability. However, the Bitcoin network then increased the diculty of the cryptographic problem, in order to keep blocks published in regular intervals. Figure 3 shows the evolution in both the diculty of the cryptographic problem over time, as well as the block size. We note the exponential increase in the diculty for a sustained period of time. As Bitcoin prices had been steadily declining in the latter part of this period, it is likely that mining became less pro table, which explains the plateau in diculty. With regards to the increase in blocksize, this corresponds to an increase in Bitcoin transactions over time. A blocksize of 0.4 MB corresponds to approximately 3 Bitcoin transactions per second. A summary of other Bitcoin related trends is also provided in reports such as by B ohme et al. [2015]. 3.2 Crypto-currency real world usage The projected future use of crypto-currencies like Bitcoin is discussed at length by Brito et al. [2014], with regard to securities, options, swaptions, forwards, bonds that may be developed going 9http://coinmarketcap.com/all/views/all/ , accessed 30/06/2015. 10http://www.ft.com/fastft/289502/bitcoin-still-gaining-currency-china 8 05001000 Jul−2013 Oct−2013 Jan−2014 Apr−2014 Jul−2014 Oct−2014 Jan−2015 Apr−2015 Jul−2015Price (US $)Exchange anxbtc bitfinex bitquick bitstamp btce campbx hitbtc itbit localbitcoins others 0246 Jul−2013 Oct−2013 Jan−2014 Apr−2014 Jul−2014 Oct−2014 Jan−2015 Apr−2015Weekly volume (Million BTC)Exchange anxbtc bitfinex bitstamp btcchina btce huobi lakebtc mtgox okcoin others 0246 Jul−2013 Oct−2013 Jan−2014 Apr−2014 Jul−2014 Oct−2014 Jan−2015 Apr−2015Weekly volume (Million BTC)Currency AUD CAD CNY EUR GBP HKD JPY PLN USD othersFigure 2: Top: Price uctuation of Bitcoin over time. Bottom: Traded volumes by exchange (left) and by currency (right). 0e+001e+102e+103e+104e+105e+10 Jul−2013 Oct−2013 Jan−2014 Apr−2014 Jul−2014 Oct−2014 Jan−2015 Apr−2015Difficulty 0.00.10.20.30.4 2011 2012 2013 2014 2015Blocksize (MB) Figure 3: Diculty forward based on virtual currencies such as Bitcoin. The European Central Bank, in its second 9 report11, presents both an overview of the actors, the di erent modes of operation and the di erent business models that originate from virtual currencies schemes. Measures of current usage for Bitcoin shows between 60,000 and 70,000 transactions daily, for a total transacted volume of between e15 and e30 million, numbers which are somewhat insigni cant compared to activity with existing payment solutions12. However, the ECB report highlights speed, cost and facilitation of cross-border payments as a major advantages of virtual currencies. The European Securities and Markets Authority (ESMA) has published a call for evidence on virtual currency investment products, as well as blockchain investment applications not involving virtual currencies13. This interest of ESMA is much more narrow than that of other stakeholders, in that it does not seek to express a view of the desirability of using virtual currency in a payment system. Instead, it focuses on collective investment schemes (CIS) and virtual currency derivatives. In its preliminary work, ESMA has obtained data from 6 of 13 virtual currency CIS, which had approximately e246 million, with the largest accounting for almost half of this gure. Besides these schemes, ESMA also identi ed regulated European companies o ering contracts for di erence (CFDs) in Bitcoin and Litecoin, as well as binary options on either. 3.3 Crypto-currency as a means of facilitating crime In its infancy, Bitcoin was associated with criminal activity through the online marketplace `Silk road', which operated on the Dark Web. Analysing 8 months of data from this marketplace, Christin [2013] found that the majority of the 24,400 items sold on the market place were controlled substances and narcotics, with 112 sellers active throughout this interval. The total revenue from public listings in this time was approximately $10 million. Silk road was shut down by the FBI in 2013, while also seizing $28.5 million in Bitcoin and arresting the marketplace's operator14. Moser et al. [2013] provided the rst thorough study of the potential for Bitcoin to be used as a money laundering tool. In particular, they investigated companies which provided anonymising services for a fee, by `mixing' Bitcoin inputs from several participants, and generating new Bitcoin addresses to hold the outputs. They determined that some services were indeed e ective for this purpose and concluded that because of this, it is unlikely that a Know-Your-Customer principle can be enforced in the Bitcoin system. In terms of real-world use in this context, an assessment of the National Crime Agency in the UK found that the majority of transactions for illicit purposes where actually of low value, and there was little to suggest that digital currencies have been widely used in the context of money laundering. Although anonymity was identi ed as a potential facilitator of criminality, in reality to use many of the available digital currency services, users would have to register an (eponymous) account. 3.4 Other distributed ledger technologies While HM Treasury and the Euro Banking Association (EBA) have been ambivalent towards Bitcoin in their recent reports, they have both recognised the potential of cryptotechnologies for other use cases. In particular, they have identi ed the distributed ledger at the core of the Bitcoin protocol, which achieves governance by consensus. While few concrete examples exist at present, Swan [2015] cites several examples of transnational groups which could use such a governance structure, such as the Internet Standards group ICANN and DNS, thus avoiding the in uence (political and otherwise) 11www.ecb.europa.eu/pub/pdf/other/virtualcurrencyschemesen.pdf 12Existing payment solutions include Visa, MasterCard, Paypal etc, and the ECB puts current daily non-cash payment transactions at 274 million. 13http://www.esma.europa.eu/system/files/2015-532_call_for_evidence_on_virtual_currency_ investment.pdf 14http://www.forbes.com/sites/andygreenberg/2013/10/25/fbi-says-its-seized-20-million-in-bitcoins-from-ross-ulbricht-alleged-owner-of-silk-road/ 10 of certain groups that would occur when registering in particular jurisdictions. A more ambitious example is that of smart property, where potentially every asset could be encoded onto this ledger with a unique identi er, and thus all asset transactions could be con rmed and tracked via the blockchain. As noted in Barber et al. [2012], the notion of scripting o ered by crypto-currencies like Bitcoin is a highly useful and very innovative feature. It allows users to embed scripts in their Bitcoin transactions, this key feature is only just being recognised as a utility in its own right. It has been realized that at least in theory, as noted in Barber et al. [2012] that this can lead to \... rich transactional semantics and contracts through scripts, such as deposits, escrow and dispute mediation, assurance contracts, including the use of external states, and so on." The Bitcoin use-case is one where the blockchain used is permissionless. `Permission' refers to the veri ers on the network, and in the case of Bitcoin, miners do not have to be authorised by a central authority before performing their mining activities. This is not the only model for a blockchain, however, and indeed the actors on the network who verify transactions can be subject to authorisation, as well as legal accountability. The applications outlined in this section span both modes of blockchain operation. In its report, the EBA15presents an analysis of cryptotechnologies in four application areas, presented also in Figure 4: Currencies such as Bitcoin, Litecoin etc. Asset registries : Similar to the smart property example mentioned earlier, ownership details would be recorded in the blockchain, and while physical assets could always be lost or stolen, the holder of an asset would not be able to claim ownership until it has been transferred via a blockchain transaction. However, because of the potentially large number of assets and associated details that could be recorded on the blockchain, this could create a large amount of trac on the network. Bitcoin's 1MB block size caps the number of transactions at an average of 7 per second, and it is clear that a much higher number would be needed for the purpose of asset registration in certain areas (e.g. nancial). A good example of a use-case is that of Everledger16, a ledger for the certi cation and transaction history of diamonds. A laboratory rst takes measurements of cut, clarity, size and other information and this is all stored on the blockchain. Application stacks : This application area aims to provide a platform for the execution of `complete applications on top of decentralised networks'. Examples include the smart contracts proposed by by Eris Industries17, which can automatically verify the interactions between the parties to the contract. With such contracts, there is the possibility of creating derivatives that settle automatically and reduce counterparty risk, such as the blockchain derivatives developed by Hedgy18. There are several caveats to this application area also, however, as smart contracts will always be limited to the ability of the data to describe these interactions. Asset-centric technologies : These focus on digital representation of real assets on a shared, but not public, ledger. 15Available at https://www.abe-eba.eu/downloads/knowledge-and-research/EBA_20150511_EBA_ Cryptotechnologies_a_major_IT_innovation_v1.0.pdf , accessed 29/05/2015 16http://www.everledger.io/ 17https://erisindustries.com/ 18http://hedgy.co/ 11 Figure 4: 4 categories of cryptotechnologies. Reproduced from the EBA Cryptotechnologies report. 4 Value generation in crypto-currency At rst glance, it may be dicult to comprehend why crypto-currency, as a purely arti cial digital construct produced as a result of solving a computational problem, with no backing from a central authority, should have any value in the real economy. In this section we will refer to a number of economic principles followed by associated monetary theories, in order to determine any elements which could explain the value of this digital resource. We note that we do not advocate one particular school of economic thought over another, but will rather discuss issues that may arise under a range of these di erent prospective analytical frameworks, if crypto-currencies were to interact more widely with the real economy. 4.1 Crypto-currencies as scarce economic goods and the potential of a `De ationary Spiral' Graf [2015] suggests that bitcoin `meets key characteristics of a good, as de ned in relation to action and choice'. It is in fact a scarce digital good, produced through a predetermined issuance process, and guaranteed not to exceed a certain quantity, as its protocol has a hardcoded upper limit of 21 million coins, a kind of asymptotic upper bound. While one is accustomed to think about goods and scarcity in a material sense, this of course does not have to be the case. Consequently, it is then worth considering what will be the nal means of value generation when the money supply for instance in Bitcoin is complete, either by means of exhausting the computational e ort one is willing to expend in mining more coins or the actual total number of Bitcoins is produced. Unlike physical metal commodities, which are in unknown total supply, we argue that the knowledge of the total amount available will change the perceived value of the currency. Though physical metals may be scarce, the lack of knowledge of their total supply leads an ever more involved and expensive search for more, maintaining or increasing the worth of those 12 currently in circulation, this will not be the case with Bitcoin. At which point the argument of value maintenance for such a crypto-currency must change to a di erent perspective. Some economists, such as Paul Krugman19observed the following possibility of de ationary pressure in crypto-currency networks. Bitcoin's capped total money supply could be viewed as a variation on Milton Friedmans \k-percent rule" [Friedman, 1960]. This theory states that an optimal way to control in ation over the long term is for the central bank to grow the money supply by a xed amount of k% each year, irrespective of the cyclical state of the economy. In particular, one should set the growth variable of k% at a rate equal to the growth of real GDP each year. This connection between Milton Freidman's Nobel prize winning theory and Bitcoin practice was highlighted recently in B ohme et al. [2015] who argue that one can consider Bitcoin as a type of \... proposal to x the annual growth rate of the money supply to a xed rate of growth." At the end of the mining process, when the total Bitcoin money supply is created, this would be equivalent to ak= 0 or perhaps a negative kif a large loss of money supply occured due to theft, electronic storage corruption or damage to physical storage of a non-trivial portion of the total money supply. Hence, one needs to consider what is applicable monetary policy to deal with the situation that the size of an economy grows at a di erent rate to the quantity of money in that economy, in this case Bitcoins. B ohme et al. [2015] reiterate the views of Paul Krugman that \... the xed slow growth rate of Bitcoin creates the possibility of de ation if Bitcoin was to be used widely...". They also note that there have been other crypto-currency extensions of Bitcoin proposed to overcome such potential problems, see discussion by for instance King [2013] which introduces Primecoin with in nite money supply or the introduction of Peercoin which keeps k% around 1-2. Barber et al. [2012] also discuss such issues, talking about a de ationary spiral that may arise from the capped money supply. We rst brie y recall what a de ationary spiral is before discussing this in the context of Bitcoin. A de ationary spiral refers to an economic development where rampant de ation can eventually lead to the collapse of the currency. In general de ation can be considered as a decline in the general price level. It can occur when the price of goods and services, as measured relative to a speci c measure, begin to decline. This may not be due to the fact that the value of the goods and services themselves reduced, instead it can simply occur due to the fact that the value of the currency itself increased. So one can consider the spiral of de ation as arising in the situation that the value of a currency, relative to the goods in an economy, increases continually as a result of hoarding. In response, as the value of the currency relative to the goods in the economy increases, people are given an incentive to hoard the currency. This incentive arises from the fact that by retaining the currency, they aim to be able to purchase more goods for less money in the future, this becomes a vicious cycle as the lack of available currency in the economy causes prices of goods to decrease and this results in yet further hoarding. Such an e ect is a real condition that a ects the at backed fractional reserve banking system. There are two schools of thought as to whether such a de ationary spiral may occur for Bitcoin. One view is that it is not likely to occur in the case of Bitcoin, since it is argued that users in the real economy may not foresee a xed cost (unit amount) that they must pay with Bitcoin. Therefore, if the value of the Bitcoins that they own increases, then one may expect that any future cost will take a proportionally smaller amount of Bitcoins. A consequence of this view is that there would however by no real xed incentive to hold Bitcoin other than pure speculation. In addition, if the real economy that allows Bitcoin grows, then one would also expect the per-unit value of Bitcoin in such a perspective to proportionally increase. This view e ectively perceives Bitcoin not as a debt but as an asset, and as such under such a perspective one would expect that Bitcoins would only de ate in value when the Bitcoin economy is growing. In Barber et al. [2012] they take this perspective and they postulate on a setting in which Bitcoin usage has matured in the real economy, considering for instance a stable 1% of US GDP 19http://krugman.blogs.nytimes.com/2011/09/07/golden-cyberfetters/ 13 transactions in Bitcoins and 99% in USD. They then argue that in such a setting one may expect that the purchasing power of Bitcoin would still increase over time. The reason is that each coin will increasingly capture a correspondingly constant fraction of the countrys growing wealth. They acknowledge that such a de ationary spiral may occur for bitcoins and discuss potential for hoarding of such crypto-currency. They argue that their appreciation potential will result in a user tendency to accumulate Bitcoins rather than spend them in the real economy. The consequence of this is that the incentives o ered to groups that verify and validate Bitcoin transactions on the blockchain will reduce as there will be less Bitcoins in circulation, hence transaction volumes naturally reduce resulting in a less pro table operating environment for veri cation of transactions. They aptly term this condition \bit rot". The alternative economic perspective on how de ationary spirals may manifest is given by the argument that they occur when there is an incentive to hoard because of declining prices. The decline in prices will result in less available currency in the market place, which further perpetuates a decline in prices, and the de ationary cycle emerges. The website https://en.bitcoin.it/wiki/ Deflationary_spiral discusses mechanisms under which a non-traditional de ationary spiral may arise in the Bitcoin network. It argues that once Bitcoin value stabilizes there will always be the knowledge that the number of Bitcoins in the market is limited. Consequently, if the total value of all Bitcoin transactions completed increases in "real" terms, then there will continue to be price de ation. From this view, there can be an expectation of future de ation which will result in a discrepancy in perceived values of Bitcoins depending on ones investment horizon. In the short term under this scenario, there would be an apparent over-pricing of Bitcoin, which may encourage alternative competition. 4.2 The metalist view A range of authors have alluded to the metalist perspective on understanding the value generation mechanism for the Bitcoin crypto-currency, see discussions in Maurer et al. [2013]; Ingham [2004]; Blanchette [2011]. For instance, Maurer et al. [2013] discuss Bitcoin and the embracement of its users in a form of monetary pragmatism, and state \... Bitcoin enthusiasts make the move from discourse to practice in their insistence that privacy, labor, and value are built into the currencys networked protocols. This semiotics replays debates not just about privacy and individual liberty, but about the nature of money, as a material commodity or chain of credits.". They argue that Bitcoin embodies a form of \practical materialism" which is manifest in the form of a modern day digital metallism, an extension of the ideas of Ingham [2004] and his perspectives on \practical metallism". Both Blanchette [2011] and Maurer et al. [2013] argue for a form of metalist monetary per- spective on Bitcoin. The latter stating \... Despite the supposed immateriality of digital bits of information, matter itself is very much at issue with Bitcoin, both in how it is conceptualized and in how individual Bitcoins are mined...." Under the premise of a \metalist's" view of the value derivation of money, many would argue that value of crypto-currencies may at present be derived from physical commodities consumed in the mining process utilised to obtain this increasingly scarce resource. For instance several studies have argued that the price of crypto-currency Bitcoin is related to the cost of maintenance, storage and electricity consumption required for the large server farms \virtual mines" utilised to create the bitcoin currency, see discussions in O'Dwyer & Malone [2014]. In J.P. [2011] they argue that the material value of Bitcoin is not limited to the privacy feature o ered by the crypto-currency, they argue that it nds another feature that provides its value, the process of producing new Bitcoins known as mining which \mimic[s] the extraction of minerals [...]. As the most readily available resources are exhausted, the supply dwindles." If one then continued the perspective of a metalist monetary theory for crypto-currency such 14 as Bitcoin, then one could argue based on ideals expressed in Ingham [2000], where they consider money to be the consequence of rational agents that prefer to work with money that is the most tradeable commodity in the current real economy. Under this perspective there is some notion that virtual and crypto-currencies especially could maintain value after the mining process. For instance, if rational agents in the economy began to prefer or value them more than other at backed e-money substitutes. This could happen in a number of ways, for instance rational agents may prefer the privacy features such virtual and crypto-currencies may o er in the digital economy more than other at based e-money competitors. Another possibility may be that the block-chain technologies that act as ledger, for instance in Bitcoin, may nd wide-spread uptake as a means of virtual contract construction between di erent economies, or as a third perspective, if virtual and crypto-currencies found a wider market base in third world countries by moving beyond internet based services to mobile services, this may also maintain their value in the real economy. 4.3 The chartal view Next we discuss some alternative monetary theory perspectives on cryto-currencies such as Bitcoin. In particular, we consider the case of Bitcoin when the mining process is completed and all the money supply has been created. We then consider the chatalist perspective of where Bitcoin may derive its value, this is an alternative perspective to that of the metalist views expressed above that has not been discussed previously in the context of Bitcoin. Therefore, we nd it interesting to open up this avenue of thought to more debate. An alternative view to the metalist perspective can also be considered, where the value of Bitcoins may continue to be maintained. This alternative view would be based on a transition from the metalist perspective, post mining completion, to a chartalist's view. This view posits that money should not be studied in isolation from the powers of the state, i.e. the country that \created" and \controls" the money. In particular, under this perspective, money in its general sense is a unit of account created by a central (government) authority for the legal structuring of its social debt obligations. Well before crypto-currencies were conceived of, for instance Knapp [1924] argued that all monies are chartal, and this can include crypto-currencies, since all payments in the form of tax to the state or governing powers are measured in some unit of value. Furthermore, the state makes a decision \that a piece of such and such a description shall be valid as so many units of value", it is then irrelevant what this token or money manifests as since it is only a \sign-bearing" object that a state \gives a use independent of its material". 4.4 How do 'outside monies' like virtual and crypto-currencies t into the chartal and modern monetary theory perspectives ? In this section we delve in more detail into the importance of thinking about the role of such virtual and crypto-currencies in aspects of monetary theory and monetary policies if they become more prevalent in the real economy. We contrast views formed based on at backed e-money with the how they may be a ected in a real economy with both at and virtual or crytpo-currencies. In general we will tend to raise more questions, than we pro er solutions. Though this is useful to open dialogue and ways of thinking about the challenges that may lie ahead. In particular we rst recall that monetary theory is developed with the aim of understanding the most suitable approaches to monetary policy and how it should be conducted within an economy. It is suggested by such theories that a variety of di erent monetary polices may be employed to bene t countries, depending on their economy and resources. For most monetary theories, the core ideals relate to factors such as the size of the money supply, price levels and benchmark interest rates and how they all a ect the economy through in ation, taxation, wage growth and unemployment levels. 15 It is then the realms of economists and central bankers to execute the outcomes of such theories in practice. As stated, we would like to initiate some exploration of how virtual and crypto-currencies, when mixed with at currency in the real economy, may alter traditional outcomes on policy decisions compared to at backed money supplies. There are many forms of monetary theories that have been developed by economists, indeed we have seen brief discussions on metalist and chartal views already above. These include ideas of Fiat Debt-Free Money Reformers, Modern Monetary Theorists, Modern Monetary Realists, Post Keynesian Reformers, Islamic Banking Advocates, Social Credit Reformers, Land Reformers, Hard Money Reformers and Competing Currency Reformers. Recent, some would say unorthodox ver- sions of such theories Tcherneva [2006], include variants such as Modern Monetary Theory (MMT) Wray [1998b] and Modern Monetary Realism (MMR) which were developments from early forms of Chartalism Wray [1998a] and prior ideas from Knapp [1924]; Forstater [1999] and functional nance theories of Lerner [1943]. Such theories also are termed neochartalist approaches and \tax-driven" money, see discussion in Wray [2000]. All these theories revolve around the procedures and conse- quences of utilization of government issued units of money often called at money, in the sense of the de nition o ered earlier. A key premise of theories like MMT and the consequences of monetary policy that ows from these theories is the notion that governments have some level of control over the money supply and elasticity of money. So we wonder, what happens to such controls when other forms of currency, created outside of any sovereign state, starts to interact in a given economy. Does this reduce the power of the state to enact policies based on the assumption of ultimate control of money supply, or does it act as a friction or damping factor on the utility of resulting policy levers when enacting policies assuming ultimate money supply controls are still relevant. One can view money, in its general sense, as a unit of account created by a central (government) authority for the legal structuring of its social debt obligations. For instance, this may manifest between a population and a governing central gure in the form of taxation liabilities. In this setting it is conceived by chartalists and many modern monetary theories that money then arises from the state as a form of tax credit that can nullify these taxation debts. This is in rm contra- diction to other orthodox theories that followed from commodity based currency views such as gold standards which view money more as naturally arising as a medium of exchange from the attempts of enterprising individuals to minimize transactions costs in barter economies. No matter which view one prefers, it is interesting to question what implications may arise from interactions in such economies of non-government controlled currencies which are non- at such as virtual currencies and crypto-currencies acting as truly \outside" monies. Before embarking on developing such questions for future consideration we summarise a few key ideas from chartalist, MMT and MMR thinking, based on the account provided in Tcherneva [2006] where it is observed that in general the following principles are considered by these theories. With each concept, we brie y pose questions relating to their applicability in the setting of an economy which admist both at currency as well as virtual and crypto-currencies. Dismissal of the view that money emerges naturally as a medium of exchange that enables the minimization of transaction costs among utility maximizing rational agents in the real economy, due to their view that such notions lack historical support. {Is this view now valid for crypto-currencies. Some would argue one of the key reasons crypto-currencies are being adopted in the real economy at present is due to the very fact that they are providing a reduction in transaction costs for some agents in comparison to other at backed e-money payment services such as Paypal, see discussions in Brito et al. [2014]. Perhaps, therefore there will be some historical precedent for questioning this perspective further in the case of virtual and crypto-currencies. 16 One should study money in the context of institutions and culture with special consideration given to political and social considerations. {Certainly, the role of virtual and crypto-currencies may t into this perspective, in the sense that the context of their uptake in the real economy has historically certainly been a function of institutional in uence from governments in the form of regulations and central bank policies. The role of virtual and crypto-currencies has also been in uenced by cultural and social considerations. To see this one may consider for instance the rapid uptake of some virtual and crypto-currencies in the U.S. and more recently in China, where in some cases they are used as alternative means for transmission of assets with enhanced anonymity from central government oversights. Money is by its nature a credit-debt social construct. Furthermore, chartalists argue that social debt relationships may be ordered with the top of the hierarchy being the liability of the central authority which they deem the most reliable. Neochartalists also argue that modern currencies are contained in a context of certain governing central or state controls: the ability to levy taxes on the population and economy; and the ability to decide what is acceptable for payment of tax liabilities. In this context tax should be understood in a broader context of modern income tax, estate and commercial tax as well as any non-reciprocol obligation to the state such as nes and fees. {We will address this point in Section 4.5 Money functions as an abstract unit of account which is then used as a means of payment and debt settlement. Unlike orthodox monetary theories, charatalists distinguish between money-of-account and money in the real economy, perhaps summarised by Keynes [1930] who argued that \money-of-account is the description or title and the money is the thing which answers the description." With this view, chartalists see money's function in the real economy as a medium of exchange is incidental to and contingent on its primary function as a unit of account and a means of payment of liability. Neochartalism generally views taxation not as a form of nancing government spending but instead as a mechanism to create demand for the currency. {We will address this point in Section 4.5 Neochartalists believe that given the view that modern states or countries or unions have the monopoly power over the issue of their currency, i.e. sovereign currency control with no xed exchange rates, dollarization, monetary unions or currency boards, they they will not face operational nancial constraints, though they could face political constraints. Further- more, they consider that such states should consider borrowing as an ex ante interest rate maintenance operation, arguing that instead the taxation system is established as a means to creating demand for currency rather than nancing of government spending. Their perspective is such that, no entity with the power to create and destroy money as they require will need anyone else to assist in the ability to `fund' spending. However, even though de cits for the economy are not nancially constrained in the typical sense, they are still subject to potential pressures from in ation rates and exchange rates, as well other considerations such as access to available resources, capacity utilization, labour availablility, and external balance. {Firstly, we discuss the issue of monopoly power over currency supply. To address this consideration, the question that may arise is whether or not the central bank or gov- ernment can control the money supply and elasticity of such decentralised virtual or 17 crypto-currencies perhaps through accumulation of stored reserves raised through taxa- tion? This would ofcourse be assuming they were eventually allowed by governments as alternative forms of payment for tax liabilities along side traditional at currency. If this were the case, then one would need to be very careful in the money supply management, since as noted previously too greater hoarding of these currencies, which are of bounded total money supply, may result in a de ationary spiral. {An alternative perspective, which avoids the need for reserving of virtual or crypto- currencies, in order to achieve control of the money supply may also be possible for some types of virtual and crypto-currencies. For instance, in the case of Bitcoin, instead or accumulating reserves, a government may alternatively take greater stakes in the network mining and transaction validation activities. A governments access to vast computing power, relative to most agents in the economy, puts them at a distinct advantage to gain sucient computational power within such networks that any virtual or crypto-currency with consensus network type protocol embedded in its code may be able to have its core attributes modi ed by governments who earn sucient voting rights. For instance, a government may gain sucient control of the currencies network to alter core features of the code such as the nite money supply aspect, the mining rates and other key features related to the money supply. Perhaps it may be argued that in e ect this is the crypto-currency equivalent of state central power over money supply. {Secondly, we consider the issue of whether virtual and crypto-currencies would result in a form of operational nancial constraint for states and governments. In the case of decentralised virtual or crypto-currencies, the operations required to gain some form of control or assert some form of management of the money supplies in the real economy may not in general be free from operational nancial constraints. For instance the ac- tions mentioned above such as reserving of virtual or crypto currencies, or more active control/'voting power' with in the virtual network, through enhanced mining or trans- action processing activities will be potentially expensive for the state to maintain and can be considered as a operational nancial constraint on the actions they may wish to enact in their monetary and scal policies. Neochartalists also consider that when a state has a monopoly over the currency, it also has the power to set prices, including interest rates and how currency will be exchanged for other goods and services. {So if one assumes that the state only has partial power over some aspect of a virtual or crypto-currency through such means as discussed in the previous bullet points above, then an interesting question to raise is what implications does this have for the perspectives held by Neochartalists views on the ability of a state to set prices, interest rates and exchange rates? These views are based on the premise that the state has monopoly power over the currency, and ofcourse they will still maintain this over their at denominations. So the point of consideration is more whether an increased growth and uptake in the economy of virtual and crypto-currencies, for which the state does not have monopoly control over the money supply attributes, will create a friction in their ability to set prices, interest rates and exchange rates ? 4.5 Acceptance and Legal Tender Many have argued against various aspects of MMT and related theories from a chartalist root. One of the key aspects they point to relates to the notions of legal tender. For instance, ?and? emphasized legal tender laws as critical, where the state or government would issue a currency in 18 terms of a unit of account and then pass laws to require adoption of that currency in designated public and private payments. This is a jurisprudence perspective of how currency can become valuable in a real economy, however chartalists like Knapp [1924] took an alternative view that such laws would not suce and that the state or government e ectively establishes the money of account when it determines what will be \...accepted at public pay oces...", rather than through legislation. Hence, we see that an important point to note that is directly of consequence to understanding a chartalist's view of virtual currency and crypto-currency is to observe that the chartal nature of money and its acceptance in the real economy lies not in its acceptance in the form of a legal tender status but instead on its place in the heirarchy order of social debt relationships. This derives instead from the states power to delegate taxes and dictate how and in what form of money such accounts will be paid. Therefore, under a chartalists view on monetary theory it is not a question of whether at currency is in direct competition with virtual or crypto-currencies, but instead whether there will be sucient demand from the public that will enforce the will of the public to push the state to accept such currency forms as means of payment of liabilities owed to the government. Should this occur, there will then be an interesting circumstance arising where one unit of account is established in a at currency which is under the control of the government, however a second unit of account is from a decentralised money supply mechanism in the form of crypto-currency. We point out that has potential to change dynamics in the supply and demand of at currency and should be considered further. 4.6 Competition between virtual/crypto-currencies and at backed cur- rencies Another interesting point to make that arises naturally from a chartalist view and relates to virtual and crypto-currencies in regards to the concern some have raised about such monies competing and perhaps becoming a dominant unit of barter in an economy is that agents can never simply refuse to take a sovereign's money. That is, at currency is the key money to make payment for taxation liabilities, so long as there is always taxation present in the economy, which in some form relies upon the at currency more than the virtual or crypto-currency. In this case, the at currency will always remain at the top of the hierarchy of social order in terms of debt relationships, see further discussion on this general view in Tcherneva [2006]. The only issue arising in such cases is again the fact that when virtual and crypto-currencies are allowed into the economy to pay tax they diminish the power of the state to posses and maintain unconditional control of the currency, that they would maintain if they only allowed for receipt of tax credit their own unit of money or at currency. Consequently another issue arises here that potentially complicates the above considerations, this is the one pointed out by Innes Innes [2004] where it is argued that it is not only the requirement to pay taxes in any particular state mandated monies, but also the diculty in obtaining these monies that provide the monies worth. To understand where this may pose a challenge to at currencies, one needs to consider the situation in which at money and virtual and crypto-currencies are allowed in the economy (perhaps not as legal tender) but to settle tax debt in government oces. In this case, if it is perceived by the public that certain attributes, for instance privacy features of virtual currencies or crypto-currencies are more valued that those of at denominated e-money, then it may be conceivable that these would have preference in the economy. Now add to this the scarcity of such bitcoin monies in terms of the hard limit on their physical creation, unlike government money which is only really limited by in ationary pressures in the given economy and one has an interesting question to postulate relating to which form of currency and in what conditions would maintain the top heirarchy in terms of social debt settlement unit. 19 4.7 Not high powered money and yet somehow explicitly liability free ? Consider the context of a modern economy with a fractional banking system in place. In such an economy, a bank recognizes that it is safe to issue deposits to an amount that is some multiplier of its actual physical reserves since it may be reasonable to expect that only a small fraction of depositors will try to "cash-out" deposits, redeeming them for reserves. Then, under the setting in which a reasonably stable deposit multiplier is established as a function of the ratio of reserves held against deposits, the supply of deposits will then be determined by the quantity of loans demanded and the quantity of reserves supplied. One can then consider the role of governments in controlling this process, they are e ectively able to exert some measure of control by deciding what should form the basis of reserves and also by establishing a legally required reserve ratio. At some stage this corresponded to the gold standard and now days has moved instead to government at money sometimes known as a form of High Powered Money. Since the government then has the ability to control the at money supply i.e. a seigniorage in the real economy, they then naturally obtain a level of control in the economy since banks will continue to have a demand for such currency in order to increase the value of their loan books, which is constrained by their ability to accumulate reserves and a reserve ratio condition on lending. Hence, a modern economy revolves around a money supply that consists of bank deposits plus the portion of high powered money created by government that is not held by banks as reserves. Even though the banks may exert some level of control on the amount of at money help by the general public by adjusting interest rates on deposits to induce them to deposit or spend at money, however the government with its control of high powered money supplies to banks and it setting of reserve ratios, exerts exogenously a pressure on banks and ultimately the money supply. Hence, another point worth questioning is the role of these exogenous currencies like virtual and crypto-currencies which are not created by central banks or private banks. Somehow they are liability free in some sense and yet they may not be considered in the Neo-Chartalists view as High Powered Monies, issued by central banks for spending in the private sector to fuel taxation generation and value creation in at currency. Unlike the view that although banks can also create money, their creation is a \horizontal transaction" since such created credit or money does not increase net nancial assets since these assets are o set by liabilities. However, this is not the case with virtual and crypto-currencies, in addition, if they were allowed as monies to make payment for taxes and nes from a given government, then their legal power to discharge debt would increase their worth. This may cause a friction with the at denominated e-money system, since unlike at e-money which is issued or controlled by the government where it can issue its own currency at will subject to a public liability in the countries accounts appearing as a de cit in the countries accounts, it has no control over the issuance of the virtual or crypto-currencies except that which it may exert should it store signi cant reserves of such currencies in the central bank. This may therefore in principle, should virtual currencies become more mainstream act as a problem for the universality of the policy tool governments have utilised for years based on their universal monopoly of money creation that regulates in ation and unemployment. In continuation of these above lines of questioning, one would wonder about the government or states ability to utilise money creation and taxation to control the rate of spending in the economy and therefore the ability to ful ll, as Lerner [1943] puts it, \...to ll its two great responsibilities, the prevention of depression, and the maintenance of the value of money". If virtual currency or crypto- currency were to be admitted as viable tender to pay tax to the government, then such currencies may diminish the standard monetary controls available to the government, since currency creation is no longer the sole mandate of the government, it would therefore require some form of symbiotic relationship with the at money supply and the virtual or crypto-currency supply to maintain the status quo. A fact that has not been lost on central banks over the years as early forms of e-money 20 and non- ate monies arose. One last point to make about the notion of liabilty in the case of virtual and crypto-currencies is perhaps that they are implicitly creating liabilities. This can be seen in the case that in the creation of such currencies through the mining process, the mines require utilisation of resources, loans/credit agreements with banks in creation of resources required to run and setup such mines, meaning the implicitly the creation of such currency, though explicitly it seems liability free, is actually implicitly not free of liability. 5 Views on crypto-currency from a regulation perspective Given the importance of understanding the role of crypto-currencies in the monetary system high- lighted above, we now turn to another core element that must be considered should such currencies be utilised increasingly in the real economy, the role of regulation. A detailed account of several aspects of regulation response to crypto-currencies can be found in Peters et al. [2014]. Even before the advent of crypto-currencies, there have been concerns about how centralised virtual currencies may limit a country's ability to control in ationary pressures. The Chinese Q-coin was adopted widely as a form of payment by online entrepreneurs, i.e. outside the online messaging environment which it was created for. The Chinese central bank, citing concerns about an increased money supply outside of its control, as well as a diculty in imposing taxation, enacted limits in the issuance of these currencies Lehdonvirta & Castronova [2014]. A number of regulators around the world have been devoting an increasing amount of attention to virtual and crypto-currencies in recent years. Mitchell [2014] outlines the responses of several regulators, from which one can observed that there are both varied interpretations of crypto-currency (e.g. as e-money, private money20, as a commodity or private property, or as a private unit of account), which informs their treatment from a taxation perspective also. In most regulatory responses to virtual currencies in Europe, Bitcoin has not been found to ful ll the criteria/de nitions of a currency. Sweden however has required virtual currency exchanges to register with the nancial supervisor, while Germany and France have declared that certain Bitcoin related activities are subject to authorisation. There is no uni ed approach to regulation of such virtual currencies as payment services within the EU, and the European Central Bank (ECB) has not expressed any intention to amend the current legal framework to incorporate such considerations. We will discuss in a little more detail the recent responses of the ECB and the UK's HM Treasury, who have both conducted surveys about the use, bene ts and risks of virtual currencies, as well as the New York Federal Reserve's recently released detailed regulatory framework. In November 2014, HM Treasury in the UK issued a call for information, attracting over 120 responses from diverse participants, including banks, payment service providers and digital currency developers. Results were published in March 201521. Bene ts of digital currencies include lower costs and faster, 24 hour processing availability, particularly for cross-border transactions. The risk side of these advantages are limited controls over transactions, theoretically allowing very large international transfers, with no capacity for the authorities to freeze or reverse payments, given the irreversibility of transactions in virtual currencies. The ECB has been actively considering monetary policy implications resulting from the intro- duction centralised virtual currencies and decentralised crypto-currencies since at least 2012. In its rst report22it noted that both virtual currencies and crypto-currencies fall under the responsibility 20Bitcoin has been recognized by the German Finance ministry as a unit of account, and is thus treated as a type of private money. http://www.spiegel.de/international/business/ germany-declares-bitcoins-to-be-a-unit-of-account-a-917525.html 21https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/414040/digital_ currencies_response_to_call_for_information_final_changes.pdf 22https://www.ecb.europa.eu/pub/pdf/other/virtualcurrencyschemes201210en.pdf 21 of central banks, due to the characteristics shared with payments systems, it highlighted the lack of supervision and concluded that they did not pose a risk to nancial stability. In its more recent study23,, it suggested thatd ue to its high price volatility and low acceptance rate, the Bitcoin could not be, yet at least, regarded as a full form of money from an economic perspective. The ECB revised its de nition of virtual currency as `a digital representation of value, not issued by a central bank, credit institution or e-money institution, which, in some circumstances, can be used as an alternative to money'. Despite the slow uptake of virtual currencies, the ECB also has stated its intention to monitor possible threats to monetary policy and nancial stability, in the case where virtual currencies gain mainstream acceptance. It suggests that this would be possible for a new generation of virtual currencies which address current technical weaknesses and are geared towards a more mainstream, less technologically minded audience. With regards to enacting regulation, the UK govenment has thus set out a series of steps, which will include AML regulation pertaining to digital currency exchanges in the UK, to ensure that law enforcement bodies have the capabilities required to combat criminality in the digital currency space. More interventionist maybe than its European counterparts, the New York Department of Financial Services (NYDFS) has recently released the BitLicense regulatory framework, after approximately 2 years of consultation24The regulation sets out de nitions for virtual currencies activities, which include: receiving virtual currency for transmission or transmitting virtual currency; storing, holding, or maintaining custody or control of virtual currency on behalf of others; buying and selling virtual currency as a customer business; performing exchange services as a customer business; or controlling, administering, or issuing a virtual currency. Any individual or corporation engaged in the aforementioned activities is required to obtain a license to do so. This entails the completion of a lengthy application form25and a $5000 fee. The regulation is far-reaching and there have already been rms that have either withdrawn their New York operations, or shut down altogether, citing excessive compliance burdens26. The Law Library of Congress has compiled a list of regulatory responses besides the ones detailed above27. Outside of the EU and the US, regulatory activity regarding crypto-currency usage has mostly been limited to warning about its nature as a non-state-backed currency and its price volatility. There are a number of exceptions however, as China has banned nancial institutions from handling bitcoin, while Japan has stated that `due to their intangible nature and reliance on third parties', bitcoins are e ectively not subject to ownership, and thus are not covered by existing regulation28. On the other hand, the Australian Senate will e ectively put forward recommendations to treat Bitcoin as money, as treating Bitcoin as a tradeable commodity would have created a double taxation e ect29. 23www.ecb.europa.eu/pub/pdf/other/virtualcurrencyschemesen.pdf 24The nal text of the regulatory framework is available at http://www.dfs.ny.gov/legal/regulations/ adoptions/dfsp200t.pdf . 25http://www.dfs.ny.gov/legal/regulations/vc_license_application.pdf 26http://cointelegraph.com/news/114623/bitlicense-doing-its-job-eobot-becomes-3rd-firm-gone-from-new-york 27http://www.loc.gov/law/help/bitcoin-survey/regulation-of-bitcoin.pdf 28http://www.japantimes.co.jp/news/2015/08/06/national/crime-legal/bitcoins-lost-in-mt-gox-debacle-not-subject-to-ownership-claims-tokyo-court-rules/ \#.VctCRLwy3CK 29http://www.reuters.com/article/2015/08/05/us-australia-bitcoin-idUSKCN0QA0TS20150805 22 A common theme in recent regulatory responses is that they have identi ed that more promising perspectives of virtual currencies may actually lie in the technology they use, i.e. the distributed ledger technologies introduced in Section 3.4. The term `virtual currency scheme' also encom- passes the technologies and mechanisms used for the operation of transactions in the currency. The UK government, whilst identifying barriers that would prevent digital currencies from gaining widespread acceptance, has also identi ed the associated blockchain, or distributed ledger technol- ogy as having promise for the future of payments. Following the survey of HM Treasury, it has set out a series of recommendations to provide funding to research bodies to explore opportunities for digital currency technology. 6 Conclusions Our report highlights current trends in the virtual and crypto-currency space, from a number of di erent perspectives. The rst is the emergence of such currencies, given the historical context of at money and the advent of cryptographic protocols that enabled e-money. We show that from this perspective, virtual currencies emerged to serve the need of particular niches of online gaming and social communities, while crypto-currencies sought to have a wider reach, and become the de facto currencies of the internet. Given these goals and the much greater probability for decentralised crypto-currencies to start entering the real economy, we focus on these to present current usage trends. Though to date, even the most popular crypto-currency, Bitcoin, has not gained widespread acceptance, while its use as an investment product has also remained low. It is believed that this will change as a greater understanding of these crypo-currencies occurs by regulators, exchanges and businesses in the economy. We hope to have contributed to this discussion by highlighting several aspects of monetary theory and the role of virtual and crypto-currencies in such theories. Finally, we summarised current regulatory responses, showing the varied reaction to Bitcoin, from outright bans in China to e ective treatment as money in Australia. The decentralised nature of the currency means that there is limited e ect any single jurisdiction can have on the operation currency itself, and the focus is on companies providing services in the eld. Given the border- less nature of Bitcoin, however, it is dicult to see how regulators can prevent companies taking advantage of regulatory arbitrage, by setting up in jurisdictions with less restrictions. Funding The support of the Economic and Social Research Council (ESRC) in funding the Systemic Risk Centre is gratefully acknowledged [grant number ES/K002309/1]. References Al-Laham, Mohamad, Al-Tarawneh, Haroon, & Abdallat, Najwan. 2009. Development of electronic money and its impact on the central bank role and monetary policy. Issues in Informing Science and Information Technology ,6, 339{349. Barber, Simon, Boyen, Xavier, Shi, Elaine, & Uzun, Ersin. 2012. Bitter to betterhow to make bitcoin a better currency. Pages 399{414 of: Financial cryptography and data security . Springer. Blanchette, Jean-Fran cois. 2011. A material history of bits. Journal of the American Society for Information Science and Technology ,62(6), 1042{1057. B ohme, Rainer, Christin, Nicolas, Edelman, Benjamin, & Moore, Tyler. 2015. Bitcoin: Economics, Technology, and Governance. The Journal of Economic Perspectives ,29(2), 213{238. 23 Brito, Jerry, Shadab, Houman, & Castillo, Andrea. 2014. Bitcoin Financial Regulation: Securities, Derivatives, Prediction Markets, and Gambling. Colum. Sci. & Tech. L. Rev. ,16, 144. Carroll, John M, & Bellotti, Victoria. 2015. Creating Value Together: The Emerging Design Space of Peer-to-Peer Currency and Exchange. Pages 1500{1510 of: Proceedings of the 18th ACM Conference on Computer Supported Cooperative Work & Social Computing . ACM. Chaum, David. 1985 (July 16). Cryptographic identi cation, nancial transaction, and credential device . US Patent 4,529,870. Chaum, David. 1992. Achieving electronic privacy. Scienti c american ,267(2), 96{101. Chaum, David L. 1988 (July 19). Blind signature systems . US Patent 4,759,063. Christin, Nicolas. 2013. Traveling the Silk Road: A measurement analysis of a large anonymous online marketplace. Pages 213{224 of: Proceedings of the 22nd international conference on World Wide Web . International World Wide Web Conferences Steering Committee. Drehmann, Mathias, Goodhart, Charles, & Krueger, Malte. 2002. The challenges facing currency usage: will the traditional transaction medium be able to resist competition from the new tech- nologies? Economic Policy ,17(34), 193{228. Eyal, Ittay, & Sirer, Emin G un. 2014. Majority is not enough: Bitcoin mining is vulnerable. Pages 436{454 of: Financial Cryptography and Data Security . Springer. Forstater, Mathew. 1999. Functional nance and full employment: lessons from Lerner for today. The Jerome Levy Economics Institute Working Paper . Friedman, Milton. 1960. A program for monetary stability . Vol. 541. Fordham University Press New York. Graf, Konrad S. 2015. Commodity, scarcity, and monetary value theory in light of bitcoin. Prices & Markets ,3(3), 52{69. Halpin, Ruth, & Moore, Roksana. 2009. Developments in electronic money regulation{the Electronic Money Directive: A better deal for e-money issuers? Computer Law & Security Review ,25(6), 563{568. Ingham, Geo rey. 2000. Babylonian madness: on the historical and sociological origins of money. What is money ,1, 16{41. Ingham, Geo rey. 2004. The Emergence of Capitalist Credit Money. Credit and state theories of money: The contributions of A. Mitchell Innes , 173. Innes, A Mitchell. 2004. The Credit Theory of Money. Credit and State Theories of Money: The Contributions of A. Mitchell Innes , 50. J.P. 2011. Bits and bob. The Economist, http://www.economist.com/blogs/babbage/2011/06/virtual- currency ,June . Keynes, John Maynard. 1930. A Treatise on Money: In 2 Volumes . Macmillan & Company. King, Sunny. 2013. Primecoin: Cryptocurrency with prime number proof-of-work. July 7th . Knapp, Georg Friedrich. 1924. The State Theory of Money [1905] . 24 Lehdonvirta, Vili, & Castronova, Edward. 2014. Virtual economies: Design and analysis . MIT Press. Lerner, Abba P. 1943. Functional nance and the federal debt. Social research , 38{51. Lipsey, Richard, & Chrystal, A. 2011. Economics . OUP Oxford. MacCarthy, Mark. 2010. What payment intermediaries are doing about online liability and why it matters. Berkeley Tech. LJ ,25, 1037. Maurer, Bill, Nelms, Taylor C, & Swartz, Lana. 2013. When perhaps the real problem is money itself!: the practical materiality of Bitcoin. Social Semiotics ,23(2), 261{277. Mitchell, Kathryn. 2014. Bitcoin from the beginning: nancial law. Without Prejudice ,14(2), 61{62. Moser, Michael, Bohme, Rainer, & Breuker, Dominic. 2013. An inquiry into money laundering tools in the Bitcoin ecosystem. Pages 1{14 of: eCrime Researchers Summit (eCRS), 2013 . IEEE. Nakamoto, Satoshi. 2008. Bitcoin: A peer-to-peer electronic cash system. O'Dwyer, Karl J, & Malone, David. 2014. Bitcoin mining and its energy footprint. Peters, Gareth William, Chapelle, Ariane, & Panayi, Efstathios. 2014. Opening discussion on banking sector risk exposures and vulnerabilities from virtual currencies: An operational risk perspective. Available at SSRN 2491991 . Sifers, Randall W. 1996. Regulating Electronic Money in Small-Value Payment Systems: Telecom- munications Law as a Regulatory Model. Fed. Comm. LJ ,49, 701. Swan, Melanie. 2015. Blockchain: Blueprint for a New Economy . O'Reilly Media, Inc. Tcherneva, Pavlina R. 2006. Chartalism and the tax-driven approach to money. A Handbook of Alternative Monetary Economics ,69. Wray, L Randall. 1998a. Money and taxes: the chartalist approach. Jerome Levy Economics Institute Working Paper . Wray, L Randall. 1998b. Understanding modern money: the key to full employment and price stability . Vol. 26. Edward Elgar Cheltenham. Wray, L Randall. 2000. The neo-chartalist approach to money. Available at SSRN 1010334 . 25
{ "id": "1508.04364" }
2007.11877
Proposal for a Comprehensive (Crypto) Asset Taxonomy
Developments in the distributed ledger technology have led to new types of assets with a broad range of purposes. Although some classification frameworks for common instruments from traditional finance and some for these new, so called cryptographic assets already exist and are used, a holistic approach to integrate both worlds is missing. The present paper fills this research gap by identifying 14 attributes, each of which is assigned different characteristics, that can be used to classify all types of assets in a structured manner. Our proposed taxonomy which is an extension of existing classification frameworks, summarises these findings in a morphological box and is tested for practicability by classifying exemplary assets like cash and bitcoin. The final classification framework can help to ensure that the various stakeholders, such as investors or supervisors, have a consistent view of the different types of assets, and in particular of their characteristics, and also helps to establish standardised terminology.
http://arxiv.org/pdf/2007.11877v1
Thomas Ankenbrand, Denis Bieri, Roland Cortivo, Johannes Hoehener, Thomas Hardjono
q-fin.GN
q-fin.GN
Proposal for a Comprehensive (Crypto) Asset Taxonomy Thomas Ankenbrand & Denis Bieri, Lucerne University of Applied Sciences and Arts; Roland Cortivo & Johannes Hoehener, Swisscom AG; Thomas Hardjono, MIT Connection Science July 24, 2020 Abstract —Developments in the distributed ledger technology have led to new types of assets with a broad range of purposes. Although some classification frameworks for common instru- ments from traditional finance and some for these new, so- called cryptographic assets already exist and are used, a holistic approach to integrate both worlds is missing. The present paper1 fills this research gap by identifying 14 attributes, each of which is assigned different characteristics, that can be used to classify all types of assets in a structured manner. Our proposed taxonomy, which is an extension of existing classification frameworks, summarises these findings in a morphological box and is tested for practicability by classifying exemplary assets like cash and bitcoin. The final classification framework can help to ensure that the various stakeholders, such as investors or supervisors, have a consistent view of the different types of assets, and in particular of their characteristics, and also helps to establish standardised terminology. I. I NTRODUCTION Since the inception of the Bitcoin network in the year 2009, the space for cryptographic assets has developed rapidly. The continuing technological innovation in the underlying distributed ledger technology could consequently lead to an increasing transformation of traditional financial markets into crypto-based markets. Although different asset classification frameworks exist for both worlds, a holistic approach merging both traditional finance and the crypto economy is still lacking. This poses a challenge to the various stakeholders such as investors or regulators in retaining an overview of existing assets of different types and, in particular, of their design and individual characteristics. In order to fill this lack of research, we propose a taxonomy for the systematic classification of all types of assets, be it of physical, digital or tokenised nature. II. L ITERATURE REVIEW The characteristics and properties of the most common types of financial instruments such as stocks, bonds, and derivatives have been the subject of research for some time, not only in the academia, but also in the industry. Therefore, a wide range of publications exist that deal with the functioning of these different instruments in a structured way. One framework defining the structure and format for the classification of financial instruments (CFI) was first proposed by the International Organization for Standardization (ISO) in the year 1997. The last revised version of the framework is 1Our research is part of the FinTech programme supported by Finnova, Inventx, Swiss Bankers Prepaid Services, and Swisscom.called ISO 10962:2019 and was published by ISO in 2019. It seeks to provide a standard for identifying the type of financial instrument and its main high-level features in the form of specific codes consisting of six alphabetical characters, and should thus help to standardise country and institution-specific terminology in relation to financial instruments [1]. The first character of the CFI code indicates the main category of financial instruments. These include equities, collective investment vehicles, debt instruments, different types of derivatives, and others.2The second character of the CFI code indicates multiple subclasses in a given main category, called groups. Equities, for example, are divided into the groups common/ordinary shares, preferred/preference shares, and common/ordinary convertible shares, among other groups. The last four characters of the CFI code define the specific attributes of a financial instrument and depend on the group to which the asset is allocated. For financial instruments in the group common/ordinary shares from the “equities” main category, relevant attributes include voting rights, ownership, payment status, and form. These attributes come with predefined possible values that determine the final code of a financial instrument [1]. For other groups such as bonds from the “debt instruments” category, alternative attributes, e.g., the type of interest or guarantee, are of relevance. A second framework for classifying financial instruments is proposed by Brammertz and Mendelowitz [2]. Their so-called ACTUS taxonomy is based on the specific nature of financial contracts and in particular on their cash flow profiles and seeks to create a global standard for the consistent representation of financial instruments. It distinguishes between financial contracts, which in turn are split into the subcategories of basic contracts and combined/derivatives contracts on the one hand, and credit enhancement on the other. Basic contracts consist of fixed income and index-based products, whereas combined/derivative contracts comprise symmetric financial products, options, and securitisation products. The second main category of the ACTUS taxonomy, i.e., credit enhancement, includes guarantee contracts, collateral contracts, margining contracts, and repurchase agreements. The standard is implemented on the SolitX platform with a technical API layer and DLT adapter for transaction systems and accounting, and in the AnalytX architecture for risk management analysis, simulations, asset and liability management, and business planning [3]. The standards proposed by [1] and [2] show that sophisticated classification frameworks for traditional financial assets exist, which are used in practice. For cryptographic assets, on the contrary, the characteristics of many tokens in various respects, for example in terms of regulation, utility or valuation, were and are still largely ambiguous and hard to measure. Several initiatives from governments, the academia, and the industry have sought to reduce these uncertainties 2For a detailed description of each category, see [1]. 1arXiv:2007.11877v1 [q-fin.GN] 23 Jul 2020 by systematically structuring the hundreds of existing tokens based on predefined criteria. The Swiss Financial Market Supervisory Authority (FINMA), for example, issued guidelines for enquiries regarding the regulatory framework for initial coin offerings in early 2018, in which it distinguishes between three types of tokens, i.e., payment tokens, utility tokens, and asset tokens, based on the underlying economic purpose [4]. Whether a particular token is a financial instrument and thus would be subject to certain laws and regulations depends on its economic function and the rights associated with it. Other jurisdictions, such as the European Union, Israel, Malta, and the United Kingdom, follow a similar classification approach, although their terminologies differ to some extent [5]. Additionally, some jurisdictions follow the approach that the three main types of tokens are not necessarily mutually exclusive. Rather, there are also hybrid forms that share characteristics of two or three main types. Accordingly, particular cryptographic assets could thus, for example, have certain characteristics of both payment and utility tokens. In April 2019, the U.S. Securities and Exchange Commission (SEC) through its strategic hub for financial innovation, FinHub, published guidelines to determine whether a digital asset, which may be a cryptographic asset, is an investment contract, i.e. an agreement whereby one party invests money in a common enterprise with the expectation of receiving a return on investment. This assessment is done by applying the so-called Howey test. If an investment agreement exists, the digital asset is classified as a security and therefore U.S. federal securities laws apply and must be considered by issuers and other parties involved in, for example, the marketing, offering, sale, resale or distribution of the respective asset [6]. Other jurisdictions, e.g., Ireland, follow a similar approach of classifying cryptographic assets based on their qualification as a security [7]. However, the Howey Test is to be understood less as a classification framework but more as a decision aid as to whether a cryptographic asset represents a security or not. An academically based classification framework for cryptographic assets, which goes beyond the legal perspective and also takes technological and economic aspects, among others, into account was carried out by Oliveira et al. [8]. By applying a design science research approach, including 16 interviews with representatives of projects with blockchain- based token systems, the paper derives a token classification framework for cryptographic assets that can be used as a tool for better informed decision making when using tokens in blockchain applications. Their final classification framework consists of the 13 attributes class, function, role, representation, supply, incentive system, transactions, ownership, burnability, expirability, fungibility, layer, and chain, each of which include a set of defined characteristics. A similar framework was developed by Ballandies et al.[9]. The authors established a classification framework for distributed ledger systems consisting of a total of 19 descriptive and quantitative attributes with four dimensions (distributed ledger, token, action, and type). The attributes comprise the distributed ledger type, origin, address traceability, Turing completeness, and storage in the distributed ledger dimension, underlying, unconditional creation, conditional creation, transferability, burn, and supply in the token dimension, action fee, read permission, and actor permission in the action dimension, and fee, validate permission, write permission, proof, and type in the consensus dimension. The framework was derived from feedback from the blockchain community. Three further classification frameworks for cryptographic assets that were strongly driven by the industry are those proposed by the consulting firm MME, the International Token Standardization Association (ITSA), and the Ethereum Enterprise Alliance (EEA). The framework by MME was published in May 2018 and focuses on the legal properties and risk assessment of cryptographic assets. The paper’s resulting classification is based on a token’s function or main use, alongside other criteria such as the existence of a counterparty, as well as its type and/or the underlying asset or value. The final archetypes of cryptographic assets are native utility tokens, counterparty tokens, and ownership tokens, which are each subject to additional subcategories of token types [10]. The International Token Classification (ITC) framework by the ITSA comprises an economic, technological, legal, and regulatory vertical each containing a set of subdimensions with different attributes. The economic and technological verticals include three subdimensions each, which refer to a token’s economic purpose, its target industry, and the way of distribution, and the technological setup, consensus mechanism, and technological functionality, respectively. The legal vertical includes the two subdimensions legal claim and issuer type, whereas the regulatory vertical focuses on assessing a tokens regulatory status in the US, China, Germany, and Switzerland. Over all verticals, a total of twelve subdimensions are defined, though ITSA plans to define further subdimensions in the future. Concerning the evaluation of these individual subdimensions, as of September 2019, the ITC framework already provided detailed information on four of the twelve subdimensions, namely for the economic purpose, industry, technological setup, and legal claim. The classification into these four subdimensions was compiled in a database covering more than 800 cryptographic tokens. Besides the classification framework and the corresponding database, the ITSA also introduced a nine digit unambiguous identifier for each token, the so-called International Token Identification Number, short ITIN [11]. 2 The third industry-driven framework for classifying crypto- graphic tokens was published by the EEA in November 2019. Their proposed Token Taxonomy Initiative (TTI) distinguishes between five characteristics a token can possess. The first characteristic is the token type and refers to whether a token is fungible or non-fungible. The second characteristic, the token unit, distinguishes between the attribute of being either fractional, whole or singleton and indicates whether a token is subdivisible or not. The value type, as the third characteristic, can assume the attribute of being either of an intrinsic value, i.e., the token itself is of value (e.g., bitcoin), or a reference value, i.e., the token value is referenced elsewhere (e.g., tokenised real estate). Characteristic four, the representation type, comprises the attribute of being common or unique. Common tokens, on the one hand, share a single set of properties, are not distinct from one another and are recorded in a central place. Unique tokens, on the other hand, have unique properties and their own identity, and can be traced individually. The fifth and last characteristic is the template type and classifies tokens as either single or hybrid and refers to any parent/child relationship or dependencies between to- kens. Unlike single tokens, hybrid tokens combine parent and child tokens in order to model different use cases. In addition, the TTI provides measures in order to promote interoperability standards between different blockchain implementations [12]. III. T HE(CRYPTO ) ASSET TAXONOMY Building on the literature review in Chapter II, this chapter proposes a holistic framework for the classification of assets. Unlike existing classification frameworks, our asset taxonomy aims to classify all existing types of assets, i.e., assets from both traditional finance as well as the crypto economy, based on their formal characteristics. Furthermore, the taxonomy introduces a terminology that is suitable for both traditional and the crypto assets. A morphological box is chosen as the methodological approach in order to be able to take the multi-dimensionality of the matter into account. The taxonomy is illustrated in Appendix A. In total, we identify 14 different attributes based on which all types of assets can be classified. They include claim structure, technology, underlying, consensus/validation mechanism, legal status, governance, information complexity, legal structure, information interface, total supply, issuance, redemption, transferability, and fungibility, with each attribute comprising a set of at least two characteristics. Note that certain attributes in the frameworks discussed in Chapter II subsume some of the attributes presented here. Hence, our 14 attributes factorize these superordinate attributes to make them universally applicable. Table I breaks down the 14 attributes in terms of their inclusion in the publications discussed in Chapter II. The first column shows the attribute labels of the taxonomy we propose. Column two to ten refer to the publications discussed, where an “x” indicates that the corresponding attribute is either explicitly or implicitly considered in the classification framework given in row one. Note that the terminology regarding a particular attributediffers across these publications, for example, because they focus on different types of assets. The terminology we propose generalises these terms to ensure compatibility across all types of assets, thus creating a common linguistic understanding. Also note that due to the extension of the taxonomy to traditional assets, some DLT-specific attributes/characteristics in the publications discussed are summarised or generalised, while new attributes/characteristics were added in order to enable the mapping of traditional asset types. Overall, Table I shows that each of the existing frameworks covers certain attributes determined by the specific focus or objective of the publication. The framework of FINMA [4], for example, focuses on regulatory aspects, and thus predominantly includes corresponding attributes, i.e., claim structure, legal status, and legal structure. Other frameworks, for example the one published by the EEA [12], focus more on technological aspects or the design of token features. Overall, none of the frameworks discussed in Chapter II covers the full range of formal attributes identified in our taxonomy. However, our taxonomy is generally confirmed by the existing literature, as each attribute is considered in at least one of the existing classification frameworks. The degree of agreement with the classification framework we propose varies, however. While the publication of ISO [1] covers four attributes of our taxonomy, the publications of Oliveira et al. [8] and Ballandies et al. [9] cover ten. There are also differences in coverage from an attribute perspective. While the underlying of an asset is of relevance in all frameworks analysed, the attributes information interface and fungibility are only covered by two. The taxonomy we propose therefore goes further than the existing classification frameworks, firstly because it is independent of the type of assets to be classified and secondly because it contains additional attributes and characteristics. Since some of these attributes and characteristics are not intuitively clear, they are explained in more detail in the following: Claim structure: Does the asset represent a claim, i.e., a demand for something due or believed to be due [13]? – No claim(s): The asset does not represent any kind of claim. – Flexible claim(s): The asset represents certain claims, the possession or exercise of which can depend on certain conditions (e.g., catastrophe bonds). – Fixed claim(s): The asset represents claims which can neither be restricted nor restrained under any condition (e.g., fixed income). Technology: Which technology is the asset based on? – Physical: The asset exists in a physical form (e.g., gold bullion). – Digital: The asset exits in a digital form, but is not based on the distributed ledger technology (e.g., electronic share). – Distributed ledger technology: The asset is based on the distributed ledger technology, structured either as a native 3 Table I: Coverage of the 14 attributes in existing classification frameworks Attribute ISO [1]B.&M. [2]FINMA [4]O. et al. [8]B. et al. [9]MME [10]ITSA [11]EEA [12] Claim structure x x x x x x Technology x x x x x x Underlying x x x x x x x x Consensus/Validation mechanism x x x Legal status x x x x Governance x x x Information complexity x x x Legal structure x x x x Information interface x x Total supply x x x x Issuance x x x x Redemption x x x x Transferability x x x x x Fungibility x x token, i.e., a token that is native to a specific blockchain, or as a protocol token, i.e., a token issued on an existing blockchain protocol [8] such as, for example, ERC-20 or ERC-721 tokens for the Ethereum blockchain. Underlying: Which underlying or collateral is the asset’s value based on? – No underlying: The asset’s value is not a derivative of an underlying asset (e.g., bitcoin). – Company: The asset’s value represents a stake in a company (e.g., equity). – Bankable asset: The asset’s value represents a bankable asset, i.e., an asset that can be deposited in a bank or custody account (e.g., fiat currencies). – Cryptographic asset: The asset’s value represents a cryp- tographic asset, i.e., an asset based on the distributed ledger technology (e.g., derivative of a cryptographic asset). – Tangible asset: The asset is in a physical form [14] (e.g., real estate). – Contract: The asset’s value represents a contract (e.g., license agreement). Consensus-/Validation-mechanism: How is the agreement on the finality (e.g., property rights or ownership transfer) of the asset reached? – Instant finality: Consensus is final. Mechanisms that typically, but not necessarily, belong to the deterministic type are, for example, notary services or qualified written form. – Probabilistic finality: Consensus is not final, but reached with a certain level of confidence. Mechanisms that typically, but not necessarily, belong to the probabilistic type are, for example, proof-of-work or proof-of-stake.Legal status: What is the regulatory framework governing the asset? – Regulated: There are regulatory requirements for the issuance, redemption and governance of the asset. – Unregulated: There is no specific regulatory framework for the issuance, redemption and governance of the asset. Governance: In which way is the asset governed? – Centralised: The asset is governed by an authoritative party or consortium. – Decentralised: The asset is governed without centralised control (e.g., certain types of cryptographic assets such as bitcoin). Information complexity:3What type of information complex- ity is associated with the asset? – Value: The asset represents a specific value (e.g., curren- cies). – Contract: The asset encompasses conditional information in addition to its value (e.g., coupon bonds or DLT-based smart contracts4). – Turing completeness: The asset is based on a Turing- complete («universally programmable») computational model (e.g., Ethereum). Legal structure: What is the legal form of the asset? – No legal structure: There is no legal structure governing the asset. – Foundation: The asset is governed by a foundation/ trust structure. 3Note that the characteristics of this attribute build on each other, i.e., each characteristic contains additional information compared to the previous one. 4Note that such (smart) contracts, as in the case of bitcoin, are not necessarily based on a Turing-complete system. 4 – Note/bond: The asset is structured as a note or bond. – Share: The asset is structured as a share. – Other5: The asset has an alternative legal structure (e.g., central bank money). Information interface: How does the asset receive and/or send relevant information? – No interface: The asset has no kind of information interface. – Qualitative: The asset manages relevant information in- directly through an authorised instance (e.g., general assembly). – Quantitative: The asset manages relevant information from authorised sources automatically (e.g., IoT sources or oracle interfaces in the case of DLT-based smart contracts). Total supply: To which limit can the asset be generated? – Fixed: The total supply of the asset is fixed. – Conditional: The total supply of the asset is dependent on predefined conditions. – Flexible: The total supply of the asset is managed flexibly by authorised parties. Issuance: How is the asset generated? – Once: After an initial issuance, no additional units of the asset are issued. – Conditional: Additional units of the asset are issued once predefined conditions are met (e.g., newly issued cryptographic assets through mining). – Flexible: Additional units of the asset can be issued flexibly by authorised parties (e.g., increase in share capital). Redemption: How is the number of outstanding assets re- duced? – No redemption: The number of outstanding assets cannot be reduced. – Fixed: The reduction of the number of outstanding assets follows a predefined protocol. – Conditional: The reduction of the number of outstanding assets is initiated once predefined conditions are met. – Flexible: The reduction of the number of outstanding assets can be carried out flexibly by authorised parties (e.g., share buyback). Transferability: Can the asset’s ownership be transferred to another party? – Transferable: The asset’s ownership can be transferred to another party. – Non-transferable: The asset’s ownership cannot be trans- ferred to another party, for example, by sale or giveaway (e.g., some types of registered securities). 5The characteristic “Other” subsumes the broad range of alternative legal structures for reasons of simplicity and practicability.Fungibility: Can the asset be interchanged with another asset of the same type? – Fungible: The asset is substitutable with another asset of the same type. – Non-fungible: The asset is not substitutable with another asset of the same type (e.g., artwork). IV. C LASSIFICATION EXAMPLES This subchapter seeks to test the above-mentioned taxonomy with selected examples. First, the taxonomy is used to compare cash to bitcoin, as both are intended means of payment6. This comparison is followed by the classification of Ether, a utility token, Crowdlitoken, an asset token, CryptoKitties, and a traditional share. A. Comparison between Cash and Bitcoin As both cash and bitcoin follow the purpose of a means of pay- ment, both assets share certain similarities (see Appendix B). Neither cash, in the case of a fiat money system, nor bitcoin have a direct underlying asset. The value of the two assets is rather based on the public’s trust in the issuer of the currency or in the underlying technological protocol, respectively. There is also no oracle interface, i.e. no specific source that interacts (e.g., directly provides information) with cash or bitcoin. Since both assets are designed as cash equivalents, their units are transferable from one party to another and individual units are interchangeable. Besides these commonalities there are some significant differences. While cash represents a certain value which depends on the denomination, bitcoin is of contractual type as it is transferred via smart contracts in the Bitcoin- script which is not Turing-complete. Bitcoin is furthermore not subject to any type of legal claim and has no legal structure. In contrast, cash is regulated as legal tender under national law. Since cash is of physical form, consensus on its state is given deterministically by the owner of the asset. Bitcoin, on the contrary, is a digital representation of value based on the distributed ledger technology. It is the native token of the Bitcoin blockchain, the consensus of which is based on the proof-of-work mechanism and thus finality of the system is not guaranteed but only probabilistic. This implies a decentralised governance of the asset, which is in contrast to the centralised governance of cash by central banks. Both assets also differ in terms of their total supply as well as in their ways to manage the number of outstanding units. While the maximum supply of bitcoin is fixed at 21 million units, there is no such restriction for cash. The issuance of additional units of bitcoin is conditional on the mining of new blocks and reducing the number of outstanding units is not possible7. The issuance and redemption of cash, on the contrary, is handled flexibly by central banks. 6Bitcoin is often considered to be a store of value, but the original intention is to provide an alternative means of payment. 7It is possible to send units of bitcoin, or other cryptographic assets, to an address without a known private key, so that these units are no longer accessible. However, this does not reduce the number of total units in the system. 5 B. Ether Ether (see Appendix C), which is classed as a utility token, is the native token of the Turing-complete Ethereum platform which is governed by the Ethereum Foundation located in the Crypto Valley. The token itself is unregulated. Although multiple decentralised systems which can act as a quantitative oracle interface for the platform exist, there are no legal claims and no underlyings associated with the token. Consensus on the Ethereum platform is, at the time of writing, achieved based on the proof-of-work mechanism, and therefore is of a probabilistic nature. As a consequence, the governance of the token is decentralised. Like with bitcoin, the issuance of Ether tokens is conditional on the creation of new blocks, i.e., when miners get awarded with newly mined units, and the destruction of existing units is not possible. However, currently the total supply of Ether is not limited. All Ether tokens are transferable between parties and are fungible. C. Crowdlitoken Crowdlitokens (see Appendix D) are classed as asset tokens and are tokenised real estate bonds, regulated under the existing law. They are issued on the Ethereum Blockchain under the ERC-20 standard and represent a contract including fixed claims (e.g., voting and interest payment). The token value is derived from the fundamental value of the issuing company, and only indirectly by its real estate portfolio. Due to the underlying distributed ledger technology, consensus on the state of the tokens is not final but only probabilistic. Crowdl- itokens are structured as notes/bonds. They are governed in a centralised manner through a qualitative oracle interface since token holders are allowed to vote on changes proposed by the management. They can be issued and burnt (e.g., through token buybacks) flexibly by the corresponding company, implying a flexible token supply. The Crowdlitoken is both transferable and fungible, whereby only persons who have successfully completed the KYC/AML audits can subscribe to the bonds and exercise all rights relating to them. D. CryptoKitties CryptoKitties (see Appendix E), as the last example from the crypto space, are collectible digital representations of cats created on the Ethereum blockchain. The corresponding smart contracts can generate over four billion variations of phe- notypes and genotypes (CryptoKitties, 2019). CryptoKitties neither represent claims against a counterparty, nor a specific underlying. They are non-fungible - every cat is unique - but transferable ERC-721 tokens, without any regulatory or legal governance. Although the front-end as a traditional web app is managed by the development team, the token’s governance, e.g., ownership, is decentralised. Since consensus of the un- derlying Ethereum protocol is reached via a proof-of-work mechanism, the finality of the state of a CryptoKitties token is probabilistic. Also, there is no oracle interface related to CryptoKitties tokens. The creation of additional units is done by breeding two CryptoKitties, resulting in a new unique kitty, represented by a newly issued unique token, while destroyinga unit is not possible. The corresponding smart contract allows for a total limit of around four billion cats that can be bred, implying a fixed total supply. E. Traditional Share Traditional shares (see Appendix F), as the one example from traditional finance, are either physical or digital in nature and represent a contract including fixed claims (e.g., voting and/or profit participation) against a counterparty, with its fundamen- tal value also representing the underlying of the asset. Shares, as a legal form, are governed in a centralised manner and are subject to the existing law (e.g., national corporate law), with the general assembly of shareholders being the supreme organ of a stock corporation, i.e., acting as a qualitative oracle interface. Consensus on the state of a share is deterministically given by the share registry. The creation of new shares as well as the reduction in share capital, for example through share buybacks, is left to the general assembly of the corporation. As a consequence, the total supply of traditional shares is flexible. Shares are typically transferable, with exceptions such as restricted shares, and fungible, i.e., substitutable with other shares of the same company. V. C ONCLUSION Various classification frameworks for traditional and cryp- tographic assets already exist and are applied in practice. However, a universal approach linking the two worlds has not yet been developed. In this paper we fill this research gap by proposing a taxonomy that extends existing classi- fication frameworks. We identify 14 different attributes that are supported by the existing literature and by which each type of asset can be properly classified. These attributes include the claim structure, technology, underlying, consensus- /validation mechanism, legal status, governance, information complexity, legal structure, information interface, total supply, issuance, redemption, transferability, and fungibility. With the help of a morphological box, various possible characteristics that an asset can have are identified and assigned to these attributes. In this way, our taxonomy bridges the gap between physical, digital, and cryptographic assets, where sometimes the same asset can appear in all three forms, thus creating clear terminology. Thanks to the methodical approach, the individual attributes can be expanded or broken down at any level of detail without changing the overall framework. The classification of selected assets, such as cash and bitcoin, has also shown that the proposed taxonomy is applicable in practice. In a next step, the robustness and practical relevance of the taxonomy could be further tested, for example by interviewing experts in the field. 6 APPENDIX A ASSET TAXONOMY APPENDIX B CLASSIFICATION OF CASH (GREEN )AND BITCOIN (ORANGE ) 7 APPENDIX C CLASSIFICATION OF ETHER APPENDIX D CLASSIFICATION OF A CROWDLITOKEN TOKEN 8 APPENDIX E CLASSIFICATION OF A CRYPTO KITTIES TOKEN APPENDIX F CLASSIFICATION OF A TRADITIONAL SHARE 9 REFERENCES [1] International Organization for Standardization. (2019). Securities and related financial instruments — classifi- cation of financial instruments (cfi) code, 10962:2019, [Online]. Available: https://www.sis.se/api/document/ preview/80017455/ (visited on 03/25/2020). [2] W. Brammertz and A. I. Mendelowitz, “From digital currencies to digital finance: The case for a smart fi- nancial contract standard”, The Journal of Risk Finance , 2018. [3] Swisscom. (2019). Solitx: Smart financial contracts as a new approach to system support for banks, [Online]. Available: https : / / www . swisscom . ch / en / business / enterprise/themen/banking/solitx-smart-contracts.html (visited on 01/06/2020). [4] Swiss Financial Market Supervisory Authority FINMA. (2018). Ico guidelines, [Online]. Available: https : / / www . finma . ch / en / ~ / media / finma / dokumente / dokumentencenter / myfinma / 1bewilligung / fintech / wegleitung-ico.pdf?la=en (visited on 01/06/2020). [5] A. Blandin, A. S. Cloots, H. Hussain, M. Rauchs, R. Saleuddin, J. G. Allen, K. Cloud, and B. Z. Zhang, “Global cryptoasset regulatory landscape study”, Avail- able at SSRN , 2019. [6] The Law Library of Congress. (2018). Regulation of cryptocurrencyaround the world, [Online]. Available: https : / / www . loc . gov / law / help / cryptocurrency / cryptocurrency - world - survey . pdf (visited on 03/25/2020). [7] ——, (2019). Framework for “investment contract” analysis of digital assets, [Online]. Available: https : / / www . sec . gov / corpfin / framework - investment - contract - analysis - digital - assets # _ednref2 (visited on 03/26/2020). [8] L. Oliveira, L. Zavolokina, I. Bauer, and G. Schwabe, “To token or not to token: Tools for understanding blockchain tokens”, 2018. [9] M. C. Ballandies, M. M. Dapp, and E. Pournaras, “De- crypting distributed ledger design – taxonomy, classifi- cation and blockchain community evaluation”, Oct. 30, 2018. arXiv: 1811.03419v3 [cs.CY] . [10] L. Mueller, A. Glarner, T. Linder, S. Meyer, A. Furrer, C. Gschwend, and P. Henschel. (2018). Conceptual framework for legal and risk assessment of crypto tokens, [Online]. Available: https : / / www . mme . ch / fileadmin/files/documents/180501_BCP_Framework_for _ Assessment _ of _ Crypto _ Tokens_ - _Block _ 2 . pdf (visited on 01/06/2020). [11] International Token Standardization Association. (2019). Market standards for the global token economy, [Online]. Available: https : / / medium . com / @itsa_global/market-standards-for-the-global-token- economy-7d9f3d0cde37 (visited on 03/25/2020). [12] Enterprise Ethereum Alliance. (2019). Token taxon- omy framework overview, [Online]. Available: http:// tokentaxonomy.org/wp-content/uploads/2019/11/TTF- Overview.pdf (visited on 01/06/2020). [13] Merriam-Webster, “Claim”, in MERRIAM-WEBSTER ONLINE DICTIONARY , [Online]. Available: https : / / www.merriam-webster.com/dictionary/claim. [14] W. Kenton. (2019). Tangible asset, [Online]. Available: https://www.investopedia.com/terms/t/tangibleasset.asp (visited on 03/25/2020). 10
{ "id": "2007.11877" }
2410.01107
Count of Monte Crypto: Accounting-based Defenses for Cross-Chain Bridges
Between 2021 and 2023, crypto assets valued at over \$US2.6 billion were stolen via attacks on "bridges" -- decentralized services designed to allow inter-blockchain exchange. While the individual exploits in each attack vary, a single design flaw underlies them all: the lack of end-to-end value accounting in cross-chain transactions. In this paper, we empirically analyze 10 million transactions used by key bridges during this period. We show that a simple invariant that balances cross-chain inflows and outflows is compatible with legitimate use, yet precisely identifies every known attack (and several likely attacks) in this data. Further, we show that this approach is not only sufficient for post-hoc audits, but can be implemented in-line in existing bridge designs to provide generic protection against a broad array of bridge vulnerabilities.
http://arxiv.org/pdf/2410.01107v2
Enze Liu, Elisa Luo, Jian Chen Yan, Katherine Izhikevich, Stewart Grant, Deian Stefan, Geoffrey M Voelker, Stefan Savage
cs.CR
cs.CR
Count of Monte Crypto: Accounting-based Defenses for Cross-Chain Bridges Enze Liu, Elisa Luo, Jian Chen Yan, Katherine Izhikevich, Stewart Grant, Deian Stefan, Geoffrey M V oelker, Stefan Savage UC San Diego Abstract —Between 2021 and 2023, crypto assets valued at over $US2.6 billion were stolen via attacks on “bridges” — decentralized services designed to allow inter-blockchain exchange. While the individual exploits in each attack vary, a single design flaw underlies them all: the lack of end-to-end value accounting in cross-chain transactions. In this paper, we empirically analyze over 10 Mmillion transactions used by key bridges during this period. We show that a simple invariant that balances cross-chain inflows and outflows is compatible with legitimate use, yet precisely identifies every known attack (and several likely attacks) in this data. Further, we show that this approach is not only sufficient for post-hoc audits, but can be implemented in-line in existing bridge designs to provide generic protection against a broad array of bridge vulnerabilities. 1. Introduction Careful accounting is key to the correct management of assets in virtually all financial systems. Indeed, since Paciloli popularized double-entry bookkeeping in the 14th century, it has been standard practice to separately track inflows (credits) and outflows (debits) to establish a net position — a balance sheet. Such accounting is implicit in blockchains as each and every transaction is recorded, immutable and in possession of implicit integrity. Any change in ownership for a given token is explicitly recorded via some past transaction and thus the net position for assets in a blockchain is generally consistent and well-known. However, these integral proper- ties only hold within a single blockchain. As soon as one wishes to engage in transactions between chains (e.g., trad- ing Ethereum on Solana), it requires building a system that steps outside these isolated environments and implements its own financial calculus between them, including its own accounting. Today, one of the principal mechanisms for such trans- actions is the cross-chain bridge — a service using a pair of “smart contracts” (immutable programs stored on a blockchain) to synthesize inter-chain transactions that are not possible to express natively on a single chain.1Such bridges are an extremely popular component of what is 1. Some newer blockchain ecosystems, such as Cosmos and Avalanche, are themselves composed of multiple blockchains and offer some support for bridging across their own chains, but not with external chains.commonly referred to as “decentralized finance” (DeFi), and they routinely manage transaction volumes with value equivalent to $US8–10 billion per month [11]. However, bridges are just code. They can have bugs in their implementations, in the other services they depend upon, or in the mechanisms used to guard the integrity of their cryptographic secrets. As a result, attackers can, and do, exploit such vulnerabilities to extract significant value from such systems. For example, between 2021 and 2023, crypto assets valued at over $US2.6 billion were stolen in an array of attacks on bridges. The scale of these hacks have motivated a range of research focused on automating the detection of such vul- nerabilities and attacks, through the analysis of low-level implementation details (e.g., using static analysis of smart contracts [23], [43], predefined anomaly rules [48], or the features of specific attacks [24]). However, virtually all of these efforts either require detailed modeling of each contract and bridge infrastructure (e.g., the complex protocol bridges run off-chain to relay messages between on-chain contracts), or are specialized to particular sets of vulnera- bilities (e.g., fake deposit events [24]); they require continual updating, tuning and re-evaluation as they are tied to specific implementation artifacts. In this work, we propose a complementary approach for detecting bridge attacks, by monitoring violations of the bal- ance invariant — a measure of the difference between value inflows and value outflows at a bridge. Unlike prior work, this approach is extremely simple to reason about because it focuses purely on detecting potential negative financial outcomes instead of focusing on the precise mechanism of attack that would lead to those outcomes. Indeed, the power of the approach arises from its technical simplicity. Because it abstracts away the complicated implementation details of bridge contacts (and the off-chain code interfacing with these contracts), the bridge invariant naturally captures attacks independent of the details of the vulnerabilities they target. We demonstrate this effectiveness by comprehen- sively surveying the twelve largest attacks (each $US1 M or more) between 2021 and 2023, and showing that while the details of their vulnerabilities vary considerably, all of them share the property that transactions are allowed to be “unbalanced” (i.e., that outflow can exceed inflow, less costs). We then empirically demonstrate, by auditing over 10Mtransactions from 11 different bridges on across 21 blockchains, that auditing transactions for this property isarXiv:2410.01107v2 [cs.CR] 15 Nov 2024 sufficient to retrospectively and automatically identify each of these past attacks. We further show that such audits can be performed in real-time — either to alert bridge operators about potential fraud, or prevent such unbalanced transactions from com- pleting altogether (i.e., thus preventing any such loss). Concretely, our paper makes three main contributions: ▷Balance Invariant . We introduce the notion of a simple balance invariant, outflow = inflow - costs , which can be calculated automatically from the transaction formats used by current bridges. We hypothesize that this invariant should naturally hold for benign transactions, but not for those exploiting bridge vulnerabilities. ▷Retrospective validation . We validate our hypothesis by empirically auditing over 20 million past transac- tions (across more than 20 blockchains, between 11 different bridges) and show that the balance invariant is sufficient to identify each and every attack for which we have collected ground truth (and addi- tional transactions that should have been flagged). Moreover, we identify vanishingly few other trans- actions that violate this invariant, virtually all of which deserve further scrutiny. Some are clearly new, unreported thefts (separate from the 12 attacks we study), and others capture bridge behaviors that are deserving of considerably more transparency (e.g., unilateral issuance of millions of dollars worth of uncollateralized tokens). ▷Real-time auditing . We show our approach is not only useful for retrospective analysis, but can be used to audit bridge transactions and detect new attacks in real-time. We implement and demonstrate an online audit of the Wormhole bridge and show that it automatically detects every attack we in- ject. Further, we introduce and implement a proof- of-concept for a new bridge architecture, called announce-then-execute , that incorporates such au- diting into the transaction flow itself — thereby preventing unbalanced malicious bridge transactions from ever completing. Our approach treats the most complicated components of bridges (e.g., verifying relayed messages) as black boxes, adds no new at- tack surface for theft, and requires minimal changes to existing codebases — a benefit which we demon- strate by implementing a modified version of the Wormhole bridge. We argue that this approach is powerful both due to its simplicity (in a legitimate financial transaction, the value paid should be equivalent to the value received, less costs) and its independence from the vagaries of smart contract details. Moreover, it represents a straightforward mechanism that can prevent an entire class of existing attacks on crypto bridges. Our work directly inspirited the design and implementa- tion of the Bascule drawbridge security system, which has been used by Lombard—the largest Bitcoin liquid stakingprotocol—over the last three months to secure the bridging of (over $1B as of today) BTC deposited on Bitcoin to LBTC on Ethereum [8]. 2. Background We first give a brief introduction to smart contract blockchains and cross-chain bridges. We then describe how bridges, under attack, collapse in practice. 2.1. Smart-contract Blockchains Modern DeFi protocols (e.g., decentralized exchanges and lending protocols) are built on top of “smart-contract” blockchains, like Ethereum. At their core, these chains, like the original Bitcoin blockchain, are distributed ledgers that manage accounts (public keys) and their balances (in native tokens like Ethereum’s ETH). Users interact with these chains by signing and broadcasting (to the distributed nodes that make up the chain network) transactions that, for example, transfer funds from their account (using the cor- responding account private key) to another user’s account. Ethereum, and the smart-contract chains it inspired since its release in 2015, differ from Bitcoin by extending the “simple” distributed ledger with a smart contract execution layer. A smart contract on Ethereum is an internal account— and, like a normal, externally owned account (EOA), it has a balance—that has associated code (EVM bytecode), which implements the smart contract’s program logic, and storage , which persists the program’s state across executions. Users interact with (i.e., execute) smart contracts much like they do when transferring funds from their account: they sign a transaction that encodes the smart contract to call (i.e., the contract address), the particular function to execute, and the arguments to call the function with. Instead of simply transferring funds from the user’s account, then, executing such a smart-contract call transaction amounts to executing the smart contract bytecode—and any smart contracts the contract itself calls. 2.2. ERC-20 Tokens One of the immediate applications of smart contracts— and to date still one of most popular—is to create custom tokens (or coins). To launch a new token, an organization no longer needs to launch a new blockchain; they can instead deploy a new contract that implements the ERC-20 token standard interface on a chain like Ethereum and take advan- tage of existing on-chain infrastructure like decentralized exchanges that make it easy to, for example, trade one kind of token for another—both native tokens (e.g., ETH) and other tokens.2 Figure 2 shows a simplified variant of one such to- ken contract—the USDC stablecoin contract. This contract 2. Most EVM chains, i.e., chains that use Ethereum’s execution layer, follow Ethereum standards like ERC-20. Most non-EVM chains like Solana (which have different execution models) have similar standards (e.g., SPL tokens in Solana’s case). 1 Smart Contract 3Emit Event2Process Deposit SenderDeposit X 96 Withdraw X Recipient 4 5Sign Store7Submit Submitter Smart Contract Process Withdraw8Relayer Source Blockchain Destination Blockchain SC EventX SC EventX' Read Auth + Figure 1: Cross-chain token bridging and the different steps attackers can exploit to withdraw unbacked deposits. bridges) and show that the balance invariant is sufficient to identify each and every attack for which we have col- lected ground truth. Moreover, we identify vanishingly few other transactions that violate this invariant, virtu- ally all of which deserve further scrutiny. Some are clear contract implementation errors, others are likely new, un- reported thefts, and yet others capture bridge behaviors that are deserving of considerably more transparency (e.g., unilateral issuance of millions of dollars worth of uncollateralized tokens). •Real-time auditing . We show our approach is not only useful for retrospective analysis, but can be used to audit bridge transactions and detect new attacks in real-time. We implement and demonstrate an online audit of the Wormhole bridge and show that it automatically detects every attack we inject. Further, we introduce and imple- ment a proof-of-concept for a new bridge architecture, called announce-then-execute , that incorporates such au- diting into the transaction flow itself — thereby prevent- ing unbalanced malicious bridge transactions from ever completing. Our approach treats the most complicated components of bridges (e.g., verifying relayed messages) as black boxes, adds no new attack surface for theft, and requires minimal changes to existing codebases — a benefit which which we demonstrate by implementing a modified version of the Wormhole bridge. We argue that this approach is powerful both due to its simplicity (in a legitimate financial transaction, the value paid should be equivalent to the value received, less costs) and its independence from the vagaries of smart contract details. Moreover, it represents a straightforward mechanism that can prevent an entire class of existing attacks on crypto bridges. 2 Background In this section we first give a brief introduction to smart con- tract blockchains and cross-chain bridges. We then describe how bridges, under attack, collapse in practice. 2.1 Smart-contract blockchains chains Modern DeFi protocols (e.g., decentralized exchanges and lending protocols) are built on top of “smart-contract” blockchains, like Ethereum. At their core, these chains, like the original Bitcoin blockchain, are distributed ledgers that manage accounts (public keys) and their balances (in native to- kens like Ethereum’s ETH). Users interact with these chains by signing and broadcasting (to the distributed nodes that make up the blockchain network) transactions that, for exam- ple, transfer funds from their account (using the corresponding account private key) to another user’s account. Ethereum, and the smart-contract chains it inspired since its release in 2015, differ from Bitcoin by extending the “simple”distributed ledger with a smart contract execution layer. A smart contract on Ethereum is an internal account—and, like a normal, externally owned account (EOA), it has a balance— that has associated code (EVM bytecode), which implements the smart contract’s program logic, and storage , which persists the program’s state across executions. Users interact with (i.e., execute) smart contracts much like they do when transferring funds from their account: they sign a transaction that encodes the smart contract to call (i.e., the contract address), the partic- ular function to execute, and the arguments to call the function with. Instead of simply transferring funds from the user’s ac- count, then, executing such a smart-contract call transaction amounts to executing the smart contract bytecode—and any smart contracts the contract itself calls. contract USDC { mapping (account =>amount )_balances ; event Transfer (from ,to,value ); function transfer (to,amount ){ address from =msg.sender ;//user //... validate user has enough balance _balances [from ]- = amount ; _balances [to]+ = amount ; emit Transfer (from ,to,amount ); } function mint (to,amount ){ _balances [to]+ = value ; emit Transfer (address (0), to,amount ); } function burn (from ,amount ){ //... validate user has enough balance _balances [from ]- = amount ; emit Transfer (from ,address (0), amount ); } function safeTransferFrom (from ,to,amount ){ //... transfer tokens ;revert iffailed } } 2.2 ERC-20 Tokens One of the immediate applications of smart contracts—and to date still one of most popular—is to create custom tokens (or coins). To launch a new token, an organization no longer needs to launch a new blockchain; they can instead deploy a new contract that implements the ERC-20 token standard interface on a chain like Ethereum and take advantage of existing on-chain infrastructure like decentralized exchanges that make it easy to, for example, trade one kind of token for another—both native tokens (e.g., ETH) and other tokens.2 Figure 1shows a simplified variant of one such token contract—the USDC stablecoin contract. This contract tracks how many USDC tokens an account has and governs the 2Most EVM chains, i.e., chains that use Ethereum’s execution layer, follow Ethereum standards like ERC-20. Most non-EVM chains like Solana (which have different execution models) have similar standards (e.g., SPL tokens in Solana’s case). 2 Figure 2: Simplified USDC ERC-20 Token Contract. tracks how many USDC tokens an account has and governs the spending of these tokens (much like a bank governs bank notes). For example, the contract’s mint function lets Circle (the company that owns the USDC contract) mint new tokens into a user’s account—e.g., after receiving the corresponding payment from the user off-chain (in US dollars, as USDC tokens are pegged to the US dollar). The contract exposes the ERC-20 interface that lets users (and smart contracts) transfer tokens from their account by simply calling functions like safeTransferFrom , and, in turn, use the tokens in any DeFi protocol (e.g., lending the USDC to different markets, exchanging USDC for ETH, etc.). Finally, the contract’s burn function “burns” a token out of circulation—and emits an event (Figure 3) that Circle’s off-chain code looks for before allowing a user to withdraw the corresponding USD fiat off-chain. Figure 3: Event Emitted by an ERC-20 Token (USDC). 2.3. Cross-Chain Token Bridges While smart contracts make it easy to launch new tokens without spinning up new chains, there is no real shortage of new blockchains being deployed (almost weekly). Indeed, the modern blockchain ecosystem is a many-chain ecosys- tem. Blockchains like Avalanche, Base, and Solana have different design points—from cheaper “gas” execution costs, to higher throughput, lower latency, and different permission models—that make them better suited for different classes of application. This situation has resulted in applications that span many chains and cross-chain infrastructure that ulti- mately (try to) allow users to, for example, buy Dogwifhat NFTs on Solana using USDC tokens on Ethereum. Core to these applications and infrastructure—and the focus of our work—is the cross-chain token bridge . At a high level, a cross-chain token bridge makes it possible for a user to “transfer” their tokens from one chain (e.g., their USDC on Ethereum) to another chain (e.g., Solana) and then use the transferred tokens on the destination chain (e.g., on a Solana exchange trading USDC and Dogwifhat).3Since smart contracts cannot make network requests or otherwise access sate outside their own storage, a cross-chain token bridge consists of smart contracts on both the source and destination chains, and off-chain infrastructure that serves to relay the “transfer” call across the two contracts. 3. While some cross-chain bridges dolet users transfer one kind of token (e.g., USDC on Ethereum) for a completely different kind of token on the destination chain (e.g., Dogwifhat on Solana), these bridges essentially fuse the cross-chain token bridge with an exchange (or swap). We focus on token bridges not only because they are fundamental to other kinds of bridges, but also because they have higher volume, more liquidity, and more attacks. As Figure 1 shows, a typical cross-chain token transfer, i.e., a bridge transaction, consists three phases: 1. Deposit (on source chain). To initiate a cross-chain token transfer, the user first calls the bridge’s contract on the source chain: deposit( address token, uint256 val, address to) { address from = msg.sender; // user address to = address (this ); // bridge contract // ... validate the ERC-20 token contract token.safeTransferFrom(from, to, val); emit Deposited(id++, token, from, to, val); } This contract function—a simplified version of the Qubit bridge deposit function—processes the user’s deposit (step 2) by validating the transfer request, e.g., against a list supported tokens, and then transferring the user’s ERC-20 tokens to the bridge contract—recall contracts are accounts with balances. Then, the function emits an event (step 3) recording the user’s deposit details (including the deposit ID, the ERC-20 token contract address, the recipient on the destination chain, and value). 2. Off-chain relay. The emitted event is observed by an off-chain relayer in (step 4), which constantly monitors the source blockchain. The relayer first verifies the authenticity of the deposit event. If the event is authentic, the relayer then produces a signed receipt endorsing the deposit (step 5) and, typically, stores the receipt off-chain (step 6). Finally, this signed receipt is sent to the bridge’s withdrawal contract on the destination blockchain (step 7). Who submits the receipt varies across bridges—some bridges submit the receipt on the user’s behalf (in these cases, the signed receipt is simply a signed contract-call transaction), while others give users (and anyone willing to pay gas) the signed receipt and they, in turn, submit the receipt to the withdrawal contract to complete the transfer. 3. Withdraw (on destination chain). The withdrawal contract on the destination chain first processes the withdraw request by verifying the receipt and transferring the tokens to the recipient (step 8). In (the simplified) Chainswap’s withdraw case, for example, users call: withdraw( uint256 id, address token, address to, uint256 val, Signature[] sigs) { _chargeFee(); // verify receipt require (received[id][to] == 0, ’withdrawn’); for(uint i=0; i < sigs.length; i++) { verify_receipt(sigs[i], id, token, to, val); } received[id][to] = val; // mark as withdrawn token.safeTransferFrom( address (this ), to, val); emit Withdraw(id, token, to, val); } This contract function first charges the caller a fee, then verifies the deposit details against receipt—both that the deposit was not already withdrawn and that the receipt signatures are valid—and finally transfers the tokens to the intended recipient. We consider a cross-chain transaction complete when the asset is released to the recipient (step 9). We expect every cross-chain bridge transaction to uphold the balance invariant: the value (and kind) of the tokenswithdrawn—the outflow—should equal the value (and kind) of the tokens deposited—the inflow—minus the charged fees. In practice, they do not. 2.4. How Bridges Collapse In practice, attackers exploited bugs in all three components—the deposit contract, the relayer, and the with- draw contract—and stole signing keys to siphon hundreds of thousands of dollars. Figure 1 highlights the precise steps in the cross-chain token transfer that attackers have historically exploited, including: ▷Bugs in the deposit contract. In step 2, the bridge contract verifies that it has received the correct amount of assets before emitting an event. Bugs in this verification logic could allow an attacker to deposit a smaller amount of assets than what is recorded by the bridge in the event (step 3). For example, Qubit’s deposit function (see above) did not properly validate the token address. This bug allowed an attacker to pass 0for the token address, so the contract function did not actually transfer any funds from the attacker’s account but still emitted a Deposit event which allowed the attacker to withdraw actual tokens on the destination chain [35]. ▷Bugs in the off-chain deposit verification. In step 5, the relayer verifies the authenticity of the deposit event emitted by the bridge contract, including whether the event is emitted by the bridge’s designated contract. Bridges that do not correctly verify deposits would allow attackers to withdraw assets that are never deposited. ▷Stolen relayer (or submitter) keys. In step 5, the re- layer signs the deposit receipts which are then submitted to the withdrawal contract as evidence of a valid deposit. If the relayer key is compromised (e.g., as with the Ronin bridge [41]) the attacker can forge a valid receipt and then withdraw assets that were never deposited by calling withdraw with the forged receipt. The same is true for bridges that submit receipts on behalf of users—and essentially restrict the withdraw callers to privileged submitter accounts. The bridge sub- mitter keys (step 8) have similarly been compromised (e.g., as with AnySwap [7]) and used to withdraw un- backed deposits. ▷Bugs in the withdraw verification. In step 8, the bridge contract verifies that the messages are signed by the relayer and have not been replayed. Bugs in this verification logic (e.g., as we saw with Wormhole [4]) have allowed attackers to supply “valid” payloads that were not signed by the relayer and replay withdrawal requests with valid deposit receipts that have already been withdrawn. In this paper, we assume an attacker can exploit any of the aforementioned components or otherwise control the relayer (or submitter) keys. In the next section, we show that this attacker model and our simple balance invariant checking captures the largest attacks on cross-chain bridges that have happened in the past. In Sections 5 we show that monitoring withdrawals and deposits on the source and destination chains can be used to detect similar attacks in the future. Finally, in Section 6 we describe an announce-then- execute bridge design that enforces this invariant to prevent attacks before they happen. We note that while our threat model captures a wide variety of vulnerabilities, it is not exhaustive. As with any detection system, an attack that violates one of our assump- tions (e.g., avoids violating the balance invariant by transfer- ring funds off-bridge or not having a withdrawal, subverts the transaction data used to validate the invariant, etc.) might succeed. We similarly consider other smart contract bugs (beyond bugs in deposit and withdrawal functions) and account key compromises out of scope—and instead focus on the cross-chain bridging aspects which are relatively less well understood. As we show later, our model captures the largest attacks on cross-chain bridges that have happened in the past and systems can use it to prevent similar attacks in the future. 3. Approach The core hypothesis of our work is that value should be conserved within cross-chain transactions. That is, that the value of the asset inflow in such a transaction (i.e., the deposit) should equal the value of the asset outflow (i.e., the withdrawal). In token transfer bridges, this in- variant corresponds to a balancing of the inflow tokens and the outflow tokens (less any fees or transaction costs incurred by the bridge itself). When this balance invariant does not hold it allows a range of opportunities for fraud, all of which involve greater outflows (withdrawals) than inflow (deposits). Figure 4 illustrates such an outcome by graphing the aggregate difference between bridge inflow (on Ethereum) and outflow (on Solana) leading up to and during the February 2022 attack on the Wormhole bridge. The net difference is consistently near zero, with only short positive deviations (representing delayed withdrawals) until the attack in January, at which point there are significant withdrawals without matching deposits—producing a large negative difference. Testing this invariant on a per transaction basis is straightforward in principle. However, since bridge trans- action formats are not standardized, it requires a range of per-bridge and per-chain parsing in practice. Our method- ology for normalizing this information focuses on two key pieces of information: a) identifying each bridge transaction—a composite of a deposit (inflow) transaction on a source blockchain and a withdrawal (outflow) transac- tion on another—and b) identifying the value transferred in each such bridge transaction. 3.1. Identifying Bridge Transactions For almost all bridges, identifying their component (per- chain) inflow and outflow transactions is straightforward — Oct 01 2021 Oct 15 2021 Nov 01 2021 Nov 15 2021 Dec 01 2021 Dec 15 2021 Jan 01 2022 Jan 15 2022 Feb 01 2022 Date125000 100000 75000 50000 25000 0250005000075000100000Diff AmountT otal Inflow (on Ethereum) - T otal Outflow (on Solana)Figure 4: Total Inflow (on Ethereum) - Total Outflow (on Solana) Over Time: Wormhole Attack in Feb 2022. bridges typically use explicit events on each chain to signal if a given transaction is a deposit or withdrawal.4 Pairing these component transactions (i.e., matching deposits on one chain to withdrawals on other) can be performed in several different ways. The easiest, and most common, is via a unique transaction identifier. Such IDs are typically generated by the bridge on the source chain during a deposit transaction and then copied into the withdrawal transaction on the destination chain.5However, instead of an explicit ID, some bridges use a hash of the deposit transaction for the same purpose (e.g., for Anyswap, each withdraw transaction will include the hash of its correspond- ing deposit transaction).6Finally, in a handful of cases there are no “inband” identifiers that can be used to associate transactions. We believe this is a poor design choice that is fundamentally in conflict with auditability. However, even in these cases, for the purpose of our analysis we have been able to pair transactions using explicit query APIs provided by the affected bridges services.7 At the end of this process, we identify a comprehensive collection of “bridge transactions” (a pair of transactions from two different blockchains that were used by the bridge to transfer value across them). While the vast majority of bridge transactions are pairs of deposit and withdrawal transactions, a handful of bridge transactions are either 4. One key exception to this rule is the Wormhole bridge which, until late 2023, did not emit specific events when executing a withdrawal transaction. In this case, we infer that a withdrawal took place by looking for transactions that invoke functions designated for performing withdrawal operations (e.g., completeTransfer ). It also appears to be widely understood today that emitting explicit events is a best practice. 5. These unique IDs are commonly simple global variables incremented with each new transaction. 6. We note that to prevent potential replay attacks, bridge implementers should also include an ID that uniquely identifies individual deposit events within a transactions. Sadly, this is often not the case. 7. For example, when a bridge transaction on the Poly Network bridge includes a withdrawal from Curve (a kind of liquidity pool) or when a bridge transaction on the Binance Token Hub includes a Binance Smart Chain (BSC) withdrawal, it is not possible to identify the partner deposit from blockchain data alone and we must make use of “out of band” data available through their respective bridge query APIs. withdrawal-only (e.g., in the case of attacks) or deposit-only (e.g., if the user chooses to delay their withdrawal). 3.2. Identifying the Value Transferred Many bridge transaction event formats explicitly identify the amount and kind of tokens transferred. However, some bridges do not emit this information and others can be unreliable.8In such cases, we can frequently make use of the ERC-20 “Transfer” event (see Figure 3 for an example) that is emitted when the contract transfers the tokens from the user’s account to the bridge’s account. This event contains the number of tokens transferred as well as the sender and recipient addresses, which we use to identify the number of tokens transferred to or from the bridge. Because the Transfer event is adjacent to its associated bridge-generated event, it is easy to identify and thus establish the number of tokens transferred.9In a few implementations, multi- ple related Transfer events can be emitted at once, and in these cases we have manually inspected their contracts and constructed implementation-specific logic to account for this behavior. Another special case is caused by so-called “reflection tokens” in which the number of tokens logged in the event (the value field in Figure 3) is dynamically adjusted based on a combination of the intended number and the total token supply. For such cases, we either rely on bridge events which capture the intended number of tokens transferred or implement token-specific logic to recompute the value accordingly. Finally, native tokens have no Transfer event (since they are not ERC-20 tokens), but thus far we have either been able to recover the number of tokens transferred from bridge events or so-called “internal transactions”. To summarize, while it is certainly possible to create a bridge transaction protocol that records insufficient data to match deposits and withdrawals, or for which the number of tokens transferred might be ambiguous, our empirical experience analyzing 11 bridges and 21 blockchains is that such reconstruction has always been possible. 3.3. Checking the Balance Invariant Once we have identified both sides of the bridge trans- action and the number of tokens transferred by the bridge, we can verify if the balance invariant holds: for each bridge transaction (including those that are withdrawal-only), does the number of tokens transferred from the bridge—the with- drawal amount—match the number of tokens received by the bridge—the deposit amount? 8. For example, as mentioned earlier, pre-2024 Wormhole does not emit an event for withdrawal transactions. Other examples include the Meter bridge and Qubit bridge, which attempted to verify the number of tokens received but had exploitable bugs. 9. As a sanity check, we also require that the sender and recipient addresses in the Transfer event are consistent with the bridge’s defined behavior: for withdrawal transactions, we require that the sender is either a mint address (i.e., all-zero address) or a bridge-controlled address, while for deposit transactions, we require that the recipient is either a burn address (i.e., all-zero address) or a bridge-controlled address.However, a key complication is that bridges can charge fees and, while these fees can sometimes be paid “out of band”, it is not uncommon for them to be subtracted from the tokens received on deposit. To account for this behavior (i.e., outflow = inflow - costs), we must be able to determine such costs on a per-transaction basis. In most cases, fees can be accounted for in a straightforward manner: they either are made explicit in bridge-generated events (and can thus be accounted for directly) or can be calculated based on either published fee schedules or inferred fee schedules (i.e., since all transactions are typically subject to the same fixed or percentage fees). In some cases, the precise value of fees may be difficult to determine retrospectively because they depend on some external contemporaneous value not recorded in the trans- action (e.g., fees valued in US dollars implicitly depend on the exchange rate of a given token at that time). While such ambiguity could be further minimized with additional data, in our work we manage this issue by defaulting to a simple rule that the number of tokens withdrawn should not exceed the number deposited. 4. Retrospective Analysis The basic reasoning motivating the balance invariant is simple: that legitimate bridge transactions should conserve value. However, this assumes a particular model for how bridges are used and operated which may or may not hold in practice. To validate our hypothesis, we applied the balance invariant analysis retrospectively across a large set of past transactions which, while primarily benign, contain the largest known bridge attacks during our period of study. Our goal is both to show that all real attacks are identified (detection), but also that the invariant does not alert on large numbers of benign transactions (bridge compatibility). Later, in Sections 5 and 6, we will describe systems for live bridge monitoring as a third party and a new implementation for preventing unbalanced transactions from being committed. 4.1. Data Set To perform a retrospective analysis we need data for which (at least some) of the ground truth is known. In this section we describe how we chose the bridge attacks we study, the blockchains and smart contracts involved, and how we collected the historical transaction data. Attack Selection. We compiled a comprehensive list of attacks on cross-chain bridges that occurred between January 2021 and December 2023. We used both academic papers surveying cross-chain bridge attacks [21], [49], [51] as well as industry blog posts that collect and characterize attacks over time [1], [10], [37], [44], [45]. As this pa- per focuses on end-to-end auditing of bridge transactions, we filter out attacks involving blockchains lacking smart contracts such as Bitcoin (e.g., the pNetwork attack in 2021 [33]), attacks on swap bridges (e.g., the Thor bridge attacks [39], [40]), attacks that do not involve individual Blockchain Bridges that Operate on the Chain Arbitrum Anyswap, Poly Network, Wormhole Avalanche Anyswap, Poly Network, Meter, Nomad, Wormhole Binance Beacon Binance Token Hub Binance Smart Anyswap, Binance Token Hub, Chainswap, Harmony, Meter, Omni, Poly Network, Qubit, Wormhole Celo Anyswap, Poly Network, Wormhole ETH Anyswap, Chainswap, Harmony, HECO, Meter, Nomad, Omni, Poly Network, Qubit, Ronin, Wormhole EVMOS Anyswap, Nomad, Omni Fantom Anyswap, Poly Network, Wormhole Gnosis Omni, Poly Network Harmony Anyswap, Harmony Bridge, Poly Network HECO Anyswap, Chainswap, HECO, Poly Network Meter Meter Metis Anyswap, Poly Network Milkomeda Nomad Moonbeam Anyswap, Meter, Nomad, Wormhole Moonriver Anyswap, Meter OKT Chain Anyswap, Chainswap, Poly Network Optimism Anyswap, Poly Network, Wormhole Polygon Anyswap, Chainswap, Poly Network, Wormhole Ronin Ronin Solana Wormhole TABLE 1: The blockchains CrossChecked supports and the cross-chain bridges that operate on them. While a particular attack on a bridge involves two chains, we collect deposit and withdrawal transactions for a bridge on all chains that the bridge supports. Anyswap is also known as Multichain. bridge transactions (e.g., the evoDefi attack [3]), and at- tacks that withdraw funds through other means (e.g., direct transfer from a vault that stores assets for a bridge such as the Multichain 2023 attack [27]). Moreover, given the large number of attacks during this period, we focus on major attacks with claimed losses greater than $1 million USD and exclude the remaining (the sum of losses from these excluded attacks are a small fraction of those in our scope). This process yielded 12 attacks on 11 distinct bridges. We note that this list includes the top five attacks on cross-chain bridges in history, which collectively resulted in more than $2.6 billion USD in claimed losses. Blockchain Selection. Validating bridge transactions re- quires access to transaction data from both the source and destination chains. We support every blockchain involved in the bridge transactions associated with the 12 attacks, either as the source (or claimed source) or destination chain. As a result, we support a total of 21 blockchains that together cover a broad range of designs, including many of the most popular such as Ethereum, Binance Smart Chain, and Solana. Table 1 lists the blockchains and the bridges in our retrospective study that operate on them. Smart Contract Selection. For each bridge, we com- prehensively collected the results of all versions of its bridg- ing smart contracts on every blockchain we considered. In particular, we collected deposit and withdrawal transactions created by every contract the bridge deployed on every blockchain we support (typically many more blockchains than the ones involved in a bridge attack) as well as all versions of the smart contract implementation for the bridge (bridges evolve their implementations over time, such as in response to an attack). Since the transactions we collected Jun 01 2020 Oct 01 2020 Feb 01 2021 Jun 01 2021 Oct 01 2021 Feb 01 2022 Jun 01 2022 Oct 01 2022 Feb 01 2023 Jun 01 2023 Oct 01 2023 DateHECOQubitMeterChainswapBSC T oken HubNomadPolyNetworkHarmonyWormholeRoninAnyswapBridge Name Reported AttackFigure 5: The lifetime of the bridges in our retrospective study. Lines start with the bridge’s first valid transaction and end with the last valid transaction in our data, corresponding to the bridge’s closure or November 2023 if the bridge was still operating at the end of our data set. Diamonds indicate the dates of attack. from this set of smart contracts are much broader than those just involved in the top 12 attacks we consider, including them further reinforces our findings that the alerting work- load is very small (Section 4.2). Data Collection. Collecting smart contract transaction data—the verbose record of what each contract did—across many chains constitutes the most time-intensive aspect of performing a retrospective analysis. For each bridge, we collected deposit and withdrawal transactions for each of the blockchains it operates on (for the 21 chains we support) using commercial RPC services Name Date Loss (USD) Analyzed Reported New Test Error Suspicious Ronin Mar 2022 624 .0M 3.0M 2 - - - - PolyNetwork/2021 Aug 2021 611 .0M 292 K 18 - - 1 - BSC Token Hub Oct 2022 587 .0M 2.0M 2 - - - - Wormhole Jan 2022 360 .0M 642 K 1 - - 2 - Nomad Aug 2022 152 .0M 37K†962 - - - - Harmony Jun 2022 100 .0M 336 K 15 - - - 43 HECO Nov 2023 86.0M 23K 8 - - - 73 Qubit Jan 2022 80.0M 260 16 - 114 - - Anyswap Jul 2021 7.9M 3.4M 4 24 - 806 7 PolyNetwork/2023 Jun 2023 4.4M 290 K 136 - - 1 27 Chainswap Jul 2021 4.4M 53K∗1136 - 15 4 - Meter Feb 2022 4.3M 14K†5 - - - - Total 2.6B 10.1 M 2,305 24 129 814 150 TABLE 2: List of top attacks on cross-chain bridges in the retrospective analysis, ordered by amount stolen. CrossChecked analyzed over 10 Mbridge transactions (20 Mcomponent deposit and withdrawal transactions) and identified all bridge transactions previously reported as having been associated with the attacks (Reported). It also identified bridge transactions that violated the invariant that were a previously unidentified attack (New), test transactions (Test), transactions reflecting bugs in implementations or use (Error), and suspicious transactions that employ manual signing (Suspicious).†CrossChecked identified slightly more transactions than were reported by the Nomad [28] and Meter [30] bridges for their attacks (+2 for Nomad, +1 for Meter).∗The Chainswap attack only has reports of the malicious deposit address [25], which matches the one identified by CrossChecked. which charge for queries. We primarily used five com- mercial services,10as no single service supports all of the blockchains and functionality we need. For each bridge and blockchain combination, by default we collected all of the historical transactions generated by its smart contracts from the genesis of its deployment to the end of November 2023 or the end of its life, whichever came first. The two exceptions to this rule are the Binance bridge, for which we limited data collection to a year (six months prior to its attack and six months after) because of the sheer volume of transactions over its lifetime (30 million transactions) and the Harmony bridge, whose contract was reused by another bridge (LayerZero) after its attack (since LayerZero was not attacked itself, we only consider trans- actions that were directly associated with Harmony). Figure 5 illustrates these bridge lifetimes with each line starting at a given bridge’s first transaction and ending with its last in our data set. Diamonds indicate the dates of individual attacks, emphasizing that many of the bridges closed shortly after their attacks. 4.2. Analysis We developed a tool called CrossChecked that pairs deposit and withdrawal transactions from blockchains into bridge transactions, and applies the balance invariant and consistency checks on them. Using the transactions we collected for the 12 attacks across 11 bridges and 21 chains, CrossChecked analyzed over 10 Mbridge transactions (20 M individual deposit and withdrawal transactions), identifying more than 2.3 Kbridge transactions associated with the attacks and 1.1 Kmore that violated the balance invariant. 10. GetBlock, QuickNode, ChainStack, GoldRush, and Ankr.Table 2 summarizes our results. For each attack, it shows the bridge involved, the date of the attack, the claimed loss in USD, the number of transactions CrossChecked analyzed, and the number and kinds of transactions that violated the balance invariant. Below we discuss these two categories of transactions in more detail. For further context on each of the attacks, Appendix A provides a descriptive account summarizing how the attacks transpired. Looking forward to Sections 5 and 6, altogether Cross- Checked identified 3,423 bridge transactions (0.03%) that violated the balance invariant out of more than 10 Mbridge transactions analyzed. If the invariant is used by a third-party auditing or protection system, we note that such an alert workload has a negligible overhead for manual inspection, typically raising no more than one alert (or one batch of alerts) every few weeks. 4.2.1. Reported. For each of the 12 significant cross-chain attacks, Section 4.1 describes how we gathered the historical transactions that correspond to the attacks using external sources. We use these identified transactions as ground truth for evaluating the ability of CrossChecked to identify attack transactions. As shown in Table 2, when processing the transaction histories of the chains involved, CrossChecked successfully identified all 2,305 bridge transactions on the source and destination chains associated with the attacks (including a few extra ones that are missed by the public reports). Since we designed CrossChecked to specifically identify such attacks, these results may not be surprising. However, they are useful for confirming that the approach of checking a simple, well-defined invariant works well. Moreover, the approach works well across a variety of models, including bridges that specify fees in a fiat currency, tokens that use a reflection mechanism, etc. 4.2.2. Other Violating Transactions. Equally compelling is the extent to which other, non-attack transactions violate the balance invariants. If the attack transactions are domi- nated by many false positives, then the approach becomes less effective. As shown in Table 2, CrossChecked finds significantly fewer (1,117 compared to 2,305) bridge trans- actions that were not previously identified as attacks. Given the nature of these additional transactions, though, they do not undermine the effectiveness of the invariant approach. By violating the invariant something highly unusual is taking place. As a result, we argue that such transactions should be flagged for further scrutiny and perhaps even blocked from executing (particularly transactions in the New category and the large transactions in the Suspicious category below). To ensure that we have not missed benign explanations for a violation, we manually inspected violating bridge transactions in at least of one of the following ways: (1) using blockchain explorers to verify that the funds have been created by the withdrawal (and if so, whether they have been moved); (2) searching online for any additional information about the transaction and addresses involved; (3) checking that if claimed deposit exists; and (4) examining unredeemed deposits on the source chain that potentially could have been used to back the withdrawal (e.g., because the smart contract implementation changed between the deposit and withdrawal). If we can manually reconcile a bridge transac- tion, we consider it benign and do not consider it further. We group the remaining bridge transactions that violate the invariant into four categories, which we describe below. For reference, we also list some of these bridge transactions in Table 3 in the appendix to provide specific examples with more detail. New. We believe that we have identified previously unre- ported bridge transactions involved in two new, unreported attacks on Anyswap. The first group of three transactions executed once Anyswap reopened after the attack but before Anyswap patched its smart contract (Anyswap transactions #1–3 in Table 3 in the appendix). These transactions were three days later and involved different deposit and with- drawal addresses than the July 10, 2021 attack (yet utilizing the same compromised key). The second group of 21 trans- actions on November 18, 2021, were all withdrawing on Avalanche. These transactions either referenced deposits that had already been redeemed months previously (Anyswap #6 in Table 3) or referenced non-existing deposits (Anyswap #7 in Table 3). Manually inspecting the smart contract used, the attackers were exploiting a bug in Anyswap’s implementation (the access control code was commented out and thus ineffective) and one of the addresses was labeled as “KyberSwap Exploiter”. Tests. Two bridges had test transactions that violated the in- variant. Chainswap had 15 transactions that withdrew tokens labeled as test tokens (e.g., tokens labelled as “testtoken” or “startertoken”). Similarly, Qubit had 114 transactions that minted test tokens (e.g., “xTST”) without backing deposits. While all these transactions did not have correspondingdeposits, we surmise that they were likely benign given the tokens involved (tokens that have no real value). Error. Four bridges had transactions that suggest bugs in either their implementation or their invocation. PolyNetwork/2021 had one bridge transaction where the withdrawal amount matched the deposit amount, but the withdrawal moved the funds to the wrong destination chain (CrossChecked flagged the mismatch in destination chain specified in the deposit and withdrawal transactions). Anyswap had two groups of bridge transactions in this category. The first consists of 800 withdrawal transactions that pointed to just a few deposits. Manually sampling a few, the deposit transaction hash was not set correctly in the withdrawal transactions (we found their matching deposits), suggesting a program error. The second Anyswap group had four double-spend transactions (referencing the same deposit) that are also likely program errors: the deposit and withdrawal amounts are the same, and the withdrawals occurred within a few hours of each other. Wormhole had two bridge transactions that violated the invariant: 0.5 wrapped Solana on Polygon →650 USDC on Solana, and 4.3KMATIC on Polygon →2.3Kon Avalanche. The small amounts and close proximity of the dates of the transactions suggest they are also likely errors. Finally, three bridges had transactions that had no ap- parent effect, suggesting invocation errors or undocumented behaviors. PolyNetwork/2023 had one bridge transaction, and Chainswap had four, where the deposits were non-zero but the withdrawal amount was zero. And Anyswap had two withdrawals referencing deposits that did not specify a recip- ient, yet the deposit amounts covered the withdrawals. While technically not balance invariant violations, CrossChecked flagged them because of their unusual circumstances. Suspicious. The final category of bridge transactions sug- gests the manual, intentional use of private keys in signing transactions that effectively bypass verification — precisely the kind of transactions that warrant auditing. Many of these cases involved highly suspicious un- backed bridge transactions involving very large withdrawals without corresponding deposits. For example, Anyswap had seven transactions totaling more than $1.5 Mpointing to non- existent or already-redeemed deposits (e.g., Anyswap #4 and #5 in Table 3 in the appendix). PolyNetwork/2023 had 27 withdrawals referencing a non-existent deposit address totaling more than $20 M(PolyNetwork/2023 #1 in Table 3). The HECO bridge had 73 unusual transactions. One was a very suspicious unbacked bridge transaction minting $5 M of USDT on the HECO chain (HECO #1 in Table 3). The remaining 72, totaling over $36 M, involved withdrawals to an address labeled “HECO recovery”. The label suggests benign intent such as rescuing funds trapped in the bridge, but the activity is also consistent with a rug pull. Other cases suggest seemingly careless operational prac- tices. In particular, Harmony had 43 bridge transactions that violated the invariant in a variety of different ways. Eight double-spending bridge transactions (e.g., Harmony #1 in Human InvestigatorBlockchain Monitor Auditor Live Auditing System Blockchains TX Data Violating TX Database Figure 6: Live auditing system which consists of three components. Table 3) used the same deposit to release tokens twice (though only resulting in a profit of a few hundred USD). Thirty-two had indecipherable data: it was not possible to decode the deposit function name, function input, and some events (thus preventing verification of the deposit). One bridge transaction minted piggybankone tokens on Harmony chain referencing a non-existing deposit. And two had with- drawal amounts that were smaller than the deposits, perhaps caused by undocumented fees or errors. Considering the specific mechanism used by the Harmony bridge, where a privileged submitter key was submitting transactions that it should not have, and the fact that some double-spending transactions had amounts different than what was deposited, these incidents suggest that Harmony had issues operating securely and correctly. 5. Live Auditing Section 4 showed the effectiveness of applying the bal- ance invariant on restropective data to accurately identify past bridge attacks. Incorporating the logic used in the retrospective analysis, we implemented a real-time auditing system that uses the balance invariant to monitor ongoing transactions on a bridge. Since most of the bridges in our retrospective analysis are shut down at the time of writing (Figure 5), we focus on the Wormhole bridge. Wormhole is still operational, sup- ports a wide variety of blockchains, and is among the most popular bridges in terms of transaction activity [49]. This live system monitors thousands of withdrawal transactions per day across ten blockchains, which together account for 60% of all withdrawal transactions on Wormhole. Extending the system to support other bridges is straightforward. 5.1. System Overview Figure 6 depicts the architecture of our live auditing system. The system consists of three main components. The Blockchain Monitor tracks the blockchain network and retrieves the latest deposit and withdrawal transactions. The Auditor checks extracted transactions for invariant viola- tions. The Database component stores all the transactions and auditing results.Blockchain Monitor. The Blockchain Monitor obtains deposit and withdrawal transactions by periodically retriev- ing the latest finalized blocks. The Monitor uses the same commercial RPC services for collecting Wormhole deposits and withdrawals as we used for the retrospective analysis (Section 4.1).11 The Monitor only retrieves finalized blocks since un- finalized blocks may be reverted or reordered. Since dif- ferent blockchains have different finality times, we use the timestamp of the latest finalized block of Ethereum as the synchronization time since Ethereum has the slowest finality time (around 12 minutes) [19]. After retrieving the blocks, the Monitor extracts deposit and withdrawal transactions for Wormhole and saves them to a local database. The polling interval is configurable and the Monitor polls chains every 1 minute by default. As a result, the live auditing system is as recent as the polling interval combined with the finality time — a situation similar to bridges due to the polling nature of distributed off-chain communication. Auditor. For every new withdrawal transaction extracted by the Blockchain Monitor, the Auditor attempts to find the corresponding deposit transaction in its local database. In most cases it will find the deposit, but if it cannot find it (e.g., because the withdrawal references a non-existent transaction), the Auditor sends an email alert inviting man- ual inspection. If it finds a deposit, it examines the deposit and withdrawal transactions, and sends an alert if either the deposit has already been withdrawn (the new withdrawal is double-spending) or the bridge transaction violates the balance invariant. Database. The system uses a PostgreSQL database to store all information regarding deposit and withdrawal trans- actions. This information includes the transaction hash, the blockchain, the amount, and the timestamp. It also stores the auditing results, including whether the deposit has been withdrawn and whether the invariant is violated. 5.2. Deployment We have deployed our live auditing system for the Wormhole bridge for a month. The system audits the deposit and withdrawal transactions between 10 blockchains, which collectively account for around 60% of all withdrawal trans- actions on Wormhole. For the four weeks that our system has been operational, it has audited over 60,000 transactions in total (averaging more than 2,000 transactions per day). The system currently refreshes every minute (configurable), and sends email alerts if it observes a transaction violating the balance invariant or another auditing property (e.g., the destination chain in the deposit does not match the chain in the withdrawal). In the time that our system has been operational, it has alerted on 22 transactions in six batches over four weeks. Upon manual inspection, we confirmed that all alerts were caused by previously unseen tokens (recall that in 11. A fully operational deployment would manage nodes participating in each of the blockchains to obtain transactions in block data directly. some cases we need to manually account for token-specific logic) or bugs in our code. Consistent with our retrospective analysis, the alert rate is very low at 0.03% and raises fewer than one alert per day. This rate is on-par with other systems that have an alert budget (e.g., five alerts per day in the context of a lateral movement monitoring system [16]). In addition, while we have not observed any attacks during our monitoring period, we simulated three attack scenarios to confirm that the system alerts when expected. These three transactions represent three types of attacks: (1) a double-spend attack, (2) an unbacked withdrawal attack, and (3) an attack where the deposit and withdrawal amounts do not match. The system successfully alerted on all three. 6. Protecting Bridges Sections 4 and 5 showed how applying the balance invariant can identify attacks retrospectively and monitor ongoing transactions as an external third party without any changes to existing bridge infrastructure. However, the live monitoring system only alerts on violations of the invariant and does not prevent violating bridge transactions from being processed. In this section, we describe an approach for extend- ing an existing bridge implementation to prevent malicious transactions from executing. Our goal is to present a proof- of-concept implementation to demonstrate the feasibility of applying the balance invariant in the workflow of bridge transactions as an active defense against malicious transac- tions. We acknowledge that several practical issues remain for a complete operational system, presenting an opportunity for interesting future work. We start by proposing a new model for the workflow of bridge transactions. Then, using Wormhole as an example, we show how to modify an existing bridge implementation to prevent malicious transactions from being processed with fewer than 30 lines of code changes. Finally, we evaluate the correctness and overhead of this initial implementation. 6.1. The Announce-then-Execute Model To guide the design of a new model, we first highlight where the attack surfaces exist. As shown in Figure 1, a vulnerability can exist in as early as the second step (verify lock amount) to as late as the next-to-last step (verify relayed transaction). Thus, a natural place to introduce a protection mechanism is just before the final step, which executes the relayed transaction. Using this insight we propose an announce-then-execute model. Figure 7 depicts the entities and steps involved in the new model, focusing on the destination chain (replacing the right-most box of Figure 1). The new model employs two steps to process a withdrawal transaction: (1) verify and announce the withdrawal transaction on the destination blockchain (steps 8 and 9) and (2) execute the withdrawal transaction (steps 11 and 12). Of particular note, this new model introduces an additional entity, the Approver , which is responsible for approving the relayed transaction before Approver Recipient Submitter Withdraw X' 7 Smart Contract Process Withdraw Announce8 9Approve 121110 Execute Approve Announce SC X' Destination Blockchain1-6 From Figure 2Figure 7: Announce-then-execute model for bridges. The approver verifies the relayed transaction before its execution. The approver can be implemented differently (e.g., a set of third-parties), depending on the desired security properties. it is executed. The Approver can be a bridge operator, a trusted or trustless third-party (e.g., Bascule [8], inspired by our work, uses trusted execution environments instead of consensus to ensure the safety of the approver), or a set of third-parties (e.g., using multisig for decentralized control). It is responsible for verifying that the announced withdrawal transaction satisfies the invariant by validating the same conditions as the Auditor in the live monitoring system (Section 5). If the relayed transaction violates the invariant, the Approver can reject the transaction to prevent it from being executed. 6.2. Threat Model, Assumptions, and Trade-offs We assume that the approver is able to independently verify the relayed transaction and the correct amount of to- kens to be transferred. Under this assumption, the announce- then-execute model prevents any implementation bug in any existing bridge components, from step 2 (e.g., the bridge fails to compute the correct deposit amount) to step 8 (e.g., the bridge fails to verify the signature of a relayed transac- tion). Further, if the approver uses secure hardware (namely, HSMs) or a decentralized third-parties (e.g., with multisig), the model can provide additional protection against insider threats and key theft (e.g., up to the multisig threshold). Of course, if the bridge is the only approver, the model does not provide any additional protection against such insider threats or key theft attacks. The announce-then-execute model has a few advantages. First, it explicitly separates the verification and execution of the relayed transaction, thereby providing an opportunity to reject transactions that violate the balance invariant. In comparison, many bridges (e.g., Wormhole) couple the last two steps tightly — the same function call performs both the verification and execution of the relayed transaction. As a result, if the verification step has a bug, it is not possible to stop violating transactions from being executed. Second, the announce-then-execute model allows any external party, that has visibility into both blockchains, to determine if the relayed transaction violates the invariant. A long-standing challenge with bridges is the oracle problem: the destination blockchain does not have visibility into the source blockchain. The announce-then-execute model side- steps the oracle problem by allowing an external party to verify the relayed transaction before it is executed. This external party can be the bridge operator or a group of third- parties. Moreover, the announce-then-execute model is com- patible with existing bridges, as it only requires modification to the last step and treats the relaying infrastructure as well as the verification code as a black box. In fact, Wormhole’s implementation on Solana already separates the process of verifying and executing the relayed transaction, making it even easier to adopt the announce-then-execute model. Had they implemented the announce-then-execute model, the Wormhole bridge would have been able to prevent the $360M attack on the Solana network [4]. Lastly, the announce-then-execute model does not intro- duce any new attack surfaces — even if the approver naively approves all transactions, an attacker still has to exploit other vulnerabilities in the bridge to profit. 6.3. Implementation Continuing our focus on Wormhole from Section 5, we modified one of Wormhole’s open-source contracts to implement the announce-then-execute model. Wormhole’s current withdrawal function performs two tasks: it verifies the signatures that authorize the withdrawal transaction, and then executes it. We split the withdrawal function into two separate functions: announceWithdraw and approveWithdraw . The announceWithdraw func- tion handles signature verification and announces the with- drawal transaction, while the approveWithdraw func- tion executes the withdrawal transaction. This modification required fewer than 30 lines of code changes. For simplicity, we opted for a single approver with one key in our implementation. However, our implementation can be easily extended (e.g., to use multisig). In addition, while our implementation has not been adopted by the Wormhole team (as we are a research group not affiliated with Wormhole), our solution has inspired other industry projects to adopt a similar approach [8]. 6.4. Evaluation As a final step we performed a high-level evaluation of the correctness and overhead (in terms of gas usage) of the announce-then-execute implementation. We deployed our bridge implementation on the Binance and Fantom testnets due to the availability of free faucets for acquiring testnet tokens for them. We then executed a series of benign and malicious transactions using Binance as the source chain and Fantom as the destination chain. Correctness. For evaluating correctness we disabled the security checks in the original implementation (e.g., signature verification) to allow malicious transactions to flow through the contract implementation (e.g., simulating key compromise). We then executed 100 pairs of depositand withdrawal transactions to validate that the implementa- tion correctly identifies and protects itself against malicious transactions that violate the balance invariant. All but three of the 100 paired transactions were benign, and used randomly generated values as transaction inputs. The remaining three paired transactions were malicious and were randomly placed in the transaction sequence. The malicious transactions represented the three kinds of bugs underlying the large attacks in Section 4: (1) a bug that allows a user to withdraw more tokens than they deposited, (2) a bug that allows a user to withdraw tokens without depositing any (simulating key compromise), and (3) a bug that allows a user to withdraw twice from the same deposit (double spending). The bridge implementation correctly executed the benign transactions to completion and rejected the three malicious transactions. The results are the same independent of where the malicious transactions randomly appear in the sequence. Overhead. The additional steps add overhead to im- plementing bridges. For this experiment, we measured the gas usage for executing Wormhole’s original implementation (with its security checks) and the gas usage of the announce- then-execute implementation (also with the original security checks plus our added code). On average, our proof-of- concept implementation consumed 110 Kmore gas than the original implementation (370 Kvs. 260 Kgas) when execut- ing the benign transactions, which translates to a roughly $1 increase for a typical withdrawal on Ethereum. We note that our implementation is not optimized for gas usage, and these results indicate that an operational deployment will likely want to reduce the gas overhead of the additional work (e.g., narrowing to transactions above a threshold amount of funds). As discussed further in Sec- tion 9, such optimizations and other practical issues of a real deployment are interesting future work. 7. Related Work Blockchains are, by their nature, public and thus sup- port direct empirical analysis of past transactions. This property has engendered a rich literature quantifying and characterizing a range of quasi-adversarial activities on in- dividual blockchains including arbitrage [26], [34], sand- wich attacks [34], [52], frontrunning [9], transaction re- plays [34], and a range of smart contract vulnerabilities and attacks [13], [14], [32], [36], [46], [50]. While our work focuses on the cross-chain context, a number of the vulnerability classes identified in such work are directly implicated in the attacks we analyze. In the cross-chain context, there are several different streams of related work. First are the efforts to improve the security and performance of cross-chain bridge designs — particularly in managing cross-chain consensus concerning state changes — using zero-knowledge [47] or commit- tees of validators [20], [22]. Some many-chain blockchain ecosystems (e.g., Avalanche) are extending their chains with built-in bridges (across different chains). We consider our work orthogonal to these efforts as we focus on unbalanced bridge transactions, independent of the particular security violation that allowed such an outcome to take place. Indeed, some of the compromised bridges did use sets of validators. Another line of work has reviewed real-world attacks on cross chain bridges [21], [29], [49], [51] — ranging from just a few such events to an analysis of over 30 attacks. Our work has directly benefited from the insight and documentation these authors provide, but our respective focus is distinct. While these efforts have concentrated on identifying the vulnerabilities and mechanisms of attack, our work is agnostic to these details and focuses on the financial side-effects those actions. Yet a third research direction seeks to automatically discover new vulnerabilities in cross-chain bridges. Some examples of this work use machine learning such as Chain- Sniper [42], which trains models to identify vulnerable smart contracts, and Lin et al. [24], who train models to detect fake deposit events. Other examples use static analysis such as XGuard [43], which statically analyzes bridge contracts for inconsistent behaviors, and SmartAxe [23], which analyzes the control-flow graph of smart contracts and identifies access control and semantic vulnerabilities. The papers philosophically closest to ours are those that consider the security properties of cross-chain bridges at a higher-level of abstraction. For example, Belichior et al. [2] build and evaluate a synthetic bridge designed to allow high- level monitoring of bridge behavior — including variations in financial state. In a more empirical context, Huang et al. [17] characterize the transactions of the Stargate bridge, and highlight the correlation between large or unusual trades and individual attacks. Finally, perhaps the closest work to our own is Zhang et al.’s XScope [48] which models real-world bridge bugs using a set of pre-defined rules and applies these empirically to identify several attacks retro- spectively. Like our work, they focused on invariant patterns rather than the low-level details of smart contract bugs. That said, the rules considered by XScope are still considerably lower-level and more granular than our balance invariant as they are seeking to identify the cause of the detected attacks that have taken place. While the two efforts are comple- mentary, we believe our work is simpler to understand and implement, more clearly robust (we have tested against a far wider range of bridges and blockchains), and, as a result, is likely more attractive for inline deployment. Finally, a range of blockchain companies advertise tools that actively monitor cross-chain bridge transactions for anomalies. These include Hexagate [15], Hyperna- tive [18], PeckShield [31], Slowmist [38], Certik [5] and ChainAegis [6] (among others), all of which claim various levels of automated alerting for suspicious transactions. However, without clear information on how these systems operate, or empirical results on their efficacy, it is hard to relate our work to those tools beyond our shared goals. 8. Ethics We believe our work, which deals with public data, no identified individuals and a simple means for identifyingattacks on crypto token transfer bridges (and potentially preventing such attacks in the future), has very low ethical risk and significant upside. Moreover, we have attempted to disclose significant suspicious bridge transactions to appro- priate bridge operators (yet with limited success as most of the bridges have ceased operations). Lastly, we will make our code and data available upon publication. 9. Discussion and Future Work This paper is a “first cut” at identifying, validating and implementing a generic mode of theft protection into cross- chain transactions. We show that a simple balance invariant is sufficient to detect and prevent most bridge attacks. Our effort also highlights the need for better auditability and au- diting in the bridge ecosystem, and for new bridge designs. Indeed, deploying a cross-chain token bridge with an in-line balance invariant monitor is an open challenge. As mentioned in Section 2, in this paper we focus on cross-chain token bridges and thus our approach does not directly apply to bridges that have built-in exchanges and swaps. Still, similar invariant-checking techniques likely extend to such cross-chain exchanges and similar protocols (e.g., Automated Market Makers which trade between a range of cryptocurrencies in decentralized exchanges). Such extensions will require incorporating contemporaneous price oracle data into our framework and addition reasoning. The larger opportunities opened up by this work are more architectural. Today, when a crypto platform declares that their system has been audited, they typically are refer- ring to a third-party that inspects their smart contracts for common logic errors or deficiencies in their process. Any validation of overall financial safety is inherently entwined with the totality of the implementation. However, such code- oriented audits are inherently challenging and ill-suited for overarching questions of financial risk. They must evaluate all contracts and bridge code that directly or indirectly have access to keys controlling assets and then must ensure that no combination of inputs or invocations might lead to a loss (itself an outcome that is rarely well defined a priori ). Unsurprisingly, multiple bridges in our study had been previously audited by third parties before their attacks. Our work suggests that by separating overall financial safety invariants from the intricate details of every given contract or trade, we can dramatically simplify the de- fender’s job and their ability to reason about risk. Similar to so-called “circuit breakers” implemented in traditional securities exchanges, or the atomic repayment guarantees embedded in single-blockchain “flash loan” services, the ability to script overarching financial constraints indepen- dent of transaction details can be extremely powerful. For example, one might extend this work beyond a simple cross- chain balance invariant to enforce limits on liquidity losses or to place limits on collateralization risk for tokens backed by stablecoins. We hypothesize that by centralizing the specification and enforcement of overall financial constraints in one place, they will be far easier to audit and reason about. References [1] 0xDatapunk. Github – 0xdatapunk/bridge-bug-tracker. https://github. com/0xDatapunk/Bridge-Bug- Tracker. Accessed 2024-08-28. [2] Rafael Belchior, Peter Somogyvari, Jonas Pfannschmidt, Andr ´e Vas- concelos, and Miguel Correia. Hephaestus: Modeling, Analysis, and Performance Evaluation of Cross-Chain Transactions. IEEE Transactions on Reliability , 73(2):1132–1146, June 2023. [3] Tom Carreras and Mike Dalton. Evodefi bridge may be missing $66m in funds. https://cryptobriefing.com/ oasis-evodefi-bridge-may-be-missing-66m-in-funds/, 11 2024. [4] CertiK. Wormhole Bridge Exploit Inci- dent Analysis. https://www.certik.com/resources/ blog/1kDYgyBcisoD2EqiBpHE5l-wormhole-bridge- exploit-incident-analysis, July 2022. [5] CertiK. Certik. https://www.certik.com/resources/blog/ what-is-on-chain-monitoring, 11 2024. [6] ChainAegis. Chainaegis - the world’s leading ai-driven risk detection and alerting platform. https://www.chainaegis.com/, 11 2024. [7] CoinDesk. Multichain hack worsens as loss of funds reaches $3m: Report, 2022. Accessed: 2024-09-04. [8] Cubist. Cubist on x — bascule drawbridge. https://x.com/cubistdev/ status/1849093545636036832, 11 2024. [9] Philip Daian, Steven Goldfeder, Tyler Kell, Yunqi Li, Xueyuan Zhao, Iddo Bentov, Lorenz Breidenbach, and Ari Juels. Flash boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability. In Proceedings of the 2020 IEEE Sym- posium on Security and Privacy (S&P) , pages 910–927. IEEE, May 2020. [10] De.Fi REKT Database. https://de.fi/rekt- database. Accessed 2024- 08-28. [11] DefiLlama. Bridge V olume. https://defillama.com/bridges. Accessed 2024-08-28. [12] emiliano. emiliano on x: they used a proof from one of the very first cross chain tx, 09 2024. [13] Christof Ferreira Torres, Antonio Ken Iannillo, Arthur Gervais, and Radu State. The Eye of Horus: Spotting and Analyzing Attacks on Ethereum Smart Contracts. In Proceedings of the 25th International Conference on Financial Cryptography and Data Security (FC) , pages 33–52. Springer, March 2021. [14] Shelly Grossman, Ittai Abraham, Guy Golan-Gueta, Yan Michalevsky, Noam Rinetzky, Mooly Sagiv, and Yoni Zohar. Online Detection of Effectively Callback Free Objects with Applications to Smart Contracts. Proceedings of the ACM on Programming Languages , 2(POPL):1–28, 2018. [15] Hexagate. Hexagate. https://www.hexagate.com/real-time-prevention, 11 2024. [16] Grant Ho, Mayank Dhiman, Devdatta Akhawe, Vern Paxson, Stefan Savage, Geoffrey M V oelker, and David Wagner. Hopper: Modeling and detecting lateral movement. In 30th USENIX Security Symposium (USENIX Security 21) , pages 3093–3110, 2021. [17] Chuanshan Huang, Tao Yan, and Claudio J Tessone. Seamlessly Transferring Assets through Layer-0 Bridges: An Empirical Analysis of Stargate Bridge’s Architecture and Dynamics. In Proceedings of the 2024 Web Conference , pages 1776–1784, May 2024. [18] Hypernative. Hypernative: Web3 security for chains. https://www. hypernative.io/solutions/chains, 11 2024. [19] Georgios Konstantopoulos and Vitalik Buterin. Ethereum Re- orgs After The Merge. https://www.paradigm.xyz/2021/07/ ethereum-reorgs-after- the-merge, July 2021. [20] Rongjian Lan, Ganesha Upadhyaya, Stephen Tse, and Mahdi Zamani. Horizon: A Gas-Efficient, Trustless Bridge for Cross-Chain Transac- tions. arXiv preprint arXiv:2101.06000 , January 2021.[21] Sung-Shine Lee, Alexandr Murashkin, Martin Derka, and Jan Gorzny. SoK: Not Quite Water Under the Bridge: Review of Cross-Chain Bridge Hacks. In Proceedings of the 2023 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) , pages 1–14. IEEE, May 2023. [22] Yue Li, Han Liu, and Yuan Tan. POLYBRIDGE: A Crosschain Bridge for Heterogeneous Blockchains. In 2022 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) , pages 1–2. IEEE, May 2022. [23] Zeqin Liao, Yuhong Nan, Henglong Liang, Sicheng Hao, Juan Zhai, Jiajing Wu, and Zibin Zheng. SmartAxe: Detecting Cross-Chain Vul- nerabilities in Bridge Smart Contracts via Fine-Grained Static Analy- sis.Proceedings of the ACM on Software Engineering , 1(FSE):249– 270, July 2024. [24] Kaixin Lin, Dan Lin, Ziye Zheng, Yixiang Tan, and Jiajing Wu. Detecting Fake Deposit Attacks on Cross-chain Bridges from a Network Perspective. In Proceedings of the 2024 IEEE International Symposium on Circuits and Systems (ISCAS) , pages 1–5. IEEE, May 2024. [25] Liquid. ChainSwap – GitHub. https://github.com/liqtags/crypto-rekts/ blob/main/rekts/ ChainSwap-2.md. Accessed 2024-09-04. [26] Robert McLaughlin, Christopher Kruegel, and Giovanni Vigna. A Large Scale Study of the Ethereum Arbitrage Ecosystem. In Proceed- ings of the 32nd USENIX Security Symposium (USENIX Security) , pages 3295–3312. USENIX, August 2023. [27] Multichain. Multichain (previously anyswap) on x. https://x.com/ multichainorg/status/1677096839731097600, 11 2024. [28] Nomad. Nomad Hack Data – Github. https://github.com/nomad-xyz/ hack-data. Accessed 2024-09-04. [29] Jakob Svennevik Notland, Jinguye Li, Mariusz Nowostawski, and Peter Halland Haro. SoK: Cross-Chain Bridging Architectural Design Flaws and Mitigations. arXiv preprint arXiv:2403.00405 , March 2024. [30] PANews. Another cross-chain bridge project was attacked, and Meter.io lost $4.2 million. https://new-qq-com.translate.goog/rain/a/ 20220206A05XNI00? xtrsl=zh-CN& xtrtl=en& xtrhl=en& xtrpto=sc. Accessed 2024-09-04. [31] PeckShield. Peckshield alert. https://alert.peckshield.com/, 11 2024. [32] Daniel Perez and Benjamin Livshits. Smart Contract Vulnerabilities: Vulnerable Does Not Imply Exploited. In Proceedings of the 30th USENIX Security Symposium (USENIX Security) , pages 1325–1341, August 2021. [33] pNetwork Team. pnetwork post mortem: pbtc- on-bsc exploit. https://medium.com/pnetwork/ pnetwork-post-mortem-pbtc-on-bsc-exploit-170890c58d5f, 11 2024. [34] Kaihua Qin, Liyi Zhou, and Arthur Gervais. Quantifying Blockchain Extractable Value: How dark is the forest? In Proceedings of the 2022 IEEE Symposium on Security and Privacy (S&P) , pages 198– 214. IEEE, May 2022. [35] rekt. Qubit Finance – REKT. https://rekt.news/qubit-rekt/. Accessed 2024-09-04. [36] Michael Rodler, Wenting Li, Ghassan O Karame, and Lucas Davi. Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks. arXiv preprint arXiv:1812.05934 , December 2018. [37] SlowMist Hacked – SlowMist Zone. https://hacked.slowmist.io/?c= Bridge. Accessed 2024-08-28. [38] SlowMist. Slowmist - focusing on blockchain ecosystem security (exchange security audit — wallet security audit — blockchain secu- rity audit — smart contract security audit — security consulting — defense deployment — blockchain threat intelligence — blockchain security). https://www.slowmist.com/, 11 2024. [39] THORChain. Post-mortem: Eth router exploits 1 & 2, and premature return to trading incident. https://medium.com/thorchain/ post-mortem-eth-router-exploits-1-2-and-premature-return-to-trading-incident-2908928c5fb, 11 2024. [40] THORChain. Thorchain incident 07.15. https://thearchitect.notion.site/ THORChain-Incident-07-15-7d205f91924e44a5b6499b6df5f6c210, 11 2024. [41] Andrew Thurman. Axie Infinity’s Ronin Network Suffers $625M Exploit. https://www.coindesk.com/tech/2022/03/29/ axie-infinitys-ronin- network-suffers-625m-exploit/, March 2022. [42] Tuan-Dung Tran, Kiet Anh V o, Duy The Phan, Cam Nguyen Tan, and Van-Hau Pham. ChainSniper: A Machine Learning Approach for Auditing Cross-Chain Smart Contracts. In Proceedings of the 9th International Conference on Intelligent Information Technology (ICIIT) , pages 223–230, February 2024. [43] Ke Wang, Yue Li, Che Wang, Jianbo Gao, Zhi Guan, and Zhong Chen. XGuard: Detecting Inconsistency Behaviors of Crosschain Bridges. In Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering (FSE) , pages 612–616, July 2024. [44] Chris Whinfrey. Bridge Hack List – GitHub. https://gist.github.com/ cwhinfrey/9fd1bbc31bbcff08fca242b90c7f875d. Accessed 2024-07- 02. [45] Molly White. Web3 is Going Just Great. https://www. web3isgoinggreat.com/charts/top. Accessed 2024-08-28. [46] Siwei Wu, Zhou Yu, Dabao Wang, Yajin Zhou, Lei Wu, Haoyu Wang, and Xingliang Yuan. DeFiRanger: Detecting DeFi Price Manipulation Attacks. IEEE Transactions on Dependable and Secure Computing , 21(4):4147–4161, July/August 2024. [47] Tiancheng Xie, Jiaheng Zhang, Zerui Cheng, Fan Zhang, Yupeng Zhang, Yongzheng Jia, Dan Boneh, and Dawn Song. zkBridge: Trustless Cross-chain Bridges Made Practical. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security (CCS) , pages 3003–3017, November 2022. [48] Jiashuo Zhang, Jianbo Gao, Yue Li, Ziming Chen, Zhi Guan, and Zhong Chen. Xscope: Hunting for Cross-Chain Bridge Attacks. InProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering (ASE) , pages 1–4, October 2022. [49] Mengya Zhang, Xiaokuan Zhang, Josh Barbee, Yinqian Zhang, and Zhiqiang Lin. SoK: Security of Cross-chain Bridges: Attack Surfaces, Defenses, and Open Problems. arXiv preprint arXiv:2312.12573 , December 2023. [50] Mengya Zhang, Xiaokuan Zhang, Yinqian Zhang, and Zhiqiang Lin. TxSpector: Uncovering Attacks in Ethereum from Transactions. In Proceedings of the 29th USENIX Security Symposium (USENIX Se- curity) , pages 2775–2792, August 2020. [51] Qianrui Zhao, Yinan Wang, Bo Yang, Ke Shang, Maozeng Sun, Hai- jun Wang, Zijiang Yang, and Haojie Xin. A Comprehensive Overview of Security Vulnerability Penetration Methods in Blockchain Cross- Chain Bridges. Authorea Preprints , October 2023. [52] Liyi Zhou, Kaihua Qin, Christof Ferreira Torres, Duc V Le, and Arthur Gervais. High-Frequency Trading on Decentralized On-Chain Exchanges. In Proceedings of the 2021 IEEE Symposium on Security and Privacy (S&P) , pages 428–445. IEEE, May 2021. Appendix In this section we provide a descriptive account of each of the attacks listed in Table 2 in Section 4, giving additional background on the bridge, how the attack transpired, and more details on our results using CrossChecked. 1. Ronin Bridge Background. Ronin bridge operates between Ethereum and the Ronin chain. It was hacked in March 2022. The attacker compromised the bridge’s private keys, allowing them to mint arbitrary amounts of assets. The attacker carried out two transactions, minting around $624 million USD worth of assets on Ethereum. Results. CrossChecked analyzed over 3 million bridge trans- actions and alerted on both attack transactions. 2. Poly Network Bridge (2021) Background. PolyNetwork is a cross-chain bridge that supports asset transfers between multiple blockchains (e.g., BSC, ETH, and Polygon). It was hacked on August 10th, 2021. The attacker exploited a bug in the bridge’s verifi- cation code, allowing them to insert their own keys and verify any malicious payload. Overall, the attacker stole around $600 million USD worth of assets on BSC, ETH, and Polygon. Results. In total, CrossChecked analyzed over 292 Kbridge transactions between ETH, BSC, Polygon and Poly Net- work’s liquidity pool. CrossChecked alerted on all 18 bridge transactions in the attack. In addition, CrossChecked also flagged one withdrawal that seemingly was relayed to the wrong destination chain. 3. Binance Token Hub Background. Binance Token Hub facilitates asset trans- fers between Binance Beacon Chain and Binance Smart Chain. It was hacked on October 7th, 2022. The attacker exploited a bug in Binance Bridge’s verification code, al- lowing them to verify carefully crafted malicious payloads. The attacker carried out the attack in two transactions, each minting 1,000,000 BNB on Binance Smart Chain (approxi- mately $580 million USD in total). Results. CrossChecked analyzed over 2M bridge transac- tions between Binance Beacon Chain and Binance Smart Chain. CrossChecked only alerted on the two attack trans- actions, citing the discrepancy between the amount given out and the amount received by the bridge. We end by noting that the partner deposit transactions returned by the Binance Token Hub’s API for two attack transactions are different than the ones suggested in some blogposts [12]. However, the attack transactions will be flagged regardless of which partner deposit transactions is used.4. Wormhole Background. Wormhole is a general-purpose cross- chain bridge that currently supports around 35 blockchains. It was hacked on February 2nd, 2022. Specifically, the attacker exploited a bug in Wormhole’s smart contract on Solana that allowed them to verify arbitrary unauthorized payload. The attacker executed one transaction and minted 120,000 wETH (around $350 million) on Solana. Results. In total, CrossChecked analyzed over 642k transac- tions across ten blockchains. It alerted on three transactions, one of which was the attack transaction. 5. Nomad Bridge Background. Nomad bridge support asset transfers across six blockchains. It was hacked on August 1st, 2022. The attacker exploited a bug in the bridge’s verification code, allowing them to verified any payload that had not been verified before. Shortly after the first a few attack transactions, a group of copycats joined the crusade of draining the bridge. In total, the reported loss was around $190 million. Results. CrossChecked analyzed over 37k transactions, and alerted on 962 transactions that transferred assets to 561 unique addresses. We found one dataset that reported 561 addresses, which matched exactly with the addresses we identified. We also found one Github repository that men- tioned identifying 960 transactions [28]. As mentioned ear- lier, we identified two more transactions. Upon manually inspection, we confirm that the two transactions were indeed malicious. 6. Harmony Bridge Background. Harmony bridge operates between ETH, BSC and Harmony. It was hacked on June 24, 2022. The attacker compromised two of the signing keys of the bridge, allowing them to mint arbitrary amounts of assets. In total, the attacker minted around $100 million worth of assets on BSC and ETH in 15 transactions. Results. CrossChecked analyzed over 336k transactions and alerted on 58 transactions, including all 15 attack transac- tions. 7. HECO Bridge Background. HECO bridge allows users to transfer assets between Huobi ECO Chain (HECO) and Ethereum. It was hacked on November 11th, 2023. The attacker compromised the bridge’s private keys, allowing them to sign arbitrary transactions. The attacker carried out eight transactions, minting around $86 million worth of assets on Ethereum. Results. CrossChecked analyzed over 23k transactions. All eight attack transactions were flagged by CrossChecked. 8. Qubit Bridge Background. Qubit bridge allows users to transfer assets between ETH and BSC. It was hacked on January 27th, 2022. The attacker exploited a bug in the deposit function, which allowed them to trick the bridge into believing that a deposit had been made when it had not. The attacker carried out 16 transactions, stealing around $80 million worth of assets. Results. CrossChecked analyzed over 260 transactions and alerted on all 16 transactions. 9. Anyswap Bridge Background. Anyswap bridge supported moving assets across many blockchains at the time of the attack. It was hacked on July 10, 2021. The attacker exploited a bug in the bridge’s verification code, allowing them to verify any ma- licious payload. The attacker carried out three transactions, minting around $7.9 Mworth of assets on Ethereum. Results. In addition to the previously reported transactions from the July 10, 2021, attack, Anyswap had more than 800 additional transactions that violated the balance invariant. 10. Poly Network Bridge (2023) Background. Shortly after the hack in 2021, PolyNet- work switched to a new set of smart contracts. It was, however, hacked again in August 10th, 2021. The attacker exploited a bug in the bridge’s verification code, allowing them to verify arbitrary payload. Overall, there were 136 reported transactions. Results. CrossChecked analyzed over 290k transactions and flagged all 136 transactions. CrossChecked also flagged 27 transactions that pointed to the same non-existent deposit transaction hash ( 0x0101... with 01 repeated 32 times). All of these transactions occurred on Aug 22, 2023 and withdrew funds from the bridges without backing deposits. In total, over $20 million worth of assets were withdrawn in these transactions. 11. Chainswap Bridge Background. Chainswap bridge support token transfers between five bridges and was hacked on July 10, 2021. The attacker exploited a bug in the bridge’s verification code, allowing them to verify any malicious payload. The attacker stole $4.4 million worth of assets on Ethereum and BSC using one address. Of particular note, unlike other bridges, Chainswap did not publicly disclose the list of bridge contract addresses. As such, we programmatically identified all potential bridge contract addresses by search- ing for the specific event signatures that known Chainswap bridge contracts emit. Results. CrossChecked analyzed over 53k transactions. CrossChecked alerted on 1136 transactions, all of whichwere executed by the single malicious address. We note that we are unable to find any public information on the list of transactions that were part of the attack, preventing us from verifying individual transactions. 12. Meter Bridge Background. Meter bridge allows users to transfer be- tween Meter’s own chain and a few EVM-based chains. It was hacked on February 5, 2022. The attacker exploited a bug in the bridge’s deposit function, where the attacker tricked the bridge into believing that a deposit had been made. In total, the attacker carried out 5 transactions, steal- ing around $4.3 million worth of assets. Results. CrossChecked analyzed over 14k transactions, alerting on all five attack transactions. Table 3 provides additional details on specific example bridge transactions that violate the balance invariant and have otherwise not been previously reported. For each ex- ample, the table lists the hashes of the paired deposit and withdrawal transactions, the blockchain, and the number of tokens transferred. If a deposit transaction does not exist or is otherwise invalid, we mark its chain and token as N/A. Bridge (Claimed) Deposit Transaction HashChain & TokenWithdraw Transaction HashChain & Token Wormhole #10x8bbb7befd198a5e90297f451fc43a9e9 0de083289a041c8af94116c785cf496dPolygon 0.5 WSOL5AiesW9pKrZvCCJM8QPWmqx...dkadV1wa PVLWfsnCMVQmyYaciLxEoSOL 650 USDC Wormhole #20x55d1e486a8e2102e07fd6270a03f05bb ee7b43bf27ebac97b95b98e068f6740ePolygon 4.3k MATIC0xbe81895b1c3172fd69b8d4d9bf726edf dc17083876c440f9414ff316999237d7A V AX 2.3k WMATIC Anyswap #1 0x01ba4719c80b6fe911b091a7c05124b6 4eeece964e09c058ef8f9805daca546bN/A 0xf015a6b06a13a08d3499ece17504d14a 95d6af3e04ae11f291dca22dbbf6c991BSC 5∗10−8 USDC Anyswap #2 0x01ba4719c80b6fe911b091a7c05124b6 4eeece964e09c058ef8f9805daca546bN/A 0x9e55b7295880dce76aa8af0f3e3f9e36 499ae0bdb28088a5924daf29c6132cebBSC 55k USDC Anyswap #3 0xe3b0c44298fc1c149afbf4c8996fb924 27ae41e4649b934ca495991b7852b855N/A 0x4f038804d0622d2eab15d21d902a3fdd 3bdfb5427bb5fd65b9eb0a41169534bePolygon 100k USDC Anyswap #4 0x0x000000000000000000000000000000 0000000000000000000000000000000000N/A 0x98aa9e94d4fd0a05c27eb13ac2e699e4 426c8dd9d57d04c0fa09cf4951eb2f94BSC 650k USDC Anyswap #5 0x0x000000000000000000000000000000 0000000000000000000000000000000000N/A 0xa67ac5dc308142f89409df89dc85e8fa b88c575b3adef77fbc8f51858b7bf7cbPolygon 50k USDC Anyswap #6 0x28b233a4dbda8b4dfae7245b8fff434d e95f6dbd101e1a9cb22a95ded1315a16Fantom 6.4k POPS0x76bdcfd5ddfa358bf4181556e3b4f1fd d2d648a246bfab91386bdfbd7b76d01fAvalanche 6.4k POPS 0xf0b5568dfd8a4559d30adc9dfc881875 210a3b9dfa680d392b33eb1d2cc86cfaFantom 6.4k POPS0xc86297f14f32a33232149025d4e8f8e5 0985d76ac1b7ccaf181501820c0b1cf7Avalanche 6.4k (any)POPS Anyswap #7 0x0x000000000000000000000000000000 0000000000000000000000000000000000N/A 0xde790e8dc59d8bae7ebdf89c4b75267a 6e0783219b32aebe83e112aac6c299f5Avalanche 54k USDC HECO #1 0x6f9d2e82aef87fc649198976974c05d4 c540dacca5043ffee619cc33f3ba4cf5ETH 5m USDT0x628e878fb723cf0dd838eb956ce78d23 b45b130876a625fd4d283e62ac2289f0HECO 5m USDT 0x6f9d2e82aef87fc649198976974c05d4 c540dacca5043ffee619cc33f3ba4cf5ETH 5m USDT0x27a1e6a66b6e0fc5fa805f7400dd0739 7bb92226926868a82afb44154a32128bHECO 5m USDT Harmony #1 0x559bc92656a6956a5ffe9eea6f14a5d5 993520e31a1a08551d5171ad8f658886BSC 5.3k BUSD0xdf3bf1a8227ede87d7905c026c3b6a35 04cc81399ebd08e1273e1a9dd2c748a9Harmony 5.3k BUSD 0x559bc92656a6956a5ffe9eea6f14a5d5 993520e31a1a08551d5171ad8f658886BSC 5.3k BUSD0x304801a2b33585e6867de0c403535588 979ce4d2cf41c6922223d3203589c39dETH 5∗10−18 BUSD PolyNet. #1 0x01010101010101010101010101010101 01010101010101010101010101010101N/A 0xd6b7f50e974311082eb4b413219f7198 cbf897af4e0f2e9202b10c6afe8fa0a2ETH 491 M PLT TABLE 3: Other flagged transactions. PolyNet stands for Poly Network 2023. Full transaction hash for Solana: 5AiesW9 pKrZvCCJM8QPWmqxsnRoQwHaQmX8NR9a8BFz3pmt2ypW67zgqeRWdkadV1waPVLWfsnCMVQmyYaciLxEo .
{ "id": "2410.01107" }
2105.11761
The Giving Game
This paper describes a basic model of a gift economy in the shape of a Giving Game and reveals the fundamental structure of such a game. Main result is that the game shows a community effect in that a small subgroup of players eventually keeps all circulating goods for themselves. Example applications are where computers are sharing processing power for complex calculations, or when commodity traders are making transactions in some professional community. The Giving Game may equally well be viewed as a basic model of clientelism or corruption. Keywords in this paper are giving, gift economy, community effect, stabilization, computational complexity, corruption, micro-economics, game theory, stock trading, distributed computing, crypto currency, blockchain.
http://arxiv.org/pdf/2105.11761v1
Peter Weijland
econ.TH
econ.TH
1 The Giving Game Dr. W.P. Weijland Delft University of T echnology May 2021 Keywords: Giving, gift economy, community effect, stabilization, computational complexity, corruption, micro -economics, game theory, stock trading, distributed computing, crypto currency, block chain . Abstract. Assume you are with N players in a room. One player has a ball. Once you have the ball you must choose a player – not being yourself – and pass the ball to her /him . The game repeats itself from then onwards . Every time you receive the ball you get a point. Question: which strategy is optimal to receive as many points possible? One strategy would be to play the ball to the player from whom you received the ball most times in the past, assuming this creates the best chance to receive the ball in return. Receiving the ball creates an increase of preference for the submitting player who has just granted you a point. This seems rational to do. A game described above is called a Giving Game . This paper revea ls the fundamental structure of such a game and how the chosen strategy works out. Main result is that the game necessarily stabilizes into a repetitive pattern within a subgroup – in this case: a pair – of players. Furth ermore, I will show that the path towards stabilization consists of a series of elementary cycles, each further enhancing the preferred pair. Example applications are where computers are sharing processing power for complex calculations, or when commodity traders are making transactions in some professional community. The name ‘Giving Game ’ has a positive connotation. However, it may e qually well be viewed as a basic model of clientelism or corruption. INTRODUCTION Assume we play the following game. We have N agents and one token. Initially, the token is assigned to one of the agents: the initial agent. The game proceeds to the next step as follows: th e agent with the token in possession submits its token to some other player, thus not being itself. Aim of the game is to maximize the number of tokens received over a certain period. We call this game The Giving Game. Once holding the token a strategy fo r any agent c ould be to assign the token to the agent from whom it has received the ball the most times in the past . The idea is to stimulate loyalty of those agents that are inclined to transfer the token to you. We will discuss how this strategy works ou t. Firstly, imagine we play the Giving Game without any history: no one has received any token from anyone else in the past. The initial agent passes its token to some other agent. This agent now has a preference for the initial agent and will return the b all to it. After the token has returned to the initial agent both agents have a mutual preference for each other: both have received a token from the other in the past. So, the token will be passed back and forth between the two players endlessly. T his ins tance of the Giving Game – with out history – is called the trivial game . 2 The trivial game immediately alternates between two agents , one of which is the initial agent. We refer to such pair of agents as a stability pair . The term ‘stability’ refers to the fact that the path eventually repeats itself in a forced loop (in this case between two agents) . The question rises what happens when the agents do have a history. For each agent such history consists of a count of tokens received from each of the other agents. The remainder of this paper is devoted to proving that in such cases the game still stabilizes into a stability pair, be it after some steps (Stabilization Theorem II.5) . We also analyz e which pairs of agents are potential stability pairs and how su ch stability pair emerges from the initial steps in the game (Cycle Theorem VI .6). I DEFINITION Let us further formalize the definition of a Giving Game, starting from N agents A, B, C, … and one token. We assume each agent keeps track of a list of N -1 pre ference values (non-negative integer numbers) assigned to every other agent. The game proceeds to the next step as follows: (1) the agent with the token in possession (the submitting agent ) submits its token to some other agent (the receiving agent ) with maximal preference value in the list; (2) the receiving agent increments the preference value of the submitting agent in its list, and becomes submitting agent of the next step. If we view the preference list of each agent as a column of values then these columns together form a preference matrix . Such matrix M may look as follows: Figure 1. A preference matrix. Submitting agents are in the top row. Receiving agents in the left column. Note that the diagonal cells have no preference values reflecting the fact that submitting agents cannot submit tokens to themselves . N OTATION Throughout this article we will write (X, Y) for the matrix cell at the intersection of column X and row Y . As a helpful tool, at the start of any step in the g ame we color the submitting agent in red, cells with maximum column value in blue and all other cells white, such as in : 3 Figu re 2. A colored preference matrix. In this particular example submitting agent C has a maximum column value at row D – i.e. at cell (C, D) ) – and will select agent D to submit the token to . The matrix is then updated by incrementing the value of cell (D, C) with 1 , and D becomes the next submitting agent. NOTATION We write | (X, Y) | for the value assigned to a cell, though we will also use abbreviations like ‘ (X, Y) = 2’, ‘ (X, Y) is incremented by 1’, or ‘ (X, Y) is maximal in the column of X ’ if that does not cause ambiguity . (Y, X) is referred to as the twin cell of (X, Y)1. |(Y, X) | is the twin value of (X, Y) and the color of (Y, X) twin color of (X , Y). Following the notions in the above, a giving game is defined by some initial pair ( A0, M 0) consisting of the initial agent and the initial preference matrix. From this initial pair the game develops into a game sequence ( Ai, Mi)i≥0 where each next pair fits with the rules of the game. To be more precise: DEFINITION I.1 Give n a finite number of N agents, a Giving Game is defined by a pair (A0, M 0), where A0 is some agent – the initial agent – and M 0 is so me preference matrix : an N xN matrix with non- negative integer values assigned to each cell except for those on the diagonal. DEFINITION I.2 Let G =(A0, M0) be a Giving Game. A game sequence of G consists of an infinite sequence ( Ai, M i)i≥0 where all A i are agents and all M i are preference matrices, and for all i : a) (Ai, M i)=G for i=0. b) |(Ai, Ai+1)| is maximal in the column of A i in M i, i.e.: (A i, Ai+1) is blue in M i. c) |(Ai+1, Ai)| in M i+1 has incremented by 1 compared to its value in M i. d) All other correspondi ng cell values in M i and M i+1 are equal. Agent A i is referred to as the submitting agent of step i , Ai+1 as its receiving agent , and cell (Ai, Ai+1) as the selected cell of step i. Note that in Definition I.2 the cell (Ai+1, Ai) is the twin cell of t he selected cell . In other words: the selection of a blue cell (A i, Ai+1) at step i causes its twin cell to be incremented by 1. A Giving Game G is deterministic if it has only one game sequence. Otherwise it is non- deterministic, implying that at some step n≥0 of some game sequence the submitting agent has a choice between two potential receiving agents (i.e. has at least two blue cells in its matrix column). A handy notion related to a game sequence is that of a game path : DEFINITION I.3 A (finite or infinite) sequence ( Ai)i≥0 is called a game path of G if all Ai are subsequent submitting agents of some game sequence of G. If A, B, C, D,… are agents we may also write ABCD… as a shorthand for a (finite segment of) a game path. 1 So the twin of a cell is equal to its diagonal mirror image in the matrix. 4 Clearly , not every sequence of agents is a viable game path since the initial matrix M 0 (and thereby all subsequent preference matrices) puts restrictions on whether such sequence fits with Definition I.2 . II STABILITY Let us go back to the trivial game in the introduction. It is easy to see that this is equivalent to the Giving Game with all values in the initial preference matrix put at zero. In this section we will generalize this result to hold for any Giving Game. NOTATION Let S = (Si)i≥0 be a sequence then for n ≥0 we use the following abbreviations: a) n|S = (Si)i≥n , hence: 0| S = S ; b) S|n = (Si)0≤i<n and S |0 = ∅, i.e.: the empty sequence. So S |n is the segment of the first n items in the sequence. n|S is the remaining infinite tail of the same sequence S . DEFINITION II.1 A pair of agents { A, B} is a stability pair of game G if for some game path S of G there exists n such that either n |S = ABABAB… or n |S = BABABA… Furthermore, a pair of agents { A, B} is a stability pair of a preference ma trix M if it is a stability pair of G =(C, M ) for some agent C. LEMMA II.2 Let G =(A, M) be a Giving Game. Suppose (A, B) and (B, A) are both blue cells in M . If at the initial step A selects B then the game path is equal to ABABAB… PROOF Since (A, B) is bl ue, B is maximal in the column of A and according to Definition I.2b agent A may choose B at step 0. Following Definition I.2c the value of (B, A) will be incremented. Since it is blue in M it will become single maximum in the column of B . But then in the next step B must choose A thereby increasing the value of (A, B) which in turn becomes single maximum in the column of A . By induction the game path is equal to ABABAB… □ Note that this Lemma is a generalization of the argument for the trivial game at the introduction. L EMMA II.3 Let G be a Giving Game. A pair of agents { A,B} is a stability pair of G if and only if there exists a game path of G containing ABA. The proof resembles the proof of Lemma II.2 and is left to the reader. Later we will see that the Lemma can be further generalized to “…containing both steps AB and BA ”. Also this proof is left to the reader. LEMMA II.4 Let G =(A, M) be a Giving Game. If (A,B) and (B,A) are both white cells in M then ABA is not a segment of a game path of G. PROOF It follows from Definition I.2 that a cell value can only be incremented if its twin cell is blue. Thus the values of (A,B) and (B,A) remain unchanged, and since cell values cannot decrease none of these cells can ever turn blue. □ THEOREM II.5 (STABILIZATION ) Every game path eventually alternates between two agents. PROOF At every step in the game path a blue cell is selected in some column of a game matrix. If its twin ce ll is also blue, then Lemma II.2 applies. So assume at all steps twin cells are white. Let MAX be the maximum of all values in the initial matrix M . In each step a white cell is incremented and since the value of that white cell is smaller than 5 MAX, the ma ximum value in any subsequent matrix is also equal to MAX. Now if we have N agents, we have N.(N -1) cells in the matrix. So after N.(N -1).MAX+1 increments , at least one of the twin cells must contain a value ≥MAX. But then it cannot be white. Contradiction. □ III COLORED PAIRS From the Stabilization Theorem II.5 we know that every game path stabilizes eventually. We may wonder how this stability pair is ultimately created in the game. We refer to the long alte rnating tail of a game path as the stability phase of that path. The initial part of a game path until the stability phase is referred to as the erratic phase emphasizing its seemingly hectic nature. It is where choices of individual agents in the game determine which stability pair eventually emerges. Before we formally define the stability and erratic phase, let us take a closer look at how the Giving Game is played. EXAMPLE Let us look again at the matrix in Figure 2: • Starting from C the game immediately stabilizes into CDCDCD… since C has only one maximum to choose from (i.e.: at row D ), so we get CD… . Since both (C,D) and (D,C) are blue cells Lemma II.2 applies. A twin pair of blue cells is called a blue pair . Lemma II.2 states that if the submitting agent selects a cell from a blue pair, then the game stabilizes immediately . • Starting from B the game proceeds as BCDCDCD… . Note that while B selects C, the cell value of (C,B) is incremented with 1 (increments from 2 to 3). However, since the maximum value of C’s column is 4, the color of (C,B) remains white. A twin pair of which one cell is blue and the other is white is called a turquoise pair . Of such pair only the blue cell can be selected by the submitting agent (by def inition) and its twin cell may stay white (as in this case) or turn blue (for example if the maximum value in C’s column would have been 3), thus creating a blue pair in the next step’s preference matrix. • Starting from A things are getting slightly more co mplex. The game proceeds in either of two ways: AB… or AD… . Both cells (A,B) and (A,D) are blue and (B,A) and (D,A ) are white, so in either case A selects a turquoise pair. The two cases develop as follows: 1. In the case of AB… note that (B,A) is incremented with 1 and turns blue. Now B chooses either A (with which it then forms a blue pair) to stabilize at ABABAB… (stability pair { A,B}), or C (with which it forms a turquoise pair) to stabilize at ABCDCDCD… (stability pair { C,D}). 6 2. In the case of AD… we find that the value of (D,A) increments from 0 to 1 thereby turning blue. Now D has a choice between A and C both of which form a blue pair with D . So the game stabilizes either as ADADAD… or as ADCDCDC… . We count four stability pairs of this game out of six possible combinations of two agents. Note that { A,C} and { B,D} are the pairs missing: they are twin pairs of white cells, referred to as white pairs , and by Lemma II.4 they are no stability pair s. [END EXAMPLE ] From the Lemmas II.2 and II.3 three we learn that blue pairs are stability pairs whereas white pairs are not. The kind missing are the turquoise pairs. We will use this observation in a few moments. IV FRAMES Before we continue let us present a useful simplification of the Giving Game that helps us find stability pairs. We introduce the concept of a frame as a preference matrix without values. Such matrix inherits the structure of the preference matrix, with the same agents and the same cell colors but with no cell values to increase. It is referred to as the frame of a preference matrix and looks as follows: Figure 3. The frame of the preference matrix in Figure 2. We can generalize the concept of a game path to that of a frame path as follows: DEFINITION IV.1 Let F be the frame of some preference matrix . A frame path of F consists of an infinite sequence ( Ai)i≥0 where all A i are agents in F , and (A i, Ai+1) is blue in the column of A i in F . A finite frame path is a finite segment of a frame path. Note that the frame F remains unchanged along its frame paths . For that reason the concatenation of two ( finite) frame paths is again a frame path. DEFINITION IV.2 Let F be a frame . B is reachable from A – notation: A ⊒F B – if there exists some finite frame path A…B of F. DEFINITION IV.3 A and B are equivalent – notation: A ≡F B – if A ⊒ F B and B ⊒ F A. LEMMA IV.4 ≡F is an equivalence relation. The proof is left to the reader. The equivalence relation ≡F creates equivalence classes A, B, C, … (sets of equivalent agents) that are partially ordered as follows: DEFINITION IV.5 Let F be a frame and A and B sets of equiv alent agents in F , then we define: A ⊒F B if for some agents A ∈A, B∈B: A ⊒F B. For each agent A ∈A we thus obtain a tree structure with A at the top node and classes of reachable agents a t lower nodes . Along each path in the tree classes are mutually exclus ive. Edges in the tree are one direction only: lower nodes are reachable from the 7 higher but not the other way around . For example, starting from A the structure of the frame of Figure 3 looks like: Figure 4. Equivalence classe s in Figure 3 in a tree. Note that if we would put { C,D} at the top of the tree we would just have one single node, since no other classes are reachable from { C,D}. Instead of a tree, we can also use the structure of a directed graph as in Figure 5 Figure 5 . Equivalence classes in Figure 3 in a directed graph. Such directed graph consists of all equivalence classes of F , not only those reachable from the top. DEFINITION IV.6 A finite game (frame) path is elementary if all its agents occur only once. LEMMA IV.7 Let F be a frame. If there exists a frame path from A to B (i.e.: A ⊒F B) then there also exists an elementary frame path from A to B . PROOF We provide an intuitive proof. Consider a frame path A…B . Suppose this fr ame path has a multiple occurrence of some agent C, th en we have: A…C…C…B . Since F remains unchanged along the path, at each step each agent has the same choice options to continue. But then we can shortcut the path to obtain A…C…B , reducing C…C to a single occurrence C. By repeating this argument for every multiple occurrence of some agent we find an elementary p ath A…B . □ The segment C…C that is eliminated from the path is referred to as a cycle . Cycles play an important role in the creation of new stability pairs as we will see later. DEFINITION IV.8 Let F be a frame. A cycle is a finite frame path from some agent to itself. It follows directly from Lemma IV.7 that each cycle can be reduced to an elementary cycle starting from the same agent. 8 V ERRATIC PHASE AND STABILITY PHASE In section III we already spoke of the concept of erratic and stability phase. We formalize these notions in a definition. DEFINITION V.1 Let G =(A,M) be a Giving Game and S =(Ai, M i)i≥0 be a game sequence of G . Let n≥0 be the smallest n such that (A n+1, An) is blue in M n, then the subsequence S |n is the erratic phase of S and n |S is the stability phase of S . By Theorem II.5 that such n exists for every game sequence S , so the definitio n is sound. It says that the stability phase starts at the first step n in S with a blue twin. It follows from Lemma II.2 that from this step n all pairs selected thereafter are blue since all cells (An, An+1) are blue (by Definition I.2). As a consequence we have: COROLLARY V.2 In the stability phase all selected pairs are blue and in the erratic phase all selected pairs are turquoise (see Section III) . In the erratic phase every step consists of selecting a blue cell from the column of the submitting agent such that its twin cell is white. LEMMA V.3 Let S =(Ai, M i)i≥0 be a game sequence. If for some n cell ( An, An+1) is blue in M n and white in M0 then step n is in the stability phase of S . PROOF Let (B, C) be blue in Mn and white in M 0. Then for some k <n cell ( B, C) must turn blue for the first time: it is white in M k and blue in Mk+1. In that case the value of cell (B, C) must have incremented at step k, which only results from C selecting B . So ( C, B) must be blue in M k (in order to select B ) and it wil l stay blue in M k+1, since (B, C) and (C, B) cannot change color at the same step. Now both (B, C) and (C, B) are blue in M k+1. By Definition V.1 step n is in the stability phase . □ This lemma implies that during a game sequence blue cells from the initial matrix cannot change color until the sequence has reached its stability phase. This leads to the following insight: LEMMA V.4 The erratic phase of a game path of M is also a fram e path of M . PROOF By Lemma V.3 we know that no blue cells from the initial matrix M turn white during the erratic phase. All newly created blue cells originate from white twin cells that are incremented at some step . At the step they are created they form a blue pair with the (blue ) selected cell. By Definition V.1. this step cannot lie in the erratic phase. □ In summary we look at the following. At each step of the game the submitting agent selects a receiving agent by picking a blue cell from its column while updating its twin cell (i.e.: adding 1 to its value) before the next step begins. If the twin of this blue cell is also blue, then we are in the stability phase ( Definition V.1). As long as it is white we are in the erratic phase. While the game progresses in the erratic phase, white cells may turn blue but never the other way around: blue cells cannot turn white, unless in the stability phase (Lemma V.3 ). VI CYCLES Suppose we put ourselves the task to find out w hether { A, B} is a stability pair , given some initial matrix M . How would we be able to decide? Some basic cases are trivial. For instance, if { A, B} is a blue pair in M then it is a stability p air starting from initial agent A or B. It is also a stability pair starting from some other initial agent C provided A or B is reachable from C (Definition IV.2). If {A, B} is a white pair, we know that it cannot be a 9 stability pair regardless the initial agent (Lemma II.4) . So the only case left is when { A, B} is a turquoise pair in M . (*) In this section let us assume (A, B) is a blue cell in M and twin cell (B, A) is white. We are looking for game paths stabilizing at ABABAB… or BABABA… Note that any such game path must have some step where (B, A) turns blue (since otherwise step BA would not be valid). This implies that the value in cell (B, A) has ‘caught up with’ the maximum of column B during the err atic part of the game path. Values of blue cells can only change in the stability phase since they are the twin of some other blue cell and blue pairs only occur in the stability phase (Corollary V.2) . So the maximum value that (B, A) catches up with is al so a maximum of column B in M . D EFINITION VI.1 The gap of a cell (X, Y) in a game matrix M – notation: gap M(X, Y) – is equal to the difference between the maximum value in column X of M and the cell value of (X, Y) . The gap of cell (B, A) can be closed ( i.e.: become zero) during the game by selecting (A, B) sufficiently many times. In fact, since at every selection of (A, B) the gap decreases with 1 we need to select cell (A, B) precisely gap M(B, A) many times in order make cell (B, A) turn blue. This leads to a simplification of the original question: COROLLARY VI.2 A turquoise pair is a stability pair of a game ( C, M) if and only if there exists a game path of ( C, M ) with at least gap M(B, A) many occurrences of step AB . EXAMPLE Let us look again at the matrix in Figure 2: Pair { A, B} is a turquoise pair with (A, B) blue and (B, A) white. Cell (B, A) has value 0. The maximum in column B is 1 at cell (B, C) . So the gap of (B, A) = 1 – 0 = 1. So we are looking for game paths w ith at least one occurrence of step AB . Obviously, in ( A, M) we find such path: AB itself. However, in the games ( B, M), (C, M ) and ( D, M) such path does not exist. [END EXAMPLE ] So let us zoom in further on the structure of a game path with stability pair {A, B}. Such a path starts with an initial agent – say: C – and has at least gap M(B, A) many occurrences of AB . So it looks like: C…AB…AB …AB…ABABAB… In the following we will define a reduction system to reduce any game path with stability pair { A, B} to a ‘short er version’ of the same path. Such reduction makes use of reduction rules as follows . REDUCTION SYSTEM VI.3 Let M be an initial matrix. Consider a game path of M with arbitrary initial agent and with stability pair { A, B}. We look at the following two -rule reduction system: (1) If the initial segment of the path until the first occurrence of step AB is not empty, then we cut it off making the reduced game path s tart with AB while leaving the rest of the path unchanged . 10 (2) If between any two consecutive steps AB …AB some agent ( including A or B ) has a multiple occurrence of C, as in: AB…CDEFC…AB , then delete CDEF to produce the reduced form AB…C…AB . [END REDUCTION SYSTEM ] Obviously, reduction rule (1) can only apply once to a game path . The second, however, can be applied as many times until all multiple occurrences of agents between consecutive steps AB have been eliminated . LEMMA VI.4 Reduction system VI.3 preserves the following properties: (i) the reduced game path is again a valid game path; (ii) the reduced game path maintains stability pair { A, B}. PROOF Let S be a game path of ( C, M) with stability pair { A, B}. Suppose S’ is the erratic phase of S and S its stability phase. Hence: S = S’ S. By Lemma V.4, S’ is also a frame path of M . The proof consis ts of five claims: CLAIM 1: Reduction system VI.3 only applies to segments of S’. Rule ( i): If any step before the first occurrence of AB has a blue twin, it is in the stability phase of S (Corollary V.2). Then it must be either AB or BA . Step AB cannot o ccur before its first occurrence. S ince (B, A) is white in M (by (*)) step BA can not be a valid step before the f irst occurrence of AB . Contradiction. Rule ( ii): The stability phase has only occurrences of AB with no other agents between them. So rule (2) cannot apply outside the erratic phase of S . So let us assume Reduction system VI.3 reduces S’ to S’’. CLAIM 2 : S’’ is a turquoise frame path of M . Rule ( i): Trivial . Rule ( ii): If we cut out a cycle segment from S’ the resulting path S’’ only consists of steps from S’ . So S’’ remains a turquoise frame path of M 2. CLAIM 3 : S’’ is a turquoise game path of M . Since S’’ is a turquoise frame path it only selects blue cells in M with white twin cells. Suppose that after some steps in S’’ one of th ese twin cell s – say: (Y, X) – has turned blue. Then blue cell (X, Y) must have been selected at least gap M(Y, X) many times. The number of occurrences of (X, Y) in S’’ cannot be higher than that in S ’ so (Y, X) must also turn blue at some step to form a blue pair in S ’, contradicting that S’ is erratic. CLAIM 4: The last agent of S ’’ is equal to that of S’ , or S’ is fully deleted. Rule ( i): Trivial. Rule ( ii): Any cycle C…C deleted from the erratic phase is replaced by C and therefore the last agent of the erratic phase remains in place. CLAIM 5: S’’ S is a game path of M with stability pair { A, B}. S has stability pair { A, B} so its erratic phase S’ contains precisely gap M(B, A) many occurrences of step AB (Corollary VI.2). Since these occurrences are preserved by Redu ction system VI.3 we find equally many occurrences of AB in S’’. Therefore {A, B} is a blue pair after the last step of S’’. The last agent of S’ – say C – is unaffected by Reduction system VI.3. Since it is in the erratic path S’’ no blue cell in C’s colu mn has change color, so C may choose A or B , whichever is first in the stability phase. So the concatenation S’’S is a game path of M with stability pair { A, B}. □ 2 Note: if we would cut out non- cyclic segment s from S’ this may no longer hold, since we t hen may create steps in S’’ that are not present in S’ . 11 DEFINITION VI.5 A game path of M with stability pair { A, B} is in normal form if none of the reduction rules in VI.3 apply. The following Corollary follows immediately from the construction of Reduction system VI.3: COROLLARY VI.6 (C YCLE THEOREM ) 1. {A, B} is a stability pair of M if and only if some game path in normal form stabilizes at {A, B}. 2. A normal form path starts with its stability pair as the first step. 3. The erratic phase of a normal form is built from the concatenation of a series of elementary cycles AB…A . All of the elementary cycles from Corollary VI.6.3 are present in the frame of M , so we do not have to look further than the initial matrix to identify them. Also note that agents in a cycle are equivalent (Definition IV.4) and so a normal for m game path has only agents from one single equivalence class, as they all contain A and B. It is not difficult to see that if we would change the order of occurrences of the elementary cycles in Corollary VI.6. 3, then the sequence remains a valid game path stabilizing at { A, B}. So in the process of finding a game path stabilizing at { A, B} we need to focus on which cycles are involved and how many times each of them occur s (the ‘power’ of the cycle) . E XAMPLE A Giving Game ‘ produces ’ new stability pairs ( i.e.: not blue in the initial matrix) by running cycles. In Figure 6a below we illustrate how this works. Figure 6 a: All agents in one cycle. Note that the frame of this matrix is fully deterministic: it does not leave choices open to agents. Also note that the matrix has no blue pairs. So any stability pair must be created through out the game. Further, check that ABCDA… is a cycle. Following the steps in this cycle the twins of the selected cells are incremented by Definition II.2. These incremented values are marked red in the left- hand matrix in Figure 6b : Figure 6b: All agents in one cycle (cont ’d). 12 Still, blue cells remain blue and white cell s remain white. In the second run of the same cycle we obtain ABCDABCDA… – in shorthand: ( ABCD )2 A… – and we arrive at the second matrix where the red twin cells are incremented again. At the third run we have (ABCD )3 A… and we obtain the t hird matrix with cell (A, D) turned blue reflecting the fact that its value now matches the maximum value in its column. Now , A has two options to choose from: either AB… or AD… . The first option AB … leads to a fourth run of the same cycle, so we have ( ABCD )4 A… to ar rive at the right- hand matrix. This time A only has one option to continue by choosing D. So the path stabilizes at … ADADAD… to form (ABCD )4 ADADADA… . It is easy to check that the second option AD… leads to the s ame stability pair to form (ABCD )3 ADADADA… . [END EXAMPLE ] So, to decide whether { A, B} is a stability pair of a matrix M , we – theoretically – may wish to list all elementary cycles in M and see if we can add powers to them such that: (1) {A, B} occurs precisely gap M(B, A) many times ; (2) No pair (X, Y) occu rs more than gap M(Y, X) many times. Let us take a closer look at the matrix in Figure 6a. The matrix has one elementary cycle. The steps in the cycle are AB, BC, CD, DA and the values i n their twin cells (B, A), (C, B), (D, C) and (A, D) are 2, 0, 1, 1 respectively. The maximum values in their respective columns B, C, D and A are : 7, 5, 9 and 4. So the respective gaps (Definition VI.1) of the twin cells (‘twin gaps’) are 5, 5, 8, 3: the lowest being 3. This explains that after three runs of the cycle the first twin cell to turn blue is (D, A). This little example also shows that – in order to make { A, B} a blue pair – we cannot simply run the cycle 5 times: if we do, at the fourth run { A, D} would irreversibly deviate into stability and the game will never get back to B . We cannot run any cycle more times than its minimal gap of twin cells, unless it is { A, B} itself that has the minimal twin gap . In such case it is at pole position in th e cycle. The minimal twin gap is the order of the cycle. Lemma VI.7 If {A, B} is at pole position in some elementary cycle of M , then it is a stability pair. If {A, B} is not in pole position at any elementary cycle th en to determine whether it is a stability pair gets more tricky . One could think that we simply had to run each elementary pair AB…A as often as its order . Since all cycles contain AB we only need to check whether the sum of all those orders is at least gap M(B, A). This would work indeed if all cycles would be disjoint in steps (apart from step AB , ofcourse). If not, running cycle 1 may lower the gap of steps in cycle 2 and thereby its order . In other words: orders of cycles are not mutually independent unless the cycles are disjoint. The tric ky thing now is that we must find out which cycle to run how many times so as to maximize the overall number of runs. I have not found an efficient algorithm to achieve this. I leave the question open here whether an algorithm exists with less than exponential complexity in relation to N . Part of the complexity of the algorithm comes from the number of elementary cycles in a matrix M . This determines how many elementary cycles in a game we must evaluate. We have bad news: Lemma VI.8 The number of elementar y cycles may grow exponentially with N . P ROOF Consider the matrix in Figure 7. Let us say M6 is the smaller matrix with six agents A…F . If we add column and row G , then we create a larger matrix M7 , and also M8 13 by adding H . This way we build a series of m atrices M k for any natural num ber k. All matrices only have turquoise pairs. Every next matrix inherits all cycles from the previ ous one . CLAIM: F or all even k and every elementary cycle AB…A in M k there is a unique elementary cycle in M k+1 that does not exists in M k. Thus we prove that M k+1 has at least twice as many elementary cycles as M k. Figure 7 : Building matrices with only turquoise pairs . We will prove the CLAIM for k =6 and leave the general proof by induction to the r eader. So we will prove that M7 (with agents A,…,G ) has at least twice as many elementary cycles as M6 . Now let us say w e have odd agents A, C, E, G,… and even agents B, D, F , H… Note that: I. Agent B can only select odd agents . II. In M7 agent G can select all odd agents . Assume we have an elementary cycle AB …A in M 6. The cycle cannot be ABA since all pairs in M 6 are turquoise. L et X be such that the cycle in M 6 is equal to ABX…A . Clearly, ABX…A is also a cycle in M 7. X is an odd agent, since it is selected by B (property I ). In M7 agent G can select X , since X is odd ( property II). As G is odd, B can select G ( property I). So ABGX…A is an elementary cycle in M7 . So each elementary cycle AB…A in M6 has two unique images in M7 : AB…A and ABG…A . But then M7 has at least twice as many elementary cycles AB…A as M6 . □ So simply listing all elementary cycles and find the optimal combination of powers is not the way to go for large N unless the frame of the matrix in which agents are ordered has some regular pattern to it. VII AFTERMATH Back in 1980 my friend Jan Wielemaker – fellow member of the student society SSRE – revealed to me how social relations really work : ‘every interaction with someone else leads to a social credit/ debet that adds to a net positive or negative balance of favours’. The fact that I still remember his words means they made an impression, which – however – did not materialize in action until 2014, when t he original idea of the Giving Game struck me as an rudimentary model of the phenomenon he pointed out. At the time, I was working on a mathematical model to restore some equilibrium result between supply and demand in the context of a ‘gift economy’ ([4]). An old pub lication by Kiyotaki & Wright [6 ] inspired me to l ook at game theoretical models of exchange of goods. Thus the trivial model (section I) emerged as a rudimentary form of a giving 14 game that provides stabilization, a property comparable to a supply and demand equilibrium. Non- trivial extension of this model provided t he subject of this publication. The concept of ‘giving’ in the sense of asynchronous transactions – comparable to promises [1], altruistic forms of giving at the benefit of a ‘warm glow’ [2, 3] , or the ‘favours’ of Jan Wielemaker – can be posed opposite to a ‘tit for tat’ exchange trade economy where every transaction consists of an economically neutral transfer of assets. The name ‘ Giving G ame ’ has a positive connotation. H owever, it may e qually well be viewed as a basic m odel to describe the mechanics of clientelism or corruption. The Giving Game as an attempt to understand the notion of ‘giving’ in the economical sense . It allows for many topics of f uture research. Let me briefly mention some: Stability and Community Effect The standard game presented in this paper has the pivotal stabilization theorem (Theorem II.5) as a center characteristic. The resulting stability pair may be looked at as a ‘commu nity’ that eventually holding the token for itself. My vision is that this concept can be extended to more complex games while still preserving the existence of communities as objects of stabilization. Such complex games may have added features, such as fo r example: - Multiple tokens , possibly each with a different ‘weight’ reflected by different increments of cell values ; - Introduction of non- durable tokens in this game, for example by adding a decay period of some fixed number of steps in the game; - A ‘hold’ option for submitting or receiving agents: they may be temporarily unavailable for receiving (saturation) or submitting (keep stock) tokens. One aim of my research is to identify under which conditions we can restore the Community Effect in the form of a community of agents circulating certain tokens amongst themselves (a stability pair is a simplified version of such community). Economic modelling The game extensions in the previous paragraph already create a micro -economic model of value transactions. A way to look at the p reference matrix is like that of a historical balance of transactions that have taken place in the past (see F igure 6 ). Column values represent tokens received / consumed whereas row values represent tokens submitted / produced . So, for each agent r ows represent the distribution of production units across all agents. C olumns represent the distribution of units consumed across all agents. Figure 6 : Preference matrix as a scheme of production and consumption . 15 In Figure 6 total production and consumption are in balance, which in general may not be the case. Game Theory In The Giving Game we have introduced a decision rule for submitting agents to select a receiving agent. In what sense can this rule be regarded as an ‘optimal strategy’ in the game theoretical sense of the word? Can we define a game space of potential strategies where such decision rule forms a Nash Equilibrium, i.e.: a strategy that no individual agent can improve? Computational Complexity I have shown that any game path leading to a stability pair in the game has a normal form ( Corollary VI.6). Can we establish some efficient (polynomial) algorithm to calculate that such path exists , given a matrix M and a pair { A, B}? Or can we prove it equival ent to some well -know problem with exponential complexity and prove the opposite ? Crypto Currency A preference matrix is, in fact, a simplified accumulated version of a ledger of all past transactions [7, 8] . See also Figure 6. Such ledger i s a common e lement of many – if not all – crypto currencies. Can we relate b lock chain technology to the Giving Game described here? Applications I imagine several applications of the theory in this paper . I mention two: - Firstly, in a network of distributed computing systems individual processors are at continuous search of idle processing power elsewhere in the network to commission partial tasks of computation to them [5]. A strategy of mutual preference – based on historical exchange of processing power – may enhance their chances to succeed their tasks in the future. - Secondly, think of professional commodity traders trading vast amounts of stock with other traders every day. Their individual mission is to buy at the lowest price and sell at the highest. However, at a higher level patter ns of preference may emerge between traders that share a track record of positive mutual benefits (e.g.: “ he saved my ass the last few times”) causing a preference bias towards each other at a lower than ‘best price’ level. This may cause inefficiency in a – relatively small – community of traders worldwide. VIII. REFERENCES 1. J.A. BERGSTRA AND M. BURGESS , A Static Theory of Promises , ArXiv 0819.3294v3, 2013. 2. J. A NDREONI , Giving with Impure Altruism: Applications to Charity and Ricardian Equivalence, The Jour nal of Political Economy Vol 97, Issue 6, 1989, 1447 -1458. 3. R. B EKKERS AND P. WIEPKING , A Literature Review of Emperical Studies of Philanthropy: Eight Mechanisms that Drive Charitable Giving, Sage Publications 2010. 4. W.P. Weijland, Mathematical Foundations for the Economy of Giving , ArXiv Categories: q -fin.GN, Report 1401.4664, 2014. 5. A. Karadimas, Relating Economy of Giving to Peer- to-Peer File Sharing Technology , University of Amsterdam, 2014. 16 6. N. Kiyotaki & R. Wright, On Money as a Medium of Exchange, Journ al of Political Economy , vol. 97, no. 41 K 1989, The University of Chicago , 1989. 7. A. Oberhauser, Decentralized Public Ledger as Enabler for the Gift Economy at Scale , VU University Amsterdam, 2014. 8. J.A. Bergstra and W.P. Weijland, Bitcoin: a Money -like Inf ormational Commodity , ArXiv categories: cs.CY, Report 1402.4778, 2014.
{ "id": "2105.11761" }
2403.03504
Graph Visualization for Blockchain Data
In this report, we introduce a novel approach to visualize extremely large graphs efficiently. Our method combines two force-directed algorithms, Kamada-Kawai and ForceAtlas2, to handle different graph components based on their node count. Additionally, we suggest utilizing the Fast Multipole method to enhance the speed of ForceAtlas2. Although initially designed for analyzing bitcoin transaction graphs, for which we present results here, this algorithm can also be applied to other crypto currency transaction graphs or graphs from diverse domains.
http://arxiv.org/pdf/2403.03504v1
Marcell Dietl, Andre Gemünd, Daniel Oeltz, Felix M. Thiele, Christian Werner
cs.DS, cs.DM
cs.DS
Graph Visualization for Blockchain Data Marcell Dietl2, Andre Gem¨ und1, Daniel Oeltz1, Felix M. Thiele1, and Christian Werner2 1Fraunhofer Institute for Algorithms and Scientific Computing SCAI, Schloss Birlinghoven, 53757 Sankt Augustin, Germany. 2frontmark GmbH, Taunusstraße 63, 65183 Wiesbaden, Germany. February 2024 Abstract In this report, we introduce a novel approach to visualize extremely large graphs efficiently. Our method combines two force-directed algo- rithms, Kamada-Kawai and ForceAtlas2, to handle different graph com- ponents based on their node count. Additionally, we suggest utilizing the Fast Multipole method to enhance the speed of ForceAtlas2. Although initially designed for analyzing bitcoin transaction graphs, for which we present results here, this algorithm can also be applied to other crypto currency transaction graphs or graphs from diverse domains. 1 Introduction Blockchain technology is gaining increasing importance across various fields such as healthcare [8], supply chain management [18], finance [17], energy [1], voting systems [11] and more [22]. As the significance of blockchain technology contin- ues to expand, there is a corresponding rise in the demand for methodologies to analyze blockchain data. A crucial aspect of such methodologies is the develop- ment of algorithms that facilitate data visualization to enable users to discern underlying patterns and structures with greater clarity. In this report, we dis- cuss an approach to visualize so-called transaction graphs that typically arise in the context of crypto currency data. Here, in contrast to other approaches, we put special focus on the efficiency of our method w.r.t. the number of nodes and edges in the graph to handle the massive amount of transaction data. It is worth noting that the algorithm proposed herein is not limited to transaction graphs but can be employed in scenarios where large graphs require visualization. Such scenarios may also occur within the domains mentioned earlier. 1arXiv:2403.03504v1 [cs.DS] 6 Mar 2024 Figure 1: Number of bitcoin transactions and addresses on a monthly basis. 2 Bitcoin Transaction Graphs Bitcoin is a digital currency that has experienced significant growth and pop- ularity since it was launched in 2009. The number of bitcoin transactions and new addresses has significantly increased over time, as we can see in Figure 1, which shows the history of the number of transactions and new addresses on a monthly basis. Bitcoin is not issued by any central organization. Instead, it operates with a public ledger, also known as the blockchain [16]. Therefore, bitcoin, among other crypto currencies, provides a great framework for studying transaction behavior. The transaction graphs that arise typically become very large and, thus, hard to process. Bitcoin processes around seven transactions per second, which sums up to around half a million transactions a day. Even worse, each transaction can contain many participating entities. The bitcoin transaction data is encoded in the blockchain. The blockchain consists of many blocks organized in a linear ordering over time, see Figure 2 for a schematic illustration of the chain. Each block has two main parts: the header section and the list of transac- tions. The header section contains general information about the block, such as the time it was created and a reference to the previous block. The list of transactions, on the other hand, is composed of inputs and outputs. Inputs re- fer to entities that send value, while outputs refer to entities that receive value. Each output contains a value to be received and a script that must be solved to authorize the spending of the value. Each input, on the other hand, consists of a hash of a previous transaction and a script that solves the problem to one of the outputs, thereby authorizing the spending of its value. It is worth noting that no value is required as an input since it spends the entire amount of a 2 Figure 2: Schematic illustration of a blockchain. previous output. In most cases, both the input and output scripts follow one of a couple of standardized formats, where the output problems, containing a public key, can easily be solved with the knowledge of a private key. The public keys can be interpreted as addresses. From this, we can build a first transaction graph, the vertices being the addresses and the transactions being directed hyperedges. Working with hyperedges, albeit structurally encoded into the bitcoin trans- action format, is not very practical. Following [3], we will define the bitcoin transaction graph as follows. The transaction graph is a bipartite graph com- posed of two sets of vertices: addresses and transactions. An edge exists between an address and a transaction if the former served as an input in the transaction. Conversely, an edge exists between a transaction and an address if the latter was an output in the transaction. Note that every user usually corresponds to multiple addresses in this re- sulting graph. The work of [21] suggests to cluster addresses used as inputs to the same transaction. Another heuristic in [21] tries to abuse the fact that, by definition, the input address always spends all of its value in a transaction, so a user wanting to spend some partial value of an address might create a new address to receive the remaining value of the input address. Better clustering is closely related to the anonymity of the blockchain [19], [6], [20]. Our goal is to visualize this bitcoin transaction graph in certain time frames, for example, the visualization of transactions of one block or one day. 3 Force-Directed Algorithms In this section, we describe the two force-directed algorithms we use as building blocks for the method described in this report. Force-directed algorithms are inspired by physical particle systems where the minimization of a certain en- ergy functional w.r.t. the node locations leads to the layout. Here, the energy functional is induced by one or multiple forces defined between the nodes of the graph. 3 3.1 Algorithm from Kamada and Kawai In this section, we describe the algorithm from Kamada and Kawai [13] to visualize graphs. The algorithm computes coordinates pi∈R2for each vertex vi, 1≤i≤N, in the graph by minimizing the energy norm NX i=1NX j=i+11 d2 ij(|pi−pj| −lij)2. Here, dijdenotes the length of the shortest path between vertex iandjand lij:=l·dijfor some rescaling constant l >0. To minimize the energy, we use the Newton-Raphson method. Note that to find the shortest path between each pair of vertices, we use the Floyd–Warshall algorithm [4], which has a runtime ofO(|V|3) and needs O(|V|2) storage for the pairwise distances. One may further reduce the runtime for our sparse transactions graphs to O(|V|2log|V|+ |E||V|) by using Johnson’s algorithm [12]. However, in both cases, typical daily bitcoin transaction graphs with the number of nodes in the range of hundreds of thousands or even millions are too large to be directly handled by this approach. One can further speed up this algorithm by clustering portions of the graph to reduce the number of vertices, rendering the layout, and finally, declustering. Examples of such clustering/hierarchical methods are: 1. Contracting nodes with only one edge to their neighbours. Then declus- tering can be done by locating this node using the given distance of the edge to the neighbour away from the center of gravity of the layout. 2. Removing nodes with only two edges and replacing both edges with a single edge. To decluster, simply replace the new edges with two edges with a node in the center. Compare also [14] for a discussion about handling large graphs to speed up the algorithm. However, we apply a different method in the case of components with many edges or vertices that lead to good results in a lot of examples, which we will describe in the following section. 3.2 ForceAtlas2 with Fast Multipole The approach presented here belongs to a line of approaches simulating a phys- ical system where nodes repulse each other and edges attract the incident nodes [5, 15, 9]. It is closely related to the ForceAtlas2 algorithm [10] while we are replacing the Barnes-Hut algorithm with the Fast Multipole method, see sub- section 3.2.1. In each iteration, we calculate several forces that apply to the different nodes. For each edge, we calculate an attraction force on the incident nodes, which is proportional to the distance between incident nodes. We further have a gravity force pulling all nodes to the center, proportional to the distance to the center. Finally, we have repulsion forces between all node pairs proportional to one over their distance. 4 The next step is to apply the calculated forces to each node. We follow [10] on how to choose the step size. For this, in each iteration t, we define two values, the swing: swg=X n|Ft(n)−Ft−1(n)| and traction: trc=X n|Ft(n) +Ft−1(n)| where Ft(n) are the aggregated forces of a node nin iteration t. Note that a big swing signals a large variance in the forces between iterations and, therefore, much more erratic movement. On the other hand, if the traction is large, this signals progress in some sense as we continue to push nodes in the same direction. Now, we iteratively adjust the step size to keep the ratiotrc swgin some tolerated interval. 3.2.1 Fast Multipole Algorithm In each iteration of the force-directed algorithm, the forces on each node need to be calculated. As the bitcoin transaction graphs are not very dense, we can efficiently calculate the forces generated by the edge attraction and also the gravity attraction. However, computing the repulsion forces between each pair of nodes in a straightforward way is of quadratic complexity in the number of nodes, which may be very time-consuming considering the number of nodes of a typical transaction graph. Here, the Barnes-Hut algorithm [2], developed initially to speed up the computation for physical systems, reducing the com- plexity to O(Nlog(N)), has been successfully applied in the context of graph visualization, see [10]. However, we can further improve complexity to O(N) by using the Fast Multipole algorithm [7], which we will briefly describe in the following. In a first step, the algorithm computes a quad tree structure of the given particles. Here, we start with a square that covers all the particles. If a square contains more than a certain number of particles, we divide it into four new squares. Each of these squares is called a cell. This generates a tree structure of cells, a cell being the parent of another if it was generated by one subdivision of the parent. For each cell, we define the neighbouring cells to be those adjacent cells that have minimal size but are not smaller than the original cell. Further, we define interacting cells of a cell to be the minimal cells that are neighbouring the parent of the cell or are children of a cell neighbouring the parent. The trick of the Fast Multipole method is to calculate two Taylor expansions of a chosen degree for each cell around its center. The first approximation is for the force that nodes act on particles that are far away, called the outgoing expansion. The second approximation is for the force that nodes in the cell feel from particles that are far away, called the incoming expansion. Here, the term “far away” refers to the nodes not located in neighbouring cells. The idea is to calculate these expansions recursively. The recursive calcula- tion of the expansions is performed by first computing the outgoing expansions. 5 Figure 3: Illustration of the overall algorithm for blockchain data visualization. The method starts by computing the outgoing expansion for each leaf cell. Sub- sequently, the quad tree is traversed upwards, and the outgoing expansions of the four children of a cell are used to calculate its outgoing expansion. This is accomplished by shifting the center of the children’s outgoing expansions to the center of the new cell and adding them up. The quad tree is then traversed in reverse order to calculate the incoming expansions. This is accomplished by applying a center shift of the incoming expansion of the parent and adding all outgoing expansions of the interaction neighbours reformulated as incoming expansions of the cell to it. Finally, we can calculate the force that applies to each single node. For each node, let the corresponding leaf cell be the minimal cell containing the node. Now, for every node, we apply the incoming expansion of its leaf cell to the node to get the force from far away nodes and additionally add all the forces from nodes in neighbouring cells of the leaf cell and the leaf cell itself to the node. 4 Final Algorithm The final algorithm that we apply to visualize the transaction data now com- bines the algorithms above to optimize the tradeoff between quality and com- putational time. Here, we first split the given graph into its components (ignoring the direc- tions of the edges). Note that the typical transaction graph for a certain time period most often consists of many components, where most of the components consist of only a few nodes. Now, for each component, we calculate a separate layout. In cases with a few nodes, we opt for the Kamada-Kawai algorithm, 6 which typically generates more expressive layouts. For components containing a high number of nodes, we employ the force-directed algorithm based on the Fast Multipole method described above. These component layouts are then rescaled to have a similar density. Next, we assemble the separate component layouts into a single figure. To accomplish this, we construct a new graph with the components represented as nodes, connecting them with edges to form a tree structure. These edges are determined by selecting a random order and sequentially linking the next component to the largest previous component. We choose the edge sizes to be half of the diameters of both components summed up plus some constant. If this resulting graph is small enough, we apply the Kamada-Kawai algorithm. Otherwise, we divide it into several components and apply the Kamada-Kawai algorithm individually to each component and reassemble them. Figure 3 shows an illustration of the overall algorithm. Figures 4 and 5 show the resulting visualization of the transaction graphs at two different points in time. Figure 4: A visualization of the transaction graph on April 19, 2011. Transaction nodes are red, address nodes are blue. Contains around 1 .5·104nodes. 7 Figure 5: A visualization of the transaction graph on December 12, 2013. Trans- action nodes are red, address nodes are blue. Contains around 2 ·105nodes. 5 Summary In this report we described an algorithm to efficiently visualize graphs with a very high number of nodes and edges. In our experiments, this algorithm pro- duced meaningful graphs within a reasonable amount of computing time, while other algorithms were not applicable due to their computational complexity. Although developed for analyzing bitcoin blockchain data, it may be worth applying this algorithm to other blockchain transaction graphs or large graphs from other domains. We provide the source code of this algorithm in the public GitHub repository athttps://github.com/frontmark/research . 8 References [1] Jiabin Bao, Debiao He, Min Luo, and Kim-Kwang Raymond Choo. A sur- vey of blockchain applications in the energy sector. IEEE Systems Journal , 15(3):3370–3381, sep 2021. [2] Josh Barnes and Piet Hut. A hierarchical o(n log n) force-calculation algo- rithm. Nature , 324(6096):446–449, dec 1986. [3] Michael Fleder, Michael S. Kester, and Sudeep Pillai. Bitcoin transaction graph analysis. CoRR , February 2015. [4] Robert W. Floyd. Algorithm 97: Shortest path. Communications of the ACM , 5(6):345, jun 1962. [5] Thomas M. J. Fruchterman and Edward M. Reingold. Graph drawing by force-directed placement. Software: Practice and Experience , 21(11):1129– 1164, nov 1991. [6] Steven Goldfeder, Harry Kalodner, Dillon Reisman, and Arvind Narayanan. When the cookie meets the blockchain: Privacy risks of web payments via cryptocurrencies. Proceedings on Privacy Enhancing Tech- nologies , 2018, 08 2017. [7] L Greengard and V Rokhlin. A fast algorithm for particle simulations. Journal of Computational Physics , 73(2):325–348, dec 1987. [8] Anton Hasselgren, Katina Kralevska, Danilo Gligoroski, Sindre A. Peder- sen, and Arild Faxvaag. Blockchain in healthcare and health sciences—a scoping review. International Journal of Medical Informatics , 134:104040, feb 2020. [9] Yifan Hu. Efficient and high quality force-directed graph drawing. Mathe- matica Journal , 10:37–71, 01 2005. [10] Mathieu Jacomy, Tommaso Venturini, Sebastien Heymann, and Mathieu Bastian. ForceAtlas2, a continuous graph layout algorithm for handy net- work visualization designed for the gephi software. PLoS ONE , 9(6):e98679, jun 2014. [11] Uzma Jafar, Mohd Juzaiddin Ab Aziz, and Zarina Shukur. Blockchain for electronic voting system—review and open research challenges. Sensors , 21(17):5874, aug 2021. [12] Donald B. Johnson. Efficient algorithms for shortest paths in sparse net- works. Journal of the ACM , 24(1):1–13, January 1977. [13] Tomihisa Kamada and Satoru Kawai. An algorithm for drawing general undirected graphs. Information Processing Letters , 31(1):7–15, apr 1989. 9 [14] Stephen Kobourov. Handbook of Graph Drawing and Visualization , chapter Force-Directed Algorithms, pages 383–408. Chapman & Hall, 2016. [15] Shawn Martin, W. Michael Brown, Richard Klavans, and Kevin W. Boyack. OpenOrd: an open-source toolbox for large graph layout. In Visualization and Data Analysis 2011 . SPIE, jan 2011. [16] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system. Decen- tralized business review , 2008. [17] Ritesh Patel, Milena Migliavacca, and Marco E. Oriani. Blockchain in banking and finance: A bibliometric review. Research in International Business and Finance , 62:101718, dec 2022. [18] Maciel M Queiroz, Renato Telles, and Silvia H Bonilla. Blockchain and supply chain management integration: a systematic review of the literature. Supply chain management: An international journal , 25(2):241–254, 2020. [19] Fergal Reid and Martin Harrigan. An analysis of anonymity in the bit- coin system. In Security and Privacy in Social Networks , pages 197–223. Springer New York, jul 2012. [20] QingChun ShenTu and JianPing Yu. Research on anonymization and de- anonymization in the bitcoin system. CoRR , October 2015. [21] Yuhang Zhang, Jun Wang, and Jie Luo. Heuristic-based address clustering in bitcoin. IEEE Access , 8:210582–210591, 2020. [22] Zibin Zheng, Shaoan Xie, Hong Ning Dai, Xiangping Chen, and Huaimin Wang. Blockchain challenges and opportunities: a survey. International Journal of Web and Grid Services , 14(4):352, 2018. 10
{ "id": "2403.03504" }
1811.00742
Rationality-proof consensus: extended abstract
Blockchain systems benefit from lessons in prior art such as fault tolerance, distributed systems, peer-to-peer systems, and game theory. In this paper we argue that blockchain algorithms should tolerate both rational (self-interested) users and Byzantine (malicious) ones, rather than assuming all non-Byzantine users are altruistic and follow the protocols blindly. Such algorithms are called BAR-tolerant [1]. To design a BAR-tolerant system, one can follow these three steps: clearly define the utility function for the rational users, prove the algorithm is such that there is no benefit from unilaterally deviating (that is, it's a Byzantine Nash Equilibrium), then prove the algorithm correct assuming the rational actors follow the protocol. We present an example attack by rational users: the gatekeeping attack, where members of a system selfishly decide to prevent newcomers from joining. This attack may affect any stake-based system where the existing members prevent newcomers from making a stake, and essentially form a cartel. We then sketch a BAR-tolerant consensus protocol for blockchain that can defend against this attack. It relies on a strict order to decide who gets to propose a new block (so there's no need to race to solve a crypto puzzle) and it relies on hardware ID tokens to make sure every computer is only represented at most once as a block proposer to mitigate Sybil attacks. It also defends against the gatekeeper attack. The BAR-tolerant approach is naturally also applicable to other blockchain algorithms.
http://arxiv.org/pdf/1811.00742v1
Jean-Philippe Martin, Eunjin, Jung
cs.DC
cs.DC
Rationality-proof consensus: extended abstract Jean-Philippe Martin (self) and Eunjin (EJ) Jung (RationalMind) Abstract Blockchain systems benefit from lessons in prior art such as fault tolerance, distributed systems, peer-to-peer systems, and game theory. In this paper we argue that blockchain algorithms should tolerate both ​ rational ​ (self-interested) users and ​ Byzantine ​ (malicious) ones, rather than assuming all non-Byzantine users are ​ altruistic ​ and follow the protocols blindly. Such algorithms are called ​ BAR-tolerant ​ [1]. To design a BAR-tolerant system, one can follow these three steps: clearly define the utility function for the rational users, prove the algorithm is such that there is no benefit from unilaterally deviating (that is, it's a Byzantine Nash Equilibrium), then prove the algorithm correct assuming the rational actors follow the protocol. We present an example attack by rational users: the ​ gatekeeping ​ attack, where members of a system selfishly decide to prevent newcomers from joining. This attack may affect any stake-based system where the existing members prevent newcomers from making a stake, and essentially form a cartel. We then sketch a BAR-tolerant consensus protocol for blockchain that can defend against this attack. It relies on a strict order to decide who gets to propose a new block (so there's no need to race to solve a crypto puzzle) and it relies on hardware ID tokens to make sure every computer is only represented at most once as a block proposer to mitigate Sybil attacks. It also defends against the gatekeeper attack. The BAR-tolerant approach is naturally also applicable to other blockchain algorithms. Introduction Blockchain algorithms have captured the world's imagination, and are considered for applications beyond payment services. As they grow, we want to make sure we design these algorithms carefully so they can work reliably even at a large scale. Reliability and scalability are not new challenges in computer science so naturally we draw from prior art including distributed systems, peer-to-peer, and game theory. The latter especially in the context of incentive compatibility, a key property for Bitcoin or similar systems where software isn't run by a trusted central authority: the participants might write a modified version of the software, one that deviates from the specified algorithm in order to gain some unfair benefit to the user. This selfish behavior is happening already: some Bitcoin miners skip the validation of transactions even though this could result in including invalid transactions in the ledger. Research shows that consensus in Bitcoin will be difficult to achieve when the block reward becomes so small that the transaction fees are the main source of incoming for miners [6]. 1 BAR tolerance [1] is the property of protocols that work despite both selfish users (called rational ​ ) and some number of malicious users (called ​ Byzantine ​ ). We argue that BAR-tolerance is a desirable property for blockchain systems. In this paper, we discuss an example attack on the system by rational users and show how a BAR-tolerant blockchain protocol might defend against it. We sketch this protocol to show how one would go about designing a BAR-tolerant algorithm; our protocol is based on the consensus from [1]. A ​ gatekeeping ​ attack is an example attack by rational users in blockchain systems that requires a stake (security deposit). More precisely, this attack is applicable to any system that requires a user to make a deposit before participating in any protocol that gives rewards proportional to the stake. Many Proof-of-Stake consensus algorithms, including those used in Ethereum Casper FFG and Tendermint, use deposit-slashing [5] as a solution to the Nothing-at-Stake problem [4], and require a stake from a user before participating in consensus. For a new user to become a block producer and earn the block rewards, the new user has to deposit a stake first to a special address, which is a transaction in the chain’s native currency. For the existing block producers, the expected block reward they could earn decreases as the newcomer joins. If a block producer is chosen with a probability proportional to its own stake over the total stake in the system, then as a new comer joins, the total stake increases and the probability of being elected decreases. If the block producers vote on candidates and get the reward proportional to its own stake over the total stake, then as a new comer joins, the total stake increases and the amount of reward for each block decreases. Thus it is a rational behavior for the existing block producers to not include the deposit transaction in their blocks, which prevents a newcomer from becoming a block producer. Related Work Blockchain systems experience attacks from Byzantine users. Bitcoin Gold suffered from double spending attack [9]: The hacker with the majority of the computing power was able to deposit the same Bitcoin Gold to an exchange and also to its own wallet. The attacker may have stolen $18.6 million from the exchange. Monacoin also experienced a selfish-mining attack that cost an exchange $90K [7]. Software bug could also cause a Byzantine error in the system: overflow in sum created more bitcoins for block reward than what the protocol dictates and also two addresses received 92.2 billion bitcoins each [3]. While it is less evident than Byzantine attacks, the community has been speculating that the rational users are the majority of the system and may deviate from a desirable behavior. For example, some bitcoin miners generated invalid blocks [2]: they would rather spend the time to check the validity of transactions on solving the hash puzzle. Researchers in [6] showed that it may be rational to fork the chain when there are not many transactions left, and the transaction fees form the majority of the reward. 2 Approach We need to tolerate both malicious and self-interested (rational) actors. Since some actors may be malicious, we need to use a Byzantine-tolerant algorithm. These algorithms can function despite arbitrary behavior from some bounded fraction of the participants (the exact fraction depends on the model. It's typically 1/3, but can be up to 100% if sufficiently strong assumptions can be made). The key requirement is to bound the fraction of malicious actors (otherwise they may be able to evict honest actors, prevent correct transactions from entering the blockchain, etc.). Instead of using a proof of work (that is, relying on the assumption that the aggregate computing power bought by the honest actors is larger than that of the malicious actors), one can use modern hardware features such as the TPM chip present in most motherboards today. The manufacturer guarantees actors cannot pretend to own more motherboards than they genuinely do. So long as the aggregate buying power of the honest actors is larger than that of malicious actors, the majority vote of the system will be in honest hands - without needing to continually consume vast amounts of power. These hardware tokens prevent Sybil attacks. Remains only to pick who can add the next block to the blockchain: this could be done at random, or simply by taking turns. Since some actors can be rational (perhaps everyone who is not malicious), we need an incentive-compatible algorithm. To tolerate both Byzantine and rational actors we use the BAR approach [1]. The idea is to design a protocol that is a Byzantine Nash Equilibrium. This means that it is in the best interest of each rational actor to follow the protocol as specified. In this methodology one first needs to specify what the rational actors will consider ​ costs ​ and ​ benefits when computing their utility function. A protocol is a Byzantine Nash Equilibrium if rational actors see no increase in their utility from unilaterally deviating from the protocol. We assume that they consider the Byzantine actor's worst possible behavior when estimating the utility they would get from following a particular sequence of actions. To prove a BAR-tolerant protocol correct, we show 1. That the algorithm is a Byzantine Nash Equilibrium, and then 2. That the algorithm has the desired properties, under the assumption that the rational actors obey the protocol. The BAR model allows (but does not require) some of the actors to be altruistic, meaning that they follow the protocol even if it weren't in their personal best interest to do so. In this paper we do not require (nor take advantage of) altruistic actors. The model also assumes that rational actors do not collude. This doesn't mean that no collusion happens, it just means that if some actors collude then they count against the limit on Byzantine actors. When designing a BAR-tolerant protocol, the author chooses what counts as costs or benefits. This is a trade-off: including more things as costs or benefits means it applies to more individuals in real life, but it also makes for a craftier rational actor and the protocol needs to be correspondingly stronger 3 (and its correctness argument gets correspondingly longer). Including only a few things (for example, perhaps the rational actor is only trying to optimize how many tokens they earn) keeps the algorithm and proof simpler, but some individuals may not fit this model. This isn't as bad as it sounds: those actors that act rationally but have different incentives than those the system was designed to resist will still be tolerated, they will just count against the Byzantine tolerance threshold. We believe that BAR-tolerance or similar approaches are a good fit for blockchain algorithms because the high stakes make the temptation to write a modified client harder to resist (so rational behavior may be seen in practice), and the same stakes also mean that it's important to rely on as few assumptions as possible (so tolerating arbitrary behavior from some actors is beneficial). Key benefits We sketch a blockchain algorithm that can (a) tolerate malicious actors without requiring a wasteful proof of work, and (b) tolerate rational actors, acting in their individual self-interest. We hope it serves as an illustration of how one may design a BAR-tolerant algorithm in the context of a blockchain. Proofs of work in Bitcoin waste large amounts of electricity, creating unnecessary pollution. They defend against ​ Sybil attacks ​ , where a single bad actor takes on multiple identities in order to have more voting power and subvert the protocol. Proof of stake has been proposed as an alternative; our approach is similar but with small stakes, allowing everyone to join and be equally rewarded for participating in the chain. Hardware features (e.g. TPM) can be used to hinder bad actors trying to pretend to be more than one person: they have to buy real hardware for each voter so it's not as easy as just sending another network message. Another function of Bitcoin's proof of work is to act as a lottery, to pick a leader. Here instead we use a round-robin approach, taking turn. We rely on a BAR-tolerant protocol to ensure that we can reach consensus on which block to add to the chain, without giving rational actors room to deviate for gain. Components The protocol is built modularly, out of multiple component parts. Going in approximate chronological order, a user can first read and write transactions in the chain. Then if they want to produce blocks (and be rewarded for it), they go through a joining and registration step. Then they follow the consensus subprotocol to wait for their turn and finally produce a block. Keeping the protocol modular helps keep the design simple and the proofs manageable, though a few of the arguments still need to be over the system as a whole. It also makes it easier to 4 evolve the system over time and to add features. For example in this paper we are not touching on smart contracts or other high-level concepts, but of course they can also benefit from being Byzantine and rational tolerant. Joining and Registration Any user of the system can submit transactions to the blockchain without having to register or join, but they need to do both in order to produce blocks. Joining is done by submitting a transaction that transfers a small amount of "coin" to a special address for members (this address may be managed by a smart contract, or be hardcoded into the consensus protocol itself). The user can get this deposit back when they're done producing blocks (this may be done automatically when the user closes the mining program). The deposit is forfeit if the user is found deviating from the protocol. The registration protocol is part of the same interaction, but with the purpose of making it harder for a single malicious person to create multiple accounts in an attempt to manipulate voting or other aspects of the system, i.e. mitigating Sybil attack. Registration can be done by reading a unique hardware ID from the user's machine, so that each user is only allowed a single identity in the system. For example one may use the key pair embedded in a TPM, or SGX's linkable quotes to ensure that a given computer cannot register more than once. Another approach is to ask the user to pay a one-time fee of some sort. The fee could be a computation (compute some hashes), human endeavor (mail in a postcard), or paying a token amount. Something that is small enough that users don't mind doing it once, but that would become a burden if it had to be done thousands of times. One of the subtleties of the joining component is that we want it to work even if an existing block producer benefits from preventing a particular user from joining. This works out with a bit of care as each block producer in turn gets the power to admit the new user. In our model, a rational user assumes that all other rational users follow the protocol, so it expects other rational block producers would let this particular user join. In other words, as block producers take turns admitting new users, a rational block producer can delay a particular user from joining when it is its own turn to admit new users, but cannot prevent it indefinitely. Another subtlety is the question of whether adding a block producer reduces everyone's reward, and so everyone may be incentivized to delay new users joining the block producers group. This is a rational behavior not only for our consensus protocol but also for any Proof-of-Stake consensus algorithm where the staking (join) operation needs to be included in a blockchain, such as Ethereum Casper FFG as of May 2018 or Tendermint. One way to prevent delayed joins is to make sure everyone's reward remains the same as others join. Since with more participants there is a longer wait between turns, that means we'd have to keep on increasing the individual reward, which will lead to inflation. Instead, the protocol can detect attempts at delaying a join, and punish that behavior. The rational choice is then to accept the joiner since the punishment is worse than the benefit from delaying the joiner. 5 We incentivize the block producers to include a join operation by both rewards and punishments. The reward is that the join transactions do not count toward the block size limit, so the block producers can include as many join transactions as they wish to maximize their gain from the transaction fees. The punishment happens when a block producer does not include the join transaction in a new block it is proposing even though the transaction was sent to it in advance. Participants who wish to join must send their request to multiple actors, and have them forward the request to a proposer. Since joins do not count against the block size limit, this proposer is always able to include the join transaction. If they do not, each of the relay actors will sign a SUSPECT message and send it to the next leader. This next leader will strip the faulty proposer of their block reward if they have recent SUSPECT messages from f+1 distinct actors (so Byzantine actors by themselves are not able to force punishment). A participant might choose to send their join request to only a single proposer at a time instead of multiple, choosing to accumulate SUSPECT messages over time instead. Either way, it is in the block proposer's best interest to publish the join transaction since the cost of the punishment is larger than the benefit from delaying that particular user from joining. Block Production Block producers have the job of taking in transaction requests from users, putting them into a block, and linking it to the blockchain. When things go well, the producers simply take turns. When things don't (for example in case of failure or asynchrony), the BAR-tolerant consensus protocol ensures that a new producer is picked and that every non-malicious actor still agrees on a unique block to append to the chain. The other facet of block production is making sure that all user transactions are included. We can use a similar mechanism as for join: producers can be suspected of misbehavior and punished if they ignore a user for too long. This ensures that rational users are disincentivized from trying to delay a user's transaction. Shared State In order for the block producers to take turns, as described in the previous section, we need them to agree on who the block producers are. For this, we use blockchain order of the "join" and "leave" transactions. Both transactions (paying to join or withdrawing deposits to leave) are recorded in the blockchain. Since the blockchain implements an append-only log, everyone agrees on the sequence of membership transactions (joins and leaves) so they agree on who the block producers are and in which order they were added. Thus, everyone agrees on a queue of block producers: they take turns producing a block, so for each block everyone knows who the next block producer should be. Producers can be kicked out if they misbehave and this is also done as a transaction in the blockchain so we can leverage the same mechanism to keep track. Rational block producers 6 have an incentive to keep track of this state since it's necessary to follow the protocol correctly and avoid punishment or expulsion (or just missing their turn). It may be beneficial to share more state, such as the balance of every user if the blockchain is used to keep track of a cryptocurrency balance. A similar mechanism can be used, but other variants are possible as well such as having a different group of actors keep track of the state, or offering a "summary" service that allows one to quickly catch up to the present state of the system. Consensus The consensus protocol ensures that a unique block is added to the chain. More formally: Each participant ("block producer") may propose a value ("block"). At the conclusion, each participant that follows the protocol ("correct participant") will decide on a block, and ● the block was proposed by a participant, and ● all correct participants decide the same block. In a long enough period of synchrony, the protocol will always conclude. In periods of asynchrony it may or may not conclude. If it does, the guarantees hold. It uses the shared state described above to determine which block producer is the "leader", in charge of publishing a block. If this leader is too slow then it switches to the next leader. The algorithm ensures that even in periods of asynchrony, no two different values are decided. We run an instance of consensus for each block to add to the chain, keeping track of the current leader so everyone gets their turn. Blocks are linked together in the traditional way, with a hash, but each block also includes signed messages from the protocol participants that vouch for its correctness. This prevents a malicious participant from forging a block. As an additional consideration, instead of taking turns in a predictable order (1, 2, 3, ...) we can use a VRF-like function [8] to pick the next leader based on the contents of the last block. This still gives everyone the same number of turns on average, but it makes it difficult for an adversary to run a denial of service attack against the next leader since its identity is only revealed at the last minute. Details about consensus To make things concrete, let's flesh out the consensus part. At a high level, block producers take turns and a timeout mechanism ensures eventual progress. We start by recapitulating our assumptions. 7 Model We assume partial synchrony: the system has asynchronous periods where there is no bound on message delivery or processing time, and it also has synchronous periods with a bound on both. We pick a timeout T that is long enough for consensus to finish in synchronous periods. To formalize the notion that "synchronous periods are long enough to make progress" we prove that the algorithm works if the system is eventually forever synchronous. In addition, we assume clock rates are similar, so that at the scale of a single consensus instance, if two users have clocks t1 and t2, their ratio is bounded by a constant r: 1/r <= t1/t2 <= r. We assume that if messages are sent infinitely often, they are eventually delivered. Using acknowledgements and resends this can implement reliable links between actors that follow the protocol. We have Byzantine and rational actors, as per the BAR model. We make no assumption about the behavior of malicious actors. For the rational actors we assume that they are not forced to obey the protocol as it was presented to them but instead they can follow any different algorithm of their choosing. However, they only do so if it increases their net utility from participating in the system. This utility function accounts for the costs and benefits from using the system (e.g. coins earned and spent, but also the ability to make transactions at all). For this protocol we are only considering the following for the utility function: coin balance, the ability to exclude specific transactions, the ability to force their own transactions to be included in the blockchain, and the ability to include transactions that would normally be rejected (such as double-spending). Naturally, while the rational actor would see double-spending their own money as a benefit, the protocol guarantees this cannot happen. We assume there are at most one third of malicious actors. The rest are rational. We use "f" for the number of malicious actors and "n" for the total number of block proposers, so n>3f. We are not assuming that any of the actors are altruistic (meaning they follow the protocol blindly), although of course if some are the system still works. Structure The protocol follows the classical three-phase commit approach and has "rounds". In round R, actor (R modulo n) is the leader. In each round, either the leader sends its value to everyone (who then eventually decide it), or no value is decided. If no value is decided then the next round starts. This round first "freezes" the previous round, preventing it from making further progress. The freeze process also determines whether a block might have been decided in the previous round. If so, the new leader must propose that block and finish the job. This new leader will be able to propose their own block in the instance of consensus that follows immediately. In a round, the communication pattern goes like this: 8 ● Leader sends an AGREE message to everyone. This message is signed and includes the proposed block. The leader then collects signed acknowledgments for the hash of the block. ● Leader sends a WRITE message to everyone. This signed message includes 2f+1 of the previous acknowledgments for the same hash. Since users ack only one message, this guarantees that the leader cannot send a block to some users and a different one to some other users. The users store the WRITE message and acknowledge. ● Leader sends a DECIDE message to everyone. This signed message includes 2f+1 signed acks from the previous round. Users decide when they see this message. If the current leader is too slow (perhaps it's Byzantine, or has crashed), we start the next round. This happens after f+1 actors suspect the current leader of being too slow and send a signed TIMEOUT message to the next leader. To ensure this next round R doesn't conflict with the previous one, we "freeze" round R-1 before doing so. The freezing algorithm is a single exchange: ● New leader sends FREEZE to everyone. This signed message includes the f+1 TIMEOUT messages. The users that have not yet seen a WRITE from the leader acknowledge this message and will ignore the previous leader's message. Those who have will forward this block to the new leader. ● New leader starts its round with an AGREE message as before, but they also include 2f+1 signed acks for their corresponding FREEZE. If any of these acks include a WRITE block then the new leader must propose that block. Otherwise, it proposes its own. Correctness Sketch To prove a BAR-tolerant algorithm correct, the first step is to show that no individual rational actor can improve their utility by deviating from the protocol, under the assumption that the other rational actors are following the protocol. There are several things the rational actor may care about. First, there is a coin reward for having one's block added to the chain. Actors can't do much to influence the reward. They can follow the protocol so it's back to their turn in a timely manner and they get the reward (that's good). They can't jump the queue - we enforce a strict round-robin rule: everyone gets their turn. They can try to prevent other actors from joining - this is a topic on its own and we discuss it elsewhere. Second, preventing blocks from being added is something a rational actor might cheat for. Sending fake FREEZE messages doesn't work because it requires signatures from other actors. The actor could try sending fake TIMEOUT messages to speed up eviction of a leader that is being slow (or perhaps in a period of asynchrony). This also requires others to cooperate but the argument is more subtle because some non-malicious actors may genuinely observe a leader being slow. We use the clock rate assumption here: the next leader will reject TIMEOUT messages if they arrive too early. Since the clock ratio is r, a message that arrives before T/r is too early. If a rational actor sends at time T then it's guaranteed that the new leader 9 will accept it. In fact this is the earliest time the new leader is guaranteed to accept it, so it's the optimal time to send (hence the algorithm is at equilibrium). Conversely, one might imagine rational actors trying to prevent others from proposing a block. However, actors take turns and they cannot end this round without suspect messages from other actors. Once we've shown the algorithm is a Byzantine Nash Equilibrium, for the rest of the argument we can safely assume that rational actors will follow the protocol. The key point of the freezing algorithm is that it will not result in two different blocks being decided because (a) if a block could be decided by the previous round, then that block is discovered by the freezing algorithm and proposed in the next round. (b) otherwise, the previous round will never decide a block. The first point follows from the fact that the DECIDE message need 2f+1 signatures: at least one of the signatories will be uncovered by the freezing algorithm and the block will be forwarded to the next round. The second point follows from the symmetric argument that FREEZE is sent to 2f+1 actors. If all accept it before seeing a WRITE, then there are not enough left to sign the DECIDE message so the previous round will not decide. This algorithm allows the system to pick a block and prevents malicious or rational actors from preventing consensus or interfering with the turn order. Conclusion In this paper we argue for algorithms that tolerate both rational (self-interested) actors, and malicious (Byzantine) ones. These algorithms are called BAR-tolerant. When writing one, follow these three steps: clearly define the utility function for the rational actors, prove the algorithm is such that there is no benefit from unilaterally deviating (that is, it's a Byzantine Nash Equilibrium), then prove the algorithm correct assuming the rational actors follow the protocol. We explain the gatekeeper attack, where members of a system selfishly decide to prevent newcomers from joining. We sketch a BAR-tolerant blockchain protocol. It relies on a strict order to decide who gets to propose a new block (so there's no need to race to solve a crypto puzzle) and it relies on hardware ID tokens to make sure every computer is only represented at most once as a block proposer. It also defends against the gatekeeper attack. The BAR-tolerant approach is naturally also applicable to other blockchain algorithms. References [1] Amitanand S. Aiyer, Lorenzo Alvisi, Allen Clement, Mike Dahlin, Jean-Philippe Martin, and Carl Porth. 2005. BAR fault tolerance for cooperative services. SIGOPS Oper. Syst. Rev. 39, 5 (October 2005), 45-58. DOI: ​ https://doi.org/10.1145/1095809.1095816 [2] Bitcoin.org. 2015. Some Miners Generating Invalid Blocks. https://bitcoin.org/en/alert/2015-07-04-spv-mining 10 [3] Bitcoin Wiki. Value overflow incident. ​ https://en.bitcoin.it/wiki/Value_overflow_incident [4] Vitalik Buterin. 2014. On Stake. ​ https://blog.ethereum.org/2014/07/05/stake/ [5] Vitalik Buterin. 2014. Slasher: A Punitive Proof-of-Stake Algorithm. https://blog.ethereum.org/2014/01/15/slasher-a-punitive-proof-of-stake-algorithm/ [6] Miles Carlsten, Harry Kalodner, S. Matthew Weinberg, and Arvind Narayanan. 2016. On the Instability of Bitcoin Without the Block Reward. In ​ Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security ​ (CCS '16). ACM, New York, NY, USA, 154-167. DOI: ​ https://doi.org/10.1145/2976749.2978408 [7] Dave Gutteridge, Japanese Cryptocurrency Monacoin Hit by Selfish Mining Attack, CCN https://www.ccn.com/japanese-cryptocurrency-monacoin-hit-by-selfish-mining-attack/ ​ (retrieved 2018-10-16) [8] S. Micali, M. Rabin, S. Vadhan. 1999. Verifiable random function. In ​ Proceedings of the 40th Annual Symposium on Foundations of Computer Science. [9] Josiah Wilmoth, Bitcoin Gold Hit by Double Spend Attack, Exchanges Lose Millions, CCN https://www.ccn.com/bitcoin-gold-hit-by-double-spend-attack-exchanges-lose-millions/ ​ (retrieved 2018-10-16) 11
{ "id": "1811.00742" }