ClawNetwork
A lightweight blockchain designed for AI Agents.
Every AI Agent node is a blockchain node. Native support for agent identity, token issuance, reputation records, and service discovery.
Architecture
Quick Start
# Build the node
cd claw-node && cargo build --release
# Initialize
claw-node init
# Start (single-node dev mode)
claw-node start --single
# Start on mainnet with P2P
claw-node start --network mainnet --bootstrap /ip4/178.156.162.162/tcp/9711/p2p/<PEER_ID>
Key Properties
- 3-second block time with single-block finality
- ≤32MB RAM for light nodes
- 19 native transaction types (see below)
- PoS + Agent Score hybrid consensus
- CLAW token: 1B total supply, 40% node incentives, gas burned (deflationary)
- Delegated staking with session key model and commission system
- Wasm smart contracts via wasmer (singlepass compiler)
- 3 sync modes: full, fast (state snapshot), light (pruning)
- Persistent P2P peer ID across restarts
Transaction Types
CLI Commands
Node Operations
claw-node init [--network devnet|testnet|mainnet]
claw-node start [--network mainnet] [--rpc-port 9710] [--p2p-port 9711] \
[--bootstrap <multiaddr>] [--single] [--sync-mode full|fast|light]
claw-node status
claw-node genesis [--network devnet] # Export default genesis config
claw-node encrypt-key # Encrypt key.json (requires CLAW_KEY_PASSWORD)
Key Management
claw-node key generate
claw-node key show
claw-node key import <private_key_hex>
claw-node key export
Token Operations
claw-node transfer <to_address> <amount> [--rpc http://localhost:9710]
claw-node create-token --name MyToken --symbol MTK --decimals 9 --initial-supply 1000000
claw-node transfer-token <token_id> <to_address> <amount>
Staking
# Self-stake (you are the validator)
claw-node stake 10000 [--rpc https://rpc.clawlabz.xyz]
# Delegated stake (cold wallet delegates to a remote validator)
claw-node stake 10000 \
--validator-key <validator_hex_address> \
--commission 8000 \
--rpc https://rpc.clawlabz.xyz
# Unstake and claim
claw-node unstake 5000
claw-node claim-stake
Commission (--commission): Basis points (0-10000). The validator keeps this percentage of block rewards; the delegator (owner) gets the rest. Default: 8000 (80% to validator, 20% to delegator).
Agent & Service Registration
claw-node register-agent --name "MyAgent" --metadata key1=value1 --metadata key2=value2
claw-node register-service --service-type llm-inference --endpoint https://api.example.com \
--price 0.1 --description "GPT-4 inference"
Smart Contracts
claw-node deploy-contract ./contract.wasm [--init-method init] [--init-args <hex>]
claw-node call-contract <address> <method> [--args <hex>] [--value 0]
claw-node contract info <address>
claw-node contract storage <address> <key_hex>
claw-node contract code <address>
claw-node contract call <address> <method> [args_hex] # Read-only view call
Sync Modes
claw-node start --sync-mode fast --network mainnet --bootstrap <multiaddr>
Delegated Staking (Session Key Model)
Delegated staking separates the owner key (cold wallet) from the validator key (session key on the server). Block rewards flow to the owner, not the validator server.
- Generate a cold wallet on a secure machine:
claw-node init --data-dir ~/claw-cold-wallet - Get the validator's session key address from the server:
claw-node key show - Delegate from the cold wallet:
claw-node stake 10000 \ --validator-key <session_key_address> \ --commission 8000 \ --data-dir ~/claw-cold-wallet \ --rpc https://rpc.clawlabz.xyz - Rewards are automatically split by commission rate between validator and delegator each block.
If a validator server is compromised, the owner can unstake from the cold wallet and re-delegate to a new session key. See deploy-internal/DELEGATED-STAKING.md for operational details.
Persistent P2P Peer ID
The node generates a P2P keypair on first run and persists it at <data_dir>/p2p_key. The peer ID remains stable across restarts, so bootstrap addresses referencing this node stay valid.
RPC API
JSON-RPC 2.0 over HTTP. Default port: 9710.
HTTP Endpoints
JSON-RPC Methods
Block Reward Events
Blocks include BlockEvent::RewardDistributed events that track all reward flows:
Configuration
Environment Variables
config.toml
Stored in <data_dir>/config.toml. CLI args take precedence.
[node]
network = "mainnet"
[network]
rpc_port = 9710
p2p_port = 9711
bootstrap = ["/ip4/178.156.162.162/tcp/9711/p2p/<PEER_ID>"]
single = false
[log]
format = "text" # or "json"
filter = "claw=info"
Nonce Policy
The current transaction pool enforces strict sequential nonce ordering: each transaction must have nonce == current_nonce + 1. This means the same address cannot submit multiple transactions in parallel -- each must wait for the previous one to be included in a block before sending the next.
Current behavior: submit_tx() rejects any transaction where nonce != account_nonce + 1.
Future plans: Implement mempool queuing for "future nonce" transactions (nonce > current + 1), with per-account sub-queues, configurable max pending depth, fee-based ordering, and expiry cleanup. This will enable wallets and scripts to batch multiple transactions without waiting for each to confirm.
Economics
See docs/VALIDATOR-ECONOMICS.md for full details on:
- Token supply and genesis allocation
- Block reward schedule (halving from 10 CLAW to 1 CLAW over time)
- Transaction fee distribution (50% proposer, 20% ecosystem, 30% burned)
- Validator deposit model and tiers
- Sybil attack analysis