Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back ForceTransfer and minting/burning to any account to x/tokenfactory #73

Open
sunnya97 opened this issue Apr 29, 2022 · 2 comments

Comments

@sunnya97
Copy link

As discussed in osmosis-labs/osmosis#1029, in the v1 of the x/tokenfactory module, we removed the ForceTransfer functionality and only allow mints/burns to be done to/from the admin account. We should eventually add these functionalities back in.

To do so, we need to conduct a review of all existing SDK code to make sure the "adding or removing of tokens" from accounts (especially module accounts) does not cause unexpected behavior or bugs. For example, what happens if an admin suddenly burns coins from the distribution module account? There's a lot of edge cases to consider.

@ValarDragon
Copy link
Member

ValarDragon commented Apr 29, 2022

Why do we even need force transfer, instead of just freezing an address?

The following seems equivalent to a force transfer of tokens C, from A to B:

  • Freeze denom C for address A
  • Mint new tokens C, and deposit in address B
  • Adjust bank supply offsets for C

@sunnya97
Copy link
Author

Well, if we want to more closely match the functionality that CW20 tokens have, they are able to remove tokens from accounts, not just freeze them.

Also, even if we only enable arbitrary freezing, we still have to conduct the same audit to make sure that doesn't break anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants