> For the complete documentation index, see [llms.txt](https://delea-finance.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://delea-finance.gitbook.io/home/delea-protocol-cdp/mechanisms/repayment.md).

# Repayment

You can repay your $DONE anytime to unlock and withdraw your collateral, giving you full flexibility and control over your assets.

1. **Partial Collateral Withdrawal:**\
   To withdraw a portion of your collateral, you must make a proportional repayment of your $DONE debt. This will release the corresponding amount of collateral for withdrawal.<br>
2. **Full Collateral Withdrawal:**\
   To fully withdraw your collateral, you need to repay your entire $DONE debt. Once repaid, all of your collateral will be unlocked and returned to you.<br>
3. **Improving Position Health Factor:**\
   If your position’s health factor nears or falls below the critical threshold (e.g., 125% for liquidation), consider making a partial repayment of your $DONE debt. Doing so will raise your health factor, reducing the risk of liquidation.\
   \ <br>

   For example, a user needs to repay **1,000 $DONE** to unlock their collateral.

   * The protocol charges a **1% protocol fee** and a **4% annual borrow interest rate**, prorated based on the number of days the position was open.
   * To fully unlock their position and withdraw their collateral, the user must repay **1,000 + 1% + Y**, where **Y** is calculated based on the time the position was actively used.

   **Calculation:**

   * Let’s assume the user borrowed 1,000 $DONE for **150 days**.
   * The annual borrow interest rate is **4%**, so the interest for 150 days is:\
     **4 × (150 / 365) = 1.644%**
   * Total repayment:\
     **1,000 + 1% (10 $DONE) + 1.644% (16.44 $DONE) = 1,026.44 $DONE**
