freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #35 of 90

proxy patterns · transparent · uups · diamond

BlockyVSDouble-Spend Dan
Blocky saysProxy patterns enable upgrades by separating a stable address from swappable logic.

The common trick: a proxy contract holds the state and a fixed address, and delegatecalls to a separate logic contract you can swap. Variants: Transparent proxy, UUPS (upgrade logic lives in the implementation), and the Diamond standard (many logic facets). Upgrades introduce risk (storage-layout clashes, malicious upgrades), so they're guarded by governance/timelocks.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleExplain how a proxy keeps the same address while changing logic.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>users → PROXY (state, fixed address)
           → delegatecall → LOGIC v1 → v2 (swappable)
guarded by governance + timelock</pre></body></html>
▶ Open the interactive comic issue
‹ Smart Contracts · Upgradeability PatternsErc-20 · The Fungible Token Standard ›