From d641037691c5407378664f039857223896ce6bd7 Mon Sep 17 00:00:00 2001 From: theoboldfrazier <88169003+theoboldfrazier@users.noreply.github.com> Date: Fri, 6 May 2022 10:42:01 -0600 Subject: [PATCH] =?UTF-8?q?added=20a=20caip24=20proposal=20for=20cosmos=20?= =?UTF-8?q?caip19=20asset=20namespace=20to=20make=20cos=E2=80=A6=20(#2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added a caip24 proposal for cosmos caip19 asset namespace to make cosmos asset references unique * Update CAIPs/caip-24.md Co-authored-by: 0xdef1cafe <88504456+0xdef1cafe@users.noreply.github.com> * Update CAIPs/caip-24.md Co-authored-by: 0xdef1cafe <88504456+0xdef1cafe@users.noreply.github.com> * Update CAIPs/caip-24.md Co-authored-by: 0xdef1cafe <88504456+0xdef1cafe@users.noreply.github.com> * Update CAIPs/caip-24.md Co-authored-by: 0xdef1cafe <88504456+0xdef1cafe@users.noreply.github.com> * added IBC asset reference def. * Update CAIPs/caip-24.md Co-authored-by: Apotheosis <97164662+0xApotheosis@users.noreply.github.com> * fixed header grammer * capitalized Cosmos * Update CAIPs/caip-24.md Co-authored-by: Alexandre GOMES <17035424+gomesalexandre@users.noreply.github.com> * cleaned up grammer/spelling * Update CAIPs/caip-24.md Co-authored-by: Apotheosis <97164662+0xApotheosis@users.noreply.github.com> * Update CAIPs/caip-24.md Co-authored-by: Apotheosis <97164662+0xApotheosis@users.noreply.github.com> Co-authored-by: 0xdef1cafe <88504456+0xdef1cafe@users.noreply.github.com> Co-authored-by: Apotheosis <97164662+0xApotheosis@users.noreply.github.com> Co-authored-by: Alexandre GOMES <17035424+gomesalexandre@users.noreply.github.com> --- CAIPs/caip-24.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 CAIPs/caip-24.md diff --git a/CAIPs/caip-24.md b/CAIPs/caip-24.md new file mode 100644 index 00000000..1066310c --- /dev/null +++ b/CAIPs/caip-24.md @@ -0,0 +1,72 @@ +--- +caip: 24 +title: Asset Reference for the Cosmos Asset Namespace +author: Theobold Frazier +discussions-to: https://github.com/shapeshift/CAIPs/issues/1 +status: Draft +type: Standard +created: 2020-02-14 +updated: 2020-02-14 +requires: 19 +--- + +## Simple Summary + +This document is about the details of the Cosmos network asset namespace and reference for CAIP-19. + +## Abstract + +In CAIP-19 a general asset identification scheme is defined. This is the +implementation of CAIP-19 for Cosmos chain native assets and ibc assets. + +## Motivation + +See [CAIP-19](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md). + +## Specification + +### Cosmos chain Native Asset Namespace + +An Asset Namespace called "native" that references Cosmos network blockchain native assets, allowing for unique identification on Cosmos chains with multiple native assets. + +### Cosmos chain IBC Asset Namespace + +An Asset Namespace called "ibc". It references Cosmos network blockchain Inter-Blockchain Communication Protocol assets. + +#### Multiple Native Asset Reference Definition + +The Asset Reference format for Cosmos chain native assets is the base denomination of the asset in the current `chain_id`. + +#### IBC Asset Reference Definition + +The Asset Reference format for Cosmos chain ibc assets is the ibc channel identifier for that asset. + +## Rationale + +The Asset Namespace using slip44 for Cosmos chains is insufficient for chains with multiple native assets like osmosis-1. Using the "native" namespace allows multiple native assets to have unique CAIP19s. + +## Backwards Compatibility + +Not applicable. + +## Test Cases + +This is a list of manually composed examples + +``` +# Native Atom Asset on the cosmoshub-4 chain +cosmos:cosmoshub-4/slip44:118 + +# Native Osmosis Asset on the osmosis-1 chain +cosmos:osmosis-1/slip44:118 + +# Native Ion Asset on the osmosis-1 chain +cosmos:osmosis-1/native:uion + +# IBC Atom asset on the osmosis-1 chain +cosmos:osmosis-1/ibc:27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2 +``` + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).