I. ATOM-nomUSD
Testing Context:
To simplify calculations, minting and stability fees have been set to zero. The liquidation scenarios tested aim to evaluate how the system handles different situations, such as insufficient or surplus collateral after liquidation.
Detailed Test Results
- Single Vault Liquidation - Debt Fully Repaid, No Remaining ATOM, With Refund
- Vault Debt: 50 nomUSD
- Collateral Locked: 12.5 ATOM
- Liquidation Price: 5.0
- Bid Price: 6 nomUSD
- Bid Details:
- Bid 1: 15 nomUSD (Bid in) for 2.5 ATOM (Bid out)
- Bid 2: 60 nomUSD for 10 ATOM
- Result: Debt fully repaid, vault closed, refunded 15 nomUSD and 2.5 ATOM after the first bid, no remaining ATOM.
- Reserve: 15 nomUSD
- Status: CLOSED
- Vault Debt After: 0 nomUSD
- Collateral Locked After: 0 ATOM
- Explanation:
- Bid 1 (15 nomUSD for 2.5 ATOM) significantly reduces the debt.
- Bid 2 (60 nomUSD for 10 ATOM) fully pays off the remaining debt, closes the vault, and refunds remaining assets.
- After both bids, the system determines no ATOM remains in the vault and closes it.
- Single Vault Liquidation - Debt Fully Repaid, No Remaining ATOM, No Refund
- Vault Debt: 50 nomUSD
- Collateral Locked: 12.5 ATOM
- Liquidation Price: 5.0
- Bid Details:
- Bid 1: 15 nomUSD for 2.5 ATOM
- Bid 2: 50 nomUSD for 10 ATOM
- Result: Debt fully repaid, vault closed, no remaining ATOM, no refund.
- Reserve: 15 nomUSD
- Status: CLOSED
- Vault Debt After: 0 nomUSD
- Collateral Locked After: 0 ATOM
- Explanation:
- Bid 1 (15 nomUSD for 2.5 ATOM) reduces the debt.
- Bid 2 (50 nomUSD for 10 ATOM) repays the remaining debt. As the entire collateral is sold, no refund remains.
- Single Vault Liquidation - Debt Fully Repaid, ATOM Remaining < Penalty
- Vault Debt: 50 nomUSD
- Collateral Locked: 12.5 ATOM
- Liquidation Price: 5.0
- Bid Price: 5 nomUSD
- Bid Details: 60 nomUSD for 12 ATOM, 1 ATOM remaining after penalty.
- Result: Successful liquidation, vault closed, 0.5 ATOM and 10 nomUSD reserved.
- Reserve: 0.5 ATOM + 10 nomUSD
- Status: CLOSED
- Vault Debt After: 0 nomUSD
- Collateral Locked After: 0 ATOM
- Explanation:
- Bid in (60 nomUSD for 12 ATOM) repays all debt. After paying off debt and deducting fees, 1 ATOM remains, with 0.5 ATOM and 10 nomUSD added to reserve as it is under the penalty threshold.
- Single Vault Liquidation - Debt Fully Repaid, ATOM Remaining > Penalty
- Vault Debt: 50 nomUSD
- Collateral Locked: 12.5 ATOM
- Liquidation Price: 5.0
- Bid Price: 6 nomUSD
- Bid Details: 60 nomUSD for 10 ATOM, 1 ATOM remaining above penalty.
- Result: Vault transitions to LIQUIDATED status, 1 ATOM reserved.
- Reserve: 1 ATOM + 10 nomUSD
- Status: LIQUIDATED
- Vault Debt After: 0 nomUSD
- Collateral Locked After: 1.5 ATOM
- Explanation:
- Bid in (60 nomUSD for 10 ATOM) repays all debt. As 1 ATOM remains above penalty, the vault status transitions to LIQUIDATED instead of closed.
- Single Vault Liquidation - Insufficient to Repay Debt, No Remaining ATOM
- Vault Debt: 50 nomUSD
- Collateral Locked: 12.5 ATOM
- Liquidation Price: 4.0
- Bid Price: 3.8 nomUSD
- Bid Details: 47.5 nomUSD for 12.5 ATOM, no remaining ATOM.
- Result: Debt cannot be fully repaid, vault liquidated entirely.
- Reserve: 2.5 nomUSD after payment.
- Status: LIQUIDATED
- Vault Debt After: 2.5 nomUSD
- Collateral Locked After: 0 ATOM
- Explanation:
- Bid in (47.5 nomUSD for 12.5 ATOM) is insufficient to cover the debt. The vault is fully liquidated, and the remaining debt is recorded as a shortfall, with no ATOM left to retain.
- Single Vault Liquidation - Insufficient to Repay Debt, ATOM Remaining but Cannot Recover
- Vault Debt: 50 nomUSD
- Collateral Locked: 12.5 ATOM
- Liquidation Price: 4.0
- Bid Price: 4 nomUSD
- Bid Details: 48 nomUSD for 12 ATOM, 0.5 ATOM remains as reserve.
- Result: Debt cannot be fully repaid, vault closed, 0.5 ATOM remains.
- Reserve: 0.5 ATOM
- Status: CLOSED
- Vault Debt After: 2 nomUSD
- Collateral Locked After: 0 ATOM
- Explanation:
- Bid in (48 nomUSD for 12 ATOM) is insufficient to repay the entire debt. The vault cannot reopen, so it closes with 0.5 ATOM remaining.
- Single Vault Liquidation - Insufficient to Repay Debt, Remaining ATOM Can Recover
- Vault Debt: 50 nomUSD
- Collateral Locked: 12.5 ATOM
- Liquidation Price: 4.0
- Bid Details: No successful bids, vault recovers with remaining 1.25 ATOM.
- Result: Vault reopens with remaining 1.25 ATOM as collateral.
- Reserve: 1.25 ATOM
- Status: OPEN
- Vault Debt After: 50 nomUSD
- Collateral Locked After: 11.25 ATOM
- Explanation:
- Multiple Vault Liquidations - Insufficient to Repay Debt, Remaining ATOM Can Recover
Summary: These test cases demonstrate that the system responds correctly to different liquidation scenarios, effectively managing reserves, refunds, and vault status.
II. ATOM-nomEUR
Testing Context:
To simplify calculations, we set minting fees and stability fees to zero. These liquidation scenarios examine how the system handles the liquidation of vaults with nomEUR, covering cases with and without remaining assets post-liquidation, and scenarios with excess collateral after liquidation.