package tezos-protocol-020-PsParisC
Issuance bonus.
The issuance bonus is a rational but is stored as fixed point integer to limit the serialized size as with Q we would have no control on the size each component (numerator, denominator).
It is expected to always be between 0 and the protocol's parametric constant max_bonus
. The int64 encoding of the bonus is made such that the approximation resulting of this encoding is negligible when the bonus is used in a context where the total supply of the network is in the order of magnitude of 2^50 mutez (10^15 mutez)
type t = private Tezos_protocol_environment_020_PsParisC.Q.t
An issuance bonus is a rational between zero and some max_bonus
.
type max_bonus = private t
A max_bonus
is a value between zero and one.
val zero : t
val encoding : t Tezos_protocol_environment_020_PsParisC.Data_encoding.t
val max_bonus_encoding :
max_bonus Tezos_protocol_environment_020_PsParisC.Data_encoding.t
val of_Q :
max_bonus:max_bonus ->
Tezos_protocol_environment_020_PsParisC.Q.t ->
t Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Getting a bonus out of rational. It will fail if the decoding doesn't provide a value that is valid wrt protocol's parametric constants
val max_bonus_parameter_of_Q_exn :
Tezos_protocol_environment_020_PsParisC.Q.t ->
max_bonus
Use only to define the max_bonus
parameter from Default_parameters
.