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

Borrowing Capacity Tool

DeFi · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
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

Borrowing Capacity Tool gives DeFi users, borrowers, and protocol analysts real-time insight into available borrowing power and position utilization. It reads live on-chain data including user collateral positions, debt positions, protocol max LTV, liquidation LTV, token prices, available borrowing capacity, and current utilization. You can calculate how much more you can borrow, see current utilization, max borrowing capacity, and position health. The tool shows you in real time the available borrowing capacity, current debt, utilization percentage, max LTV, and liquidation LTV—so you can plan borrowing decisions and avoid hitting limits.

HOW TO USE

Connect your EVM wallet (optional—the tool can work in read-only mode). Enter the protocol contract address, user address (defaults to your wallet), collateral token address, and debt token address. Click "Calculate borrowing capacity" to fetch current data from the chain. The tool displays the collateral value, current debt, max borrowing capacity, available capacity, current utilization, max LTV, and liquidation LTV. A visual dashboard shows the utilization percentage with a color-coded bar and the available borrowing capacity. All data is read directly from the contract—no assumptions or simulations.

TECHNICAL APPROACH

This tool queries live contract state using ethers v5.7.2. It calls getPositionData() on the protocol contract to fetch collateral, debt, and borrowing capacity in a single call, falling back to individual getCollateralValue(), getDebtValue(), and getBorrowingCapacity() calls if needed. It reads getMaxLTV() and getLiquidationLTV() to get protocol parameters. Token decimals are read from the token contracts to format amounts correctly. The max borrowing capacity is calculated as collateral * maxLTV, available capacity is maxCapacity - current debt, and utilization is (debt / maxCapacity) * 100. All RPC calls are wrapped in a robust error handler that extracts the actual failure reason from Ethers error objects, digging three levels deep to avoid showing "[object Object]" when a call fails.

WHAT IT CANNOT SEE

This tool cannot predict future price movements or guarantee that calculated borrowing capacity will remain available. It cannot account for price fluctuations that occur between reads. It cannot simulate stress tests or determine the exact price drop that would affect capacity. It cannot see pending transactions that might change the position. It cannot detect off-chain factors that might impact collateral value. The tool provides current state calculation, but it does not guarantee that the borrowing capacity will remain unchanged.

PLEASE NOTE

This tool supports EVM‑compatible chains only (Ethereum, Goerli, Sepolia, Arbitrum, Optimism, Polygon). Solana, Tron, Starknet, SUI, TON, Aptos, Bitcoin, Cosmos, and XRP are not supported. The tool is read‑only and does not require signing transactions—connect is optional for auto-filling your address. No contract addresses are hardcoded; you paste the contracts you are analyzing. The tool is free and open under the BotGentz PLAYBOOK‑C specification.

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.