Collateral types
Use the 'mcd:cdpType'
service to look up parameters for different collateral types in the system. In the code, this is called CdpTypeService.
Properties
cdpTypes
This is a list of collateral type instances, initialized during Maker.create
.
Instance methods
getCdpType()
Return the collateral type instance for the specified currency and/or ilk.
Collateral type instances
Properties
ilk
The name of the collateral type as a string, e.g. "ETH-A".
totalCollateral
The total amount of collateral locked in all vaults of this collateral type.
totalDebt
The total Dai debt drawn against all vaults of this collateral type.
debtCeiling
The debt ceiling for this collateral type.
liquidationRatio
Vaults of this type become unsafe (subject to liquidation) when their ratio between USD value of collateral and Dai drawn is less than or equal to this amount.
price
The USD price of this collateral type's token, using recent price feed data, as a currency ratio. (See "A note on caching" above).
liquidationPenalty
The penalty added to the Dai amount to be raised at auction when a vault is liquidated, as a percentage. e.g. if the penalty is 13%, this value will be BigNumber(0.13)
.
annualStabilityFee
The annual stability fee (risk premium) of the collateral type, not including the base rate, as a BigNumber. e.g. if the rate is 5%, this value will be BigNumber(0.05)
.
Caching
When a vault instance is created, its data is pre-fetched from the blockchain, allowing the properties below to be read synchronously. This data is cached in the instance. To refresh this data, do the following:
To refresh the data for all collateral type instances at once:
Last updated