We’ve been testing staking and vesting combination and found one side-effect:
Alice has 2000 balance locked in staking, and 1 balance transferrabe
Bob sends a vested transfer to Alice for 1000 amount. Bob’s intention is that Alice keeps this amount for a year before she can sell it on the exchange (that’s what vesting is for, correct?)
Because 2000 that is locked in staking is greater than 1000 in vesting, 1000 remains transferrable.
Alice can transfer 1000 to the exchange immediately.
@gz1 Reserved tokens overlay, so another way to look at this structure is this:
Alice Before Transfer:
Free: 1
Locked Max; 2000
Staking: 2000
Total Balance 2001
After Transfer:
Free: 1001
Locked Max: 2000
Staking: 2000
Vesting: 1000
Total Balance 3001
So the 1000 is still vesting, but it doesn’t matter which 1000 tokens it is. The requirement is that Alice has a lock on 2000 tokens (2000 for staking and 1000 of those same 2000 for vesting). If Alice unstakes, then the 1000 vesting lock would still be there. It would look like this:
I understand the mechanics of how locks overlay, but I am trying to look at this from the standpoint of use cases. In this particular one Bob’s intention is to send Alice 1000 and have it locked for a year on Alice’s wallet, so that she can’t transfer them to an exchange and sell immediately.
But in fact Alice can take advantage of this design:
Keep her 3000 staked for a year and receive staking rewards (let’s say, it was her intention anyway)
Sell 1000 immediately
Seems like a bit unfair privilege to stakers who receive their staking bonuses AND can sell unvested funds.