MHIN Protocol

By Ouziel Slama

Motivations

  • For aesthetic reasons. To make each transaction not just a financial operation, but a brushstroke in the blockchain's grand canvas of mathematical beauty.
  • These cascading patterns of zeros would not only create beauty but could also enhance compression, potentially streamlining the blockchain's storage and processing efficiency.
  • Anyone can earn MHIN by creating beautiful transactions - no single-winner-per-block like in Bitcoin block mining!
  • If successful, MHIN tokens could eventually reimburse transaction fees - rewarding those who make nice looking transactions!

MHIN mining

To mine MHIN you must broadcast a Bitcoin transaction whose txid starts with at least 6 zeros. The reward is calculated based on how your transaction compares to the nicest transaction in the block:

  • In a given block, transactions starting with the most zeros earn 4096 MHIN
  • Transactions with one zero less than the best transactions earn 4096/16 or 256 MHIN
  • Transactions with two fewer zeros earn 4096 / 16 /16 or 16 MHIN
  • etc.

The formula used is therefore as follows:

reward = 4096 / 16 ^ (max_zero_count - zero_count)

With `max_zero_count` equal to the number of zeros which start the best transaction and `zero_count` the number of zeros which start the transaction for which we calculate the reward.

Note: Coinbase transactions are not eligible for MHIN rewards.

MHIN distribution

MHINs earned with a transaction starting with 6 or more zeros are distributed to UTXOs. The distribution is carried out as follows:

  • If there is a single non-OP_RETURN UTXO it receives the entire reward.
  • If there are two or more non-OP_RETURN UTXOs, the reward is distributed to all UTXOs, except the last one, in proportion to the value of each UTXO
  • The calculations being made only with integers, the possible remainder of the division is distributed to the first non-OP_RETURN UTXO.

For example, if a transaction earning 256 MHIN contains 4 outputs with 500, 500, 500 and 2000 Satoshis respectively, the first output receives 86 MHIN of the reward, the second and third 85 MHIN.

Moving MHIN

When UTXOs with attached MHINs are spent, the MHINs are distributed to the new UTXOs in the transaction. Distribution is done in exactly the same way as rewards.