Description
Describe the bug
Use case is moving/transfering stake from Subnet X to Subnet y (x != y) and neither are root
move_stake.rs calls
transition_stake_internal
line 350 calculates the fee. calculate_staking_fee
in stake_utils
since the netuids are different, and origin is not root - we end up on the else
stake_utils.rs line 1168, and the fee is 1 epoch worth of alpha for the amount being unstaked.
back to move_stake.rs
line 341
fee is defined as one epoch of alpha
350 - unstake charging the fee
#here is the mistake:
367 stake into the new subnet - charging the same fee.
You can see this in the following extrinsic:
https://taostats.io/extrinsic/5752552-0006
Stake removed event #5752552-0018. (fee of 1482474)
https://taostats.io/event/5752552-0018?network=finney
stake added event:#5752552-0019 (fee of 1482474)
https://taostats.io/event/5752552-0019?network=finney
The stake added fee should be the default fee of tao-> subnet of 50,000 rao.
To Reproduce
As explained above:
https://taostats.io/extrinsic/5752552-0006
Expected behavior
I expected https://taostats.io/event/5752552-0019
to have a fee of 50,000 rao
Screenshots
No response
Environment
production
Additional context
No response