💧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.

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, 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 and third 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).

Then, after the appropriate amount of time had passed, we called the public finalizeLiquidation function to empty the treasury fully and conduct all remaining buybacks. As you can see by looking inside the MiniPanther Treasury contract, it now has zero balances of all the treasury tokens.

Last updated