Overview

How it all works on the technical level

Core smart contracts

HyperCroc portfolios are built on three primary smart contract components that work together to enable sophisticated portfolio strategies with minimal user complexity:

Vault contract

The Vault is an upgradeable smart contract that implements the ERC-4626 Tokenized Vault standard. It references the ConfigManager and can connect to multiple protocol adapters for interacting with various DeFi protocols. Currently, the system has implemented adapters to different Lending Protocols (including Aave and Morpho), AMMs (Uniswap v3/v4, Curve), Vaults (we support any ERC-4626 style Vault which has implemented automated user withdrawals).

Access control and roles

The Vault implements a role-based access control system with three distinct roles:

  1. User - End users or integrated smart contracts that can:

    • Deposit funds (Deposit/Mint functions)

    • Withdraw funds when sufficient free liquidity exists (Withdraw/Redeem functions)

    • Request withdrawals when immediate liquidity is insufficient (RequestWithdraw function)

  2. VaultManager - Responsible for portfolio management operations:

    • Investing Vault funds into connected protocols

    • Withdrawing previously invested funds

    • Rebalancing assets across protocols based on allocation strategy

    • Executing protocol-specific actions through the ExecuteProtocolAction function

  3. Admin - Service role with administrative capabilities:

    • Upgrading the smart contract implementation

    • Adding or removing protocol adapters

    • Assigning VaultManager roles

    • Managing system configuration

Core user operations

  1. Deposit/Mint:

    • User approves token transfer (ERC-20.approve)

    • User calls deposit function, transferring tokens to the vault

    • Vault calculates the current share price

    • User receives ERC-20 share tokens representing their proportional ownership

  2. Withdraw/Redeem:

    • User calls withdraw function, exchanging share tokens for underlying assets

    • Vault calculates current share price.

    • If sufficient "free" assets are available, the withdrawal executes immediately

    • User receives the underlying tokens.

  3. RequestWithdraw:

    • Used when there are insufficient "free" assets for immediate withdrawal.

    • User specifies the amount of share tokens to redeem.

    • Vault locks these shares and initiates withdrawal of assets from lending protocols.

    • Once funds are available, the user can complete the withdrawal.

ConfigManager contract

The ConfigManager is an upgradeable smart contract that unifies configuration for multiple Vaults. It stores protocol-specific settings, limits, and parameters used by the protocol adapters.

By separating configuration from execution logic, HyperCroc achieves greater flexibility and ease of management. One ConfigManager can service multiple Vaults, ensuring consistent protocol interactions across the platform.

Access control

The ConfigManager primarily exposes functions for the admin role, which can do the following:

  • Update adapter settings

  • Add or remove supported protocols

  • Configure allocation limits and parameters.

DeFi protocol adapters

Protocol adapter is a non-upgradeable, stateless smart contract that acts as an interface between HyperCroc Vaults and DeFi protocols. By implementing a standardised adapter pattern, HyperCroc can integrate with any DeFi protocol while maintaining a consistent interface for the Vault. Each adapter implements protocol-specific logic for:

  • Depositing funds into the protocol

  • Withdrawing funds from the protocol

  • Querying current balances and accrued interest

  • Swapping tokens (applicable to AMM adapters).

HyperEVM adapters

[TBD: list protocols we have implemented adapters for in HyperEVM]

HyperCore vaults

Vaults are a powerful and flexible primitive built into HyperCore. Strategies running on vaults benefit from the same advanced features as the DEX, from liquidations of overleveraged accounts to high throughput market making strategies. No more depositing into vaults that simply rebalance two tokens.

Anyone can deposit into a vault to earn a share of the profits. In exchange, the vault owner receives 10% of the total profits. (Note that protocol vaults do not have any fees or profit share). Vaults can be managed by an individual trader or automated by a market maker. All strategies come with their own risk, and users should carefully assess the risks and performance history of a vault before depositing.

HyperCroc will run its own Vault with a powerful momentum strategy: Buy top N past winners (determined by look_back returns) and hold them for the holding_period. The asset universe is top 20 (by volume and open interest) perps trading on HyperLiquid DEX. Our backtests suggest that we should support long-only entries and avoid shorting.

Last updated