This article considers forms of blockchains, discusses mining principles and describes how to create your own cryptocurrency.

While basics and use cases were presented in the previously published article , this article will explain technical details of the blockchain. Finally, this article explains how to design and implement your own cryptocurrency yourself.

What is a blockchain?

The block chain is a novel technique for storing of data . It allows the secure management of information of all kinds. Elementary units of this technology are transactions that are verified, validated, and aggregated into blocks. These blocks are then concatenated and the databasethus continues to grow linearly.

Read Also : What is RIPPLE?

Read Also : What is NEO?

Read Also : What is NEM?

The Blockchain has the potential to shift and reorganize large parts of the economy. The blockchain database can be considered absolutely tamper-proof because the blocks are encoded with a hash function consuming and copies of the file are distributed on the Internet.

Types of Blockchains

In principle, a distinction is made between blockchains between a private and a public variant, whereby there is still the consortium blockchain as a hybrid form. This section explains the species and briefly discusses their benefits.

Public Blockchains

A public blockchain is an open system in which every participant in the world can view the data, carry out transactions and understand their accuracy, and otherwise participate in the consensus process.

The consensus process determines which blocks are added to the chain and what their current state is. Public blockchains are secured by cryptoeconomics, a combination of economic incentives and cryptographic encryption methods. These mechanisms are known among other things as “proof of work”, “proof of stake”. The various mining principles are presented in this article. These mechanisms follow the general principle that the extent to which someone can influence the consensus process is proportional to the amount of economic resources they can sustain. These blocks are generally considered “fully decentralized”.

Consortium Blockchains

The consortium blockchain is a blockchain in which the consensus process is controlled by a preselected set of nodes. A consortium is a business combination of several legally and economically independent companies for the purpose of achieving an agreed business purpose.

For the Blockchain one can imagine, for example, a consortium of 15 financial institutions. Each of these participants operates one or more nodes. The right to read blockchain can be declared public or restricted to specific subscribers. Furthermore, there are also so-called hybrid routes, which are also referred to as root hashes of the blocks. These blockchains are also called “partially decentralized”.

Private Blockchains

As an alternative to the public blockchains, various blockchains have been created in which the transactions are validated by trusted entities. This can also be achieved by restricting access to the blockchain itself to a smaller number of trusted users. Such blockchains are called private blockchains and allow access to the blockchain.

Comparison Public / Private / Consortium Blockchain
Public block chainConsortium Block ChainPrivate Blockchain
safetyProof of Work / Proof of Stakecontrolled by set of nodespre-determined users
accessopen read and write accesscontrolled by the consortiumAuthorization for read or write access
speedslowlymore quicklyvery fast
identityanonymous / pseudonymousanonymous or publicknown identities

Blocking in the Blockchain – The Mining

The Mining (German grazing) designates the production of the block. It is an essential step in the process of the blockchain process. The mining replaces the central institution (such as a central bank), which otherwise issues new units of a currency. The most common technique, which is also applied to the crypto-currency Bitcoin, is the so-called “proof of work”. The miner must solve a difficult, mathematical puzzle to get to the train. Different miners compete with each other.

Those who have solved the puzzle first, get the train and receives a fee for its service in the form of bitcoins. This technology requires enormous computing power, which is associated with an immense power consumption. In the following, further techniques will be discussed.

Proof of Work (PoW)

With Bitcoin, which has popularized blockchain technology, the so-called “proof of work” algorithm (PoW) has been developed. Since Bitcoin is a public blockchain with non-known subscribers, there are high demands on the security and functionality of the algorithm. In principle, every participant in the Bitcoin network can participate in block generationparticipate. The PoW concept is designed in such a way that approximately every ten minutes, any participant in the system combines the transactions he has received at that time into a block that can no longer be changed. This is then distributed to all and is finally part of the collective block chain. The recipient of a transaction must therefore wait until it receives a block containing the transaction. Then she is certified.

The operation of Blockchain

block Chain

Blockchain will become the key technology in IT in the years to come.

1. Transaction

The transaction is the basic element of the blockchain. Two parties exchange information with each other. This may be the transfer of money or assets, the conclusion of a contract, a medical record or a document that has been stored digitally. Transactions work in principle like sending emails.

2.Verification

The verification verifies that a party has the appropriate rights for the transaction. The check is instantaneous or it is written to a queue which will later check. At this point, nodes, ie computers or servers in the network, are integrated and the transaction is verified.

