概述 / 背景

如何获取使用 Skip Go 的帮助?

你可以通过我们的 Discord或我们在 Telegram 上的开发者支持频道轻松联系到我们

谁在使用 Skip Go?

许多团队使用 Skip Go 来更轻松地构建多链流程,其中包括:
  • 所有主流的跨链钱包(Keplr、Leap、IBC wallet、Terra Station、所有 MetaMask Snap 团队)
  • Osmosis 资产充值页面
  • 许多主流跨链 dapp(例如 Stargaze、Stride、Astroport、Cosmos Millions)
  • 许多跨链 DeFi 前端(例如 Coinhall、fortytwo.money)
  • TrustWallet
  • 我们自己的前端(https://go.skip.build)
  • ……以及更多

Skip Go API 支持多少条链?

超过 70 条。我们支持:
  • 几乎所有启用了 IBC 的链
  • Axelar 支持的所有 EVM 链
  • Hyperlane 支持的所有 EVM 链和 Rollup
  • CCTP 支持的所有链
……并且很快会支持更多!

Skip Go 支持哪些桥和消息传递协议?

  • IBC
  • Hyperlane
  • Axelar
  • CCTP
  • Neutron 的原生桥
  • Stargate
  • Layerzero
  • Eureka
  • GoFast
……并且很快会支持更多!

Skip Go 支持哪些 DEX?

  • Osmosis
  • Astroport,覆盖 Terra、Neutron、Sei 和 Injective
  • White Whale,覆盖 Terra、Migaloo 和 Chihuahua
  • Uniswap v2/v3
  • Aerodrome
  • Velodrome
  • Tower
  • Elys
  • Dojoswap
……并且很快会支持更多

CCTP 的单笔转账上限是多少?

CCTP 转账的单笔上限为 1,000,000 USDC。

如何让 Skip Go API 支持我的链?

请参阅链支持要求文档,确认你的链满足必要要求,并提交该文档中链接的链支持申请表。

如何让 Skip Go API 支持我的代币?

请完成代币与路由支持要求文档中列出的必要步骤。

如何让 Skip Go API 支持某个特定代币到远程链的路由?

请针对相关目标链和代币,完成代币与路由支持要求文档中列出的必要步骤。

使用 Skip Go 构建一个应用需要多长时间?

5 到 30 分钟

为什么我总是遇到限流?

你需要向核心团队申请 API key,才能在不受限制的情况下使用 Skip Go。 请在所有请求中通过 client_id 参数传入你的 API key。

使用 Skip Go API 需要付费吗?

目前不需要。我们提供零成本的无限使用。 未来我们会推出两种定价方案:
  1. 手续费收入分成,无限使用:对于使用 Skip Go API 手续费功能向终端用户收取兑换手续费的客户,我们将抽取你所获得手续费收入的一部分。更高交易量的用户可解锁更低的费率档位。
  2. API 使用定价:对于不收取手续费的客户,我们将提供按月和按年的套餐,允许每月在一定请求数量内使用 API。我们会提供多个定价档位,档位越高,支持的限流阈值和每月请求数越高(类似 coingecko、infura 等)。

我对 Skip Go 有问题、意见或顾虑。如何联系你们?

加入我们的 Discord,并选择 “Skip Go Developer” 角色来分享你的问题和反馈。

退款及其他财务政策

如果兑换或转账的“价格很差”,Skip 会给用户退款吗?

不会。 在所有情况下,用户都应对自己签署的交易负责:
  1. 如果我们的智能合约按预期运行(即 amount_out 大于用户签署的 min_amount_out,或 amount_in 小于用户签署的 max_amount_in),Skip 不会因任何原因向用户提供退款、滑点补偿或任何其他形式的赔偿。如果用户或集成方认为某条路由不够理想、价格差、次优、流动性低,或整体表现不足,Skip 不会对由此造成的资金损失承担任何财务、法律或实际责任。
  2. 如果 Skip Go 依赖的智能合约未按预期运行,遭遇并受到相关漏洞影响的用户可以报告问题,以换取漏洞赏金。请参见下方关于漏洞赏金政策的部分。
集成方应对构建能够最大程度保护用户、避免其因不利价格而进行兑换或转账的 UI 负全部责任。为帮助实现这一目标,我们提供:
  • 在 API 响应对象中提供关于报价质量、链上流动性、费用和价格预估的详细信息(例如输入金额和输出金额的美元价值估算、链上价格影响等)
  • 在文档中提供关于如何构建 S.A.F.E. 界面的详细指导:SAFE Swapping: How to protect users from harming themselves
  • 基于多年与数十个顶级界面合作经验提供的实操型界面设计反馈

如果某个界面错误地构造了一笔调用 Skip 合约的交易,Skip 会向用户退款吗?

不会
  1. 如果集成方或终端用户故意或意外误用我们的某个合约(例如使用错误的调用数据调用合约,或将代币发送到并非为接收代币而设计的合约),Skip 不对由此可能造成的资金损失承担任何财务、法律或运营责任。
  2. 即使我们想这么做,Skip 及其关联方也没有能力升级合约以接收或“解卡”这些丢失的资金。我们对 Skip Go 中合约的拥有或控制程度并不比你更高。

是否存在任何情况下,Skip 会因任何原因向终端用户提供退款?

不会 Skip 对 Skip Go API 集成方基于其数据和服务所创建的应用不承担任何法律、财务或运营责任。Skip 也不对终端用户在这些界面中发起的兑换、转账及其他交易所产生的正面或负面财务结果承担任何法律、财务或运营责任。 即便用户因漏洞而损失资金,Skip 也不主张对该资金损失承担任何法律、财务或实际责任。在这种情况下,用户可以向 Skip 的漏洞赏金计划报告该漏洞。

漏洞赏金政策

Skip Go 提供漏洞赏金吗?

Skip 可能会向报告可复现的灾难性故障的用户提供最高 25,000 美元的漏洞赏金,作为对由 Skip 团队开发的智能合约或其他软件问题的补偿。灾难性故障的示例包括:
  • 兑换输出所获得的代币数量少于交易 calldata 中 min_amount_out 字段所指定并经签名确认的数量
  • 在调用数据格式正确的交易中发生全部资金损失;换言之,合约调用数据符合 Skip 团队提供的规范,并由 Skip Go API 产品生成
漏洞赏金金额完全由 Skip 自行决定。它可能取决于多种因素,包括:报告的质量、准确性与及时性,以及漏洞的严重程度/可利用性。Skip 在法律上没有义务支付任何金额。 如果用户因漏洞而损失资金,Skip 不主张对该资金损失承担任何法律、财务或实际责任。漏洞赏金的金额不会直接或间接取决于用户损失的资金数额。漏洞赏金在任何定义下都不构成退款。它是对识别并描述 Skip 软件在预期行为上发生严重故障的奖励。

如何向漏洞赏金计划报告漏洞?

如果你认为自己发现了需要报告的漏洞,请通过Discord联系我们的团队。

技术支持

go.skip.build 是开源的吗?我可以在哪里找到代码?

  • 是的!go.skip.build 的代码,也就是我们的多链 DEX 聚合器 + 兑换/转账界面,是开源的
  • 你可以在 https://github.com/skip-mev/skip-go-app 找到代码 — 欢迎用它来指导你自己的集成

/fungible/msgs 和 /fungible/msgs_direct 返回的消息里,默认的 IBC-Transfer 超时时间是多少?

  • 5 分钟

Skip Go 底层使用了哪些技术?

  • IBC,以及……
    • ibc hooks 和 ibc callbacks:使 Skip Go 兑换合约能够作为 IBC 转账的回调执行,从而可以构造这样的交易:将代币转移到有兑换场所的链上、执行兑换,再将其转出,而无需多次签名事件/交易。
      • Skip Go 很可能不会支持任何不具备 ibc-hooks 或等效功能的链上的 DEX
    • Packet-forward-middleware(PFM):使来自某条链的入站 IBC 转账能够原子性地发起到其他链的出站转账。这使得具备 PFM 的链可以在多跳路由中充当中间链。这对于那些为整个跨链生态发行资产的链尤其有价值(例如 Stride + stATOM、Noble + USDC、Axelar + axlUSDC)
    • (这篇我们撰写的文章更详细地介绍了这两项技术,以及如何在你的链上采用它们)
  • Axelar:一种跨链消息协议,支持多种 EVM 链并连接 Cosmos
  • CCTP:由 Circle(USDC 的发行方)构建的跨链消息协议,用于在链之间转移 USDC,而无需信任 Circle 之外的任何一方(而 USDC 用户本身已经默认信任 Circle)
  • Hyperlane:一种跨链消息协议,允许开发者无许可部署并自行选择安全模块
  • Go Fast:一种去中心化桥接协议,可在 EVM 和 Cosmos 之间实现快于最终确认时间的跨链操作
  • Eureka:IBC v2,可实现 Cosmos 与以太坊生态之间的无缝互操作。Eureka 使用 Succinct 的 SP1 零知识证明,在以太坊上高 gas 效率地验证 Cosmos 状态
  • Stargate:支持在 EVM 链上通过 Stargate V2 bridge 路由,包括 Sei EVM
  • Layerzero:一种全链消息协议,可在不同区块链之间传递数据和指令

联属费用如何运作?

  • 联属费用是使用 Skip Go 的开发者在兑换时向其终端用户收取的费用。我们支持多方分别收取并共享费用。比如,如果某个 DeFi 前端使用了一个由钱包团队构建并分发的小部件,那么小部件的开发方和使用该小部件的前端方都可以分别收取联属费用。
  • 费用按基点(basis points,或“bps”)计算。1 个基点等于 0.01%。因此,100 bps = 1% 的费用。
  • 联属费用基于最小输出数量计算,并且以输出代币计价和收取。 例如,假设一笔从 ATOM 到 OSMO 的兑换,其最小输出数量为 10 uosmo,累计费用为 1000 bps,也就是 10%。如果这笔兑换成功执行,联属费用将是 1 uosmo。无论用户最终实际收到的是 10、11 还是 12 uosmo,联属费用都始终是 1 uosmo。
  • 当执行“精确输入数量”的兑换时,联属费用会计入 /route 返回的 amount_out 中。 更直白地说,Skip Go API 会在计算 amount_out 之前先扣除预期的联属费用,因此它能够准确估算用户在扣除费用后最终会收到多少。更严格地说,用户实际收到的数量很可能会高于 amount_out,因为在进行这一步计算/估算时,实际费用还无法确定。只有在之后设置滑点时,实际费用才会被确定。因此,用户最终支付的费用会比 API 预测值少 slippage_percent*amount_out。这对用户是有利的,因为估算出来的 amount_out 往往会低于用户实际收到的数量,从而提供一个缓冲,帮助用户抵御滑点带来的影响。

为什么 /assets_from_source 只返回可通过转账到达的资产,而不返回可通过兑换到达的资产?

我们考虑过为 /assets_from_source 增加“可兑换到达的目标资产”支持,但这不是当前的优先事项,因为几乎所有资产都可以通过与其他资产兑换而到达。所以对于 99.99% 的使用场景来说,如果把通过兑换可到达的目标资产也加进去,这个端点只会返回海量但信息价值并不高的数据。

为什么 Skip Go API 有时会说某条路由不存在,但实际上它应该存在(例如把 ATOM 转到 Stargaze)?

用户认为可能存在、但 Skip Go API 没有返回某条路由,通常有两个常见原因:
  1. 从未有人使用过这条路由: 默认情况下,Skip Go API 不会推荐从未被使用过的通道,也不会推荐它从未见过的 denom。比如,如果从未有人把 Neutron 转到 Stargaze,那么即使这两条链之间存在直接连接,Skip Go API 也不会推荐这样一条路由。
  2. 客户端已过期: 如果链与链之间的现有连接在一段超过“轻客户端信任期”的时间内没有被使用,它们往往会过期。Skip Go API 每隔几个小时就会索引所有链,以识别这类情况,避免用户误发起转账。
一个常见陷阱: 默认情况下,/assets_from_source 只返回可在单笔交易中到达的资产。如果你希望获取需要多笔交易的路由,请在输入中将 allow_multi_tx 标志设为 true。

中继一个 IBC 数据包需要多久?

这取决于很多因素,包括有多少 relayer 在覆盖某个特定通道、出块时间、源链的最终确认时间、relayer 是否在线、relayer 在等待批量处理多少数据包,等等。 简而言之,最坏情况下它可能只需几秒,也可能需要几分钟(甚至永远不会完成)。 超过超时窗口后,数据包在被中继到目标链时将不再有效。通过 Skip Go API 创建的所有数据包,超时时间都设置为 5 分钟。理解超时发生时用户代币会怎样非常重要。你可以在跨链失败场景中了解更多。 目前,我们建议你在应用中向用户展示一个简短的警告或免责声明,类似如下:
这笔兑换至少包含一次 IBC 转账。 IBC 转账通常需要 10 到 30 秒,具体取决于出块时间以及 relayer 搬运数据包的速度。但在一些链上(尤其是 IBC 交易量较低的链),relayer 经常会崩溃,或者在数小时乃至数天内都无法完成数据包中继。 当前,[OUR APPLICATION] 不会自行中继数据包,因此你的兑换/转账可能会卡在未完成状态。如果发生这种情况,你的资金只是被卡住,并没有丢失。一旦 relayer 恢复在线,并通知源链该数据包已超时,资金就会返还给你。超时时间设置为 5 分钟,但 relayer 重新上线并处理超时可能需要更久。

为什么中继一个数据包所需的时间波动这么大?为什么今天的 IBC 中继可能不可靠?

IBC relayer 在中继用户数据包时不会获得报酬,中继轻客户端更新也不会获得报酬。事实上,它们必须为中继的每一个数据包支付 gas。这意味着中继本质上是一种纯公益、持续亏钱的操作,既有运行节点和 relayer 进程带来的固定基础设施成本,也有用户 gas 带来的可变成本。

在 Cosmos 和 EVM 生态之间转账需要多久?

一般来说,转账所需时间取决于源链完成“最终确认”需要多久。这意味着:
  • 从 EVM 链发起的转账通常需要 30 分钟或更久。原因是大多数 EVM 链完成最终确认需要较长时间(30 分钟以上),这意味着我们依赖的桥在此之前不会把源链上的代币登记为已在桥中“锁定”。
  • 从 Cosmos 链发起的转账通常会在 30 秒内完成(前提是不发生 IBC relayer 故障),因为 Cosmos 链具有“快速最终确认”或“单槽最终确认”特性。几乎在包含你这笔转账的区块生成后,它就会被不可逆地纳入链中。

如果 Skip 不收取费用,为什么有些简单转账看起来还是被扣了费用?

这是因为许多桥(也是 Skip 所依赖的桥)会收取费用,用来支付 gas 和维持其协议运行的成本。
import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";

const txRaw = await signAmino(
	client,
  signer as OfflineAminoSigner,
  msgJSON.sender,
  [
  	{
  		typeUrl: multiHopMsg.msg_type_url,
  		value: msg.value,
  	},
  ],
    {
      amount: [coin(0, feeInfo.denom)],
      gas: `${simulatedGas * 1.2}`,
    },
      "",
        {
        accountNumber: acc?.accountNumber ?? 0,
        sequence: acc?.sequence ?? 0,
        chainId: multiHopMsg.chain_id,
      }
);

const txBytes = TxRaw.encode(txRaw).finish();

tx = await client.broadcastTx(txBytes, undefined, undefined);

我应该如何为 Cosmos 交易设置 gas price?

我们建议使用 chainapsis keplr-chain-registry 来设置 Cosmos 链的 gas price:https://github.com/chainapsis/keplr-chain-registry。根据我们的经验,这个 registry 对 gas price 的估计会略高一些,但这在 Cosmos 中反而能带来很好的用户体验,因为:
  • 交易几乎总是能够上链
  • gas price 很便宜,因此高估带来的成本并不高
很快,Skip Go API 也会提供推荐的 gas price,我们还会发布一个客户端库来抽象掉这部分复杂性。

我应该如何为 Cosmos 交易设置 gas amount?

我们建议使用 Gas 和 Fee 工具,它位于 Skip Go Client TypeScript 包 中。

文档中某个端点被标记为 ALPHA 或 BETA 是什么意思?

这表示我们可能会在任何时候对它们进行破坏性变更。

Skip Go 应用有哪些环境?

Skip Go 应用提供三个环境:mainnet、testnet 和 dev。 面向主网/生产用户的应用运行在 https://go.skip.build。它连接到主网链,并使用生产 API。这是大多数用户会接触到的版本。 测试网应用运行在 https://testnet.go.skip.build。它连接到测试网链,但仍然使用生产 API。当你希望在不改变 API 行为的情况下在测试网上进行测试时,这种设置会很有用。 开发环境应用运行在 https://dev.go.skip.build。它连接到主网链,但使用的是一个尚未发布到生产环境的开发版 API。

/route 里的 cumulative_fee_bps 是什么意思?

这里用于以 bps,也就是“基点”来指定费用数量。(1 bp = 1 / 100%;100 bps = 1%) 通过在 route 中指定它,Skip Go API 就能调整返回给你的报价,使其显示扣除费用后的输出代币预估值。这样可以确保终端用户从兑换中拿到的数量始终符合他们的预期。 这个参数之所以使用“cumulative”这个词(也就是“对一组值求和”),是因为 API 支持多个合作方同时收取联属费用。这个参数应当设置为所有这些组成费用的总和。(例如,如果某个小部件提供方收取 5 bp 的费用,而集成该小部件的前端开发者再收取 10 bp 的费用,那么 cumulative_fee_bps=15)

杂项

Skip 是否在做什么来提升 IBC 中继的可靠性?

  • 短期内,我们会把 relayer 和通道健康状态的实时数据加入 Skip Go API,这样我们就能准确预测通过某个通道中继一个数据包需要多久,并把数据包跟踪与中继能力集成到 API 中。
  • 中期内,我们会通过 Skip Go API 提供多链中继能力。这将是一项付费服务。
  • 长期来看,我们正在努力为中继建立更好的激励机制,让 relayer 不必再以公益方式运行。(如今 relayer 不会获得任何形式的费用或报酬,并且还在为用户的跨链 gas 提供补贴。)

General / Background

How can I get help using Skip Go?

You can reach us easily at our discord or in our developer support channel on Telegram

Who uses Skip Go?

Many teams use Skip Go to make it easier for them to build multi-chain flows, including:
  • Every major interchain wallet (Keplr, Leap, IBC wallet, Terra Station, all the metamask snap teams)
  • Osmosis asset deposit page
  • Many major interchain dapps (e.g. Stargaze, Stride, Astroport, Cosmos Millions)
  • Many interchain defi frontends (e.g. Coinhall, fortytwo.money)
  • TrustWallet
  • Our own frontend (https://go.skip.build)
  • …and many more

How many chains does Skip Go API support?

More than 70+. We support:
  • Almost every IBC-enabled chain
  • Every EVM chain Axelar supports
  • Every EVM chain and rollup Hyperlane supports
  • Every chain CCTP supports
…with more coming soon!

Which bridges and message passing protocols does Skip Go support?

  • IBC
  • Hyperlane
  • Axelar
  • CCTP
  • Neutron’s native bridge
  • Stargate
  • Layerzero
  • Eureka
  • GoFast
…with more coming soon!

What DEXes does the Skip Go support?

  • Osmosis
  • Astroport across Terra, Neutron, Sei, and Injective
  • White Whale across Terra, Migaloo, and Chihuahua
  • Uniswap v2/v3
  • Aerodrome
  • Velodrome
  • Tower
  • Elys
  • Dojoswap
…with many more coming soon

What is the maximum transfer limit for CCTP?

CCTP transfers have a maximum limit of 1,000,000 USDC per transfer.

How do I get Skip Go API to support my chain?

Please see the Chain Support Requirements document to ensure your chain meets the necessary requirements and submit the chain support request form linked in that doc.

How do I get the Skip Go API to support my token?

Please complete the necessary steps detailed in the Token & Route Support Requirements doc.

How do I get the Skip Go API to support a route for a particular token to a remote chain?

Please complete the necessary steps detailed in the Token & Route Support Requirements doc for the destination chain and token in question.

How do I get the Skip Go API to route swaps to my swap venue or DEX?

Please see the Swap Venue Requirements page to ensure your DEX meets the necessary requirements then submit the swap venue request form linked in that doc.

How long does it take to build an application with Skip Go?

5-30 minutes

Why do I keep getting rate limited?

You need to request an API key from the core team to use Skip Go without limitations. Pass your API key into all requests with the client_id parameter.

Does the Skip Go API cost anything?

No, not at this time. We offer unlimited usage at zero cost. In the future we will introduce two pricing plans:
  1. Fee revenue sharing, unlimited usage: For customers who use Skip Go API’s fee functionality to charge their end-users fees on swaps, we will collect a portion of the fee revenue that you earn. Higher volume users will unlock lower fee tiers.
  2. API Usage Pricing: For customers who do not charge fees, we will offer monthly and annual plans that allow usage of the API up to some number of requests per month. We will offer several pricing tiers, where higher tiers support higher rate limits and more monthly requests (similar to coingecko, infura, etc..)

I have questions, comments, or concerns about Skip Go. How can I get in touch with you?

Join our Discord and select the “Skip Go Developer” role to share your questions and feedback.

Refunds and other financial policies

Does Skip ever refund users for swaps or transfers with “bad prices”?

No. Users are responsible for the transactions they sign in all cases:
  1. If our smart contracts behave as expected (i.e. amount_out exceeds min_amount_out signed by the user or amount_in is less than max_amount_in signed), Skip will not offer users refunds, slippage rebates, or any other form of compensation for any reason. Skip does not accept or bare any financial, legal, or practical responsibility for lost funds in the event a user or integrator believes a particular route is inadequate, bad, supoptimal, low liquidity, or otherwise not performant enough.
  2. If the smart contracts Skip Go depends on do not behave as expected, users who encounter and suffer bugs may report them in exchange for a bug bounty payment. See the section on our bug bounty policy below.
Integrators are solely and completely responsible for building UIs that maximally protect users from harming themselves by swapping or transferring at unfavorable prices. To help facilitate this goal, we provide:
  • Detailed information about quote quality, on-chain liquidity, fees, and price estimates in our API response objects (e.g. estimates of the USD value of amount in and amount out, on-chain price impact, etc…)
  • Extensive guidance about how to build S.A.F.E. interfaces in our docs: SAFE Swapping: How to protect users from harming themselves
  • Hands-on interface design feedback based on years of working with dozens of top interfaces

Does Skip provide refunds to users if an interface created an transaction that called a Skip contract incorrectly?

No
  1. If an integrator or end user misuses one of our contracts intentionally or by accident (e.g. calls the contract with incorrect call data, sends tokens to a contract not designed to receive tokens), Skip bares no financial, legal, or operational responsibility for funds that may be lost as a result.
  2. Skip and its affiliates do not have the ability to upgrade contracts to receive or “unstick” lost funds even if we wanted to. We do not own or control the contracts in Skip Go any more than you do.

Are there any circumstances under which Skip would offer a refund to an end user for any reason?

No Skip accepts no legal, financial, or operational responsibility for the applications the integrators of the Skip Go API create using its data and services. Skip also accepts no legal, financial, or operational responsibility for the positive or negative financial outcomes of the swaps, transfers, and other transactions that end users may create in these interfaces. Even in the event a user lost funds as a result of a bug, Skip does not claim any legal, financial, or practical liability for lost funds. In these cases, users may report the bug to Skip’s bug bounty program.

Bug Bounty Policy

Does Skip Go offer bug bounties?

Skip may provide a financial bug bounty of up to $25,000 as compensation to users who report a reproducible catastrophic failure of a smart contract or other piece of software that the Skip team developed. Examples of catastrophic failures include:
  • Receiving fewer tokens in the output of a swap than specified and signed over in the min_amount_out field of the transaction calldata
  • Total loss of funds resulting from a transaction where the call data is correctly formed — in other words, where the contract call data matches the specification provided by the Skip team and generated by the Skip Go API product
The size of the bug payment is determined at Skip’s sole discretion. It may depend on a variety of factors, including: quality, accuracy, and timeliness of the report & severity/exploitability of the bug. Skip is not legally obligated to provide any payment amount. In the event a user lost funds as a result of a bug, Skip does not claim any legal, financial, or practical liability for lost funds. The size of the bug bounty will not depend directly or indirectly on the amount of funds the user lost. The bug bounty does not constitute a refund under any definition. It is a reward for identifying and characterizing gross failures in intended behavior of the Skip software.

How do I report a bug to the bug bounty program?

Please get in touch with our team on Discord if you believe you have a bug to report.

Technical Support

Is go.skip.build open source? Where can I find the code?

  • Yes! The code for go.skip.build — our multi-chain DEX aggregator + swapping/transferring interface is open source
  • You can find the code at https://github.com/skip-mev/skip-go-app — Feel free to use it to guide your own integration

What’s the default IBC-Transfer timeout on the messages returned by /fungible/msgs and /fungible/msgs_direct?

  • 5 minutes

What technologies does Skip Go use under the hood?

  • IBC and…
    • ibc hooks and ibc callbacks: Enables the Skip Go swap contracts to be executed as callbacks of IBC transfers, which enables constructing transactions that can transfer tokens to a chain with a swap venue, perform a swap, and transfer them out — without multiple signing events / transactions.
      • Skip Go will likely not support DEXes on any chains that do not have ibc-hooks or equivalent functionality
    • Packet-forward-middleware(PFM): Enables incoming IBC transfers from one chain to atomically initiate outgoing transfers to other chains. This allows the chain with PFM to function as the intermediate chain on a multi-hop route. This is especially valuable for chains that issue assets for use throughout the interchain (e.g. Stride + stATOM, Noble + USDC, Axelar + axlUSDC)
    • (This article we wrote goes into more detail about both technologies and how to adopt them on your chain)
  • Axelar: A cross-chain messaging protocol that supports a wide variety of EVM chains and connects to Cosmos
  • CCTP: A cross-chain messaging protocol built by Circle (the issuer of USDC) to move USDC between chains without trusting any parties other than Circle (which USDC users already trust implicitly)
  • Hyperlane: A cross-chain messaging protocol that allows developers to deploy permissionlessly and choose their own security module
  • Go Fast: A decentralized bridging protocol that enables faster-than-finality cross-chain actions across EVM and Cosmos
  • Eureka: IBC v2 that enables seamless interoperability between Cosmos and Ethereum ecosystem. Eureka uses Succinct’s SP1 zero-knowledge proofs for gas-efficient verification of Cosmos state on Ethereum
  • Stargate: Support for routing over the Stargate V2 bridge on EVM chains incl. Sei EVM
  • Layerzero: A omnichain messaging protocol that sends data and instructions between different blockchains

How do affiliate fees work?

  • Affiliate fees are fees developers using Skip Go charge their end-users on swaps. We support multiple parties taking and sharing fees. For example, if a defi frontend uses the widget a wallet team builds and distributes, the makers of the widget and the users of the widget can separately charge affiliate fees.
  • Fees are calculated in basis points or “bps”. One basis point equals one one-hundredth of a percent. So 100 bps = 1% fee
  • Affiliate fees are calculated based off the minimum amount out and are taken/denominated in the output token. For example, consider an ATOM to OSMO swap where min amount out is 10 uosmo and the cumulative fees are 1000 bps or 10%. If the swap successfully executes, the affiliate fee will be 1 uosmo. It will be 1 uosmo regardless of whether the user actually gets 10, 11, or 12 uosmo out of the swap.
  • When performing a swap with an exact amount in, affiliate fees are accounted for in the amount_out returned by /route. More plainly, the Skip Go API subtracts off expected affiliate fees prior to the amount_out calculation, so that it represents an accurate estimate of what the user will receive at the end of the swap, net of fees. To be exact, the user will probably receive more than the amount out because the actual fee is not known at the time of this calculation / estimate. It’s not known until later when slippage is set. So the user will end up paying slippage_percent*amount_out less than the API predicts. This is good for the user because the estimated amount out will likely be lower than the actual amount they receive, offering a buffer that protects the user from the effects of slippage.

Why does /assets_from_source only return assets that are reachable via transfers but not swaps?

We’re considering adding support for swappable destinations to /assets_from_source, but we’re not prioritizing it because almost every asset is reachable via swapping from every other asset. So for 99.99% of use cases, this endpoint would just return a massive amount of fairly uninformative data, if we added destinations reachable via swaps.

Why does the Skip Go API sometimes say a route doesn’t exist when it should (e.g. transferring ATOM to Stargaze)?

There are two common reasons Skip Go API is missing a route that a user thinks might exist:
  1. No one has ever used it: By default, the Skip Go API does not recommend channels that have never been used or denoms that it has not seen. For example, if no one has transferred Neutron to Stargaze, the Skip Go API will not recommend a route to do so — even if a direct connection exists between the two chains.
  2. Expired clients: Frequently, existing connections between chains expire when they’re not used for a period of time that exceeds the “light client trusting period. The Skip Go API indexes all chains every couple of hours to identify these cases and prevent users from accidentally attempting transfers.
A common gotcha: /assets_from_source only returns assets reachable in a single transaction by default. If you’d like to have access to routes that require multiple transactions, set the allow_multi_tx flag to true in the input.

How long does relaying an IBC packet take?

It depends on many factors, including how many relayers are covering a particular channel, block times, the time-to-finality of the source chain, whether relayers are live, how many packets relayers are waiting to batch together, and much more… In short, it can range from several seconds to minutes (or never) in the worst case. After a timeout window, a packet won’t be valid on the destination chain when it gets relayed. This timeout is set to 5 minutes for all packets created via the Skip Go API. It’s important to understand what happens to user tokens in the event of timeouts. You can read about that in Cross-chain Failure Cases For now, we recommend making a small warning or disclaimer to users on your application, similar to the following:
This swap contains at least one IBC transfer. IBC transfers usually take 10-30 seconds, depending on block times + how quickly relayers ferry packets. But relayers frequently crash or fail to relay packets for hours or days on some chains (especially chains with low IBC volume). At this time, [OUR APPLICATION]does not relay packets itself, so your swap/transfer may hang in an incomplete state. If this happens, your funds are stuck, not lost. They will be returned to you once a relayer comes back online and informs the source chain that the packet has timed out. Timeouts are set to 5 minutes but relayers may take longer to come online and process the timeout.

Why is the time to relay a packet so variable? And why can IBC relaying be unreliable today?

IBC relayers do not receive payments for relaying user packets or for relaying light client updates. In fact, they have to pay gas for the every packet they relay. That means relaying is strictly a charitable, money-losing operation with fixed infrastructure costs from running nodes + the relayer process, as well as variable costs from user gas.

How long does it take to transfer between Cosmos and EVM ecosystem?

In general, transfers take as long as it takes for the source chain to “finalize”. That means:
  • Transfers originating on EVM chains will take 30 minutes or more. The reason is that most EVM chains take a long time (30+ minutes) to finalize, which means the bridges we rely on do not register the tokens on the source chain as “locked” in the bridge for at least that long.
  • Transfers originating on Cosmos chains will finish in less than 30 seconds usually (barring IBC relayer failures) because Cosmos chains have “fast” or “single slot finality”. Almost as soon as the block that contains your transfer gets created, its included irreversibly in the chain

If Skip doesn’t charge fees, how come some simple transfers seem to have a fee taken out of them?

This happens because many of the bridges (which Skip rely on) take fees to pay for gas and the cost of operating their protocol.
import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";

const txRaw = await signAmino(
	client,
  signer as OfflineAminoSigner,
  msgJSON.sender,
  [
  	{
  		typeUrl: multiHopMsg.msg_type_url,
  		value: msg.value,
  	},
  ],
    {
      amount: [coin(0, feeInfo.denom)],
      gas: `${simulatedGas * 1.2}`,
    },
      "",
        {
        accountNumber: acc?.accountNumber ?? 0,
        sequence: acc?.sequence ?? 0,
        chainId: multiHopMsg.chain_id,
      }
);

const txBytes = TxRaw.encode(txRaw).finish();

tx = await client.broadcastTx(txBytes, undefined, undefined);

How should I set gas prices for Cosmos transactions?

We recommend setting Cosmos chain gas prices using the chainapsis keplr-chain-registry: https://github.com/chainapsis/keplr-chain-registry. In our experience, this registry overestimates gas prices somewhat — but this leads to a very good UX in Cosmos because:
  • Transactions almost always make it on chain
  • Gas prices are very cheap — so overestimation is not costly
Soon, the Skip Go API will surface recommended gas price too, and we will release a client-side library that will abstract away this area of concern.

How should I set gas amount for Cosmos transactions?

We recommend using the Gas and Fee Tooling available in the Skip Go Client TypeScript Package.

What does it mean when the docs say an endpoint is in “ALPHA” or “BETA”?

This means we may make breaking changes to them at any time.

What are the Skip Go app environments?

The Skip Go app is available in three environments: mainnet, testnet, and dev. The mainnet/production user facing app runs at https://go.skip.build. It connects to mainnet chains and uses the production API. This is the version that most users interact with. The testnet app runs at https://testnet.go.skip.build. It connects to testnet chains but still uses the production API. This setup is useful when you want to test on testnet without changing API behavior. The dev app runs at https://dev.go.skip.build. It connects to mainnet chains but uses a development version of the API that hasn’t been released to production yet.

What does cumulative_fee_bps in /route mean?

This is where you specify the fee amount in bps aka “bips”. (1 bp = 1 / 100th of a percent; 100 bps = 1%) By specifying it in route, the Skip Go API can adjust the quote that it gives back to you, so that it shows output token estimate net of fees. This ensures the amount the end user gets out of the swap always aligns with their expectations. The parameter uses the word “cumulative” (i.e. summing over a set) because the API supports multiple partners charging affiliate fees. This parameter should be set to the sum of all of those component fees. (For example, if a widget provider charges a 5 bp fee, and the frontend developer integrating that widget charges a 10 bp fee, cumulative_fee_bps=15)

Misc

Is Skip doing anything to make IBC relaying more reliable?

  • In the short term, we are adding real time data about relayer + channel health to Skip Go API, so we can accurately predict how long it will take to relay a packet over a channel + the packet tracking + relaying into the API.
  • In the medium term, we’re going to enable multi-chain relaying through Skip Go API. This will be a paid service.
  • In the long term, we’re working to build better incentives for relaying, so relayers don’t need to run as charities. (Relayers do not receive fees or payment of any kind today and subsidize gas for users cross-chain)