Blockchain and Smartcontracts:

Rafael Escrich
5 min readMar 23, 2020

digital building blocks of 21st century

By the year of 2008, a white paper called “Bitcoin: A Peer-to-Peer Eletronic Cash System” was published. In this paper, the author named Satoshi Nakamoto describes a decentralized information exchange system based on cryptographic hashes and digital signature in which it would be possible to solve the problem of the Byzantine Generals and therefore avoid the double spend on eletronic cash systems.

This paper first appeared in a cypherpunk mailing system were several known cryptographers used to chat about several subjects related to privacy and cryptography. It didn’t caught too much attention and Satoshi launched his new network in the beginning of 2009, most precisely in January 3rd.

His innovations goes beyond digital money, crossing several other fields like game theory applied to economic systems, stateless monetary policy, cryptography, p2p systems and open source software governance that is not owned by a for profit company.

It is considered by many the first truly decentralized digital money.

Smartcontracts

One of those innovations was a simple programmable language used to write simple digital contracts (smartcontracts), it was called Script. It is a stack-based, processed from left to right language and is intentionally not Turing-complete. There are several discussions in the community about this design choice. Some people believe that this choice was deliberate by Satoshi himself with the purpose of mitigate possible chances of errors that are inherent to more complex programming languages, in the other side the belief is that was a bad design decision that don’t permits Bitcoin to have more complex and useful smartcontracts. Exactly because of that limitation other cryptocurrencies were developed, that was the case of Ether.

Ether is the digital asset transacted in Ethereum network. This network is a blockchain based distributed computing platform, open-source with turing complete smartcontracts. It relies on a modified version of Satoshi Nakamoto consensus that implements transaction-based state transitions. Therefore the creators of this second generation blockchain implemented it’s transactions as state machine transitions. This platform provides a turing-complete virtual machine (EVM) in each node that allows to execute compiled binaries or smartcontracts as they are called by transactions. Gas is an internal mechanism to estimate the cost of use in the platform for each transaction. It is used to avoid spam attacks and as an incentive to the users who maintain this servers always online and therefore maintain the network. All this information and more are provided in their Yellow Paper.

Consensus

  • Proof-of-Work

In Bitcoin it is used an algorithm called proof-of-work (POW), which was firstly included in an anti-spam and anti-DOS tool named hashcash that was developed by Adam Back, a cryptographer that now is the CEO of Blockstream, a company that provides services on top of Bitcoin network.

The premise of proof-of-work (PoW) is that every participant of this consensus must resolve an computationally difficult problem, the first to find each time is rewarded with the creation of new coins, contributing this way to maintain the network and in consequence helping propagate the use of the network because they have to exchange some of this coins with fiat money.

While PoW is a very good and secure mechanism it has some drawbacks, the most notorious one is the power consumption. Because of the design of the algoritm, all users are seeking to resolve the same problem at the same time to find the next block and this way receive the new minted coins. This race is very power consuming and some measurement shows that in the time that this article is written, the Bitcoin network consumes something in the order of 61 TWh, more energy than is consumed by Switzerland in comparison. To address this power hungry problem there were created other types of consensus.

  • Proof-of-Stake

In third generation networks it is commonly used proof-of-stake (PoS). This algorithm is based in a new branch of research that is called cryptoeconomics, which is game theory and cryptography combined to create incentives in decentralized networks favouring all participant behave to achieve the best outcome possible, this way reducing the risk of frauds. In PoS, a participant who wants to create the next block and therefore received new coins, must lock some of the coins that he already have (stake), in this way, if he behaves in a way that the rest of the network thinks its harmful, he loses his stake, providing this way a counter-incentive to an undesirable action.

Some of PoS blockchains are:

*There is a proposal for changing the currently consensus of Ethereum (PoW) to PoS in the near future.

  • Delegated Proof-of-Stake

The current scenario and the most modern of all consensus are DPoS or Delegated Proof of Stake. This is actually an improvement of PoS with the addition of this delegates. These delegates will be voted by the token owners to represent their interests and act in the expected behavior. Because of this difference, this new paradigm have enormous advantages over the others, ie: it’ faster and more power efficient then its predecessors. The elected delegates are in fact powerful servers that obey the rules of the software they run and agree among the other elected delegates who will produce the next block. This deterministic selection permits all the produced blocks and the transactions inside each block to be validated by all delegates in a short period of time. This enhance in the performance is crucial to support new uses of blockchain to other areas beyond digital money.

There are some blockchains already developed using DPoS consensus:

*Disclaimer: I work as software developer and R&D at Rhizom Platform

https://rhizom.me

At Rhizom platform our main focus is enable business to integrate blockchain to their platforms in an easy way. We have libraries of smartcontracts developed making it effortless for our clients deploy them. Besides that we also developed market network, traceability, certification and tokenization platforms that are integrated with our blockchain. We have various APIs to facilitate the integration between clients and our Blockchain, personalized tools and platforms to companies so they can benefit from the use of blockchain in their business and gain some leverage over the competitors.

That’s it for today, don’t forget to comment and applause if you liked.

Talk to you soon in the next post.

Bye and stay safe!

--

--

Rafael Escrich

Cypherpunk, blockchain developer and crypto entrepreneur. Likes to cook, read and spend quality time with wife and daughter.