# dnHYPE

### General Vault Information

* **Vault Name:** dnHYPE
* **Vault Token Symbol:** dnHYPE
* **Chain:** hyperevm
* **Chain ID:** 999
* **Vault Token (**&#x64;nHYP&#x45;**):** `0x949a7250Bb55Eb79BC6bCC97fCd1C473DB3e6F29`
* **Decimals:** 18
* **Insurance Contract (for Deposits):** `0xa4a6b89354E278666fb908CcdB16276AE151ff00`
* **Redemption Contract (for Withdrawals):** `0xBe61c1A27689c11b63378e84C9bB70A2cd616Fff`

#### Token Information

* **Accepted Tokens:**
  * **USDT0:**
    * Address: `0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb`
    * Decimals: 6

#### Useful Links

* **Vault Token on Explorer:**  [View on hyperscan](https://www.hyperscan.com/token/0x949a7250Bb55Eb79BC6bCC97fCd1C473DB3e6F29)
* **Insurance Contract on Explorer:** [View on hyperscan](https://www.hyperscan.com/address/0xa4a6b89354E278666fb908CcdB16276AE151ff00)
* **Redemption Contract on Explorer:** [View on hyperscan](https://www.hyperscan.com/address/0xBe61c1A27689c11b63378e84C9bB70A2cd616Fff)
* **Vault Logo:**  [Brand kit](https://www.hyperbeat.org/brand)

## Actions

### Depositing Tokens

To deposit tokens (e.g., USDT0) into the dnHYPE vault, you must interact with the **Insurance Contract**.

**Steps:**

1. **Approve Spending:**
   * The user must approve the **Insurance Contract** (`0xa4a6b89354E278666fb908CcdB16276AE151ff00`) to spend the chosen deposit token (e.g., USDT0).
   * Call the `approve(address spender, uint256 value)` function on the chosen deposit token's contract.
     * `spender`: The Insurance Contract address.
     * `value`: The amount to approve, in the token's native decimals (e.g., 6 for USDT0).
2. **Perform Deposit:**
   * Once approved, call the `depositInstant` function on the **Insurance Contract**.
   * `depositInstant(address tokenIn, uint256 amountToken, uint256 minReceiveAmount, bytes32 referrerId)`
     * `tokenIn`: The address of the token being deposited.
     * `amountToken`: **IMPORTANT:** The amount to deposit, expressed in **18 decimals**, regardless of the input token's actual decimals.
       * For tokens with 18 decimals (like USDe), use the amount directly.
       * For tokens with fewer decimals (like USDT0 with 6), you must scale the amount. For example: `amountIn18Decimals = amountIn6Decimals * 10**(18 - 6)`.
     * `minReceiveAmount`: The minimum amount of dnHYPE to receive. Can be set to `0` to accept any amount.
     * `referrerId`: A `bytes32` referrer ID. Can be set to `0x0000000000000000000000000000000000000000000000000000000000000000`.\
       or enter your referrerId from our collaboration.

### Withdrawing Tokens&#x20;

To withdraw underlying assets (USDT0) in exchange for dnHYPE, you must interact with the **Redemption Contract**. There are two methods: Instant and Classic.

**Step 1 (Required for both methods): Approve**

* Before withdrawing, the user must approve the **Redemption Contract** (`0xBe61c1A27689c11b63378e84C9bB70A2cd616Fff`) to spend their dnHYPE.
* Call the `approve(address spender, uint256 value)` function on the dnHYPE **Vault Token** contract (`0x949a7250Bb55Eb79BC6bCC97fCd1C473DB3e6F29`).
  * `spender`: The Redemption Contract address.
  * `value`: The amount of dnHYPE to approve (in 18 decimals).

**Step 2 (Option A): Instant Redeem**

* For immediate withdrawal, subject to a 0.5% fee.
* Call `redeemInstant(address tokenOut, uint256 amountMTokenIn, uint256 minReceiveAmount)` on the **Redemption Contract**.
  * `tokenOut`: Address of the token to receive (USDT0: `0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb`).
  * `amountMTokenIn`: Amount of dnHYPE to withdraw, in 18 decimals.
  * `minReceiveAmount`: The minimum amount of the output token to receive. Can be set to `0`.

**Step 2 (Option B): Classic Redeem**

* For withdrawal processed within 48 hours with no fee.
* Call `redeemRequest(address tokenOut, uint256 amountMTokenIn)` on the **Redemption Contract**.
  * `tokenOut`: Address of the token to receive (USDT0: `0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb`).
  * `amountMTokenIn`: Amount of dnHYPE to withdraw, in 18 decimals.

### Additional Information

* **Token Balance (BalanceOf):**
  * To get a user's balance for any of the deposit tokens, call `balanceOf(address account)` on that token's contract.
  * To get a user's hbUSDT (vault shares) balance, call `balanceOf(address account)` on the hbUSDT vault contract.
* **Withdrawal Processing Period (Classic):** Classic redemption requests will be processed within 48 hours. The assets are automatically sent to the user's wallet upon processing.
* **Checking Withdrawal Status (Classic):**\
  Unlike the August vaults, status for classic redemption requests is checked via an off-chain API provided by Midas, not a smart contract function.\
  **API Endpoint:**\
  `GET https://api-prod.midas.app/api/data/requests/pending?address=<USER_ADDRESS>&networkId=999`\
  Replace `<USER_ADDRESS>` with the user's wallet address.\
  The API will return a JSON object containing a `redemptions` array. Each object in this array represents a pending withdrawal request and includes details like the amount, creation date, and status (`pending`, `ready`, or `expired`).
