Hyperbeat Ultra HYPE
This doc provides the necessary information to integrate the Hyperbeat Ultra HYPE (hbHYPE) vault into your applications.
General Vault Information
Vault Name: Hyperbeat Ultra HYPE
Vault Token Symbol: hbHYPE
Chain: hyperevm
Chain ID: 999
Vault Contract Address:
0x96C6cBB6251Ee1c257b2162ca0f39AA5Fa44B1FB
Vault Token Decimals (hbHYPE): 18
Main Deposit Token: WHYPE
Address:
0x5555555555555555555555555555555555555555
Decimals: 18
Useful Link
Contract on explorer: View on hyperscan
WHYPE Token on explorer: View on hyperscan
Vault Logo: Brand kit
Actions:
Depositing Tokens
To deposit WHYPE tokens into the hbHYPE vault
Steps:
Check Allowance: Before depositing, check if the vault contract is authorized to spend the user's WHYPE tokens.
Call the
allowance(address owner, address spender)
function on the WHYPE token contract.owner
: User's address.spender
: hbHYPE vault contract address.
Approve Spending if necessary: If the allowance is less than the amount to deposit, the user must approve the vault contract.
Call the
approve(address spender, uint256 value)
function on the WHYPE token contract.spender
: hbHYPE vault contract address.value
: Amount of WHYPE to approve (in atomic units, e.g.,amount * 10**18
).
Perform Deposit: Once sufficient approval is granted, call the
deposit(uint256 assets, address receiver)
function on the hbHYPE vault contract.assets
: Amount of WHYPE to deposit (in atomic units, e.g.,amount * 10**18
).receiver
: Address that will receive the hbHYPE tokens (usually the user's address).
Requesting Withdrawal of Tokens (hbHYPE)
To withdraw underlying assets from the vault in exchange for hbHYPE tokens:
Steps:
Request Redeem: Call the
requestRedeem(uint256 shares, address receiverAddr, address holderAddr)
function on the hbHYPE vault contract.shares
: Amount of hbHYPE tokens to withdraw (in atomic units, e.g.,amount * 10**18
).receiverAddr
: Address that will receive the underlying assets (usually the user's address).holderAddr
: Owner of the hbHYPE tokens (usually the user's address).Note: It is recommended to simulate this transaction using
contract.requestRedeem.staticCall(...)
or thepreviewRedeem(shares)
function before sending it to check for potential errors and estimate the received assets.
Previewing Amounts (Optional but recommended)
The vault contract provides useful preview functions:
previewDeposit(uint256 assets) returns (uint256 shares)
: Returns the number of vault shares that would be received for a given amount of assets.previewRedeem(uint256 shares) returns (uint256 assets)
: Returns the amount of assets that would be received for a given number of vault shares.
Additional Information
Token Balance (BalanceOf):
To get a user's WHYPE token balance, call
balanceOf(address account)
on the WHYPE contract.To get a user's hbHYPE token (vault shares) balance, call
balanceOf(address account)
on the hbHYPE vault contract.
Withdrawal Processing Period: Please note that withdrawals (after
requestRedeem
) can take up to 2 days to be processed. Once processed, the assets are automatically sent to thereceiverAddr
specified during therequestRedeem
call. There is no separate manual claim step required by the user after the processing period.Checking Withdrawal Status: To check the amount of assets that are claimable (or have been claimed) for a specific date for a given receiver, you can use the
getClaimableAmountByReceiver
function on the vault contract.Function:
getClaimableAmountByReceiver(uint256 year, uint256 month, uint256 day, address receiverAddr) view returns (uint256)
year
: The year of the withdrawal request.month
: The month of the withdrawal request.day
: The day of the withdrawal request.receiverAddr
: The address of the receiver of the withdrawal.
This function returns the amount of assets (in atomic units) that are claimable for that specific date and receiver. If a withdrawal has been processed for that date, it will reflect the amount. If no withdrawal was scheduled or processed for that date for the receiver, it will return 0.
Last updated