This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Cross-Collateral Position Consolidator

DeFi · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategoryDeFi
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Cross-Collateral Position Consolidator enables users to consolidate multiple borrowing positions across different protocols into a single unified position. The tool reads your connected wallet address, source position contract addresses, target position contract address, collateral token addresses, debt token addresses, position health factors, collateral amounts, debt amounts, liquidation prices, current block timestamp, and gas prices. It analyzes all source positions, aggregates their collateral and debt, calculates the consolidated health factor, and displays a detailed comparison. Once confirmed, the tool executes a batch consolidation: withdrawing collateral from each source position and depositing it into the target position, reducing management complexity and gas costs.

HOW TO USE

Connect your wallet and select your network. Enter the target position contract address (where you want to consolidate into) and a comma-separated list of source position addresses. Provide the collateral token and debt token addresses. Click "Analyze consolidation" to load all source position details including collateral amounts, debt amounts, health factors, and liquidation prices. The tool displays the total collateral, total debt, and the consolidated health factor. Review the source list and consolidation details carefully, then click "Consolidate positions" to execute the batch consolidation. The tool will withdraw collateral from each source and deposit it into the target position in sequence.

THE REAL MECHANISM — BATCH POSITION CONSOLIDATION WITH HEALTH FACTOR AGGREGATION

Unlike manual position management that requires separate transactions for each source, this tool implements a batch consolidation workflow with comprehensive health factor analysis. The tool reads each source position's getPositionInfo, which returns collateral, debt, health factor, and liquidation price. It aggregates the total collateral and total debt across all sources, then calculates a consolidated health factor based on the combined position. The execution flow is atomic: for each source position, (1) verify the position exists and has collateral, (2) call withdrawCollateral to remove the collateral from the source, (3) call depositCollateral on the target position to add the collateral. The tool also handles debt consolidation by repaying debt on sources and borrowing on the target if needed. The entire sequence is batched to minimize gas costs. 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 during consolidation—price movements during the consolidation process could trigger liquidation. It cannot ensure protocol solvency—the tool has no visibility into protocol reserves or potential insolvency. It cannot detect if protocols contain vulnerabilities—the tool does not audit the position contracts. 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 consolidated position will have the same borrowing capacity as the original positions.

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. All position contracts must implement the specific interface expected by this tool (getPositionInfo, withdrawCollateral, depositCollateral, repayDebt, borrow). Consolidating positions involves multiple contract interactions—gas costs may be significant. Always test with small amounts on a testnet before executing on mainnet. This tool is a position management interface, not a financial advisor or investment strategist.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.