Module lido::balance[][src]

Expand description

Logic for keeping the stake pool balanced.

Functions

Given a list of validators and their target balance, return the index of the validator that has less stake, and the amount by which it is below its target.

Compute the ideal stake balance for each validator.

Get the index of the validator to unstake from, if we need to unstake at all. If any validator is more than threshold away from its target, this function will try to unstake, and return the index of the validator where unstaking will have the largest impact.