Architecture
Pike's modular architecture is designed to:
Balance risk isolation and capital efficiency, ensuring optimized liquidity management.
Seamlessly integrate with future blockchain innovations, enabling adaptability and long-term scalability.
Support factory-based deployments and multi-tier governance, allowing for customizable and autonomous market management.
The following diagram illustrates the smart contract architecture of Pike, showcasing the key components and their interactions within the system.

Factory
The Factory contract serves as the central entry point for deploying new Pike Market instances and managing market creation. It ensures a structured deployment process while maintaining a registry of deployed contracts.
Key Functions
Protocol Deployment: The Factory acts as a single entry point for deploying new protocols.
Market Deployment: Authorized governors can deploy new markets through the Factory.
Registry Management: The Factory maintains a record of all deployed protocol instances and markets for easy reference and governance.
Router Proxy
The Router Proxy is a static diamond proxy that enables modular, upgradeable contracts by directing function calls to specific implementation modules. It maintains a single storage layout, ensuring consistency across contract upgrades.
Key Functions
Upgradeability: Pike Market leverages the Router Proxy to enable seamless contract upgrades.
Modular Architecture: Calls are routed to individual modules without affecting global storage.
Applications: The Router Proxy is applied to key components such as the Risk Engine and pTokens, allowing them to be updated without redeploying the entire protocol.
Oracle Engine
The Oracle Engine is a core infrastructure component of Pike that manages price data configuration and retrieval for pTokens. It acts as a unified interface that routes price requests to appropriate oracle providers while supporting multiple oracle implementations and fallback mechanisms for enhanced reliability.
Key Features
Multi-Oracle Support: Compatible with Chainlink, Pyth
Fallback Mechanism: Configurable secondary oracle with price validation
Governance Control: Protocol governor manages all oracle configurations
Price Validation: Automatic bounds checking between main and fallback oracles
Timelock & Governance
Pike implements a robust governance framework using an extended OpenZeppelin Timelock contract that enforces time delays for all protocol configuration changes. The system features multiple execution paths: the Governor proposes routine changes through the standard time-delayed process, the Timelock Emergency Executor can bypass delays for critical Timelock-managed functions, and the Protocol Emergency Guardian operates independently with direct access to emergency protocol functions like pausing and reserve withdrawals. This multi-layered approach ensures democratic oversight for routine changes while maintaining rapid response capabilities for emergencies, with all configuration functions—including oracle settings, risk parameters, and market caps—flowing through appropriate governance channels.
Key Features:
Time-Delayed Governance: Enforced delays provide community review periods for protocol changes
Emergency Bypass: Critical actions can be executed immediately when necessary
Democratic Execution: Anyone can execute approved proposals after the delay period
Role Separation: Different entities handle routine governance vs. emergency responses
For more details, please refer to the Governance section.
Last updated