Comprehensive testing & validation framework for DeFi trading strategies
The DeFi Strategy Standard (DSS) is the industry standard for validating DeFi trading strategies. DSS introduces a streamlined 14-point architecture focused on code quality, economic soundness, interoperability, and developer experience.
NEW in v1.2.0: DSS SDK & Tooling - Build DSS-compliant strategies with ready-to-use contracts, testing utilities, and CLI tools!
DSS combines:
- Developer Tools: SDK with contracts, testing framework, and CLI for rapid development.
- Rigorous Validation: DSS architecture with strict coverage requirements.
- Interoperability: Native support for ERC-4626 and MAS (Multi-Asset Standard).
- 2025 Best Practices: Formal verification, mutation testing, and full invariant coverage.
The Problem: The DeFi industry lacks standardized testing practices. Most protocols launch with:
| Common Practice | Risk |
|---|---|
| "Audit coming soon" | Unverified code handling user funds |
| 40-60% test coverage | Critical paths untested |
| No fuzzing | Edge cases undiscovered |
| No backtesting | Strategy performance unknown |
| No operational procedures | Incident response undefined |
The Solution: DSS provides a complete framework that standardizes:
- What to test — Specific categories (DSS-1 through DSS-14)
- How much to test — Quantitative coverage metrics per certification level
- How to validate — Economic and market condition testing
- How to operate — Deployment and monitoring standards
- How to govern — Upgrade and documentation requirements
DSS organizes requirements into 14 Functional Categories:
- DSS-1: Core Strategy Tests - Weight logic, bounds, and basic correctness.
- DSS-2: Economic Invariants - Portfolio value conservation and math guarantees.
- DSS-3: Trigger & Timing Tests - Automation logic, cooldowns, and stale data handling.
- DSS-4: Risk Management Tests - Stop-losses, drawdowns, and emergency pauses.
- DSS-5: Integration Tests - Interactions with DEXs, Lending protocols, and Oracles.
- DSS-6: Security Tests - Flash loans, reentrancy, and manipulation resistance.
- DSS-7: Stress Tests & Fuzzing - Random inputs, market crashes, and chaos testing.
- DSS-8: Gas Efficiency - Benchmarks and scaling limits.
- DSS-9: Operational Security - Deployment, keys, and monitoring.
- DSS-10: Governance & Upgrades - Timelocks, audits, and disclosure.
- DSS-11: Interoperability - ERC-4626 and MAS Protocol compliance.
- DSS-12: Developer Experience & Documentation - API docs, code templates, and tutorials.
- DSS-13: CI/CD & Automation - Automated testing, security scanning, and deployment workflows.
- DSS-14: Production Monitoring & Observability - Event monitoring, health checks, and incident response.
| Level | Focus | Key Requirements |
|---|---|---|
| 🥉 Bronze | MVP / Testnet | DSS 1-6, Basic Interoperability. >80% Coverage. |
| 🥈 Silver | Mainnet <$10M | All Bronze + Stress Tests (DSS-7), Audits. >95% Coverage. |
| 🥇 Gold | Institutional | Formal Verification, L2 Optimization, Bug Bounty. >98% Coverage. |
The DSS Registry showcases projects that have achieved DSS certification. These strategies demonstrate excellence in security, testing, and operational practices.
Current Registry Statistics:
- Total Certified: 0
- Gold 🥇: 0 | Silver 🥈: 0 | Bronze 🥉: 0
Be the first! Achieve DSS certification and submit your strategy to the registry.
Why get listed?
- 🎯 Showcase your commitment to security and quality
- 📚 Provide reference implementations for the community
- 🤝 Build trust with users and auditors
- 🚀 Get featured in DSS updates and announcements
# Install the DSS CLI globally
npm install -g @vaultbricks/dss-cli
# Create a new DSS-compliant strategy
dss init my-strategy
# Navigate to your project
cd my-strategy
# Install dependencies
npm install
# Run tests
npm test
# Check DSS compliance
dss check --level silver
# Generate certification report
dss report# Clone the DSS repository
git clone https://github.com/VaultBricks/DSS.git
cd DSS
# Install dependencies
npm install
# Run the test suite
npm test
# Generate coverage report
npm run coverageDSS includes production-tested strategy examples:
- HODLStrategy - Equal-weight allocation strategy
- Fixed6040Strategy - Classic 60/40 portfolio
- Foundry Examples - Foundry/Forge test implementations
- Monitoring Bots - Real-time health monitoring and alerting
- Keeper Bots - Automated rebalancing and maintenance
- Deployment Scripts - Multi-sig deployment and verification
- Incident Response - Emergency procedures and playbooks
All examples include comprehensive test coverage and demonstrate DSS compliance.
See Examples README for details.
DSS now provides a complete SDK for building compliant strategies:
📚 New! Check out the SDK Usage Guide for comprehensive examples and tutorials.
@vaultbricks/dss-core - Solidity Contracts
Base contracts and interfaces for DSS strategies:
npm install @vaultbricks/dss-core
# or
forge install VaultBricks/DSSIncludes:
IDSSStrategy- Core strategy interfaceDSSAccessControl- Role-based access control (DSS-9)DSSPausable- Emergency pause (DSS-4)DSSTimelock- Governance timelock (DSS-10)DSSWeightLib- Battle-tested weight normalization library
@vaultbricks/dss-test - Testing Framework
Ready-to-use testing utilities:
npm install --save-dev @vaultbricks/dss-testIncludes:
InvariantRunner- Property-based testing (DSS-2)InvariantHelpers- Extended invariant testing utilities (value conservation, share price monotonicity, weight sum checks)FuzzHelpers- Extended fuzzing utilities with arbitraries (DSS-7)StandardTests- Pre-built test suites
@vaultbricks/dss-cli - Command Line Tool
Project initialization and certification:
npm install -g @vaultbricks/dss-cliCommands:
dss init- Create new projectdss check- Verify compliancedss report- Generate certification report
- Getting Started Guide - Step-by-step tutorial for building your first DSS strategy
- SDK Tutorial - Complete tutorial with code examples ⭐ NEW
- SDK Usage Guide - Comprehensive guide to all SDK packages ⭐ NEW
- SDK Quick Reference - Quick reference for common patterns ⭐ NEW
- Certification Matrix - Full requirements table
- Certification Process - How to get certified
- Interoperability Guide - MAS + ERC4626
- SDK Usage Guide - Complete guide with examples
- SDK Quick Reference - Quick reference guide
- @vaultbricks/dss-core - Solidity contracts and interfaces
- @vaultbricks/dss-test - Testing framework and utilities
- @vaultbricks/dss-cli - Command-line tool
- Packages Overview - Complete SDK documentation
- Part A: Code Quality (DSS 1-8)
- Part B: Economic Validation (Reference)
- Part C: Operational Security (DSS-9)
- Part D: Governance (DSS-10)
- Part E: Interoperability (DSS-11)
- Part F: Tooling & Automation (DSS-12, DSS-13, DSS-14) ⭐ NEW
DSS complements the VaultBricks Multi-Asset Standard (MAS):
| Standard | Focus | Scope |
|---|---|---|
| MAS | Architecture | Multi-asset vault structure |
| DSS | Validation | Strategy testing & security |
See Integration Guide for details.
DSS is an open-source standard that welcomes contributions from the community. See Contributing Guide for details.
MIT License - see LICENSE file.