In progress. This table is not served yet. The page documents it as it lands.
facts.lending_market_borrows combines the borrow events of every lending protocol we decode into one table: one row per borrow from a lending market. A borrow takes tokens out of the market against collateral posted elsewhere in the pool. lending_market_id keys each row to its market in the Registry.
Columns
| Column | Type | Description |
|---|---|---|
block_timestamp | TIMESTAMP | Time of the block containing the borrow. Partition column. |
block_number | INT64 | Number of the block containing the borrow. |
transaction_hash | STRING | Hash of the transaction that emitted the borrow event. |
log_index | INT64 | Position of the borrow event in the block. |
unique_id | INT64 | Row key: fingerprint of chain_id, block_number, transaction_hash, log_index. |
chain_id | STRING | Chain the borrow happened on. |
lending_market_id | STRING | Market the borrow left; joins dimensions.lending_markets. |
project_id | STRING | Protocol operating the market, such as aave. |
token_id | STRING | Token borrowed: {token_address}-{chain_id}. |
token_address | STRING | Contract address of the token borrowed. |
borrower_address | STRING | Account the protocolβs event names as the borrower. |
on_behalf_of_address | STRING | Account that carries the debt, when borrowed for another account. |
amount_raw | STRING | Raw amount as text; a uint256 exceeds every BigQuery number type. |
Sample queries
- One market, one day
- Daily USD volume
Read one marketβs borrows on a single day. Cast
amount_raw to BIGNUMERIC and divide by 10^decimals from dimensions.tokens to get the token amount.