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

Cross-Protocol Position Health Aggregator-and-Auto-Repay Tool

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-Protocol Position Health Aggregator-and-Auto-Repay Tool monitors the health of leveraged positions across multiple lending protocols simultaneously. The tool reads collateral balances, debt balances, health factors, and liquidation thresholds from each protocol's contract, then computes the aggregate health across all positions. If any position falls below a user-defined target health factor, the tool calculates the exact debt repayment needed to restore it to safety and executes the repayment transaction—optionally across multiple protocols in sequence. The tool also provides a single dashboard view of all your positions, making it easy to spot at-risk positions before liquidation occurs.

This tool is essential for DeFi users who manage leveraged positions across multiple lending protocols (Aave, Compound, Maker, etc.). It provides a unified health view, automates debt repayment to avoid liquidations, and reduces the risk of losing collateral during volatile market conditions.

HOW TO USE

1. Connect your EVM wallet to the network where your lending positions are deployed.

2. Add protocols by entering the contract address, collateral asset address, and debt asset address per line.

3. Set your target health factor (e.g., 1.5 for 150% collateralization) and maximum slippage tolerance.

4. Click "Monitor Positions" to fetch the current health of all positions—the tool displays collateral, debt, health factor, and status for each protocol.

5. Review the aggregated health dashboard showing total debt, total collateral, and aggregate health factor.

6. If any position is below the target, click "Auto-Repay" to execute the repayment transaction(s) needed to restore health.

7. Track progress via the status bar and confirmation of each repayment transaction.

TECHNICAL MECHANISM

The tool reads position data from each lending protocol using standard view functions: getUserAccountData() or getHealthFactor() for health factor, getUserCollateral() for collateral balance, and getUserDebt() for debt balance. It calculates the debt repayment needed to reach the target health factor using: debtToRepay = currentDebt - (collateral / targetHealth). The tool attempts multiple function signatures for repayment: repay(uint256 amount), repayDebt(uint256 amount), and repayWithSlippage(uint256 amount, uint256 minAmount). Gas estimation applies a 20% buffer, and actual gas costs are calculated from receipt.effectiveGasPrice. The tool executes repayments sequentially across protocols to avoid nonce conflicts and displays progress via a status bar.

WHAT IT CANNOT SEE

This tool cannot guarantee that repayment will execute at optimal prices due to market volatility—prices may move between monitoring and execution. It cannot prevent liquidation if the market moves too quickly before the repayment transaction is confirmed. It cannot account for off-chain price feeds or funding rate changes that may affect the health factor calculation. It cannot recover losses if repayment occurs at an unfavorable price; the user bears the risk of the reduced position. It cannot manage positions across protocols that require different approval mechanisms or asset wrappers (e.g., WETH vs. ETH). It cannot assess the user's overall portfolio risk beyond the tracked positions—correlated positions may compound risk across protocols.

PLEASE NOTE

EVM chains only. This tool requires that the lending protocols implement the standard view functions for health factor and debt balances. Not all protocols use the same ABI—the tool attempts multiple function signatures for compatibility. Always verify the target health factor before executing repayments—setting it too high may result in excessive debt repayment. Test on testnet before using with real funds. The tool does not execute swaps; it only repays debt with the user's existing funds.

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.