2

I am delving into UUPS(Universal Upgradeable Proxy Standard) and Beacon proxy patterns.

I believe they serve distinct purposes, but I am unsure about the right use cases for each.

It seems that UUPS operates more independently than Beacon. However, Beacon utilizes its factory to create multiple proxy contracts with a single logic.

Could you please enlighten me on this?

2 Answers 2

2

Consider the diagram.

The BeaconProxy is just the first part of the BeaconPattern. The BeaconProxy itself is:

  • not upgradeable
  • does not store the implementation address

This is a crucial difference compared to UUPS. In the BeaconPattern, the implementation address is stored in another contract — the IBeacon. This approach makes possible to upgrade the implementation address for all BeaconProxies (for common IBeacon) with a single transaction. With UUPS, if you update the implementation, you must update every UUPS proxy contract.

3

UUPS is used when you need only one single upgradable contract. For example if you think you'll need to change the logic of a contract in the future, then you can make it a UUPS.

A beacon is used when you need multiple upgradable contracts, all with the same logic. For example if you need to deploy a lot of tokens that follow the same logic, and you want to make them all upgradable, then you can use a Beacon proxy. You can think of it like an upgradable version of the Clones pattern.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.