What are Upgradeable Smart Contracts? (Watch Video)

Written by andrarchy | Published 2021/06/19
Tech Story Tags: decentralization | crypto | cryptocurrency | koinos | smart-contracts | blockchain | koin

TLDR Koinos Group co-founder and Koinos blockchain architect Michael Vandeberg talks about upgradeable smart contracts. He explains why they're so important to avoid hard forks in the development of blockchains. Hard forks create a technical and political bottleneck that is highly disruptive to the operation of the network which massively handicaps the process of upgrading the system. Koinos is the first to use smart contracts to define the system itself and is a platform for smart contracts that can be used to solve practically any problem.via the TL;DR App

In the following video I talk with Koinos Group co-founder and Koinos blockchain architect Michael Vandeberg about upgradeable smart contracts and why they're so important.
When most people think about upgradeable smart contracts they think about the complicated upgrade mechanisms that the overwhelming majority of dApp developers have built into their Ethereum smart contracts which use proxy contracts to get around the fact that Ethereum smart contracts can't be upgraded.

Immutable Contracts: Feature or Bug?

With Koinos, we take the opposite approach. There is no reason smart contracts have to be immutable, and the fact that most dApps introduce risky mechanisms to overcome this limitation demonstrates that this is more of a bug than a feature.
Once we abandon the assumption that smart contracts must be immutable, we can program the blockchain to allow developers to upload a new smart contract to an address thereby replacing an old contract with a new one.

Blockchains Change, A Lot

One of the reasons people seem to have difficulty understanding this concept is because they believe that "immutability" means that the blockchain cannot be changed. But obviously, the blockchain changes all the time because people's token balances change all the time! Nothing is more important than people's money, so if we allow that to change, why not contracts too?
As Michael explains, immutability means that the record of transactions cannot be changed, but obviously the contents of the various databases are constantly being changed, and a smart contract is just another entry in a database.

Giving Developers Options

For developers, upgradeable smart contracts are a game-changer because they no longer need to cobble together complicated systems in order to make their contract upgradeable. They can focus on making the best smart contract possible. If they and their users want a smart contract to be non-upgradeable, they still have that option.
But developers are no longer forced to use a system that will most likely add needless complication and development work to their lives.

Eliminating Hard Forks

But upgradeable smart contracts play an even more important, and foundational, role in Koinos itself because Koinos leverages this capability to make hard forks a thing of the past. Hard forks are the single biggest factor limiting the progress of blockchains because they create a technical and political bottleneck that is highly disruptive to the operation of the network which massively handicaps the process of upgrading the system.
How does Koinos circumvent this terrible bottleneck? Koinos, more than anything else, is a platform for smart contracts. That's because smart contracts can be used to solve practically any problem. Seriously any! Koinos demonstrates this incredible potential arguably more than any other blockchain because it is the first to use smart contracts to define the system itself!
Koinos contains innovative technology that allows all of the features people typically associate with a blockchain (consensus algorithm, governance system, resource management, etc.) to be implemented as smart contract modules and through a special "system call" layer those smart contracts can reprogram the blockchain with new behaviors.

On-Chain Upgrade Path

Of course, not just any developer can upload a smart contract and begin reprogramming the blockchain. If someone has a smart contract they think can improve the system, they first have to upload it to the blockchain just like any other smart contract, at which point governance will decide whether that smart contract should be given the necessary privileges to revise the blockchain's existing programming.
This process will no doubt still be somewhat political, but it will be transparent, on-chain, and granular in the sense that governance is no longer approving a dangerous, omnibus-style hard fork, but a small, targeted patch, that will fix a specific problem without disrupting the operation of the network.

Securing Upgradeable Contracts

This brings us back to a very important point with respect to upgradeable smart contracts. The initial discomfort people usually have with the idea is extremely justified!
At Koinos Group our highest value is developer-obsession.
One consequence of this philosophy is that, whenever possible, we aim to give developers as many options as possible. But one important exception to this rule is if we are setting the developer up to fail, and in a way that threatens the overall security of the network.
The thing that makes this all work is also a great example of why moving the system logic into smart contracts pays incredible, and sometimes unexpected, dividends. Many developers may choose to simply make their Koinos smart contracts non-upgradeable and that's fine. This feature still provides an incredible benefit to the blockchain because the system can still improve at a more rapid rate than any other blockchain with the hard fork bottleneck removed.
But those developers who decide to take advantage of the upgradeability of Koinos smart contracts (which we expect to be the majority) will need an authority system to manage the upgrade process of their smart contract. Leaving that development up to the individual developer wouldn't just create an incredible burden for them, it would also introduce an unacceptable and systemic security risk.

Unparalleled Composability

Fortunately, the Koinos system itself will contain an authority sub-system which, like every other part of the system, will be specified within a smart contract module. This will give dApp developers a trustworthy reference for designing their own authority system and users will be able to easily evaluate the security of those solutions based on their similarity to the system contract.
This property of enabling people to use existing building blocks to safely and easily construct their own applications is called "composability" which is quickly becoming one of the most popular buzzwords in blockchain. For us "composability" just means "good engineering." While we didn't set out to build the "most composable" blockchain, no other blockchain has moved its entire system into smart contracts, which means that developers can't use most of the system logic to inform their own designs.
But this is an incredible waste because the system is written by the people who know the most about the system ... because they built it!
By moving all of the system logic into smart contract modules, we don't just eliminate the massive hard-fork-bottleneck, we give developers incredibly powerful models (like the authority system contract) which will enable them to maximally leverage the upgradeability of Koinos smart contracts, thereby empowering them to build incredible dApps, that will empower their users through blockchain technology.
I know, people always think that Koinos sounds too good to be true, but I have great news ... the Koinos testnet is coming soon!
That means that very soon you will be able to run a Koinos node, connect to other nodes, and test out upgradeable smart contracts for yourself! Not only that, but the process of setting up a node will be insanely easy. Anyone, no matter their level of technical expertise, will be able to run a node in minutes!
Hot tip: If you download Docker now, I guarantee you will be running a testnet node in under 5 minutes!
To learn more about Koinos, go to koinos.io.

Written by andrarchy | CEO of Koinos Group, creators of the Koinos blockchain
Published by HackerNoon on 2021/06/19