Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hypernode-docs.polynode.dev/llms.txt

Use this file to discover all available pages before exploring further.

HyperLiquid’s borrow/lend system is internally called BOLE (BOrrow LEnd). It is a pool-based lending protocol built directly into the L1, not a separate smart contract. BOLE shares state with the perpetual and spot engines, enabling tight integration with portfolio margin, funding rates, and the HyperEVM bridge.

Architecture

BOLE operates as a top-level component within HyperLiquid’s application state, at the same level as perpetual markets and spot orderbooks. This means lending operations settle in the same block as trades, with no cross-contract calls or bridge latency. Each supported token has its own reserve pool with independent interest rates, utilization tracking, and liquidation parameters. Users supply tokens to earn yield or borrow against their collateral.

Pool State

The lending pool maintains 21 state fields at the top level of the application state:
FieldPurpose
activeWhether the lending pool is currently active
risk_free_rateBaseline risk-free interest rate (validator-voted)
nonceMonotonic nonce for lending operations
assetsToken assets available in the pool
abstractionIntegration with the account abstraction layer
action_to_trackerTracks pending lending actions
prune_bucket_guardRate-limiting guard for state pruning
Each token’s reserve is tracked through several nested structures:
Reserve              — per-token reserve pool (9+ fields)
ReserveAccumulator   — cumulative interest accrual per reserve
ReserveIndex         — index into the reserve accumulator
ReserveLegState      — tracks one side (supply or borrow) of a reserve
The lending system maintains a two-sided book structure (supply side and borrow side), mirroring the order book architecture used for trading. This enables efficient matching of supply and demand within each token pool.

Interest Rate Model

BOLE uses a kink model (also called a jump-rate model), the same design used by Compound and Aave. The model creates two distinct rate regimes based on pool utilization.
Rate
  |                    /
  |                   /  <-- Above kink: steep increase
  |                  /
  |                 / <-- Kink point
  |               /
  |             /
  |           /    <-- Below kink: gradual increase
  |         /
  |       /
  |_____/________________________
  0%                    100%
           Utilization

Parameters

ParameterDescription
kink_utilizationTarget utilization ratio (e.g., 80%)
kink_rateInterest rate at the kink point
yearly_rate_curveFull rate curve definition
interest_capGlobal maximum interest rate cap
risk_free_rateBaseline rate determined by validator consensus
Below the kink: Interest rates increase linearly from a base rate to kink_rate. This region encourages borrowing while utilization is healthy. Above the kink: Interest rates increase steeply (jump multiplier) to incentivize repayment and additional supply. This protects lenders from liquidity crunches.

Risk-Free Rate

The baseline risk-free rate is determined through validator consensus:
  • Each validator submits their own rate value
  • The median of all submitted values becomes the consensus rate
  • Recalculation is rate-limited to prevent manipulation
This rate serves as the floor for all lending yields and feeds directly into perpetual funding rate calculations.

Rate Types

RateDescription
supplyYearlyRateAnnual yield for lenders (APY)
borrowYearlyRateAnnual cost for borrowers (APR)
predictedRateForward-looking rate estimate
dailyAmountOwedPer-user daily interest accrual

Reserve State

Each token’s reserve pool exposes its current state through the API.
borrowLendReserveState
object
Query via the /info endpoint with {"type": "borrowLendReserveState", "token": "<token>"} for a single token, or {"type": "allBorrowLendReserveStates"} for all tokens.
Response fields:
FieldTypeDescription
utilizationfloatCurrent pool utilization (borrowed / supplied)
ltvfloatPool-level loan-to-value ratio
totalSuppliedstringTotal tokens supplied to the pool
totalBorrowedstringTotal tokens borrowed from the pool
supplyYearlyRatestringAnnual supply yield
borrowYearlyRatestringAnnual borrow rate
basisstringPrice basis
valuestringCurrent value
midstringMid-market reference price

User State

Per-user borrow/lend positions are tracked individually.
borrowLendUserState
object
Query via the /info endpoint with {"type": "borrowLendUserState", "user": "<address>"}.
Response fields:
FieldTypeDescription
tokenstringToken identifier
totalstringTotal position size
ltvfloatUser’s loan-to-value ratio
dailyAmountOwedstringDaily interest owed
predictedRatestringPredicted interest rate
portfolioMarginEnabledboolWhether portfolio margin is active
portfolioMarginRatiofloatPortfolio margin utilization ratio
tokenToPortfolioBorrowRatioobjectPer-token borrow ratio under PM
evmMintedSupplystringEVM-side minted supply
evmEscrowsobjectEVM escrow amounts
specialStatusesarrayAccount flags

Liquidation System

BOLE implements three distinct liquidation modes, each suited to different scenarios.

Market Liquidation

