NetZero Chain

Mining Shares

Mining on NetZero Chain is a way to earn, not a way to secure the chain. Validators secure it. Miners do proof-of-work and are paid per share, in USDn, by the protocol itself. Live on the public testnet from block 29400.

How it works

  1. A miner computes keccak256("NZC-SHARE-v1" ‖ chainId ‖ anchorHash ‖ minerAddress ‖ nonce) until the result is at or below the share target. The anchor is a recent block: any block between 4 and 12 blocks older than the block that will include the share. Miners work on head − 3, which leaves about 25 seconds of validity.
  2. The miner submits the share to any node: its own node does it automatically, or call nzc_submitShare on the public RPC. Nodes verify it (one hash) and gossip it.
  3. The block proposer includes up to 250 pending shares in the block body. They travel as withdrawals with amount 0 (index = anchor, validatorIndex = nonce, address = miner), so every block explorer already shows them.
  4. When the block is finalised the engine pays each included share minerPool / sharesInBlock, where the miner pool is the block's 40% fee share plus the Incentive Pool's per-block amount (0.05 USDn on the testnet). No transaction, no gas: the USDn appears in the miner's address directly.

The share difficulty adjusts every epoch (200 blocks) toward 100 shares per block, at most four times harder or easier per epoch. More hashrate makes shares harder; the reward per block stays the same, so each miner earns in proportion to its share of the total. With one miner on the network the difficulty drops until that miner alone fills the blocks.

Mining with your own node (recommended)

const rpc = "http://127.0.0.1:8545";            // your node; agent_* is local-only
const me = await call("agent_createWallet");   // key never leaves the node
await call("agent_startMining", [me, 2]);      // 2 CPU threads
console.log(await call("agent_getMiningStatus"));
// { mining: true, hashrate: 1.1e6, shareDifficulty: "0x100000",
//   sharesFound: "0x15", sharesPaid: "0x11", earnedWei: "0x3782dace9d8fffe", ... }

The node finds shares, gossips them to the validators, and counts what it was paid. Balance arrives within a minute on a testnet-sized network.

Mining against the public RPC (no node)

Anything that can hash can mine. Ask for the target, hash, submit:

import json, requests
from Crypto.Hash import keccak            # pip install pycryptodome
 
RPC = "http://165.227.236.60"; ME = "0xYourAddress"
def rpc(m, p=[]): return requests.post(RPC, json={"jsonrpc":"2.0","method":m,"params":p,"id":1}).json()["result"]
 
t = rpc("nzc_shareTarget")                # active, anchor, anchorHash, target, difficulty
prefix = (b"NZC-SHARE-v1" + (20500).to_bytes(32, "big")
          + bytes.fromhex(t["anchorHash"][2:]) + bytes.fromhex(ME[2:]))
target = bytes.fromhex(t["target"][2:])
nonce = 0
while True:
    h = keccak.new(digest_bits=256, data=prefix + nonce.to_bytes(8, "big")).digest()
    if h <= target:
        print(rpc("nzc_submitShare", [{"anchor": t["anchor"], "anchorHash": t["anchorHash"], "miner": ME, "nonce": hex(nonce)}]))
        break
    nonce += 1

Refresh the target every few blocks: a share whose anchor is more than 12 blocks old is rejected. nzc_shares(blockNumber) shows which shares a block paid and the amount per share.

What a miner earns

ScenarioFees/dayIncentive/dayTo miners/dayPer share (100/block)
5K tx/day$100$1,440$1,540$0.00053
50K tx/day$1,000$1,440$2,440$0.00085
250K tx/day$5,000$1,440$6,440$0.0022

A miner with 1% of the network's hashrate at 250K tx/day earns about $64 a day. The Incentive Pool is company money; its balance and remaining runway are on-chain, so the size of the subsidy is never hidden. On the testnet USDn is test money.

Why an empty wallet can mine

On most chains the first thing a new participant needs is the gas token, which it must buy somewhere. Here the first accepted share puts USDn into the wallet with no transaction. An AI agent can install a node, call agent_createWallet, call agent_startMining, and have money within a minute. See Why AI-Native.

Anti-abuse

  • A share is valid only for its anchor and only while the anchor is 4 to 12 blocks old.
  • Each (anchor, miner, nonce) pays once; a block may not repeat a share from the previous 12 blocks.
  • At most 250 shares per block; the difficulty keeps the total near 100. Splitting hashrate across addresses gains nothing because payment is per share.

Why keccak256 on the testnet

The design calls for RandomY, a memory-hard CPU hash, on mainnet. Every validator must verify every share, and RandomY verification costs milliseconds; the public testnet runs eleven nodes on one small server, so it uses keccak256, which verifies in a microsecond. The hash is one function in the engine; mainnet validators on their own hardware switch it without any other protocol change.

What miners cannot do

They cannot produce blocks, cannot vote on finality, and cannot influence fork choice. From year six, share counts are half of the electorate for elected validator seats (schedule), which is the only path from hashrate to a seat, one seat per year, with a bond.