# Liquidation Test

MiniPanther has a brand new concept: a fully self-liquidating DAO treasury! The regular admin treasury withdraw function is disabled, and the buybacks (80% of all treasury assets besides LP tokens) are handled via custom functions.

On this page, we explain those custom functions by illustrating the liquidation process on a test deploy!

The functions that liquidate the MiniPanther are sendHouseCut, liquidateTreasury, and finalizeLiquidation in the [MiniPanther Treasury contract](https://ftmscan.com/address/0x3c50062ffed29ea72a4e55547d3e3948ba2784f1#writeContract).

During the test run, we first ran liquidateTreasury 3 times, sending integer values of 5000 (50%) each time. When [liquidateTreasury was run the first time](https://ftmscan.com/tx/0xd541f741a536c207327a24959d43b91b4674130bcaaf94434c56e3eeac355e6e), sendHouseCut was automatically called from within the function. That can be seen from the first 5 transfers in the "Tokens Transferred" section. The next transfers are the liquidations of 50% of the treasury's remaining balances.

The [second](https://ftmscan.com/tx/0x4e61f562eabfa5a88da91571fa40bd83343917dc74266b8ff57203bec4779f39) and [third](https://ftmscan.com/tx/0xbc6015b8fe2e7804c861ed4684188270da207916fde748b2556fe64152fa005a) liquidateTreasury runs also used 5000 (50%) as the input value, so 50% was liquidated again the second and third time (25% and 12.5% of the original balance).&#x20;

Then, after the appropriate amount of time had passed, we [called the public finalizeLiquidation function](https://ftmscan.com/tx/0x26ee340f03cef999be6ad6eda76e1da81efb3718664581b6bc4c3a4dcbceebfe) to empty the treasury fully and conduct all remaining buybacks. As you can see by looking inside the [MiniPanther Treasury contract](https://ftmscan.com/tx/0x26ee340f03cef999be6ad6eda76e1da81efb3718664581b6bc4c3a4dcbceebfe), it now has zero balances of all the treasury tokens.


---

# 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://minipanther.gitbook.io/minipanther/security/liquidation-test.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.
