subtensor icon indicating copy to clipboard operation
subtensor copied to clipboard

Locked stake, fixed epochs & fair validating rewards

Open bdmason opened this issue 10 months ago • 2 comments

Is your feature request related to a problem? Please describe.

Validator rewards don't reflect validator performance

In the current runtime the movement of stake to and from a validator (or one of their children) inflates the rewards. In the dTao runtime the movement of stake has the opposite effect and deflates the rewards.

Current Runtime

When a nominator adds stake their stake it is immediately available to the validator to earn rewards in subnet epochs (which are approx hourly), however it is considered non-viable for the nominator until the next hotkey epoch (daily). So for up to a whole day the stake of a new nominator will be earning rewards for a validator that will be shared between everyboth but themselves at the next hotkey drain. This causes nom/kt to be spiked as has been explained before when there was a very real case of a nom/kt of 3091 TAO for a small validator one day when a whale moved in.

Removing stake has the same effect too.

dTao Runtime

As hotkey epochs have been removed, the concept of non viable stake has gone with it. Staking rate limits have also been removed, perhaps because slippage is now considered a big enough deterrent to frequent stake movements.

The effect of completely free movement of stake and it being viable for rewards at each subnet epoch is the opposite of the current runtime. Take this trivialised example:

  1. A subnet epoch starts and a validator has a total of 10 Alpha staked in the subnet.
  2. The epoch runs and the validator earns rewards based on a combination its performance & the 10 Alpha staked.
  3. On the penultimate block of the subnet epoch a new staker adds 10 Alpha to the subnet.
  4. The subnet epoch ends and the rewards that were based on the original 10 Alpha stake are now shared amongst the validator based on the final stake value of 20 Alpha.

In this example the new staker has suppressed the rewards of the validator by 50% for the subnet epoch. This is the opposite of the current runtime where the rewards are inflated by the new stake.

It may be the case that slippage makes this economically unviable, but it offers a way for people to intentionally supress a validators rewards on chain to make them less appealing to stakers. Much like the current runtime offers a way to boost a validators rewards by sacrificing your own stake.

Describe the solution you'd like

Solution

In the past having a lock up period to ensure fair rewards by fixing stake to a full epoch was dismissed as the freedom of movement was considered more important. But now with dTao the maximum epoch is roughly an hour, very little freedom of movement needs to be sacrificed to ensure fair rewards.

When add_stake and remove_stake are called add the stake into a pending state until the subnet epoch runs.

Describe alternatives you've considered

No response

Additional context

At Taostats we know our current nom/kt is 100% accurate for each hotkey epoch because we simplified our way of calculating it. We simply take a nominators viable stake the block before the epoch end and on the block of the epoch end and use the difference as the profit input in the nom/kt calculation.

Since using this method we have seen some strage things on chain, most notably the day where a validator had 3091 TAO as their nom/kt (more than quadrupling every nominators stake balance on that day). Every time we investigated these things we always found the npm/kt figure was correct.

bdmason avatar Jan 08 '25 09:01 bdmason