# How CDP Work

<figure><img src="https://2164669523-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvo4y92EukVo5jeASAueL%2Fuploads%2FbtD1CqaUwUgfFU44RzbP%2Ftelegram-cloud-document-5-6161067420027984494.jpg?alt=media&#x26;token=fc2eee64-4308-4a62-a530-83d9d186b4e9" alt=""><figcaption></figcaption></figure>

Core actions

* **Open position** - Create a CDP by depositing supported collateral then borrow USDB.
* **Deposit more collateral** to existing position - Increase CR(Collateral Ratio) by increase collateral value.
* **Withdraw collateral from** existing position - Take partial collateral out, only if your position remains healthy(CR>MCR) after the change.
* **Borrow more USDB** - Draw more USDB liquidity against your collateral.
* **Repay** - Two ways
  * **Repay with USDB** - Use USDB you hold to repay debt.
  * **Repay with collateral** - Sell a portion of collateral into USDB to repay debt (available only for certain assets with sufficient DEX liquidity).
* **Close position** - Fully repay outstanding debt; withdraw remaining collateral.

> Rule of thumb: After every action, your position must satisfy **CR >= MCR** for that collateral type.

***

### Fees

* **No one-time borrow fee.**
* **Fixed borrow interest rate.**  Interest Rates for different collateral type are listed on [**Markets**](https://www.bucketprotocol.io/market).(Interest accrues in **real time)**

***

### Risk metrics

* **Collateral Ratio (CR)**\
  CR = Collateral Value / Debt value

  \= (Collateral Price \* Collateral Amount) / (initial Borrow Amount + Accrued Interest Fee)
* **Minimum Collateral Ratio (MCR)** \
  Each collateral has a fixed MCR requirement. If your **CR < MCR**, the position becomes eligible for liquidation.
* **Liquidation price** For a given debt and collateral value\
  Liquidation Price = (MCR \* Debt) / Collateral Amount

### Mint caps

* **Mint caps** exist per collateral to help manage market depth during liquidations and reduce slippage risk in extreme conditions.

### Example

**Assumptions:**

* SUI price: $5.00 per SUI
* Collateral: 1,000 SUI ($5000)
* SUI MCR Requirement = 110%&#x20;

**Max borrow at open :**\
Debt\_max = Collateral Value / MCR = 5,000 / 110% \~= 4,545.45 USDB

**If you borrow 4,000 USDB:**

* Entry CR = 5,000 / 4,000 \* 100%= 125%
* Liquidation price:

  \= (MCR \* Debt) / Collateral Amount

  \= (110% \* 4,000) / 1,000

  \= $4.40 per SUI
* If SUI falls near $4.40, your CR would approach 110% and the position could be liquidated.
