Manager Role Implementation
Overview
The manager role system enables qualified traders to access protocol capital through a transparent verification process. Managers can create child vaults with allocated funds while maintaining security through admin-controlled verification and policy-based access controls.
Current Implementation Status
Implemented Features:
- Manager registry with profile management
- Admin-controlled manager verification
- Basic child vault creation framework
- Risk rating system
Planned Features:
- Balance tracking and performance monitoring
- Fee collection mechanisms
- Event emission system
Manager Registry
The registry tracks verified managers and their capabilities:
- Manager Profiles: Basic information, verification status, and risk ratings
- Verification System: Admin-controlled approval process for new managers
- Risk Assessment: Conservative, Moderate, Aggressive, and Speculative risk categories
- Performance Tracking: AUM and active vault monitoring
Register Manager
1await hyroProgram.methods2 .registerManager(RiskRating.Moderate)3 .accounts({4 managerRegistry: registryPDA,5 manager: managerKeypair.publicKey,6 admin: adminKeypair.publicKey7 })8 .signers([adminKeypair])9 .rpc();
Verify Manager
1await hyroProgram.methods2 .verifyManager(VerificationStatus.Verified)3 .accounts({4 managerRegistry: registryPDA,5 managerProfile: managerProfilePDA,6 admin: adminKeypair.publicKey7 })8 .signers([adminKeypair])9 .rpc();
Child Vault Creation
Verified managers can create child vaults with allocated funds from parent vaults:
- Allocation Control: Managers receive specific fund allocations for trading
- Policy Integration: Child vaults inherit policy controls from parent vaults
- Admin Oversight: All child vault creation requires admin approval
- Balance Tracking: Framework for monitoring on-chain and off-chain balances
Create Child Vault
1const managerFees = {2 performanceFeeRate: 2000, // 20%3 managementFeeRate: 200, // 2%4 collectionFrequency: FeeCollectionFrequency.Monthly,5 highWaterMark: allocation,6 feeRecipient: managerKeypair.publicKey7};89await hyroProgram.methods10 .issueChildVault(seed, allocation, managerFees)11 .accounts({12 parentVault: parentVaultPDA,13 childVault: childVaultPDA,14 childAuthority: childAuthorityPDA,15 managerRegistry: registryPDA,16 managerProfile: managerProfilePDA,17 childPolicy: policyPDA,18 manager: managerKeypair.publicKey,19 admin: adminKeypair.publicKey20 })21 .signers([adminKeypair])22 .rpc();
Security Model
Non-Custodial Design
- Managers never directly access LP funds
- All transactions require policy validation
- Complete audit trails for all operations
Admin Controls
- Manager verification requires admin approval
- Child vault creation controlled by admin
- Risk parameters set during registration
Policy Integration
- Child vaults inherit security policies from parent vaults
- Transaction validation through policy programs
- Automated rule enforcement
Future Enhancements
Balance Tracking
- Real-time monitoring of on-chain and off-chain balances
- Performance calculation and P&L tracking
- High water mark management for fee calculations
Fee Collection
- Performance-based fee calculations
- Management fee structures
- Automated fee distribution
Event System
- Real-time notifications for vault operations
- Performance milestone tracking
- Audit trail enhancements
Usage Flow
- Manager Registration: Traders register with risk rating
- Admin Verification: Admin approves qualified managers
- Child Vault Creation: Verified managers request fund allocations
- Trading Operations: Managers execute trades within policy constraints
- Performance Monitoring: System tracks results and compliance
Complete Example
1// 1. Initialize manager registry (admin only)2await hyroProgram.methods3 .initializeManagerRegistry()4 .accounts({ managerRegistry: registryPDA })5 .rpc();67// 2. Register manager8await hyroProgram.methods9 .registerManager(RiskRating.Moderate)10 .accounts({11 managerRegistry: registryPDA,12 manager: managerKeypair.publicKey,13 admin: adminKeypair.publicKey14 })15 .signers([adminKeypair])16 .rpc();1718// 3. Verify manager19await hyroProgram.methods20 .verifyManager(VerificationStatus.Verified)21 .accounts({22 managerRegistry: registryPDA,23 managerProfile: managerProfilePDA,24 admin: adminKeypair.publicKey25 })26 .signers([adminKeypair])27 .rpc();2829// 4. Create child vault30await hyroProgram.methods31 .issueChildVault(seed, allocation, managerFees)32 .accounts({33 parentVault: parentVaultPDA,34 childVault: childVaultPDA,35 // ... other accounts36 })37 .signers([adminKeypair])38 .rpc();
The manager role system provides a secure foundation for decentralized asset management while maintaining proper oversight and risk controls.
