# Where is the storage for an upgradeable contract?

**URL:** <https://forum.openzeppelin.com/t/where-is-the-storage-for-an-upgradeable-contract/2616>\
**Category:** SDK\
**Created:** [April 8, 2020, 6:25am UTC](https://forum.openzeppelin.com/t/where-is-the-storage-for-an-upgradeable-contract/2616 "2020-04-08T06:25:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amateur-dev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/amateur-dev/32/1715_2.png) [@amateur-dev](https://forum.openzeppelin.com/u/amateur-dev)\
**Post date:** [April 8, 2020, 6:25am UTC](https://forum.openzeppelin.com/t/where-is-the-storage-for-an-upgradeable-contract/2616/1 "2020-04-08T06:25:15Z")

</div>

@abcoathup I have a question. Assume the following

(a) Proxy A(this is where all the storage is) —implementation—\> Contract A (this is where all the functions are).

So if I am upgrading Contract A {by implementing a Contract Av2} and adding new state memory item over here. Eg, `address public funAddress`; how does Proxy A refer to this storage variable when delegating function calls to Contract Av2. Just to complete the picture over here, I am adding a function which sets the funAddress, like `function setFunAddress(address _funAddress) onlyOwner {}` and then calling this function as soon as I deploy the new implementation.

The trick extends when I am doing another upgrade to Contract Av3. And in this round, I do not call any function at all.

What I am struggling with is that when Proxy A now delegates to Contract Av3, how will it know the value of the `funAddress` {which, I think, is sitting only in v2}.

Thank you.

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [April 8, 2020, 6:35am UTC](https://forum.openzeppelin.com/t/where-is-the-storage-for-an-upgradeable-contract/2616/2 "2020-04-08T06:35:15Z")

</div>

The storage is in the Proxy contract whilst the logic (including functions) is in the logic contract. Upgrading (pointing to a new logic contact) doesn’t change where the storage is.

Have a look at the following guide:  
[https://docs.openzeppelin.com/learn/upgrading-smart-contracts#how-upgrades-work](https://docs.openzeppelin.com/learn/upgrading-smart-contracts#how-upgrades-work)
