Security – Who Can Edit an Existing Smart Contract?

Security

Is there any mechanism that limits the possibility of deploying a new version of existing smart contract so that only its author can do it? Or a mechanism which indicates that smart contract A is a new version of a smart contract B?
If so, I would be grateful for indicating the name of such a mechanism in Ethereum 🙂

Best Answer

Contracts are always immutable - nobody can change an existing contract. You can just deploy a new version to a new address.

There are patterns to go around this "problem". You can use a proxy contract which relays calls to an actual logic contract, so the proxy contract knows the address of the logic contract. When you want to change the logic contract, you deploy a new version to a new address and change the pointer in the proxy contract to point to the new contract.

Related Topic