CDPs

Collateralized Debt Position

This documentation is a work in progress!

A collateralized debt position (CDP) is a system introduced by MakerDAO team with their decentralized stablecoin DAI.

Generally speaking it is a overcollateralized lending contract where borrowers deposit collateral and borrow assets against the deposited collateral. The contract itself acts as a counterparty when borrowers open a debt position.

Borrowers using these CDP's cannot withdraw their collateral if it takes the CDP below the minimum collateralization ratio set in the contract.

CDPs Act As Cross Positions In Kopio project

One or more collaterals back each CDP and borrowers can take multiple debt positions on a single CDP. They effectively act as cross-margined positions with many-to-many collateralization as opposed to 1-to-1 positions also known as isolated margin.

CDP Example

Overcollateralization

In simple terms this means that for any amount of Kopio Asset to exist it must be backed by a Collateral Asset deposit of equal or greater value.

The protocol needs to stay solvent, avoiding scenario where any CDP has a Deposit Value less than its Debt Value. Protocol ensures this by only allows borrows up to a portion of the collateral provided, enforced by MCR, kFactor and cFactor. As asset valuations change over time, the final backstop for solvency is liquidations.

Collateral/Deposit Value

The quantity, price, and the asset's collateral factor are used to determine the deposit value (v) of an individual collateral deposit. Deposit value enables the protocol to properly weight different collaterals and calculate the total deposit value of the assets in real-time.

Given a user’s collateral a, oracle price PaP_a, quantity QaQ_a, and collateral factor CFaCF_a, the deposit value vav_a can be represented as follows:

va=QaPaCFav_a = Q_a*P_a*CF_a

Total Deposit Value

For multiple collaterals, the total deposit value (V) is calculated by adding the deposit values of all the individual assets deposited.

Given n collaterals, a user’s total deposit value V is calculated as follows:

V=i=invi=i=1nQiPiCFiV = \sum_{i=i}^n v_i = \sum_{i=1}^n Q_i * P_i * CF_i

Debt Value

The quantity, price, and kFactor are used to determine the debt value (d) incurred by borrowing a Kopio Asset.

Given a borrower’s krAsset b, oracle price PbP_b, quantity QbQ_b, and krFactor krFactorbkrFactor_b, the debt value dbd_b is calculated as follows:

db=QbPbkFactorbd_b = Q_b * P_b * kFactor_b

Total Debt Value

For multiple Kopio Assets borrowed, the total debt value (D) is calculated by combining the debt values of each asset.

Given n krAssets, total debt D is:

D=i=indi=QiPikFactoriD = \sum_{i=i}^n d_i = Q_i * P_i * kFactor_i

Collateralization Ratio

Collateralization Ratio (CR) for an account is obtained by dividing the combined collateral value V with outstanding combined debt value D.

CR=VDCR = \frac{V}{D}

If Alice’s total deposit value is $4,806.46 and her total debt is $1,278, then her collateral ratio is

CR=$4,806.46$1,278=3.7609=376.09%CR = \frac{\$4,806.46} {\$1,278} = 3.7609 = 376.09\%

Minimum Collateralization Ratio

Core risk mitigation of a CDP is the minimum collateralization ratio _(_MCR). It is the minimum collateralization ratio that allows taking on new debt.

If a CDP's collateralization ratio is under the MCR It does not mean it can be liquidated.

This is decided by the Liquidation Threshold instead.

The MCR is used to calculate a minimum collateral value for that a CDP needs to back up it's total debt value.

Liquidation Threshold

Liquidation Threshold (LT) is a protocol parameter which holds the value for absolute minimum collateralization ratio. If the Collateralization Ratio of an account is lower than the Liquidation Threshold, it can be liquidated by the liquidation functions in the protocol.

The liquidation threshold is always lower or equal to the MCR. These two values are separate to allow creation of a safety window before accounts are in danger of being liquidated.

Health Factor

Collateralization Ratio converted to a percentage.

Last updated