Hyro Protocol logo mark
Hyro Protocol
Explore vaults

Verification Layer

The HYRO Protocol verification system provides comprehensive validation and monitoring through a combination of challenge-based qualification and oracle-driven performance tracking. The current implementation focuses on challenge-based manager verification with real-time performance monitoring, while advanced verification features are planned for future phases.

Challenge-Based Verification System

Meritocratic Qualification The protocol uses challenge-based verification to ensure only qualified managers can access vault capital:

  • Transparent Performance Tracking: All trading activities are recorded and verified on-chain
  • Objective Qualification Criteria: Managers must demonstrate profitable trading within defined risk parameters
  • Real-Time Monitoring: Continuous tracking of challenge progress and rule compliance
  • Automated Disqualification: Immediate removal from challenges upon rule violations

Challenge Template Parameters Verification criteria are defined through challenge templates with standardized parameters:

  • Profit Targets: Required profit percentages for successful completion
  • Risk Limits: Maximum daily drawdown and total loss thresholds
  • Trading Requirements: Minimum trading days and activity levels
  • Performance Metrics: Win rates, average trade duration, and position sizing

Oracle-Driven Performance Monitoring

Real-Time Data Processing The oracle system provides continuous verification of trading performance:

  • NATS Message Queue: Reliable delivery of challenge update messages
  • Performance Aggregation: Real-time calculation of profit/loss, drawdown, and trading metrics
  • Rule Enforcement: Automated validation against challenge parameters
  • State Synchronization: On-chain updates based on off-chain trading data

Challenge Update Flow The verification process follows a structured pipeline:

  1. Data Collection: Oracle receives trading performance data via NATS
  2. Validation: Message format and required fields are validated
  3. Template Verification: Confirms challenge belongs to managed template
  4. Performance Calculation: Computes current profit/loss and risk metrics
  5. Rule Checking: Validates against drawdown limits and profit targets
  6. State Update: Updates challenge status on-chain based on results
  7. Response Publishing: Publishes processing results for monitoring

Verification Criteria

Financial Performance Validation The system validates multiple financial metrics:

  • Profit Targets: Achieved profit percentage vs required targets
  • Drawdown Limits: Current drawdown vs maximum allowed levels
  • Loss Thresholds: Total losses vs maximum loss limits
  • Balance Tracking: Starting balance, current balance, and performance calculations

Trading Activity Validation Trading behavior is monitored for compliance:

  • Minimum Trading Days: Required number of active trading days
  • Position Sizing: Validation of position sizes against limits
  • Trading Frequency: Monitoring of trading activity and consistency
  • Risk Management: Adherence to defined risk parameters

Rule Violation Detection The system automatically detects and responds to rule violations:

  • Drawdown Violations: Immediate detection of excessive losses
  • Profit Target Failures: Tracking of progress toward profit goals
  • Trading Day Requirements: Monitoring of minimum trading activity
  • Risk Limit Breaches: Detection of position size or leverage violations

On-Chain State Management

Challenge Account Structure Challenge verification is managed through comprehensive on-chain accounts:

1pub struct Challenge {
2 pub challenge_id: String, // Unique challenge identifier
3 pub stage_id: u16, // Template stage identifier
4 pub stage_sequence: u8, // Template sequence number
5 pub stage_type: StageType, // Challenge type (evaluation/funded)
6 pub effective_from: u64, // Challenge start timestamp
7 pub starting_balance: u64, // Initial challenge balance
8 pub latest_balance: u64, // Current challenge balance
9 pub profit_target: ProfitTarget, // Profit target parameters
10 pub trading_days: TradingDays, // Trading day requirements
11 pub maximum_loss: MaximumLoss, // Maximum loss parameters
12 pub daily_drawdown: DailyDrawdown, // Daily drawdown limits
13 pub user: Pubkey, // Challenge participant
14 pub status: ChallengeStatus, // Current challenge status
15 pub payout: u64, // Calculated payout amount
16 pub created_at: u64, // Creation timestamp
17 pub updated_at: u64, // Last update timestamp
18}

Status Transitions Challenge status is managed through defined state transitions:

  • Initialized: Challenge created and ready to begin
  • Active: Challenge in progress with ongoing trading
  • Completed: Challenge successfully completed with profit target met
  • Failed: Challenge failed due to rule violation or loss limit breach

Oracle Integration

NATS-Based Architecture The oracle system provides reliable verification data processing:

  • Message Persistence: JetStream ensures message delivery and processing
  • Template Discovery: Automatic discovery of managed challenge templates
  • Challenge Monitoring: Continuous monitoring of active challenges
  • Data Transformation: Conversion of off-chain data to on-chain format

Verification Data Flow The oracle processes verification data through a structured pipeline:

  1. Message Reception: Oracle receives challenge update messages
  2. Data Validation: Validates message format and required fields
  3. Template Verification: Confirms challenge belongs to managed template
  4. Performance Calculation: Computes current performance metrics
  5. Rule Validation: Checks compliance with challenge parameters
  6. State Update: Updates challenge status on-chain
  7. Response Publishing: Publishes processing results

Security and Reliability

Data Integrity The verification system ensures data integrity through multiple mechanisms:

  • Cryptographic Validation: Oracle keypair provides authentication
  • Template Verification: Confirms challenge belongs to managed template
  • Message Validation: Comprehensive validation of all message fields
  • State Consistency: Atomic updates ensure consistent on-chain state

Error Handling Robust error handling ensures reliable verification:

  • Validation Errors: Invalid message format or missing fields
  • Template Errors: Challenge doesn't belong to managed template
  • Blockchain Errors: Transaction failures or network issues
  • Retry Logic: Automatic retry with exponential backoff
  • Dead Letter Queue: Failed messages for manual review

Monitoring and Observability Comprehensive monitoring provides visibility into verification processes:

  • Health Checks: Regular health status reporting
  • Performance Metrics: Processing times and success rates
  • Error Tracking: Detailed error logging and categorization
  • Audit Logs: Complete audit trail for compliance

Future Verification Enhancements

Advanced Verification Engine (Planned) Future phases will include comprehensive verification features:

  • Pre-Execution Validation: Trade validation before execution
  • Multi-Source Data Validation: Cross-validation from multiple sources
  • Advanced Risk Metrics: Sophisticated risk calculation and monitoring
  • Integration with External Oracles: Pyth, Switchboard, and other oracle networks

Enhanced Compliance Advanced compliance features will include:

  • Regulatory Reporting: Automated compliance reporting
  • Audit Trail Enhancement: Comprehensive audit capabilities
  • Risk Monitoring: Advanced risk detection and alerting
  • Performance Analytics: Detailed performance analysis and reporting

The verification system provides a robust foundation for challenge-based manager qualification while maintaining transparency, security, and reliability throughout the verification process.