2

Here is the scenario:

You get X DOT in vested transfer (with schedule A) and you stake them and compound the rewards (transferable = 0). After some time, you have X + Y staked and you get another Z DOT in vested transfer (with schedule B), where Z > X + Y. What you would expect to happen is:

  • Total locked = Z + X + Y (i.e. the whole balance and transferable is still zero)
  • 3 locks: X with vesting schedule A, Z with vesting schedule B, and X + Y for staking

However, what happens is:

  • Total locked = Z + X
  • Transferable = Y
  • 3 locks as above

So, the user basically gets a "free" unstake of their staking rewards thus far (Y). As far as I can tell there's no security risk, since the total staked amount is still X + Y and the user can be slashed for that amount. In the case of a 100% slash, the excess will effectively be "taken" from Z, and they'll end up with vested balance of Z - X - Y, as they should.

However, is this the expected behavior? Because it was unexpected for me.

Example:

  • Original vesting/staking: X = 1000
  • Compounded rewards: Y = 100
  • Second vesting: Z = 2000
  • Vesting lock = Total lock: Z + X = 3000
  • Staking lock: X + Y = 1100
  • Total balance: Z + X + Y = 3100
  • Transferable: Y = 100
2
  • in the description of the actual behaviour, you said that Y amount is transferable but at the same time it is locked (X + Y for staking, as in the expected behaviour). Is this what you tried to say? Also, quickly checking on mainnet I could see the expected behaviour in accounts with staking + vesting but not the second scenario you reported here.
    – Iker
    Commented Oct 27, 2022 at 10:53
  • Yes. The lock for staking is X + Y (the original amount plus the rewards). The total lock is the sum of the two vesting amounts: Z + X. So, the remaining (Y), since it's "beyond" the total lock is "translated" to transferable. I'll add an example in the question.
    – michalis
    Commented Oct 28, 2022 at 11:07

0

Your Answer

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

Browse other questions tagged or ask your own question.