github.com/Finschia/finschia-sdk@v0.48.1/x/distribution/spec/02_state.md (about) 1 <!-- 2 order: 2 3 --> 4 5 # State 6 7 ## FeePool 8 9 All globally tracked parameters for distribution are stored within 10 `FeePool`. Rewards are collected and added to the reward pool and 11 distributed to validators/delegators from here. 12 13 Note that the reward pool holds decimal coins (`DecCoins`) to allow 14 for fractions of coins to be received from operations like inflation. 15 When coins are distributed from the pool they are truncated back to 16 `sdk.Coins` which are non-decimal. 17 18 - FeePool: `0x00 -> ProtocolBuffer(FeePool)` 19 20 ```go 21 // coins with decimal 22 type DecCoins []DecCoin 23 24 type DecCoin struct { 25 Amount sdk.Dec 26 Denom string 27 } 28 ``` 29 30 +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/distribution/v1beta1/distribution.proto#L94-L101 31 32 ## Validator Distribution 33 34 Validator distribution information for the relevant validator is updated each time: 35 36 1. delegation amount to a validator is updated, 37 2. a validator successfully proposes a block and receives a reward, 38 3. any delegator withdraws from a validator, or 39 4. the validator withdraws its commission. 40 41 - ValidatorDistInfo: `0x02 | ValOperatorAddrLen (1 byte) | ValOperatorAddr -> ProtocolBuffer(validatorDistribution)` 42 43 ```go 44 type ValidatorDistInfo struct { 45 OperatorAddress sdk.AccAddress 46 SelfBondRewards sdk.DecCoins 47 ValidatorCommission types.ValidatorAccumulatedCommission 48 } 49 ``` 50 51 ## Delegation Distribution 52 53 Each delegation distribution only needs to record the height at which it last 54 withdrew fees. Because a delegation must withdraw fees each time it's 55 properties change (aka bonded tokens etc.) its properties will remain constant 56 and the delegator's _accumulation_ factor can be calculated passively knowing 57 only the height of the last withdrawal and its current properties. 58 59 - DelegationDistInfo: `0x02 | DelegatorAddrLen (1 byte) | DelegatorAddr | ValOperatorAddrLen (1 byte) | ValOperatorAddr -> ProtocolBuffer(delegatorDist)` 60 61 ```go 62 type DelegationDistInfo struct { 63 WithdrawalHeight int64 // last time this delegation withdrew rewards 64 } 65 ```