A standardized interface that enables DeFi protocols to implement verifiable solvency proofs through smart contracts. This interface works by defining structured data types for assets and liabilities, with oracle-validated price feeds tracking token values in real-time. The technical implementation calculates solvency ratios using configurable risk thresholds (105% minimum solvency ratio), maintains historical metrics for trend analysis, and emits structured events upon threshold breaches. The interface standardizes methods for querying current financial health, retrieving historical data points, and updating protocol positions, all while enforcing proper validation and security controls.
The DeFi ecosystem currently lacks standardization in financial health reporting, leading to:
This proposal directly addresses these challenges through a comprehensive interface that standardizes solvency reporting and monitoring:
Standardized Methodology: By providing a common interface with well-defined asset/liability structures and mathematical models, this EIP eliminates reporting inconsistencies that currently prevent clear comparisons between protocols.
Real-time Transparency: The proposed event system and query functions enable continuous monitoring of protocol health, rather than relying on periodic manual reporting that can miss critical changes in financial status.
Automated Risk Alerts: The threshold-based alert system provides early warnings of deteriorating conditions through standardized RiskAlert events, enabling faster response to potential insolvencies than current ad-hoc monitoring approaches.
Efficient Audit Trail: The historical metrics tracking creates an immutable record of protocol health over time, significantly reducing audit complexity compared to current solutions that require reconstructing historical positions.
Cross-Protocol Risk Assessment: A common interface enables aggregation of risk data across multiple protocols, allowing systemic risk monitoring that's impossible with today's fragmented reporting systems.
Alternative approaches considered include:
Off-chain Reporting: While simpler to implement, this lacks the verifiability, real-time nature, and trustless properties of an on-chain solution.
Protocol-Specific Standards: These would lack the interoperability benefits of a common standard and would perpetuate fragmentation.
Complex Risk Models: More sophisticated models were evaluated but rejected in favor of this proposal's balance between comprehensiveness and implementability.
This EIP represents the optimal approach by providing a flexible yet standardized framework that can be implemented across diverse protocol types while maintaining reasonable gas efficiency and usability.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
The standard defines a comprehensive interface for solvency verification. Key features include:
While not part of the core standard, implementations should consider including oracle management:
This provides:
The core standard focuses on solvency verification, leaving oracle management implementation details to individual protocols.
The ISolvencyProof interface provides a standardized, on-chain mechanism for DeFi protocols to report, verify, and monitor their solvency status. This interface is designed to be both comprehensive and flexible, supporting a wide range of protocol architectures and risk management strategies.
Authorized oracles are responsible for updating the protocol's asset and liability data using the updateAssets and updateLiabilities functions. These updates include the list of tokens, their respective amounts, and their current values denominated in ETH. Each update is timestamped, ensuring that all solvency calculations and historical records are based on the most recent and accurate data available. The interface enforces that all arrays provided must be of equal length, and values must be denominated in ETH with 18 decimals for consistency and comparability.
The getSolvencyRatio function computes the current solvency ratio, defined as the total value of assets divided by the total value of liabilities, scaled by a factor of 10,000 for precision. The verifySolvency function checks whether the protocol meets the minimum required solvency ratio (e.g., 105%), returning both a boolean status and the current health factor. This allows both on-chain and off-chain systems to quickly assess the protocol's financial health and respond accordingly.
To support audits, regulatory requirements, and trend analysis, the getSolvencyHistory function enables retrieval of historical solvency metrics, including timestamps, ratios, and the corresponding asset and liability states over a specified time range. This historical data is crucial for reconstructing past events, analyzing risk trends, and providing transparency to stakeholders.
Whenever the protocol's financial metrics are updated, the SolvencyMetricsUpdated event is emitted, providing real-time data for off-chain monitoring and analytics. If a risk threshold is breached (for example, if the solvency ratio falls below a critical level), the RiskAlert event is triggered, signaling the severity and nature of the risk. These events enable automated monitoring systems, auditors, and users to receive timely notifications and take appropriate action.
The interface is designed to be oracle-agnostic, allowing protocols to integrate with a variety of price feed solutions (e.g., Chainlink, API3, custom oracles). Only authorized oracles can update asset and liability data, ensuring that updates are secure and resistant to manipulation. The optional setOracle and OracleUpdated event pattern is recommended for managing oracle permissions and maintaining robust security controls.
Protocols implementing this interface are expected to:
External consumers (such as auditors, users, or other smart contracts) can query the protocol's current and historical solvency status using the provided view functions, and can listen for events to receive timely notifications of significant changes or risks. This design ensures that all stakeholders have access to reliable, real-time information about a protocol's financial health, enabling more robust risk management and greater trust in the DeFi ecosystem.
The standard's design prioritizes:
The interface defines two primary data structures (ProtocolAssets and ProtocolLiabilities) with specific attributes:
Array-based token tracking was selected over mapping-based approaches for:
Timestamp embedding within structures rather than separate mappings provides:
Combined value and amount tracking was implemented for:
Our implementation testing significantly shaped the final design:
Market Crash Simulation Tests
Volatility Testing
Oracle Integration
The recommended threshold values (105%, 110%, 120%) were selected based on:
Market Crash Testing
Complex Portfolio Analysis
Gas Optimization vs. Precision
Key insights from our implementation and testing:
Efficient Asset Tracking
Oracle Integration Patterns
Risk Management System
These insights are derived from our comprehensive test suite covering market crashes, volatility scenarios, and complex asset portfolios as documented in our test cases.
The solvency verification system is based on comprehensive mathematical models:
$SR = (TA / TL) × 100$
Where:
$HF = \frac{\sum(A_i × P_i × W_i)}{\sum(L_i × P_i × R_i)}$
Where:
$VaR(\alpha) = \mu - (\sigma × z(\alpha))$
Where:
$LCR = \frac{HQLA}{TNCO} × 100$
Where:
$SI = \frac{SR × w_1 + LCR × w_2 + (1/\sigma) × w_3}{w_1 + w_2 + w_3}$
Where:
$PD = N(-DD)$ $DD = \frac{ln(TA/TL) + (\mu - \sigma^2/2)T}{\sigma\sqrt{T}}$
Where:
The following thresholds have been validated through extensive testing:
| Risk Level | Ratio Range | Action Required | Validation Status |
|---|---|---|---|
| CRITICAL | < 105% | Emergency Stop | ✅ Validated |
| HIGH RISK | 105% - 110% | Risk Alert | ✅ Validated |
| WARNING | 110% - 120% | Monitor | ✅ Validated |
| HEALTHY | ≥ 120% | Normal | ✅ Validated |
Testing has confirmed that:
The standard implements a multi-tiered risk assessment system:
Primary Metrics:
Threshold Levels:
This standard intentionally leaves oracle implementation flexible. Protocols MAY implement price feeds in various ways:
Direct Integration
Aggregation Strategies
Asset Management:
Liability Tracking:
Reporting System:
Based on conducted tests, it is recommended:
Liability Management:
Ratio Calculation:
State Validation:
Gas Considerations:
For more details please visit: Solvency Proof Implementation
This EIP is compatible with existing DeFi protocols and requires no changes to existing token standards.
The reference implementation provides a comprehensive example of the standard in action:
SolvencyProof.sol provides a complete implementation of the ISolvencyProof interface with:
This implementation is under license: MIT
SolvencyProof.test.ts contains an extensive test suite that:
The implementation has been tested across various market conditions and validated to handle extreme volatility while maintaining accurate solvency reporting.
For more information please visit: Test Case Documentation
Risk Management Module
Oracle Security Features
Gas Optimization Techniques
This reference implementation demonstrates that the standard is practical, gas-efficient, and provides meaningful protection against insolvency risks in real-world conditions.
Key security considerations include:
Oracle Security:
Access Control:
Risk Management:
Copyright and related rights waived via CC0.