Proxy Contract Architecture
Proxy Contract Architecture is a design pattern used to achieve upgradeability in smart contracts. It involves a proxy contract that stores the state and a logic contract that contains the code.
When a user interacts with the proxy, the proxy delegates the call to the current implementation contract. To upgrade the protocol, developers simply deploy a new logic contract and update the address in the proxy.
This allows for seamless updates without migrating user data or changing the protocol's entry point. However, this architecture is complex and introduces risks related to storage collisions and delegation errors.
It requires deep expertise to implement correctly and safely. Despite the risks, it is the standard for long-term, evolving decentralized applications.