Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Comparisons

Versioned Contracts vs In-Place Upgrades

A technical analysis comparing two core smart contract upgrade strategies: deploying new contract instances versus modifying a single contract's logic. We evaluate gas costs, security, state management, and tooling for protocols like Uniswap, Compound, and Aave.
Chainscore © 2026
introduction
THE ANALYSIS

Introduction: The Core Dilemma of Protocol Evolution

A foundational choice between immutable, versioned contracts and mutable, in-place upgrades defines your protocol's security posture and development velocity.

Versioned Contracts (e.g., Uniswap V2, V3, V4) excel at risk isolation and user trust by deploying new, immutable contract addresses for each major iteration. This creates a clear audit trail, allows users to opt-in to upgrades, and prevents catastrophic bugs from affecting legacy deployments. For example, Uniswap's TVL migrated gradually from V2 to V3, demonstrating controlled user choice. The trade-off is significant deployment gas costs and fragmented liquidity, requiring complex migration tooling and potentially slowing adoption of new features.

In-Place Upgrades (via proxy patterns like EIP-1967, used by Aave and Compound) take a different approach by using a proxy contract with a mutable logic address. This strategy enables seamless, gas-efficient feature rollouts and unified liquidity pools, as seen in Aave's iterative V2 to V3 updates. The critical trade-off is centralization of upgrade authority (typically a multi-sig or DAO) and the systemic risk of a bug in the upgrade mechanism compromising the entire protocol's state and funds.

The key trade-off: If your priority is maximizing security, decentralization, and user sovereignty for a novel or high-value protocol, choose Versioned Contracts. If you prioritize rapid iteration, unified state management, and lower gas overhead for a mature protocol with robust governance, choose In-Place Upgrades. The decision hinges on whether you value immutability's safety or mutability's agility.

tldr-summary
VERSIONED CONTRACTS vs IN-PLACE UPGRADES

TL;DR: Key Differentiators at a Glance

A side-by-side comparison of the two dominant smart contract upgrade patterns, highlighting their core architectural trade-offs.

01

Versioned Contracts: Immutable & Explicit

Deploy new, immutable logic for each change. This pattern treats upgrades as new deployments, preserving the old contract's state and address. It's the standard for protocols like Uniswap V2/V3 and Compound's cTokens.

Key advantage: Absolute state and logic integrity. Users can audit and interact with a frozen, immutable version. This matters for high-value DeFi protocols where user trust is paramount and forkability is a feature.

02

Versioned Contracts: Clear Migration Path

Forces explicit user migration and liquidity incentives. Upgrading requires users to move assets (e.g., UNI V2 → V3 liquidity), often facilitated by migration contracts and liquidity mining programs.

Key advantage: Eliminates upgrade governance risk. No single proxy admin key can alter live logic. This matters for decentralized, community-owned protocols where minimizing admin power is a core security principle.

03

In-Place Upgrades: Seamless & Gas-Efficient

Modify a single, persistent contract address via a proxy. The proxy delegates calls to a mutable logic contract, which can be swapped. Used by OpenZeppelin's UUPS/Transparent Proxy and protocols like Aave and dYdX.

Key advantage: Single, persistent user experience. Users interact with one address forever, and upgrades are gas-efficient as only the logic contract is redeployed. This matters for consumer-facing dApps and rapidly iterating protocols where UX and development agility are critical.

04

In-Place Upgrades: Centralized Upgrade Risk

Concentrates power in a proxy admin or DAO multisig. The ability to change logic for all users at once is a powerful feature and a central point of failure.

Key advantage: Enables rapid bug fixes and feature rollouts. Critical vulnerabilities can be patched in hours, not days. This matters for complex, evolving protocols where the ability to respond to exploits or market changes quickly outweighs the theoretical risk of a malicious upgrade.

VERSIONED CONTRACTS VS. IN-PLACE UPGRADES

Head-to-Head Feature Comparison

Direct comparison of upgradeability patterns for smart contract systems.

Metric / FeatureVersioned ContractsIn-Place Upgrades

State Migration Required

Downtime for Users

0 seconds

Seconds to Minutes

Rollback Complexity

Redeploy previous version

Requires new upgrade transaction

