Hubble Partial Liquidations Case Study
Today we discuss all things liquidations on Hubble Exchange while looking at an account 0xCf5eFA2358E92034006eaC53cD3701096029CbEe called CreamPony.
Here’s their action history on Hubble Exchange:
- Aug 11: Posted $164,715 hUSD and 5,700 avax margin on Hubble
- Aug 11: Added $329,430 virtual liquidity to the avax-perp market
- Stayed in the pool for 22 days and accumulated a counter-position of 1410 AVAX long
- Sep 3: Removed their virtual liquidity, at which point their accumulated impermanent (or counter) — position of 1410 avax Long at an avg buy price of $23.53 was assigned to their account.
- Sep 3: They partially closed their long by 34.4 avax resulting in a net of 1375.6 avax long position
- Sep 3: Removed all their hUSD and ~4900 avax margin so they were left with 800 avax in the margin account.
- The market kept dumping and they reached the liquidation point (currently 10x leverage). However, since Hubble only allows partial liquidations, their position was liquidated in 4 chunks of 25% position (343.9 avax long) each:
Sep 16, 2:27 AM — Liquidation 1: Charged a liquidation penalty of 5% ($308)
Sep 16, 8:59 AM — Liquidation 2: Charged a liquidation penalty of 5% ($307)
Sep 18, 21:05 — Liquidation 3: Charged a liquidation penalty of 5% ($304)
Sep 18, 21:13 — Liquidation 4: Charged a liquidation penalty of 5% ($295)
This means that they had a significant opportunity to close their position b/w each of these liquidations and save on subsequent liquidation penalties.
8. After having realized their losses (via liquidations) and having paid the liquidation fee their net hUSD balance was -$10,892 backed by 800 avax.
9. At this time, avax was around $16.9, so factoring the collateral weight of 0.8, their debt of -$10,892 was backed by just 800 * $16.9 * 0.8 = $10,816. So they were subject to a margin account liquidation.
10. When an account is under the margin account liquidation threshold, any liquidator can repay the debt and seize the collateral at upto a 5% discount from the index price. So, for repaying $10,892, a liquidator can claim $10,892/16.9 * 1.05 = ~676 avax while having to pay only 10,892/16.9 = 645 avax worth of dollars.
11. So on Sep 18, 21:37, that’s exactly what happened. CreamPony’s margin account was liquidated in this tx which is a sequence of following steps:
a. Flash loan $10,892 usdc from Trader-Joe avax-usdc pool
b. Use that to mint hUSD — Hubble’s unit of accounting
c. Repay the debt
d. Receive 675 avax as payment and liquidation incentive
e. Return 645 avax for the loan in step a, pocketing a 30 avax profit
Despite the liquidation, CreamPony is left with 800 minus 675 = 125 avax in their margin account which they are free to withdraw at any time.
This partial liquidation case-study showcases traders can count on a fair liquidation process on Hubble Exchange if they’re ever in a similar situation. The partial liquidation process works in the best interest of traders to avoid the complete liquidation of a trader’s position. The liquidation process carefully separated the liquidations into 4 chunks, each time lowering the account’s required maintenance margin in an attempt to avoid liquidating the full position. This tactically works to give traders an advantage in two ways:
- It gave the remaining partial position a fair chance, in case the market bounced in the trader’s favor, they would have only been partially liquidated and their (partially liquidated) position could even turn profitable.
- It allows traders additional time in closing their positions themselves to avoid paying liquidation penalties.
As a consequence of partial liquidations, the likelihood of cascading liquidations is reduced as well as the likelihood of liquidations due to mark price manipulation, creating a fair trading environment for Hubblers and protecting them from the Bogdanoffs when possible.