Skip to content
StressProof

StressProof

Stress test DeFi. Verify claims. Challenge risk.

Created on 31st October 2026

•

StressProof

StressProof

Stress test DeFi. Verify claims. Challenge risk.

The problem StressProof solves

DeFi lending protocols face significant risks during sudden cryptocurrency price crashes. As collateral values fall, borrowers can become undercollateralized, leading to liquidations and potential bad debt. Assessing these risks in advance and trusting reported risk calculations can be difficult.

StressProof addresses this problem by allowing DeFi protocols to simulate sudden market price shocks and estimate potential liquidation losses before they happen.

Key Features

  • Risk Assessment: Simulates market crashes to identify vulnerable lending positions and estimate potential bad debt.
  • Deterministic Calculations: Uses reproducible calculations so independent parties can verify results.
  • Cryptographic Evidence: Generates verifiable evidence and records its hash on the blockchain.
  • Independent Verification: Watcher agents replay calculations to detect inaccurate or manipulated claims.
  • Dispute Mechanism: Uses bonded challenges to hold claim submitters accountable for incorrect results.
  • Risk Mitigation: Helps protocols test protective measures such as reducing borrowing limits or pausing lending.

By making risk assessments transparent, independently verifiable, and accountable, StressProof helps DeFi protocols better understand their exposure to market crashes and make safer risk-management decisions.

Challenges we ran into

Building StressProof came with several technical challenges, especially around financial accuracy, evidence verification, and blockchain integration.

1. Ensuring Deterministic Financial Calculations

One major challenge was making sure that risk calculations produced exactly the same results across different environments. We addressed this by using integer-based financial calculations instead of floating-point arithmetic, allowing independent agents to reproduce and verify the results.

2. Preventing False or Manipulated Claims

We needed a way to ensure that submitted risk claims could not simply be trusted. We implemented canonical JSON serialization and Keccak-256 hashing to create cryptographic evidence that can be checked against on-chain commitments.

3. Building the Dispute Mechanism

Designing a system where independent agents could detect incorrect claims was challenging. We developed watcher agents that independently replay calculations and challenge claims containing incorrect results or invalid evidence. A bonded dispute mechanism makes participants financially accountable.

4. Integrating Multiple Components

Connecting Solidity smart contracts, Python-based agents, backend APIs, and persistent watcher state required careful coordination. We established shared interfaces and validation logic, then tested the complete workflow locally using Anvil, Foundry, and Pytest.

5. Making the System Reliable

Testing scenarios such as honest claims, manipulated results, successful challenges, and unsuccessful challenges required more than isolated unit tests. We built an end-to-end testing workflow to verify how all components interact, including contract state changes and bond distribution.

These challenges taught us the importance of building financial systems that are not only functional but also deterministic, independently verifiable, and accountable.

Discussion

Builders also viewed

See more projects on Devfolio