Skip to content
Reading depth

Each view includes the earlier layers; the complete engineer or auditor page is shown by default.

Upgrade risk is the possibility that changing contract logic, storage, configuration, or dependencies corrupts state or changes users' financial rules.

Warning cross category cue

Upgrade risk is the possibility that changing code or configuration breaks existing state or changes the financial rules attached to users’ assets and claims.

Immutable contracts are difficult to repair or extend. Proxy, module, registry, class-replacement, and migration patterns add controlled mutability. The same path that fixes a defect can replace logic controlling existing balances, approvals, debts, shares, roles, and integrations.

Production change management and system migration are useful analogies. A proxy can preserve the public address and state while replacing executable logic, so users and integrators may see the same asset identity even though its rules have changed. Storage and delegate-call behavior add contract-specific hazards.

The exposed assets are balances and allowances controlled through the upgraded address. Existing shares, debts, permissions, and pending operations are claims whose semantics must survive or be migrated explicitly.

  1. A new implementation or module is built for an existing state model.
  2. The authorized process reviews and schedules an exact code and migration payload.
  3. The proxy, registry, or contract changes its implementation reference or class.
  4. New code executes against preserved or migrated storage.
  5. Users and integrations continue, pause, migrate, or exit under the new rules.

Control flow authorizes the change. Information flow communicates bytecode, storage layout, tests, simulation, and notice. Capital flow continues through balances and transfer paths preserved or changed by the new implementation. Claim flow continues through shares, debts, permissions, and pending operations whose meaning must survive migration. Return flow is not created by an upgrade; any protected or altered income retains its underlying payer. Risk flow reaches every holder and integration if the upgrade corrupts state or broadens authority.

Upgrades create no return. They may protect value by repairing or improving a system, but a failed change can strand or misallocate assets. Users, reserves, governance, insurers, or integrators bear loss according to recovery and compensation rules; the upgrade authority is not automatically liable.

OpenZeppelin’s upgradeable-contract guidance documents initializer and storage constraints for its proxy tooling, while its proxy API distinguishes transparent, UUPS, and beacon patterns. These documents describe patterns and hazards, not assurance for a particular deployment. Both references were reviewed 2026-08-10.

An engineer or auditor should verify exact admin and implementation slots, storage compatibility, initialization state, authorization, delay, bytecode, delegate-call and selector behavior, migration invariants, events, rollback or pause paths, and compatibility across adapters, chains, keepers, and frontends.

  • “The contract address did not change, so the rules did not change.” A proxy preserves the address while replacing logic.
  • “Upgradeability always makes a protocol safer.” Repair capability and change authority are different benefits and risks.
  • “A timelock makes an upgrade safe.” Delay does not validate code, storage, payload, or downstream compatibility.

Trace the control path through governance risk and the implementation path through smart-contract risk.

Machine-readable model

Key equations

Canonical expressions come from the structured concept record. KaTeX renders the notation, while the plain-text expression and variable table keep its meaning and units inspectable without JavaScript. Read the narrative above for the model's domain, assumptions, and rounding rules.

This concept does not require one canonical equation. Its mechanism and state transitions remain the authoritative explanation; do not invent a formula merely to make the topic look quantitative.

Assurance contract

Security properties

These structured statements define desired behavior. Their stable IDs can bind tests, invariants, specifications, audit findings, or proof results without turning descriptive review advice into an assurance claim.

Desired · not evaluated: No test, audit, or proof result is implied until scoped evidence is linked to this property.

  1. Only the disclosed authority can schedule and execute an upgrade after the promised delay and exact payload review

  2. New code preserves storage layout, initialization state, balances, liabilities, claims, permissions, and pending operations or migrates them explicitly

  3. Implementation identity, bytecode, configuration, deployment chain, and upgrade event are independently observable before and after activation

  4. Rollback, pause, migration, and emergency paths are tested against the actual state and cannot grant broader authority than the upgrade process

Knowledge check

Quiz

Answer in your own words, then open the model answer.

What problem does Upgrade risk exist to address?

Model answer

Upgrade mechanisms can repair defects and evolve protocols, but they also let an authorized path replace code that controls existing assets and claims.