One row per deposit into a lending market. amount is the tokens supplied, and summing it per user_address replays a position.
Columns
| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | Time of the block containing the deposit. Partition column. |
block_number | INT64 | Number of the block containing the deposit. |
transaction_hash | STRING | Hash of the transaction that emitted the deposit event. |
log_index | INT64 | Position of the deposit event in the block. |
unique_id | INT64 | Row key: fingerprint of chain_id, block_number, transaction_hash, log_index. |
event_type | STRING | Constant deposits; stacking key across the lending facts. |
project_id | STRING | Protocol operating the market, such as aave. |
app_id | STRING | Deployment of the protocol the market belongs to. |
chain_id | STRING | Chain the deposit happened on. |
lending_market_id | STRING | Market the deposit entered; joins dimensions.lending_markets. |
lending_market_reserve_id | STRING | Reserve within the market; joins dimensions.lending_market_reserves. |
lending_market_contract_address | STRING | Contract the market lives on; not a key. |
receipt_token_address | STRING | Receipt token whose balance moved (the aToken for Aave); null where positions are not tokenised. |
token_id | STRING | Token deposited: {token_address}-{chain_id}. |
token_address | STRING | Contract address of the token deposited. |
token_symbol | STRING | Symbol of the token deposited. |
token_decimals | INT64 | Decimals of the token deposited. |
depositor_address | STRING | Account that acted: the supplier, or the sender on a receipt-token transfer. |
user_address | STRING | Account whose supplied balance rose; the position key across the lending facts. |
shares_raw | BIGNUMERIC | Movement in the protocol’s interest-bearing unit, exact integer; summing per position replays the share balance. |
shares | BIGNUMERIC | shares_raw decimal-corrected. |
amount_raw | BIGNUMERIC | Event-time amount in the token’s stored unit, exact integer. |
amount | BIGNUMERIC | amount_raw decimal-corrected into whole tokens. |
Sample queries
This table is large and split by day. Bound block_timestamp and filter chain_id on every query, or you read the whole table and the whole table is billed to you.
One day, one app
Daily deposits per app
Net supply for one user
amount is whole tokens and amount_raw the integer the contract emitted. user_address is whose supplied balance rose, and the account to group a position by.Group by token_symbol as well as app: amount is in each token’s own units, so one sum per token is the comparable figure. Deposits are the increase and Withdrawals the decrease, so sign each side and sum. event_type is a constant on every lending fact, which keeps track of the source table across a wider union all.