How are dapps updated?

Since the code on a smart contract cannot be altered after it has been deployed on the blockchain, how do dapp developers make upgrades to the product? From my research I have gathered that one way is to use a versioning system that utilises an “entry way” smart contract that redirects to the most recent version (elaboated here).

My question is, what is stopping the people who can call on the “version update” function to redirect to a fraudulent smart contract?

I hope that made sense, I’m writing a blog on Ethereum and wanted to get a good understanding of how dapp upgrades are rolled out

Thanks for any help,

4 Likes

It depends on what your definition of a dapp is actually. If you need to update a single smart contract, you can basically selfdesctruct a contract and deploy a new one. You then update your dapp to look toward the new smart contract which carries your new code.

can smart contracts be thought of concurrent objects that make up a larger program? if so, my definition of a dapp would be the application that consists of multiple smart contracts.

do developers have a different approach to updating one smart contract vs. updating many smart contracts? (e.g. minor fixes vs. new large feature on the dapp)

Fundamentally I don’t think it will be different when updating one or more smart contracts. I guess if you are using multiple smart contracts, you will need to update the address of your delegated calls and thats about it.

I guess when I say it depends on your definition, it really depends on whether your dapp is just a smart or a whole chain on itself. If your dapp is a whole side chain, you probably need to have some kind of consensus vote / signalling before triggering a fork in your chain.

My caveat here is that I am not an experienced developer this is just my own experience and reading.

2 Likes