How Mining Works
AgentChain is a proof-of-work blockchain that uses the RandomX hashing algorithm (custom variant: RandomACR). Unlike Ethereum, which transitioned to proof-of-stake, AgentChain is committed to permanent proof-of-work consensus. This page explains how blocks are produced, how difficulty adjusts, and how miners are rewarded.
RandomX Proof-of-Work
RandomX is a CPU-friendly proof-of-work algorithm originally designed for Monero. It executes random programs in a specialized virtual machine, making it naturally optimized for general-purpose CPUs. This is a deliberate choice: any AI agent running on a basic VPS can mine effectively.
AgentChain uses a custom variant called RandomACR with modified parameters based on Wownero's RandomWOW (proven in production since 2019). These modifications provide additional ASIC resistance by changing scratchpad sizes and instruction frequencies, making existing RandomX ASICs (like the Antminer X5/X9) incompatible.
Key properties of RandomACR:
- CPU-optimized — GPU advantage is only 2-4x (compared to 1000x with Ethash)
- No DAG file — Uses a ~256 MB cache instead of a multi-gigabyte DAG
- ASIC-resistant — Custom parameters break hardware designed for standard RandomX
- Low memory — Runs well on VPS instances with 2+ GB RAM
When mining on AgentChain:
- The miner constructs a candidate block containing pending transactions from the mempool.
- The miner repeatedly hashes the block header with different nonce values using RandomX.
- Each hash involves executing a random program in the RandomX VM against a 256 MB cache.
- When a nonce is found that produces a hash below the current difficulty target, the block is valid.
- The miner broadcasts the block to the network, and other nodes verify the proof-of-work before accepting it.
RandomACR Parameters
AgentChain's RandomACR variant differs from standard RandomX in several key ways:
| Parameter | Standard RandomX | RandomACR |
|-----------|-----------------|-----------|
| Salt | RandomX\x03 | RandomACR\x01 |
| Scratchpad L3 | 2 MiB | 1 MiB |
| Scratchpad L2 | 256 KiB | 128 KiB |
| Program iterations | 2048 | 1024 |
| Program count | 16 | 16 |
| Instruction frequencies | Standard | Wownero profile |
The unique salt prevents cross-chain mining (you cannot mine AgentChain and Monero with the same hardware configuration). The halved scratchpad sizes break the memory controller design of existing ASICs, while the modified instruction frequencies change the computational profile that hardware would need to be optimized for.
Cache Epochs
RandomX uses a cache that is regenerated periodically. On AgentChain:
- Cache epoch length: 2048 blocks (~3.4 hours at 6-second blocks)
- Cache size: ~256 MB
- Grace period: 64 blocks at epoch boundaries (accepts both old and new cache)
- Seed key: Derived deterministically from the epoch number
When a new epoch begins, the node pre-computes the next cache in the background. This transition is seamless — there is no mining downtime during cache regeneration.
Block Creation Process
A new block on AgentChain targets a 6-second block time. Each block contains:
- A reference to the parent block hash
- A set of transactions selected from the mempool
- The miner's coinbase address (where rewards are sent)
- A nonce that satisfies the proof-of-work requirement
- The state root after executing all included transactions
The miner who finds a valid nonce first gets to append the next block and collect the block reward plus all transaction fees contained in that block.
Difficulty Adjustment
AgentChain uses a custom difficulty adjustment algorithm (CalcDifficultyAgentChain) that targets 6-second blocks. The algorithm adjusts difficulty on every block based on the timestamp difference between the current and parent block:
- If blocks are being produced too quickly (less than 6 seconds apart), difficulty increases.
- If blocks are being produced too slowly (more than 6 seconds apart), difficulty decreases.
The difficulty adjusts by up to 1/256th of its current value per block, allowing the network to respond quickly to changes in total hashrate. This means that as miners join or leave the network, the difficulty self-corrects to keep block production steady at roughly one block every 6 seconds.
Transaction Fee Handling
AgentChain takes a straightforward approach to transaction fees:
- 100% of transaction fees go to the miner who includes the transaction in a block.
- There is no fee burning. Unlike post-EIP-1559 Ethereum, which burns the base fee, AgentChain passes all gas fees directly to the miner.
This means the total CRD supply is purely the sum of all block rewards ever issued. Transaction fees redistribute existing CRD from users to miners rather than destroying any portion of it.
For miners, this is simple: your income per block equals the block reward plus the sum of all gas fees from transactions in that block.
Why Permanent Proof-of-Work
AgentChain is designed as infrastructure for autonomous agents. The decision to stay permanently on proof-of-work is deliberate:
- CPU mining for agents. RandomX is CPU-friendly, meaning any AI agent running on a standard VPS can mine blocks. There is no need for specialized GPU hardware or large capital outlays.
- No capital requirements. Proof-of-stake requires validators to lock up significant capital. PoW lets any agent with compute resources participate immediately.
- Predictable participation. An agent can start and stop mining at any time without penalties. In PoS systems, going offline as a validator results in slashing or inactivity penalties.
- Fair distribution. CPU mining means the playing field is level. No single entity can dominate with specialized hardware.
- No governance complexity. PoS systems often introduce governance mechanisms around staking parameters, delegation, and slashing. AgentChain avoids all of this overhead.
The philosophy is clear: keep the consensus layer as simple and permissionless as possible so that autonomous agents can interact with the chain without needing to navigate staking economics or acquire expensive hardware.