Skip to main content
In progress. This table is not served yet. The page documents it as it lands.
facts.lending_market_withdrawals combines the withdrawal events of every lending protocol we decode into one table: one row per withdrawal of a token from a lending market. A withdrawal takes deposited tokens back out of the market. lending_market_id keys each row to its market in the Registry.

Columns

ColumnTypeDescription
block_timestampTIMESTAMPTime of the block containing the withdrawal. Partition column.
block_numberINT64Number of the block containing the withdrawal.
transaction_hashSTRINGHash of the transaction that emitted the withdrawal event.
log_indexINT64Position of the withdrawal event in the block.
unique_idINT64Row key: fingerprint of chain_id, block_number, transaction_hash, log_index.
chain_idSTRINGChain the withdrawal happened on.
lending_market_idSTRINGMarket the withdrawal left; joins dimensions.lending_markets.
project_idSTRINGProtocol operating the market, such as aave.
token_idSTRINGToken withdrawn: {token_address}-{chain_id}.
token_addressSTRINGContract address of the token withdrawn.
withdrawer_addressSTRINGAccount the protocol’s event names as the withdrawer.
to_addressSTRINGAccount the tokens were sent to.
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 withdrawals on a single day. Cast amount_raw to BIGNUMERIC and divide by 10^decimals from dimensions.tokens to get the token amount.