Coverage
The lending tables currently include the following protocols:| Project | Protocol | Description |
|---|---|---|
| kamino | klend | Lending protocol |
Tables Overview
1. solana.defi.lending
Contains configuration information for lending vaults across supported protocols.2. solana.defi.lending_tvl
Records all instruction-level changes in TVL, with each change tagged by action type (deposit, withdraw, borrow, etc.).3. solana.defi.lending_tvl_daily
Provides daily aggregated TVL metrics for convenient analysis at daily granularity.solana.defi.lending
This table contains configuration information for lending vaults across supported protocols.Table Columns
| Column Name | Description | Type | Example |
|---|---|---|---|
| project | The lending project name | varchar(8) | kamino |
| protocol | The protocol identifier | varchar(5) | kamino |
| lending_id | Unique identifier for the lending vault | varchar | 6WEGfej9B9wjxRs6t4BYpb9iCXd8CpTpJ8fVSNzHCC5y |
| lending_reserve_id | Identifier for the lending reserve | varchar | Atj6UREVWa7WxbF2EMKNyfmYUY1U1txughe2gjhcPDCo |
| mint | Token mint address for the lending asset | varchar | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| liquidity_vault | Address of the vault holding deposited liquidity | varchar | BBcwMNSMyhhBnYE9pevEvkxKHGzTafMP9v3j7Kk7nAWM |
| collateral_mint | Mint address of the collateral token | varchar | 6M89FWrQaqcy3domy85J1a1wVMnviL86WeUqbqTXf1qb |
| collateral_liquidity_vault | Address of the collateral liquidity vault | varchar | 25x4aEFoJE3bk4sdNLgHrrmchyop1JvcmGA4ccA6tWWT |
| insurance_vault | Address of the insurance vault for risk mitigation | varchar | 5uJJWrBEz4J1qQcHyqUkGLcVVaD7iRJfNqXXaKXoD9Gv |
| fee_vault | Address of the vault collecting protocol fees | varchar | HH7GLnRcGHJrdkEueVVj7mccNUjnSeWobDmtu9cHLkJV |
| name | Token name of the lending asset | varchar | USD Coin |
| symbol | Token symbol for the lending vault | varchar | USDC |
| decimals | Number of decimal places for the token | number | 6 |
| unique_id | Unique identifier combining key fields | varchar | lending_id-6W…5y_lending_reserve_id-At…Co_mint-EP…1v |
solana.defi.lending_tvl
This table records every transaction that changes the TVL of lending vaults. Each record represents an instruction that moves assets in or out of a lending vault, with the action type indicating the nature of the transaction.Action Types
Theaction column categorizes the type of transaction causing the TVL change:
- deposit: User deposits assets into the lending vault
- withdraw: User withdraws assets from the lending vault
- borrow: User borrows assets from the lending vault
- repay: User repays borrowed assets
- borrow_fee: Fee charged on borrowing activity
- flash_borrow: Borrow during a flashloan
- flash_repay: Repayment at the end of a flashloan
- flash_repay_fee: Fee charged in a flashloan
- liquidate_repay: Repayment during liquidation process
- liquidate_withdraw: Withdrawal of collateral during liquidation
- liquidate_fee: Fee charged during liquidation
Table Columns
| Column Name | Description | Type | Example |
|---|---|---|---|
| project | The lending project name | varchar(8) | kamino |
| protocol | The protocol identifier | varchar(5) | klend |
| lending_id | Unique identifier for the lending vault | varchar | 6WEGfej9B9wjxRs6t4BYpb9iCXd8CpTpJ8fVSNzHCC5y |
| lending_reserve_id | Identifier for the lending reserve | varchar | Atj6UREVWa7WxbF2EMKNyfmYUY1U1txughe2gjhcPDCo |
| from_address | Address initiating the transaction | varchar(44) | 6QbtpY2jDNcncRFmVf343NThnCdaY8gCAsYATPnYQR9g |
| token_acc_from | Token account of the sender | varchar(44) | BBcwMNSMyhhBnYE9pevEvkxKHGzTafMP9v3j7Kk7nAWM |
| to_address | Recipient address of the transaction | varchar(44) | 4TtFSyjd3K7puypp5mocHV3hZfFNY9phULg8s8wRXJHR |
| token_acc_to | Token account of the recipient | varchar(44) | 94Zf7U6DuvqQBAAT3SJDhJaYJMqghHHAzeFCyFHaUkQs |
| mint | Token mint address involved in the transaction | varchar(44) | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| raw_amount | Raw amount of tokens transferred (before decimal adjustment) | varchar | 1000000 |
| signer | Transaction signer address | varchar(44) | 4TtFSyjd3K7puypp5mocHV3hZfFNY9phULg8s8wRXJHR |
| block_slot | Slot number of the block containing the transaction | number | 349180297 |
| block_height | Height of the block in the blockchain | number | 327383125 |
| block_timestamp | Timestamp when the block was confirmed | timestamp_ntz | 2025-06-25 20:46:10.000 |
| block_hash | Hash of the block containing the transaction | varchar(44) | 4vULVdc3nWwcQv4LsRhfZ5Z3BNY4oDKccQEpgu2BWPRa |
| txn_id | Transaction identifier | varchar(88) | 2Hpxnx8wkbGpRvBgHqiUSuE4ukrEN75qHzSKr2MoQujeYavgrKiXXaffVPr66qZTngQSMMoXRsUdNJ5QzHUf8qsV |
| txn_index | Index of the transaction within the block | number | 1164 |
| instruction_index | Index of the instruction within the transaction | number | 8 |
| inner_instruction_index | Index of inner instruction, if applicable | number | 1 |
| pseudo_instruction_order | Combined order of instruction + innerinstruction within the txn | number | 9000002 |
| action | Type of action causing TVL change | varchar | withdraw |
| liquidity_vault | Address of the liquidity vault involved | varchar | BBcwMNSMyhhBnYE9pevEvkxKHGzTafMP9v3j7Kk7nAWM |
| unique_id | Unique identifier for the record | varchar | txn_id-2Hpxnx8wkbGpRvBgHqiUSuE4ukrEN75qHzSKr2MoQujeYavgrKiXXaffVPr66qZTngQSMMoXRsUdNJ5QzHUf8qsV_i_index-8_ii_index-1 |
| name | Token name of the lending asset | varchar | USD Coin |
| symbol | Token symbol for the lending vault | varchar | USDC |
| decimals | Number of decimal places for the token | number | 6 |
| amount | Amount of tokens transferred (adjusted for decimals) | float | 1.0 |
| usd_amount | Equivalent USD value of the transferred amount | float | 1.00 |
solana.defi.lending_tvl_daily
This table provides daily aggregated TVL metrics, offering convenient access to lending vault performance at daily granularity. The metrics are calculated by aggregating transaction-level data from thesolana.defi.lending_tvl table.
Key Metrics Explained
- NET_DEPOSITS: The net flow of assets into the lending vault on a given date. Calculated as total deposits minus total withdrawals for that day.
- UNPAID_LOANS: The net change in unpaid loans on a given date. Calculated as borrows minus repayments for that day.
Table Columns
| Column Name | Description | Type | Example |
|---|---|---|---|
| date | Date of the recorded TVL metrics | timestamp_ntz | 2024-01-30 00:00:00+00:00 |
| project | The lending project name | varchar(8) | kamino |
| protocol | The protocol identifier | varchar(5) | klend |
| lending_id | Unique identifier for the lending vault | varchar | 6WEGfej9B9wjxRs6t4BYpb9iCXd8CpTpJ8fVSNzHCC5y |
| lending_reserve_id | Identifier for the lending reserve | varchar | Atj6UREVWa7WxbF2EMKNyfmYUY1U1txughe2gjhcPDCo |
| mint | Token mint address for the lending asset | varchar(44) | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| net_deposits | Net amount of tokens deposited (deposits - withdrawals) | float | 150000.50 |
| unpaid_loans | Total outstanding loans not yet repaid | float | 75000.25 |
| usd_net_deposits | USD equivalent of net deposits | float | 150000.50 |
| usd_unpaid_loans | USD equivalent of unpaid loans | float | 75000.25 |
| token_symbol | Symbol of the token associated with the lending vault | varchar | USDC |