rusk
rusk copied to clipboard
Implement Moving Average Gas Price
Summary
According to Economic Protocol Design document, Chapter 3, we need a SMA (Simple Moving Average) of the gas price implementation. Last N=5760 blocks should be included in the average.
Possible solution design or implementation
We need a system field which would hold the average, as well as the current first gas price, as well as a counter. Care needs to be taken to include averages only from final (or close enough to final) blocks.
Additional context
Please refer to the document: Dusk Economics - by POL Finance and Emanuele Francioni (Chapter 3) This issue is also related and needed for the Economic Protocol Scenario 3 Implementation - see epic #1690