Mining
Wassim Zuhair Alsindi, Massachusetts Institute of Technology
Laura Lotti
Origin
Cryptocurrency mining was initially understood to refer to processes incorporating proof-of-work (PoW) (i.e., the spending of costly computational resources such as CPU cycles via a mechanism originally developed to mitigate spam) (Dwork and Naor, 1992; Back, 2002). PoW is usually a permissionless process (i.e., anyone can partake) with miners’ identities unknown (anonymous/pseudonymous). Precursor digital money projects such as Bit Gold and b-money (Szabo, 2005; Dai, 1998) proposed the use of PoW-type mechanisms to avoid resource exhaustion and message flooding attacks or Sybil attacks from large numbers of dishonest sockpuppet nodes (Douceur, 2002).
While the Bitcoin Whitepaper (Nakamoto, 2008) did not refer to PoW explicitly as mining, reference was made to the gold mining analogy. The term was used colloquially in online forums and chatrooms including BitcoinTalk and IRC (Internet Relay Chat, a long-running instant messaging protocol) as far back as 2010. Indeed, the source code of the first version of the Bitcoin software referred to the process of generating coins as mining (Nakamoto, 2009).
The chain selection heuristic which uses PoW to ensure the eventual network-wide consistency of the Bitcoin ledger is referred to as Nakamoto Consensus. This requires a 51% majority of “work” to reach agreement on the latest valid block and a "guarantee that all honest parties output the same sequence of blocks throughout the execution of the protocol" (Kiffer et al., 2018). Blockchains grow in height incrementally as new candidate blocks are constructed by miners and added to the canonical chain. In PoW-based networks this takes place through the combination of nonces (i.e., an arbitrary variable which is progressively iterated) with the proposed block header to generate hashes which are then compared against the network-determined difficulty of finding a block. The miner chooses the identity and order of transactions contained within a proposed candidate block and this has potential economic implications including front-running and re-ordering of transactions (Daian et al., 2019).
The mining process is mediated by a difficulty adjustment feedback mechanism, which periodically recalibrates the effective probability of finding a valid block so as to maintain the network’s target inter-block times. Should the hash of a candidate block be found that satisfies the network’s difficulty requirements, the miner will announce it to the network and fellow network participants will confirm validity of the block. Within the block, the miner may claim a so-called mining subsidy or block reward by including a transaction payable to themselves, in addition to any mining fees paid by transactions included.
The key cryptographic component of Bitcoin mining is the hash puzzle. Hashing refers to a one-way deterministic process that converts an input of arbitrary length to one of fixed length. An ideal cryptocurrency hashing puzzle algorithm must have the following properties (Narayanan and Clark, 2017): (i) it is difficult to compute so that shortcuts or undue advantages are not available to some participants; (ii) cost is parameterisable so that the energetic expenditure required to mine a valid block is not fixed over time; and (iii) it is trivially easy to verify the correctness of the hashed output from the input material. Since cryptographic hash functions are deterministic (i.e., given a fixed block with a fixed nonce - and a broad subset of possible hash values satisfying the difficulty requirements exist), it is entirely plausible that more than one valid candidate block may be found by competing miners at very similar times. In such an eventuality there begins a block propagation competition per se which allows the network to reach agreement on the latest state of the transaction ledger.
Since there can only be one block with a particular height in a blockchain, should multiple candidates emerge the prospect of a persistent network partition known as a fork arises if subsets of the population of validating nodes do not overwhelmingly agree on the latest block. Such partitions may be short-lived in the case of stale blocks such as “orphans” and “uncles” (terms used with respect to Bitcoin and Ethereum mining respectively) which represent discarded timelines as the canonical chain built upon another candidate block. In other cases, a fork can happen due to a malicious attack, such as a “51% attack” - when a nefarious actor manages to take control of the majority of hashing power and is able to modify the order of transactions or reverse the transactions that they themselves made, leading to double-spending (i.e., spending the same digital coins twice).
Combining these various elements, we can take the original meaning of cryptocurrency mining to be a thermoeconomic[1] process employing PoW and a parameterisable feedback mechanism (difficulty adjustment) with direct incentives provided by block rewards from an algorithmically regulated network-level issuance schedule alongside transaction fees.
Evolution
Since Bitcoin’s PoW, the range of activities falling under the nominal banner of mining has broadened substantially over time.
A number of alternative PoW strategies have emerged in recent years, at first hypothetical and subsequently observed in the wild, which afford favourable game-theoretic outcomes by deviating from honest mining behaviour as originally intended by the Bitcoin protocol (Eyal and Sirer, 2018, Grunspan and Pérez-Marco, 2018). Selfish mining, also known as block withholding, may be conducted by a miner who finds a valid block but instead of immediately broadcasting to peers, the block is withheld and kept secret. The miner then begins to search for a valid block atop the previous clandestine block, with the aim of finding a valid second block (and then announcing the first secret block) before another participant finds an alternative valid first block. It has been claimed that this adversarial strategy is more beneficial than honest mining for a sufficiently well-resourced miner.
As the blockchain space has matured, the processes at the core of decentralised consensus have become unbundled and abstracted from the materiality of computational work, while at the same time capital and other exogenous resources have become more integrated. One popular approach to this virtualisation of work is staking, which involves locking (i.e., rendering illiquid) some form of collateral in a protocol and being rewarded for participating in network consensus proportionally to the amount staked. Since it extends and further virtualises the novelty of Bitcoin’s consensus model, staking via proof-of-stake (PoS) has also been called “generalised mining” or “mining 2.0” (Brukhman, 2018). In fact, staking was initially proposed as a less computationally-intensive alternative to PoW to prevent double-spending in base layer chains such as Ethereum (King and Nadal, 2012), but the model has found broad application in ‘layer-2’ cryptoeconomic protocols (Brekke and Alsindi, forthcoming), made possible by smart contracts. An area in which staking has found significant application in layer-2 protocols is Decentralised Finance (DeFi), in which liquidity mining is currently (at the time of writing) a popular term used to describe the incentivised provision of collateral and liquidity for the most disparate financial activities: lending, borrowing, insurance, synthetic derivatives, and governance over the risk parameters of a decentralised bank.
Issues currently associated with the term
Critiques of the mining metaphor
The analogy between PoW-secured digital currency and gold has been widely discussed. In general it echoes the desirable commodity money characteristics prized by adherents to modern libertarian ideals or the Austrian School of Economics (Alsindi, 2019), among which is Szabo’s concept of unforgeable costliness (Szabo, 2008) relating to the inelasticity of supply of Bitcoin (and most subsequent PoW cryptocurrencies). The strict resource scarcity that arises from Bitcoin’s algorithmically regulated issuance schedule and the analogy with gold mining have become expressions of the digital metallism that characterises Bitcoin’s discourse (Maurer et al., 2013).
Swartz (2018) further differentiates between digital metallism and infrastructural mutualism, that is, two techno-economic imaginaries stemming from the cryptoanarcho-libertarian and cypherpunk subcultures, respectively. Here mining, and the diverse meanings that emerged around this misnomer, illustrate the tensions between these two positions, which ultimately led to an ideological fork of the Bitcoin network in mid-2017: “Digital metallists understood the act of mining as an opportunity to extract the greatest amount of Bitcoins to be used as a store of speculative value, whereas infrastructural mutualists saw mining as an act of collaboration to produce a shared privacy-protecting payment network” (Swartz, 2018).
These divergent ideologies profoundly influenced the development of the blockchain ecosystem beyond Bitcoin. Here we could argue that Satoshi Nakamoto and Hal Finney were much more in line with the infrastructural mutualism vision; early message logs exist where the two earliest known Bitcoin network participants were hopeful that solely altruistic behaviour could be encouraged as a community ethos (Cryptography Mailing List, 2008). However, at the core of the process of mining is neither the minting of new coins, nor the access to decentralised economic flows per se, but the assurance of settlement through decentralised consensus (Antonopolous, 2018; Carter, 2019). In Bitcoin and other PoW chains, this assurance comes from the distribution of the computational power used to search for blocks, whereas in staking protocols it is a matter of economic distribution so that, in principle, no single actor is able to accumulate more than 51% of the proving resource (i.e., hashrate for PoW and token supply for PoS).
Ecological and thermodynamic critiques
As the term mining is now used to describe cryptoeconomic processes as well as thermoeconomic ones, the previously strained analogy now appears to be a pure simulacrum (Baudrillard, 1981). PoW mining is by necessity an energetically costly process, consisting of irreversible computation (Landuaer, 1961). At the time of writing, Bitcoin electricity consumption is estimated to be over 64 TWh, approximately equivalent to that of the Czech Republic or Austria (CBECI, 2020). Proofs-of-useful-work such as those used in cryptocurrencies such as Primecoin (King, 2013) have been proposed as more eco-friendly alternatives to Bitcoin-type PoW. In reality, useful work may not reduce the overall thermodynamic footprint of a cryptocurrency, as the effective worth of the useful work may simply be treated as a universal discount by all mining participants (Sztorc, 2015).
It has been proposed that Bitcoin liberates stranded, illiquid energy and the majority of PoW mining employs renewable energy from geothermal and hydroelectric sources far from population centres (CoinShares, 2019). However, the insensitivity of PoW cryptocurrencies to the energy sources used to secure them has led to criticism as to their inability to mitigate their ecological externalities.
Conclusion
In the context of blockchain networks, mining describes a permissionless process intended to ensure the global consistency of a decentralised ledger. Mining requires the consumption of a costly computational resource to participate in a probabilistic competition that confers specific privileges to a node. These privileges typically relate to the proposal of a new block, including the identity and order of transactions contained within. It is incentivised via an algorithmically regulated provision of rewards, usually in the form of newly generated coins and/or transaction fees.
Acknowledgements
The authors would like to thank Yuval Kogman, Anil Bawa-Cavia and Sam Hart for helpful feedback during the preparation of this article.
References
Alsindi, W. Z. (2019). TokenSpace: A Conceptual Framework for Cryptographic Asset Taxonomies, Parallel Industries. https://doi.org/10.21428/0004054f.ccff3c19
Antonopolous, A. (2018). Mastering Bitcoin, Chapter 8, 2nd ed. https://github.com/bitcoinbook/bitcoinbook
Back, A. (2002). Hashcash—a denial of service counter measure. http://www.hashcash.org/papers/hashcash.pdf.
Baudrillard, J. (1981). Simulacra et Simulation, Paris: Éditions Galilée.
Brekke, J. K., and Alsindi, W. Z. (2021). Cryptoeconomics Glossary Entry, Internet Policy Review, forthcoming.
Brukhman, J. (2018). Generalized Mining: An Introduction & Primer. CoinFund and Cambrial, Prague Blockchain Week. October 30, 2018. https://youtu.be/ceex9CN2YZU
Carter, N. (2019). It’s the settlement assurances, stupid!. June 24, 2019. https://medium.com/@nic__carter/its-the-settlement-assurances-stupid-5dcd1c3f4e41
CBECI: Cambridge Bitcoin Electricity Consumption Index (2020). https://www.cbeci.org/
CoinShares Research (2019). The Bitcoin Mining Network: Trends, Average Creation Costs, Electricity Consumption & Sources. https://coinshares.com/research/bitcoin-mining-network-december-2019
Cryptography Mailing List “Bitcoin P2P e-cash paper”, 2008-11-14. https://satoshi.nakamotoinstitute.org/emails/cryptography/12/
Dai, W. (1998). b-money. http://www.weidai.com/bmoney.txt
Daian, P., Goldfeder, S., Kell, T., Li, Y., Zhao, X., Bentov, I., Breidenbach, L., and Juels, A. (2019). Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability. https://doi.org/10.1109/SP40000.2020.00040
Douceur, J. R. (2002). The Sybil Attack. In Revised Papers from the First International Workshop on Peer-to-Peer Systems (IPTPS '01). Springer-Verlag, Berlin, Heidelberg, 251–260. https://doi.org/10.1007/3-540-45748-8_24
Dwork, C., and Naor, M. (1992). Pricing via Processing or Combatting Junk Mail. In Proceedings of the 12th Annual International Cryptology Conference on Advances in Cryptology (CRYPTO '92). Springer-Verlag, Berlin, Heidelberg, 139–147. https://doi.org/10.1007/3-540-48071-4_10
Eyal, I., and Sirer, E. G. (2018). Majority is not enough: bitcoin mining is vulnerable. Commun. ACM 61, 7 (July 2018): 95–102. https://doi.org/10.1145/3212998
Grunspan, C., and Pérez-Marco, R. (2018). On profitability of selfish mining. https://arxiv.org/abs/1805.08281
Kiffer, L., Rajaraman, R., and Shelat, A. (2018). A Better Method to Analyze Blockchain Consistency. In: Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security (CCS '18). New York, NY: Association for Computing Machinery. 729–744. https://doi.org/10.1145/3243734.3243814
King, S. (2013). Primecoin: Cryptocurrency with Prime Number Proof-of-Work. https://primecoin.io/bin/primecoin-paper.pdf
King, S., and Nadal, S. (2012). PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-Stake. http://peercoin.net/bin/peercoin-paper.pdf
Landauer, D. (1961). Irreversibility and Heat Generation in the Computing Process, IBM Journal: 183-191. https://doi.org/10.1147/rd.53.0183
Maurer, B., Nelms, T. C., and Swartz, L. (2013). “When Perhaps the Real Problem is Money Itself!”: The Practical Materiality of Bitcoin. Social Semiotics. http://dx.doi.org/10.1080/10350330.2013.777594
Nakamoto, S. (2008). Bitcoin: a peer-to-peer electronic cash system. https://bitcoin.org/bitcoin.pdf
Nakamoto, S. (2009). Bitcoin v0.1 source code repository. https://github.com/bitcoin/bitcoin/tree/4405b78d6059e536c36974088a8ed4d9f0f29898
Narayanan, A., and Clark, J. (2017). Bitcoin's academic pedigree. Communications of the ACM, 60(12): 36-45. http://dx.doi.org/10.1145/3132259
Swartz, L. (2018). What was Bitcoin, what will it be? The techno-economic imaginaries of a new money technology. Cultural Studies, 32(4): 623-650. https://doi.org/10.1080/09502386.2017.1416420
Szabo, N. (2005). Bit Gold. https://unenumerated.blogspot.com/2005/12/bit-gold.html
Sztorc, P. (2015). Nothing is Cheaper than Proof of Work. https://www.truthcoin.info/blog/pow-cheapest/
-
A portmanteau of thermodynamic and economic, not associated with the heterodox field of thermoeconomics. ↑
Horst Treiblmaier (not verified)
PUBLISHED ON: 27 Nov, 2020 - 15:40
This is a compact but highly informative summary of the so-called mining process that is used to reach consensus in distributed environments. The authors do not stop at the technical description but also include a broader perspective, namely a critique from an ecological and thermodynamic perspective. It is noteworthy that alternative consensus mechanisms exist apart from proof-of-stake (PoS) that could replace the resource-intensive current “mining” process that solely depends on computing power. Furthermore, a brief discussion of current hashing algorithms (in Bitcoin SHA-256) and its respective strengths and weaknesses (e.g., whether quantum computing will pose a threat in the future) would be useful.