Loan-to-Value Calculator
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
Loan-to-Value Calculator gives DeFi users, borrowers, and risk managers real-time insight into loan positions and borrowing capacity. It reads live on-chain data including loan positions, collateral amounts, debt amounts, protocol LTV parameters, max LTV ratios, liquidation LTV thresholds, and user positions. You can calculate the current LTV ratio, see borrowing power used, remaining borrowing capacity, and assess position risk. The tool shows you in real time the LTV percentage, max LTV allowed, liquidation LTV, borrowing power used, remaining capacity, and position status—so you can make informed borrowing decisions and avoid liquidation.
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 LTV" to fetch current data from the chain. The tool displays the collateral amount, debt amount, current LTV ratio, max LTV allowed, liquidation LTV, borrowing power used, remaining borrowing power, and position status (Safe/Moderate/Near limit/Over limit). A visual dashboard shows the LTV compared to max LTV with a color-coded bar. 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 and debt in a single call, falling back to individual getCollateralAmount() and getDebtAmount() 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 LTV is calculated as (debt / collateral) * 100 and compared against the max LTV and liquidation LTV. Borrowing power used is calculated as (LTV / maxLTV) * 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 LTV will remain stable. It cannot account for price fluctuations that occur between reads. It cannot simulate stress tests or determine the exact price drop that would trigger liquidation. It cannot see pending transactions that might affect 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 LTV will remain within limits.
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.