Mavryk_raw_protocol_alpha.Per_block_votes_reprOptions available for per-block votes
type per_block_votes = {liquidity_baking_vote : per_block_vote;adaptive_issuance_vote : per_block_vote;}val liquidity_baking_vote_encoding :
per_block_vote Mavryk_protocol_environment_alpha.Data_encoding.encodingval adaptive_issuance_vote_encoding :
per_block_vote Mavryk_protocol_environment_alpha.Data_encoding.encodingval per_block_votes_encoding :
per_block_votes Mavryk_protocol_environment_alpha.Data_encoding.encodingval compute_new_liquidity_baking_ema :
per_block_vote:per_block_vote ->
Liquidity_baking_toggle_EMA.t ->
Liquidity_baking_toggle_EMA.tcompute_new_liquidity_baking_ema ~per_block_vote old_ema returns the value new_ema of the exponential moving average old_ema updated by the vote per_block_vote interpreted as a vote to deactivate the liquidity baking feature (Off increases the EMA).
The EMA is updated as follows:
per_block_vote is Per_block_vote_pass then new_ema = old_ema,per_block_vote is Per_block_vote_off, then new_ema = (1999 * eman // 2000) + 1,000,000,per_block_vote is Per_block_vote_on, then new_ema = (1999 * eman // 2000).The multiplication is performed in Z.t to avoid overflows, division is rounded toward 1,000,000,000 (the middle of the interval).
val compute_new_adaptive_issuance_ema :
per_block_vote:per_block_vote ->
Adaptive_issuance_launch_EMA.t ->
Adaptive_issuance_launch_EMA.tcompute_new_adaptive_issuance_ema ~per_block_vote old_ema returns the value new_ema of the exponential moving average old_ema updated by the vote per_block_vote interpreted as a vote to activate the adaptive issuance feature (Off decreases the EMA).
The EMA is updated as follows:
per_block_vote is Per_block_vote_pass then new_ema = old_ema,per_block_vote is Per_block_vote_off, then new_ema = (1999 * eman // 2000),per_block_vote is Per_block_vote_on, then new_ema = (1999 * eman // 2000) + 1,000,000.The multiplication is performed in Z.t to avoid overflows, division is rounded toward 1,000,000,000 (the middle of the interval).
module Internal_for_tests : sig ... end