Immediate market-order liquidation. When a position’s LTV exceeds the liquidation threshold, a market order is placed to close the position. This is the fastest liquidation mode but can cause slippage in thin markets.

Backstop Liquidation

A backstop system operates as a safety net when market liquidations fail or are insufficient. Key components:
ComponentPurpose
BackstopLiquidatorManages backstop liquidation state
BackstopLiquidatorModeConfigurable operating modes
BackstopLiquidatorParamsGlobal backstop parameters
BackstopLiquidatorTokenParamsPer-token backstop configuration
HIP-3 deployed tokens have their own dedicated backstop liquidator with separate parameters, ensuring third-party token liquidations do not impact core markets.

Partial Liquidation

Reduces a position incrementally rather than closing it entirely. A partial_liquidation_cooldown prevents rapid repeated partial liquidations from destabilizing positions.

TWAP Liquidation Orders

All liquidation modes can execute through TWAP (Time-Weighted Average Price) orders to minimize market impact:
  • Liquidation is split into slices executed over time
  • Each slice has a size_increment controlling how much is liquidated per window
  • Orders include standard book order properties (timestamp, size, reduce-only)
  • Liquidation processing runs as a periodic background task
This TWAP approach is particularly important for large positions where an immediate market dump would cause excessive slippage and cascading liquidations.

Liquidation Execution

Liquidation processing runs as a periodic background task in the execution pipeline, alongside funding rate updates and HIP-3 oracle refreshes. The fixed execution sequence is:
update_funding_rates → refresh_hip3 → apply_bole_liquidations
This ordering ensures that funding rate changes (which affect margin levels) are applied before liquidation checks run. System-initiated liquidation actions handle interest accrual and automatic liquidation triggers independently of user actions.

Integration with Portfolio Margin

BOLE positions are fully integrated with HyperLiquid’s portfolio margin system:
  • Borrow positions count toward portfolio margin utilization
  • tokenToPortfolioBorrowRatio tracks per-token borrow exposure within the portfolio
  • portfolioMarginRatio provides the aggregate margin ratio including BOLE positions
  • Portfolio margin users can use supplied tokens as collateral for perpetual positions
This integration means a single account can simultaneously supply tokens for yield, borrow other tokens, and trade perpetuals, all under a unified margin framework.

EVM Bridge Integration

BOLE positions can be bridged to the HyperEVM (chain 998):
FieldDescription
evmMintedSupplyTotal BOLE tokens minted on the EVM side
dailyAmountOwedDaily interest denominated in wei
evmEscrowsEscrow amounts held during bridging
This enables DeFi composability on the EVM side while the lending logic remains on the L1.

Governance Controls

BOLE pool parameters are controlled through six SetBole governance actions:
Governance ActionFieldsPurpose
SetBole::Reserve9Set reserve-level parameters (rate curves, caps, LTV limits)
SetBole::Adl2Configure auto-deleveraging
SetBole::BackstopLiquidatorTokenParams4Per-token backstop liquidator settings
SetBole::ResetIndex2Reset reserve accumulator index for a token
SetBole::RateLimit7Rate limiting for BOLE operations
SetBole::TestnetAction2Testnet-only actions
Additionally, validators can set reserve accumulators directly via VoteGlobalAction::SetReserveAccumulator and configure backstop parameters for HIP-3 tokens separately.

Account Abstraction

BOLE activation is part of HyperLiquid’s unified account system. When a user activates a unified account, their BOLE token positions are migrated automatically. The migration handles multiple source types:
  • Sub-account positions
  • DEX positions
  • Spot positions
This ensures users do not need to manually close and reopen lending positions when upgrading their account structure.

Funding Rate Connection

BOLE interest rates feed directly into perpetual funding rates:
ParameterDescription
assetToFundingInterestRatePer-asset funding interest rate derived from BOLE
perpAddBaseRatePerp add-side base rate
perpCrossBaseRatePerp cross-margin base rate
spotAddBaseRateSpot add-side base rate
spotCrossBaseRateSpot cross-margin base rate
This creates a unified interest rate framework where lending rates and perpetual funding rates are economically linked, preventing arbitrage between the two systems.

Querying BOLE State

import requests

API = "https://api.hyperliquid.xyz/info"

# All reserve states
resp = requests.post(API, json={"type": "allBorrowLendReserveStates"})
reserves = resp.json()

for reserve in reserves:
    print(f"{reserve['token']}: "
          f"utilization={reserve['utilization']}, "
          f"supply_apy={reserve['supplyYearlyRate']}, "
          f"borrow_apr={reserve['borrowYearlyRate']}")

# Single user state
resp = requests.post(API, json={
    "type": "borrowLendUserState",
    "user": "0x..."
})
positions = resp.json()
BOLE is actively evolving. Reserve parameters, rate curves, and liquidation thresholds can change through governance votes at any time. Always query current state before making assumptions about rates or limits.