# Default Protection

The YBX Default Protection program is used to eliminate counterparty risk from the YieldBlox protocol. It enables the protocol to take on user debt to ensure that liquidations are profitable.

## How does YBX Default Protection remove counterparty risk?

In the case a [liquidation](/user-docs/lending-borrowing/liquidations.md#what-is-liquidation) would be unprofitable for the liquidator, the lending pool will assume a portion of the liquidated user's debt to reduce the amount the liquidator must repay. This ensures liquidations are always carried out no matter how underwater a position is. The pool will slowly pay off its debt using fees it would normally distribute to YBX escrowers.

## How much debt will the pool take on during a default protection scenario

When a liquidator attempts a liquidation the pool calculates the average liquidation incentive of the collateral held by the user being liquidated. If the value of the user's liabilities exceeds the value of the user's collateral value divided by one plus the user's liquidation incentive, the pool will assume debt equal to the difference. See the equation [here](https://github.com/script3/yieldblox-docs/blob/master/math.md#Yieldblox-Default-Protection-Amount).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ybx.script3.io/user-docs/lending-borrowing/default-protection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
