← Back to index

Waifu Layer

The Agentic Layer 1 Blockchain

LLM Powered Lock Free Autonomous Agents License

WAIFU is a next-generation Layer 1 blockchain where LLMs replace AMMs, agents replace corporations, and intelligence is the consensus mechanism.


🌟 Features

### 🧠 Proof-of-Intelligence Consensus Traditional blockchains waste energy on meaningless hashes. WAIFU validators run **deterministic LLM inference** (temperature=0) to price transactions and produce blocks. ### ⚡ Lock-Free DAG State No EVM bottlenecks. Parallel state access via **DAG reconciliation** with crossbeam lock-free data structures. 100k+ transactions per block.
### 🤖 Autonomous Agents Smart contracts that are **living AI entities**. Deploy hedge funds, market makers, and infrastructure providers that operate autonomously with equity and revenue distribution. ### 🌉 Sovereign Bridge Trustless ZK-bridge to ingest liquidity from Solana, Ethereum, and legacy chains. LLM-assessed conversion to native Compute units.
### 💰 LLM Pricing Engine **No order books. No AMMs.** A deterministic LLM analyzes transaction context, network state, and agent reputation to set clearing rates in real-time. ### 🌐 Mesh Network libp2p + QUIC networking with gossipsub for unblockable agent-to-agent streaming. Decentralized by design.

🏗️ Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        WAIFU L1 NODE                            │
├─────────────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────────┐  │
│  │  LLM Pricer │  │  Consensus  │  │     Agentic State       │  │
│  │  (Candle)   │→ │    (PoI)    │→ │   (Lock-Free DAG)       │  │
│  └─────────────┘  └─────────────┘  └─────────────────────────┘  │
│         ↑               ↑                      ↑                │
│  ┌─────────────────────────────────────────────────────────────┐│
│  │                     Transaction Mempool                      ││
│  │               (unbounded async channel)                      ││
│  └─────────────────────────────────────────────────────────────┘│
│         ↑               ↑                      ↑                │
│  ┌───────────┐  ┌───────────────┐  ┌──────────────────────────┐ │
│  │  Agents   │  │    Bridge     │  │   P2P Network (libp2p)   │ │
│  │ (Deploy)  │  │ (ZK Ingest)   │  │   QUIC + Gossipsub       │ │
│  └───────────┘  └───────────────┘  └──────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘

📦 Modules

Module Description
llm_pricer Deterministic LLM pricing engine using Candle (HuggingFace Rust). Encodes transaction context into embeddings and outputs clearing rates.
consensus Proof-of-Intelligence block production. Parallel pricing via Rayon, PoI proof generation with model hash verification.
state Lock-free global state with atomic counters and concurrent hash maps. DAG-based block application.
types Core types: AgentId, Transaction, Block, PoIProof, SovereignAsset.
agent Autonomous agent framework. Deploy hedge funds, market makers, and custom goal-driven entities.
bridge ZK-verified bridge for ingesting Solana/ETH liquidity into native Compute.
network libp2p mesh with gossipsub and mDNS for peer discovery.

🚀 Quick Start

Prerequisites

Build

cargo build --release

Run

cargo run --release

You'll see:

╦ ╦╔═╗╦╔═╗╦ ╦  ╦  ╔╦╗
║║║╠═╣║╠╣ ║ ║  ║   ║ 
╚╩╝╩ ╩╩╚  ╚═╝  ╩═╝ ╩ 
The Agentic Layer 1 - v1.0.0

STATUS: AGENTIC SINGULARITY ONLINE

[✓] Global state initialized (lock-free DAG)
[✓] LLM Pricer loaded (deterministic mode)
[✓] Mempool initialized (unbounded channel)
[✓] Genesis agent funded

[CONSENSUS] Proof-of-Intelligence validator running...
[WAIFU] Node operational. Awaiting agentic ingestion...

🔧 Dependencies

Crate Purpose
candle-* HuggingFace Rust LLM framework for deterministic inference
libp2p Decentralized P2P networking (TCP, QUIC, Gossipsub)
crossbeam Lock-free concurrent data structures
rayon Parallel CPU compute for batch pricing
blake3 High-speed cryptographic hashing for DAG
tokio Async runtime for high-throughput networking

💡 Core Concepts

Sovereign Assets

WAIFU has no "tokens" in the traditional sense. The economy runs on:

Transaction Pricing

Transactions don't specify gas prices. Instead, they submit context:

TransactionContext {
    operation: Operation::Transfer { amount: 100.0 },
    energy_budget: 1.0,
    priority: Priority::Normal,
    payload: vec![],
    oracle_refs: vec![],
}

The LLM analyzes context + network state to determine the clearing rate.

Agent Goals

Deploy autonomous agents with built-in objectives:

AgentGoal::AlphaSeeker { risk_tolerance: 0.8 }  // Hedge fund
AgentGoal::MarketMaker { spread_bps: 30 }       // Liquidity provider
AgentGoal::ComputeMaximizer { target_rate: 0.1 } // Yield optimizer
AgentGoal::Custom { objective: "..." }          // LLM-interpreted goal

📄 License

MIT No Attribution — See LICENSE


⚠️ EXPERIMENTAL SOFTWARE ⚠️
This is a research prototype. Do not use in production.

Built with 🧠 by WaifuAI