• Notifications Markets & Prices
      View more
    • Language & Exchange Rate Switch
    • Preference Settings
      Rise/fall colour
      Start-End Time of the Change
    • Language
    • Exchange Rate Switch
    Do Not Switch to Fiat Do not display fiat price
    • 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 - ع.د

    Start-End Time of the Change

    • 24H
    • UTC 00:00
    • UTC+8 00:00

    Rise/fall colour

    • Red for rise and green for fall
    • Green for rise and red for fall
    Gate Blog

    Your Gateway to crypto news and insights

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

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

    17 November 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.
    BTC/USDT -3.41%
    ETH/USDT -7.64%
    GT/USDT -4.09%
    Unbox Your Luck and Get a $6666 Prize
    Register Now
    Claim 20 Points now
    New User Exclusive: complete 2 steps to claim Points immediately!

    🔑 Register an account with Gate.io

    👨‍💼 Complete KYC within 24 hours

    🎁 Claim Points Rewards

    Claim now
    Language and Region
    Exchange Rate

    Select language and region

    Go to Gate.TR?
    Gate.TR is online now.
    You can click and go to Gate.TR or stay at Gate.io.