Action: Undelegate
The controllable parameters of the Undelegate action are
the
validator_identity— this is how the validator to undelegate from is identifiedthe
start_epoch_index— is the epoch the delegation started, it is used for verificationthe
unbonded_amount— the expected unbonded amountthe
delegation_amount— the amount to undelegate
For this action handler, there is no check_stateless check.
The check_stateful check ensures that the validator exists, that the epoch is correct by comparing it to the validator's next rate data, and that the parameters match. It then verifies that the returned delegation_amount matches the expected unbonded_amount.
The execute registers the undelegation for execution at the end of the block and registers an undelegation denominator.