Assessment reports>Silo Staking>Threat Model>Message: execute::check_received_coin_msg

Message: execute::check_received_coin_msg

This message is used to check the difference in coins between a snapshot before a withdraw delegator rewards message and after. There are two snapshots supplied: one for stake.denom and one for stake.utoken.

The function add_to_received_coins is called and supplied with a vector of coins received_coins, where the current balance and the snapshot balance are compared and the difference is added to the received_coins. The difference is then used to update the unlocked_coins state. This callback is relevant for functions that call burn/delegate and other messages that affect the token delegations.

The arguments supplied to check_received_coin_msg are the snapshots that are taken at the time of the invocation of the contract before delegation-related messages are sent.

Zellic © 2024Back to top ↑