-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Allow to update min_balance
by asset owner for non-sufficient assets in assets pallet
#13402
Comments
I think it makes sense to allow this for asset owners. @bkchr if you confirm I will open a PR to implement this. |
Generally sounds reasonable, but we should probably only allow as long as WDYT @jsidorenko? |
If we check the docs they say:
by allowing to change that param, an admin acc could easily set now the highly wrong min_balance and wipe by that mistake users' balances |
so yeah, it would be safe to modify that param, only if |
@jsidorenko Do you think it would make sense to allow the admin account to set |
Then we would need to iterate all accounts, that would be way too costly. |
@bkchr why would you need to iterate all the accounts? |
Yeah no that makes sense. I read it differently, like checking that each account has an higher balance. Sorry :D |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-40/2468/1 |
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
Once an asset is created with
create
the value assigned tomin_balance
can't be modified again by the asset owner (It can be done withforce_asset_status
but this requiresForceOrigin
, aka root origin on Statemint/e). On the other hand, the number of decimals,decimals
, can be always modified by the asset owner with theset_metadata
call.For external tools, UIs and end users there is a correspondence between minimum balance and number of decimals of an asset. If one of these is modified, the other one should be adapted accordingly. Hence, assets pallet should allow updating
min_balance
of an asset together with the number of decimals. This is particularly interesting soon after the asset is created and its owners are still in the process of deploying the new asset class. Otherwise, they are forced to destroy the asset (two steps process) and create it again.Note that the possibility of updating
min_balance
parameter of an asset should be allow as long as it has no impact in the network. If the asset is made sufficient, thenmin_balance
should be only modified byForceOrigin
.Steps to reproduce
Create a new asset class with
create
call and try to changemin_balance
as the asset owner afterwards.The text was updated successfully, but these errors were encountered: