A smart-contract proxy can keep a stable entry address and stored state while delegating execution to a selected implementation. An upgrade changes that selection under defined authority. Preserving an address does not automatically preserve the meaning or safety of the stored data.
Part of How Blockchain Works — the beginner series. Read for understanding technology, not for cryptocurrency investment advice.
The classes, libraries, museums, equipment services and numerical examples in this guide are fictional teaching examples. Platform-specific behaviour is identified rather than assumed to apply to every blockchain.
Technical companion: continue into the technical article library.
Choose your reading route
This guide has 18 short chapters. Read straight through or begin with the question you need.
- 1. Separate the front door from the rules · Chapters 1–3
- 2. Follow delegated execution · Chapters 4–7
- 3. Preserve stored meaning · Chapters 8–11
- 4. Check authority and evidence · Chapters 12–15
- 5. Practise a paper upgrade · Chapters 16–18
Chapter index · Check your understanding · Blockchain learning hub
Chapter index
Separate the front door from the rules · Chapters 1–3
Follow delegated execution · Chapters 4–7
Preserve stored meaning · Chapters 8–11
Check authority and evidence · Chapters 12–15
Practise a paper upgrade · Chapters 16–18
CHAPTER 1 OF 18 · Separate the front door from the rules
1. A stable front door can lead to changing instructions
Imagine a fictional equipment service with one reception desk. Visitors keep using the same desk, but the service replaces the instruction manual used by its clerks.
The desk’s address has not changed. The rules applied behind it have.
A smart-contract proxy can provide a related separation between an entry point and implementation code. In common EVM proxy designs, calls reach the proxy and execution is delegated to a selected implementation.
The analogy is only an orientation. Real delegation has precise execution and storage semantics that a human reception desk does not reproduce. The important first question is whether a familiar contract address is the actual implementation or a stable entry point whose selected implementation can change.
CHAPTER 2 OF 18 · Separate the front door from the rules
2. Ordinary deployed code is not edited like a document
A website author can replace a paragraph in a file. That is not the right mental model for a typical smart-contract proxy upgrade.
The selected implementation is generally another deployed contract. The proxy arrangement changes which implementation supplies the executed logic. The old implementation’s existence and history are not thereby rewritten.
This distinction explains how people can speak about an upgradeable contract while the underlying chain still records defined deployed objects and transactions.
Not every contract uses a proxy, and not every proxy offers an upgrade path. Begin with the actual architecture. A marketing description such as “immutable” or “upgradeable” needs to be reconciled with the deployed code and authority, not accepted as a complete technical explanation.
CHAPTER 3 OF 18 · Separate the front door from the rules
3. The state belongs to a defined execution context
In the fictional service, the reception desk holds the active inventory ledger. Replacing the manual does not automatically replace that ledger.
In a common delegatecall-based proxy arrangement, implementation code runs using the proxy’s storage context. That is the basis for keeping state while changing logic.
The implementation contract also has its own address and storage, but those are not interchangeable with the proxy’s state during the delegated call.
This is why “we inspected the implementation’s balance or storage” can answer the wrong question. Identify the address whose state is being used. In a proxy system, code location and state location can be different parts of the same execution path.
CHAPTER 4 OF 18 · Follow delegated execution
4. Delegation is more than forwarding a message
An ordinary call to another contract and a delegated call do not use the same storage context. Treating them as equivalent hides the mechanism that makes a proxy useful and sensitive.
Solidity describes delegatecall as executing another contract’s code in the caller’s context. Relevant caller and value context is preserved according to the EVM’s rules.
For a beginner, the useful picture is borrowing a manual while continuing to write in your own ledger, rather than sending the entire job to a different desk with its own ledger.
This guide does not provide deployment code. It teaches what must be traced: which code runs, which storage it reads and writes, and which permissions that execution can exercise.
CHAPTER 5 OF 18 · Follow delegated execution
5. An implementation selection is part of the evidence
A reader sees the familiar service address and assumes version one still applies. But the selected implementation may have changed.
A meaningful inspection therefore identifies the network, proxy address, selected implementation and relevant block context. A later state of the selection does not necessarily describe an earlier transaction.
The fictional desk keeps a dated record of which manual was active. Without that history, a reviewer might judge Monday’s action using Tuesday’s rules.
Likewise, the right code for explaining an old proxied execution is the code selected in the relevant execution context. A verified source listing for some implementation is not enough unless its relationship to the actual call has been established.
A program needs a defined way to map variables and structures into storage. The layout is more than a set of friendly field names shown by an interface.
For a paper analogy, imagine a ledger with fixed numbered compartments. Compartment one holds the manager identifier; compartment two holds the available quantity.
If a new manual interprets compartment one as a quantity, the old bytes do not automatically acquire the intended new meaning. They may be read incorrectly even though nobody deliberately erased them.
Actual storage layouts are more complex than this paper model. The lesson is that preserving bytes is not sufficient. The new implementation must interpret existing state in a compatible or deliberately migrated way.
CHAPTER 7 OF 18 · Follow delegated execution
7. Changing labels does not move existing values
The fictional service renames a field in its new documentation. That change in wording does not itself move or convert the value stored in the ledger.
A code change can similarly alter the interpretation or position of data without automatically migrating the old state correctly.
Do not judge compatibility solely by comparing human-readable names. Types, ordering, inheritance, packing and the storage scheme can matter.
Our paper exercise deliberately uses simple compartments to expose the failure. Put the value 12 in the “quantity” compartment, then switch to a manual that reads the same compartment as a manager code. The value is preserved physically, but the service’s meaning has been damaged. State preservation must include semantic preservation.
CHAPTER 8 OF 18 · Preserve stored meaning
8. An upgrade can introduce a storage collision
A collision occurs when storage uses that should remain separate overlap in an incompatible way. Proxy machinery and application state both need defined locations.
There is also a separate compatibility problem between successive implementations: a new version can interpret or overwrite storage differently from the earlier version.
A recognised proxy pattern can address some layout concerns without automatically solving every future application change.
OpenZeppelin documents these distinctions and provides upgrade checks for supported workflows. A passed tool check should be read for its actual scope, not promoted into a claim that every new business rule is correct.
The beginner habit is to ask which classes of collision are prevented, which are checked and which remain the developer’s responsibility.
CHAPTER 9 OF 18 · Preserve stored meaning
9. Initialisation is a separate operation
A newly deployed implementation can have constructor behaviour, but that does not automatically initialise the proxy’s application state.
Upgradeable designs commonly use an initialisation mechanism appropriate to their architecture. That mechanism needs correct authority, correct inputs and protection against unintended repeated or unauthorised initialisation.
In the service analogy, printing a new manual does not fill out the active ledger’s opening entries. The desk needs its own controlled setup step.
This is not a recommendation to call an initializer on a live contract. An unfamiliar setup method can have powerful effects. The conceptual point is simply that code deployment, proxy configuration and application-state initialisation are distinct events and must not be collapsed into one reassuring label.
CHAPTER 10 OF 18 · Preserve stored meaning
10. New state can require a controlled transition
Version two of the fictional service adds a category for equipment under maintenance. Existing items need an explicit interpretation: which begin available, on loan or under maintenance?
An upgrade can therefore require more than selecting new code. A migration or additional initialisation may be necessary to establish the new version’s assumptions.
The transition should preserve the properties the service depends on. For example, one physical item should not silently become counted in two categories.
Do not assume that a deployment tool understands the institution’s intended meaning. It may check technical compatibility while remaining unable to decide whether the migration policy is sensible. Technical checks and application invariants need to be reviewed together.
CHAPTER 11 OF 18 · Preserve stored meaning
11. Who can upgrade is a powerful question
A user trusts the current equipment rules. If someone can replace those rules, that upgrade authority is part of the trust model.
The authority might be controlled by a single account, shared approvals, a governance process or another arrangement. The details belong to the deployed system.
A delay or multiple approvals can add controls, but neither means that future code must be harmless. It matters who can approve, what can be changed and whether the controls themselves can change.
Keep the distinction clear: consensus can faithfully execute an authorised upgrade without deciding whether the upgrade is good for users. Protocol acceptance and responsible application governance are different judgments.
CHAPTER 12 OF 18 · Check authority and evidence
12. A stable address is not a stable promise
The equipment service keeps the same front door while changing its borrowing rules. Visitors who recognise the address may not notice the new policy.
The same risk exists when applications display only a proxy address. Continuity of address can coexist with changes to permissions, behaviour or data interpretation.
This does not make all upgrades bad. Upgrades can repair defects and add useful capabilities. It means that the continuity claim should be precise.
Ask what remains stable: the address, the stored state, an interface, a verified property or a governance commitment. Those are different promises. A system can preserve one while changing another, so a familiar address should not be treated as a permanent guarantee of every earlier behaviour.
CHAPTER 13 OF 18 · Check authority and evidence
13. An old review does not automatically cover new code
A reviewer checks version one and records its assumptions. Version two changes a function and its storage interpretation.
The old report remains evidence about the reviewed version and scope. It does not automatically certify the new implementation or migration.
Useful review evidence identifies code versions, deployment relationships, configuration and any assumptions about who can upgrade. A report about a source repository alone may not establish the state of a particular live proxy.
In the paper analogy, an inspection stamp on last year’s manual does not certify a replacement manual placed behind the same desk. The stamp’s value depends on keeping its identity and scope attached to the thing that was actually inspected.
CHAPTER 14 OF 18 · Check authority and evidence
14. Rollback is not a universal undo button
After an upgrade, the service writes new entries using its new interpretation. Repointing to an earlier manual may leave that earlier manual unable to interpret the changed ledger safely.
Similarly, selecting an old implementation is not guaranteed to undo all state changes made by the new implementation. Compatibility can be directional.
External actions are another boundary. A physical equipment handover cannot be reversed merely by switching software.
For beginners, distinguish code selection, data migration and completed external effects. A recovery plan must account for all relevant layers. The phrase “we can roll back” is incomplete until it states what is restored, what remains changed and which evidence supports that restoration path.
There are several proxy architectures, each with its own way to select logic and control upgrades. Some systems also share implementation selection across multiple proxies.
A beginner should not memorise one diagram and assume every proxy follows it. An implementation slot, administrative role or upgrade function can live in different places depending on the pattern.
The right inspection follows the actual architecture and version. It also checks whether the displayed interface exposes the full authority path.
This guide deliberately avoids selecting a production pattern or prescribing configuration. Its transferable method is to map the entry address, state context, implementation selection and upgrade authority before making claims about what can change.
Draw a ledger with three labelled compartments: manager, available items and loaned items. Write a few fictional values in them.
Manual A reads those compartments in that order. Manual B adds a maintenance field at the end while preserving the original meanings. Manual C inserts maintenance at the front and shifts every later interpretation.
Read the unchanged paper ledger with each manual. Which changes preserve meaning under this simplified model? Which produce nonsense?
The activity is not a real storage-layout checker. Real layouts need their actual rules. The exercise shows why unchanged bytes and an unchanged address can coexist with broken interpretation, and why an upgrade should be evaluated as a transition rather than a replacement label.
CHAPTER 17 OF 18 · Practise a paper upgrade
17. Ask for the transition evidence
A useful upgrade explanation can answer four questions without slogans. What code was active before and after? What state layout is expected? Who authorised the change? Which checks establish that the transition preserves required properties?
Add the network and block context so the answer concerns a particular deployment rather than a generic software project.
For the equipment example, preserve the old manual, the new manual, the migration rule and the before-and-after ledger checks.
None of this guarantees an absence of all defects. It makes the claim inspectable. Readers can then distinguish a controlled state-preserving upgrade from a proposal that merely keeps the same front door while hoping the old ledger still makes sense.
CHAPTER 18 OF 18 · Practise a paper upgrade
18. The simplest complete explanation
A proxy can separate a stable entry address and state from the implementation code used for execution. An authorised change to the implementation selection can change behaviour without changing that entry address.
The hard part is preserving the right things: storage meaning, initialisation assumptions, permissions and application invariants. Keeping bytes is not enough if the new code reads them differently.
An upgrade also changes the scope of earlier evidence. Old reviews, proofs and recovery assumptions need to be reconciled with the new deployment.
When someone says “the contract was upgraded”, ask: which code now runs, whose state does it use, who could make the change, and what demonstrates a safe transition? Those are the questions that make the mechanism understandable.
Worked situations
| Situation | What it means | What to check next |
|---|---|---|
| The address is unchanged but behaviour differs | A proxy can select different implementation code | Identify the implementation at the relevant block |
| Stored bytes are unchanged but values look wrong | The new code may interpret storage differently | Compare actual layouts and migration assumptions |
| An old implementation is selected again | That may not undo writes made by newer code | Check compatibility and remaining effects |
| A review covers version one | Its scope does not automatically include version two | Match code, deployment, configuration and transition evidence |
Check your understanding
- Why can the same address have changing behaviour?
- Where does a common delegatecall proxy keep its application state?
- Why is preserving bytes different from preserving meaning?
- Does an implementation constructor automatically initialise proxy state?
- Why is rollback not necessarily an undo?
Answer guide: The proxy can change its selected implementation. Delegated execution commonly uses proxy storage. A new layout can read old bytes differently. Initialisation of proxy state is a separate architectural concern. New writes, migrations and external effects may remain after code selection changes back.
Continue learning
- Simplest Explanation
- A Record’s Journey
- Digital Fingerprints
- Keys and Digital Signatures
- Nodes and Shared Copies
- Consensus and Agreement
- Smart Contracts and Rules
- Oracles and the Outside World
- Public, Private and Consortium Networks
- Confirmations and Finality
- Wallets and Custody
- Tokens and What They Represent
- Supply Chains and Handovers
- Certificates and Credentials
- Databases and When Blockchain Helps
- Scaling and Layers
- Bridges Between Networks
- Fees and Computing Resources
- Governance and Upgrades
- Privacy and What Records Reveal
- Zero-Knowledge Proofs
- Block Explorers and Reading a Record
- Testing Rules and Finding Mistakes
- Merkle Trees and Small Proofs
- Data Availability and Missing Pieces
- Forks and Changing Histories
- Digital Identity and Proving Who You Are
- Light Clients and Checkpoints
- Multisignature and Shared Control
- Network Delays and Partitions
- Incident Response and Recovery
- Transaction Order and Fairness
- Token Approvals and Remaining Permission
- NFTs, Metadata and Linked Files
- Logs, Events and Application Memory
- UTXOs and Change Outputs
- Proof of Work and Targets
- Proof of Stake and Validator Duties
- Post-Quantum Cryptography and Migration
- Virtual Machines and Replaying Rules
- All-or-Nothing Execution and Its Boundaries
- Client Diversity and Software Independence
- Benchmarks, Throughput and Finality
- Encoding and Serialisation
- RPC Requests and Access Points
- State Snapshots, Pruning and Archives
- Timestamps and Clock Limits
Technical companion · Structured learning guide · English–Chinese Blockchain hub
References and scope
- OpenZeppelin: Proxy upgrade pattern
- OpenZeppelin: Writing upgradeable contracts
- Solidity: Contract execution and delegatecall context
Sources checked 16 October 2026. Specifications and implementations differ and can change. This is a conceptual beginner guide, not operational, security, legal or investment advice.
Return to chapter index · Begin with the simplest explanation
