Skip to main content
Important: solana.defi.lending, solana.defi.lending_tvl, and solana.defi.lending_tvl_daily will be removed on November 30, 2026. The replacement solana.lending.* tables are available now — migrate your queries before the cutover date.

Overview

Allium is replacing the legacy solana.defi.lending* tables with a new solana.lending.* schema. The new schema splits the monolithic lending_tvl event table (which used an ACTION column to distinguish event types) into dedicated per-action tables — deposits, withdrawals, loans, repayments, liquidations — for simpler querying and better performance. It also adds richer per-event fields and replaces the single daily TVL rollup with multiple purpose-specific aggregates.

Table mapping

Additional new tables with no legacy equivalent:

Schema changes

The legacy lending_tvl table used a single ACTION column (deposit / withdraw / borrow / repay / liquidate) to distinguish event types. The new tables split this into dedicated tables.Common columns across all new action tables (deposits, withdrawals, loans, repayments, liquidations):Party address columns differ by action type:Columns removed from legacy lending_tvl (no equivalent in new tables):
  • ACTION — replaced by the table name
  • FROM_ADDRESS, TOKEN_ACC_FROM, TO_ADDRESS, TOKEN_ACC_TO — replaced by role-specific address columns
  • RAW_AMOUNT — replaced by RAW_AMOUNT_STR
  • LENDING_ID, LENDING_RESERVE_ID — use PROGRAM_ID + EXTRA_FIELDS instead
  • LIQUIDITY_VAULT — use PROGRAM_ID from the markets_daily table
  • PSEUDO_GLOBAL_ORDER — removed
The new tvl_daily table covers per-market, per-token daily TVL. Key column changes:For daily flow aggregates (net deposit/borrow volume, USD TVL by action), use solana.lending.metrics_daily instead.
The old lending table was a static reserve/pool metadata list. The new markets_daily table is a daily snapshot of market state with richer fields.

What to do

  1. Replace solana.defi.lending_tvl queries: filter by action type and switch to the corresponding table (deposits, withdrawals, loans, repayments, liquidations). Remove the ACTION filter — it is now implicit in the table name.
  2. Replace solana.defi.lending_tvl_daily queries: use solana.lending.tvl_daily for per-market token balances. For flow aggregates (deposit volume, borrow volume, net TVL), use solana.lending.metrics_daily.
  3. Replace solana.defi.lending queries: use solana.lending.markets_daily for market/reserve state, scoped to a date.
  4. Update column references: see schema changes above for renamed and removed columns.
  5. Complete migration by November 30, 2026 — the solana.defi.lending* tables will be removed after this date.

Support

If this migration impacts your workflows, reach out to [email protected] or your account team.