Hey everyone! Hope you're having a great day. Today I wanna talk about Atomic cross-chain swaps.
What is Cross Chain Atomic Swap?
It's a way to do cryptocurrency to cryptocurrency exchanges without relying on third parties.
What is the problem that it's trying to solve?
Say for example we wanna trade: I wanna give you some Decred and I wanna buy some Litecoin from you. In this case, we argue on a price and then, if it's just a normal swap, there's one big problem: cryptocurrency transactions cannot be reversed. In that case, the person who sends the cryptocurrency first stands a significant disadvantage.
Say for example you send Litecoin to me. If you send it first and I check that the transaction occured then you have to trust me to send you the Decred. If I am malicious then I can just disappear off with your Litecoin and never send you the Decred.
Unfortunately, with cryptocurrencies transactions, there's virtually no guarantee if you don't do this Cross-Chain Atomic Swap. There are of course other ways to do it through third parties and exchanges but you have to rely on that third party and you have to trust it.
So with Cross Chain Atomic Swaps, they try to solve this problem. So you have to rely on mathematics to solve it. Such that, you can send me the Litecoin safely knowing forward if I don't send you the Decred you can get your Litecoin back.
How does this work?
It's gonna start with me forming a secret. So once I decide on the secret, I can send a transaction which says if you know my secret you can get my Decred. On your side, you can say: Hey, I wanna send a transaction if you reveal your secret you can get Litecoin.
So that way, the moment I reveal my secret, I can immediately get your Litecoin. And you, once the secret has been revealed, you can immediately get the Decred. So this relies on the assured mathematics of hash functions.
In terms of the technical details, it relies on the person creating a contract to generate a secret random number, form a hash function and provide the hash of that secret. And because hashes cannot be reverted, once you know the hash you can't actually find out what is the secret that generated the hash. Then, that secret number is kept saved until I decide to reveal it. That way, you can plugin that hash of the secret into the hash of your transaction.
And if I want to receive Litecoin, I must reveal the secret. The moment I do that you can receive the Decred as well.
That is the basis of how Cross Chain Atomic Swap works. Mathematically it is proven to work.
There has been a successful completion of an Atomic Swipe between Litecoin and Decred last September without a hitch.
As mentioned on Decred's Github page, Decred cross-chain atomic swapping does support Bitcoin (Bitcoin Core), Litecoin (Litecoin Core), Vertcoin (Vertcoin Core) and Particl (Particl Core) blockchains.
Also, and more important, Cross Chain Atomic Swaps can be performed between Bitcoin and Ethereum (Github open source project here)
How can this be extended?
Well, there are a few good applications of this early on. A shop that accepts Litecoin can now accept Decred easily using Cross Chain Atomic Swaps.
Another way is: it can be extended with exchanges. Currently, we have this huge problem where we have to place our trust in exchanges.
The problem, of course, is that it happens that the exchange shut down or get hacked. So, using Cross Chain Atomic Swaps we can do transactions while keeping our cryptocurrencies safe. And If our transactions don't go through, we can always recover that cryptocurrency.
The current state of this project is in a command prompt state. If you look at Decred at Github, you find it is very much a text page transaction. This can be extended into a graphical interface and this can be built upon. But it's good to see that the foundation of this was built and a successful example has been used already.
Unfortunately, that doesn't apply to fiat currency. We can't do crypto to fiat transactions without exchanges.
In a far future, we hopefully do crypto to crypto transactions without exchanges instantly and at the best price.
This was a brief introduction to Cross Chain Atomic Swaps technology. If you have questions feel free to ask them below.
Peace and Love
Sources:
Box Mining
Cody Burns Medium Page
Verge Currency Blog
Decred tweeted @ 19 Sep 2017 - 19:31 UTC
Disclaimer: I am just a bot trying to be helpful.
Congratulations @amja! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
<p dir="auto"><a href="http://steemitboard.com/@amja" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link"><img src="https://images.hive.blog/768x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/voted.png 2x" /> Award for the number of upvotes received <p dir="auto">Click on any badge to view your own Board of Honor on SteemitBoard.<br /> For more information about SteemitBoard, click <a href="https://steemit.com/@steemitboard" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">here <p dir="auto">If you no longer want to receive notifications, reply to this comment with the word <code>STOP <blockquote> <p dir="auto">By upvoting this notification, you can help all Steemit users. Learn how <a href="https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">here!Congratulations @amja! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :
<p dir="auto"><a href="http://steemitboard.com/@amja" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link"><img src="https://images.hive.blog/768x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png 2x" /> Award for the number of upvotes <p dir="auto"><sub><em>Click on the badge to view your Board of Honor.<br /> <sub><em>If you no longer want to receive notifications, reply to this comment with the word <code>STOP <p dir="auto"><strong><span>Do not miss the last post from <a href="/@steemitboard">@steemitboard:<br /> <a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-croatia-vs-england" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemitBoard World Cup Contest - Croatia vs England <hr /> <p dir="auto"><strong>Participate in the <a href="https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-collect-badges-and-win-free-sbd" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemitBoard World Cup Contest!<br /> Collect World Cup badges and win free SBD<br /> Support the Gold Sponsors of the contest: <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=good-karma&approve=1" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">@good-karma and <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=lukestokes.mhth&approve=1" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">@lukestokes <hr /> <blockquote> <p dir="auto">Do you like <a href="https://steemit.com/@steemitboard" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemitBoard's project? Then <strong><a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Vote for its witness and <strong>get one more award!Congratulations @amja! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
<table><tr><td><span><img src="https://images.hive.blog/768x0/https://steemitimages.com/60x70/http://steemitboard.com/@amja/votes.png?201811081421" srcset="https://images.hive.blog/768x0/https://steemitimages.com/60x70/http://steemitboard.com/@amja/votes.png?201811081421 1x, https://images.hive.blog/1536x0/https://steemitimages.com/60x70/http://steemitboard.com/@amja/votes.png?201811081421 2x" /><td>You made more than 5000 upvotes. Your next target is to reach 6000 upvotes. <p dir="auto"><sub><em><a href="https://steemitboard.com/@amja" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Click here to view your Board of Honor<br /> <sub><em>If you no longer want to receive notifications, reply to this comment with the word <code>STOP <p dir="auto"><strong><span>Do not miss the last post from <a href="/@steemitboard">@steemitboard: <table><tr><td><a href="https://steemit.com/steemfest/@steemitboard/steemfest3-and-steemitboard-meet-the-steemians-contest" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link"><img src="https://images.hive.blog/768x0/https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmeLukvNFRsa7RURqsFpiLGEZZD49MiU52JtWmjS5S2wtW/image.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmeLukvNFRsa7RURqsFpiLGEZZD49MiU52JtWmjS5S2wtW/image.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmeLukvNFRsa7RURqsFpiLGEZZD49MiU52JtWmjS5S2wtW/image.png 2x" /><td><a href="https://steemit.com/steemfest/@steemitboard/steemfest3-and-steemitboard-meet-the-steemians-contest" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemFest3 and SteemitBoard - Meet the Steemians Contest <blockquote> <p dir="auto">Support <a href="https://steemit.com/@steemitboard" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemitBoard's project! <strong><a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Vote for its witness and <strong>get one more award!Congratulations @amja! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!