I’m working on a project that needs to be able to calculate the exact block reward at a given height. Since it isn’t disclosed in the API’s, I’ve been working on reworking the
coinbase_gen script but seem to have messed it up somewhere (my Erlang is subpar).
The formula for block reward at a given height is here correct? Is there any description on the actual methodology used here (not the inflation curve, but the actual algorithm used to avoid rounding errors)?
The goal is to do this in a non-recursive manner, to avoid having to recursively calculate the “existing supply” for each height.