Skip to content

Key Concepts

This page explains the core terminology and concepts used throughout WasiAI. Understanding these will help you navigate the platform and documentation effectively.


Models and Agents

Model

A Model is an AI capability listed on the WasiAI marketplace. It represents a specific AI function, such as text classification, sentiment analysis, or image generation, that users can access through the platform.

Each model has: - Metadata: Name, description, category, cover image - Pricing: Per-inference cost, license prices - Owner: The wallet address that controls the model - Creator: The original creator (receives royalties) - URI: IPFS link to full metadata and artifacts

Agent

An Agent is the on-chain identity of a model, registered via the ERC-8004 standard. When a model is published, an agent is automatically created with: - Agent ID: Unique identifier (ERC-721 token) - Endpoint: URL for x402 inference requests - Wallet: Address that receives payments - Reputation: Accumulated feedback scores

Note: In WasiAI, "model" and "agent" are closely related. A model is the listing; an agent is its on-chain identity. Every published model has an associated agent.

Model Family

A Model Family groups multiple versions of the same model. When you publish an update to your model, it becomes a new version in the same family. This ensures: - Reputation continuity across versions - Same splitter contract for revenue - Clear upgrade path for users


Payments

x402 Protocol

x402 is a payment protocol that enables HTTP 402 (Payment Required) responses with cryptocurrency payments. When a user requests an inference:

  1. Server returns HTTP 402 with payment requirements
  2. User signs a USDC authorization (gasless via EIP-3009)
  3. User retries request with X-PAYMENT header
  4. Server verifies payment and executes inference
  5. Server returns result with X-PAYMENT-RESPONSE header

This enables micropayments: payments as small as $0.001 per inference.

Pay-Per-Inference

The default payment model on WasiAI. Users pay a small fee (typically $0.001–$0.10) for each inference call. Benefits: - No commitment required - Pay only for what you use - Instant settlement

Facilitator

A Facilitator is a service that executes USDC transfers on behalf of users. WasiAI supports two facilitators: - Ultravioleta DAO: Free, covers gas fees (Avalanche only) - Thirdweb: Multi-chain support, backend pays gas

The facilitator receives the signed authorization and calls transferWithAuthorization on the USDC contract.


Licenses

License NFT

A License NFT is an ERC-721 token that grants access to a model's capabilities. Unlike pay-per-inference, a license provides: - Unlimited access (within license terms) - Ownership: Tradeable on secondary markets - Proof of access: Verifiable on-chain

License Types

Type Description Duration
Perpetual One-time payment, lifetime access Forever

License Rights

Each license specifies what the holder can do: - API Access (RIGHTS_API = 1): Call the inference endpoint - Download Access (RIGHTS_DOWNLOAD = 2): Download model artifacts

Rights are stored as a bitmask, so a license can grant multiple rights.


Revenue Distribution

Revenue Split

When a payment is received (inference or license), it's automatically split between: - Seller: Current model owner (majority share) - Creator: Original creator (royalty, typically 5–10%) - Marketplace: WasiAI platform fee (5%)

Splitter Contract

Each model has a dedicated ModelSplitter contract that handles revenue distribution. When USDC is sent to the splitter: 1. Marketplace fee is deducted and sent to WasiAI 2. Creator royalty is calculated and sent to creator 3. Remaining balance goes to the seller

Splitters are created automatically when a model is published, using the SplitterFactory (EIP-1167 minimal proxies for gas efficiency).

Royalties

Royalties are a percentage of each sale that goes to the original creator, even if the model has been transferred to a new owner. This ensures creators benefit from the long-term success of their work.


Identity and Reputation

ERC-8004

ERC-8004 is a proposed standard for AI agent identity on Ethereum-compatible chains. It defines: - How agents are registered and identified - Metadata schema for agent capabilities - Reputation tracking mechanisms

WasiAI implements ERC-8004 through the AgentRegistryV2 contract.

Agent Identity

Every agent on WasiAI has: - Agent ID: Unique token ID (ERC-721) - Model ID: Reference to the marketplace listing - Wallet: Payment receiving address - Endpoint: x402 inference URL - Metadata URI: IPFS link to agent description

Reputation Score

Users can provide feedback after each inference: - 👍 Positive: Inference was helpful/accurate - 👎 Negative: Inference was unhelpful/wrong

Feedback is recorded on-chain via the ReputationRegistryV2 contract, creating a verifiable history of agent performance.


Smart Contracts

MarketplaceV3

The main contract for model listings. Handles: - Model registration and updates - License sales - Pricing configuration - Agent registration (delegated)

LicenseNFTV2

ERC-721 contract for license tokens. Features: - Perpetual licenses - Rights management - Revocation support

AgentRegistryV2

ERC-8004 identity registry. Manages: - Agent registration - Endpoint updates - Wallet changes (with timelock)

SplitterFactory

Factory contract for creating revenue splitters. Uses EIP-1167 minimal proxies for gas-efficient deployment.

ModelSplitter

Individual splitter contract for each model. Receives payments and distributes to seller, creator, and marketplace.


Storage

IPFS

IPFS (InterPlanetary File System) is used for decentralized storage of: - Model metadata (name, description, category) - Cover images - Model artifacts (weights, configs) - Agent metadata

WasiAI uses Pinata as the IPFS pinning service.

Metadata URI

Each model has a URI pointing to its IPFS metadata. The metadata follows a standard schema:

{
  "name": "Model Name",
  "description": "What the model does",
  "category": "text-classification",
  "coverImage": "ipfs://...",
  "artifacts": [...],
  "licensePolicy": {...}
}


Wallets and Authentication

Social Login

WasiAI supports onboarding without a crypto wallet via Thirdweb In-App Wallets: - Google - Apple - Email (passwordless) - Passkey (biometric)

A non-custodial wallet is created and linked to the user's social account.

Traditional Wallets

Users can also connect with standard wallets: - Core Wallet - MetaMask - WalletConnect - Coinbase Wallet - Rainbow


Next Steps