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

Replace tokens pallet instance with assets #84

Closed
stanly-johnson opened this issue Apr 16, 2021 · 4 comments · Fixed by #112
Closed

Replace tokens pallet instance with assets #84

stanly-johnson opened this issue Apr 16, 2021 · 4 comments · Fixed by #112
Assignees

Comments

@stanly-johnson
Copy link
Member

stanly-johnson commented Apr 16, 2021

Related substrate/8483
Depends on substrate/8453 specifically fungibles::Lockable

@stanly-johnson stanly-johnson self-assigned this Jun 3, 2021
@stanly-johnson
Copy link
Member Author

Hi @olanod, I was looking at the assets pallet and it is more of a token generator/factory than a replacement for our current use case with orml-tokens. How should we handle this, is the goal to exactly emulate the function we previously had with orml-tokens (I guess via a wrapper pallet similar to backed-asset 🤔 ) or is the goal to allow anyone to create these tokens via deposit of a base currency? In that case do we implement balances pallet for the currency?

@olanod
Copy link
Member

olanod commented Jun 4, 2021

True, assets pallet has more functionality as a "token factory" but not necessarily differs a lot from what we have. Any pallet that used to depend on a MultiCurrency ideally will depend on a fungibles::* trait with the needed granular functionality, same for anything depending on Currecy would instead depend on a fungible::*. When it comes to configuring the pallet, initially we only allow for the root origin to create asset classes similar to how statemine did at launch, it might be that we enable the asset creation by anyone in the future but since in our case a new fiat assets mean we should also have an oracle for its price its likely that it will remain restricted. The difference with how it is now with ORML would be that a new asset class(e.g. creating the EUR token) can be created more dynamically just issuing a transaction(e.g. by the Kusama council) instead of a more cumbersome runtime upgrade.

@stanly-johnson
Copy link
Member Author

What about the currency, do we just use KSM/DOT like statemint or do we have our own?

@olanod
Copy link
Member

olanod commented Jun 4, 2021

Besides from the assets pallet itself, is there any other dependency on a Currency? Seems to me that if our instance of assets is controlled by the governance that wouldn't require reserving funds then a dummy adaptor can be created that implements currency without actually doing anything(the code paths in assets pallet where Currency is used shouldn't be needed.... Or the easy is we just add balances pallet for now and the token make it ROC or whatever the relay chain is.

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

Successfully merging a pull request may close this issue.

2 participants