CORE DEFI PRIMITIVES AND MECHANICS

Unpacking the Mechanics Behind CDPs and Soft Liquidation Systems

7 min read
#Decentralized Finance #Collateralized Debt #DeFi Risk #Soft Liquidation #Liquidation Mechanics
Unpacking the Mechanics Behind CDPs and Soft Liquidation Systems

In the constantly evolving landscape of decentralized finance, the ability to borrow and lend in a trustless environment has become a cornerstone of modern blockchain applications. At the heart of this capability lies the concept of a Collateralized Debt Position, or CDP, a tool that allows users to lock up assets and receive a stable or synthetic counterpart in return. While CDPs themselves are straightforward, the mechanisms that govern their operation—especially when a position moves toward insolvency—are far more intricate. Soft liquidation systems represent a nuanced approach to resolving undercollateralized positions, striking a balance between protecting lenders and giving borrowers an opportunity to recover.


What Is a Collateralized Debt Position?

A Collateralized Debt Position is a self‑contained contract that exists on a blockchain. The user deposits one or more types of collateral—usually a cryptocurrency—into a smart contract. In exchange, the contract issues a loan of another asset, often a stablecoin pegged to a fiat currency or a synthetic token that mimics the behavior of an underlying asset.

The critical feature of a CDP is that the value of the collateral must exceed the value of the loan. The ratio between the two, called the collateral ratio, is a safety buffer that protects lenders from volatility in the collateral’s market price. If the collateral drops in value and the ratio falls below a predefined threshold, the position becomes vulnerable to liquidation.


Mechanics of CDPs

1. Opening a Position

  1. Collateral Deposit – The borrower selects a supported collateral token and deposits it into the CDP contract.
  2. Borrowing – The contract mints the borrowing token (e.g., a stablecoin) and transfers it to the borrower’s wallet.
  3. Setting Parameters – The borrower chooses a target collateral ratio, which can affect the stability fee applied to the debt. A higher ratio typically leads to a lower fee, while a lower ratio incurs a higher fee.

2. Collateral Ratio and Stability Fees

The collateral ratio (CR) is calculated as:

CR = (Collateral Value in USD) / (Debt Value in USD)

For example, if a borrower locks 1 ETH (valued at $1,800) and borrows $600 worth of stablecoin, the CR is 3.0 or 300 %.
Stability fees are interest charges that accrue over time, expressed as an annual percentage rate (APR). The fee is calculated on the outstanding debt and added to the principal, creating compounding growth.

3. Monitoring and Adjustments

Borrowers can add or remove collateral, repay debt, or withdraw collateral as long as the CR stays above the liquidation threshold. The protocol continuously monitors the value of the collateral using an oracle, ensuring that real‑time market fluctuations are reflected in the position’s health.


Soft Liquidation Systems

The Problem With Hard Liquidations

Traditional liquidation mechanisms—often called hard liquidations—immediately seize and sell collateral when the CR drops below a critical level. This abrupt action can lead to market distortion, especially if multiple positions liquidate simultaneously. It also leaves borrowers with little to no chance of recovering their collateral.

Soft Liquidation as a Mitigation

Soft liquidation introduces a buffer period and a structured process that allows undercollateralized positions to be repaid before the collateral is forcibly liquidated. The system provides:

  • A Liquidation Window – A predefined time span during which the borrower can act to bring the position back to a healthy CR.
  • Auction or Repayment Mechanism – A market‑driven process where other participants can bid to acquire the collateral at a discount or can pay the debt plus a liquidation penalty to redeem the collateral.

How Soft Liquidation Works

1. Triggering the Process

When the oracle reports that the CR has fallen below the liquidation threshold, the CDP is flagged as “underwater.” The smart contract does not immediately seize collateral; instead, it initiates the soft liquidation phase.

2. The Liquidation Window

During this window—commonly ranging from a few hours to a day—the borrower can:

  • Deposit More Collateral – Boosting the value of the collateral to raise the CR.
  • Repay Debt – Paying down the outstanding principal and accrued stability fees to increase the ratio.
  • Withdraw Collateral – If the position is not at risk of further liquidation, the borrower may withdraw unused collateral.

If the borrower restores the CR above the minimum threshold before the window expires, the position returns to normal operation.

3. Post‑Window Actions

If the borrower fails to correct the position within the window, the smart contract moves to the liquidation stage. Unlike hard liquidations, soft liquidation does not immediately seize the collateral; instead, it opens a liquidation auction.

Auction Mechanics

  1. Bid Phase – Participants can place bids for the collateral, specifying the amount of stablecoin (or other accepted token) they are willing to pay.
  2. Ask Phase – The protocol sets a minimum acceptable bid, often determined by the debt plus a liquidation penalty (e.g., 12 % extra).
  3. Allocation – The highest bid that meets or exceeds the ask wins the collateral, and the bid amount is transferred to the CDP contract.
  4. Settlement – The debt is paid off using the winning bid. If the bid exceeds the debt, the surplus is returned to the bidder; if it is insufficient, the protocol may seek additional bids or liquidate the collateral through a fallback mechanism.

4. Post‑Liquidation

Once the auction concludes, the collateral is transferred to the winning bidder, and the borrower’s debt is settled. The borrower receives no part of the collateral but can retain the remainder of the borrowed token if the bid covered only part of the debt. In many systems, the borrower has the option to repay the remaining debt using other assets or to receive a refund of the over‑bid amount.


Advantages of Soft Liquidation

Advantage Explanation
Reduced Market Impact Auctions spread the sale of collateral over time, preventing sharp price drops.
Borrower Protection The liquidation window offers a grace period for borrowers to act.
Incentivized Repayment Auction participants are motivated by discounted collateral prices.
Protocol Sustainability Lower risk of collateral loss reduces the need for reserve funds.

Implementation Examples

MakerDAO

MakerDAO’s CDP system, now known as the Collateralized Debt Position (CDP) mechanism for the Maker Protocol, uses a soft liquidation strategy. When a vault’s collateral ratio falls below the maintenance threshold, the system enters a liquidations phase. Liquidators can seize collateral at a discounted price, and the protocol also allows vault owners to bring the ratio back in time to avoid liquidation.

Synthetix

Synthetix offers synthetic asset issuance via CDPs. The protocol uses a soft liquidation process where users can add collateral or repay debt during a buffer period. If the position is not corrected, liquidators can acquire the collateral at a penalty through the Synthetix liquidation mechanism.


Best Practices for CDP Users

  1. Maintain a Safe Margin – Aim for a collateral ratio at least 20 % above the liquidation threshold to accommodate volatility.
  2. Monitor Oracle Data – Use reliable price feeds and watch for large swings that could impact your CR.
  3. Set Up Alerts – Many wallets and dashboards provide CR alerts; configure them to notify you when you approach the threshold.
  4. Use the Liquidation Window Wisely – If the CR dips, immediately consider adding collateral or repaying debt to reset the position.
  5. Understand Auction Dynamics – If you plan to participate as a liquidator, study the auction rules and penalties to optimize your bids.

Potential Pitfalls

  • Oracle Manipulation – If a malicious actor controls the oracle, they can trigger unnecessary liquidations.
  • Front‑Running – Liquidation auctions may be susceptible to front‑running attacks, where bots exploit predictable auction outcomes.
  • Liquidity Constraints – During extreme market stress, it may be difficult to find enough liquidators, prolonging the liquidation window and exposing borrowers to higher risk.
  • Penalty Misunderstanding – Borrowers may underestimate the cost of liquidation penalties, leading to unexpected losses.

Final Thoughts

Soft liquidation systems embody a sophisticated approach to risk management in decentralized finance. By providing a buffer period and a market‑driven resolution mechanism, they protect both lenders and borrowers from the harshness of instant liquidations while preserving the protocol’s stability. As CDPs continue to grow in popularity across various platforms, understanding the mechanics of soft liquidations becomes essential for anyone involved in borrowing, lending, or providing liquidity.

In a world where volatility is the only constant, mechanisms that balance safety and flexibility will be the key drivers of sustainable growth in the DeFi ecosystem.

Emma Varela
Written by

Emma Varela

Emma is a financial engineer and blockchain researcher specializing in decentralized market models. With years of experience in DeFi protocol design, she writes about token economics, governance systems, and the evolving dynamics of on-chain liquidity.

Contents