JavaRush /Java Blog /Random EN /Not so creepy crypto. Part Two: Cryptocurrencies and Mini...

Not so creepy crypto. Part Two: Cryptocurrencies and Mining

Published in the Random EN group
Not so long ago, we already wrote about blockchain , a technology that has great potential in various areas where it is necessary to ensure the storage of information in an unchanged form. With its help, it is possible to guarantee the reliability of data in electronic medical records or diaries of students, ensure the integrity of server logs, and protect land cadastral data from substitution. But this technology has gained the greatest popularity thanks to cryptocurrencies, to which today's article is devoted.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 1

A bit of history

The direct association between blockchain technology and cryptocurrencies is not accidental. After all, its very first application was to ensure the work of the well-known Bitcoin. Coincidence? Not at all. The fact is that this technology and the idea of ​​a decentralized financial system were invented by the same person (or people) known under the pseudonym Satoshi Nakamoto. The principle of operation of the blockchain was published by him in 2008. And in 2009, the world saw its first implementation, integrated into bitcoin.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 2

Chained by one chain

In a conventional (centralized) financial system, control over non-cash transactions is performed by the bank. For example, you transfer conditional $100 to your friend Petya. At the same time, the bank verifies you, checks your account for the required amount, subtracts $100 and adds the same amount to Petya's account. However, you cannot spend more money than you have. Or transfer the same $100 to several people at the same time, taking advantage of delays in online protocols. All this works great as long as the bank is considered an unconditionally reliable and trusted participant in the operation. Of course, banks strive to ensure absolute reliability, but in the event of any catastrophes, natural disasters, large-scale robberies,
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 3
The idea of ​​a decentralized financial system for a long time did not go beyond utopian fantasies precisely because of the lack of a mechanism or technology capable of replacing the bank in conducting operations, and at the same time not turning these operations into centralized ones. It was only with the invention of blockchain that it became possible to create a truly decentralized financial mechanism. In fact, the functions of controlling transactions and storing information about the number of coins in each of the wallets are taken over by all participants in the system. At the same time, all data is stored in the blockchain, which allows you to protect them from illegal changes. So, with an identical transfer of 100 dollars to Petya, your wallet client transmits information about the transaction to all participants in the system. If there is not enough money in your account, or you have already transferred it to someone else, the network refuses to process this transaction. If everything is in order, then the data about it falls into the next block of data recorded in the blockchain. With this scheme of work, a stable speed of sealing data blocks is very important. Since when it decreases, transaction processing can greatly slow down, up to the level of the actual impossibility of using cryptocurrency for quick settlements (few people want to wait three banking days until virtual money is transferred from one wallet to another). Therefore, to maintain the desired pace of the network, its creators introduced self-regulation: if the prints are found too quickly, then their generation becomes more complicated, and if they are too slow, the task is simplified. And in order to encourage people to participate in the search for seals, a reward has been introduced for finding seals. Accordingly, the higher the rate of cryptocurrency rises, the more people want to be rewarded for finding the seal. And this, in turn, serves as a kind of network defense mechanism against hacking - after all, an attacker needs to “outweigh” the computing power of hundreds of thousands of miners covered by a cryptocurrency fever.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 4
However, even if you are not engaged in mining, but simply keep a wallet connected to the network, then you will gradually “drop” money on it. This is the fee for including a transaction in the current block. The larger the network and the more operations carried out in the network, the higher the commission and the higher your earnings.

The main thing is anonymity

