paint-brush
Centralisation of mining and some project's approach to thatby@taygundogan
279 reads

Centralisation of mining and some project's approach to that

by TaygunAugust 9th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Bitcoin is resistant to the so-called double-spending problem. Miners are incentivised to do this through an automatic system that gives some coins every period (in Bitcoin it is now 12.5 bitcoin per 10 minutes on average) In practice Bitcoin mining is not as democratic as it was originally planned by Satoshi Nakamoto. In practice, mining is dominated by wealthy companies and individuals. The result is that one or two companies own all the distribution of the mining power for a quasi-centralised mining system.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Centralisation of mining and some project's approach to that
Taygun HackerNoon profile picture

In order to understand the solutions to the problem of centralisation of decentralised technology (which blockchain and built on it –Bitcoin is), let us first explain some basic concepts.

What is mining?

In cryptocurrencies, mining means participation in verification of transactions on blockchain, which results in a consensus on which of them will be accepted in a current block of transactions. Miners are incentivised to do this through an automatic system written inside the code of a cryptocurrency that gives some coins every period (in Bitcoin it is now 12.5 bitcoin per 10 minutes on average).

Thanks to decentralisation of mining, Bitcoin is resistant to the so-called double-spending problem. It is a situation in which a digital currency can be spend more than once (like we can usually copy and use computer files more than once). In order to overcome this problem, Satoshi Nakamoto suggested using the chained blocks of transactions. To reach the consensus of which transactions are to be accepted (and which not), the Proof-of-Work (PoW) method was used, which relies on computing power.

There is still, however, a theoretical threat that people with 51% or more computing power will take the network over and will authoritatively (not by negotiated consensus) decide which transactions are legit and which are not. This is called the 51% attack. In practice Bitcoin it is difficult to perform such an attack because of the costs, access to mining equipment (ASICs) etc. However, it is a more serious risk in any other what? than Bitcoin public blockchain based on PoW.

Hash function and hashing algorithm

Hashing is the process of converting an input of any length into a fixed size string text using a mathematical function. This means that any text, no matter how long it is, can be converted into an array of numbers and letters through an algorithm.

The first block in blockchain known as genesis block contains transactions that when combined, produce a unique hash when the second block is created. The hash of genesis block is added to all of new transaction in a new block. This combination is used to create its unique hash. This process is repeated until all the new blocks are added to a blockchain.

In blockchains, hashes are used to represent a current state of blockchain. Every transaction contains certain information such as the addresses have been sent, sending and receiving of addresses, timestamp and so on. All this information is combined into a formula to produce a hash called Transaction ID. The transaction ID is a hash value that can be used to identify and confirm that the transaction has happened.

There are many hashing algorithms that can be used to hash a message. All of them have the feature that it is impossible to produce the same hash value entering different inputs, therefore the same message should always produce the same hash value. It is extremely difficult if not impossible to determine input based on a hash value well slightly changed into an input should generate a huge difference in hash value.

The hashing speed is also an important factor. A hash function used in practice in blockchains should give the values fast.

ASIC miners

ASIC (Application Specific Integrated Circuit) is a chip that is designed to do a specific type of algorithm only. ASICs cannot perform general calculations as can be performed by our home computers. In cryptocurrencies, they are used for mining using specific algorithm. They are powerful, cost-effective and energy efficient in terms of hashes.

Mining is the process aimed to perform complicated calculations in the search for a distinct number. Mining hardware is an ASIC miner that executes many calculations to speed up this process. In cryptocurrencies, ASIC devices are designed to aid in the process of mining Bitcoin (or other PoW-based cryptos like e.g. Ethereum).

The evolution of cryptocurrency mining began with Bitcoin SHA256 algorithmic rule (see 100 most popular cryptocurrencies using it) which is followed by Litecoin Scrypt algorithmic rule, and X11 algorithm for Dash ending with Ethash for Ethereum. Each algorithm requires different mining devices.

Problems with ASIC mining

Although, ASICs usually provide a significant advantage over graphics cards (GPUs) and CPU mining, it causes some problems.

It is estimated that more than 71% of Bitcoin mining occurs in China. There are also some major mining pools (organisations that connect individual miners together). If some of them conspire, this may lead to a 51 % attack on the Bitcoin network.

The other vulnerability is the number of producers of bitcoin mining equipment, which is also very limited, that brings some threats of centralisation. In fact, there are a few companies which produce ASICs such as Bitmain, ASICminer and Bitfily. The result is that one or two companies own nearly all the distribution rights to the hashing power for a cryptocurrency and this creates a quasi-centralised mining system.

