What Happens to a Contract’s State Variables during a Mutable Upgrade?
During a mutable upgrade using a proxy pattern, the contract's state variables (data) are preserved in the proxy contract's storage. The new logic contract only dictates how that existing data is read and modified.
It is crucial that the storage layout of the new logic contract is identical to or compatible with the old one to prevent data corruption, a risk known as storage collision.