We can put ending timestamp inside store keys to mitigate this problem.
When queuing staking, the end time is set to current blocktime + time.Duration(params.NextEpochDays), and queued staking will be processed at the end time, not when the epoch increases.
Tasks