Introduction to blockchain and cryptocurrency mining — Cudo Miner

Money has always been evolving alongside humanity. Commodity money, where the actual coins are made of a valuable material like gold, goes back as far as about 700 BC. Representative money may be even older, as a token representing some valuable material is used for trading, instead of the actual material. Representative money was used until last century, as most currencies represented gold bars that were safely stored elsewhere. Nowadays we all use what is called fiat money, which only has value because the government decides so. Have a look at this great article from the Bank of England for an in-depth explanation.

Technology is evolving extremely fast in the last few decades, and society is evolving with it. The internet is now an essential tool, and together with smartphones is causing a deep change in the way we do things. Cash has started to fall into disuse, and online shopping is now easy and widespread. The way we buy and pay for things has changed dramatically in the last few years, but the currency itself has remained the same. Cryptocurrencies are trying to change this.

A cryptocurrency is a digital currency which uses cryptography to ensure its security, while broadcasting live on the internet all transactions. The main idea of cryptocurrencies is to avoid the centralisation and trust in a few organisations which control all monetary transactions. In other words, the aim of cryptocurrencies is to get rid of the traditional banks and fiat money, in favour of a decentralised, communal system where transactions are still secure and private.

In order to accomplish this, the cryptocurrency networks save all transactions in what is called the blockchain. This is an important concept, so let us explain it in some detail. Since Bitcoin is the most famous cryptocurrency we use it as the main example throughout this explanation. A great video explaining more in depth the basics of how it works can be seen here.

Blockchain is, simply put, the cryptocurrency term for ledger. That is, the blockchain is a list of all transactions for a given cryptocurrency. Single transactions are grouped into blocks, which are the building pieces of the blockchain. For Bitcoin, currently each block has around 2,500 different transactions in it, but this is not a fixed number; new blocks are created every ten minutes.

Everyone has a copy of the blockchain, and to make sure that everyone has the same block transaction list, and in order to avoid people from cheating (more on this later), cryptography algorithms are used to make this chain of blocks secure. Namely, blockchains typically use a Proof-of-Work (PoW) system: in order for a block to be a valid candidate for the chain, it has to carry enough proof of its authenticity, and this proof is measured in terms of work.

What is meant by work is computing work: finding a certain, unique number for each block that satisfies a certain cryptographic algorithm. The main point is that finding this unique number, called the hash number, is not an easy task, but a task that can be performed by anyone nonetheless. This is where the cryptocurrency decentralisation kicks in: ideally, anyone with a computer can validate the blocks, and so instead of having a central bank that controls all transactions, every computer in the world is keeping track of all of them and validating their authenticity. Finding this validation for a block is called mining.

Drawing illustrating the core idea of blockchains

This idea has many setbacks, but as Bitcoin and the other existing cryptocurrencies are showing there are ways to overcome most of them. Let us explain a few.

First of all, there could be conflicting blocks appearing in the chain, or someone could create a fake block with fraudulent transactions. The way PoW controls this is by temporarily allowing different versions of the chain to exist, and trusting the longest one (that is, the one where more work was put in). This is the consensus algorithm. Since there are many computers around the world mining for this same chain, fake blocks will be quickly discarded, as they will only be mined by their fraudulent creator.

Certainly, if a group of people could control enough computers around the world, they would be able to add fake blocks to the chain and steal money from other users. This is called a 51% attack, and while it may be a problem for small cryptocurrencies, for big networks like Bitcoin’s is not feasible, as it is nearly impossible to accumulate that amount of computing power.

Now, for this system to work the blockchain needs people mining the blocks in order to validate the transactions. Why would anyone want to do that? The answer to this question are block rewards: every transaction has an associated reward, which is a prize for the person who manages to mine that block. This ensures that people will try to mine blocks, as they will earn money by doing so.

This is an issue for small transactions. In order to validate any transaction we need someone to mine it, and this mining needs to be paid for. Therefore, if I want to give a friend a few cents in Bitcoins, I will have to pay a fee to validate the transaction that might be comparable or even higher than the actual money I wanted to send.

Mining fees are not a real issue for big transactions though. On the contrary, they can be seen as a strength of the system. Since the transaction is securely performed through the blockchain there are no intermediaries ever, and in particular there is no central bank. So this is the only fee that needs to be paid, and potentially anyone has a shot at earning it.

