# Introduction to Atomic Swaps

Atomic swaps represent a revolutionary method for conducting direct, peer-to-peer cryptocurrency exchanges without the need for intermediaries such as centralized exchanges. This technology relies on Hash Time Locked Contracts (HTLCs) to ensure that both parties either complete the trade successfully or the transaction is voided, eliminating the risk of one party defrauding the other.

HTLCs are smart contracts that create a time-based escrow using a cryptographic passphrase. This type of smart contract requires the recipient to claim the payment within a specified timeframe using the correct passphrase, or else forfeit the funds.

Unlike other DEXs that use liquidity pools, such as Uniswap, our system employs a matching system that automatically matches orders in the order book, similar to a traditional CEX system. However, the difference being, transactions are conducted peer-to-peer without any intermediaries through Atomic Swaps. Users always maintain control of their native assets, although they are locked in the smart contract until the transaction has successfully completed or funds are returned after the time has expired.&#x20;

While the underlying process may sound slightly complicated, all of this happens on the backend. The front-end UI of the DEX will function like any other DEX, with users simply choosing which assets they want to swap securely.

For those curious about the step-by-step technical details of how the Atomic Swap process works, you can take a deep dive and read our full description here:[\
\
Atomic Swap Technical Details](https://gist.github.com/erubboli/e037f991181c978ec8ad0d0d8f3bd31e)\
\
\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://atomiq-defi.gitbook.io/atomiq-litepaper/atomiq-litepaper/introduction-to-atomic-swaps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
