██████╗ █████╗ ██╗ ██╗
██╔══██╗██╔══██╗╚██╗ ██╔╝
██████╔╝███████║ ╚████╔╝
██╔══██╗██╔══██║ ╚██╔╝
██║ ██║██║ ██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
Note: This is a Proof of Concept (PoC) implementation. The system is not yet production-ready and should be used for testing and development purposes only.
This project implements a Credit Default Swap (CDS) like insurance system on Symbiotic that provides coverage against depegging events for ETH-pegged assets. The system acts as a Symbiotic Delegation Contract (SDC) with slashing mechanisms triggered when an ETH-pegged asset depegs from its target value.
The system allows users to:
- Buy coverage for supported ETH-pegged assets
- Claim coverage when depegging events occur
- Stake as operators to provide insurance capacity
- Earn rewards for providing insurance coverage
The main orchestrator contract that:
- Manages cover token creation and issuance
- Handles coverage buying and claiming
- Integrates with Symbiotic's vault system
- Manages operator staking and slashing
- Each supported asset has its own cover token
- Cover tokens are ERC20 tokens representing insurance coverage
- Created using a minimal proxy pattern for gas efficiency
- Managed by the Controller contract
- Manages network operations and vault interactions
- Handles staking, slashing, and rewards distribution
- Provides interface to Symbiotic's core functionality
-
Coverage Management
- Buy coverage for supported ETH-pegged assets
- Claim coverage when depegging events occur
- Automatic capacity calculation based on staked amounts
-
Staking and Slashing
- Operators can stake to provide insurance capacity
- Slashing mechanism triggered on depegging events
- Rewards distribution for stakers and operators
-
Asset Support
- Dynamic addition of supported assets
- Each asset has its own cover token
- Capacity management per asset
-
Security Features
- Role-based access control
- Slashing protection
- Capacity limits based on staked amounts
This project is built using Foundry, a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
$ forge build$ forge test$ forge fmt$ forge snapshot$ anvil$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>$ cast <subcommand>$ forge --help
$ anvil --help
$ cast --helpFor more information about Foundry, visit: https://book.getfoundry.sh/