背景

  • 新代币通常希望 Skip Go API 增加对其跨链转移的支持,因为该 API 为主要 Cosmos 钱包(Leap、Keplr、IBC Wallet、Metamask Snap)中的跨链兑换与转账提供能力,也为许多流行的 DeFi 聚合器和 dapp 前端(例如 Stargaze)提供跨链 DEX 聚合能力。因此,被纳入 Skip Go API 后,新代币可以立即获得覆盖整个 Interchain 的分发能力
  • 本文档介绍代币必须满足的基本要求,以及其贡献者必须完成的步骤,以便 Skip Go API 支持在 Interchain 中转移这些代币
本指南假定使用 IBC 进行互操作本指南假定你使用 IBC 在链之间转移代币。除了 IBC 之外,Skip Go API 也支持其他桥接和互操作协议,包括 Hyperlane、CCTP 和 Axelar。如果你使用的是其中之一,请通过 我们的 Discord 联系我们。 我们会在能力范围内为你提供流程指导。这些互操作协议相比 IBC 标准化程度更低,和/或开放免许可程度更弱,因此为新代币增加转移支持的流程会更定制化,并且因协议而异。我们愿意在可行范围内提供帮助,包括指导、实现支持,以及在必要时协助建立联系。

1. 满足以下基本要求

  1. 发行该代币的链必须已经被 Skip Go API 支持
    1. 使用 /info/chains 端点查询当前已主动支持的链列表:/v2/info/chains
    2. 如果该链尚未被支持,请按照 链支持要求 中的说明申请支持
    3. 这是前置条件
  2. Skip Go API 还必须支持你希望用户能够将该资产转移到的目标远程链
    1. 使用 /info/chains 端点查询当前已主动支持的链列表:/v2/info/chains
    2. 如果该链尚未被支持,请按照 链支持要求 中的说明申请支持
    3. 这是前置条件
    注意: 我们无法支持来自未接入 Skip Go 的源链的 IBC 代币。Skip Go 需要与源链直接集成,才能查询链状态和余额、提交并监控交易、计算准确的 gas 费用,以及处理链特定的代币机制。
  3. 代币元数据应可在常用链注册表中获取(例如 Cosmos Chain Registry)。元数据至少应包括:
    1. Denom(程序使用的字符串标识符)
    2. Symbol(即“ticker”)
    3. Asset name(人类可读的 denom 名称)
    4. Display name(即更友好的展示名称)
    5. Decimals / exponent
    6. 图片
    7. coingecko_id(如适用)
    8. 描述
    需要自定义代币的 logo 或元数据?如果你的代币在外部注册表中存在 logo 错误、元数据冲突或品牌信息问题,你可以直接向 Skip Go Asset Registry 提交覆盖配置。详见 资产注册表与覆盖。
  4. 确保 IBC relayer 正在积极监控并中继你希望用户用于转移代币的所有通道上的数据包(关于 relayer 的更多信息,请参见 链支持要求)。

2. 预热你的资产路由

对于每条目标链:
  1. 选择一个你希望作为向该目标链转移该资产的规范通道
  2. 通过该通道转移一笔非零数量的代币
  3. 确认该代币已成功转移到目标链
  4. 将已转移的代币保留在目标链上
如何为目标链选择通道?如果你正在启动一条新链,直接选择你团队已建立的通道即可。通常,两条链之间只会有一个高流量且有良好 relayer 支持的通道,所有资产都会通过它转移。(理论上,因为 IBC 是免许可的,所以可能存在多个通道,但通常 relayer 只会监控 1 个,创建更多通道只会给各方带来混乱。)如果你是在一个已经拥有活跃 IBC 生态、且已经发行了在 Interchain 中被广泛使用代币的链上发布新代币(例如 Osmosis 或 Neutron),你大概率应该使用那些成熟代币所使用的相同通道,因为 relayer 最有可能支持这些通道。要查看该通道,请使用以下参数调用 /v2/fungible/recommend_assets 端点:
  • source_denom:你资产发行所在链上的一个成熟代币(例如 uatom)
  • source_chain_id:你资产发行所在链的 chain_id(例如 cosmoshub-4)
  • dest_chain_id:你希望能够将资产转移到的目标链的 chain_id(例如 osmosis-1)
你要使用的通道可在返回结果中的 recommendations[0].asset.trace 查看
在 Skip Go API 尚未支持前,如何通过我选定的通道转移代币?在 Skip Go API 正式支持之前,最简单的方式是使用 Keplr 的开发者模式通过通道转移代币。要在 Keplr 扩展中启用开发者模式,打开汉堡菜单,点击 settings,然后点击 advanced,接着开启 “Developer Mode” 开关。开启开发者模式后,你应该会在主页底部看到 “Advanced IBC Transfer”。点击它,然后按照说明输入你的代币和目标通道 ID。
为什么这是必需的?对通道进行预热后,Skip 就能为用户启动面向你这条链的智能路由建议。我们会在链之间选择路由,以确保用户在目标链上始终收到其所选代币最理想的版本。作为为所有 API 用户提供良好体验的一部分,我们不会允许用户将资产桥接到此前从未有人桥接过该资产的新链。(对于普通用户来说,把现有代币带到一个它原本不存在的链上,往往会让他们被困在那条新链上,只持有一个无用的代币。)这就是为什么我们需要对通道进行“预热”,从而使其能够被推荐为桥接路由。

3. 等待最多 24 小时并进行验证

对于满足上述要求的所有资产和链,Skip 的智能路由检测通常会在 4-8 小时内自动发现新路由。这不会立即发生。请确保等待足够的时间。 在经过足够时间后,你可以使用 /v2/fungible/recommend_assets 端点验证 Skip Go API 是否支持你新配置的路由。对于你配置的每条目标链,请使用以下数据调用该端点:
  • source_denom:你的代币
  • source_chain_id:发行你代币的链
  • dest_chain_id:你在上一步中预热过 IBC 路由的目标链

常见问题

我想把一个 CW20 代币加入 Skip Go,需要做什么?

  1. 要添加 CW20 代币,你首先应确保它可用(要么已经部署可用于 IBC 转移该代币的 ibc20-cw20 converter 合约,要么它可以在 Skip Go 使用的某个兑换场所中于源链进行兑换)。
  2. 在确认可用后,你必须将该 CW20 代币的元数据添加到我们支持索引的注册表中。最简单的选择很可能是 Cosmos Chain Registry,你可以参考 Archway 的 assetlist.json 中的 CW20 代币条目示例。
  3. 当 PR 被合并到注册表后,我们的索引会在下一次索引运行时(每小时一次)将其加入 API。

Background

  • New tokens often want Skip Go API to add support for transferring their token to other chains because the API powers cross-chain swaps + transfers in all the major cosmos wallets (Leap, Keplr, IBC Wallet, Metamask Snap) and cross-chain DEX aggregation for many popular defi aggregator and dapp frontends (e.g. Stargaze). As a result, being added to the Skip Go API instantly offers distribution across the interchain for a new token
  • This document covers the basic requirements tokens must satisfy and steps their contributors must complete in order for Skip Go API to support transferring them throughout the interchain
Guide assumes using IBC for interopThis guide assumes you’re using IBC to transfer your token between chains.The Skip Go API supports other bridges and interop protocols in addition to IBC, including Hyperlane, CCTP, and Axelar. If you’re using one of these, please get in contact with us on our Discord. and we will help guide you through it to the extent we can.These other interop protocols are less standardized and/or less permissionless than IBC, so the process of adding support for transferring new tokens over them is more bespoke and varies by protocol. We’re happy to help where we can, providing guidance, implementation, and introductions where necessary.

1. Satisfy the following basic requirements

  1. The chain where the token is issued must already be supported by the Skip Go API
    1. Use the /info/chains endpoint to query a list of actively supported chains: /v2/info/chains
    2. If the chain is not already supported, follow the instructions in Chain Support Requirements to request support
    3. This is a pre-requisite
  2. The Skip Go API must also support the remote chains to which you wish users to be able to transfer the asset
    1. Use the /info/chains endpoint to query a list of actively supported chains: /v2/info/chains
    2. If the chain is not already supported, follow the instructions in Chain Support Requirements to request support
    3. This is a pre-requisite
    Note: We are unable to support IBC tokens from a source chain that is not integrated with Skip Go. Skip Go requires direct integration with the source chain to query chain state and balances, submit and monitor transactions, calculate accurate gas fees and handle chain-specific token mechanics.
  3. Token metadata is available in a commonly used chain registry (e.g. Cosmos Chain Registry) . Metadata should include at least:
    1. Denom (programmatic string identifier)
    2. Symbol (aka “ticker”)
    3. Asset name (human readable denom)
    4. Display name (aka pretty name)
    5. Decimals / exponent
    6. Images
    7. coingecko_id (if applicable)
    8. Description
    Need to customize your token’s logo or metadata?If your token has incorrect logos, conflicting metadata, or branding issues from external registries, you can submit overrides directly to the Skip Go Asset Registry. See Asset Registry & Overrides for detailed instructions.
  4. Ensure IBC relayers are actively monitoring and relaying packets on all channels over which you want users to transfer your token (See Chain Support Requirements for more info on relayers.)

2. “Warm Start” your Asset Routes

For each destination chain:
  1. Pick a channel that you would like to be the canonical channel for transferring the asset to this destination chain
  2. Transfer a non-zero amount of the token over the channel
  3. Confirm that the token successfully gets transferred to the destination chain
  4. Leave the transferred tokens on the destination chain
How do I pick a channel for a destination chain?If you’re launching a new chain, you should just pick whatever channel your team has set up. Usually, there’s just one highly-trafficked and well-relayed channel between two chains over which all assets are transferred. (In theory, there can be many because IBC is permissionless, but usually relayers are only monitoring 1 and creating more adds confusion for all parties)If you’re launching a new token on a chain that already has a vibrant IBC ecosystem and has already issued tokens that are widely used throughout the interchain (e.g. Osmosis or Neutron), you should probably use the same channel the well-established tokens use, since relayers are most likely to support these ones. To see which channel this is, call the /v2/fungible/recommend_assets endpoint with the following values:
  • source_denom: A well-established token on the chain where your asset is issued (e.g. uatom)
  • source_chain_id: The chain_id of the chain where your asset is issued (e.g. cosmoshub-4)
  • dest_chain_id: The chain_id of the chain to which you want to be able to transfer your asset (e.g. osmosis-1)
The channel you want to use is available in the response in recommendations[0].asset.trace
How do I transfer tokens over my chosen channel before Skip Go API supports it?The easiest way to transfer tokens over a channel before official Skip Go API support is to use Keplr’s developer mode. To enable developer mode in the Keplr extension, open the hamburger menu, click on settings, then click advanced, then activate the toggle for “Developer Mode”.Once developer mode is active, at the bottom of the main page you should see “Advanced IBC Transfer”. Click on this then follow the instructions for inputting your token and desired channel ID.
Why is this required?Warm starting the channels kicks off Skip’s intelligent routing suggestions for folks bridging to and from your chain. We choose routes between chains that ensure users are always receiving the most desirable version of their chosen token on their destination chain.As a part of providing good user experiences for everyone using the API, we don’t enable users to bridge assets to new chains where no one has previously bridged that asset. (Often times, for ordinary users, taking an existing token to a chain it doesn’t exist leaves them stuck on that new chain with a useless token). That’s why we need to “warm start” channels — to enable recommending them as bridging routes.

3. Wait up to 24 hours and verify

Skip’s intelligent route detection should automatically detect new routes for all assets and chains that meet the above requirements in 4-8 hours. This will not happen immediately. Please ensure you wait the necessary amount of time. After you’ve let enough time pass, you can verify that Skip Go API supports the new routes you’ve configured using the /v2/fungible/recommend_assets endpoint. For each destination chain you’ve configured, call this endpoint with the following data:
  • source_denom: Your token
  • source_chain_id: The chain on which your token is issued
  • dest_chain_id: The chain to which you’ve warm-started an IBC route in the previous step

Common questions

I want a CW20 token added to Skip Go, what do I need to do to add it?

  1. To add a CW20 token, you should first make sure its usable (either has ibc20-cw20 converter contracts deployed to IBC transfer the token or source-chain swappable on a swap venue used by Skip Go).
  2. Once confirmed usable, you must add the CW20 token’s metadata to a registry we support indexing from. The easiest one is likely the Cosmos Chain Registry, you can check out an example of a CW20 token entry here in Archway’s assetlist.json.
  3. Once the PR is merged into a registry, our indexing will add it to the API on our next indexing run (hourly).