Skip to main content

compound_compatible_lending_pool_risk_parameters_for_company

Schema: lib_risk_models

Description

This function returns Compound-compatible lending pool risk parameters for the given company. Optionally, provide the parameter_name to only return values for the matching risk parameter.

The term "Compound-compatible lending pool risk parameters" refers to parameters that need to be set to run a lending protocol based on the contracts used by Compound. These parameters include:

  • collateralFactor: This is like a loan-to-value (LTV) ratio. It tells you the maximum percentage of a deposited asset you can borrow against. For example, if the collateral factor for ETH is 75%, you can borrow up to $75 worth of another asset for every $100 of ETH you deposit.
  • reserveFactor: This is a fee on borrowing. It's a percentage of the interest paid by borrowers that gets taken out and put into the pool's reserves. This reserve acts like a safety net for the pool in case of loan defaults or unexpected events.
  • borrowCap: This is an optional limit set on how much of a particular asset can be borrowed in total. It helps the pool manage risk by preventing excessive borrowing of a single asset. A borrow cap ensure that not too much of an asset is borrowed so that there is liquidity if any of the lenders wanted to pull out of the pool

Usage

Signature

lib_risk_models.compound_compatible_lending_pool_risk_parameters_for_company(
company text,
risk_parameter_name text
)

Parameters

NameTypeDescription
companytextFilter to only risk parameters for the specified company (e.g. Hover)
risk_parameter_nametext(Optional) Filter to a specific risk parameter (e.g. collateralFactor)

Results

This function returns a table with the following columns:

Column NameTypeDescription
idintegerThe unique identifier for the risk parameter
data_timetimestamptzThe timestamp of the latest lending data used to generate the parameter
chaintextThe blockchain associated with the risk parameter
parameter_nametextThe name of the risk parameter
protocoltextThe protocol associated with the risk parameter
underlying_contracttextThe address of the underlying contract
lending_pool_contracttextThe address of the lending pool contract
valnumericThe value of the risk parameter
safe_rangenumericThe safe range for the risk parameter
updated_timetimestamptzThe timestamp for when the risk parameter was last updated
lending_pool_symboltextThe symbol of the lending pool
underlying_symboltextThe symbol of the underlying asset
is_syntheticbooleanIndicates if the risk parameter is for a synthetic asset

Examples

Get all risk parameters for a specific company
select * from lib_risk_models.compound_compatible_lending_pool_risk_parameters_for_company('company_name');
Get collateral factor for a specific company
select * from lib_risk_models.compound_compatible_lending_pool_risk_parameters_for_company('company_name', 'collateralFactor');