A decentralized LLM inference network built on Ink (Kraken's L2), with NFT-gated subnets, stake-weighted scoring, and EVM-native economics anchored to existing community tokens.
BasedAI is a network where:
- Brain owners acquire ERC-721 NFTs by staking either Pepecoin or $basedAI, granting them the right to operate a subnet for a specific model.
- Miners run LLM inference on GPUs and serve prompts.
- Validators spot-check miner output and assign scores.
- Users pay in $basedAI for inference; rewards flow to participants based on stake-weighted scoring.
The full design is documented in whitepaper-v2.md. This repository contains the implementation: Solidity contracts, miner/validator reference software, and client libraries.
This implementation follows the BasedAI Testnet, commenced May 2023 by Big Brain Pepe — one of the earliest decentralized AI testnets to go live. The testnet validated the core subnet architecture and informed the design choices in this repository, including the move to an L2-native deployment model and the omission of the cryptographic claims from the original whitepaper that did not hold up under scrutiny.
This implementation deliberately omits several mechanisms from the original 2024 whitepaper that did not hold up under scrutiny:
- No FHE-based "Zero-Knowledge LLMs." Inference happens on miner GPUs in plaintext; verification is statistical and economic, not cryptographic.
- No "Cerberus Squeezing." The optimization technique described in the original paper was repackaged standard quantization and did not solve the FHE performance bottleneck.
- No protocol-level emissions. The existing $basedAI contract has fixed supply and renounced ownership; new emissions are not possible without issuing a new token. The network operates on fee-for-service economics.
- No new tokens. This implementation uses the existing $basedAI (
0x44971ABF0251958492FeE97dA3e5C5adA88B9185) and Pepecoin (0xA9E8aCf069C58aEc8825542845Fd754e41a9489A) contracts. No team token, no rewards token, no investor allocation.
If you need cryptographic privacy for AI inference, this is not the project for you. If you need a decentralized inference marketplace with honest threat modeling, it is.
contracts/ Solidity contracts (Foundry)
miner/ Reference miner implementation (Python, vLLM-based)
validator/ Reference validator implementation (Python)
client/
typescript/ TypeScript client library (browser/Node)
python/ Python client library
frontend/ Web dApp (React + Vite + viem): inference, account, operate, stake
docs/ Architecture, deployment, tokenomics, security
scripts/ Static checks, off-chain services
whitepaper-v2.md Full design specification
# Install dependencies
make install
# Run contract tests
make test-contracts
# Run miner tests
make test-miner
# Deploy to Ink Sepolia testnet (requires BASEDAI_L2 env var)
make deploy-testnetSee docs/getting-started.md for full setup, docs/architecture.md for the design, and docs/tokenomics.md for economic mechanics.
Pre-alpha. Contracts are unaudited. Do not deploy to mainnet without a professional audit. Not for production use.
CI is currently red. This is expected pre-alpha state — the scaffold needs a Foundry build pass to surface and fix the OZ v5 API drift the static checks couldn't catch. Tracked in issue #1.
MIT. See LICENSE.