Paradigm

Decentralized AI marketplace on Ethereum with on-chain revenue splits

Paradigm

Created At

Open Agents

Project Description

VAULT is a decentralized AI model marketplace built on Ethereum Sepolia where model contributors can register encrypted AI models as ERC-721 NFTs, set per-inference pricing, and earn revenue through an on-chain enforced 70/25/5 split — 70% to contributors, 25% to compute nodes, 5% to protocol treasury. What makes it different:

  • On-chain ownership: Every model is an ERC-721 NFT. Transfer it, sell it, add contributors with revenue shares — all enforced by smart contract.
  • KeeperHub execution layer: We use KeeperHub's Direct Execution API to read real on-chain model data. The MCP server lets AI agents discover and interact with marketplace operations as tools. x402 payments settle on Base USDC via KeeperHub's agentic wallet.
  • ENS identity: Each model gets a human-readable ENS name (e.g., mnist.vault.eth) so AI agents can be discovered by name instead of hex addresses. We resolve names via direct mainnet ENS registry RPC with proper Keccak-256 namehash computation.
  • TEE-attested inference: Every inference runs inside a Trusted Execution Environment with cryptographic attestation hashes. Users pay per inference via the x402 protocol (HTTP 402 Payment Required).
  • Revenue transparency: No off-chain calculations. The Solidity contract distributes revenue on every completeInference() call using hardcoded BPS constants — verifiable on Etherscan. Contract deployed on Sepolia: 0xD39921E53d7759E8c9B8d21aF07ba6Ba05AB6293 Current state: 3 models registered (MNIST Classifier, Sentiment Analyzer, Summarizer), 1 compute node active, Model 0 listed for sale at 0.01 ETH. KeeperHub read operations return real on-chain data. Write operations are integrated but require org wallet setup in KeeperHub dashboard.

How it's Made

Smart Contract (Solidity 0.8.20): VAULTMarketplace.sol is a self-contained ERC-721 contract with 9 functions: registerModel (mints ownership NFT), listForSale, buyModel (payable — ETH transfer + NFT transfer), addContributor (revenue share splitting with max 30% non-owner, max 50% per contributor), completeInference (70/25/5 revenue distribution on-chain), claimRevenue, registerNode, getModel (view), getContributors (view). Deployed on Sepolia at 0xD39921E53d7759E8c9B8d21aF07ba6Ba05AB6293. KeeperHub Integration: All contract reads route through KeeperHub's Direct Execution API (POST /api/execute/contract-call). We pass the full ABI explicitly since our contract is freshly deployed and not yet verified on Etherscan. The API returns real on-chain data for getModel() and getContributors(). Write operations (registerModel, buyModel, listForSale, addContributor, completeInference) route through the same API with correct payloads but return WALLET_NOT_CONFIGURED because we haven't set up the org wallet in KeeperHub's dashboard yet. We also integrate KeeperHub's MCP server at app.keeperhub.com/mcp for AI agent workflow discovery (search_workflows meta-tool) and execution (call_workflow meta-tool). x402 payments settle on Base USDC (contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, chain 8453) via EIP-3009 TransferWithAuthorization, using KeeperHub's Turnkey custodial agentic wallet with three-tier safety (auto/ask/block). ENS Resolution: Instead of relying on third-party APIs, we make direct RPC calls to the mainnet ENS registry (0x00000000000C2e074eC69A0dFb2997BA6C7d2e1e) to resolve names. We compute Keccak-256 namehash using pycryptodome's Crypto.Hash.keccak (critical: hashlib.sha3_256 is SHA-3, not Keccak-256, and produces different results). Forward resolution works for any registered mainnet name — verified with vitalik.eth → 0xd8da6bf26964af9d7eed9e03e53415d37aa96045. Reverse resolution and text records (description, url, avatar, github, telegram) are also implemented. Backend (FastAPI + Python): FastAPI backend with ONNX Runtime for 3 models (MNIST Classifier 96.5% accuracy, Sentiment Analyzer, Summarizer). Each inference returns TEE attestation hashes. The backend exposes 12 EVM endpoints for KeeperHub operations and ENS resolution, plus model discovery and x402 payment flow middleware. Frontend (Next.js 15): Dark brutalist UI with neon accents (indigo/violet/emerald). The Ethereum Dashboard (/evm) is the primary page — it shows contract deployment status, KeeperHub connection, ENS resolver, on-chain models fetched via KeeperHub Direct Execution API, and MetaMask connection with Phantom conflict handling (we search window.ethereum.providers[] for isMetaMask === true instead of using the overridden window.ethereum directly). Marketplace, inference, upload wizard, and creator dashboard pages complete the flow. Storage & Encryption: Models are encrypted with AES-256-GCM in the browser before upload. The key never touches any server. Encrypted files go to IPFS via Pinata. Only the CID hash lives on-chain.

background image mobile

Join the mailing list

Get the latest news and updates