Skip to content

Architecture

Hito Finance's hHYPE Liquid Staking Derivatives (LSD) system is built on top of the EVM LSD Stack from StaFi's AI-powered LSaaS. The system enables users to stake their HYPE tokens and receive hHYPE tokens in return, which represent their staked position and rewards.

Components

Contracts

The Hito Finance system comprises several smart contracts that facilitate the staking and unstaking processes. The StakeManager contract oversees the overall staking operations, including rate calculations, validator management, and commission distribution. The StakePool contract acts as an intermediary, managing the funds between stakers and the HYPE staking program, handling delegation, undelegation, and cross-chain operations. The LsdToken contract represents the liquid staking derivative token, tracking staked positions and rewards, and enabling its use in various DeFi applications. Together, these contracts ensure a secure and efficient staking experience for users.

Relay Service

The Relay Service is designed to be permissionless, allowing anyone to trigger the necessary contract functions. This ensures that the system remains decentralized and does not rely on a single entity to maintain its operations.

User Application

The User Application is the interface through which users interact with the Hito Finance staking system. It provides a seamless experience for staking and unstaking operations, allowing users to earn rewards efficiently.

Stake Flow

Users can stake their HYPE tokens through the stake method and receive equivalent hHYPE tokens in return. The amount of hHYPE tokens received is calculated based on the current rate:

hHYPE Amount = Stake Amount * Total hHYPE / Escrow HYPE

Where:

  • hHYPE Amount is the amount of hHYPE tokens being minted to the staker
  • Stake Amount is the amount of HYPE tokens being staked
  • Total hHYPE is the total amount of hHYPE tokens minted and distributed to users
  • Escrow HYPE is the total amount of HYPE tokens staked and locked in the LSD system

Stake Flow

Unstake Flow

hHYPE holders can call the unstake method to exchange their hHYPE tokens back for HYPE tokens. The process involves:

  1. Burning hHYPE tokens
  2. Initiating undelegation process
  3. Waiting for the unbonding period
  4. Withdrawing HYPE tokens

Unstake Flow

Withdraw Flow

Users can withdraw their staked HYPE tokens and rewards by calling the withdraw method after the unbonding period has elapsed.

Withdraw Flow

Relay Service

Due to smart contract limitations, the system introduces a Relay service that:

  1. Triggers the StakeManager at regular intervals
  2. Collects and calculates user rewards
  3. Distributes rewards to the platform and users
  4. Updates the exchange rate between HYPE and hHYPE

Relay Service

Rate Management

The system maintains a dynamic exchange rate between HYPE and hHYPE tokens that:

  1. Updates based on staking rewards
  2. Has rate change limits to prevent volatility
  3. Is tracked per era
  4. Affects the amount of hHYPE tokens minted/burned

Era System

The system operates on an era-based schedule where:

  1. Each era has a configurable duration (1-48 hours)
  2. Rewards are calculated and distributed per era
  3. Rate changes are tracked per era
  4. Validator delegations are managed per era

Security Features

  1. Ownership Management: Critical functions are restricted to contract owners
  2. Rate Limits: Prevents extreme rate changes
  3. Validator Management: Controlled validator addition/removal
  4. Emergency Functions: Available for critical situations
  5. Cross-chain Security: Secure bridge operations between L1 and EVM