package tezos-protocol-019-PtParisB

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val init : own_frozen:Tez_repr.t -> staked_frozen:Tez_repr.t -> delegated:Tez_repr.t -> current_level:Level_repr.t -> t

The weight of a delegate used for voting rights.

val apply_slashing : percentage:Percentage.t -> t -> t
val own_frozen : t -> Tez_repr.t

The delegate's own frozen funds.

val staked_frozen : t -> Tez_repr.t

The total frozen funds from all external stakers.

Does not take the limit_of_staking_over_baking into account.

val current_delegated : t -> Tez_repr.t

The total delegated funds from all delegators.

Not adjusted considering overdelegation / overstaking.

val min_delegated_in_cycle : current_cycle:Cycle_repr.t -> t -> Tez_repr.t

Sum of own_frozen and staked_frozen.

Sum of own_frozen, staked_frozen, and current_delegated.

val allowed_staked_frozen : adaptive_issuance_global_limit_of_staking_over_baking:int -> delegate_limit_of_staking_over_baking_millionth:int32 -> t -> Tez_repr.t

The portion of staked_frozen that actually counts as staking when computing baking rights, considering both the global and the delegate's limit_of_staking_over_baking.

It is equal to the minimum of:

  • own_frozen scaled by the delegate's limit_of_staking_over_baking
  • own_frozen scaled by the global limit_of_staking_over_baking
val own_ratio : adaptive_issuance_global_limit_of_staking_over_baking:int -> delegate_limit_of_staking_over_baking_millionth:int32 -> t -> int64 * int64

Computes (num, den) representing the ratio of own_frozen over own_frozen + allowed_staked_frozen.

If allowed_staked_frozen is zero, returns (1L, 1L).

If own_frozen is zero, returns (0L, 1L).

val has_minimal_frozen_stake : minimal_frozen_stake:Tez_repr.t -> t -> bool
val has_minimal_stake_to_be_considered : minimal_stake:Tez_repr.t -> t -> bool
val remove_delegated : current_level:Level_repr.t -> amount:Tez_repr.t -> t -> t Tezos_protocol_environment_019_PtParisB.Error_monad.tzresult
module Internal_for_tests_and_RPCs : sig ... end
OCaml

Innovation. Community. Security.