> For the complete documentation index, see [llms.txt](https://gabriel-j-shapiro.gitbook.io/metalex-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gabriel-j-shapiro.gitbook.io/metalex-docs/protocol-reference/upgrade-model.md).

# Upgrade model

All contracts use UUPS upgradeable proxies (with beacon proxies for `CyberCertPrinter` and `CyberScrip` instances) and **ERC-7201 namespaced storage**. Upgrades follow a **co-approval** model.

## Co-approval

* MetaLeX publishes new implementations to the relevant factories (`*Factory.setRefImplementation` / `setCyberCertPrinterRefImplementation` / `setCyberScripRefImplementation`).
* Each cyberCORP's `UPGRADE_AUTHORITY` independently opts in by calling `upgradeToAndCall(published, "")` on its own UUPS proxy.
* Neither side can act unilaterally:
  * MetaLeX cannot push an upgrade.
  * An issuer cannot upgrade to an arbitrary implementation outside the MetaLeX-published reference.

This keeps MetaLeX in the role of *protocol developer and steward* rather than a securities intermediary with admin keys over the issuer's stock ledger.

## V3 vs legacy

V3 architectures use UUPS for top-level contracts (`CyberCorp`, `IssuanceManager`, `DealManager`, `RoundManager`), giving each cyberCORP full control over its upgrade cadence.

Legacy architectures use beacon proxies pointing at MetaLeX-owned beacons, allowing batch upgrades but giving MetaLeX more control. Legacy cyberCORPs continue to receive upgrades through the beacon pattern; new deployments are always v3.

A legacy cyberCORP can migrate to v3 architecture in place via the `*WithMigration.sol` contracts in the repository.

## Beacons for downstream instances

Even in v3, instances *owned by* an `IssuanceManager` (its `CyberCertPrinter` and `CyberScrip` proxies) use beacon proxies pointing at a beacon **owned by the IssuanceManager itself**. This keeps the suite upgrading together when the issuer chooses to upgrade, while preserving co-approval against MetaLeX.

## Architecture diagram

See [`ownership-and-upgradeability.md`](https://github.com/MetaLex-Tech/cybercorps-contracts/blob/develop/ownership-and-upgradeability.md) in the repository root for the full Mermaid class diagram showing both v3 and legacy paths.

## See also

* [How-to: Upgrade a cyberCORP](/metalex-docs/protocol-how-to-guides/upgrade-a-cybercorp.md)
* [Explanation: Co-approval upgradeability](/metalex-docs/protocol-explanation/co-approval-upgradeability.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gabriel-j-shapiro.gitbook.io/metalex-docs/protocol-reference/upgrade-model.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