3.Structure

The transactions are grouped into blocks, which are encrypted with a hash function as a bit number. The blocks can be uniquely identified by assigning the hash value. A block contains a header, a reference to the previous block and a group of transactions. The sequence of linked hashes creates a secure and independent chain.

4.Validation

Before the blocks are generated, the information must be validated. The most widely used concept for validating open source blockchains is the “proof of work” principle. As a rule, this method represents the solution of a difficult mathematical task by the user or his computer.

5.Blockchain Mining

The term mining comes from the mining industry and means the “mining”. In this process, the block is generated and hashed. To get to the train, the miners have to solve a mathematical puzzle. Whoever has the solution first, will be accepted as a miner. The miner receives for his work a Honroar in the form of crypto currency (Bitcoin).

6.The chain

After the blocks have been validated and the miner has done his work, the copies of the blocks in the network are distributed to the nodes. Each node attaches the block to the chain in a steady and unmanipulatable manner.

7.Defense

When a dishonest miner tries to change a block in the chain, the hash values ​​of the block and subsequent blocks are also changed. The other nodes will recognize this manipulation and exclude the block from the main chain.

To move the participants of the Bitcoin system to generate the blocks, each block that becomes part of the blockchain is granted a reward in the form of a fixed number of bitcoins. These bitcoins are created at this exact time. The one who creates a block first gets the reward as the only one. In addition, the miner receives the transaction fees included in the transactions. The algorithm automatically adjusts the level of difficulty to the computing power involved in the mining. So the more participants participate in the mining or the stronger their computing power, the more difficult the task becomes. The biggest criticism of the PoW is the immense power consumption, as enormous computing power necessary to solve the puzzle.

Proof of Stake (PoS)

The power of a miner in the proof of work follows from his or her computational power, as this determines the probability of block generation in the network and thus also its influence. The basic idea of ​​the Proof of Stake (PoS) is the decoupling of the power of a miner from his computing power, to weighting based on the number of coins in his possession.

Here, the likelihood of a block being generated by a participant depends on its share in the value of the network, ie the proportion of its assets in the respective virtual currency in the total assets. The computational effort and resources associated with the PoW are thus saved. Another advantage is the shorter block generation cycles. Investigations show, however, that with this approach, in contrast to PoW, there are other and sometimes serious problem areas with regard to the safety of the blockchain.

The coins created as a reward during block generation and retained transaction fees are distributed randomly and periodically via the coin holders, whereby the distribution probability of a participant is determined on the basis of the cumulative valency of the coins represented by him and the duration of the power of disposal. As protection against manipulation, unlike the PoW, not the computing power but the assets are used. An attacker must possess more than half of the total assets in order to conduct a valid parallel chain with sufficient probability.

Proof of Activity (PoA)

With the proof of activity , the idea of ​​a hybrid blockchain is further pursued by searching PoW and PoS blocks at the same time. The idea has yet to be followed by any implementation, however, the desired type of block generation offers advantages, however, a pure PoW or PoS methodology.

Thus, a PoW with a predetermined complexity is first searched for and sent to the network after a successful search. The block is considered full if a predefined number of N random owners have signed the block with their respective private key. The reward for the block generation is split between the proof-of-activity miner and the signing participants. Thus, on the one hand, the work is rewarded and, on the other hand, guarantees a kind of interest on the credit. The multiple check of a block included in the procedure additionally makes manipulation of the blockchain more difficult.

Proof of Burn (PoB)

The PoB is another energy-saving alternative to the proof of work. With this principle you have to destroy coins, so send to an address without usable private key, to be able to “mines” later coins. PoB now tries to “simulate” a cryptocurrency without unnecessary resource consumption in the closed world. If you want to mine at PoB, you have to destroy coins and, depending on the amount of the “burned” amount, you get a kind of score that can be compared to a miners’ hashrate.

The use of PoB is only possible in conjunction with a mining method, due to the presumed digital working capital. So first assets must be mined, in order then to be burned can. An attack on a PoB-based cryptocurrency is very risky for the attacker, as it has to provide more than half of all the burned coins, which means that unlike PoS-based currencies, its deployed assets are irretrievably lost in the event of failure.

Proof of Capacity (PoC)

According to the name, the PoC sets memory size instead of computing power. The mining principle of PoC provides that miners generate data segments (plots) and store them on a hard disk.

