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

feat(bank): extend bank keeper by providing a convinient funtion to mint tokens to an account. #9619

Closed
4 tasks done
robert-zaremba opened this issue Jul 1, 2021 · 7 comments
Assignees
Labels
C:x/bank S:needs architecture review To discuss on the next architecture review call to come to alignment

Comments

@robert-zaremba
Copy link
Collaborator

robert-zaremba commented Jul 1, 2021

Summary

Current minting function is designed only for minting tokens to a module. For further adoption of the x/bank module we need a function to mint to any account.

Problem Definition

In the NFT ADR discussions we were proposing to use x/bank to manage assets. People were afraid that it will require additional refactoring. In fact we don't need much to make token minting more usable for wider usage. For minting, we need a dedicated method to mint for any account with appropriate event.

Proposal

  • add bank keeper method to mint to any account
  • extend the mint event by adding an optional attribute: recipient

Followup

Design better minting permission mechanism.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@robert-zaremba robert-zaremba added C:x/bank S:needs architecture review To discuss on the next architecture review call to come to alignment labels Jul 1, 2021
@robert-zaremba robert-zaremba added this to the v0.44 milestone Jul 1, 2021
@robert-zaremba robert-zaremba self-assigned this Jul 1, 2021
@robert-zaremba
Copy link
Collaborator Author

cc: @aaronc , @haifengxi , @alexanderbez , @fdymylja , @jgimeno

@fdymylja
Copy link
Contributor

fdymylja commented Jul 1, 2021

Which component decides who/what has the authorization to mint a certain asset?

@alexanderbez
Copy link
Contributor

I imagine it would be up to the module(s) in concern to decide who/when gets minted coins. I can definitely think of certain use-cases where this would be useful. Today, if you wanted to to this, you'd have to mint to a module account and then send those tokens from the module account to a regular account. So this proposal just seems to save us one step?

@robert-zaremba
Copy link
Collaborator Author

yes, directly mint to an account and emit appropriate event.

@Tectract
Copy link

Tectract commented Aug 30, 2023

Hello, my team is looking at this issue right now because we have a chain with "security tokens" and we need the ability to mint the tokens (increase token supply) for a non-staking token, to correspond to security share issuances.

In our case it would be fine to have one authorized account be able to "mint" tokens by adjusting token supply, and it would also be nice to have the ability to REDUCE the token supply also, to help deal with share splits or warrant transfers.

Another feature here that would be AMAZING is the ability to issue dividends to everyone who holds one asset, while the dividends would be paid in another token (dividends cannot be paid in the same token or it is legally considered a share "split") and we could choose the dividend payment rate and token to pay the dividend in, and the dividend would be paid to all token-holders proportionally depending on their balance.

It would also be nice to have the validators be able all vote to increase/reduce a given token supply at a given block-height. In our case we have a private blockchain where all the "staking" tokens are held by us, essentially, so in a normal / public blockchain you maybe (probably) wouldn't want the stakers to be able to vote to increase the token supply, normally... It might be in their interest to be able to reduce token supply though and in that case maybe there should be a way to reduce supply by getting rid of UNALLOCATED (owned by the authorized address) tokens versus a proportional reduction in every token-holder balance and a proportional reduction in the unallocated supply also.

In the case of a security share issuance and an increase in the total token supply:

  1. in the case of a normal issuance you would increase the token supply and issue new UNALLOCATED shares, and the new tokens would need to be owned by / issued to an authorized address in this case, so they can be then sold as securities to new investors and transferred from the authorized account to new accounts

  2. in the case of a share SPLIT you would increase the token supply and every shareholder's balance proportionally at the same time and no new unallocated shares would be created

So there actually may need to be a way to increase token supply in these TWO ways, to deal with security token issuances and splits.

@Tectract
Copy link

Tectract commented Aug 30, 2023

Sorry my last post was a little rambling, here's an important note for dealing with security tokens:

  1. For normal share ISSUANCES we need to be able to increase the token supply by adding tokens to the balance of an authorized account. Probably this would be the same account authorized to adjust the token supply, so that would likely go in the genesis config.yml

  2. for share SPLITS we would want to increase token supply and increase all token-holder balances PROPORTIONALLY

@tac0turtle tac0turtle mentioned this issue Aug 30, 2023
10 tasks
@tac0turtle
Copy link
Member

closing in favour of #17579. We plan on redesigning bank and possibly introducing a reserve module to handle minting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/bank S:needs architecture review To discuss on the next architecture review call to come to alignment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants