LogoLogo
Exchange
Exchange
  • Introducing: LX
  • Main Features
    • Social Features
  • Reliability
  • High Liquidity
  • High Performance
  • Simple Trading
  • Diversity
  • Interoperability/Bridge
  • User Support
  • Transparency
  • Security
  • The Problem
    • Negative Consequences of Centralization
  • The Solution
    • Security Solutions as a Decentralized Exchange
  • LX: A Decentralized Social Trading Platform
    • Lux Exchange DAO
  • Decentralized Application
  • User Experience
    • Easy to use
  • Accounts, Wallets, and Keys
  • Authentication
  • Features
    • Hardware Wallets
  • Portfolios
  • Social Trading
  • People Based Portfolios
  • Copy Swaps
  • Trading Charts
  • Indicator Alarm Manager
  • Smart Search
  • Watchlist
  • Community Support
    • Decentralized community service
  • Rewarded Content Production/Trading Bots
  • Token Curated Customer Service
  • LX Architecture
    • LX Architecture Comparison
  • eToro
  • EtherDelta
  • 0x Protocol
  • LX
  • Lux Protocol
    • Lux as a Distributed Autonomous Organization (DAO)
  • Governance
  • Lux Consensus
  • Terminology
  • Election Triggers
  • Attacks
    • Tragedy of Commons
  • Collusion
  • Censorship
  • ASIC Attacks
  • Long Range Attacks
  • Treasury and Bounty
    • Budgeting
  • Bounty
  • Lux Tokenomics
  • Decentralized Liquidity Pool (DLP)
  • Market Maker Fees
  • LX C++ Application Programming Interface (API)
  • Permission Mapping
  • Permission Evaluation Applied to Copy Trading
  • Parallel Permission Evaluation
  • LX Key Capabilities
  • Atomic Swaps
  • Facilitating Liquidity
  • Exchange Traded Funds
  • Crypto-asset Custody for Gateways
  • Cold Wallet
  • Smart coins
  • Crypto-asset Volatility
  • Gold as Collateral
  • Incentives
  • Interest Rate
  • Development Roadmap
  • LUX Constitution and Ricardian Contracts
  • Lux Protocol
  • DEX Core Platform
  • DApp UI/UX
  • Hardware Wallet Integration
  • Quality Assurance
Powered by GitBook
On this page

Was this helpful?

Atomic Swaps

PreviousLX Key CapabilitiesNextFacilitating Liquidity

Last updated 2 years ago

Was this helpful?

An atomic swap allows for exchange of one cryptocurrency for another without the need for a trusted third party.

For example, Alice may send BTC to Bob, while Bob sends LUX to Alice. However, as both blockchains are heterogeneous and transactions can't be undone after block consolidation, this operation introduces the counterparty risk problem - i.e.: Alice or Bob fails to honor their end of the deal.

Atomic swaps between LUX and BTC involve each party paying into a locked account. In the case of LUX, it's a multi-signature account. In the case of BTC, it's an UTXO with a scripted lock.

The creator of Litecoin, Charlie Lee, successfully implemented and demonstrated atomic swaps using LTC in exchange for BTC, Vertcoin and Decred. However, this type of swap only works between the BTC-like chains with similar scripting systems, as well as support for Check Lock Time Verification (CLTV) functionality.

With CLTV support, lock time windows can be set for the refund operation. The initiator sets a 48 hour lock time for participator payment and withdrawal. The participator sets a 24 hour lock time for initiator withdrawal. This time-locked refund scheme guarantees the atomic integrity that any party can withdraw their funds completely when the other party quits the swap process.

Because LX and the Lux Protocol don't have the BTC-like scripting system, they use a multi-signature account to lock LUX the initiator pays to the participator, and CLTV scripting to lock the BTC the participator pays to the initiator.

One drawback of this mechanism is the fact that the multi-signature method cannot implement a recovery and refund process, and LX resolves this with a requested deposit to incentivize and guarantee the trade's integrity.

Atomic Swaps Atomic Liquidity