Peer to peer digital money: Reaching the consensus

Peer to peer digital money: Reaching the consensus

In this blogpost we‘ll continue with technical introduction into trustless distributed consensus algorithms that aim to solve the challenge of universally accepted order of transactions and will provide an answer to epilogue questions from the previous post.

Key properties

The theoretical problem with one true time in a distributed system and the challenge of one true order of transactions mentioned earlier may sound surprising and frustrating at the same time, but it’s not necessarily a deal breaker. It turns out that for a cryptocurrency system to work, we don’t need perfect transaction ordering as long as it’s good enough and universally accepted — these two properties count much more.

Blockchain’s job is to do exactly this. A whole bunch of recently made transactions is packaged together in a single block, in any order that does not break the hard rules (no double spends inside a block are allowed and all individual transactions must be valid — that’s easy to check). So who gets the authority to assemble a block and sort all transactions inside it according to their subjectively perceived order?

In Bitcoin this can be anybody who provides a proof of work expended during that particular period of time — this servers as an anti-spam mechanism; at least that’s the generally communicated answer. But is it really work Bitcoin miners are doing? If we take a closer look we will see that “the hard work” each miner is supposedly performing is essentially just rolling the dice all over again, hoping to get the winning combination. Bitcoin mining is a gamble, and unfortunately also an enormous burden on nature.

Perfect ordering vs. efficiency

Could we have a perfect order of transactions (even though not necessarily consistent with every observer’s perceived order) and still make it universally accepted? The answer is yes — it would just take a simple modification of Bitcoin’s protocol that would limit the number of transactions in a single block to one. As you can guess, this would lower the network’s throughput in terms of TPS (transactions per second). We could try to shrink the block time to offset for this, but that solution has its technical efficiency limits as well. So grouping the transactions broadcast in about-the-same-time into blocks is a useful trade-off that improves scalability. It’s like assigning pupils born in the same year into one school class, each year. We could have schools open a new class every month or every day, but that wouldn’t be very efficient use of resources.

The concrete optimal numbers and parameters largely depend on the underlying blockchain technology and the technical limits are not necessarily equal for all blockchains. That’s why we may see cryptocurrencies with much faster blocks than Bitcoin and often much higher practical limits in terms of TPS. One of the defining properties is average transaction size which has a direct influence on bandwidth and storage requirements. OneGram coin transactions will be almost three times smaller in size compared to Bitcoin.

Consensus for transaction ordering

Tuning the core blockchain attributes like block time, block size or transaction size is certainly an important process in the cryptocurrency design phase, but this post is focused on a much more fundamental feature: the algorithm for reaching consensus that is eco-friendlydoes not involve gambling and does not pay out interest or any other unjustified income to holders or creators.

Let’s meet Delegated Proof of Stake (DPoS) — an advanced proof of stake algorithm that improves upon the first generation PoS cryptocurrencies like Peercoin or NXT. DPoS is different because it does not automatically make every coin holder a validator, but only gives them the right to vote and elect the most trusted and reliable candidates as validators. As such, the role of a validator becomes an honor and a duty at the same time and is connected with a degree of responsibility and risk (a validator that fails to secure and maintain his node may loose his investment). Elected validators thus assume a paid position and remain in service for as long as they stay reliable and trustworthy.

One could draw a parallel with western representative democracy systems which also use a hierarchical governance structure for practical reasons — so that the majority of population does not have to deal with day-to-day decision making and can just appoint a few delegates that are (or seem) trusted. The problem, and it is in fact a highly criticized one, is that the delegates are elected for a long period (usually about 4 years) and their incentives to stay honest and true to the people throughout the whole period are not as apparent as in the pre-election period.

Having the possibility to call off any delegate at any time brings us much closer to pure (direct) ancient democracy. Although we do not make all people take part in the “daily business” (ordering transactions 24/7), they are still free to express their opinion however often they desire. That is a huge difference with a significant impact on the motivation of currently elected validators. Actually, it works more like a business entity — executives elected by the shareholders work hard to earn their favor and can be fired when failing to meet the expectations of the majority of owners. This mechanism has been successfully adopted by millions of companies all over the world, working well for decades.

Solid foundation, sound future

Delegated Proof of Stake, the consensus algorithm behind OneGram coin, is quite a new beast in the technical world of blockchains and cryptocurrencies and may be perceived as a revolution in blockchain efficiency and fairness. It can handle a huge load, does not consump excessive amount of electricity and distributes the rewards fairly. And the most beautiful part is that it is conceptually built on an underlying mechanism proven to work well in society and real world business governance. It did not take hard math to invent, it has been here all the time. As it goes with many genius IT technologies, the best ones are often imitating the nature or well-established social systems. With these properties OneGram coin is set out to become the new altcoin leader and we are proud to be part of it.


Jozef Knaperek, Head of Development

Continue the discussion on:

Suggested News: