github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/distribution/spec/05_hooks.md (about)

     1  <!--
     2  order: 5
     3  -->
     4  
     5  # Hooks
     6  
     7  ## Create or modify delegation distribution
     8   
     9   - triggered-by: `staking.MsgDelegate`, `staking.MsgBeginRedelegate`, `staking.MsgUndelegate`
    10  
    11  The pool of a new delegator bond will be 0 for the height at which the bond was
    12  added, or the withdrawal has taken place. This is achieved by setting
    13  `DelegationDistInfo.WithdrawalHeight` to the height of the triggering transaction. 
    14  
    15  ## Commission rate change
    16   
    17   - triggered-by: `staking.MsgEditValidator`
    18  
    19  If a validator changes its commission rate, all commission on fees must be
    20  simultaneously withdrawn using the transaction `TxWithdrawValidator`.
    21  Additionally the change and associated height must be recorded in a
    22  `ValidatorUpdate` state record.
    23  
    24  ## Change in Validator State
    25   
    26   - triggered-by: `staking.Slash`, `staking.UpdateValidator`
    27  
    28  Whenever a validator is slashed or enters/leaves the validator group all of the
    29  validator entitled reward tokens must be simultaneously withdrawn from
    30  `Global.Pool` and added to `ValidatorDistInfo.Pool`.