Decentralization and Composability
January 5, 2022•1,525 words
What we will explore
- The fundamental principle upon which the foundations of Web3 were laid, decentralization.
- One of the key factors for the overwhelming success of DeFi in Ethereum, composability.
Why decentralization and composability?
Decentralization, by itself, is the single most important aspect of Web3 and the basis of it all. Understanding what it is, what the motivations behind it are, and how it is achieved sets us up for success in our path to mastering Web3.
Composability, on the other hand, is a consequence of a design choice of Ethereum and a major catalyst in the success of DeFi on the platform. Understanding a fundamental design choice, such as this one, allows us to get closer to the internal workings of building on Ethereuem.
Part 1/2: Decentralization
What?
Decentralization is the simple, yet radical, act of breaking down a central locus of power and distributing it so as to ensure that all stakeholders of a given process do not need to trust any other stakeholders to participate in the process.
Chaitanya Mittal, 2022
Pretty heavy, to say the least. But in simpler words, all decentralization is really about, is redistribution of power, much like most of human history.
What's new although, is the fact that decentralization does not take power from one privileged group of people and give it to another privileged group, but distributes it on the basis of merit, participation and various other factors.
Why?
Certainly, if an act is both simple and radical, it will not be easy. Neither was laying the foundations of Web3. But as history clearly shows, it was a collective effort of those who believed and those who envisioned a fairer future for all of humankind.
Why is this important? Why are we so skeptical of central foci of power? Why are all of us, collectively, investing millions of man hours into this idea?
Let's try and answer these questions.
Why is decentralization so important?
If you are not paying for the product, you are the product.
The world today, has agreed to live by terms and conditions that they haven't even read. Despite all of the problems that Web 2.0 solved, a lot of the problems that exist today, can thank it for their origin. And while this is true for every breakthrough, the human race has time and again, come up with breakthroughs that neutralize the adversities of the past, renewing our lease on life, and starting the cycle all over again. (Interesting fictional read on this, if this line of thinking resonates with you: The Shiva Trilogy: Amish Tripathi
The fact of the matter remains, decentralization helps build a world where technology is not equivalent to profit mongering.
But that is just one aspect of it all. Another way to look at it would be to see how central institutions have become the gate keepers for everything. DeFi changes that. Decentralization, changes that.
Decentralization is important, not because it allows us to be fairer, but because it tries to right the wrongs of a system that is too used to it's pitfalls.
Chaitanya Mittal, 2022
Why are we so skeptical of central foci of power?
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
Abraham Lincoln
Power is the greatest drug of all. If there exists a method for us to collectively regulate the amount of this drug we give to people, why would we not?
Why are all of us, collectively, investing millions of man hours into this idea of decentralization?
For a fairer future for all of humankind. Isn't that what we fight for anyway? Every generation, trying to improve on what's already done. Changing privileges to fundamental rights. That's what this is about.
How?
This section contains a very high level overview of how decentralization is achieved, followed by a more detailed analysis of the internal workings of the same. It is based on my understanding of the Bitcoin and Ethereum whitepapers.
Well, that sounds great in theory, but how exactly does one go about achieving decentralization?
- Realize you can't do it alone. You need multiple stakeholders, willing to participate. How do you ensure that? By incentivizing them.
- That begs the question, how do these multiple stakeholders gain consensus? Mathematics and cryptography of course.
- Okay, but what about network viability, finite disk space or mathematical verifiabiliy? Let's get to that in a bit, shall we?
Incentivizing multiple stakeholders
To understand how we would incentivize various stakeholder to support our decentralized network, let's first list down the different stakeholders we might expect.
While there might be more stakeholders in a detailed analysis, these two will suffice for now.
How do you incentivize people to plug in their computers to your network and expend CPU time and electricity? Offering them monetary compensation seems like an elegant enough solution. That's exactly what Bitcoin, Ethereum and most blockchains do. By supporting the network, nodes, more specifically miners, get monetary rewards.
There is however, a lot of math involved in ensuring this reward system is not cheated on or "hacked" to ensure the network is sustainable and inflation (of the blockchain's native token) is in check.
If you are interested in understanding these calculations, I would recommend starting with the Bitcoin Whitepaper and then moving on to the Ethereum Whitepaper. I will not be covering them in this piece, for the sake of brewity.
End users are incentivized to use the network for their transactions because of the decentralization.
Fairly straightforward then, incentivizing our two classes of stakeholders.
Consensus between multiple stakeholders
This is where the true genius of Hal Finney and Satoshi Nakamoto shines. How do you take a group of nodes/miners, all competing for the same reward, to cooperate and gain consensus to support the network?
Proof-of-Work (PoW)
A quick refresher on blockchain building blocks, before we dive into PoW.
Blocks refer to groups of transactions and metadata relating to those transactions, most importantly a cryptographic hash that takes as input the data in the block and the hash of the previous block. Now, if any of these inputs were to change even by a single bit, the whole hash would change, by an unknown amount. This is the mathematical guarantee that a hash function provides.
PoW is simply put, an additional guarantee on top of the cryptographic hash guarantee. It ensures that the probability of a node mining the next block is always directly proportional to the fraction of the network's total CPU power it possesses. Throw some statistical probability into the mix and you find that the probability of a node mining two consecutive blocks becomes astronomically low as the number of total nodes increases.
Now, let's say a malicious party wanted to tamper with block n - 4
, where n
is the latest block. To be able to do so, the malicious party would not only have to modify the n - 4
th block, but also all subsequent blocks, due to the fact that all subsequent blocks would have to be changed for their hash to be consistent with the new data in block n - 4
. But that's not it. It would also have to do so, competing with all the other "honest" nodes, else it would play catch up forever.
This basically allows us to guarantee that, until a malicious party has at least majority CPU power in the network, it would not be able to tamper with the blockchain successfully.
In other words, PoW ensures that as long as majority of the nodes in the network are "honest", the blockchain will not favor anybody and will continue to operate as designed.
Technical considerations
In the interest of brewity and staying on topic, I will be covering the implementational details of blockchains in another piece. Will link to it here, when it is out.
Part 2/2: Composability
Will be covered in the next blog post, tomorrow morning!
Credits
- I would like to thank Abhilash Inumella and Sahil Vasava for sharing their philosphy on mastering the complicated and ever changing landscape that is Web3.
- The Ethereum Foundation website from where I have borrowed a lot of these ideas from.
- Satoshi Nakamoto's whitepaper, the foundation for this whole movement.
Disclaimer
This blog is written in a personal capacity and do not represent the views of anyone but the author. This blog does not constitute advice of any kind, financial or otherwise. Any actions taken upon the basis of this blog are the sole responsibility of the actor. Copyright violations, if any, can be reported to the author directly via email and will be taken care of immediately.
Corrections
Despite my best coffee fueled efforts, if any mistakes in this blog piece are to show themselves to you, kindly DM me on twitter or email me with the correction(s). Thanks a ton!