In practice, mining process is dominated by wealthy companies and individuals; it is not as democratic as it was originally planned by Satoshi Nakamoto (in ‘his days’, everybody could use their personal computers as miners). That is why the crypto community started noticing threats to the decentralisation of Bitcoin and other cryptocurrencies and demanded restoring democracy in decision-making process (of which transactions should and which should not be included in a block).

Evidence shows that “existing proof-of-work methods—such as Bitcoin’s SHA-256, Litecoin and Dogecoin’s Scrypt, and Dash’s X11 algorithms—are centralized to massive ASIC farms because normal miners would often have to mine at a loss if wanting to participate in these networks. Even for the often touted “ASIC-resistant” Ethereum Ethash algorithm, there is evidence that Bitmain, one of the world’s largest miners, has already developed an ASIC for it.”[7]

ASIC resistance

Hence, the movement of ASIC-resistance started emerging. Its supporters demand that mining should be performed on consumer hardware like CPUs and GPUs. ASIC resistant is not all about decentralization; it is also about freedom and fairness in mining. Of course, this is also partly the case of the demand for more equal division of profits from mining.

Technically ASICs can be developed for any mining algorithm. That is why we speak not about ASIC-proof but about ASIC resistant solutions. In some cases, using ASICs on ASIC resistant cryptocurrencies may be even worse than using the more conventional hardware. For instance, ASIC resistant is good for smaller cryptocurrency when mining is not that much profitable. [3]

To create the new ASICs, the costs of designing a new chip should be covered (it may be a few millions of dollars) and the production is also not cheap, while it is not possible to order several, or only a few hundreds of processors only. This increases the costs by another several million dollars. This is an economic market solution to ASIC mining and is real to happen in less popular cryptocurrencies (for which creation of ASICs will not be profitable enough to cover the costs).

ASIC resistance solutions

There are some solutions to implement ASIC resistance, however all of them with their own problems:

In case of hard forking there might be critical bugs into the code. In this case the developers carry more power, as they are the ones who decide whether an algorithm is included or not. In smaller projects, a developer could theoretically be vulnerable against bribery by ASIC manufacturers. Besides, sometimes the decision cannot be reached because it may create a lot of tension especially within mining community that are incentivised to keep the status quo.

The other solution is to use other algorithms like e.g. SHA-3. However, it is only a temporary fix since it is also possible to design ASICs to use this algo. The result may still be not unclear because it may lead even to higher centralisation of ASIC manufacturing, as most producers will start designing from scratch and the first of them that solves the problem may monopolise the market.

The first approach was implemented by Monero. It decided to change their hashing algorithm every 6 months (what requires hard forking). This costs ASIC manufacturers some millions of dollars spent on R&D. Bitmain (one of the major ASIC producers) launched powerful ASICs for Cryptonight coins like Monero and Electroneum that was threatening the GPU and CPU miners. In response, Monero has recently (June 2019) proclaimed that they will hardfork the algorithmic rule to be more ASIC resistant and introduce RandomX protocol that even can enable mining on smartphones.

One of the other solutions could be Staturm v2, which is to allow for the individual mining instead of mining pool. It is also providing a diversity of security developments for miners. This protocol is an optional feature, so adoption of this process does not mean that the mining pool operators are not be able to do this transaction selection.

Another solution may be to implement MTP protocol. Before introducing it, let us present some other basic information on blockchain technology.

Merkle Tree

A Merkle Tree is a way of structuring data that can be used to verify a large amount of data for accuracy with speed and efficiency. Its introduction has changed the world of cryptography. In fact, Bitcoin would not be able to function without the Merkle Tree.

Each block of transactions comprises of several thousands of them. To minimize CPU processing time and increase security level, it is effective to use fewer data while processing and verifying transactions.

Merkle Trees came up with huge number of transaction of IDs and put them through a hashing algorithm, which yields a 64-character code that quickly and effectively verifies distinct transaction in a definite block commonly known as Merkle Root.

The Merkle Root is produced by sorting all the data inputs into groups of pairs. It is a repetitive process with 256 code that are paired up and converted to 128 code until a single code remains. This may seem complicated, hence let’s have a look on a graph below.

For illustrative purpose let us consider a block that has only 8 transaction IDs, 64 characters long. These IDs are as follows: 11111111, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888.

Information in each block will be ‘shortened’ with the use of hashing algorithm. Then, pairs of the hashes will be ‘hashed’ again (instead of 8 blocks we receive then 4 hashes), then the process repeats again and again, and the result will be a single one Merkle Root with the final code of 12345678.

