1

I want a more extended than usual era period (it's pretty costly to change validators often), so it can take months on the single era. Still, it's not cool to bond validators without pay for such a long period.

So, I'm interested in a per-session payout. Is it possible to implement? I have in mind to make a new pallet with a hook that would make custom payout every here and there. (also, I will disable the staking implementation), but maybe there is a better way of achieving it.

Could you suggest any ?

1 Answer 1

0

Here's a simplified version that demonstrates the method:

Place the payout function within the end_session.

https://github.com/darwinia-network/darwinia/blob/646ebca9e99c727febbf410007f0967610e5d39c/pallet/staking/src/lib.rs#L1029

The reward will be distributed at the end of a session.

2
  • It seems that I would need to recreate my own staking. Is it possible though, maybe somehow reuse the payout of staking?
    – Yurtur
    May 5, 2023 at 12:41
  • I think that's impossible. Without the tweaking, pallet-staking's payout is binding with era. May 5, 2023 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.