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
Name | Type | Description |
---|---|---|
company | text | The name of the company for which you want to retrieve participant balances |
include_zero_balances | boolean | (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:
Column | Type | Description |
---|---|---|
contract | text | The contract address of the genesis pool itself |
lending_pool_contract | text | The contract address of the lending pool associated with the genesis pool |
symbol | text | The symbol of the lending pool token associated with the genesis pool |
participant | text | The address of the participant |
raw_lp_supply_amount | numeric | The raw (fixed-point) amount of lending pool token that the participant supplied to the genesis pool |
lp_supply_amount | numeric | The decimal-applied amount of lending pool token that the participant supplied to the genesis pool |
underlying_supply_amount | numeric | The 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_amount | numeric | The 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);