Built with Hardhat 3 Beta & Next.js 15 - The Future of DeFi Protection
DeFi Guardians is competing in multiple tracks:
- π Chainlink CCIP Best Usage ($6,000) - Revolutionary cross-chain insurance using CCIP for seamless Sepolia β Hedera communication
- π PYUSD Most Innovative Payment ($3,500) - Novel cross-chain insurance premium splitting and claim payout automation
- π· Hardhat 3 Best Projects ($5,000) - Built entirely with Hardhat 3 Beta featuring 154 comprehensive tests, lightning-fast compilation, cross-chain deployment capabilities, and modern TypeScript integration demonstrating the full potential of next-generation Solidity development
- ποΈ Hedera EVM Smart Contracts ($3,500) - Advanced smart contract deployment with CCIP enabled.
- πΌ Dynamic Best Financial App ($3,333) - Seamless DeFi insurance platform with embedded wallet infrastructure
- π€ Nora AI Coding Best Use ($5,000) - Advanced AI-assisted Solidity development and optimization
DeFi Guardians is a revolutionary cross-chain decentralized insurance protocol that protects DeFi users from smart contract exploits, rug pulls, and protocol failures. This comprehensive solution combines robust smart contracts with an intuitive web interface, demonstrating the full power of next-generation blockchain development.
- π Cross-Chain Architecture: Seamless operation between Sepolia (Sepolia) and Hedera Testnet using Chainlink CCIP
- π° Liquidity Provider Rewards: 70% of premiums distributed to LPs, 30% reserved for claims
- π³οΈ Decentralized Governance: LP-based voting system for claim validation
- π Modern Web Interface: Built with Next.js 15, TypeScript, and Tailwind CSS
- π± Mobile-First Design: Responsive interface optimized for all devices
- π Dynamic Wallet Integration: Embedded wallet infrastructure with seamless user onboarding
- πΌ One-Click Financial Operations: Simplified PYUSD insurance purchases and claim processing
- β‘ Real-Time Updates: Live dashboard with policy status and claim tracking
βββββββββββββββββββ CCIP βββββββββββββββββββ
β Sepolia βββββββββββββββΊβ Hedera β
β β β β
β β’ PremiumVault β β β’ PolicyManager β
β β’ LPVault β β β’ ClaimManager β
β β’ PayoutVault β β β’ VotingMirror β
βββββββββββββββββββ βββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββ
β Next.js App β
βββββββββββββββββββββββββββββββββββββββββββ€
β β’ Hero Section & Navigation β
β β’ Coverage Purchase Widget β
β β’ User Dashboard β
β β’ Governance Interface β
β β’ Real-time Analytics β
βββββββββββββββββββββββββββββββββββββββββββ
- Node.js 18+
- pnpm (recommended) or npm
- Git
- MetaMask or compatible wallet
# Clone the repository
git clone https://github.com/your-username/defi-guardians.git
cd defi-guardians
# Install dependencies
pnpm install
# Add contracts submodule
git submodule add https://github.com/gokulnpc/Defi-Guardian-Contracts.git contracts-repo
git submodule update --init --recursive
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your configuration# Start the development server
pnpm dev
# In another terminal, compile smart contracts
pnpm compile
# Run tests
pnpm test
# Run specific test file
pnpm test:simple| Contract | Network | Purpose |
|---|---|---|
| PremiumVault | Sepolia | Handles premium payments and CCIP messaging |
| LPVault | Sepolia | Manages liquidity provider stakes and rewards |
| PayoutVault | Sepolia | Holds reserves and processes claim payouts |
| PolicyManager | Hedera | Issues policy NFTs and manages coverage |
| ClaimManager | Hedera | Processes claims and manages voting |
| VotingMirror | Hedera | Mirrors LP voting power from Sepolia |
# Deploy to Sepolia Sepolia
pnpm deploy:sepolia
# Deploy to Hedera Testnet
pnpm deploy:hedera
# Verify contracts
pnpm verify:allsequenceDiagram
participant User
participant PremiumVault
participant CCIP
participant PolicyManager
User->>PremiumVault: buyCoverage()
PremiumVault->>PremiumVault: Split premium 70/30
PremiumVault->>CCIP: Send policy data
CCIP->>PolicyManager: Receive policy data
PolicyManager->>User: Mint Policy NFT
sequenceDiagram
participant User
participant ClaimManager
participant VotingMirror
participant CCIP
participant PayoutVault
User->>ClaimManager: openClaim()
ClaimManager->>VotingMirror: Get LP voting power
Note over ClaimManager: 5-minute voting period
ClaimManager->>CCIP: Send payout instruction
CCIP->>PayoutVault: Process payout
PayoutVault->>User: Transfer funds
- π Hero Section: Animated landing page with protocol overview
- π³ Coverage Widget: Simplified insurance purchase interface
- π Dashboard: Personal policy management and analytics
- π³οΈ Governance: LP voting interface for claims
- π Real-time Updates: Live status tracking and notifications
- π¨ Modern UI: Built with Radix UI components and Tailwind CSS
- π Dark/Light Mode: Theme switching with next-themes
- π± Responsive Design: Mobile-first approach with fluid layouts
- βΏ Accessibility: WCAG compliant with keyboard navigation
- β‘ Performance: Optimized with Next.js 15 app router
# Run all tests
pnpm test
# Run specific test suites
pnpm test:premium-vault
pnpm test:claim-manager
pnpm test:cross-chain
# Run with coverage
pnpm test:coverage
# Run in watch mode
pnpm test:watch# Run component tests
pnpm test:frontend
# Run E2E tests
pnpm test:e2e
# Run accessibility tests
pnpm test:a11y| Protocol | TVL | Risk Level | Premium Rate |
|---|---|---|---|
| Uniswap V3 | $2.1B | Low | 2.5% APR |
| Aave V3 | $1.8B | Low | 3.0% APR |
| Compound V3 | $1.2B | Medium | 4.0% APR |
| GMX V2 | $800M | Medium | 5.0% APR |
| Radiant Capital | $400M | High | 8.0% APR |
- π» Smart Contract Exploits: Code vulnerabilities and hacks
- π Rug Pulls: Team abandonment and fund theft
- π Oracle Failures: Price manipulation attacks
- π³οΈ Governance Attacks: Malicious proposal execution
- π Bridge Failures: Cross-chain infrastructure risks
- π‘οΈ Access Controls: Multi-signature and role-based permissions
- π Reentrancy Protection: All state-changing functions protected
- β Input Validation: Comprehensive parameter checking
- π Audit Ready: Code optimized for security reviews
- π Wallet Security: Secure wallet connection via Dynamic Labs
- π‘οΈ Data Protection: Client-side encryption for sensitive data
- π HTTPS Only: Secure communication protocols
- π Content Security: CSP headers and XSS protection
| Contract | Sepolia Sepolia | Hedera Testnet |
|---|---|---|
| PremiumVault | 0x8CDBf091e385D0D4A7e8bf7D9AE11d69647bF499 |
- |
| LPVault | 0xEC1f7B099c0a984badF83222aeb61f1e4cd7dB97 |
- |
| PayoutVault | 0x6f5421f96786F69609b3f2d15A268A5c4cbD6dEc |
- |
| PolicyManager | - | 0xd1b6BEa5A3b3dd4836100f5C55877c59d4666569 |
| ClaimManager | - | 0x9D4646f64dF7D98c6a83D60a9Af06c67a9eE0215 |
| VotingMirror | - | 0xe1C31E56De989192946f096eBA8Ed709C2Ec9003 |
- β Comprehensive test coverage (100%)
- β Gas optimization completed
- β Security review ready
- β Frontend production build tested
- β³ External audit pending
- β³ Mainnet deployment planned
- π‘οΈ Risk Protection: Insure your DeFi positions against smart contract risks
- π Portfolio Safety: Comprehensive coverage across multiple protocols
- π Easy Claims: Streamlined claim submission and processing
- π° Yield Generation: Earn from insurance premiums
- π³οΈ Governance Power: Vote on claims and protocol decisions
- π Diversified Returns: Risk-adjusted yields from insurance activities
- π User Confidence: Offer insurance to attract more users
- π Risk Analytics: Access detailed risk assessment data
- π€ Partnership: Integrate insurance into your protocol
- $200B+ DeFi Market: Massive addressable market for insurance
- $2B+ Losses: Annual losses from exploits and failures
- Low Coverage: <1% of DeFi assets currently insured
- Cross-Chain First: Built for multi-chain DeFi ecosystem
- Hardhat 3 Powered: Leveraging cutting-edge development tools
- Modern Stack: Next.js 15, TypeScript, Tailwind CSS
- Real-time Sync: Instant cross-chain state synchronization
- Lower Costs: No intermediaries, pure smart contract automation
- Faster Claims: 5-minute voting periods vs weeks in traditional insurance
- Transparent: All operations visible on-chain
- Composable: Easily integrated into existing DeFi protocols
DeFi Guardians Core Team:
- Hardhat Team for building the incredible Hardhat 3 development environment
- Chainlink for providing robust CCIP cross-chain infrastructure
- OpenZeppelin for battle-tested smart contract libraries
- Hedera for high-performance distributed ledger technology
- Dynamic Labs for seamless wallet connectivity
- Vercel for hosting and deployment infrastructure
DeFi Guardians represents the convergence of cutting-edge blockchain development and modern web technologies. We're not just building insurance; we're building the foundation for a safer, more secure DeFi ecosystem.
Ready to revolutionize DeFi insurance? Let's build the future together! π
For questions, feedback, or collaboration opportunities, please open an issue or reach out to our team.