StakingBoost Technical Specification
Overview
Formula (from Whitepaper)
Boost APY = Base APY + (Annual Protocol Revenue → FXRP) × (Your Locked SHIELD ÷ Total Locked SHIELD)Architecture
Contract Interactions
┌─────────────────────────────────────────────────────────────────────────────┐
│ Revenue Distribution Flow │
│ │
│ ┌──────────────┐ deposit/withdraw fees ┌───────────────────┐ │
│ │ ShXRPVault │ ───────────────────────────► │ RevenueRouter │ │
│ │ (ERC-4626) │ │ (Fee Splitter) │ │
│ └──────┬───────┘ └─────────┬─────────┘ │
│ │ │ │
│ │ donateOnBehalf() │ distribute() │
│ │ (mints shXRP) │ │
│ │ ▼ │
│ │ ┌─────────────────────┐ │
│ │ │ Revenue Split │ │
│ │ │ ────────────────── │ │
│ │ │ 50% → Burn SHIELD │ │
│ │ │ 40% → FXRP → Boost │ │
│ │ │ 10% → Reserves │ │
│ │ └─────────┬─────────┘ │
│ │ │ │
│ │ │ distributeBoost() │
│ │ ▼ │
│ │ ┌─────────────────────┐ │
│ │ │ StakingBoost │ │
│ │ │ ─────────────────── │ │
│ │ │ rewardPerToken += │ │
│ │ │ fxrp/totalStaked │ │
│ └─────────────────────────────────────│ │ │
│ claim() │ SHIELD stakers │ │
│ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘Circular Dependency Solution
Synthetix Reward Accumulator
Core State Variables
Mathematics
Gas Complexity
Operation
Gas Complexity
Notes
Smart Contract Interface
StakingBoost.sol
ShXRPVault.sol Additions
RevenueRouter.sol (FXRP-Based)
Events
StakingBoost Events
ShXRPVault Events
Security Considerations
Access Control
Function
Access
Reason
Reentrancy Protection
Edge Cases
Test Coverage
test/boost-flow.ts (16 tests)
Configuration Parameters
Parameter
Default
Range
Description
Upgrade Considerations
Current Design Limitations
Upgrade Path
Future Improvements (Post-V1)
Deployment Checklist
Last updated