The MadBrooks Sage

Contract Upgradability Patterns: Proxy Contracts and Immutable Logic

Crypto 101 · DeFi and tokens · Lesson 63 of 63
← Lesson 62
Nov 9, 2026 · 9:33 AM CT · 7:49 · The MadBrooks Sage | Contract Upgradability Patterns | Proxy Contracts and Immutable Logic | 11/9/2026
SubscribeApple PodcastsSpotifyYouTubeRSS

The architectural approaches to modifying smart contract code after deployment—from transparent proxies to beacon patterns. The tension between flexibility and trustlessness.

Apple Podcasts Spotify Pocket Casts RSS

Chapters

  1. 0:00 The promise of immutability is both blockchain's greatest…
  2. 2:08 But let's be clear about what we've done here
  3. 4:01 Then there's the diamond pattern, which sounds like it was…
  4. 6:02 But governance itself is upgradability's Achilles heel

Chapter times are approximate.

Transcript

The promise of immutability is both blockchain's greatest strength and its most uncomfortable constraint.

When you deploy a smart contract to Ethereum, you're carving something into digital stone. The code at that address cannot be changed. This immutability is precisely what makes smart contracts trustworthy—no one can modify the rules after you've committed your assets. But it's also terrifying, because bugs are permanent, improvements are impossible, and the world changes while your code stays frozen in amber.

This tension has haunted developers since the DAO hack in twenty sixteen. The Ethereum community literally had to fork the entire blockchain to recover funds because the contract code couldn't be fixed. That event crystallized an uncomfortable question: how do we build systems that are both trustworthy and adaptable?

The answer, imperfect as it is, lies in proxy patterns.

Think of a proxy contract like a forwarding address. When someone interacts with your contract, they're actually talking to a thin proxy layer that doesn't contain the business logic. Instead, the proxy uses a low-level operation called delegatecall to forward the request to a separate implementation contract where the real code lives. The proxy maintains all the state—your balances, your data—while the implementation contract is just the logic, the behavior.

Here's where it gets interesting. The address of that implementation contract is stored as a variable in the proxy. And variables can be changed. So while the implementation is immutable once deployed, you can deploy a new implementation and update the proxy to point to it. Your contract's public address never changes, the state never moves, but the logic executing against that state can be completely different.

This is the transparent proxy pattern, and it's extraordinarily clever. It means you can fix bugs, add features, optimize gas costs, all without asking users to migrate to a new address or losing any existing data. Compound, Aave, Uniswap—nearly every major DeFi protocol uses some variation of this approach.

But let's be clear about what we've done here. We've traded immutability for upgradability. There's now a privileged address, usually controlled by a multisig wallet or governance contract, that can swap out the implementation. That address can change the rules. It can change them in ways you might not like. It can change them to steal your funds.

This is the central tension. Users want protocols that can improve and respond to threats. But they also want to know that the rules won't change underneath them. These desires exist in opposition.

Some protocols try to split the difference with timelocks. Any upgrade must be announced, then there's a waiting period—maybe two days, maybe a week—before it takes effect. This gives users time to withdraw if they don't like the change. It's better than nothing, but it assumes users are vigilantly monitoring governance proposals and ready to act quickly. Most aren't.

Others use immutable proxies, where the upgrade mechanism can be permanently disabled once the contract is mature enough. Synthetix did this with some of their contracts—start upgradable, then lock it down forever when you're confident the code is solid. It's a one-way door, and it requires genuine conviction that you've found the final form.

The beacon pattern takes a different approach to the same problem. Instead of each proxy storing its own implementation address, multiple proxies all point to a single beacon contract that stores the implementation address. This is elegant when you have many instances of the same logic—say, hundreds of individual lending pools all running identical code. Upgrade the beacon once, and all the proxies automatically use the new implementation. It's efficient, but it also means one upgrade key controls an entire ecosystem of contracts.

Then there's the diamond pattern, which sounds like it was named by someone who wanted to make upgradability seem more precious than it is. A diamond contract can have multiple implementation contracts, called facets, each handling different functionality. You can upgrade individual facets without touching the others. It's modular and flexible, but the complexity is significant. More moving parts mean more surface area for mistakes.

Each of these patterns is a design choice that encodes a philosophical position about trust. When you see a protocol using a transparent proxy with a three-of-five multisig as the upgrade authority, you're seeing a team that believes pragmatic control by trusted humans is better than rigid code. When you see immutability or burned upgrade keys, you're seeing a team that believes predictability matters more than flexibility.

Neither is obviously right. The DAO couldn't be upgraded and disaster followed. But countless protocols have been upgraded maliciously or captured by hostile governance. The space is littered with both failure modes.

What matters is that the choice is explicit and understood. Too many users interact with contracts without realizing they're upgradable, without checking who controls the upgrade key, without understanding that their supposedly trustless interaction actually depends entirely on a handful of people behaving well.

Etherscan will show you if a contract is a proxy. You can see the implementation address, check the upgrade authority, look at the history of past upgrades. These aren't hidden facts, but they require initiative to discover. The default is trust without verification.

Some of the most interesting recent work involves progressive decentralization of upgrade rights. A contract might launch with team control for rapid iteration, then move to token-holder governance as the community matures, then eventually to immutability once the design space is fully explored. It's a lifecycle approach that acknowledges different needs at different stages.

But governance itself is upgradability's Achilles heel. Token-holder voting sounds decentralized until you realize that whales and insiders often control outcomes, that voter turnout is abysmal, that governance tokens can be borrowed for the duration of a vote. The upgrade key moved from a multisig to a governance contract, but the underlying dynamic—concentrated power over mutable rules—remains.

There's no perfect answer here. Immutability means permanence of bugs. Upgradability means trust in authorities. You're choosing between different failure modes, and the right choice depends on what you're building and who you're building it for.

If you're creating a protocol that holds billions in value, where any bug is catastrophic and where the design space is well-understood, maybe you choose immutability. If you're experimenting in new territory where adaptation is survival, maybe you choose upgradability with strong governance. If you're somewhere in between, maybe you choose timelocks and transparency and hope your users are paying attention.

The deeper lesson is that code isn't law—governance is law, whether that governance is a multisig, a token vote, or the immutability of mathematics. The architecture you choose determines who governs and how. Proxy patterns aren't just technical implementations, they're constitutional choices about who has power and under what constraints.

When you use a protocol, you're not just trusting the code you see today. You're trusting the process that might change that code tomorrow. Understanding proxy patterns means understanding where that power lives and whether you're comfortable with how it might be used.

See you Tuesday.

Immutability and upgradability aren't opposites—they're different answers to the question of who you're willing to trust, and both answers come with a price.

← Nonce Gaps and Transaction Dependencies: Why Transaction…

AI generated. This is commentary and education, not investment advice. Disclosures