solana.lending.metrics_daily table contains daily aggregated metrics for Solana lending platforms, grouped by project and protocol.
This table combines market-state balance-sheet metrics (from markets_daily and tvl_daily) with gross event-flow metrics (from deposits, withdrawals, loans, repayments, and liquidations) into a single per-protocol, per-day row.
Table Details
| Property | Value |
|---|---|
| Table Name | solana.lending.metrics_daily |
| Table Status | Production-Ready |
| Unique Key | date, project, protocol |
| Clustering Key(s) | date |
Table Columns
| Column Name | Data Type | Description |
|---|---|---|
| date | TIMESTAMP_NTZ(9) | Calendar date (UTC) this record represents. |
| project | VARCHAR(16777216) | Business name of the protocol being used (e.g. kamino, marginfi, jupiter, save). |
| protocol | VARCHAR(16777216) | Specific version or variant of the protocol (e.g. klend, marginfi, juplend, save). |
| outstanding_loans_usd | FLOAT | Total USD value of loans currently outstanding, summed across the protocol’s markets. Null when the protocol has no markets_daily coverage. |
| available_liquidity_usd | FLOAT | Total USD value of assets available to borrow, summed across the protocol’s markets. Null when the protocol has no markets_daily coverage. |
| supplied_amount_usd | FLOAT | Total USD value of assets supplied, summed across the protocol’s markets. Null when the protocol has no markets_daily coverage. |
| usd_balance | FLOAT | Total USD value of assets held in the protocol’s TVL vaults, from tvl_daily. |
| has_market_state | BOOLEAN | True when the protocol/chain has market-state coverage, i.e. outstanding_loans_usd / supplied_amount_usd are populated from protocol market state. When false, only TVL and event-derived flow metrics are available. Filter to has_market_state = true before summing balance-sheet metrics across protocols. |
| net_deposit_flow_usd | FLOAT | Net USD value of liquidity supplied over the day: gross deposits minus gross withdrawals. Null when neither deposits nor withdrawals are covered for the protocol on that day. |
| net_borrow_flow_usd | FLOAT | Net USD value of debt originated over the day: gross borrows minus gross repayments. Excludes interest accrual. Null when neither borrows nor repayments are covered for the protocol on that day. |
| total_volume_usd | FLOAT | Total USD volume across all event types (deposits, withdrawals, loans, repayments, liquidations) on this day. |
| avg_volume_usd | FLOAT | Average USD size of an individual lending event on this day. |
| total_transactions | NUMBER(38,0) | Count of distinct transactions across all lending event types on this day. |
| active_users | NUMBER(38,0) | Count of distinct signers across all lending event types on this day. |
| deposit_volume_usd | FLOAT | Total deposit volume in USD for the day. |
| deposit_avg_usd | FLOAT | Average deposit size in USD. |
| depositor_count | NUMBER(38,0) | Count of unique depositors. |
| deposit_tx_count | NUMBER(38,0) | Total number of deposit transactions. |
| withdrawal_volume_usd | FLOAT | Total withdrawal volume in USD for the day. |
| withdrawal_avg_usd | FLOAT | Average withdrawal size in USD. |
| withdrawer_count | NUMBER(38,0) | Count of unique withdrawers. |
| withdrawal_tx_count | NUMBER(38,0) | Total number of withdrawal transactions. |
| loan_volume_usd | FLOAT | Total loan (borrow) volume in USD for the day. |
| loan_avg_usd | FLOAT | Average loan size in USD. |
| borrower_count | NUMBER(38,0) | Count of unique borrowers. |
| loan_tx_count | NUMBER(38,0) | Total number of loan transactions. |
| repayment_volume_usd | FLOAT | Total repayment volume in USD for the day. |
| repayment_avg_usd | FLOAT | Average repayment size in USD. |
| borrower_repaying_count | NUMBER(38,0) | Count of unique borrowers making repayments. |
| repayment_tx_count | NUMBER(38,0) | Total number of repayment transactions. |
| liquidation_volume_usd | FLOAT | Total liquidation (collateral seized) volume in USD for the day. |
| liquidation_avg_usd | FLOAT | Average liquidation size in USD. |
| borrower_liquidated_count | NUMBER(38,0) | Count of unique borrowers who were liquidated. |
| liquidation_tx_count | NUMBER(38,0) | Total number of liquidation transactions. |
| unique_id | VARCHAR(16777216) | Allium’s deterministic unique identifier for this row. |
| _created_at | TIMESTAMP_NTZ(9) | Timestamp (UTC) when this row was first written to the Allium platform. |
| _updated_at | TIMESTAMP_NTZ(9) | Timestamp (UTC) of the most recent update to this row. |
Sample Query
- Protocol Daily Metrics
- Total Lending TVL
Get daily metrics for Kamino:
select
date,
project,
protocol,
supplied_amount_usd,
outstanding_loans_usd,
total_volume_usd,
active_users
from solana.lending.metrics_daily
where project = 'kamino'
order by date desc
Sum supplied amount across all protocols with market-state coverage on a specific date:
select
date,
sum(supplied_amount_usd) as total_supplied_usd,
sum(outstanding_loans_usd) as total_outstanding_loans_usd
from solana.lending.metrics_daily
where date = '2026-08-01' and has_market_state = true
group by date