In addition to the targeted increased energy efficiency, the protection against botnets should be ensured. The threat of computer resources being stolen by a Trojan will be effectively prevented. The storage space required by the process is so large that an infection by a terabyte-sized Trojan hardly goes unnoticed.

How do I create my own cryptocurrency?

As digitization increases, so does the importance and prominence of cryptocurrencies. There are about 3,000 different cryptocurrencies, the currencies are increasingly accepted as a means of payment. But even in the Darknet, the digital currencies act as a means of payment. Bitcoin is the best-known and most valuable currency with a market capitalization of approximately $ 10 billion. The Ethereum, which was launched in 2015, is in second place with $ 1.5 billion . But how much technical know-how does it take to get into digital currency trading?

To start the process , the latest version of the Ethereum Wallet must be installed. This program is a multi-platform application that allows trading in Ether or Ethereum-based currencies. Furthermore, the creation and execution of contracts can be realized. The next step is to create an Ethereum account. Most contracts cost less than a tenth of a US cent. If the program is only to be tested, it is recommended to select a test network and start the mining. Within minutes, enough ethers have accumulated to test the process.

A problem in the test network is that the contract is not confirmed. The task is in progress after an unsuccessful attempt to create the contract. The account finally has 0 ethers but should actually have more than 3,000. The solution to the problem is that in a private test network, no mining can be realized and thus no transactions are fed to the peer-to-peer network.

The Ethereum Wallet program allows only basic mining, for own implementations it is necessary to access a real network. For this the user needs further programs.

The frequently used AlethOne Miner is a simple program with two functions. One method will start mining and the second will reward the miner. At this link you will find a collection of available Ethereum programs written mainly in C ++. When creating smart contracts in a real network, the subscriber needs some ethers. You can get the ethers from a participant or swap them for Bitcoins. If the exchange is to be implemented using bitcoins, then the fraud-proof ” btcrelay project ” can be recommended.

To create a contract, a token must be generated. Tokens can be any justifiable tradable good in Ethereum: coins, loyalty points, gold certificates, promissory notes, play items and so on. For all tokens, basic functions are usually implemented, which means that the token is immediately compatible in the Ethereum Wallet. Because with the other Clients or Contracts the same standard is kept.

In order to realize an effective mining, an estimate of the computational cost of the contract must be made and one can decide how much ether one is willing to pay. Ether that was not needed will be sent back to the user. When creating the user must provide a secure password and after a few seconds, the transaction can be abandoned.

In the main account is deposited that the user has 100 percent of the shares just created. To send money to participants, you choose which currency you want to send (either Ether or the newly created one). Finally, insert the address of the participant and execute the transaction.

Immediately after the data has been transmitted to the subscriber, the user will not yet be able to see the entire amount in his wallet. This is because the wallet only considers tokens it knows. Thus, the subscriber must add this token manually. As a result, a contract must be created with the help of the client. Since the contract is not very complex, just copy the address and create the rules. Now insert the corresponding token and execute the watch function (watch token). Now the token name, the symbol and the decimal number are inserted. Now you can see how the balance between the token moves and you can now send the tokens to all other people.

Now the user has his own crypto-token. Tokens themselves can be used for value sharing on local communities. In addition, there are ways to exchange them for working hours or points in loyalty programs.

The level of difficulty for creating your own cryptocurrency is limited and can also be carried out by non-affine people. In just a few steps, the software is set up and you can start trading and mines. An advantage of the cryptocurrencies is that they are independent of banks, government currencies and payment service providers. However, there are also negative events, the most recent example being the Trojan Locky, This encrypts the hard disk and it is only decrypted against payment of 0.5 Bitcoin. Would this event have been possible without cryptocurrencies? If you have the goal of earning money through mining, you can only do so in the real network. However, mining is becoming increasingly unattractive, as the increasing difficulty (= the difficulty level of the cryptographic puzzle) requires ever-better and faster hardware. Thus, the profit is always lower.

Summary

This article has outlined the technical framework of Blockchain technology. First, a distinction was made between public, private and consortium blockchains. In the following, various mining techniques were presented. “State of the Art” is the proof of work, with potential miners having to solve a difficult mathematical puzzle. The main disadvantage of this principle is the immense power consumption, which motivated the development of other mining principles. Finally, a look into the crypto currencies was thrown and demonstrated the possibility of creating a local currency. (HAF)