New: Explore our latest Web3 innovations.Learn More about Ancilar Web3 services

UUPS vs Transparent vs Beacon Proxy Architecture Guide

Smart Contracts
2024-01-12
Author:Jyotvir
UUPS vs Transparent vs Beacon Proxy Architecture Guide

UUPS vs Transparent vs Beacon proxy comparison for Solidity engineers: gas cost, upgrade authority, bricking risk, and EIP-1967 storage slots in 2024.

Frequently Asked Questions

A Transparent proxy holds the upgrade and admin logic inside the proxy contract itself and routes admin calls separately from user calls to avoid function selector clashes. A UUPS proxy moves the upgrade logic into the implementation contract instead, which makes the proxy smaller and cheaper to deploy but means a faulty implementation that omits the upgrade function can lock the proxy permanently. The choice trades deployment cost against the risk of bricking an upgrade path.
A Beacon proxy reads its implementation address from a separate beacon contract rather than storing it locally, so many proxies pointing at the same beacon all upgrade in a single transaction when the beacon is updated. UUPS and Transparent proxies each store their own implementation address, so upgrading a fleet means one transaction per proxy. Beacon is the pattern for large numbers of identical contracts such as per-user vaults or token clones.
EIP-1967 fixes the implementation address at the pseudo-random storage slot derived from keccak256 of eip1967.proxy.implementation minus one, a position the Solidity compiler never assigns to ordinary state variables. Because the proxy executes implementation code against its own storage through delegatecall, storing the implementation pointer in a normal slot would risk an implementation variable overwriting it. The derived slot removes that collision class by construction.

Don't Miss What's Next

Subscribe to newsletter

Tags:

Smart Contracts

Smart Contract Security

Solidity

Get in Touch

Our team will get back to you within 24 hours.

A clear proven process, that delivers

End of Scroll. Start of Discovery.

You've seen our ideas - now go deeper.
Discover more insights, tutorials, and innovations shaping Web3.