• 平台通知 交易行情
      查看更多
    • 语言&汇率
    • 偏好设置
      涨跌颜色
      涨跌幅起始时间
    • 语言
    • 汇率切换
    不使用汇率切换 不展示法币价格
    • CNY - ¥
    • USD - $
    • VND - ₫
    • EUR - €
    • GBP - £
    • HKD - $
    • JPY - ¥
    • RUB - ₽
    • TRY - ₺
    • INR - ₹
    • NGN - ₦
    • UAH - ₴
    • BRL - R$
    • MYR - RM
    • PGK - K
    • THB - ฿
    • PKR - ₨
    • BDT - ৳
    • PHP - ₱
    • CAD - $
    • IDR - Rp
    • ZAR - R
    • PLN - zł
    • SAR - ﷼‎
    • ARS - $
    • AED - د.إ
    • KZT - ₸
    • EGP - E£
    • UZS - so`m
    • TWD - $
    • GHS - GH₵
    • VES - Bs
    • MXN - $
    • COP - $
    • XAF - Fr
    • XOF - FCFA
    • BYN - Br
    • KES - Ksh
    • MAD - د.م
    • AUD - $
    • TZS - TSh
    • SEK - kr
    • AZN - ₼
    • CLP - $
    • HUF - Ft
    • RON - lei
    • AMD - ֏
    • DZD - د.ج
    • NPR - रू
    • JOD - د.ا.
    • MRU - UM
    • IQD - ع.د

    涨跌幅起始时间

    • 24小时制
    • 北京时间8点
    • 北京时间0点

    涨跌颜色

    • 红涨绿跌
    • 绿涨红跌
    Gate博客

    加密货币新闻、热点&行业洞察

    Gate.io 博客 Cross-chain Swaps or Exchange swaps, which is more reliable?

    Cross-chain Swaps or Exchange swaps, which is more reliable?

    11月17日 20:30


    TL;DR



    • A cross-chain swap is a decentralized technology that enables the direct exchange of two cryptocurrencies on separate blockchains without an escrow or intermediary.

    • Regular token swaps refer to the exchange of tokens through a centralized or decentralized exchange.

    • The regular swap relies on liquidity pools to generate enough liquidity for users to exchange tokens.

    • Cross-chain swaps operate using the Hashed Time Lock Contract (HTLC).

    • Swaps are more reliable than cross-chain because cross-chains are often hacked.



    Introduction



    Blockchain exists with the goal of evolving and widening the scope of its use cases worldwide. One of the ways through which this goal is actualized is by enhancing interoperability between blockchains.

    As blockchain protocols continue to build towards the goal of effortless exchange of funds between multiple blockchains, several projects like cross-chains and swaps compete to improve their interaction.

    Since cryptocurrencies are backed by their native blockchain, which is designed to accept transactions only with a specific token type, they cannot function in other ecosystems. The introduction of cross-chains and atomic swaps has therefore paved the way through these barriers.

    source: Shellypalmer



    What are Cross-chains & Cross-chain swaps?



    A cross-chain offers the interaction or exchange of information and value between two distinct blockchains. This inter-blockchain mechanism aims at eliminating intermediaries when exchanging value between decentralized networks, enabling users to interact effortlessly with other blockchains.


    Cross-chain swap

    Ordinarily, if you need Dogecoin as a native payment for a platform and you own Bitcoin in your wallet, you may have to send your BTC to a centralized exchange and trade it for dogecoin. Afterward, you will send it back to your wallet for use. This process is usually very tedious and attracts a lot of transaction fees.

    On the contrary, A cross-chain swap, also called atomic swap, is a fully decentralized smart contract technology that enables the direct exchange of two separate cryptocurrencies that run on their blockchain without using an escrow or intermediary like a token swapping service. Cross-chain swap means moving tokens from one blockchain network to another. This is usually done via bridges that lock tokens on one blockchain and mint a wrapped token on the other.



    How Do Cross-Chain Swaps Work?



    These swaps are carried out using special smart contracts, known as Hashed Time Lock Contract (HTLC). The HTLC smart contract links two different chains, and when certain conditions are met, the smart contract pushes an automatic exchange of tokens between the linked chains. The HTLC ensures that the swap doesn’t occur if conditions for the transaction are not met within a specific time frame.

    To reduce the counterparty risk, the HTCL uses two main cryptographically encrypted keys:


    Hashlock key:

    The hashlock key ensures that the token swap only executes when both parties have submitted their respective cryptographic proofs of coin depositions for the transaction. Smart contracts lock the deposits with a hash key via hashlock technology. Once the transaction has been validated on both ends, each participant is given a hash key, which they exchange to release and transfer the coins.


    Timelock key:

    This key serves as a safety measure by which traders set a deadline for their cross-chain swaps. If the swap is not done for one reason or another, the timelock key ensures that deposited coins are returned to traders before the deadline expires.



    How do Regular swaps Work?



    On DEXs (Decentralized exchanges), the regular swap relies on liquidity pools — user-supplied funds secured in a smart contract — to generate enough liquidity for users to exchange tokens.

    To contribute to liquidity pools, the liquidity provider first deposits digital tokens in an equivalent ratio to keep the pool balanced.

    Each set of paired tokens has a different liquidity pool on the DEX. To conduct token swaps, users add a token to the appropriate liquidity pool on the DEX and remove an equal amount of the other token from the pool after paying a tiny transaction fee to the blockchain.



    Core Benefits of both methods



    Flexibility

    Users can transfer assets and valuable data from one blockchain to another. This enables users to access the benefits of different blockchain technologies, and they aren’t constrained to the capabilities of a single chain.


    Decentralization

    They both use smart contract technology with no centralized authority.

    No single authority regulates all of the data on any specific blockchain. Instead, each user keeps an up-to-date duplicate of their transaction history with access to other users’ transaction histories on the Blockchain. No one can change this information without agreement from other participants and miners.

    Interoperability

    Bridges enable interoperability between individual blockchains and provide a connection between the parent blockchain(L1) and child chain(L2). This blockchain interoperability accelerates the rate of mass adoption.


    Scalability

    There are numerous methods of transferring value between users in the crypto community. Unfortunately, some of these methods require moving funds from one platform to another.

    Cross-chains greatly improve blockchain scalability by making transfers seamless. Connecting the main and secondary chains allows for the distribution of transaction loads throughout the ecosystem.




    Which is more reliable?



    One of the advantages of cross-chain swaps is that you don’t need to convert your coin to fiat to buy the desired coin. Neither do you need to convert between multiple cryptocurrencies and exchanges to access your desired coin. They allow you to swap in one single trade.

    However, Cross-chain swaps suffer from a range of issues, including security concerns on bridges. Bridges have become viable targets for hackers looking to plunder large liquidity pools, and the continued attacks endanger the entire DeFi ecosystem.

    According to Chainalysis, funds from cross-chain protocol hacks represented 69% of all the funds stolen in the crypto space in 2022. Recently, hackers attacked cross-chain bridge Nomad and stole over $100 million. Other incidents of bridge hack were recorded; a $320 million exploit on Wormhole, which occurred earlier this year, and the Axie Infinity sidechain Ronin exploit in March, with a loss of over $622 million.

    Since cross-chain bridges are often hacked, swaps are definitely more reliable than



    Final Thought



    These exchanges- cross-chains and swaps, come with their advantages and shortcomings. Cross-chains offer effective fund management and interoperability, and swaps ensure quick token exchange. Although they differ, they have a common goal of achieving high user satisfaction and promoting Blockchain trading.

    However, swaps are known to be more reliable because cross-chains are vulnerable to various cyber threats.




    Author: Gate.io Observer: M. Olatunji
    Disclaimer:
    * This article represents only the views of the observers and does not constitute any investment suggestions.
    *Gate.io reserves all rights to this article. Reposting of the article will be permitted provided Gate.io is referenced. In all other cases, legal action will be taken due to copyright infringement.
    解锁盲盒最高获$6666奖励
    立即注册
    即刻领取20点卡
    新人专享,仅需2步马上获得点卡

    🔑 注册账户

    👨‍💼 24小时内进行身份认证

    🎁 获得点卡奖励

    马上领取
    语言及地区
    汇率

    选择语言及地区

    前往土耳其站点?
    土耳其站已上线
    可点击前往TR分站,或是继续留在国际站