Lending Events
The polygon.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. |
Supported Protocols
Protocol | |||
---|---|---|---|
aave-v2 | aave-v3 | centes-v1 | fiat-v1 |
glacier-v1 | halo-matic | mahalend-v1 | matic-arc |
matic-v1 | mono-v1 | polygon-v1 | polylend-v1 |
roe-v1 | roe-wmatic-usdc | thetanuts-matic | thetanuts-v1 |
uwu-v1 | xave-matic |
Indexes
Index |
---|
account_address, market_address, token_address, timestamp, log_index |
protocol_name, timestamp, log_index |
protocol_name, contract_version, timestamp, log_index |
market_address, token_address, block_number, log_index |
__indexer_id, __block_number |
__indexer_id WHERE __confirmed = false |
transaction_hash, log_index |
timestamp, log_index |
market_address, token_address, timestamp, 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.