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

ICS 20: IBC fungible token transfer packet specification #9

Closed
cwgoes opened this issue Feb 11, 2019 · 5 comments · Fixed by #230
Closed

ICS 20: IBC fungible token transfer packet specification #9

cwgoes opened this issue Feb 11, 2019 · 5 comments · Fixed by #230
Assignees
Labels
app Application layer.
Milestone

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Feb 11, 2019

Will cover:

  • Packet specification & encoding for fungible token transfer
  • Required interfaces on each chain
  • Provided application-layer security guarantees
@cwgoes cwgoes added tao Transport, authentication, & ordering layer. stage-strawman labels Feb 11, 2019
@cwgoes cwgoes self-assigned this Mar 5, 2019
@cwgoes cwgoes added app Application layer. and removed tao Transport, authentication, & ordering layer. labels Mar 5, 2019
@cwgoes cwgoes changed the title ICS ?: IBC fungible token transfer packet specification ICS 20: IBC fungible token transfer packet specification Mar 5, 2019
@cwgoes
Copy link
Contributor Author

cwgoes commented Jun 29, 2019

Might be worth doing fairly soon just as an example for explaining protocol usage.

@cwgoes
Copy link
Contributor Author

cwgoes commented Jul 2, 2019

Packet will contain:

  • Denomination (string)
  • Amount (unsigned integer)

Some nontrivial logic to prefix denominations and reason about alternative source paths.

@cwgoes cwgoes added this to the IBC "1.0" milestone Jul 11, 2019
@cwgoes
Copy link
Contributor Author

cwgoes commented Jul 15, 2019

edit: When reading, replace root-of-trust hash with connection identifier in the following text.

Thoughts on permissionless denomination tracking across chains, for chains A and B:

  • Chain A bank module accepts new connections / channels from any module on another chain.
  • Denominations sent from chain B are prefixed with the hash of the root of trust and the name of the counterparty port of B, e.g. 0x1234/bank for the bank module on chain B with root-of-trust hash 0x1234. No supply limits are enforced, but the bank module on chain A tracks the amount of each denomination sent by chain B and keeps it in a store location which can be queried / proven.
  • Coins sent by chain A to chain B are prefixed in the same way when sent (0x4567/bank if the bank module is running on a hub with root-of-trust hash 0x4567). Outgoing supply is tracked in a store location which can be queried and proven. Chain B is allowed to send back coins prefixed with 0x4567/bank only up to the amount which has been sent to it.

This design has the following properties:

  • Permissionless, no need to whitelist connections, modules, or denominations.
  • Symmetric (just swap A and B - they both implement the same logic).
  • Allows inflationary tokens (e.g. for proof-of-stake) originating on one chain to be sent to the other.
  • Prevents Byzantine-inflation of tokens originating on chain A, on chain A, as a result of chain B's Byzantine behaviour (though any users who sent tokens to chain B are at risk).
  • User-unfriendly naming; will need to be managed via a UI or later nameservice module mapping prefixed denominations to common names ("Atom", "Ethereum").

This does not yet handle the "diamond problem", where a user sends a token originating on chain A to chain B, then to chain D, and wants to return it through D -> C -> A - since the supply is tracked as owned by chain B, chain C cannot serve as the intermediary. I don't know whether dealing with that case should be in-protocol or not - it may be fine to just require the original path of redemption (and if there is frequent liquidity on both paths it will work most of the time). Complexities arising from long redemption paths may lead to the emergence of central chains in the network topology (Hubs).

@cwgoes
Copy link
Contributor Author

cwgoes commented Aug 24, 2019

To-do:

  • Denomination mapping
  • Add more comments describing function behaviour
  • Ensure interfaces all match up
  • Ensure supply tracking works correctly, maintain explicit accounts per channel
  • Consider irregular connection alteration

@cwgoes
Copy link
Contributor Author

cwgoes commented Aug 24, 2019

This will happen in 1.0.0-rc3, not this evening.

edit: Never mind.

en added a commit to en/ics that referenced this issue Dec 14, 2019
* Translate 4_IBC_USECASES.md via GitLocalize

* Translate 4_IBC_USECASES.md via GitLocalize
@cosmos cosmos deleted a comment from somyaranjan007 Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Application layer.
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants