# What upgrade pattern does openzeppelin use?

**URL:** <https://forum.openzeppelin.com/t/what-upgrade-pattern-does-openzeppelin-use/12298>\
**Category:** Upgrades\
**Created:** [July 11, 2021, 4:24pm UTC](https://forum.openzeppelin.com/t/what-upgrade-pattern-does-openzeppelin-use/12298 "2021-07-11T16:24:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![novaknole](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/novaknole/32/3796_2.png) [@novaknole](https://forum.openzeppelin.com/u/novaknole)\
**Post date:** [July 11, 2021, 4:24pm UTC](https://forum.openzeppelin.com/t/what-upgrade-pattern-does-openzeppelin-use/12298/1 "2021-07-11T16:24:20Z")

</div>

Hi,

I am wondering which patterns openzeppelin use for upgradable contracts(I am mostly curious how you deal with storages).

Do you guys follow the strict storage rules, where you can’t add/remove/change order of variables in the new contract ? I’d ask if so, how did this pattern work for you ? isn’t it a big pain for developers to follow such conventions in the practice ?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [July 12, 2021, 1:01am UTC](https://forum.openzeppelin.com/t/what-upgrade-pattern-does-openzeppelin-use/12298/2 "2021-07-12T01:01:43Z")

</div>

> [@novaknole](#):
>
> I am wondering which patterns openzeppelin use for upgradable contracts(I am mostly curious how you deal with storages).

There are some proxy patterns, and I think you can have a look at this tutorial: [Upgrades - OpenZeppelin Docs](https://docs.openzeppelin.com/openzeppelin/upgrades) And now UUPS proxies are recommended,

you can have a try following this tutorial: [UUPS Proxies: Tutorial (Solidity + JavaScript) | OpenZeppelin Community](https://forum.openzeppelin.com/t/uups-proxies-tutorial-solidity-javascript/7786)

> [@novaknole](#):
>
> Do you guys follow the strict storage rules, where you can’t add/remove/change order of variables in the new contract ? I’d ask if so, how did this pattern work for you ? isn’t it a big pain for developers to follow such conventions in the practice ?

Yes, I think when you use the plugin to use proxy, it will have a check. Look at this documentation:

> **[Upgrades Plugins - OpenZeppelin Docs](https://docs.openzeppelin.com/upgrades-plugins/1.x/)**

And [https://docs.openzeppelin.com/upgrades-plugins/1.x/faq#what-does-it-mean-for-a-contract-to-be-upgrade-safe](https://docs.openzeppelin.com/upgrades-plugins/1.x/faq#what-does-it-mean-for-a-contract-to-be-upgrade-safe)

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [July 14, 2021, 10:48pm UTC](https://forum.openzeppelin.com/t/what-upgrade-pattern-does-openzeppelin-use/12298/3 "2021-07-14T22:48:26Z")

</div>

> [@novaknole](#):
>
> isn’t it a big pain for developers to follow such conventions in the practice ?

We haven't heard complaints about it. It's not really a convention but a safety requirement! If you reorder variables you are basically corrupting storage layout.
