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

DeFi Risk Analyzer

Security · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategorySecurity
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

DeFi Risk Analyzer provides comprehensive risk analysis for your DeFi positions. You provide position parameters (collateral amount, debt amount, liquidation threshold, prices, and optional protocol fees), and the tool calculates the liquidation price, health factor, distance to liquidation, Value at Risk (VaR) at 95% and 99% confidence levels, and stress test scenarios for price drops of 10%, 20%, 30%, and 50%. It displays a risk level badge (low/medium/high) and visual price position indicators. This is essential for DeFi users managing leveraged positions, monitoring risk, and avoiding liquidations. It reads the current network chain ID from your wallet provider for context, but calculations are performed locally.

HOW TO USE

Connect your wallet using the "Connect" button (required for network context). Select the target network (Ethereum Mainnet, Sepolia, Polygon, BSC, Arbitrum, Optimism, and testnets are supported). Enter your position parameters: collateral amount, debt amount, liquidation threshold (%), collateral price (USD), debt price (USD), and optional protocol fee (%). Click "Analyze risk" — the tool will compute liquidation price, health factor, VaR, stress test scenarios, and risk level. The entire operation is read-only — no transactions are signed or sent.

TECHNICAL MECHANISM

The tool calculates liquidation price using the formula: Liquidation Price = (Debt * Debt Price) / (Collateral * (Threshold / 100)). Health factor is (Collateral * Current Price) / (Debt * Debt Price). VaR is calculated using a simplified parametric model with 30% volatility assumption and z-scores for 95% (1.645) and 99% (2.326) confidence levels. Stress tests simulate price drops and recalculate health factors. Protocol fees are incorporated as an adjustment to liquidation price and health factor. The tool uses ethers.js v5.7.2 for network context but performs all calculations locally. Results are displayed with color-coded risk indicators.

WHAT IT CANNOT SEE

The tool cannot guarantee that risk metrics will match actual protocol behavior due to protocol-specific mechanics, fees, or rounding. It cannot account for complex interactions between multiple positions. It cannot simulate flash crashes or extreme market events accurately. It is limited by RPC provider availability and price feed freshness. It cannot read positions that require complex protocol-specific logic without full integration. Risk analysis is based on simplified models and may not capture all protocol-specific nuances (e.g., liquidation penalties, bonus incentives, or cross-collateralization).

PLEASE NOTE

This tool is for educational and risk management purposes. Always verify risk metrics with the specific protocol you are using. The tool does not persist any data; all state is lost on page reload. EVM chains only.

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.