SECP
SECP (Smart Emergency Collateral Protection) is an innovative DeFi lending protocol that prevents liquidations through intelligent collateral rebalancing and Real-World Asset (RWA) integration.
視頻
描述
SECP (Smart Emergency Collateral Protection) is an innovative DeFi lending protocol that prevents liquidations through intelligent collateral rebalancing and Real-World Asset (RWA) integration. Unlike traditional lending platforms where users face immediate liquidation during market crashes, SECP automatically protects positions by reshaping portfolios and activating emergency measures.
The Problem We Solve
Traditional DeFi lending platforms have a critical flaw:
Instant Liquidation Risk: When markets crash, users get liquidated immediately
No Safety Mechanism: Users lose collateral even if they have other valuable assets
Manual Intervention Required: Users must monitor positions 24/7
Cascade Effect: Liquidations trigger more liquidations, creating market panic
Our Solution
SECP introduces a 3-Layer Protection System:
🔄 Auto-Rebalancing: Automatically converts risky assets to stable assets when health drops
💰 Yield Buffer: Diverts yield-generating tokens to reduce debt during emergencies
🏠 RWA Emergency Collateral: Locks real-world assets (Real Estate, Invoices, Gold) as last-resort protection
🚀 Unique Selling Points (USPs)
1. Zero-Liquidation Architecture
Never Get Liquidated: Multi-layer protection prevents forced liquidations
Automatic Protection: No user intervention needed - smart contracts handle everything
Graceful Degradation: System progressively activates stronger protections as needed
2. Real-World Asset Integration
Tokenize Physical Assets: Convert real estate, invoices, commodities into collateral
Emergency Unlocking: RWAs automatically lock during critical health scenarios
Asset Verification: On-chain tracking of asset type, location, and value
Flexible Asset Types: Supports multiple RWA categories (real estate, invoices, gold, etc.)
3. Intelligent Collateral Management
Dynamic Rebalancing: Portfolio automatically shifts from risky to safe assets
Health Factor Monitoring: Continuous tracking with multi-threshold protection
Yield Optimization: Yield-generating assets buffer debt during downturns
Transparent Mechanics: All protection triggers visible on-chain
4. User-Centric Design
150% Minimum Collateral: Lower barrier than most DeFi protocols (vs 200%+)
Real-Time Dashboard: Live updates on health, collateral, and protection status
One-Click Actions: Simplified UI for deposits, loans, and monitoring
Clear Error Messages: Helpful guidance when transactions fail
5. Multi-Chain Ready
Optimism Stack Compatible: Deployed on Mantle Sepolia (OP Stack)
Layer 2 Efficiency: Low gas fees for frequent rebalancing operations
Scalable Architecture: Can expand to multiple L2s and sidechains
Smart Contracts
1. RWAToken.sol - Real-World Asset Tokenization
Features:
- Tokenize physical assets (real estate, invoices, gold)
- Lock/unlock mechanism for emergency collateral
- Asset metadata storage (type, location, value)
- Integration with vault for automated protection2. SECPVault.sol - Multi-Asset Collateral Management
Features:
- Stores risky, safe, and yield-generating tokens
- Crash mode triggering for emergency rebalancing
- Automatic asset reshaping (risky → safe)
- RWA locking during critical scenarios
- Total value calculation across all asset types3. SECPBorrow.sol - Lending Engine with Protection
Features:
- Health factor monitoring (150% minimum)
- Automatic protection triggering
- Yield diversion to debt reduction
- Collateral validation before loan issuance
- Simplified crash simulation for testing4. MockERC20.sol - Token Implementation
Standard ERC20 tokens for testing:
- Risky Asset (RISK) - volatile collateral
- Safe Asset (SAFE) - stable collateral
- Yield Asset (YIELD) - income-generatingFrontend (Next.js + Wagmi + RainbowKit)
Features:
Real-time dashboard with 3-second auto-refresh
WalletConnect integration via RainbowKit
Approve → Deposit → Borrow workflow
Live health factor monitoring
Protection status indicators
Transaction state management
Tech Stack:
Next.js 14 (App Router)
Wagmi v2 (Web3 React hooks)
Viem (Ethereum interactions)
TailwindCSS (Styling)
RainbowKit (Wallet connection)
💡 How It Works
Normal Operation Flow
User Deposits Collateral
Approves tokens (risky, safe, yield)
Deposits into SECPVault
Collateral is tracked separately by type
User Takes Loan
Health factor calculated:
(Total Collateral Value × 100) / DebtMinimum 150% health required
Loan issued if collateral sufficient
Health Monitoring
System continuously monitors health factor
Two protection thresholds:
150%+: Normal operation ✅
120%: Auto-rebalancing and yield diversion triggered 🟡
Emergency Protection Sequence
Stage 1: Crash Mode (Health < 120%)
1. triggerCrashMode() activated
2. 50% of risky assets converted to safe assets
3. Portfolio becomes more stable
4. Health factor improves
Stage 2: Yield Diversion (Health < 120%)
1. Available yield tokens identified
2. Yield diverted to reduce debt
3. Debt decreases, improving health
4. User retains core collateral
Future Enhancement: RWA Integration
The protocol includes RWA token infrastructure for future
emergency collateral features:
- Tokenized real-world assets can be deposited
- Vault can lock RWA during crash mode
- Provides additional protection layer when implemented
Example Scenario
Initial State:
Collateral: 1000 RISK + 200 SAFE + 100 YIELD = 1300 tokens
Loan: 500 tokens
Health: 260% ✅
Market Crash (-40%):
Collateral drops to: 600 RISK + 200 SAFE + 100 YIELD = 900 tokens
Debt remains: 500 tokens
Health: 180% 🟡
Protection Activated:
50% RISK → SAFE: 300 RISK converted
New balance: 300 RISK + 500 SAFE + 100 YIELD = 900 tokens
Portfolio now more stable
Liquidation prevented!
黑客松進展
Normal Operation Flow User Deposits Collateral Approves tokens (risky, safe, yield) Deposits into SECPVault Collateral is tracked separately by type User Takes Loan Health factor calculated: (Total Collateral Value × 100) / Debt Minimum 150% health required Loan issued if collateral sufficient Health Monitoring System continuously monitors health factor Two protection thresholds: 150%+: Normal operation ✅ 120%: Auto-rebalancing and yield diversion triggered 🟡 Emergency Protection Sequence Stage 1: Crash Mode (Health < 120%) 1. triggerCrashMode() activated 2. 50% of risky assets converted to safe assets 3. Portfolio becomes more stable 4. Health factor improves Stage 2: Yield Diversion (Health < 120%) 1. Available yield tokens identified 2. Yield diverted to reduce debt 3. Debt decreases, improving health 4. User retains core collateral Future Enhancement: RWA Integration The protocol includes RWA token infrastructure for future emergency collateral features: - Tokenized real-world assets can be deposited - Vault can lock RWA during crash mode - Provides additional protection layer when implemented Example Scenario Initial State: Collateral: 1000 RISK + 200 SAFE + 100 YIELD = 1300 tokens Loan: 500 tokens Health: 260% ✅ Market Crash (-40%): Collateral drops to: 600 RISK + 200 SAFE + 100 YIELD = 900 tokens Debt remains: 500 tokens Health: 180% 🟡 Protection Activated: 50% RISK → SAFE: 300 RISK converted New balance: 300 RISK + 500 SAFE + 100 YIELD = 900 tokens Portfolio now more stable Liquidation prevented!
技術堆疊
籌資狀態
1. Zero-Liquidation Architecture Never Get Liquidated: Multi-layer protection prevents forced liquidations Automatic Protection: No user intervention needed - smart contracts handle everything Graceful Degradation: System progressively activates stronger protections as needed 2. Real-World Asset Integration Tokenize Physical Assets: Convert real estate, invoices, commodities into collateral Emergency Unlocking: RWAs automatically lock during critical health scenarios Asset Verification: On-chain tracking of asset type, location, and value Flexible Asset Types: Supports multiple RWA categories (real estate, invoices, gold, etc.) 3. Intelligent Collateral Management Dynamic Rebalancing: Portfolio automatically shifts from risky to safe assets Health Factor Monitoring: Continuous tracking with multi-threshold protection Yield Optimization: Yield-generating assets buffer debt during downturns Transparent Mechanics: All protection triggers visible on-chain 4. User-Centric Design 150% Minimum Collateral: Lower barrier than most DeFi protocols (vs 200%+) Real-Time Dashboard: Live updates on health, collateral, and protection status One-Click Actions: Simplified UI for deposits, loans, and monitoring Clear Error Messages: Helpful guidance when transactions fail 5. Multi-Chain Ready Optimism Stack Compatible: Deployed on Mantle Sepolia (OP Stack) Layer 2 Efficiency: Low gas fees for frequent rebalancing operations Scalable Architecture: Can expand to multiple L2s and sidechains