Module Tezos_raw_protocol_alpha.Clst_stake_allocation

CLST stake allocation at cycle boundaries.

Computes per-delegate allocation amounts from the CLST_deposits, up to a per-delegate cap derived from staking parameters. Allocations are pure accounting (no tez movement): the amounts are tracked in the stez_frozen field of each delegate's staking balance, used by the baking-rights computation but the tez remains in the deposits so that stakers can always redeem.

Allocations are tracked in direct tez (no pseudotokens), eliminating rounding issues.

rebalance_at_cycle_end ctxt ~new_cycle recomputes CLST stake allocations for all registered delegates. Called at cycle end.

1. Clear all previous allocations.

2. Greedily allocate from CLST_deposits all registered delegates in public-key-hash order.

module For_RPC : sig ... end