Liquidation
Learn how loan liquidation works on Arkis.
Last updated
Learn how loan liquidation works on Arkis.
Last updated
Arkis Protocol does not rely on external liquidators. Instead, all positions are liquidated following the process described below.
Continuous Monitoring:
The Margin Engine reassesses every Margin Account approximately every 30 seconds.
It computes a Risk Factor using the formula:
Portfolio Stress-Tested Value is derived by applying configurable, asset-specific stress parameters (e.g., discounts for volatility and liquidity constraints) to all collateral held in the account.
When the Risk Factor falls below a predetermined liquidation threshold (typically RF < 1.0), the system flags the account for potential liquidation.
Early Warning – Margin Call:
Before liquidation, a Margin Call is issued when the Risk Factor nears the threshold. The borrower receives notifications via the Arkis Portal and other alert channels, urging them to add collateral or reduce borrowing to restore a healthy risk level.
If corrective action is not taken and the Risk Factor continues to deteriorate, the system escalates the process to liquidation.
Once the Margin Engine detects that an account's Risk Factor is critically low, it initiates the following:
Plan Computation:
A Liquidation Plan is formulated that specifies the sequence of actions needed to reduce the borrowed exposure and recover the outstanding loan amount.
This plan takes into account:
Active Positions: It identifies which positions across whitelisted DeFi protocols (e.g., exchanges, liquidity pools) need to be closed or reduced.
Asset Conversion: It maps out how collateral assets will be swapped or liquidated into the base token (such as USDC or another stablecoin) that represents the borrowed value.
Liquidity Considerations: It factors in available market liquidity, expected slippage, and any protocol-specific restrictions to ensure that the recovery is both efficient and minimally disruptive.
Dynamic Parameters: Stress-tested values, liquidation fees, and any available claimable interest are integrated into the plan.
Off-Chain Coordination:
The Liquidation Plan is communicated to the Executor module—a microservice that translates the plan into specific on-chain transactions.
The Executor uses the pre-configured whitelisted DEXs (such as 1inch) or protocol adapters to execute the asset swaps and position closures.
On-Chain Transaction:
All liquidation transactions are executed via smart contracts on the appropriate blockchain network(s). These transactions include:
Closing Positions: Transactions to exit or decrease positions on approved protocols.
Asset Swaps: Swaps converting collateral assets into the base borrowed asset.
Funds Reconciliation: Returning recovered funds to the Liquidity Pool and settling any accrued fees.
The smart contracts governing liquidation are designed with MEV (Maximal Extractable Value) resistance and include fallback mechanisms to mitigate network failures or price manipulation risks.
Settlement and Distribution:
Once liquidation is complete, the recovered funds are used first to repay the borrowed amount.
Any surplus (i.e., recovered value exceeding the outstanding debt) may be allocated to the borrower or held in reserve, such as within an Insurance Fund, for the protection of liquidity providers.
Liquidation fees, which are pre-configured and transparent, are deducted as part of the overall process.
Transparency and Auditing:
Every step of the liquidation is recorded on-chain, ensuring full transparency.
Detailed logs and transaction receipts are available for audit, enabling both internal reviews and external verification by regulatory or technical auditors.
An Asset Manager has a Margin Account with the following details:
Collateral: Assets valued at $100,000 (stress-tested to $80,000).
Borrowed Amount: $90,000.
Risk Factor: 80,000 / 90,000 ≈ 0.89 (below threshold).
The Margin Engine detects that the Risk Factor has dropped below 1.0 and issues a margin call. No corrective action is taken.
A Liquidation Plan is generated:
Identify and close open positions in liquidity pools.
Liquidate specific collateral assets (via 1inch) to convert them into USDC.
Design a sequence to minimize slippage and ensure all funds are safely recovered.
The Executor translates this plan into on-chain transactions:
Liquidates the required amount of assets.
Aggregates funds to repay the $90,000 borrowing.
The liquidation completes:
The margin account is closed, and recovered funds are distributed.
The liquidation event is permanently recorded on-chain.
In cases where the liquidation of a portfolio results in a value that exceeds the amount of borrowed assets, the surplus is not retained as profit by the Arkis Protocol. Instead, this positive surplus is transferred to either the Arkis Insurance Fund or the Borrower. The Insurance Fund is specifically designed to enhance the security of our liquidity providers' capital and support the platform's stability in adverse conditions. This ensures that excess funds are responsibly managed and used to safeguard against potential future losses.
Should the liquidation result in a portfolio value that is less than the borrowed assets, the Arkis Insurance Fund covers the negative difference. This mechanism protects the liquidity pools from losses due to an insufficient liquidation value, ensuring that lenders do not bear the financial burden of under-collateralized losses.
The Arkis Insurance Fund also plays a critical role in the event of a compromise or hack of a Decentralized Exchange (DEX) where a Margin Account is operated. In such scenarios, the fund is utilized not only to cover losses from inadequate liquidations but also to provide insurance against losses resulting from DEX hacks or exploits. This comprehensive coverage helps maintain trust and security within the Arkis ecosystem, providing a safeguard to both asset managers and liquidity providers.