> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kronex.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Merged mining

> How proof of work done on other chains is bound into a Kronex block and paid.

Sealing a block is only part of what secures Kronex. Alongside the kHeavyHash
seal, a block can carry **merge-mining payloads**: proofs of work performed on
another chain that also commit to Kronex.

<Note>
  Merged mining does not replace the seal. Every Kronex block is sealed by
  [kHeavyHash](/learn/consensus). Merge-mining proofs ride inside the block and
  earn rewards; they do not decide which block is valid.
</Note>

## The parent chains

| Parent chain | ID  | Algorithm |
| ------------ | --- | --------- |
| Bitcoin Cash | `1` | SHA256d   |
| Litecoin     | `2` | Scrypt    |
| Ravencoin    | `3` | KawPoW    |
| Zcash        | `4` | Equihash  |

Dogecoin rides along on the Litecoin side, on the same Scrypt work.

Each chain carries its own difficulty state and its own reward curve, so
SHA256d and Equihash work can be priced differently while both stay accepted.
Losing one parent chain reduces the work flowing into Kronex; it does not stop
the chain, which is still sealed by kHeavyHash.

## How the binding works

A merge-mining payload reduces to a single field in the Kronex header,
`KRNXAuxRoot`, and that field is part of the proof-of-work pre-image — not just
of the block hash.

That distinction is the whole security argument. The payload decides who gets
paid. Anything covered by the block hash but not by the pre-image could be
rewritten after mining without invalidating the seal. Binding the root into the
pre-image makes rewriting it cost a re-mine.

Blocks with no payload keep the stock pre-image. Stripping a payload zeroes the
root, which drops the field entirely and changes the hash just as much, so
removing one buys an attacker nothing either.

## Workshares

The proofs themselves are called [workshares](/learn/workshares). Each one is
self-contained: the parent-chain header, the coinbase transaction that commits
to Kronex, and the Merkle path binding one to the other. Anyone can verify a
workshare from the data it carries, and no workshare can be forged more cheaply
than the hashrate it claims.

Workshares are indexed against canonical blocks and paid out of the same reward
pool as the sealer — see [Rewards](/learn/rewards).

## Reading it back

| Question                                                | Method                                              |
| ------------------------------------------------------- | --------------------------------------------------- |
| Does this block carry a payload, and did it verify?     | [`krnx_getAuxPowStatus`](/rpc/krnx/getAuxPowStatus) |
| What is in the payload?                                 | [`krnx_getAuxPow`](/rpc/krnx/getAuxPow)             |
| Which workshares were included, and what did they earn? | [`krnx_getWorkshares`](/rpc/krnx/getWorkshares)     |
| What did the whole block pay?                           | [`krnx_getBlockReward`](/rpc/krnx/getBlockReward)   |
