Proxy Patterns
Web3 / smart contracts
Proxy patterns are design patterns in smart contract development that separate a contract's logic from its storage by using two distinct contracts: a proxy contract that holds state and user funds, and an implementation contract that contains the executable logic. When users or other contracts interact with the proxy, it delegates function calls to the implementation contract using low-level delegation mechanisms, preserving the calling context and storage layout. This separation enables the implementation contract to be replaced with an upgraded version without affecting the proxy's address or stored data. Common proxy patterns include the transparent proxy, which uses access control to prevent accidental errors, and UUPS, which places upgrade logic within the implementation itself. Proxy patterns are fundamental to making upgradable smart contracts practical and secure. Example: The transparent proxy pattern implemented by OpenZeppelin is used extensively in DeFi protocols; for instance, Compound's governance token and markets use proxies to allow governance-driven upgrades while protecting against admin errors and unintended function selector conflicts. Why it matters for smart contracts: Proxy patterns enable safe contract upgrades without sacrificing immutability or state consistency. They are essential infrastructure for managing contract evolution while maintaining the integrity and security that users expect from blockchain applications.
Explore the full Web3 Glossary — 2,062+ expert-curated definitions. Need guidance? Talk to our consultants.