-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
staking: allow nominator to bail out of the automatic reward payment #458
Comments
Currently, the rewards are paid out for every era one by one using the Could there be another incentive to bail out of the automatic reward payment other than accounting? For doing this there should be made a function that could probably ideally make a payout for multiple eras at once because it would be impractical to withdraw the rewards from multiple eras one by one. |
Not that I know of, accounting is the main one that I can think of.
Indeed, there needs to be a feasibility study here as I think a lot of the current payout system is based on the assumption that a validator is paid out at once. Namely, I think in the If you happen to look into this and have more findings, to let us know. Then we can decide if this is worth doing or not. |
For this, to work we cannot store information about the payout type(i.e automatic or manual) in the There should probably be a new struct for the nominator similar to Something like this could be made: staking/src/lib.rs
pub enum PayoutType {
/// The nominator gets paid out whenever someone makes a call to `payout_stakers`
Automatic,
/// The nominator receives the rewards when he requests so.
Manual,
}
pub struct NominatorLedger {
/// List of eras that the nominator has claimed the rewards for.
pub claimed_rewards: Vec<EraIndex>,
/// The type of payout the nominator has chosen.
pub payout_type: PayoutType,
} staking/src/pallet/mod.rs
/// Map from nominators `stash` account to the info regarding the nominator.
#[pallet::storage]
pub type NLedger<T: Config> = StorageMap<_, Blake2_128Concat, T::AccountId, NominatorLedger>;
/// It is possible to access the NominatorLedger from the `payout_stakers` given that we have
/// the nominators `stash` account. It is possible to achieve this, but as you mentioned the current payout system is based on the assumption that everyone is paid out at once, so there would need to be some code and logic change. When storing all this information about the nominator it should be easy to make a function that could collect all of the rewards from the unclaimed eras. |
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
…ch#458) * integrate message-lane RPCs into Millau and Rialto runtime * fmt * use instance in InboundLanes * moved RialtoMessageLaneKeys/MillauMessageLaneKeys inside rpc_extensions_builder to ease Substrate refs update
For accounting purposes, a nominator might prefer to receive their rewards exactly when they wish. I have not looked too much yet, but it seems like this is not trivially possible. Nonetheless, I think it is an avenue worth exploring.
The text was updated successfully, but these errors were encountered: