paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.76k stars 632 forks source link

[FRAME] `Currency::transfer()` can create locks if used incorrectly #3332

Open Gioyik opened 6 months ago

Gioyik commented 6 months ago

currently if you try to transfer more than what you have without checking for balance, the result will be the account having a locked amount. You can lock more than you have, something that is not wrong per se but it would be good to document the behavior as someone could create locks on accounts unintentionally and get them stuck until more tokens are transfer, or have a pallet to blindly trust the locked amount.

it would be good during the documentation process to double check if there's any place today where the locked amount is being counted as voting power or as an unreal advantage, I am not aware of that being the case, but better double check to be safe.

kianenigma commented 6 months ago

Something that can be addressed as a part of #2683 / https://github.com/paritytech/polkadot-sdk-docs/issues/49 or similar PRs.