Lending Events
The ethereum.lending_events table provides indexed views for lending events based on 5 categories: deposit, borrow, repay, withdraw, and liquidation.
Columns
| Name | Type | Description |
|---|---|---|
| account_address | text |
The address that owns the lending position. |
| block_number | integer |
The block number of the lending event. |
| category | text |
The category of the lending event (deposit, withdraw, borrow, repay and liquidate). |
| contract_version | text |
The version of the protocol market address. |
| liquidated_token_address | text |
The borrowed token address that was repaid in a liquidation event. |
| liquidator_address | text |
The address that liquidates the loan if the event is a liquidation. |
| log_index | integer |
The log index of the lending event. |
| market_address | text |
The address of the lending market contract. |
| metadata | jsonb |
The metadata of the lending event. |
| protocol_name | text |
The name of the protocol that facilitated the lending event. |
| quantity | numeric |
The quantity of the token in the event (i.e. borrow events -> quantity borrowed, liquidation events -> collateral quantity liquidated). |
| quantity_liquidated | numeric |
The quantity of the borrowed token repaid in a liquidation event. |
| sender_address | text |
The address that sent the transaction. |
| timestamp | timestamp without time zone |
The timestamp of the lending event. |
| token_address | text |
The address of the token used in the lending event. |
| token_id | bigint |
The NFT token id if the token_address in the lending event is an NFT. |
| transaction_hash | text |
The transaction hash of the lending event. |
| __block_number | integer |
The block number at which the event took place in. |
| __confirmed | boolean |
Flag indicating whether the transfer has been confirmed. |
| __last_modified | timestamp |
The date at which this row was last updated (in ISO-8601 format). |
Supported Protocols
| Protocol | |||
|---|---|---|---|
| aave-amm | aave-arc | aave-rwa | aave-v1 |
| aave-v2 | aave-v3 | abracadabra-v4 | compound-v2 |
| compound-v3 | cream-v1 | curve-v1 | euler-v1 |
| liquity-v1 | makerdao-v1 | silo-v1 | silo-v3 |
| strike-v1 |
Indexes
| Index |
|---|
| transaction_hash, log_index |
| timestamp, log_index |
| protocol_name, timestamp, log_index |
| protocol_name, contract_version, timestamp, log_index |
| market_address, token_address, timestamp, log_index |
| account_address, market_address, token_address, timestamp, log_index |
| __last_modified |
| __indexer_id, __block_number |
| __indexer_id WHERE __confirmed = false |
| market_address, token_address, block_number, log_index |
Got questions? Join our Discord
Discord is the primary home of the Transpose developer community. Join us to ask questions, share your work, and get help.