Skip to main content

genesis_pool_participant_balances_for_company

Schema: lib_lending

Description

This function allows getting a view into the lending genesis pools for a given company. It allows you to retrieve the amount each participant has supplied to each genesis pool the company has.

In case the term "genesis pool" is unfamiliar; in the lending domain, genesis pools are created to seed liquidity ahead of the full protocol launch. This ensure efficient initial launch capital and raises awareness of the project.

Usage

Signature

lib_lending.genesis_pool_participant_balances_for_company(company text, include_zero_balances boolean)

Parameters

NameTypeDescription
companytextThe name of the company for which you want to retrieve participant balances
include_zero_balancesboolean(Optional) Set to true if you want to include zero balances in the results. Defaults to false.

Results

This function returns a table with the following columns:

ColumnTypeDescription
contracttextThe contract address of the genesis pool itself
lending_pool_contracttextThe contract address of the lending pool associated with the genesis pool
symboltextThe symbol of the lending pool token associated with the genesis pool
participanttextThe address of the participant
raw_lp_supply_amountnumericThe raw (fixed-point) amount of lending pool token that the participant supplied to the genesis pool
lp_supply_amountnumericThe decimal-applied amount of lending pool token that the participant supplied to the genesis pool
underlying_supply_amountnumericThe decimal-applied amount of underlying token that the participant supplied to the genesis pool. This is simply a conversion of the LP amount back to underlying using the current conversion rate
usd_supply_amountnumericThe supply amount of the underlying token, converted to USD using the latest price.

Examples

Retrieve genesis pool participant balances for company "ABC"
select * from lib_lending.genesis_pool_participant_balances_for_company('ABC', false);
Retrieve participant balances for company "XYZ" including zero balances
select * from lib_lending.genesis_pool_participant_balances_for_company('XYZ', include_zero_balances=>true);