Merged mining explained: one search, two chains, and only one electricity bill
Merged mining lets a miner search for blocks on two blockchains with the same work, because one chain accepts proof of work done for another. Namecoin started it with Bitcoin in 2011, and Dogecoin has been merge-mined with Litecoin since September 2014.
Picture two claims side by side on the same hill. A prospector digs one shaft. Whatever he brings up counts for both claims, as long as both claim offices accept his assay.
That's merged mining. A miner does one search for a winning hash, and the result can count on two blockchains at once.
The second chain gets security it couldn't afford on its own. The miner gets a second reward for no extra electricity. The catch is in who else can swing that pickaxe.
What it is
Merged mining means mining a "child" blockchain with the proof of work of a "parent" chain. The child chain accepts a block of the parent's work as proof, if it also meets the child's own, usually easier, target.
The technique is often called AuxPoW, short for auxiliary proof of work. It needs both chains to use the same hashing method: SHA-256 for Bitcoin and Namecoin, scrypt for Litecoin and Dogecoin.
How it works
The idea is older than any coin that uses it. On 9 December 2010, Satoshi Nakamoto suggested that a proposed name system, BitDNS, could run a "separate block chain, yet share CPU power with Bitcoin" (bitcointalk.org).
Step by step:
- Build both blocks. The miner prepares a normal parent block and a normal child block.
- Hide a fingerprint. The miner puts a hash of the child block (or of several child blocks, combined with a Merkle tree) into the parent block's coinbase transaction, the one that pays the miner. Because the coinbase is part of the parent's Merkle root, it's covered by every guess.
- Search once. The miner hashes the parent block header, trying nonce after nonce, as usual.
- Check two targets. Most results meet neither. If a result meets the parent's target, it's a parent block. If it meets the child's easier target, it's a child block. Sometimes both.
- Prove it to the child. The miner sends the child chain its block plus the evidence: the parent header, the coinbase transaction and the Merkle branch linking them. Child nodes check that the header's hash meets their target and that the fingerprint really points to this child block.
Here's the real thing. Dogecoin's release notes for version 1.8.1 name block 371,337 as the "AuxPoW switchover block" (Dogecoin Core). Read that block from a block explorer and it carries an auxpow section, timestamped 11 September 2014 at 19:42:57 UTC (Blockchair).
Inside it sits the parent's coinbase. Look at its bytes and you find the marker "fabe6d6d" followed by a 32-byte hash: the fingerprint from step 2. Dogecoin's parent chain is Litecoin, the scrypt chain whose miners it invited in (via CoinDesk).
Namecoin, a name system in the spirit of BitDNS, uses Bitcoin as its parent. Its own FAQ dates the first production use of the scheme to October 2011 and says Bitcoin miners can merge-mine namecoins "at no extra cost for hardware and electricity" (Namecoin FAQ).
Why it matters
Small chains gain. A young chain with few miners is cheap to attack. If the big parent chain's miners also mine it, an attacker must match a slice of a much bigger hash rate. Our article on the 51% attack explains why that matters.
Miners gain. One electricity bill, two sets of rewards. So any pool on the parent chain has a reason to merge-mine whenever the child chain lets it.
Who pays? Mostly nobody, and that is also the weakness. Because merge-mining costs the parent's miners nothing extra, the child's security depends on how many of them bother. And a large parent miner who doesn't merge-mine can still point his machines at the child chain if he wants to hurt it.
Where people get it wrong
- "Merged mining splits the miner's power in two." It doesn't. Every guess counts for both chains in full.
- "The child chain is as secure as the parent." Only as secure as the share of parent hash rate that chooses to merge-mine it.
- "Any two coins can be merged." They need the same hash function, and the child must be built to accept AuxPoW.
- "It changes the parent chain." No. The parent's rules don't change. The fingerprint is just data in the miner's own coinbase.
Check who holds the pickaxes
If you look at a merge-mined coin, check which pools mine it and what share of the parent's hash rate they hold. A pool explorer for the child chain shows it.
If a handful of pools find nearly every block, the claim office is open for business, but only a few men are digging.
Frequently asked questions
What is merged mining?
Merged mining lets a miner use the same proof of work for two blockchains at once. The child chain accepts work done on a parent chain, as long as the parent block contains a fingerprint of the child block and the hash meets the child's target.
What is AuxPoW?
AuxPoW, short for auxiliary proof of work, is the data structure a merge-mined chain uses to accept a parent chain's work. It contains the parent block header, the parent's coinbase transaction and the Merkle branch linking them.
Which coins use merged mining?
Namecoin is merge-mined with Bitcoin, and its FAQ dates the first production use of the scheme to October 2011. Dogecoin is merge-mined with Litecoin; its block 371,337 of 11 September 2014 was the switchover block.
Does merged mining use more electricity?
No. The miner hashes the parent block once, and each result is simply checked against both chains' targets. Namecoin's FAQ describes merged mining as possible at no extra cost for hardware and electricity.
Is merged mining secure?
It can make a small chain much harder to attack, because an attacker has to match the merged hash rate. But the child chain is only as safe as the share of parent miners who choose to merge-mine it, so it's worth checking how many pools actually mine it.
Sources
- Satoshi Nakamoto, Re: BitDNS and generalizing Bitcoin, bitcointalk.org (9 December 2010)
- Namecoin, FAQ (namecoin.org source on GitHub)
- Dogecoin Core, release notes 1.8.1 to 1.8.3 (GitHub commit)
- Blockchair API, Dogecoin block 371,337, raw block (11 September 2014)
- CoinDesk, Dogecoin community celebrates as merge mining with Litecoin begins (11 September 2014)

