Skip to main content
In progress. This table is not served yet. The page documents it as it lands.
facts.lending_market_deposits combines the deposit events of every lending protocol we decode into one table: one row per deposit of a token into a lending market. A deposit supplies tokens to earn interest or to post collateral for borrowing. lending_market_id keys each row to its market in the Registry.

Columns

ColumnTypeDescription
block_timestampTIMESTAMPTime of the block containing the deposit. Partition column.
block_numberINT64Number of the block containing the deposit.
transaction_hashSTRINGHash of the transaction that emitted the deposit event.
log_indexINT64Position of the deposit event in the block.
unique_idINT64Row key: fingerprint of chain_id, block_number, transaction_hash, log_index.
chain_idSTRINGChain the deposit happened on.
lending_market_idSTRINGMarket the deposit entered; joins dimensions.lending_markets.
project_idSTRINGProtocol operating the market, such as aave.
token_idSTRINGToken deposited: {token_address}-{chain_id}.
token_addressSTRINGContract address of the token deposited.
depositor_addressSTRINGAccount the protocol’s event names as the supplier.
on_behalf_of_addressSTRINGAccount credited with the deposit position, when deposited for another account.
amount_rawSTRINGRaw amount as text; a uint256 exceeds every BigQuery number type.

Sample queries

The table is partitioned on block_timestamp. Bound that column in every query; without a bound the query reads the whole table.
Read one market’s deposits on a single day. Cast amount_raw to BIGNUMERIC and divide by 10^decimals from dimensions.tokens to get the token amount.