Introduction
Proof-of-work (PoW) cryptocurrencies rely on miners, who carry out large numbers of computationally-intensive calculations to secure the network and maintain the integrity of the decentralized ledger.
With Bitcoin, these calculations are based on SHA256. By contrast, Ergo uses Autolykos as its PoW algorithm.
Autolykos is a "memory hard" algorithm, which makes Ergo more ASIC-resistant than Bitcoin. Instead of being dependent on a network of specialized computers, which use large amounts of electricity and periodically need to be upgraded to remain competitive, Ergo can still be mined with regular GPUs.
Ergo's mining algorithm has the effect of making the network more sustainable, and more decentralized. A broader range of users can participate in securing the network, rather than centralizing mining in the hands of those who are best-resourced.
What Is Autolykos?
Autolykos is a proof-of-work algorithm designed for the Ergo platform. It is based on a combination of hash functions and graph-based memory access, resulting in a form of memory-hard PoW.
Bitcoin's SHA256-based PoW is ideally suited to ASICs, because the hash function is tiny and easily fits on a chip, inputs are small, and memory requirements are low. Raw compute power is the only resource that is really needed. ASIC designers can build thousands of SHA-256 cores on a single chip and run them extremely fast, at very low power.
Autolykos intentionally breaks most of the factors that make SHA256 so ASIC-friendly. The block header, miner's nonce, and referenced UTXO set (Ergo requires miners to prove they own some coins) are hashed together, with each step depending on a previous, pseudo-randomly selected position in memory. The next memory address is only known after the current step has been completed.
Key Insight: By requiring huge memory bandwidth and random memory lookups, memory itself becomes the bottleneck in the algorithm's progress. Memory is expensive to integrate on an ASIC, and off-chip memory access is slow.
Consumer GPUs can handle Autolykos's requirements better than a custom ASIC, meaning there is no incentive to develop specialized hardware for Ergo. GPU mining Ergo has become the default way of securing the network.
How Autolykos Works
- 1Miners collect block candidate data: transactions, a Merkle root of those transactions, previous block hash, timestamp, and other header fields.
- 2On-chain data including references to UTXOs can be included to increase unpredictability.
- 3The miner builds a memory table containing values derived from the block header, plus the miner's secret seed/nonce. The table is large, and structured so subsequent steps will read from many different locations in it.
- 4The miner produces candidate hashes in rounds. They choose or increment a nonce, use the nonce and current intermediate state to compute an index/indices into the memory table, read values from those memory addresses, and combine them with cryptographic hashing into a new intermediate value. Each step's memory addresses are data-dependent, so can't be known until the previous step has been completed.
- 5This read-mix sequence is repeated many times. Each step relies on a previous read, so the process is sequential and bound by memory bandwidth due to the demands of fetching and mixing unpredictable memory entries.
- 6After the required number of rounds, the final candidate value is derived from the mixing output and block header. The final hash is compared against the network Difficulty target. If it is below the target, the miner has found a valid block.
- 7The miner assembles the block with the necessary proofs, and broadcasts it to the network.
- 8Other nodes verify that the block is valid, which is far cheaper than mining it. It is not necessary to reproduce the entire memory-hard process.
- 9All miners run the same code. Difficulty adjusts over time to keep the average block time stable (in Ergo's case, around two minutes). This preserves predictable resource use over long periods.
ASIC Resistance and GPU Mining
Ergo is built with the aim of maintaining ASIC-resistant mining: ensuring that no specialized hardware is needed to secure the network, and ASICs do not provide an advantage. This democratizes mining, and means that GPU mining Ergo is the norm. (It is inefficient to mine Ergo with a CPU, though it is still possible.)
Autolykos is a critical strand of this strategy, due to the large memory bandwidth the algorithm requires. This makes it hard to parallelize cheaply on small chips, so creating ASICs is not economically viable.
GPU Advantage: GPUs remain an effective way of mining Ergo. This supports a more distributed mining ecosystem, since many users already own GPUs – especially if they are involved in gaming or other graphics-intensive activities. GPUs can be used to mine part-time, when the computer is not otherwise in use.
Ergo's approach makes mining more accessible to a wider range of users, including those who are not deeply involved in the crypto space. It is ideal for casual and hobbyist miners, and developers who want to experiment with ErgoScript and support the network as they do so.
Sustainability Advantages
As well as democratizing the Ergo mining ecosystem, promoting a more decentralized network, Autolykos has sustainability benefits. Energy efficiency is higher, due to the level of GPU-friendly, memory-bound work, and there are no obsolete ASICs that need disposal or recycling. As network adoption scales, security can also scale without a huge spike in energy use and hardware.
Comparison: This is in contrast to Bitcoin, which has enormous (and growing) energy use – though a significant percentage of this comes from renewable sources.
Autolykos And Security
From a security perspective, there are advantages to Ergo's use of Autolykos. Like Bitcoin, it is hard to attack the chain without 51% of GPU power.
Memory-hard functions also prevent cheap reorg attacks. Reorg attacks happen when an attacker tries to rewrite recent blocks to double-spend or manipulate transactions. This requires outpacing the honest network to create a longer PoW chain. In Ergo's case, the memory cost of maintaining multiple parallel chains for an attack becomes prohibitively high, increasing the economic cost of rewriting the chain – even if the attacker owns a lot of GPUs.
Stateless Verification
Stateless verification also aligns with Ergo's eUTXO model. Nodes can verify blocks without needing the full transaction history – only the headers and relevant boxes/UTXOs.
Each Autolykos block can be checked independently using the block header, the nonce, and the network Difficulty. The node doesn't have to reproduce the entire memory-hard mining process to know that a block is valid. This fits naturally with Ergo's eUTXO model, where each box carries its own state and validation rules. Because boxes are self-contained, verification remains lightweight and deterministic.
Conclusion
Autolykos is Ergo's memory-hard PoW algorithm, which is designed to be resistant to ASIC mining.
Autolykos combines hashing with random memory lookups to create a process that is difficult and expensive to put on a dedicated chip, incentivizing mining with regular consumer GPUs over concentrating hashrate in the hands of a relatively small number of miners who can afford specialist hardware.
This has the effect of democratizing access for miners, and ensuring a more decentralized network – increasing security and lowering barriers to participation.
Autolykos also has lower power requirements than Bitcoin's SHA256 algorithm, and predictable resource use, laying the groundwork for sustainable chain growth over the long term.