Skip to content

Lending Markets

The polygon.lending_markets table provides indexed views for all lending markets available.

Columns

Name Type Description
borrow_token_address text The address of the token to borrow from the market, may be the same as the deposit token for some protocols (e.g. Aave).
comptroller_address text The address of the protocol's comptroller (similar to a factory/config address).
contract_version text The version of the protocol market address.
created_block_number integer The block number the market address was created at.
created_timestamp timestamp without time zone The timestamp the market address was created at.
creator_address text The creator of the market.
deposit_token_address text The address of the token to deposit into the market.
is_active boolean Whether the market is active or not.
liquidation_threshold numeric The liquidation threshold for the market (null if not a static value, e.g. crvUSD LLAMMA).
ltv numeric The loan-to-value ratio for the market (null if not a static value, e.g. crvUSD LLAMMA).
market_address text The address that holds the liquidity for the market.
metadata jsonb The metadata for the market.
price_oracle_address text The price oracle for the market's token_address.
protocol_name text The name of the protocol the market address belongs to.
__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
deposit_token_address, market_address
__indexer_id, __block_number
__indexer_id WHERE __confirmed = false
created_timestamp, market_address
created_block_number, market_address
comptroller_address, created_timestamp, market_address
protocol_name, created_block_number
protocol_name, created_timestamp
protocol_name, contract_version, created_timestamp
protocol_name, contract_version, created_block_number

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.