Cosmos中的IBC跨链有多好用?
How good is the IBC cross-link in Cosmos?
免责声明:本文旨在传递更多市场信息,不构成任何投资建议。文章仅代表作者观点,不代表火星财经官方立场。
This paper is intended to convey more information about the market and does not constitute an investment proposal.
小编:记得关注哦
Editor: Keep an eye on it.
来源:区块律动BlockBeats
Source: Block BlockBeats
随着 IBC 跨链功能的上线,以及 Terra 与 Injective 等明星项目的逐渐接入,基于 Cosmos 构建的多链生态目前已经初具规模。然而在我们查询资料的时候发现,当前中文互联网上尚缺少一篇系统地介绍 Cosmos 生态基本交互逻辑的文章。
The multi-chain ecology based on Cosmos is now at its beginnings, with the IBC cross-link function on the line, and progressive access to star projects such as Terra and Projective. However, as we look for information, there is a lack of an article on the Chinese Internet that systematically describes the basic ecological logic of Cosmos.
而 Cosmos 这种原生多链网络的交互逻辑,又与用户已经熟悉的以太坊生态有着本质不同。因此,本文将以已经熟悉以太坊操作用户的视角出发,介绍 Cosmos 多链生态中钱包、IBC 跨链以及交易的基本操作,希望帮助单链生态中的用户更轻松的在 Cosmos 多链宇宙中畅游。
The interactive logic of the primary multi-chain network, Cosmos, is different in nature from the already familiar Ethermian ecology of users. So, from an already familiar view of the user of the Taipa, this paper will describe the basic operations of Cosmos multi-chain eco-related wallets, IBC cross-linkages and transactions in the hope of helping users of single-chain ecology to travel more easily in the Cosmos multi-chain universe.
用户需要在每一条链上分别注册账户吗?
Do
进入多链网络首先要解决的一个问题,便是用户的账户(地址)问题。
One of the first problems to be addressed in accessing multi-chain networks is the user's account (address).
其实在以太坊及其他 EVM 兼容公链中,对这个问题已经有了较为成熟的解决方案,那就是使用同一套地址及公私钥对。因此,当用户在不同的公链网络中切换时,并不需要重新注册新的钱包地址并备份助记词。
In fact, in the Etheria and other EVM-compatible public chains, there are more mature solutions to this problem, using the same set of addresses and public-private key pairs. Therefore, when users switch in different public-chain networks, there is no need to re-register the new wallet address and back up the notes.
Cosmos 多链生态也采用了类似的策略,用户依然只需要记住一套私钥助记词。但 Cosmos 相较以太坊有一个最大的不同,那就是其生态公链间原生的支持跨链互操作功能。因此当一个用户在所有 Cosmos 公链中的账户地址都完全一样时,一旦遇到跨链转账便会产生很大的麻烦。
Cosmos multi-chain ecology has a similar strategy, and users still need only remember a private key help word. But there is one of the biggest differences between Cosmos and the Tails, namely, its original support of cross-chain interoperability functions between ecological public chains. So, when a user has exactly the same account address in all Cosmos public chains, there is a huge problem with cross-chain transfers.
因此,Cosmos 将用户在每一条链上的地址格式进行了二次加工,以便可以直接通过地址格式,判定其属于哪一条链。这相当于在每家银行的账号中,直接嵌入了开户行信息。当用户进行跨行转账时,便不再需要输入收款方开户行,而是直接输入对方账号就可以了。这无疑大大提高了在 Cosmos 生态中进行跨链转账时的用户体验。
As a result, Cosmos has processed the address format of the user on each chain twice so that it can be determined directly through the address format as to which chain it belongs. This corresponds to the fact that the account number of each bank is directly embedded in the opening account. When a user makes a cross-line transfer, it is no longer necessary to enter the account opening line of the payee, but instead to enter the account number of the other person. This undoubtedly greatly improves the user experience in making a cross-link transfer in the Cosmos ecology.
下面以由同一套助记词在三条不同 Cosmos 生态链中生成的地址为例:
The following is an example of an address created by the same set of assistive words in three different Cosmos ecological chains:
Cosmos Hub 中的地址:
Address in Cosmos Hub:
cosmos15s7e2gwyqke4s3tc8wyqt8szm5wv4tjwryelvh
Osmosis 链中的地址:
Address in Osmos' chain:
osmo15s7e2gwyqke4s3tc8wyqt8szm5wv4tjwtl2069
Kava 链中的地址:
Address in the Kava chain:
kava1n0qmruvsg90hza0z7a5knz6d5r2j0n76psktfy
可以看出,除了开头处明显的标志代码外,用户在不同链生成的地址,在后半部分还是有明显差异的。有些用户因此担心,当别人向我转账时,万一我给错了地址怎么办,转过来的资金会不会丢失?
As can be seen, in addition to the marked initial code, there is a clear difference between the addresses generated by the user in the second half of the chain. Some users are therefore concerned about what happens if I give the wrong address and the funds transferred are lost.
其实这是多虑了,只要这个错误的地址依然是由用户的私钥所生成,那么这些资金就会始终处于用户的控制之下。资金充其量是被转到了错误的链而已,用户的资产安全不会出现问题。
It is a matter of concern that, as long as the wrong address is still generated by the user’s private key, the funds will remain under the control of the user. At best, the money is transferred to the wrong chain, and the asset security of the user will not be in question.
Cosmos 的基础设施
Cosmos Infrastructure
谈到公链生态的基础设施,那么便少不了钱包、浏览器,以及基础的 DeFi 组件如跨链桥以及交易平台。
When it comes to the infrastructure of the public chain ecology, there is no shortage of wallets, browsers and basic DeFi components, such as cross-linkage bridges and trading platforms.
1. 钱包
1. Wallet
目前 Cosmos 生态中最为主流的钱包应用为 Keplr 钱包。Keplr 包含手机版与 Chrome 浏览器插件版,而以插件版本的功能最为强大,其地位相当于以太坊生态中的 Metamask。
The most dominant wallet in the Cosmos ecology is currently applied to the Keplr wallet. The Keplr contains cellular and Chrome browser plugins, while the plugins are the most powerful and have the same status as Metamask in the Taiwan ecology.
其使用逻辑也极为简单,与 MetaMask 类似,在界面上方可以切换不同的公链网络,而下方增加了 PoS 链特有的 Stake 功能,并直接显示出了当前的收益率。用户只要点击按钮,就会直接跳转到相关的网页界面,这里不过多介绍。
The logic of its use is very simple, similar to that of MetaMask, where different public-chain networks can be switched over the interface, while the PS chain-specific Stake function is added below and shows the current rate of return directly. By clicking on the button, the user jumps directly to the relevant web interface, which is not much to describe.
此外,在 Keplr 钱包中,还原生集成了 IBC 跨链功能。但是经过试用后发现用户体验不太好,需要用户手动查询并输入目标链的 Channel ID,因此暂不推荐使用。
In addition, in the Keplr wallet, the regenerative is integrated into the IBC cross-chain function. However, after testing, it is found that the user has had a bad experience and needs to manually query and enter Channel ID into the target chain, and is therefore not recommended for use.
2. 区块链浏览器
2. Block Chain Browser
多链网络自然需要支持多链的区块链浏览器,这里直接向大家推荐 mintscan.io。
Multi-chain networks naturally need to support multi-chain block-chain browsers, which are directly recommended here for Mintscan.io.
用户进入后首先到上方标红框处选择自己需要查询交易的所在网络,然后在搜索框输入账户或交易地址即可,操作与以太坊浏览器类似。
After entering, the user first selects the network that you need to query the transaction from above the red frame, and then enters the account or transaction address in the search box, which is similar to the Etherno browser.
当然,在 mintscan.io 中还包含不少涉及 IBC 跨链的查询功能,鉴于普通用户的使用频率不高,因此本篇暂不做过多介绍。
Of course, a number of IBC cross-chain queries are included in Mintscan.io, and given the low frequency of use by ordinary users, this section is not introduced.
3. 如何调用 IBC 进行跨链
3. How to call IBC for cross-link
IBC 跨链是 Cosmos 多链生态中最重要也是最为独特的功能,在许多生态应用的前端界面中都集成了 IBC 跨链功能。对于第一次体验的用户来说,推荐使用由 Cosmos 官方团队开发的前端应用 Emeris(https://app.emeris.com/)。
IBC Cross Chains is the most important and unique feature of Cosmos multi-chain ecology, and the IBC Cross-chain function is integrated in many front-end interfaces for ecological applications. For first-time users, Emeris (https://app.emeris.com/) is recommended for front-end applications developed by Cosmos official teams.
Emeris 是一个统一的操作 Cosmos 生态基础功能的前端平台,由官方团队负责开发,将支持基本的交易、跨链,以及 PoS 质押(尚未推出)等基础功能。如果需要进行 IBC 跨链转账,只需要点击网站首页的 Send 按钮。
Emeris is a front-end platform for a unified operational Cosmos ecological foundation, developed by an official team, that will support basic transactional, cross-chain, and PS pledge (not yet rolled out). If IBC cross-chain transfers are required, just click on the Send button on the front page of the site.
点击后会进入一个选择页面。其中两个选项都可以调用 IBC 跨链功能,左侧的用于在任意账户间进行 IBC 跨链转账,而右侧按钮则只支持在用户自己不同链的地址间进行 IBC 转账。
Click to enter a selection page. Two of these options can call IBC cross-chain functions, the left is used for IBC cross-chain transfers between any account, while the right button only supports IBC transfers between addresses in the user's own chain.
我们以左侧更通用的 IBC 转账功能为例。在点击后进入的界面中,需要用户输入收款方地址(注意这里只需要输入地址,并不需要特意注明地址所在的链,因为地址格式中已经包含了这个信息)。这里我们输入刚才用到的 Osmosis 链地址后,点击确认。
We take the more generic IBC transfer function on the left. In the interface that you enter after clicking, the user is required to enter the recipient's address (noting that only the address is entered here, there is no need to specify the chain in which the address is located because this information is already contained in the address format). Here we enter the Osmosis chain address that we have just used, and click to confirm it.
下一步需要选择转账的币种以及金额。注意在界面下方会出现手续费的估算界面。由于本次转账的付款链是 Cosmos Hub,而收款链是 Osmosis,因此需要调用 IBC 协议的资产跨链功能,并在交易的 gas 费以外另外收取一笔跨链费用。如果转入与转出地址处于同一条链上,则此处显示的跨链费用为零。
The next step will be to select the currency of the transfer and the amount of the transfer. Note that there will be an estimated interface for the fee at the bottom of the interface. Since the payment chain for this transfer is Cosmos Hub, while the collection chain is Osmosis, the IBC protocol's asset cross-chain function will need to be called and a cross-chain fee will be charged in addition to the transaction's gas fee. If the transfer is in the same chain as the transfer address, the cross-chain cost will be shown here at zero.
点击确认后,进入交易的最终确认界面。界面中显示了本次交易的转出地址与转出链,转账金额与币种,以及转入地址与转入链。点击确认后将进入钱包签署环节(注意这里还要再支付一次交易的 gas 费),等待几秒钟之后,一笔基于 IBC 的跨链转账交易便完成了。
Click to enter the transaction's final confirmation interface. The interface shows the transaction's out-and-out address and out-and-out chain, the amount and currency of the transfer, as well as the address and transfer chain. Click to confirm will enter the wallet signature (note that there will be a gas fee for another transaction) and a cross-link transfer transaction based on IBC will be completed after a few seconds.
看到这里,许多读者可能会觉得,这个所谓的 IBC 跨链功能看起来很简单啊,跟平常的转账似乎也差不太多,有必要这么详细的一步步介绍吗?
Seeing this place, many readers may think that this so-called IBC cross-link function looks so simple, doesn't seem to be so much different from the usual transfer, does it have to be so detailed?
是的,这其实就是 IBC 协议在用户体验上的最大优势。虽然是在进行跨链,但如果单从用户体验上来讲,整个流程基本就是一次再寻常不过的转账交易。完全不需要提前教学,自己稍微摸索下就能上手,而且到账速度极快。
Yes, that's actually the greatest advantage of the IBC protocol in the user's experience. Although it's cross-linkage, the whole process is basically an unusual transfer transaction in the user's experience alone.
回忆一下我们之前用过的其他跨链桥。用户在操作前首先需要登陆单独的前端界面,其次这些桥往往只支持一些主流资产,然后部分跨链桥还需要用户等待不短的确认时间。整个跨链过程的体验极差,因此不同的公链生态也被大大割裂,难以形成统一的生态系统。
Recall the other cross-link bridges that we used before. Users first have to access separate front-end interfaces before they can operate, and then they tend to support only some of the mainstream assets, and some of the cross-linkage bridges also require users to wait a long time for confirmation. The experience of the whole cross-chain process is very poor, so different public-chain ecosystems are also significantly cut apart, making it difficult to form a unified ecosystem.
而 Cosmos 生态中的 IBC 协议则相当于给不同公链间架起了高速铁路,将一个个卫星城连接成城市群,并进一步产生协同效应,促进各个公链经济的发展。
The IBC agreement in the Cosmos ecology, on the other hand, is equivalent to a high-speed railway between public chains, connecting a satellite city to urban clusters and creating further synergies for the development of public-chain economies.
可以说,IBC 协议是真正的实现了,让跨链像转账一样简单的终极目标。目前唯一的不足,便是 Cosmos 生态以外的许多主流公链并不原生地支持 IBC 协议,而这个问题或许只能期待其他公链在后续的升级中逐步解决了。
It can be said that the IBC agreement was truly achieved, with the ultimate goal of making the cross-links as simple as transfers. The only weakness is that many of the mainstream public chains outside the Cosmos ecology do not support the IBC protocol in its original form, a problem that may only be expected to be resolved gradually by other public chains in the course of subsequent upgrades.
Cosmos 生态中的交易平台
Cosmos Ecotrade Platform
在单链生态中,交易平台基本都是以智能合约的形式部署到链上,不同项目仅在做市函数上有些许的区别。而在包含原生跨链协议的多链生态中,部署应用的途径获得了很大的扩展。除了传统的智能合约以外,还可以直接部署应用链作为承载应用的载体。
In single-chain ecosystems, trading platforms are largely deployed in the form of smart contracts, with a few differences between different projects in the form of market functions. In multi-chain ecosystems that contain raw cross-chain protocols, the way to deploy applications is greatly expanded. In addition to traditional smart contracts, application chains can be deployed directly as carriers of applications.
以 Cosmos 生态系统中的交易平台为例,既有基于传统智能合约开发的 Gravity DEX,也有基于 Cosmos SDK 开发的专用于交易的应用链 Osmosis。
For example, trade platforms in Cosmos ecosystems include Gravity DEX, developed on the basis of traditional smart contracts, and Cosmos SDK, developed on the basis of an application chain dedicated to trade, Osmosis.
1.Gravity DEX
Gravity DEX 同样是由 Cosmos 官方团队开发的交易平台,其智能合约被部署在 Cosmos Hub 上,前端地址是:https://app.emeris.com/。是的,跟上文中我们体验 IBC 跨链时使用的是同一个前端。Gravity DEX 并没有开发独立的前端,而是选择将功能直接集成进了同样由官方支持的 Emeris 中。
Gravity DEX is also a trading platform developed by the Cosmos official team, whose smart contracts are deployed on Cosmos Hub, with a front-end address: https://app.emeris.com/. Yes, it is the same front-end as we experienced IBC's cross-link. Gravity DEX does not develop an independent front end, but chooses to integrate functions directly into Emeris, which is also officially supported.
我们可以在 Emeris 首页的右侧,直接找到 Gravity DEX 的操作界面。整个交易逻辑与以太坊中的交易所基本一致。
On the right side of the Emeris front page, we can find the operational interface for Gravity DEX. The whole logic of the transaction is basically the same as the exchange in Ether.
这里需要强调一点,就是虽然 Gravity DEX 是部署在 Cosmos 跨链生态的核心 Cosmos Hub 上,但其依然不能算是一个跨链 DEX。任何想要通过 Gravity DEX 交易的资产,都要首先通过 IBC 跨链到 Cosmos Hub 链上,才能在 Gravity DEX 中进行交易。
Here, it is important to stress that, although Gravity DEX is deployed at the heart of Cosmos' cross-chain ecology, it still cannot be counted as a cross-chain DEX. Any assets that want to be traded through Gravity DEX must first be traded through the IBC chain to Cosmos Hub before they can be traded in Gravity DEX.
因此当卖出资产与买入资产处于不同的链上时(如下图),交易者一共需要支付两笔费用。一是调用 IBC 的跨链费(红框 1),二是 Swap 费用(红框 2)。
Thus, when the assets are sold in a different chain from the assets purchased (see figure below), the traders will have to pay a total of two fees. The first is the cross-chain fee (Red Box 1) for calling IBC and the second is the Swap fee (Red Box 2).
由于是由 Cosmos 官方开发,Gravity DEX 并没有发行自己的原生代币,因此也暂时没有流动性挖矿等激励措施。目前整个协议的锁仓量不高,大约为几千万美元规模。
Since it was officially developed by Cosmos, Gravity DEX does not issue its own original intergenerational currency, and there are therefore no incentives such as mobile mining. The lockdown of the entire deal is currently low, at about tens of millions of dollars in size.
2.Osmosis
Osmosis 是一条基于 Cosmos SDK 构建的独立应用链,同样由开发了 Keplr 钱包的团队开发。目前其主网已经通过 IBC 协议连接到了 Cosmos Hub 上,因此可以顺畅的与 Cosmos 生态中的其他资产进行跨链交互。
Osmosis is a stand-alone application chain based on Cosmos SDK, also developed by a team that has developed the Keplr wallet. Its main network is now connected to Cosmos Hub through an IBC protocol, so it can easily interact across chains with other assets in the Cosmos ecology.
与其他通过智能合约构建的应用不同,Osmosis 的交易逻辑完全部署在自己的公链之上。当我们提到 Osmosis 时,既可以表示一条公链,也可以表示一个去中心化应用,Osmosis 的链与其应用是有机的组合在一起的。
Unlike other applications that are built through smart contracts, Osmos is based entirely on its public chain. When we mention Osmos, it can be either a public chain or a decentralised application, and the Osmos chain is organically integrated with its applications.
Osmosis 的做市函数基于 Balancer 的模型构建,Osmosis 中的 LP 可以在自己创建的资金池中定义两种资产的比例,以及手续费比例。
The Osmos city function is based on the model of Balancer, where the LP in Osmos can define the ratio of the two assets and the fee ratio in the pool that you create.
此外由于采用了应用链的底层架构,使得 Osmosis 团队获得了更大的施展空间。Osmosis 为主流的交易对提供了流动性挖矿的激励措施,而对于资金池中的 OSMO 代币,由于其同样属于公链的原生资产,因此在做市时,还可以同时享受到 PoS 的 Staking 收益。
In addition, the use of the bottom structure of the application chain gives the Osmos team greater scope for implementation. Osmos provides incentives for mobile mining for mainstream transactions, while Osmos in the pool, because it is also a natural asset in the public chain, also benefits from the Pos making.
在这种三重激励(交易手续费、流动性挖矿奖励、PoS 质押奖励)的奖励下,当前其资金池的年华收益率普遍高于 50%,锁仓量也比 Gravity DEX 高出不少,TVL 已经达到了 6 亿美元的规模。
Under this triple incentive (trading fees, mobile mining incentives, PoS pledge incentives), the current pool is generally earning more than 50 per cent of its annual earnings, with a much higher lockdown than Gravity DEX, and the TVL has reached $600 billion in size.
此外,截止目前,在 Osmosis 上的交易依然是免 gas 费的。这便是应用链的优势,可以根据上层应用的发展需求,随时调整底层的财政政策,以便更好地支持上层应用的发展。
Moreover, to date, transactions on Osmosis remain free of gas fees. This is the advantage of the application chain, which can be adapted to the development needs of the upper level to better support the development of the upper level.
最后补充一点。虽然 Osmosis 与 Gravity DEX 采用了不同的底层技术架构,但是他们的交易逻辑,都是先将资产通过 IBC 跨到 DEX 所在的公链然后再进行交易。在 Osmosis 中,将资产从其他公链跨链到 Osmosis 被称作 Deposit,跨回被称为 Withdraw。但读者需要清楚,这些功能只是站在 Osmosis 的视角,对 IBC 跨链功能的另一种描述而已。
Finally, while Osmosis and Gravity DEX have adopted different underlying technical structures, the logic of their transactions is to cross assets through the IBC to the public chain in which DEX is located and then to trade. In Osmosis, to cross assets from other public chains to Osmosis is called Deposit, and back to Withdraw. But readers need to be clear that these functions are only from the perspective of Osmosis, and just another description of IBC's cross-link function.
3.Thorchain
在上文中我们反复提到,无论是基于智能合约的 Gravity DEX,还是基于应用链的 Osmosis,其本质上都不是真正的跨链 DEX。想要在这些 DEX 上交易的前提,都是先将资产跨到 DEX 所在的目标链上。
As we have repeatedly mentioned above, Gravity DEX, based on smart contracts, or Osmosis, based on application chains, is not really a cross-link DEX. The premise for trading on these DEXs is that assets are first placed on the DEX target chain.
那么有没有不用改变资产的所在链,直接在链与链之间进行撮合交易的交易平台呢?
Is there a platform for transactions that can be traded directly between chains without changing the chain of assets?
有的,Thorchain 便是这种类型的 DEX。Thorchain 同样是基于 Cosmos SDK 开发的应用链,虽然没有通过 IBC 协议与 Cosmos Hub 进行连接,但某种程度上也可以算是 Cosmos 生态的相关项目。
In some cases, Thorchain is this type of DEX. Thorchain is also based on the application chain developed by Cosmos SDK, and although it is not connected to Cosmos Hub through the IBC protocol, it can be considered to some extent as a cosmos eco-related project.
但在本文中,我们不对 Thorchain 项目做过多介绍。一是其机制本身较为复杂,二是该项目曾出现过安全问题。因此,对于普通用户来说,了解 Gravity DEX 与 Osmosis 这两个项目便足够了。
But in this paper, we do not describe more about the Thorchain project. The mechanism itself is complex, and the project has had security problems. Thus, for ordinary users, it is sufficient to know about the Gravity DEX and Osmosis projects.
尾声
end
想要在短短几千字中系统性地将 Cosmos 多链生态,以及 IBC 的使用场景介绍完整显然是不可能的。因此本篇文章只是希望先将读者带入多链生态中简单地一探究竟。
It is clearly impossible to systematically describe Cosmos multi-chain ecology in a few thousands of words, as well as the use of the IBC. So this article simply wants to bring readers first into the multi-chain ecology.
在这里,公链既可能是平台,也可能是应用。转账既可以是支付,也可以是 IBC 跨链。随着目前单链生态逐渐地朝多链方向演化,未来的多链生态将会越来越多(波卡的异构分片、章鱼网络的应用链系统等等)。
Here, the public chain can be either a platform or an application. Transfers can be either a payment or an IBC cross-chain. As the current single-chain ecology evolves in a multi-chain direction, the future multi-chain ecology will become more and more numerous (the isomer segment of Poca, the application chain system of the octopus network, etc.).
虽然目前的多链网络还存在着各种问题,即便是 Cosmos 生态也因为经济架构的设计问题,导致原生代币 ATOM 难以很好地捕获生态价值。但在这种更高维度的环境中,有可能会诞生出更多有价值的创新,就如 Cosmos 生态中的明星项目 Terra。
Although there are problems with the current multi-chain network, even Cosmos ecology, due to the design of the economic architecture, makes it difficult for the native currency ATOM to capture ecological values well. But in this higher-dimensional environment, there is the potential for more valuable innovations, such as the Cosmos Ecostar project Terra.
因此,关注早期投资机会的投资人,不妨多去体验体验新的多链生态中的明星项目及跨链。只要体验过 Cosmos 中的 IBC 功能,可能就再也用不回跨链桥了。 返回搜狐,查看更多
Therefore, investors who focus on early investment opportunities should experience a new multi-chained eco-star project and cross-links. As long as IBC functions in Cosmos are experienced, it may never be used again.
责任编辑:
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论