How to Stress-Test Your DeFi Portfolio Before the Next Crash
Run -30% and -60% crash simulations on your DeFi positions with DeFi Saver and Tenderly. Find your exact liquidation price before it finds you.
Your monitoring dashboard pings you at 3 AM. ETH is down 40%. By the time you open your Aave position, the liquidation bot already took 50% of your collateral. A DeFi portfolio stress test would have told you exactly where that threshold sat — weeks before the crash happened.
Alerts react. Simulations predict. If you have active lending or LP (liquidity provider) positions, running crash scenarios against them is one of the most effective risk management steps available to you. This tutorial walks you through the tools, formulas, and decision thresholds to do it.
Why Monitoring Isn’t Enough: The Case for Simulation
Price alerts and health factor notifications are table stakes. They tell you something went wrong. They cannot tell you what will break first when ETH drops 50% in six hours.
Stress testing answers a different question: given your current positions, at what price levels do you start losing money involuntarily? Three crash tiers matter for practical modeling:
- -30% correction: Most lending positions at standard LTV (Loan-to-Value) survive. LP impermanent loss stays in the 3-5% range. Uncomfortable, not fatal.
- -50% to -60% aggressive drop: Leveraged and aggressive positions face liquidation. Impermanent loss (IL) on volatile pairs reaches 15-25%. Cascade effects begin compounding.
- Protocol failure: Oracle exploits, smart contract bugs, or governance attacks. Conservative LTV settings offer no protection against these risks.
You might think this level of simulation is only for institutional risk teams. Gauntlet runs agent-based simulations against live Ethereum smart contracts using thousands of parameterizations across distributed compute clusters. Chaos Labs builds mainnet fork environments that recreate specific crash trajectories. They famously modeled Black Thursday by dropping prices 1.2% per 100 blocks to replicate ETH’s -43% decline.
The same forking and simulation primitives these firms use are now available to individual users through free and freemium tools. You do not need a Python DSL (Domain-Specific Language) or a distributed cluster. You need DeFi Saver, Tenderly, and about an hour.
Your Stress-Testing Toolbox
Two primary tools cover the full spectrum of individual portfolio stress testing, each serving a different depth of analysis:
DeFi Saver Simulation Mode is the beginner-friendly entry point. It forks Ethereum, Arbitrum, or Optimism into a sandboxed environment with frozen asset prices, giving you 100 ETH to work with and no risk of losing real funds. Perfect for testing position behavior and automation triggers without writing a single line of code.
Tenderly Virtual TestNets offer deeper technical capability. They replicate real network state across 109 supported chains with features like State Sync for real-time balances and Admin RPC for environment manipulation (including oracle price overrides). Simulation bundles let you model chained, interdependent DeFi transactions. This is where you model multi-step cascade scenarios.
A third passive layer worth mentioning: DefiLlama’s Liquidation Dashboard tracks liquidation levels across major protocols and flags positions within 20% of current prices. Not a simulation tool, but essential context for understanding market-wide liquidation clusters before you run your own tests.
Use DeFi Saver to validate your automation logic. Use Tenderly to model complex crash scenarios. Use DefiLlama to contextualize your personal risk against the broader market.
Set Up a Risk-Free Sandbox in DeFi Saver
Step 1: Enter Simulation Mode. Navigate to DeFi Saver and activate Simulation Mode from the main dashboard. The platform creates a temporary forked network with 100 ETH in your simulated wallet and freezes all asset prices at their current values. You can choose between Ethereum, Arbitrum, or Optimism forks.
Step 2: Replicate your real positions. Use the “Add Balance” feature to inject token amounts matching your actual portfolio. If you hold 5 ETH as collateral on Aave with 4,000 USDC borrowed, mirror that exactly. Open the same positions on the same protocols. The sandbox supports all major DeFi protocols, so your Aave, Maker, or Compound positions can be faithfully reproduced.
Step 3: Test automation triggers. Configure DeFi Saver’s Automation feature (specifically Repay and Boost actions) with the thresholds you’d use in production. Trigger them manually by adjusting your position to simulate a health factor drop. Verify that the automation executes the expected transactions. All gas fees are tracked in the simulation, so you can estimate real costs too.
This sandbox has no quantity or duration limits. Run as many scenarios as needed.
Simulate Crash Scenarios with Tenderly
Step 4: Create a Virtual TestNet. In Tenderly, create a new Virtual TestNet forking mainnet at the current block. Enable State Sync to pull real-time balances and contract states from the parent network. This ensures your simulation starts from the exact on-chain state of your positions.
Step 5: Override oracle prices. This is where it gets powerful. Use Tenderly’s Admin RPC to manipulate Chainlink price feed return values. Set ETH/USD to 70% of current price for a -30% scenario. Then set it to 40% of current price for a -60% scenario. The protocol contracts read these overridden values as if they were real oracle updates.
Step 6: Run simulation bundles. Tenderly supports chained transaction simulations, called simulation bundles, that model sequential, interdependent DeFi actions. Build a bundle that: (1) updates the oracle price, (2) triggers a liquidation call against your position, and (3) observes the downstream state changes. Watch what happens to your health factor, remaining collateral, and any connected positions across protocols.
Account impersonation is the key enabler here. Tenderly lets you simulate transactions from your actual on-chain address without needing private keys. You test against your real positions, real balances, and real protocol parameters.
How Cascade Liquidations Amplify Losses
Understanding cascade mechanics turns your stress test from a theoretical exercise into a survival tool. Single-position liquidation math is straightforward. Multi-position cascades are where portfolios get destroyed.
Here is how the chain reaction works. When your health factor drops below 1.0, liquidators can repay a portion of your debt and claim the equivalent collateral plus a liquidation bonus. That claimed collateral often gets sold on the open market immediately, pushing the price of that asset lower. Lower prices trigger more health factor drops across other borrowers, which trigger more liquidations.
Aave V3 liquidation rules use a binary system. When Health Factor (HF) falls below 1.0 but stays above 0.95, and both the collateral and debt positions exceed $2,000, only 50% of the debt gets liquidated (partial liquidation). When HF drops to 0.95 or below, or either position is under $2,000, full 100% liquidation kicks in.
Aave V4 changes the game. The new liquidation engine introduces a variable liquidation bonus that operates like a Dutch auction: the lower the health factor, the higher the bonus liquidators receive. A Target Health Factor parameter replaces the fixed close factor, meaning the protocol repays only the debt amount necessary to restore health. This reduces the over-liquidation problem that V3’s rigid 50% close factor often caused.
But even V4’s improvements do not eliminate cascade risk. Every liquidation still produces sell pressure. During Chaos Labs’ Black Thursday simulation, they modeled this by dropping prices 1.2% per 100 blocks and observed how forced collateral sales at each level triggered the next wave of liquidations. The death spiral pattern: forced sales depress prices, depressed prices trigger more liquidations, repeat until the selling pressure exhausts itself or external buyers step in.
When running your Tenderly simulations, model at least two sequential liquidation events to see whether the collateral sold from your first position pushes any of your other positions closer to their own liquidation thresholds.
Metrics to Track During Your Stress Test
Numbers without context are noise. Here are the specific metrics that translate simulation outputs into decisions.
Health Factor is the master metric for lending positions. The formula:
HF = (Total Collateral Value x Weighted Average Liquidation Threshold) / Total Borrow Value
Target 1.8 to 2.0 under normal market conditions. Below 1.5 in your -30% simulation means you need to act before any real correction hits.
Liquidation Price tells you the exact ETH price at which your position gets liquidated:
Liquidation Price = Borrowed Value / (Collateral Units x Liquidation LTV)
Calculate this for every lending position. If your liquidation price is within 20% of the current market price, you are operating in the danger zone.
Impermanent Loss at each simulated price level. For a -30% drop on a volatile pair (like ETH/USDC), expect IL in the 3-5% range. At -60%, IL climbs to 15-25% on those same pairs. Compare this loss against the yield you’ve accumulated to determine whether the position is net-positive under stress.
Maximum Drawdown and VaR/CVaR. For a portfolio-level view, calculate your maximum drawdown across all positions at each simulated price level. Value at Risk (VaR) and Conditional Value at Risk (CVaR) at 95% confidence give you the statistical worst-case loss boundaries.
Collateral correlation risk is the hidden multiplier. If your Aave collateral is ETH and your LP position is an ETH/USDC pair, a single price move hits both positions simultaneously. Correlated collateral amplifies cascade exposure — your Tenderly simulation should test this by overriding prices for all correlated assets at once, not individually.
What to Do With Your Results: A Decision Framework
Running simulations without acting on them is expensive procrastination. Here is a concrete decision tree based on your stress test outputs.
If your Health Factor drops below 1.5 at -30%: Deleverage immediately. Either reduce your borrow amount or add more collateral. A position that comes within striking distance of liquidation during a routine correction is effectively a countdown timer.
If your liquidation price sits within 20% of the current market price: Set up a DeFi Saver Automation Repay trigger at a health factor threshold above your liquidation point. This gives you automated protection that activates before the liquidation bot does. Test the trigger in Simulation Mode first.
If impermanent loss exceeds 10% at -30%: The math is simple. Does your accumulated and projected yield exceed the tail risk? If yes, stay. If the yield barely covers the IL under a moderate correction, consider single-sided staking alternatives or narrower LP ranges that limit your downside exposure.
Set protective automation. Calibrate DeFi Saver Repay and Boost thresholds directly from your stress test findings. Your -30% simulation gives you the Repay trigger. Your recovery scenario gives you the Boost trigger. These are not arbitrary numbers anymore; they are empirically derived from your own position data.
Re-run monthly. Positions drift. Collateral ratios change as prices move. New borrows shift your risk profile. Protocol parameters evolve. Chaos Labs and Gauntlet continuously adjust risk parameters based on fresh simulation data, and protocols like Aave now integrate risk oracles that automate parameter updates in real time. Your manual stress tests should keep pace.
Your Next Move
Knowing that “my positions look fine” is not the same as knowing exactly what happens to every position at ETH $1,200. Open DeFi Saver’s Simulation Mode, replicate your largest position, and find your liquidation price. That single number tells you more about your actual risk exposure than any dashboard notification.
Then open Tenderly. Override the oracle. Watch the cascade. Now you are working with data, not assumptions.
This article is for informational and educational purposes only. It does not constitute financial advice. DeFi protocols carry inherent smart contract and market risk. Always do your own research before making financial decisions.
Frequently Asked Questions
What is DeFi portfolio stress testing? DeFi portfolio stress testing is the process of simulating adverse market conditions — such as a 30%, 50%, or 60% price crash — against your active lending, liquidity provider, and leveraged positions to identify liquidation thresholds, impermanent loss exposure, and cascade risks before they happen in a real market downturn.
Which free tools can I use to stress-test my DeFi positions? DeFi Saver’s Simulation Mode lets you fork Ethereum, Arbitrum, or Optimism into a risk-free sandbox with 100 ETH to test positions and automation triggers. Tenderly’s Virtual TestNets allow deeper scenario modeling with oracle price overrides and simulation bundles across 109 supported chains. DefiLlama’s Liquidation Dashboard provides passive monitoring of liquidation clusters across major protocols.
How often should I run a stress test on my DeFi portfolio? At minimum, run a full stress test monthly. Positions drift as prices move, collateral ratios shift with new borrows, and protocol parameters evolve over time. You should also re-run simulations after any significant portfolio change — such as opening a new lending position, adjusting leverage, or entering a new LP pair.
What health factor should I maintain to avoid liquidation? A health factor between 1.8 and 2.0 under normal market conditions provides a reasonable safety buffer. If your health factor drops below 1.5 in a simulated -30% correction, you should deleverage by reducing your borrow amount or adding more collateral before any real downturn occurs.
Can stress testing protect against smart contract exploits or oracle failures? No. Stress testing models price-driven scenarios and their downstream effects on your positions, but it cannot predict or protect against protocol-level failures such as smart contract bugs, oracle exploits, or governance attacks. These risks require separate mitigation strategies like protocol diversification and exposure limits.
Sources
- Lince Yields — DeFi Portfolio Stress Testing
- DeFi Saver — Simulation Mode
- Tenderly — Virtual TestNets
- Tenderly — Transaction Simulator
- Aave — Health Factor & Liquidations
- Aave — V4 Liquidation Engine
- Chaos Labs — Maker Simulation Series
- Gauntlet — Parameter Recommendation Methodology
- Chaos Labs — Risk Oracles for DeFi
- Amplified Protocol — Stress Testing and Scenario Analysis
Get alerts before liquidation — free Telegram & Discord notifications for Aave, Spark, Morpho & Compound.