Perhaps, having read about how cryptocurrencies and blockchain are connected, you have the impression that there can be no question of any anonymity in them. After all, all data about wallets and cash are in the blockchain, which is available to every member of the network. However, this is not the case. First, a software wallet can manage multiple accounts hidden behind depersonalized strings of numbers. So no one will know for sure that it is your money. Unless you say so yourself, or you purchase “labeled” coins from a service that requires personalized authentication. And then - the binding of only some accounts will become known, while no one will be able to connect new ones with you. Secondly, the anonymity of transactions. In networks built on the code base and principles of bitcoin, each transaction can be traced throughout the blockchain from the sender to the recipient and vice versa. Therefore, those who wanted to make payments as anonymous as possible came up with bitcoin mixers. In them, the transferred funds are mixed with others passing through the mixer, and are sent in transit through the accounts of the participants. As a result, the sent money comes to the recipient in the form of many small transactions from different accounts. Previously, mixers were centralized services that could be deanonymized by gaining access to their respective servers. Now protocols that allow such transfers to be made in a decentralized way are more popular. The exchange starts automatically as soon as the required number of participants and money available for exchange is recruited in the peer-to-peer network. Tracking such transfers is really extremely difficult. those who wanted to make payments as anonymous as possible came up with bitcoin mixers. In them, the transferred funds are mixed with others passing through the mixer, and are sent in transit through the accounts of the participants. As a result, the sent money comes to the recipient in the form of many small transactions from different accounts. Previously, mixers were centralized services that could be deanonymized by gaining access to their respective servers. Now protocols that allow such transfers to be made in a decentralized way are more popular. The exchange starts automatically as soon as the required number of participants and money available for exchange is recruited in the peer-to-peer network. Tracking such transfers is really extremely difficult. those who wanted to make payments as anonymous as possible came up with bitcoin mixers. In them, the transferred funds are mixed with others passing through the mixer, and are sent in transit through the accounts of the participants. As a result, the sent money comes to the recipient in the form of many small transactions from different accounts. Previously, mixers were centralized services that could be deanonymized by gaining access to their respective servers. Now protocols that allow such transfers to be made in a decentralized way are more popular. The exchange starts automatically as soon as the required number of participants and money available for exchange is recruited in the peer-to-peer network. Tracking such transfers is really extremely difficult. In them, the transferred funds are mixed with others passing through the mixer, and are sent in transit through the accounts of the participants. As a result, the sent money comes to the recipient in the form of many small transactions from different accounts. Previously, mixers were centralized services that could be deanonymized by gaining access to their respective servers. Now protocols that allow such transfers to be made in a decentralized way are more popular. The exchange starts automatically as soon as the required number of participants and money available for exchange is recruited in the peer-to-peer network. Tracking such transfers is really extremely difficult. In them, the transferred funds are mixed with others passing through the mixer, and are sent in transit through the accounts of the participants. As a result, the sent money comes to the recipient in the form of many small transactions from different accounts. Previously, mixers were centralized services that could be deanonymized by gaining access to their respective servers. Now protocols that allow such transfers to be made in a decentralized way are more popular. The exchange starts automatically as soon as the required number of participants and money available for exchange is recruited in the peer-to-peer network. Tracking such transfers is really extremely difficult. Previously, mixers were centralized services that could be deanonymized by gaining access to their respective servers. Now protocols that allow such transfers to be made in a decentralized way are more popular. The exchange starts automatically as soon as the required number of participants and money available for exchange is recruited in the peer-to-peer network. Tracking such transfers is really extremely difficult. Previously, mixers were centralized services that could be deanonymized by gaining access to their respective servers. Now protocols that allow such transfers to be made in a decentralized way are more popular. The exchange starts automatically as soon as the required number of participants and money available for exchange is recruited in the peer-to-peer network. Tracking such transfers is really extremely difficult.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 5
In networks built on the code base of Bytecoin (and similar altcoins), mixers are not needed, since data about the sender, recipient and the exact amount of the transaction are additionally encrypted. At the same time, this does not interfere with taking into account the total number of network participants, the number of transactions, and an approximate estimate of the amount of money in circulation. And even if your bitcoin account has been compromised by not-so-legitimate purchases or sales, it can be “cleaned up”. To do this, you will have to spend the money left in the account to buy anonymity-oriented alternative coins (for example, Monero), and then carry out the reverse operation to a new wallet. As a result, attempts to trace the origin of funds will fail, faced with cryptographic protection of external and internal exchange transactions.

Not just a means of mutual settlement

