Architecture
Last updated
Last updated
Core Platform Architecture: VerAI’s architecture is a modular, scalable framework designed to leverage the power of BASE, an Ethereum Layer 2 (L2) rollup, optimizing for low-cost, high-throughput transactions while ensuring flexibility and future-proof integration. Each module operates independently, interacting via standardized APIs and protocols, enabling seamless adaptation to advancements in AI and blockchain technology.
Key Architectural Modules:
1. Resource Abstraction Layer (RAL). The RAL standardizes heterogeneous computational resources (GPUs, CPUs) and datasets into uniform compute units and data tokens, simplifying access for Developers across BASE’s decentralized network and eliminating compatibility issues.
2. Blockchain Layer on BASE. VerAI operates on BASE, an Ethereum L2 rollup that delivers scalability with transaction costs reduced by up to 90% and enhanced throughput, ideal for decentralized AI workloads. The blockchain layer manages transactions, tokenomics, and governance via smart contracts, ensuring transparency and security. VerAI implements a hybrid consensus at the application level: Proof-of-Stake (PoS) for DAO governance and Proof-of-Compute (PoC) for validating computational contributions, complementing BASE’s optimistic rollup mechanism.
3. AI Training Engine: The AI Training Engine enables distributed training of AI models by partitioning tasks across BASE’s high-speed network of nodes, minimizing latency and costs. Supporting frameworks like TensorFlow and PyTorch, it ensures high model accuracy and scalability for deep learning applications.
4. Decentralized Marketplace Module: The marketplace enables Contributors to offer compute power and datasets, and Developers to rent them using $VER tokens, VerAI’s native ERC-20 token on BASE. Dynamic pricing ensures efficient allocation:
Where:
: Price of resource ( r ).
: Base price per unit.
: Demand for the resource.
: Supply of the resource.
$VER’s permit functionality (EIP-2612) allows gas-efficient approvals, reducing transaction costs on BASE.
Blockchain Layer: Smart Contracts and Consensus Smart Contracts on BASE Smart contracts automate resource allocation, reward distribution, and governance. The $VER token contract, deployed at on BASE, is an ERC-20 token with permit, mint, and burn capabilities, enabling efficient payments and incentives:
Additional contracts manage resources and metadata, such as:
Consensus Mechanisms: VerAI leverages BASE’s optimistic rollup for transaction finality, relying on Ethereum L1’s PoS consensus for security. At the application level, VerAI implement
Proof-of-Stake (PoS): For DAO governance, allowing $VER holders to vote on platform upgrades.
Proof-of-Compute (PoC): Validates computational work with cryptographic proofs:
Where:
: Proof submitted by the node.
: Cryptographic hash function (SHA-256).
: Computational task.
: Unique random value.
Decentralized Resource Management Protocol (DRMP) The DRMP ensures efficient resource allocation on BASE:
Load Balancing: Distributes tasks to prevent node overload:
Where:
: Load on node ( i ).
: Average network load.
: Threshold for load deviation.
Resource Matching Algorithm: Matches requests with resources:
Fraud Prevention: PoC and BASE’s fraud proofs ensure integrity.
Storage Solutions: IPFS and On-Chain Metadata
IPFS for Dataset Storage
Datasets are stored off-chain on IPFS:
Where: : is a cryptographic hash function (SHA-256).
On-Chain Metadata on BASE
Metadata (ownership, size, permissions) is stored on BASE:
Networking Protocols for Distributed AI Training
Task Partitioning
Models are split into sub-tasks:
Where:
: Full model.
: Sub-task on node ( i ).
: Number of partitions.
Gradient Aggregation
Nodes synchronize updates using AllReduce:
Where:
: Parameters at iteration ( t ).
\alpha \ : Learning rate.
\nabla L(\theta_t) \ : Gradient of the loss function.
Fault Tolerance
Checkpoints: Saved to IPFS, with CIDs on BASE.
Redundancy: Tasks reassigned on node failure, leveraging BASE’s high throughput.