Technical Architecture
Aegis is a decentralized, non-custodial staking protocol built on the BNB Smart Chain (BSC). It utilizes a Factory-based architecture to deploy and manage liquidity pools dynamically.
Aegis is a decentralized, non-custodial staking protocol built on the BNB Smart Chain (BSC). It utilizes a Factory-based architecture to deploy and manage liquidity pools dynamically. The protocol is designed to be modular, gas-efficient, and secure, leveraging industry standard libraries (OpenZeppelin) alongside custom logic for hybrid staking models.

Core Components
The Aegis ecosystem consists of three primary smart contract types:
1. The Aegis Factory (StakingFactory) The heart of the protocol. This singleton contract acts as the central registry and deployment mechanism.
Deterministic Deployment: Allows the protocol administrator to deploy new pools without modifying the frontend source code.
Registry: Maintains an on-chain array (
allPools) of every deployed staking contract, ensuring transparency and discoverability.Access Control: Utilizes
Ownablerestricted functions to prevent unauthorized pool creation.
2. Fixed Yield Vaults (NeonFixedStaking) Designed for deterministic returns based on time-locking.
Logic: Users stake tokens for a pre-defined
lockDuration.Reward Calculation: Rewards are calculated linearly based on the APY set at deployment:

Lock Mechanism: The
withdrawfunction enforces a timestamp check (block.timestamp >= stakeTimestamp + lockDuration), ensuring liquidity remains in the protocol for the agreed period.Decimal Agnostic: The math logic dynamically handles tokens with varying decimals (e.g., 6 for USDC vs 18 for native tokens) by calculating rewards based on the principal amount ratio.
3. Flexible Liquidity Mining (NeonStaking) Based on the Synthetix "StakingRewards" logic, optimized for continuous liquidity provision.
Logic: Users can stake and unstake at any second (
block.timestampprecision).Reward Distribution: Rewards are distributed pro-rata based on the user's share of the total pool:

Solvency Checks: The contract includes a
notifyRewardAmountfunction with built-in checks to ensure the contract always holds enough reward tokens to cover the advertised rate for the remaining duration.
Last updated