CollateralFactor

Compound V2 Getter Plugin - CollateralFactor

Description

A cToken’s collateral factor can range from 0-90%, and represents the proportionate increase in liquidity (borrow limit) that an account receives by minting the cToken. Generally, large or liquid assets have high collateral factors, while small or illiquid assets have low collateral factors. If an asset has a 0% collateral factor, it can’t be used as collateral (or seized in liquidation), though it can still be borrowed.

Method

collateralFactor(address)

Input Parameters

No required input parameters

Method Parameters

NamePlugin TypeDescription

cToken

FctAddress

The address of the cToken to check if listed and get the collateral factor for.

Returned Values

NamePlugin TypeDescription

isListed

FctBoolean

Represents whether the comptroller recognizes this cToken

collateralFactor

FctBoolean

Is multiplied by a supply balance to determine how much value can be borrowed

isComped

FctBoolean

Indicates whether or not suppliers and borrowers are distributed COMP tokens.

Example

Example with initParams

const collateralFactor = new CompoundV2.getter.CollateralFactor({
   chainId: 1,
   initParams: {
     methodParams: {
       cToken: "0x...",
     }
   }
})

Example without initParams

const collateralFactor = new CompoundV2.getter.CollateralFactor({ chainId: 1 })

collateralFactor.input.set({
    methodParams: {
       cToken: "0x...",
    }
})

Learn more

Learn more about Compound V2 collateral factor method here

Last updated