One of the main problems of the system explained above is the lack of scalability. This lack of scalability manifests itself as a low limit in the amount of transactions that the blockchain can process. This also causes mining fees to greatly increase in busy periods. Related to all this, the scalability issue is also due to the big power consumption that the blockchain requires. As we said, the idea of Bitcoin’s PoW protocol is to have a lot of computers around the world mining to obtain that one unique number that validates the block. This means that there will constantly be a lot of computers calculating the same thing, and most of this work will not be used at the end.

This of course is extremely costly in terms of computing power or, in other words, in terms of power consumption. Bitcoin’s network currently uses roughly the same amount of electricity as a country like Greece.

Bitcoin’s energy consumption and electronic waste
Data from:

Market volatility is currently another issue for cryptocurrencies, as it is extremely high. This means that the price fluctuations of the coins are huge and very unpredictable. Typically the price of a cryptocurrency varies by 10% daily, and there have been instances in the past where the change has been a lot bigger than that, as we can see in the following figure.

Daily price variations of Bitcoin, Ethereum, Ravencoin and Bitcoin Gold
Data from:

An important point that needs to be kept in mind is that cryptocurrencies are fairly new, and thus they are still an evolving market and a very active area of research. New cryptocurrencies are being created regularly, and existing ones are being updated. Some of them introduce new revolutionary ideas within the cryptocurrency community, like Ethereum did. We comment more on Ethereum at the end of this post.

Last, related to the amount of computing power, there is the issue of specialised computers built only to mine a cryptocurrency in a very efficient way. They are called ASICs, and while they also have their own limitations they are a very powerful tool, that has caused Bitcoin’s miners to be mostly ASIC owners.

ASICs can thus be seen as a centralisation of the Bitcoin network, which goes against the original cryptocurrency idea. That is why a big part of the cryptocurrency community is putting their efforts into avoiding the ASIC dominance of the market. To do so, some ASIC-resistant algorithms are being tested, with different degrees of success.

There are two main strategies to make a coin ASIC-resistant. The first one, used for instance by Ethereum, is to have a memory-hard hash-algorithm. This means that, instead of having an algorithm which is solved entirely by trial and error calculations, like Bitcoin’s SHA-256, it uses an algorithm where memory is the limitation. These are typically mined using GPUs. Check out our ASIC vs GPU mining post for an in-depth explanation.

The other option to create an ASIC-resistant coin is to use combinations of hash algorithms instead of a single one. Since an ASIC is optimised for one algorithm only, it is very hard and expensive to have an ASIC which can solve any combination of hash algorithms. An example of this second case is Ravencoin, with the X16R algorithm. This algorithm uses a number, unique for each block, to choose sixteen hash functions in a row from a set of sixteen, with repetition. Therefore, there are potentially 16! = 20,922,789,888,000 possible combinations of hash functions that can occur.

As we said above, some cryptocurrencies have introduced novel concepts in the blockchain community. The Ethereum network was a big step forward for instance. This network not only allows crypto-money transactions, but it also allows you to run code (computer programs) in it, to create assets which you can link to the real world for example. This is done with smart contracts.

Another innovation that Ethereum will shortly put in practice is a modification of the PoW protocol. As we said, having everyone mine the same thing is very inefficient and the power consumption is very high, so many alternatives are being sought. An alternative that some coins are already using and that will be tested soon by Ethereum is the Proof-of-Stake (PoS) protocol.

The idea behind this protocol is not to have everyone mining blocks in the chain and trusting the chain with the most work, but rather choosing randomly miners from the network, and asking only them to mine blocks. This selection is not proposed to be entirely random; characteristics like cyber age or currency possession would also be taken into account.

Smart contracts are very exciting, as they can be seen as the start of a new era in computing. Stay tuned for related posts in our blog on this topic.

What is our current opinion on the subject?

Here at Cudo we are convinced that fiat money is likely to disappear in the future. Cash is rarely used anymore, in favour of electronic transactions. We believe in the world-wide adoption of a more ethical and safe cyber-currency. Cryptocurrency is still in developmental stages, but we believe it is a great step in the right direction. Also, we believe it is essential to do research around the blockchain technology, as it could evolve and become the next big worldwide technological revolution.

Why use Cudo’s software?

Mining is not a straightforward task. Not only you have to decide which coins to mine, but the setup and configurations required on your computer for mining are not that easy. Our software allows you to skip all these steps and mine straight away, while optimising your revenue and getting paid in the currency of your choice.

Author: Joan Garcia i Tormo

Originally published at on May 3, 2019.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cudo Miner

A crypto mining software with features unmatched by any other leading software Optimized for both profit & performance for Linux, Win & CudoOS