Assessment reports>Silo Staking>Threat Model>Message: ExecuteMsg::QueueUnbond

Message: ExecuteMsg::QueueUnbond

This message can be invoked by anyone and is used to queue staked tokens for unbonding.

The parameters that a user can control are the following:

receiver — This is the address for which the shares are added to the unbonding batch. If this address is not provided, the address of info.sender is used. info.funds — Staked tokens sent along with the message. The denom is validated to be that of the staked token.

The functionality for the message is implemented with the queue_unbond handler. The staked tokens sent by the user are added to the current pending batch. The user's shares are then updated in an indexed map, which stores the shares for all receivers.

Moreover, if the current block time exceeds the unbonding start time for the current batch, ExecuteMsg::SubmitBatch is invoked. This submits the current pending batch to be unbonded.

Zellic © 2024Back to top ↑