Skip to main content

lending_pool_metadata_for_company

Schema: lib_lending

Description

This function is used to retrieve common lending pool metadata for all lending pool contracts tied to a specific company. It returns an easier-to-use subset of the data returned by lib.address_metadata_for_company.

Usage

Signature

lib_lending.lending_pool_metadata_for_company(company text)

Parameters

NameTypeDescription
companytextThe name of the company to retrieve lending pool metadata for.

Results

The function returns a table with the following columns:

NameTypeDescription
accounttextThe address of the lending pool contract.
aliastextAn alias (display name) for the lending pool contract.
symboltextThe symbol for the lending pool token (e.g. the cToken in Compound forks)
decimalsintThe number of decimals used by the LP token for the lending pool
underlying_token_addresstextThe address of the underlying lent/borrowed token
underlying_token_symboltextThe symbol of the underlying lent/borrowed token
underlying_token_decimalstextThe number of decimals used by the underlying lent/borrowed token

Examples

Get lending pool metadata for company "ABC Corp"
select * from lib_lending.lending_pool_metadata_for_company('ABC Corp');