Skip to main content
Schema: hypercore.core Table: fact_ledger_events Type: View

What

On-chain ledger actions including deposits, withdrawals, internal transfers, vault operations, spot transfers, and sub-account transfers. Each row represents a single ledger event extracted from L1 misc_events blocks.

Key Use Cases

  • Tracking deposit and withdrawal flows to/from the exchange
  • Analyzing internal transfer patterns between accounts
  • Monitoring vault deposit/withdrawal activity and commissions
  • Understanding spot token transfer activity
  • Measuring cross-chain bridge usage via source/destination DEX fields

Important Relationships

  • Derived from silver__ledger_events which parses silver__misc_events
  • Can be joined to core__fact_trades via user_address for trader flow analysis
  • Vault events link to core__fact_vault_snapshots via vault_address

Commonly-used Fields

  • event_type: Type of ledger event (deposit, withdrawal, internal_transfer, spot_transfer, etc.)
  • user_address: Primary user address
  • amount / usdc_value: Transfer amount and USD value
  • is_deposit: Boolean for deposit events
  • tx_hash: L1 transaction hash
  • fee / fee_token: Fee details

Sample queries

-- Deposit and withdrawal flow analysis (last 30 days)
SELECT
    block_timestamp::DATE AS dt,
    event_type,
    COUNT(*) AS events,
    ROUND(SUM(usdc_value), 0) AS total_usd
FROM hypercore.core.fact_ledger_events
WHERE event_type IN ('deposit', 'withdraw')
    AND block_timestamp >= DATEADD('day', -30, CURRENT_DATE)
GROUP BY 1, 2
ORDER BY 1, 2;

Columns

Column NameData TypeDescription
BLOCK_NUMBERNUMBERL1 block number containing this event.
BLOCK_TIMESTAMPTIMESTAMP_NTZBlock production timestamp on the Hyperliquid L1. This is the canonical time for ordering blockchain events.
EVENT_TIMESTAMPTIMESTAMP_NTZExact timestamp of the event from the L1, extracted from the event payload.
TX_HASHTEXTL1 transaction hash uniquely identifying the on-chain transaction.
EVENT_INDEXNUMBERPosition of this event within the block’s event array, used for ordering.
EVENT_TYPETEXTType of event: delegation, staking_deposit, staking_withdrawal, deposit, withdrawal, internal_transfer, spot_transfer, etc.
USER_ADDRESSTEXTHyperCore address of the primary user involved in this event.
DESTINATION_ADDRESSTEXTDestination address for transfer and withdrawal events.
VAULT_ADDRESSTEXTAddress of the vault for vault-related ledger events.
TOKENTEXTToken identifier for ledger events (e.g. USDC, HYPE).
AMOUNTFLOATNumeric amount for the event (HYPE for staking, USDC for ledger events, etc.).
USDC_VALUEFLOATUSDC-equivalent value of the ledger event amount.
FEEFLOATFee charged for the event.
NATIVE_TOKEN_FEEFLOATFee paid in native HYPE token.
FEE_TOKENTEXTToken in which trading fees are denominated.
NONCENUMBERTransaction nonce for uniqueness.
REQUESTED_USDFLOATThe USD value requested in the ledger operation.
COMMISSIONFLOATCommission amount charged on the operation.
CLOSING_COSTFLOATThe closing cost associated with the position.
BASISFLOATThe cost basis amount for the position.
NET_WITHDRAWN_USDFLOATThe net USD amount withdrawn after fees.
IS_DEPOSITBOOLEANBoolean indicating whether this ledger event is a deposit.
SOURCE_DEXTEXTSource exchange or chain for cross-chain transfers.
DESTINATION_DEXTEXTDestination exchange or chain for cross-chain transfers.
TO_PERPBOOLEANBoolean indicating whether the transfer is to a perpetual margin account.
INSERTED_TIMESTAMPTIMESTAMP_NTZTimestamp when the record was inserted into this table (Snowflake SYSDATE).
MODIFIED_TIMESTAMPTIMESTAMP_NTZTimestamp when the record was last modified in this table (Snowflake SYSDATE).
FACT_LEDGER_EVENTS_IDTEXTSurrogate key generated from block_number, tx_hash, and event_index
_INVOCATION_IDTEXTdbt invocation identifier for tracking which run produced this record.