chain-registry
chain-registry copied to clipboard
Asset token transfer history
Tokens can has all kinds of different meanings, representations, and transfer history, and it's not always via IBC.
It can be valuable to be able to trace the lifecycle of a token all the way back to its index. -For one, it allows for a clean system of data storage; as we'd only need one copy of the index image this way; for example, WETH traded on Osmosis can use the Ether logo by tracing back to the index on the chain registry, and so the Osmosis folder doesn't need to store the Ether logo in it. -It can also be used to easily convey the index and asset represents, as well as communicating the components of risk that might stack on top of what the risk would be when holding the index on its native platform. -This can also be used for synthetics
Similar to the ibc object, how it has source channel, source denom, and dst_channel, I think this object could be made more generic to allow for other forms of transfers. Bridges from outside Cosmos generally do not follow IBC at the moment, yet it can be good data to capture. Perhaps we should then move the ibc section to be a subsection of this origin section.
Assuming a unique identifier of { chain_name + base_denom }, and turning that into something more generic beyond blockchain (e.g., {source platform + asset name} ), I think it makes sense to have something like:
e.g., for osmosis::assetlist.json::WETH.grv:
"origin": {
"source": "gravitybridge",
"source_asset": "gravity0x1a2s3d...4f5g67", //whatever Gravity Bridge's base denom for bridged WETH is
"method": "ibc",
"index_origin": "_non-cosmos/ethereum",
"index_origin_asset": "wei"
}
and for gravitybridge::assetlist.json::WETH:
"origin": {
"source": "_non-cosmos/ethereum",
"source_asset": "0x1q2w3e...4r5t67", //whatever the Ethereum contract for WETH is
"method": "bridge",
"index_origin": "_non-cosmos/ethereum",
"index_origin_asset": "wei"
}
and for _non-cosmos/ethereum::assetlist.json::WETH:
"origin": {
"source": "_non-cosmos/ethereum",
"source_asset": "wei",
"method": "wrap",
"index_origin": "_non-cosmos/ethereum",
"index_origin_asset": "wei"
}
another example, for terra::assetlist.json::mNFLX:
"origin": {
"method": "synthetic_CDP",
"index_origin": "_non-cosmos/nasdaq"
"index_origin_denom": "NFLX"
}
yet another example, for _non-cosmos/ethereum::assetlist.json::USDC:
"origin": {
"method": "synthetic_fiat-reserve",
"index_origin": "_non-cosmos/forex"
"index_origin_denom": "USD"
}
Implemented @pyramation idea to move the specification of the Cosmos Chain Registry folder '_non-cosmos/' from the platform field to its own property which defaults to false. True means the platform is not a Cosmos chain
great! will be much cleaner for devs to use this way, while still giving the flags/info needed to ensure uniqueness.
was addressed with the addition of traces: https://github.com/cosmos/chain-registry/pull/558 https://github.com/cosmos/chain-registry/pull/731