# Liquidation Predictions via Machine Learning

**MOTIVATION**

* *Liquidation* for a collateralized debt position (CDP) can happen due to various factors. It is an important factor for lenders to check a wallet’s credit-worthiness.
* Higher probability of liquidation often leads to a higher lending risk.
* Our credit scoring systems are built on top of ML models predicting probability of liquidation.&#x20;

**BLOCKDOG'S ML MODELS**&#x20;

* Our ML models are built using millions of transactions in blockchain.&#x20;
* They look at historical transactions in lending protocols to predict if a CDP for a wallet will be liquidated.
* We trained the models based on various factors that eventually lead to liquidations and achieved promising results.

**PERFORMANCE**

* For benchmarking the models we evaluated them on **Aave lending dataset**.&#x20;
* The goal of the model was to predict if a user will be liquidated in the future based on their historical activity in the protocol.
* We tested the following models:&#x20;
  * Random (baseline)
  * Logistic Regression model
  * Tree model

<figure><img src="/files/9wWpfTQ869VniTC0RzV8" alt=""><figcaption><p><strong>Tree based model predicts most reliably.</strong></p></figcaption></figure>

* For the same false positive rate in the graph, the *tree based models have the best true positive rate.*&#x20;
* Tree based models are most accurate in predicting if a user will liquidate in future or not. Using them to predict defaults is the safest lending strategy.

<figure><img src="/files/lyHxNP2bkSKvFtzn2Q3s" alt=""><figcaption><p><strong>Overall accuracy for the models</strong></p></figcaption></figure>

**INTEGRATION**

* Lenders can immediately begin integrating our models into their lending strategy.&#x20;
* We have exposed APIs for our logistic regression and tree based models.&#x20;
* All our models are completely customizable. We understand that different lenders have different risk tolerance for liquidations and hence, we support model customization - allowing lenders to fine-tune the credit scores depending upon their risk appetite.
* [Contact us](https://calendly.com/blockdog) for more details.


---

# 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://block-dog.gitbook.io/blockdog/blockdog-and-crypto-lending/liquidation-predictions-via-machine-learning.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.
