> For the complete documentation index, see [llms.txt](https://docs.hyperlink.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperlink.xyz/security/smart-contracts.md).

# Smart Contracts

HyperLink's on-chain smart contracts on HyperEVM: addresses and purpose for deposits, withdrawals, fees, enclave verification, and hlHYPE staking.

HyperLink's on-chain contracts run on HyperEVM and handle deposits, withdrawals, fees, enclave verification, reserve commitments, and hlHYPE staking. Trading and balances stay private inside the enclave. On Hyperliquid, the relay operates in Standard account abstraction mode.

All contracts sit behind upgradeable proxies. Use the proxy address below; it is the stable, user-facing address.

## Contracts

| Contract                | Purpose                                                                                     |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| **HyperlinkTokenRelay** | Processes on-chain deposits and submitted withdrawals; delegates staked HYPE to validators. |
| **StateManager**        | Stores the on-chain reserve commitments behind proof of reserves.                           |
| **EnclaveKeyRegistry**  | Registers and verifies the enclave's signing key against its published code.                |
| **ProtocolRegistry**    | Manages the user and token allowlists.                                                      |
| **FeeManager**          | Holds deposit and withdrawal fee configuration.                                             |
| **HLHYPE**              | The hlHYPE ERC-20 liquid staking token (18 decimals), rate-appreciating against HYPE.       |
| **StakingVault**        | Custodies HYPE backing hlHYPE and tracks the staking exchange rate.                         |
| **StakingVaultManager** | Entry point for staking: `deposit`, `queueWithdraw`, `claimWithdraw`.                       |

## Contract Addresses (HyperEVM mainnet, chainId 999)

| Contract                | Address                                      |
| ----------------------- | -------------------------------------------- |
| **EnclaveKeyRegistry**  | `0x420a822C59FD8f8da0d4A89F360bcec5B4FfbDC5` |
| **StateManager**        | `0x75b2abbd9C3C19B7Fd39Faa2a3eB5848E0cd594C` |
| **ProtocolRegistry**    | `0x69AA5409b3CfF93436E18e360bD94CB2B1c1C08E` |
| **FeeManager**          | `0x4eA4F24e569855b63a1D7ec9A98617b58952cC4a` |
| **HyperlinkTokenRelay** | `0x47472cD62C99b8b5Ce7e84e733515133e9AEC0bD` |
| **HLHYPE**              | `0xBee62d1b61Af920098873BD0336b46a5EFdC0E83` |
| **StakingVault**        | `0x4325Bb2dDe712Fc1A8cE304dc05DbC932Adb77DE` |
| **StakingVaultManager** | `0xC445ba9b8E27e083889Ee4ac2ed3415E4BC675f6` |

## Native HYPE

The contracts represent native HYPE with this sentinel address:

```
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
```

Treat that address as native HYPE wherever a token address is expected (for example, deposit and fee accounting).

## Related pages

* [Staking (hlHYPE)](/more/staking.md): staking and unstaking through StakingVaultManager.
* [Security](/security/security.md): what these contracts let you verify.


---

# 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.hyperlink.xyz/security/smart-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.
