> For the complete documentation index, see [llms.txt](https://docs.metalex.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metalex.tech/building-on-the-protocol/reference/contracts.md).

# Core contracts

What each core contract does and how the suite fits together

Each company-owned contract carries a `DEPLOY_VERSION` constant. In the `develop` source of [`cybercorps-contracts`](https://github.com/MetaLex-Tech/cybercorps-contracts) all six (CyberCorp, IssuanceManager, DealManager, RoundManager, LedgerEntryToken, CyberScrip) report `"5"`, the version deployed on Ethereum, Base and Arbitrum. New companies are created on v5. An existing company runs the version it was created with (`"3"`, `"4"` or `"4.1"`) until its owner upgrades it, so read `DEPLOY_VERSION()` on the instance before choosing an ABI. See [Upgrade model](/building-on-the-protocol/reference/upgrade-model.md).

```mermaid
flowchart TD
    F["CyberCorpFactory"] --> AUTH["BorgAuth<br/>(numeric-level authority)"]
    F --> CORP["CyberCorp<br/>(the onchain entity)"]
    F --> IM["IssuanceManager"]
    F --> DM["DealManager<br/>(deals + secondary offers)"]
    F --> RM["RoundManager<br/>(fundraising rounds)"]
    IM -- "one LET contract<br/>per security series" --> LET["LedgerEntryToken<br/>(LET contracts, ERC-721 LETs)"]
    IM -. "optional: deployCyberScrip,<br/>at most one per LET contract" .-> SCRIP["CyberScrip<br/>(ERC-20 scrip)"]
    DM --- REG["CyberAgreementRegistry<br/>(templates + signed agreements)"]
    RM --- REG
    AUTH -. "authorizes" .-> IM
    AUTH -. "authorizes" .-> DM
    AUTH -. "authorizes" .-> RM
```

| Contract                                                                                                  | Role                                                                                                                                                                                                                                                                                                 |
| --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**CyberCorp**](/building-on-the-protocol/reference/contracts/cybercorp.md)                               | The onchain entity. Stores the company's name, type, jurisdiction, contact details, default dispute resolution, officers, escrowed officer signatures, an optional corp-level extension, and the addresses of its IssuanceManager, DealManager and RoundManager. UUPS-upgradeable.                   |
| [**CyberCorpFactory**](/building-on-the-protocol/reference/factories.md)                                  | Deploys a cyberCORP and its suite (BorgAuth, IssuanceManager, DealManager, RoundManager) in one call.                                                                                                                                                                                                |
| [**IssuanceManager**](/building-on-the-protocol/reference/contracts/issuancemanager.md)                   | The issuance authority. Creates LET contracts, mints and assigns Ledger Entry Tokens (LETs), registers security classes, deploys CyberScrip, runs scripification and de-scripification, manages recertification approvals, settles the ownership change of secondary trades, and voids emptied LETs. |
| [**LedgerEntryToken**](/building-on-the-protocol/reference/contracts/ledgerentrytoken.md)                 | The LET contract: an ERC-721 that mints the LETs of one security series. Tracks possession and the holder of record separately, with a transfer gate for each. Its IssuanceManager mutates it, and BorgAuth admins call its administrative functions directly.                                       |
| [**CyberScrip**](/building-on-the-protocol/reference/contracts/cyberscrip.md)                             | The ERC-20 scrip of one LET contract. USDC-style compliance powers (force transfer, force burn, freeze), each with a one-way disable switch.                                                                                                                                                         |
| [**CyberShares**](/building-on-the-protocol/reference/contracts/cybershares.md)                           | An ERC-20 share token with certificate-formation logic. Partly implemented; see its page.                                                                                                                                                                                                            |
| [**DealManager**](/building-on-the-protocol/reference/contracts/dealmanager.md)                           | Primary deals (propose, sign, finalize, void, revoke) and the secondary-trading venue (post, accept and cancel offers, settlement escrows, exemption pathways). Built on the agreement registry.                                                                                                     |
| [**RoundManager**](/building-on-the-protocol/reference/contracts/roundmanager.md)                         | Multi-investor fundraising rounds: create, submit EOIs, allocate, reject or recall, close.                                                                                                                                                                                                           |
| [**LeXscroWLite**](/building-on-the-protocol/reference/contracts/lexscrowlite.md)                         | The escrow used when deals and rounds close: the `LexScrowStorage` library that DealManager and RoundManager share.                                                                                                                                                                                  |
| [**CyberAgreementRegistry**](/building-on-the-protocol/reference/contracts/cyberagreementregistry.md)     | Onchain registry of agreement templates and executed multi-party agreements, with signing delegation and void-request tracking.                                                                                                                                                                      |
| [**SafeCertificateConverter**](/building-on-the-protocol/reference/contracts/safecertificateconverter.md) | Computes a SAFE-to-equity conversion plan from round data. A stub that returns an empty plan.                                                                                                                                                                                                        |
| [**LexChex / LeXcheXBadge**](/building-on-the-protocol/reference/contracts/lexchex.md)                    | ERC-5484 soulbound credentials: the LeXcheX accreditation NFT and the LeXcheXBadge fact-keyed credential registry.                                                                                                                                                                                   |
| [**CertificateUriBuilder**](/building-on-the-protocol/reference/contracts/certificateuribuilder.md)       | Builds the onchain JSON and SVG token URI of every LET, with the SVG drawn by a separate image-builder contract.                                                                                                                                                                                     |

[Factories](/building-on-the-protocol/reference/factories.md) covers the specialised factories (PumpCorp, MetaDAO, ParentCo).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.metalex.tech/building-on-the-protocol/reference/contracts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
