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

RFC: New instruction for the reservation of asset classes/IDs #35

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 46 additions & 0 deletions proposals/0000-create-asset-instruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
Title: CreateAsset Instruction
Number: 0
Status: Draft
Version: 0
Authors:
- vstam1
Created: 2023-06-09
Impact: Low
Requires:
Replaces:
---

## Summary

The proposed change is to introduce a new Instruction called `CreateAsset`. The instruction allows foreign chains to create fully-backed derivatives. Currently these derivatives are created using the `Transact` instruction, or directly on the sovereign chain.


## Motivation

Currently the `Transact` instruction is used to create derivatives. The `Transact` instruction requires knowledge of the foreign system to determine which call to make. The call can differ per system, and in FRAME-based systems can depend on different instances of a pallet. The CreateAsset instruction abstracts the need to know this call away. Sending consensus systems can send this instruction to any chain without having to know the structure of the destination chain.

## Specification

The instruction would have the following specification:

```rust
CreateAsset {asset: MultiAsset, owner: MultiLocation}
vstam1 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

@gavofyork gavofyork Jun 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would instead call this AcquireAssetId, since:

a) you're not actually creating any assets; and
b) you're appointing a controller for the given asset class/ID.

Alternatives are:

  • OccupyAssetId
  • SeizeAssetId
  • TakeAssetId
  • AppointAssetIdAdmin
  • ProcureAssetId
  • ObtainAssetId

My favourites are ReserveAssetId and HoldAssetId, however these clash with pre-existing terminology.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about CreateAssetId or CreateAssetType or CreateAssetClass?

Copy link
Member

@gavofyork gavofyork Jun 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you're really creating anything so much as priming some namespace which is already yours to do so by virtue of the origin.

Perhaps InitializeAsset or SetupAsset..

```

The `CreateAsset` instruction allows for the creation of a single asset. This can be a fungible or non fungible asset.

## Security considerations


## Impact
The impact of this proposal is Low. It introduces a new instruction, so XCVM implementations have to be updated.

## Alternatives
As previously discussed, it is possible to create assets using the `Transact` instruction.

## Questions and open Discussions (optional)

- Currently the instruction allows for the creation of a single asset. Should the instruction allow for the creation of multiple assets?

- How should we handle metadata?
46 changes: 46 additions & 0 deletions proposed-rfc/0000-create-asset-instruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
KiChjang marked this conversation as resolved.
Show resolved Hide resolved
Title: CreateAsset Instruction
Number: 0
Status: Draft
Version: 0
Authors:
- vstam1
Created: 2023-06-09
Impact: Low
Requires:
Replaces:
---

## Summary

The proposed change is to introduce a new Instruction called `CreateAsset`. The instruction allows foreign chains to create fully-backed derivatives. Currently these derivatives are created using the `Transact` instruction, or directly on the sovereign chain.


## Motivation

Currently the `Transact` instruction is used to create derivatives. The `Transact` instruction requires knowledge of the foreign system to determine which call to make. The call can differ per system, and in FRAME-based systems can depend on different instances of a pallet. The CreateAsset instruction abstracts the need to know this call away. Sending consensus systems can send this instruction to any chain without having to know the structure of the destination chain.

## Specification

The instruction would have the following specification:

```rust
CreateAsset {asset: MultiAsset, owner: MultiLocation}
```

The `CreateAsset` instruction allows for the creation of a single asset. This can be a fungible or non fungible asset.

## Security considerations


## Impact
The impact of this proposal is Low. It introduces a new instruction, so XCVM implementations have to be updated.

## Alternatives
As previously discussed, it is possible to create assets using the `Transact` instruction.

## Questions and open Discussions (optional)

- Currently the instruction allows for the creation of a single asset. Should the instruction allow for the creation of multiple assets?

- How should we handle metadata?