Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

Immutable (Smart Contract Property)

1 min read
Pronunciation
[ih-myoo-tuh-buhl]
Analogy
Imagine carving rules onto a stone tablet and placing it in a public square. Once carved, the rules on the tablet (the deployed smart contract code) cannot be changed, erased, or secretly modified. Everyone can see the rules exactly as they were originally written and trust that they won't change arbitrarily.
Definition
The property of smart contracts, once deployed on a blockchain, that their code cannot be altered or deleted. This ensures that the rules of the contract remain fixed and predictable as initially deployed, forming a core principle of trust in decentralized systems.
Key Points Intro
Immutability means that deployed smart contract code is generally unchangeable, providing transparency and predictability.
Key Points

Once deployed, the code of a standard smart contract cannot be changed on the blockchain.

Provides strong guarantees that the contract will always execute according to its original logic.

Enhances trust, as participants know the rules cannot be changed arbitrarily by the deployer or anyone else.

Presents challenges for bug fixing and adding features, leading to the development of upgradeability patterns.

Example
A simple ERC-20 token contract, once deployed without any upgrade mechanisms, is immutable. Its functions for transferring tokens, checking balances, etc., will operate exactly as defined in the original code forever.
Technical Deep Dive
Immutability stems from how blockchains store data. Contract code is stored as part of the blockchain's state associated with the contract's address. Modifying this code would require creating a new block that alters this state, which would need to be validated by the network's consensus mechanism. Standard consensus rules prevent arbitrary modification of existing contract code. While the code is immutable, the *state* (data stored by the contract) can be changed by executing the contract's functions. Upgradeability patterns work around code immutability by using proxies that point to different (immutable) logic contracts over time.
Caveat
While code is typically immutable, mechanisms like `SelfDestruct` (now being phased out) could remove code. More importantly, upgradeability patterns (like proxies) allow the *effective* logic used by a contract address to be changed, even though the underlying code chunks remain immutable. Therefore, interacting with a contract requires understanding if it's designed to be upgradeable and who controls the upgrade process.

Immutable (Smart Contract Property) - Related Articles

No related articles for this term.