PrimeStaking Layer

2. PrimeStaking Layer

This layer governs deposit and withdrawal orchestration, share pricing logic, accounting state management, and intra-vault liquidity coordination. Prime Vaults supports multiple StakingVaults, typically one per asset type (e.g., BTC, ETH, USD). Each StakingVault functions as an independent financial unit and encapsulates a standardized set of modules that collectively manage user capital from deposit to withdrawal.

Each StakingVault is a self-contained financial unit composed of 5 core modules:

Teller

Validates user actions and enforces vault policies. Responsibilities include:

  • Routing user deposits and withdrawals

  • Requesting up-to-date exchange rate and accounting data from the Accountant

  • Initiating share minting on deposits via the vault

  • Coordinating share burning through the withdrawal module on exits

  • Acting as the canonical entry/exit point of each vault

  • Enforcing deposit caps, pausability, and share lock constraints

Accountant

Internal accounting engine of the StakingVault. Responsible for:

  • Calculates and updates the exchange rate for vault shares

  • Accruing time-based platform fees

  • Tracks the accounting state required to support accurate share pricing

Manager

Acts as an execution firewall between StakingVaults and the Strategy Layer. The Manager:

  • Verifies Merkle proofs for strategy-related operations

  • Enforces a governance-approved whitelist of allowed actions

  • Ensures that only authorized and validated capital movements can reach the strategy layer

Distributor

Responsible for reward rate configuration and reward distribution. The Distributor:

  • Defines reward rates for the asset type associated with the vault

  • Calculates user reward entitlement

  • Executes payouts when users claim rewards

  • Synchronizes reward accounting prior to balance changes

Withdrawal Queue

Manages the full lifecycle of user withdrawal requests in a secure and orderly manner. Its responsibilities include:

  • Receiving and locking user Vault Shares during the 72-hour unlock period

  • Supporting Speed Claim (early unlock) via withdrawal acceleration fees

  • Ensuring smooth settlement without disrupting active strategy positions

  • Coordinating liquidity availability between the StakingVault and the Strategy Layer

  • Enforcing outstanding withdrawal invariants to maintain vault solvency

Last updated