Expand description

Configuration trait of this pallet.

Implement this type for a runtime in order to customize this pallet.

Required Associated Types§

The overarching event type.

Weight information for extrinsics in this pallet.

The nominating balance.

Sadly needed to bound it to FixedPointOperand.

The type that is used for reward counter.

The arithmetic of the reward counter might saturate based on the size of the Currency::Balance. If this happens, operations fails. Nonetheless, this type should be chosen such that this failure almost never happens, as if it happens, the pool basically needs to be dismantled (or all pools migrated to a larger RewardCounter type, which is a PITA to do).

See the inline code docs of Member::pending_rewards and RewardPool::update_recorded for example analysis. A sp_runtime::FixedU128 should be fine for chains with balance types similar to that of Polkadot and Kusama, in the absence of severe slashing (or prevented via a reasonable MaxPointsToBalance), for many many years to come.

The nomination pool’s pallet id.

The maximum pool points-to-balance ratio that an open pool can have.

This is important in the event slashing takes place and the pool’s points-to-balance ratio becomes disproportional.

Moreover, this relates to the RewardCounter type as well, as the arithmetic operations are a function of number of points, and by setting this value to e.g. 10, you ensure that the total number of points in the system are at most 10 times the total_issuance of the chain, in the absolute worse case.

For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1. Such a scenario would also be the equivalent of the pool being 90% slashed.

Infallible method for converting Currency::Balance to U256.

Infallible method for converting U256 to Currency::Balance.

The interface for nominating.

The amount of eras a SubPools::with_era pool can exist before it gets merged into the SubPools::no_era pool. In other words, this is the amount of eras a member will be able to withdraw from an unbonding pool which is guaranteed to have the correct ratio of points to balance; once the with_era pool is merged into the no_era pool, the ratio can become skewed due to some slashed ratio getting merged in at some point.

The maximum length, in bytes, that a pools metadata maybe.

The maximum number of simultaneous unbonding chunks that can exist per member.

Implementors§