Protocol Architecture

Understanding the Architecture of Herafi

System Overview

Herafi Protocol employs a modular architecture with separate components handling specific functions while maintaining interoperability. This design allows for focused development, targeted upgrades, and clear separation of concerns. The high-level architecture follows this structure:

This modular approach allows each component to be upgraded or replaced independently while maintaining the overall system functionality.

Core Components

Herafi Protocol consists of three primary core components and several supporting systems:

  • HeraPool: The derivative token factory that creates and manages synthetic assets backed by specified collateral ratios.
  • HeraStrategy: The collateral management layer that optionally enables yield generation for selected assets through integration with established protocols.
  • UnifiedLiquidityPool: The liquidity management system that enables capital-efficient operations with dynamic pricing mechanisms.
  • Governance Framework: The system responsible for protocol parameter management, derivative token creation authorization, and fee distribution.
  • Oracle System: The price feed integration providing accurate market data for token valuation and operations.
  • External Protocol Integrations: Connections to lending protocols and other DeFi systems for yield generation and expanded functionality.

Contract Interaction Flow

The typical interaction flow between contract components follows this pattern:

  • User interactions start at the protocol interface (frontend or direct contract calls)
  • Requests are routed to the appropriate core component
  • Core components interact with each other as needed to fulfill the request
  • External integrations are utilized when required (e.g., yield generation, price feeds)
  • Results are returned to the user

For example, a derivative token issuance would flow as follows:

While a single-token swap would flow as:

On this page