Subject: [bitcoin-dev] Pseudocode for robust tail emission

From: [email-masked]
Date: Fri, 23 Dec 2022 19:43:36 +0100

Necessary or not - it doesn't hurt to plan the robust model, just in case. The proposal is:

Let every 210,000 the code calculate the average difficulty of 100 last retargets (100 fit well in 210,000 / 2016 = 104.166)
and compare with the maximum of all such values calculated before, every 210,000 blocks:

if average_diff_of_last_100_retargets > maximum_of_all_previous_average_diffs
	do halving
else
	do nothing

This way:

1. system cannot be played
2. only in case of destructive halving: system waits for the recovery of network security

Best Regards
Jaroslaw