ATOMIC SWAPS IN A NUTSHELL – Programmers explain

Crypto Games- Gamble Online
Home Media A ATOMIC SWAPS IN A NUTSHELL – Programmers explain
Published on March 3, 2019
BitBay - Exchange Digital Currencies

Without atomic swaps, decentralized exchanges are not possible. Today we are explaining step by step how atomic swaps work and why they are needed. You will also learn about Hashed Timelocked Contracts in Bitcoin which are a key element of the Atomic Swap Technology. We end this episode by talking about Resistance DEX and how atomic swaps are used to make Resistance possible.




Good Morning Crypto
🎓 Join my online academy
👬 Join the crypto discussion forum –
📣 Join Telegram channel

Exclusive email list:

DISCLAIMER: This is NOT financial advice. This is just my opinions. I am not responsible for any investment decisions that you choose to make.

Ivan on Tech is all about cryptocurrencies and the technology behind Bitcoin, Ethereum, Litecoin, Ripple, IOTA. We also cover Bitcoin price, altcoin price, investing, analytics, different altcoins.

Ivan on Tech by Ivan Liljeqvist


Ledger Nano S - The secure hardware wallet
  1. I got a question:
    Who determines the conversion rate? Is it changed over time? Let's say I init the atomic swap but the other party confirms it 23h later. The LTC/BTC conversion rate is different from what it was 23h ago.

  2. Wouldn't this become a security nightmare if people treat their secret Keys the same way they treat passwords (reusing the same passwords over and over again)? So for example if Alice always uses the same secret key, then anytime she creates an atomic swap hash, if the recipient has picked up on her pattern of reusing the same secret key, they could use her not-so-secret key to unlock the transaction and take the BTC without sending the LTC to her no?

  3. This theory was first proposed on Bitcointalk, I think in 2013, or even before then. It is nice to see it finally coming to reality but it sure is taking a long time.

  4. Are the transactions verified before being locked?
    If not, Could it happen that Alice makes and invalid BTC tx and after unlocking the swap she receives LTC and keeps her BTC??

  5. What happens if Alice releases the key to receive the LTC just before his own BTC time lock expires? And why can’t simple wallets enable this? Why do we need decentralised exchanges to do this?

  6. ADC L

    Q: How Alice can send 1 BTC to Bob that he has a different blockchain address in LTC blockchain? Wallets addresses as far as I am aware do not have a universal naming convention (e.g. Sort code, Account ). The wallet address Alice uses on the BTC blockchain to send BTC to Bob with a LTC Wallet Address would be invalid? In principle is good, but I do not get how the "wallets addresses" created with different structure / conventions are recognized between the two blockchain when the two blockchain are actually in two different "isolated worlds" they do not communicate on the same level. Can you explain?

  7. How are prices or exchange rates for crypto's set on Atomic Swap without a market exchange? How would you know how much they are worth? 10 LTC are worth far less than 10 BTC. Do Atomic Swaps take this into account some how? What would stop someone from ripping someone else off by scamming them into trading a more valuable crypto for a less valuable one? Thanks.

  8. 123abc

    On Atomic Swaps, can you adjust the time lock period? 24 hours is a long time and inconvenient in waiting to get your money back

  9. What happens if Bob doesn’t unlock his btc before the time lock expires? Alice has received her ltc and revealed the key.

  10. On December 7th 2018, the CoBloX team did a live showcase of the world's first ERC-20 to Lightning atomic swap, using COMIT. CoBlox belongs to TenX. All informations about CoBlox and COMIT are available on TenX website or on YouTube.

  11. Thank you for this video. It is the best explaination of the atomic swaps I've seen yet.
    I have just one question.
    Lets say step 1-6 is already done. Can Alice now unlock
    both her transaction to Bob, and Bob's transaction to
    Alice at the same time? In my view that would not be a problem for either
    party. They both get their transaction done, but Alice does not have
    to wait for Bob to see the key on the blockchain and then unlock
    the BTC tx.

  12. Thank you, gentlemen. As always, you supply clear, concise information.


    THANK YOU!!!

  14. I use waves as DEX and it works great with a good volume

  15. I can not but help leave a comment for the first time! I repeatedly watched your vide clips to fully understand by drwaing. I really appreiciate your good content all the time! I have been a big fan of you since last year. Maybe for 1 year roughly. Good content! keep going!

  16. Lamden (TAU) is develop a great blockchain from scratch with atomic swap.

  17. So that means that Alice BTC is locked for ever? And where does LTC comes from? If all the people do this with all the BTC available that means that we are going to run out of BTC??? Please I do not understand this, it suppose that all BTC is never ouw by anyone, we are just doing transactions. The only way to create new BTC is with mining right?

  18. How does the valuation work, i.e. one btc equals how many other coins or the other way around? Bad cross rates will ruin the whole technology? Who controls it?

  19. very interesting!
    at step 8) if the key is made public, isn't there a risk someone can snatch key before Bob uses it?

  20. Hey Ivan and Phillip! Good video and nice explanation. here's the question
    How atomic swaps will work with privacy coins where Bob cannot see the key on chain?

  21. So this still requires Bob to follow up with unlocking the transaction that sends him his Bitcoin. Alice already has her Litecoin, but there is a time limit for Bob to act. What if Bob's internet or power is cut before he can respond?

  22. What will happen if Alice want to sell big amount of bitcoin ? Is she have to confirm a lot of atomic swap transactions in different exchange rate ?

  23. This is the kind of content I like to see from you Ivan! This is absolutely brilliant! It solves the problem of two parties directly trading something with each other at the same time without having to trust each other or a third party! Traditionally as you've mentioned at the end, one person could be dishonest and they get sent the coin first, but then they don't relinquish their funds to fulfill their end of the deal… Traditionally someone always has to be the one to put themselves at risk and go first trusting the other to come through afterwards… The way it's been solved before still relied on trust, but instead of trusting the other having to trust a third party intermediary to take a cut for overseeing the transactions and making sure each gets theirs, but that was never a perfect system either as it enabled the middleman to take both of your funds and run away with them! lol.

    Like two people holding their hands out and trading something simultaneously, there's always that one person that will grab and pull away both of their hands… This is a clever way to enforce both transactions are done simultaneously or not at all. So there's no chance anyone can get away with both of the funds, the worst that can happen is they back out and it doesn't go through! 😀

Leave a Reply

Your email address will not be published.