Protocol Architecture
The SoulPeg protocol consists of a modular smart contract system designed to maximize yield generation while maintaining security and simplicity. It issues and manages a soul-bound, yield-bearing token (sUSDC) that generates returns through integration with Venus Protocol.
Core Design Principles
- Modularity: Separate contracts for staking logic, yield routing, and strategy implementation.
- On-chain enforcement: All critical constraints—such as transfer restrictions and lock timers—are enforced on-chain.
- Permissioned operations: Critical functions require owner or operator roles (ideally a multisig).
- State transparency: All relevant protocol and user states can be accessed via public view functions.
- Yield optimization: Automated routing of deposits to yield-generating strategies.
Contract Architecture
The protocol consists of three main contracts:
1. StakeableAssetImpl (sUSDC Token)
Extends OpenZeppelin modules:
ERC20Upgradeable
: Standard token interface with upgradeability.ERC20PermitUpgradeable
: EIP-2612 gasless approvals.Ownable2StepUpgradeable
: Secure two-step ownership transfers.ReentrancyGuardUpgradeable
: Blocks reentrancy attacks.PausableUpgradeable
: Emergency pause functionality.
2. StrategyRouter
- Routes USDC deposits to yield-generating strategies
- Manages strategy weights and allocations
- Handles withdrawals from strategies
- Owner-controlled strategy management
3. VenusUSDCVault
- ERC-4626 compliant vault for Venus Protocol integration
- Deposits USDC into Venus to earn yield
- Manages vUSDC tokens and yield accrual
- Provides standardized interface for the router
Functional Modules
Core Token Functions
- Deposit & Minting: Converts USDC → sUSDC at 1:1 with user-defined lock period.
- Reward Distribution: Issues additional sUSDC from generated yields.
- Unlocking: Manual unlock after lock expiry.
- Early Redemption: Operator-controlled burn of sUSDC in exchange for USDC.
- Transfer Restrictions: Locked tokens cannot be transferred or approved.
Yield Generation
- Automated Routing: Deposits are automatically routed to Venus Protocol.
- Yield Collection: Generated yields are collected and distributed to stakers.
- Protocol Fee: 7% of Venus yields retained as protocol revenue.
- Transparent APY: Users receive 93% of Venus Protocol's yield.
Security Controls
- Role-based Access: Owner and operator roles for different functions.
- Pause Mechanism: Emergency pause for critical operations.
- Daily Limits: Configurable limits on deposits and mints.
- Two-step Transfers: Secure ownership transfer process.
Yield Flow Diagram
User USDC → StakeableAsset → StrategyRouter → VenusUSDCVault → Venus Protocol
↓
User sUSDC ← Reward Distribution ← Protocol (93%) ← Yield Generation
Operational Boundaries
SoulPeg maintains security by avoiding:
- Auto-compounding logic within the token contract.
- Default transferability for locked positions.
- Inflation-based yield mechanisms.
- Direct dependency on external oracles.
Summary
The protocol architecture is purposefully constrained: it avoids unnecessary complexity to reduce the attack surface and improve auditability. With a single, compact contract structure and strict enforcement of lock/transfer logic, SoulPeg is designed for long-term reliability in adversarial environments.