A decentralized finance (DeFi) application built on the Internet Computer (ICP) blockchain that introduces a stablecoin called iUSD. The protocol allows users to lock collateral assets (ICP, ckBTC, and ckETH) and mint iUSD against them, similar to MakerDAO's DAI but leveraging ICP's unique capabilities.
- Multi-collateral lending platform
- 75% loan-to-value (LTV) ratio
- Real-time price feeds using ICP's HTTPS outcalls
- Automated liquidation system
- Decentralized governance (planned)
iUSD/
├── src/
│ ├── lib.rs # Main canister entry point
│ ├── vault_system.rs # Core vault management system
│ ├── iusd_token.rs # iUSD token implementation (ICRC-2 compatible)
│ ├── price_feed.rs # Price oracle system
│ ├── liquidation.rs # Liquidation mechanism
│ └── bin/
│ └── liquidator_bot.rs # Off-chain liquidation bot
├── Cargo.toml # Project dependencies
└── dfx.json # Internet Computer project config
- Manages user vaults and collateral
- Handles minting and burning of iUSD
- Implements safety checks for collateral ratios
- TODO: Update
CANISTER-ID-HEREplaceholder with actual iUSD canister ID
- ICRC-2 compatible token implementation
- Implements minting/burning mechanics
- Includes transfer functionality
- Maintains transaction history
- Fetches prices from multiple sources:
- CoinGecko
- Binance
- Kraken
- Implements median price calculation
- Includes staleness checks
- Price deviation monitoring
- Monitors vault health
- Executes liquidations when collateral ratio drops
- Handles collateral auctions
- TODO: Update canister IDs for:
- ICP Ledger
- ckBTC
- ckETH
- Off-chain monitoring system
- Automated liquidation execution
- Profit calculation
- TODO: Implement
setup_identity()function for key management
- Internet Computer SDK (dfx)
- Rust toolchain
- Required canister IDs
- Access to price feed APIs
PROTOCOL_CANISTER_ID="your-protocol-canister-id"
IUSD_CANISTER_ID="your-iusd-canister-id"- ICP: 75% LTV ratio
- ckBTC: 75% LTV ratio
- ckETH: 75% LTV ratio
-
Price Feed System
- Implement emergency price feed fallbacks
- Add more sophisticated price aggregation
- Set up monitoring for API health
-
Liquidation System
- Add monitoring and alerting
- Implement parallel liquidation execution
- Add configuration file system
- Complete keeper incentive mechanism
-
Governance
- Implement governance token
- Create proposal system
- Set up parameter adjustment mechanism
-
Security
- Complete security audit
- Implement emergency shutdown mechanism
- Add rate limiting
-
Testing
- Write comprehensive test suite
- Set up integration tests
- Perform load testing
- Basic vault system implementation
- iUSD token implementation
- Price feed system
- Liquidation mechanism
- Liquidator bot framework
- Governance system
- Emergency mechanisms
- Testing framework
- Production deployment
- Price feed manipulation resistance
- Liquidation race conditions
- Flash loan attack prevention
- Oracle failure scenarios
- Collateral volatility management
- Deploy token canister
- Deploy vault system
- Configure price feeds
- Set up liquidation system
- Test liquidator bot
- Configure governance parameters
- All monetary values use 8 decimal places
- Minimum collateral requirements vary by asset
- Liquidation bonus is configurable (default 10%)
- Price feeds require 2/3 sources to agree within 5%
- System uses weighted median for final prices
- Fork the repository
- Create feature branch
- Submit pull request
- Ensure tests pass
- Update documentation
[Add chosen license]
[Add contact information]