Inspiration

Strix was inspired by the need to create a privacy-preserving DeFi lending protocol that protects user identities while enabling transparent financial operations. The challenge was bridging traditional DeFi transparency requirements with user privacy needs using Midnight Network's zero-knowledge capabilities.

What it does

Strix is a decentralized lending protocol with privacy-first design featuring:

  • Private Identity System (zkID): Users get privacy-preserving identity tokens from zkID Issuers
  • Customizable Liquidity Pools: Loan Providers add liquidity and earn interest, Users borrow with 3% commission
  • Privacy-Preserving Lending: Users obtain loans without revealing their identity or transaction details
  • Debt Auction Mechanism: Failed repayments trigger debt auctions where debt collectors can purchase bad debt
  • Selective Identity Revelation: zkID is only revealed to debt collectors during liquidation, maintaining privacy otherwise

How we built it

Smart Contracts (Midnight Compact):

  • TestToken: ERC-20-like token with mint/burn/faucet functionality
  • LiquidityPool: Manages lending/borrowing with health factors and interest calculations
  • zkID: Issues and manages privacy-preserving identity tokens

CLI Infrastructure:

  • Command-Line Interface: Comprehensive CLI tools for contract deployment, interaction, and querying
  • Contract Management: Deploy tokens, create liquidity pools, manage borrowing/lending operations
  • State Querying: Query contract states and transaction history with detailed logging
  • Development Environment: Docker-based standalone Midnight Network with indexer and proof server

Architecture: Bun + Turbo monorepo with end-to-end TypeScript type safety

Challenges we ran into

  • Zero-Knowledge Integration: Learning Midnight Network's zk-proof system for private transactions
  • Contract Orchestration: Coordinating token transfers between contracts while maintaining privacy
  • Identity Revelation Logic: Designing selective identity disclosure only during liquidation
  • Development Environment: Setting up complex Docker configuration for Midnight Network services
  • CLI Complexity: Building comprehensive command-line tools that handle complex contract interactions

Accomplishments that we're proud of

  • Working Smart Contract System: Three interconnected contracts (TestToken, LiquidityPool, zkID) functioning correctly
  • Production-Ready CLI: Comprehensive command-line interface with detailed logging and error handling
  • Token & Pool Initialization: Successfully deployed and initialized test tokens with corresponding liquidity pools
  • Contract State Querying: Built robust querying system to inspect contract states and transaction history
  • Zero-Knowledge Integration: Successfully integrated Midnight's zk-proof system for private transactions
  • Monorepo Architecture: Established scalable TypeScript monorepo with proper build orchestration

What we learned

  • Privacy-by-Design: How to architect systems where privacy is fundamental, not an afterthought
  • ZK-Proof Applications: Deep understanding of zero-knowledge proofs in DeFi contexts
  • Midnight Network Development: Mastery of contract deployment, interaction patterns, and CLI development
  • DeFi Protocol Mechanics: Advanced knowledge of lending protocols, health factors, and liquidation systems
  • CLI Development: Building user-friendly command-line interfaces for complex blockchain interactions

What's next for Strix

  • Frontend Integration: Connect React dashboard to CLI backend for web-based user interface
  • Enhanced zkID System: More comprehensive KYC/AML and dynamic credit scoring
  • Multi-Asset Support: Cross-asset collateralization and multiple token types
  • Advanced Governance: Decentralized protocol parameter management
  • Mobile Application: React Native app for mobile access
  • Real-World Integration: Connect with traditional financial systems and credit bureaus

Built With

Share this project:

Updates