const service = maker.service('mcd:cdpType');
service.cdpTypes.forEach(type => console.log(type.ilk));
// this will error if more than one type is defined for ETH
const type = service.getCdpType(ETH);
// disambiguate using the ilk name string:
const ethA = service.getCdpType(null, 'ETH-A');
The name of the collateral type as a string, e.g. "ETH-A".
The total amount of collateral locked in all vaults of this collateral type.
The total Dai debt drawn against all vaults of this collateral type.
The debt ceiling for this collateral type.
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.
console.log(type.price.toString()); // "9000.01 ETH/USD"
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
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: