Soft Liquidation Partial Close Executor
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Soft Liquidation Partial Close Executor enables users to proactively reduce their lending position by repaying a portion of their debt using collateral, improving their health factor and reducing liquidation risk. The tool reads your connected wallet address, position contract address, collateral token address, debt token address, current health factor, liquidation threshold, soft liquidation parameters, partial close amount, collateral to repay, debt to repay, current block timestamp, and gas prices. It analyzes your position and calculates the new health factor after the partial close. If the close amount is sufficient to bring the health factor above the liquidation threshold, the tool executes the partial close transaction.
HOW TO USE
Connect your wallet and select your network. Enter the position contract address, collateral token address, and debt token address. Specify the amount of debt you want to repay (the partial close amount) and optionally the amount of collateral to use. Click "Analyze position" to load your current position details including collateral balance, debt balance, health factor, and liquidation threshold. The tool calculates and displays the new health factor after the partial close. If the new health factor is above the liquidation threshold, click "Execute partial close" to repay the debt using your collateral. The transaction will reduce your position size and improve your health factor.
THE REAL MECHANISM — DEBT REPAYMENT WITH COLLATERAL SWAP AND HEALTH FACTOR OPTIMIZATION
Unlike full liquidations that close an entire position, this tool implements a soft liquidation partial close that selectively reduces position size. The getPositionInfo function returns the collateral amount, debt amount, current health factor, and liquidation threshold. The partialClose function takes the debt amount to repay and the collateral amount to use for the repayment. The contract swaps the collateral for the debt token (or uses a direct repayment mechanism) and reduces both the debt and collateral balances proportionally. The new health factor is calculated as: (collateral - collateralUsed) / (debt - debtRepaid) * 100. The tool verifies that the new health factor exceeds the liquidation threshold before enabling the execution button. All arithmetic uses ethers.js BigNumber with the token's decimal precision, and gas costs are reported using receipt.effectiveGasPrice.
WHAT IT CANNOT SEE
Cannot predict liquidation risk—the tool cannot forecast price movements that could trigger liquidation after the partial close. It cannot ensure optimal partial close execution—the amount chosen may not be optimal for the user's situation. It cannot detect if the position contract contains vulnerabilities—the tool does not audit the contract logic. It cannot verify off-chain position valuation accuracy—the tool relies on the protocol's valuation and cannot verify oracle prices. It cannot guarantee that the partial close will prevent liquidation in all market conditions.
PLEASE NOTE — EVM CHAINS ONLY
This tool exclusively supports EVM-compatible chains where ethers.js can connect via standard JSON-RPC. It does not support non-EVM chains such as Solana, Tron, Starknet, SUI, TON, Aptos, Bitcoin, Cosmos, or XRP. The position contract must implement the specific interface expected by this tool (getPositionInfo, getCollateralToken, getDebtToken, partialClose). Always monitor your positions regularly—partial close is a risk management tool, not a guarantee against liquidation. This tool is a position management interface, not a financial advisor or investment strategist.