Merkle Tree Proof

The Merkle Tree Proof (MTP) PoW algorithm was introduced by Alex Biryukov and Dmitry Khovratovich during the 25th USENIX Security Symposium in Austin (August 2016). It algorithm provides what the researchers called the “egalitarian computing”. It aims at making a balance and fairness between holders of computing power like large scale mining farms and those with less power such as home miners.

MTP uses a design that completes a “memory hard function” with fast verification and short proofs along with a Merkle hash tree. This function needs a quite large amount of memory (according to Zcoin minimum 4.5 GB of RAM) in order to compute PoW and will manipulate computational penalties on algorithm trying to calculate them with using less amount of memory. It will reduce the advantage of ASIC mining hardware against normal PCs, because memory intensive operation cannot be executed more efficiently through dedicated hardware comparing to ordinary PCs.

MTP can provide the properties needed within a cryptocurrency PoW scheme, such as relatively fast, efficient verification and resistance to ASIC mining.[6] During the past few months MTP has received important attention. The problem is that, introduction of MTP will substantially increase the size of blockchain database. This may require from the miners more memory storage and new hard drives for full-nodes may be a necessity.


Zcoin

Zcoin (XZC) is a GPU mineable privacy coin. It pioneered the use of the Zerocoin protocol that utilizes zero-knowledge proofs to provide transaction privacy. Zerocoin protocol was proposed in 2013 by prof. Matthew D. Green and his students from Johns Hopkins University. Similarly to the case of DAO event on Ethereum, Zcoin suffered its own attack (of a much smaller scale) in February 2017, but unlike Ethereum it did not hard-forked the chain. In September 2018, the privacy was even more improved by hiding the origin IP addresses of a sender without Tor or VPN. The focus on privacy led Zcoin to conduct the world’s first large-scale party elections on blockchain in November 2018. The next month Zcoin has implemented MTP algorithm.

Zcoin concentrates on fair distribution and decentralized security by implementing MTP that limits the gap between specialized miners and widely available CPUs/GPUs. This implementation allows for ordinary users to participate in mining with the use of CPUs or GPUs. Monero and recently Zcoin are leading the charge for ASIC-thwarting updates.

Zcoin also utilizes masternodes (there are about 5500 of them) and developed a new privacy protocol called Lelantus on new “Sigma” protocol, which replaced previous Zerocoin protocol on 30 July 2019. The July update has removed the trusted setup and reduced the proof size (from 25 kB to 1.5 kB). At the beginning of July 2019 Zcoin has also improved its MTP verification speed up by 30%. A few days ago Zcoin has also introduced the first Nvidia miner.



TecraCoin

The mission of the TecraCoin project is to create a decentralised platform bridging scientists and inventors with investors through tokenization of intellectual property rights, among others. As a starting point Tecra Ltd has acquired 4 graphene patents (and plans launching a revolutionary graphene bulb on the market in 2020 partnering with the largest chemical company in Poland) and licenses for using patented technologies to eliminate organic wastes (already working in several places in CEE Europe). The DEX platform that is planned will work (about 2022) on Tecra’s own blockchain with smart contracts. This blockchain started operating in October 2018; it is a fork of Zcoin and the Tecra team cooperates with Zcoin developers (including Djm34). TecraCoin has about 400 masternodes running.

Using the experience of Zcoin, TecraCoin has already implemented MTP protocol within its code and runs it on a testnet. To run it on mainnet, a hard fork will be required. The new pool for miners will also be created. On 1st August 2019 the new explorer was launched on the testnet.

One of the side-effects of the MTP protocol is its space requirements. Soon, the TecraCoin MTP-based blockchain will produce about 40GB of new data every year. The dev team tries to decrease it (modifying the “L” parameter introduced by MTP algorithm from the value of 64 to 32) to half of this size. Even already the TecraCoin blockchain is larger than the one of Zcoin, because TCR blockchain has 2.5 min per block and Zcoin has 5 min per block. The solution can be to increase the block time to 5 minutes.

TecraCoin wants to bring more egalitarian approach both to mining and to investing. So far, there was no public market for patents; they were available mostly as private deals done in many cases by corporations and investment funds, sometimes intentionally not delivering them to the market. We believe that the ability for the scientists and inventors to access the financial markets easly and cheaply will bring more democratisation to science and will speed up innovation processes all over the world.

Thanks for their contribution and co-authors :

  1. Prof.Dr Krzysztof Piech
  2. Shahrzad Shafiei
  3. Souvik Tripathy