2

We want to make a smart contract for NFT minting site. We tried the upgradable NFT provided by openzeppellin and it works great on the testnet.

But after looking for well known NFT smart contracts, none of them use the upgradable smart contract.

Is it bad to use one? If you don't use upgradable smart contract, what if your smart contract have bugs? And how to fix it?

Thanks

mutokenji
  • 123
  • 2

1 Answers1

1

Well, it depends on your needs and whether you have a feature roadmap for that NFT or not. Personally, I would never use upgradable contracts unless I was damn sure that my contracts would need to be frequently upgraded. There are many advantages and disadvantages for using upgradable contracts.

Advantages

  • Ability to make software increments on a deployed contract and push upgrades of new features.
  • Ability to fix bugs that somehow make it to production.

Disdvantages

  • Upgradble contracts are completely centralized. As an admin of an upgradable contract, you are able to change its storage contents and access its ETH and token balances. You are also able to call selfdestruct, which renders the contract unusable for everyone forever.
  • It's not possible to audit an upgradable contract. Any simple would invalidate the audit and possibly introduce bugs.
  • There are limits to how much you could scale an upgradable contract due to contract size limits.

All that being said, you are still able to freeze an upgradable contract once you decide you no longer need to make further upgrades by changing the admin wallet to the burn address (0x00..00). Until then, the users would need to go out on a limb and trust you would make the right decisions regarding upgrades.

Ahmed Ihsan Tawfeeq
  • 4,524
  • 2
  • 19
  • 47