> For the complete documentation index, see [llms.txt](https://docs.hyperbeat.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperbeat.org/hyperbeat-builder-codes/vaults/hyperbeat-lsthype.md).

# Hyperbeat lstHYPE

Integrate deposits and withdrawals for the Hyperbeat lstHYPE vault.

Deposit WHYPE and receive lstHYPE. Withdrawals pay out in WHYPE.

### Contracts

Chain: HyperEVM, chain ID 999.

| Contract              | Address                                      | Used for                               |
| --------------------- | -------------------------------------------- | -------------------------------------- |
| Vault token (lstHYPE) | `0x81e064d0eB539de7c3170EDF38C1A42CBd752A76` | Shares. 18 decimals.                   |
| Depositor             | `0x205aC1e0380B0b9ccE691bd4C6f3c14258Ae9201` | Deposits                               |
| Withdrawal queue      | `0x8B04Cd6561AbF2de78112DA30Ccb919fe8D09D98` | Instant and queued withdrawals         |
| Pricer                | `0x5eD0eC0b0643dAB621Dc814C8D058e161b9b884b` | Quotes                                 |
| WHYPE                 | `0x5555555555555555555555555555555555555555` | Deposit and payout token. 18 decimals. |

### Deposit

```solidity
Depositor.deposit(_token, _receiver, _amount, _builderCode)
```

| Name           | Type    | Description                                                               |
| -------------- | ------- | ------------------------------------------------------------------------- |
| `_token`       | address | WHYPE. Check with `isDepositToken(token)` before you offer another token. |
| `_receiver`    | address | The address that receives the lstHYPE. Usually the caller.                |
| `_amount`      | uint256 | Raw WHYPE amount, 18 decimals.                                            |
| `_builderCode` | bytes32 | Your builder code. Pass 32 zero bytes for an unattributed deposit.        |

The caller first approves the Depositor to spend `_amount` of WHYPE.

| Check before deposit    | Returns | Block the deposit when |
| ----------------------- | ------- | ---------------------- |
| `isPaused()`            | bool    | `true`                 |
| `isDepositToken(token)` | bool    | `false`                |
| `depositFee()`          | uint256 | Display only           |

To show the lstHYPE a deposit mints, call `Pricer.getVaultTokenAmount(WHYPE, amount)`.

### Withdraw

The user first approves the withdrawal queue to spend their lstHYPE. Both methods pay out in WHYPE.

| Method  | Function                                                           | Speed           | Fee                                       |
| ------- | ------------------------------------------------------------------ | --------------- | ----------------------------------------- |
| Instant | `instantWithdraw(_user, _amount)`                                  | One transaction | `instantWithdrawalFee()`, in basis points |
| Queued  | `createWithdrawalRequest(_user, _amount, _minAssetOut, _deadline)` | Up to 3 days    | None                                      |

Instant withdrawals depend on available liquidity and can be paused. Check `isInstantWithdrawalPaused()` first.

**Queued withdrawal parameters**

| Name           | Type    | Description                                                                                                                 |
| -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `_user`        | address | The address that receives the WHYPE.                                                                                        |
| `_amount`      | uint256 | Raw lstHYPE shares, 18 decimals.                                                                                            |
| `_minAssetOut` | uint256 | The least WHYPE the user accepts. Quote it with `Pricer.getAssetAmount(WHYPE, shares)`, then apply your slippage tolerance. |
| `_deadline`    | uint64  | Unix time in seconds, at least `minimumDeadline()` ahead (2 hours today). The Hyperbeat app uses 30 days.                   |

A request that is not processed by its deadline can be reclaimed with `cancelWithdrawalRequestAndClaimShares(request)`, which returns the shares. `getActiveWithdrawals()` returns every open request; filter on `user`.

### Handling amounts

* Convert user input with `parseUnits(input, 18)`. Display with `formatUnits(raw, 18)`.
* Keep every amount as `bigint`.
* Truncate displayed values. Never round a balance up.


---

# 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.hyperbeat.org/hyperbeat-builder-codes/vaults/hyperbeat-lsthype.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.
