Social media


How to make cryptocurrency networks more secure?

Author: LB 2021-01-10 371

Since Bitcoin appeared in 2008 as an idea our financial world has been changing very rapidly. A few centuries ago, humans were exchanging cash, but then banks emerged and they told us that they can take care of our money. We just have to deposit our money into their accounts and they will move our funds between accounts. When we arrived at year 2000, we already had a pretty efficient banking system and transferring almost unlimited amount of money in a few seconds is a functionality that everybody would expect from an ordinary bank account. We can wire funds from our living room, from a yacht, from an airplane and even from the Mont Blanc. So I think it is not unacceptable if someone is grateful to the banks. Nevertheless, some ingenious scientist thought that the whole financial system should undergo a radical transformation and they invented the concept of cryptocurrencies in 2008. The idea itself is very good, but there are some interesting aspects to be consider when one takes away the financial control from the banks and gives it to ordinary people. Let's see some thoughts on cryptocurrency mining.


So the idea of Bitcoin is awesome. I think the whole idea originates from the fact that there is a trend in the world to make everything "social". There is Aribnb, Uber, and the is Wolt. These are mostly c2c services. A can rent B's apartment or D can give C a ride. If you think of these c2c services in this way, you might realize that the number of possible transaction between the registered users is enormous, because any user can become a service provider and any user can possibly use the other user's service. Thus the number of possible transaction scales with the square of the number of registered users. Consequently, the platform provider can generate very impressive revenues and it has become to be very attractive to develop such social platforms. On the other hand, governments can not always keep up with rapidly changing technology and in many cases it is not even clear how to levy taxes on these services. Legistlation usually realizes that somethings should be done only when it's too late already. In many countries the amount of taxes you should pay on a revenue generated from cryptos is not yet determined. Obviously, if you have a revenue source, you are required to pay tax on that, but honestly, who is going to check your anonymous Bitcoin wallet?


1. How many chronic criminals are there among us?


Well, let's not talk too much about the taxes on cryptos, because I find the evolution of blockchains a much more intriguing topic and I wish to share some useful information on the recent developments in the Ethereum infrastructure.


So Bitcoin was invented. I'm not a huge supporter of conspiracy theories, because I don't think they lead us anywhere. My primary goals are always to understand technology, to analyze the risk involved in cryptocurrency investments and to cast light on new blockchain solutions.


For me Bitcoin is a community based currency. Not many people call Bitcoin this way, because cryptocurrency is a much more common technical term, however I still think that calling it "community currency" is a little bit more expedient. Mainly because anybody can buy Bitcoins, so it is very similar to USD or the Euro. Transactions on the Bitcoin blockchain are validated by miners and being a miner is not a designated post. You can also start mining Bitcoin. You need some initial knowledge on how to set up a miner and you might need some capital to purchase your mining rig. Your neighbour can also become a cryptocurrency miner, a former prisoner who was released a few days ago, or the Russian mafia can also start mining. This means that nobody can guarantee that mining will be performed by sincere people. So what is the ratio of adversary people in a society? This is a very good and important question, mainly because of the existence of the Byzantine generals problem.


2. Byzantine generals problem


Here is a short introduction to understand the Byzantine generals problem. So if there is a fortress that can only by conquered by the simultaneous attack of two armies the generals would have to agree on the day of the attack so that they attack the fortress in a unified way. So one general has to send a message to the other one with a messenger to tell him that they're going to attack on a certain day. However, if the messenger is unreliable and changes the day he was told by his general the two armies will fail to conquer the fortress. So the result of the battle depends on the messengers will. It can also be proven that a solution exists to the problem only if there are three times more honest participants than liars in the system.


If we think of the cryptocurrency networks in this way, we realize that it's extremely important to have much more honest users than malicious users in the networks. The problem of 51% attacks is closely related to this idea. You can read more on this topic by clicking here: Why is it so risky to invest my money into crypto?.


When experts are talking about cryptocurrencies, they always put emphasis on the importance of decentralization. In other words, every miner should have equal rights in the infrastructure and every possibility for malicious miners to cooperate should be prevented. These two things are of utmost importance. Otherwise the balance in the system tips over and nobody can guarntee the stability of the network. But why are there mining pools already with massive hashing power? Aren't mining pools the ones in the network with enormous computational power? Well this is a very interesting question.


The algorithm to mine Bitcoin can be understood in a few hours. The miners only have to calculate the value of a certain hash function and if the calculated value satisfies the given criteria then the block is accepted and the miner is rewarded. The value of the hash is generated from transaction data and back in the days Bitcoin mining was done by small private CPU nodes, but as market prices started going up manufacturers turned their attention to the crypto world and they started producing ASIC miners on a very large scale because they knew that they will be able to sell them in large quantity. You can buy these ASIC miners from China, but they come with a hefty price tag and you have to wait a few month until the machine gets delivered to you. But don't they keep some for their own use? I guess I'm not mistaken when I suppose that if they manufacture these ASIC miners they do have some for their own mining rigs. I imagine that China possesses a very significant proportion of the world's hashing capacity. Would it be easy to come up with new manufacturing plans to produce ASIC miners in Europe when most of the IC factories are in South China?


3. Then they invented Ethereum