Now cryptocurrencies are increasingly used as an equivalent of ordinary money to pay for services and goods. Without this, their widespread recognition would be simply impossible: any currency acquires value only due to the fact that something can be exchanged for it. That is, buy.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 6
But, unlike ordinary banknotes, cryptocurrencies have other properties. For example, they are to some extent an analogue of valuable metals or stones - resources with a limited amount. The same gold is valuable not so much for its corrosion resistance, but because it is a finite resource, with rather limited reserves (at least those that we can mine). The same bitcoin (and many cryptocurrencies) is also finite - its algorithm was based on the limitation of emission (issuance of new coins). This is implemented both at the mining level (the size of the print generation reward is halved every 210,000 blocks) and in general (the maximum can be mined only 21 million bitcoins). So cryptocurrencies can also be used as a means of speculation and accumulation. With an increase in demand, the price of a cryptocurrency will only increase. In the same time, as purely digital systems, cryptocurrencies have completely new properties. So, in Ethereum, for the first time, the possibility of creating smart contracts was fully implemented - algorithms that work inside the blockchain and allow automating the execution of any tasks. In principle, smart contracts open up the possibility of creating fully automatic and transparent systems. The only difficulty (caused by the increased security requirements of this tool) in their creation is that smart contracts can only work with objects that are in the blockchain. Ethereum was the first to fully implement the ability to create smart contracts - algorithms that work inside the blockchain and allow you to automate the execution of any tasks. In principle, smart contracts open up the possibility of creating fully automatic and transparent systems. The only difficulty (caused by the increased security requirements of this tool) in their creation is that smart contracts can only work with objects that are in the blockchain. Ethereum was the first to fully implement the ability to create smart contracts - algorithms that work inside the blockchain and allow you to automate the execution of any tasks. In principle, smart contracts open up the possibility of creating fully automatic and transparent systems. The only difficulty (caused by the increased security requirements of this tool) in their creation is that smart contracts can only work with objects that are in the blockchain.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 7
Smart contracts are a relatively new tool, and the scope of its application has not yet been fully delineated. First of all, they began to be used to implement the instruments familiar to the ordinary financial market. So, with their help, they organize ICO (Initial coin offering - initial placement of coins), a procedure named by analogy with IPO (Initial Public Offering - initial public offering of shares, that is, the company's entry into the stock market). ICO smart contract offers to invest your cryptocurrency funds in the purchase of tokens (in fact, another cryptocurrency embedded in the blockchain) of the company. The issue of tokens is limited, and if the development of the company is successful, then their value will only grow. In fact, this is an analogue of the company's shares (without some of the corporate rights and regulation characteristic of the latter). Basically, ICOs are arranged by startups, as a variant of cranudfunding. According to the results of the placements already made, a successful ICO can bring organizers more than $150 million in various cryptocurrencies.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 8
Smart contracts with the introduction of their own tokens are used not only as shares, but also to create nested cryptocurrencies based on an existing blockchain. They are like a symbiont plant woven into the structure of the host tree - they develop together with it, simultaneously expanding the capabilities of their carrier.

They have no number

As you may have noticed, when describing different aspects of cryptocurrencies, we mentioned different names: bitcoins, altcoins, monero, ethereum. This is because there are a lot of cryptocurrencies. More than ordinary currencies, since you do not need to be a state, a bank or even a corporation to create them. Enough knowledge, desire and charisma to attract like-minded people. And although many cryptocurrencies are based on the open source codes of Bitcoin, there are also completely original currencies on the market. They rely on the codebase of one of three alternative cryptocurrencies: Bytecoin, NXT or Ripple. At the same time, the differences with the progenitors can lie both in just a different name, and in a fundamental change in the system for generating coins and their capabilities.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 9
However, new cryptocurrencies do not always appear due to targeted actions to create them. Sometimes a new coin arises due to the decentralized structure of the network itself. After all, each cryptocurrency is not “carved in stone” – from time to time, developers need to make some changes to the algorithm of their work. And for these changes to take effect, it is necessary that the majority of clients accept them in their client. If a group of users does not want to implement these changes, then a fork occurs - the division of the blockchain. The two blockchains will have a common start, and a different continuation after accepting/not accepting changes. Forks can be pre-planned (like the recent split of Bitcoin), and provoked by an attempt to fix a hacker attack (this was the case with Ethereum, when hackers stole about $ 70 million from the smart contract account of The Decentralized Autonomous Organization, a kind of analogue of an investment company). After the split, the main branch (the one that more users joined) of the blockchain remains with the same name, and the "splitters" get a new designation.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 10
This flexibility makes e-currencies more autonomous, but at the same time opens up scope for scammers. Despite the relative youth of the cryptocurrency market, it has already been shaken by several major revelations. There were hyped currencies whose creators disappeared with the money immediately after the first major infusions of real money into their system. There were exchange platforms that "collapsed" along with the money in the accounts after reaching a sufficiently high turnover. There were ICOs of fake companies that deceived their investors (in principle, this also happens on kickstarter). Fake ICO traders are still widespread, luring inexperienced investors to phishing sites with ads (not only investors suffer, but also companies whose good name is used to create fake pages). There were mining pools whose owners underestimated the real income from mining, or even ran away with the coins they earned, but not yet withdrawn from the pool. In principle, there are enough dishonest businessmen in centralized financial systems. Ponzi schemes, shares of fictitious companies, theft of pension funds, artificial bank failures - all these frauds are carried out quite well without the participation of cryptocurrencies. So, when working with coins, as in any operations related to finance, you need to be as careful, prudent and careful as possible. artificial bank failures - all these frauds are quite well carried out without the participation of cryptocurrencies. So, when working with coins, as in any operations related to finance, you need to be as careful, prudent and careful as possible. artificial bank failures - all these frauds are quite well carried out without the participation of cryptocurrencies. So, when working with coins, as in any operations related to finance, you need to be as careful, prudent and careful as possible.

Mining - collecting wealth by a grain of sand

Given the heterogeneity of the cryptocurrency market mentioned above, mining in each individual case can vary very noticeably. The fact is that there are two types of hashing algorithms (there are many more algorithms themselves) used to seal blocks. Those that need a lot of computing power, and those that need a lot of RAM. In practice, this manifests itself in different mining scalability. Algorithms of the first type are greatly accelerated when using optimized hardware (additional computing processors). But for algorithms of the second type, more practically full-fledged computers with a solid supply of RAM are needed. It is very expensive (and unprofitable) to create special mining solutions of this type, so cryptocurrencies based on such algorithms
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 11
However, the most expensive cryptocurrency, Bitcoin, uses the first type of algorithm. At the dawn of time, it could still be mined only on the processor. Later, miner programs appeared that made it possible to speed up calculations by transferring them to the GPU cores. Video cards have long surpassed the processor in multi-threaded computing, and 128 (or more) cores made it possible to calculate prints many times faster than a two / four core central processor. However, mining on video cards still has not lost its relevance. Yes, there is nothing to catch with them in bitcoin, but in young and relatively unpopular currencies, a video card can bring a lot of coins. All thanks to the versatility of such a solution, because the graphics core is not sharpened for any one algorithm - just change the miner program and you can mine another cryptocurrency. Well, or run a computer game and "extract" fun and pleasure. More advanced bitcoin mining solutions used two, three or more video cards placed in a case with good airflow. Further, engineering thought reached entire bitcoin farms, where hundreds of video cards were packed into server cabinets and organized entire computing clusters from them. Mining was going great, but the electricity bill wasn't far behind either.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 12
It was the issue of energy efficiency that gave impetus to the development of the direction of specialized mining solutions and the refusal to use video cards in this matter. For the first attempts, FPGA boards (boards with reprogrammable processors) were used. By reprogramming them for the desired algorithm, it was possible to achieve better performance per kilowatt / hour than video cards. In addition, their clear advantage was the ability to optimize calculations or rebuild them for other cryptocurrencies (if you have the appropriate low-level programming skills). But the same versatility did not allow squeezing the maximum performance out of FPGA solutions. However, the rise in the cost of bitcoin has made it economically viable to create specialized platforms. This is how ASIC chips appeared, designed exclusively for computing hashes using SHA-256d, which is used in bitcoin. They are expensive, fast, energy efficient and absolutely useless except for mining. When ASIC chips lose their relevance, they can only be thrown into a landfill.
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 13
When mining alone ceased to bring guaranteed coins, the formation of pools began. Individuals or organizations gathered in teams and were engaged in mining under one common account. Thus, a distributed computing cluster is created within the pool, the components of which receive tasks to process a certain range of seals. The funds received during mining are distributed among the participants in accordance with the number of hashes generated during the solution of the problem. Of course, a large pool is more likely to earn rewards for finding seals than a lone wolf looking for a solution on its own. So, on the one hand, participation in the pool is more profitable than independent mining. On the other hand, you lose commission profits since most pools don't share them. Another way of mining stands apart. If you do not have your own computing power, or you do not want to load your computer with hash calculations, then you can use the services of cloud mining. Some large mining farms offer to rent some of their computing power and sit back and enjoy the increase in the number of coins in your account. But here, as with pool mining, there is a chance of running into scammers who will underestimate the number of mined coins or simply steal them.

To dig or not to dig?

Cryptocurrency mining is the new gold rush. But, unlike gold mining, there is a need for significant investments in mining to join the ranks of crypto miners (at least in bitcoin). So, if you are not ready to devote a lot of time to selecting the optimal components for a mining system and invest a lot of money in building it, it makes sense to just buy some cryptocurrency and try to make money by selling it after the price rises. Or you can pay attention to not the most mainstream cryptocurrencies, and start mining them with the expectation of a subsequent increase in their value (imagine how American Laszlo Hanech, who in 2010 spent 10,000 coins to buy two pizzas, gets upset looking at the current bitcoin rate - now he I could buy a villa and a small car park on them).
Not so creepy crypto.  Part Two: Cryptocurrencies and Mining - 14
In any case, cryptocurrencies are an established trend that is unlikely to be interrupted even by some major cataclysm in the electronic money market (there have already been several of them, and nothing). Even such inert structures as banks and states began to think about the use of cryptocurrencies and their integration with the usual financial system. You can mine, you can not mine, but there is no getting away from electronic currencies.
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION