1

I am learning how to write proxy contract for a smart contract . I am across this article . Here are many standards specified for writing a proxy contract . Which one of them is "best" ? By "best" I mean most secure and popular .

https://ethereum-blockchain-developer.com/110-upgrade-smart-contracts/03-upgrade-eip-standards/

2 Answers 2

1

In my experience, there are two leading contenders here:

1: UUPS (Universal Upgradeable Proxy Standard)

2: Dimond Pattern

They both have amazing libraries, comunity and are supported by Hardhat.

However, there isn't such thing as the "Best One." It all depends on your use case. But if you are only starting with upgradable SmartContract, I would advise using UUPS, as it's simple to implement and rather forgiving for newcomers because it's supported by OpenZeppelin library.

Here is a good tutorial on UUPS: UUPS tutorial

1
1

@Gaurav Pant there are many many proxy patterns out there. It really depends on:

  1. The complexity of your architecture (i.e. how many contracts are calling your desired proxy, etc)
  2. Your needs, i.e how much more than just a proxy are you looking for? (e.g. do you want to be able to remove the upgradable functionality? Are you running on testnet or mainnet? How do gas considerations come into your application?)

...for simplicity, the most effective low level proxy pattern is the Transparent Proxy Pattern. As mentioned by @Sky, the next step in complexity lands on UUPS. Past that, it really depends on how much more complex your needs are than these patterns provide. You would have to do you own research and reading.

From a development perspective, the first questions I would ask are; what kind of application are you trying to develop? How many proxies do you want? For no-knowledge advice, and if it's simple, I would say go for Transparent: easy to deploy and maintain, and the best first learning step.

2

Your Answer

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

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