Ethereum has been proposed with the goal of solving the above described issues. So we understood that excessively powerful miners can cause problems, therefore new cryptocurrencies have to be ASIC proof. This can be achieved by introducing calculation steps that require a large amount of memory, because ASIC miners can hardly be supplemented with extra RAM. Mining Ethereum on CPUs in 2021 is is not efficient anymore and most miners utilize a highly optimized GPU for this purpose. Check out the following guide on how to mine Ethereum using a video card: How to mine Ethereum on GPU for beginners - a step-by-step guide


So this means that even we, mortal users are allowed to join to the game. You just have to buy a solid GPU, install your Ethereum miner software and you're ready to roll. If miners appear with almost equal probability around the world, the chances of mining giants overtaking the market decreases. Initially, when the network consists of only a few miners, the risk of a 51% attack is still not zero. Vitalik Buterin from the Ethereum fundation and some other crypto enthusiasts at San Jose State University are working on a solution for these kind of problems.


4. POW vs. POS


POW is the abbreviation of the word proof-of-work, and crypto networks (for example Bitcoin and Ethereum) with POW usually employ a very computationally intensive process to verify transactions. In a few years since their appearance we understood that 51% attacks can be very nasty and this concept of POW needs improvements. Not too long ago a new consensus algorithm, POS was born. POS stands for proof-of-stake. You can access Vitalik Buterin and some other researchers' paper on the POS consensus using the following link: Combining GHOST and Casper for more details.


So their main goal is to make the Ethereum more reliable and stable. They wish to achieve this by eliminating malicious participants and their conflicting blocks from the network. Conflicting blocks can appear if someone is trying to spend his money twice or there is too much latency in the network and messages are broadcast with significant delays. A malicious user can do the following if policies against double-spend are not enforced. They user buys BTC for $1000 from a Bitcoin ATM in Budapest and he sells the coins back to the same machine to withdraw his $1000 and right after this he can sell the same coins to a Bitcoin ATM in Krakow where his friend is waiting with the necessary details to withdraw another $1000. This malicious user has created a money multiplier machine and if he possesses more than 51% of the mining power, his vices will go undetected.


In the Bitcoin architecture, the consensus is the following. If two miners successfully mine blocks in the same time, the one with longer blocks (chain) will be treated as valid. So this means that if someone has significantly more mining power than the others, then his blocks will always be accepted and other miners won't have any chance to stay in the game. This is not very pleasant, and the POS consensus is dedicated to solve this problem.


When using the POW consensus, blocks are validated with computationally very intensive processes, however in the POS case validation is essentially for free, because the miners don't have to calculate millions of hashes in one iteration. What they're required to do is to deposit some money into the network by buying the actual cryptocurrency. This process is called staking, hence the name proof of stake. At first sight POS might sound a bit more impudent than POW, because users do have to deposit funds, but if you consider that POW miners have to invest their money into mining equipment, you realize that we're in the same situation. But anyway, only those who bought some cryptocurrency to lock their money into a crypto stake are allowed to validate transaction blocks. Miners in a POS network are usually called validators and these validators vote (attestations in the original paper) for blocks deemed as valid in a certain iteration (epoch). The consensus in the new proposal is that the validators accept the block with the most number of votes. If we suppose that there are always more than 3 times more hones validators than malicious validators, then we can be sure that the blockhain will evolve in the hones direction, because there are always more honest than dishonest validators. This is only true if no one votes more than once in a given time frame. This should be enforced and malicious miners in the Gasper (Ghost + Casper mixed) algorithm face punishment (they get their stakes slashed) if they brake these rules. These are called as slashing conditions in the original paper. Further incentives to promote good behaviour in the network can be achieved if the slashed stakes are distributed among those users who notify of the malicious user.


The following figure illustrates the evolution of a POS blockchain. The accepted blocks are painted with blue colour. Note that they received the most number of attestations in every round:


Blockchain evolution in LMD-GHOST (Combining GHOST and Casper)


Voters form committees in the network and one voter from a given committee shall propose a block. The rest of the users will vote on whether the block is valid or not. If the proposed block appeared to be conflicting, the validators cast light on the misbehaviour and they initiate the necessary punishments to slash the hustler's stake.


5. How do Ethereum validators earn rewards?


They can earn money in two ways. The new Ethereum network rewards them if they propose non-conflicting blocks and when they vote for such a block as a voter. These two measures incentivize sincere behaviour. When a user is engaging in precarious activities the network slashes his stakes. The amount of reward given to goodwilled users and the amount of fines issued to swindlers can be adjusted according to speed and safety requirements in the network.


The POS protocol has already been implemented in a few solutions. These are some of the representative examples: Tendermint, Casper CBC, Hotstuff, Ouroboros, Snow White, Nxt, Thunderella és Dfinity.


The POS consensus offers a much more subtle way to tweak the cryptocurrency network and the fact that validation doesn't require expensive electronics further emphasizes its superiority over POW. I expect that when we see new cryptos given birth in the market, they'll most likely adopt the POS or a modified POS consensus with voters, committees, rewards and punishments.


Contact the author using the following link: LB


Illustration: pixabay.com

Interesting entries


29.08.2021

Mining ravencoin and farming chia on the same machine

23.07.2021

What is my ROI on my chia farm investment?

06.05.2021

Russian miners are already testing the Nvidia CMP 30HX chip for mining

05.05.2021

Technical details and the ROI of Chia Network Farming

30.04.2021

Investigating monero mining on a notebook