Audit Surface for Upgrade

New contract only

Entire proxy system

Gas Cost for Upgrade

Deploy new contract

Single storage slot update

Implementation Transparency

Direct on-chain verification

Requires proxy pattern (e.g., EIP-1967)

Storage Layout Flexibility

Can redesign entirely

Must preserve existing slots

pros-cons-a
VERSIONED CONTRACTS VS IN-PLACE UPGRADES

Versioned Contracts: Pros and Cons

A critical architectural decision for protocol longevity. Versioned contracts deploy new instances, while in-place upgrades modify existing code. Key trade-offs in security, user experience, and operational complexity.

01

Versioned Contracts: Immutable & Transparent

Key Strength: Predictable State. Each version is a new, immutable contract address (e.g., Uniswap V2, V3, V4). Users and integrators can audit and rely on a specific version's behavior indefinitely. This matters for protocols requiring absolute trust and composability, as downstream integrations (like Aave, Yearn) won't break unexpectedly.

02

Versioned Contracts: Clear Migration Path

Key Strength: Controlled User Transition. Upgrades require explicit user action to migrate liquidity or positions (e.g., moving from SushiSwap's MasterChef V1 to V2). This creates a clear audit trail and allows for graceful deprecation of old versions, reducing the blast radius of potential new-version bugs. It's ideal for major, breaking changes in protocol logic.

03

In-Place Upgrades: Seamless User Experience

Key Strength: Zero-Friction Updates. Users and integrators always interact with a single, evolving contract address (e.g., Compound's Comptroller, many DAO treasuries). This eliminates migration headaches and is critical for protocols where liquidity fragmentation is fatal, such as lending markets or stablecoins (e.g., MakerDAO's DSS upgrades).

04

In-Place Upgrades: Centralized Risk & Gas

Key Weakness: Trust in Admin Keys. Relies on a multisig or DAO to execute upgrades via proxy patterns (e.g., OpenZeppelin Transparent/UUPS). This creates a centralized attack vector—if compromised, the entire protocol can be drained. It also adds ~2.5K-5K gas overhead per call due to delegatecall indirection, impacting high-frequency dApps.

05

Choose Versioned Contracts For...

  • DeFi Primitives with High TVL (DEXs, Yield Aggregators) where trust minimization is paramount.
  • Experiments & Major Pivots that require a clean-slate architecture.
  • Composability-First Protocols where other smart contracts depend on stable interfaces.

Example: Uniswap's versioned releases allow Yearn to safely integrate V3 pools without fearing sudden logic changes.

06

Choose In-Place Upgrades For...

  • Protocols Needing Frequent, Minor Patches (bug fixes, parameter tweaks).
  • Core Infrastructure with Locked Liquidity (Lending Pools, Stablecoins) where migration is impractical.
  • Gas-Sensitive Applications where the proxy overhead is acceptable vs. full redeployment costs.

Example: Compound uses a proxy for its Comptroller to adjust interest rate models and add new markets without user action.

pros-cons-b
VERSIONED CONTRACTS VS. IN-PLACE UPGRADES

In-Place Upgrades: Pros and Cons

Key architectural trade-offs for protocol evolution, focusing on security, user experience, and development velocity.

01

Versioned Contracts: Pro

Immutable Security: Each version is a new, immutable contract address. This eliminates the risk of malicious proxy upgrades (e.g., the UST depeg incident linked to a governance attack). Users can audit and opt-in to new versions, building trustless composability. This matters for DeFi blue-chips like Uniswap V2/V3, where security and composability are non-negotiable.

02

Versioned Contracts: Con

High Migration Friction: Requires active user migration, splitting liquidity and fragmenting protocol state. For example, migrating from Compound V2 to V3 involved complex incentive programs and left significant TVL stranded. This matters for protocols with complex state (e.g., lending positions, staking locks) where a seamless user transition is critical.

03

In-Place Upgrades: Pro

Seamless User Experience: All users and integrations automatically point to the latest logic via a proxy contract (e.g., OpenZeppelin's Transparent or UUPS). This enables zero-downtime feature rollouts and preserves protocol network effects. This matters for rapidly iterating dApps like Aave, where new collateral types and features must be deployed without user action.

04

In-Place Upgrades: Con

Centralized Upgrade Risk: Relies on a multi-sig or DAO, creating a persistent attack vector. A compromised admin key can rug the entire protocol (see the $100M+ Beanstalk exploit). This matters for protocols prioritizing decentralization where minimizing trusted parties is a core security tenet.

05

Versioned Contracts: Pro

Simplified Development & Testing: Each version is a fresh deployment, avoiding the complexity of storage layout collisions and upgrade script validation. Teams can use standard tooling (Hardhat, Foundry) without specialized upgrade plugins. This matters for smaller teams or experimental protocols where development speed and reduced attack surface are paramount.

06

In-Place Upgrades: Con

Technical Debt & Complexity: Requires strict adherence to storage layout rules (e.g., cannot delete variables, must append). Upgrade scripts are critical and error-prone. This adds significant overhead, as seen in early OpenZeppelin upgrade issues. This matters for long-lived protocols where maintaining upgrade paths over years increases engineering cost and risk.

CHOOSE YOUR PRIORITY

Decision Framework: When to Use Which Strategy

Versioned Contracts for Security

Verdict: The Gold Standard. This strategy is non-negotiable for high-value, immutable protocols. It provides a complete audit trail, eliminates upgrade admin risks, and allows for opt-in migration, giving users ultimate sovereignty. It's the model used by Uniswap V2/V3 and Compound V2/V3, where preserving user trust and contract state integrity is paramount.

In-Place Upgrades for Security

Verdict: High-Risk, High-Control. This approach centralizes risk in the upgrade mechanism (e.g., a TimelockController, multisig, or DAO). While tools like OpenZeppelin's TransparentUpgradeableProxy and UUPS (EIP-1822) provide patterns, the security now depends on governance security and the correctness of the initialization/disinitialization logic. A single bug in the upgrade can compromise the entire protocol history.

UPGRADEABILITY

Technical Deep Dive: Implementation Patterns and Risks

Choosing a contract upgrade strategy is a foundational architectural decision with profound implications for security, user experience, and long-term maintenance. This section compares the dominant patterns: deploying new, versioned contracts versus performing in-place upgrades on existing ones.

Versioned contracts are generally considered more secure by design. They eliminate the central risk of a compromised proxy admin key, which in an in-place upgrade (using a proxy like OpenZeppelin's TransparentUpgradeableProxy) could upgrade a contract to malicious code. Versioning treats each deployment as immutable, forcing explicit user migration. However, a well-audited, time-locked, and multi-sig controlled proxy can achieve high security for in-place upgrades, a pattern used by major protocols like Aave and Compound.

verdict
THE ANALYSIS

Final Verdict and Strategic Recommendation

A data-driven conclusion on selecting the right upgrade strategy for your protocol's lifecycle.

Versioned Contracts excel at minimizing risk and ensuring user trust because they create a clean separation between old and new logic. For example, major DeFi protocols like Uniswap and Compound use this pattern, allowing them to maintain 100% uptime for existing liquidity and user positions while deploying new, audited V2/V3 contracts. This approach is critical for protocols with high TVL (e.g., billions locked) where a failed upgrade could be catastrophic, and it enables seamless integration with front-ends and indexers that can point to the new contract address.

In-Place Upgrades take a different approach by modifying a single, persistent contract address via a proxy pattern (e.g., EIP-1967). This strategy results in a significant trade-off: superior user experience and gas efficiency for existing integrations, as users always interact with the same address, but it introduces centralization and execution risk. The upgrade authority (often a DAO multisig) becomes a single point of failure, and a bug in the upgrade logic itself can permanently compromise the core contract, as seen in early Parity wallet incidents.

The key trade-off: If your priority is security, decentralization, and long-term immutability for a protocol with complex state or high value, choose Versioned Contracts. This is the standard for DeFi bluechips. If you prioritize seamless user experience, lower migration overhead, and rapid iteration for a newer application where the core team maintains upgrade control, choose In-Place Upgrades via a secure proxy, commonly used by NFT projects and gaming dApps. Your choice fundamentally defines your protocol's risk profile and governance model.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Versioned Contracts vs In-Place Upgrades | Smart Contract Strategy | ChainScore Comparisons