SafeSwap
Open SafeSwap
  • πŸ‘‹Introduction to SafeSwap
  • Learn
    • πŸ€”How SafeSwap Works
    • πŸͺ™SHA Token
    • β›½Fee Structure
    • πŸ’°Fee Distribution
    • πŸ‘‘SafeNodes
    • πŸ“šGlossary
  • User Guides
    • πŸ”„Swap Tokens
    • πŸ“ŠToken Dashboard
  • Technical
    • βš›οΈCross-Chain Atomic Swaps
    • πŸ”HTLC
    • πŸ›‘οΈSecurity Measures
    • ⛓️Supported Blockchains
    • πŸ‘Supported Wallets
    • πŸ•΅οΈAudits
  • Builders
    • 🌍Hello World!
    • πŸ—οΈCross-Chain Use Cases
    • πŸ–₯️Token Listing
    • πŸ‘¨β€πŸ’»Whitelabel Integration
    • πŸ“–API Integration Guide
      • Prerequisites
      • What is a Swap?
      • Perform a Swap
        • Initiate a Swap
        • Send Fees
        • Create the Swap in API
        • Wait/Poll for the Swap
        • Complete the Swap
        • Cancel/Refund
      • Smart Contract Details
      • Our Swap Addresses
      • API Details
  • About
    • Safe Haven
    • SafeTech
    • Support
Powered by GitBook
On this page
  • What Are Cross-Chain Atomic Swaps?
  • How Do Atomic Swaps Work?
  1. Technical

Cross-Chain Atomic Swaps

What Are Cross-Chain Atomic Swaps?

Cross-chain atomic swaps facilitate direct transfers of tokens between different blockchains, operationalizing only when both involved parties deposit a stipulated amount of tokens into the exchange contract. This allows users to exchange tokens without dependency on middlemen, thereby mitigating counterparty risks.

The concept of β€œAtomicity” refers to the principle where transactions are either executed in their entirety or not executed at all. Following this principle, atomic swaps either successfully conduct the swap when all conditions are met, or refund the deposited tokens to the respective owner.

Most atomic swap-enabled wallets and blockchains use smart contracts. Smart contracts are programs within blockchains that execute when certain conditions are met.

How Do Atomic Swaps Work?

Atomic swaps employ a Hashed Time-Locked Contract (HTLC), serving as a cryptographic safeguard or a β€œvirtual safe,” ensuring the security of user funds and triggering only when the contract receives the accurate amount of tokens.

To unlock the tokens, each party involved must confirm the receipt within a designated timeframe.

Most cryptocurrency projects develop their products on a single blockchain, and this limits the project to operating within that ecosystem. This means if there is a project on Ethereum, users need to buy the token on Ethereum blockchain in order to use the product/service.

If a project wants access to other blockchain ecosystems, then they will need to deploy token contracts and smart contracts on those blockchains.

Atomic swaps allow users to transfer native tokens across different blockchains, without middlemen.

PreviousToken DashboardNextHTLC

Last updated 1 year ago

βš›οΈ