Skip to content

Lending Markets

The optimism.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.
__last_modified timestamp The date at which this row was last updated (in ISO-8601 format).

Supported Protocols

Protocol
VMEX-v1 aave-v3 abracadabra-v1

Indexes

Index
protocol_name, contract_version, created_block_number
protocol_name, contract_version, created_timestamp
protocol_name, created_timestamp
protocol_name, created_block_number
comptroller_address, created_timestamp, market_address
created_block_number, market_address
created_timestamp, market_address
__last_modified
__indexer_id WHERE __confirmed = false
__indexer_id, __block_number
deposit_token_address, market_address

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.