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.
Borrowers using these CDP's cannot withdraw their collateral if it takes the CDP below the minimum collateralization ratio set in the contract.
One or more collaterals back each CDP and borrowers can take multiple debt positions on a single CDP. However, on the Kresko protocol borrowers can only have a single CDP per account.
CDPs in the Kresko synthetic asset protocol effectively act as cross-margined positions with many-to-many collateralization as opposed to 1-to-1 positions commonly referred to as having isolated margin.
Example
- Collateral DAI has a cFactor of 1. Oracle price $1
- Collateral wBTC has a cFactor of 0.8. Oracle price $15000
- krAsset krETH has a krFactor of 1.1. Oracle price $1000
- krAsset krQQQ has a krFactor of 1. Oracle price $200
- Protocol MCR is 140%
Bob deposits 1500 DAI and 0.1 wBTC as collateral
- 1.DAI: $1500 * 1 = $1500
- 2.wBTC: $150 * 0.8 = $120
Bob's total collateral value is $1620
Bob sends a transaction to mint 1 krETH
- 1.krETH: $1000 * 1.1 = $1100
Total collateral Bob needs to cover this mint:
$1100 * 140% = $1540
As $1540 is less than $1620. Bob is a able to mint 1 krETH
Bob wants to mint 1 krQQQ
Calculating the debt value
- 1.krQQQ: $200 * 1 = $200
Total collateral value Bob needs to cover this mint:
($1100 + $200) * 140% = $1820
We can see that Bob has insufficient collateral ($1620) to cover the mint so the transaction would fail.
In simple terms this means that for any amount of Kresko Asset to exist it must be backed by a Collateral Asset deposit of equal or greater value. In practice it is a bit more complicated:
The protocol needs to eliminate the risk of any user ending up with a Collateral Asset deposit value less than their Kresko Asset debt value. To accomplish this, protocol needs to have a buffer. This buffer consists of multiple variables within the CDP like the MCR and krFactor.
Collateralization Ratio (CR) for an account is obtained by dividing the combined collateral value V with outstanding combined debt value D.
If Alice’s total deposit value is $4,806.46 and her total debt is $1,278, then her collateral ratio is
Main safety buffer in a CDP is the Minimum Collateralization Ratio or MCR for short. It is the minimum collateralization ratio that allows for taking on debt.
If a CDP's collateralization ratio is under the MCR It does not mean it can be liquidated.
The MCR is used to calculate a minimum collateral value for that a CDP needs to back up it's total debt value.
Minimum collateral value required
Last modified 4mo ago