Overview
Overview
Section titled βOverviewβWelcome to Hyra Network! This guide will help you understand the fundamentals of our distributed AI inference platform and how to get started.
What is Hyra Network?
Section titled βWhat is Hyra Network?βHyra Network is a fully decentralized AI inference platform built on Ethereum that enables users to request AI model inference, AI workers to process tasks, and verifiers to validate results using Zero-Knowledge Proofs (ZKP). The entire system operates 100% on-chain with native ETH payments and automatic task creation.
Network Roles
Section titled βNetwork RolesβThe Hyra AI Network consists of three main roles:
π€ AI Workers
Section titled βπ€ AI Workersβ- Claim tasks from the marketplace
- Run AI models to process inference requests
- Submit results with ZKP proofs for verification
- Earn rewards in HYRA tokens for completed tasks
π€ AI End Users
Section titled βπ€ AI End Usersβ- Request AI inference by paying HYRA tokens
- Get AI responses directly from the network
- Access multiple AI models through a unified interface
- Pay per use with transparent pricing
β Verifiers
Section titled ββ Verifiersβ- Validate ZKP proofs to ensure computation integrity
- Distribute rewards to successful AI workers
- Maintain network quality through verification
- Prevent cheating and ensure honest computation
Key Features
Section titled βKey Featuresβπ Zero-Knowledge Proof Verification
Section titled βπ Zero-Knowledge Proof Verificationβ- Prevent AI Worker Cheating: ZKP ensures workers actually performed the computation
- Privacy-Preserving: Input and output data remain encrypted
- Cryptographic Guarantees: Mathematical proof of computation correctness
- No Trust Required: Verification without revealing sensitive data
π‘οΈ High Privacy & Security
Section titled βπ‘οΈ High Privacy & Securityβ- Encrypted Task Input/Output: All data encrypted before submission to smart contracts
- Two-Phase Encryption: Multiple layers of security for maximum protection
- On-Chain Task Distribution: All task management saved on blockchain via smart contracts
- Decentralized Architecture: No single point of failure
β‘ Smart Contract Integration
Section titled ββ‘ Smart Contract Integrationβ- Automatic Task Creation: Tasks created automatically when users request inference
- On-Chain Task Management: All task distribution saved on blockchain
- Native ETH Payments: Simple payment system with native cryptocurrency
- Transparent Pricing: Clear cost calculation based on token usage
How It Works
Section titled βHow It WorksβComplete Workflow
Section titled βComplete Workflowβ- User Request β User pays HYRA tokens and requests AI inference
- Auto Task Creation β ModelRegistry automatically creates AI task in available TaskPool
- AI Worker Claims β AI worker claims task via TaskRouter and gets model data
- AI Processing β AI worker runs the model and generates result + ZKP proof
- Result Submission β AI worker submits result and proof via TaskRouter
- ZKP Verification β Verifier validates the proof and pays rewards
- Result Update β ModelRegistry is updated with the final result
- User Gets Result β User can read the result from ModelRegistry
ZKP Anti-Cheating System
Section titled βZKP Anti-Cheating SystemβThe Zero-Knowledge Proof system ensures AI workers cannot cheat by:
- Proving Computation: Workers must generate cryptographic proof they actually ran the AI model
- Hiding Private Data: Input data and model parameters remain private during verification
- Verifying Correctness: Verifiers can confirm the computation was done correctly without re-running it
- Preventing Lazy Workers: Workers cannot submit random results without doing the work
Privacy Protection
Section titled βPrivacy ProtectionβYour data is protected through:
- Input Encryption: Task inputs encrypted before submission to smart contracts
- Output Encryption: AI results encrypted during transmission
- ZKP Privacy: Zero-knowledge proofs verify computation without revealing data
- Decentralized Storage: No central authority has access to your data
Network Architecture
Section titled βNetwork Architectureββββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββ AI End Users β β AI Workers β β Verifiers ββ β β β β ββ β’ Request AI β β β’ Claim tasks β β β’ Verify ZKP ββ β’ Pay HYRA β β β’ Run models β β β’ Pay rewards ββ β’ Get results β β β’ Submit proofs β β β’ Update resultsββββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β β β βΌ βΌ βΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ HYRA AI Network ββ ββ βββββββββββββββ βββββββββββββββ βββββββββββββββ ββ βModelRegistryβββββΊβ TaskRouter βββββΊβTaskPool β ββ β β β β β β ββ ββ’ User reqs β ββ’ Task dist β ββ’ Task mgmt β ββ ββ’ Payments β ββ’ Worker mgmtβ ββ’ Queues β ββ ββ’ Results β ββ’ Pool disc β ββ’ Rewards β ββ βββββββββββββββ βββββββββββββββ βββββββββββββββ ββ β ββ βΌ ββ βββββββββββββββββ ββ βTaskPoolFactoryβ ββ β β ββ ββ’ Pool creat β ββ ββ’ Pool mgmt β ββ βββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββBenefits
Section titled βBenefitsβFor AI Workers
Section titled βFor AI Workersβ- Earn HYRA Tokens: Get paid for processing AI inference tasks
- Flexible Work: Work when you want, claim tasks as available
- Fair Verification: ZKP system ensures honest workers get rewarded
- Multiple Models: Access to various AI models and task types
For AI End Users
Section titled βFor AI End Usersβ- Easy Access: Simple interface to request AI inference
- Pay with HYRA: Use native HYRA tokens for payments
- Multiple Models: Access to different AI models through one platform
- Transparent Pricing: Clear cost calculation and payment system
For the Network
Section titled βFor the Networkβ- Fully Decentralized: No single point of failure
- Transparent: All operations on blockchain
- Scalable: Multiple task pools for high throughput
- Secure: ZKP verification prevents cheating
SDK Integration
Section titled βSDK IntegrationβPython SDK
Section titled βPython SDKβfrom hyra_sdk import HyraClient
# Initialize clientclient = HyraClient()
# Core workflowtask = client.claim_task() # Get taskresult = process_ai_task(task['input_data']) # Processsubmit_hash = client.submit_task( # Submit task['task_id'], result, task['pool_address'])Node.js SDK
Section titled βNode.js SDKβconst { HyraClient } = require("@hyra-network/sdk");
// Initialize clientconst client = new HyraClient();
// Core workflowconst task = await client.claimTask(); // Get taskconst result = await processAITask(task.inputData); // Processconst submitHash = await client.submitTask( // Submit task.taskId, result, task.poolAddress);Task Data Structure
Section titled βTask Data StructureβWhen you claim a task, you receive:
{ "task_id": int, # Unique task identifier "reward": int, # Reward amount in wei "deadline": int, # Unix timestamp when task expires "assigned_to": str, # Your wallet address "request_id": int, # Inference request ID "model_name": str, # AI model name to use "input_data": str, # Task input/prompt "pool_address": str, # Task pool contract address "tx_hash": str # Transaction hash}Next Steps
Section titled βNext StepsβReady to get started? Choose your role and follow the appropriate guide:
- AI Workers: Start with Installation Guide to set up your environment
- AI End Users: Learn how to Claim Tasks and start earning
- Developers: Check out our Python SDK or Node.js SDK