Expand description
§QuDAG Exchange
A modular, quantum-secure, multi-agent resource exchange protocol that enables trustless computational resource trading through rUv (Resource Utilization Voucher) tokens.
§Overview
QuDAG Exchange provides a decentralized marketplace for computational resources, allowing providers to offer CPU, GPU, memory, storage, and bandwidth in exchange for rUv tokens. The system uses post-quantum cryptography to ensure long-term security and integrates with QuDAG’s DAG-based consensus for fast transaction finality.
§Features
- Quantum-Resistant Security: Uses ML-DSA signatures and ML-KEM encryption
- Resource Trading: Trade computational resources for rUv tokens
- DAG Consensus: Fast finality with QR-Avalanche consensus
- Cross-Platform: Native, WASM, and API support
- Secure Vault: Encrypted key storage with QuDAG Vault integration
§Quick Start
use qudag_exchange::{Exchange, Account, Transaction};
// Create exchange instance
let exchange = Exchange::new("mainnet").await?;
// Create account
let account = exchange.create_account("alice", "secure_password").await?;
// Transfer tokens
let tx = Transaction::builder()
.from(&account)
.to("qd1recipient...")
.amount(100.0)
.memo("Payment for resources")
.build()?;
let result = exchange.submit_transaction(tx).await?;Re-exports§
pub use error::ExchangeError as Error;pub use error::Result;
Modules§
- account
- Account management for QuDAG Exchange
- config
- Configuration management for QuDAG Exchange
- consensus
- Consensus integration for QuDAG Exchange
- error
- Error types for QuDAG Exchange with security-focused error handling
- fee_
model - Dynamic Tiered Fee Model for QuDAG Exchange
- immutable
- Immutable Deployment System for QuDAG Exchange
- ledger
- Ledger management for QuDAG Exchange
- metering
- Resource metering for QuDAG Exchange
- payout
- Payout System for QuDAG Exchange Business Plan
- state
- State management for QuDAG Exchange
- transaction
- Transaction handling for QuDAG Exchange
- types
- Core types for QuDAG Exchange
Structs§
- Account
- Account structure representing a user in the system
- Account
Id - Account identifier - a unique ID for each account
- Agent
Status - Agent verification status and usage statistics
- Business
Plan Config - Business plan features configuration
- Business
Plan Summary - Business plan features summary for display
- Config
Summary - Summary of configuration for display purposes
- Consensus
Adapter - Consensus adapter for integrating with QR-Avalanche DAG
- Consensus
Config - Consensus configuration parameters.
- Contributor
Info - Information about a registered contributor
- Exchange
- The main exchange interface for interacting with the QuDAG Exchange network.
- Exchange
Config - Configuration options for the Exchange.
- Exchange
Config Builder - Configuration builder for easier setup
- FeeCalculator
- Fee calculation utilities
- FeeModel
- Dynamic fee model calculator
- FeeModel
Params - Fee model parameters based on the mathematical specification
- FeeRouter
- Fee router for automatic payout distribution
- Governance
Config - Governance configuration for business plan features
- Immutable
Config - Immutable deployment configuration
- Immutable
Deployment - Immutable deployment manager
- Immutable
Signature - Quantum-resistant signature for immutable deployment
- Immutable
Status - Status information for immutable deployment
- Ledger
- The main ledger structure that maintains all account states
- Ledger
State - Main ledger state containing all exchange data
- Lockable
Config - System configuration that can be made immutable
- Market
- Market interface for searching and trading resources.
- Market
Stats - Market statistics and metrics.
- Network
Config - Network configuration
- Operation
Cost - Cost configuration for different operations
- Payout
Config - Payout configuration for different contributor types
- Payout
Entry - Payout entry for tracking individual distributions
- Payout
Split - Payout split definition
- Payout
Split Templates - Default payout split templates
- Payout
Transaction - Payout transaction mapping multiple recipients
- Provider
- Resource provider interface for offering computational resources.
- Provider
Builder - Builder for creating a Provider instance.
- Provider
Stats - Statistics for a resource provider.
- Reservation
- A reservation for computational resources.
- Resource
Meter - Resource meter for tracking and calculating costs
- Security
Config - Security configuration
- Transaction
- Main transaction structure
- Transaction
Id - Transaction identifier
- Transaction
Result - Result of a transaction submission.
- rUv
- rUv (Resource Utilization Voucher) - the fundamental unit of resource credits
Enums§
- Contributor
Role - Contributor role types for payout distribution
- Contributor
Type - Generic contributor types for payout splits
- Transaction
Status - Transaction status in the system
Constants§
- VERSION
- Core version string
Functions§
- version
- Get the version of the QuDAG Exchange Core library
Type Aliases§
- Balance
- Balance type alias for clarity