Swap any number of tokens/NFTs between two wallets without the need for escrow.
Do you know how in WoW/Runescape you can walk up to another player and launch a trading window with them? Yeah, that, but for Cardano. If you're not familiar with those video games here is another take on it: have you ever wanted to swap an NFT for another NFT? Perhaps you wanted to do something even more complicated like trading 2 NFTsa and a bunch of Husky tokens against someone's adaHandle? Well, that is where Atomic Swap shines, enabling p2p swapping without the need for any intermediaries.
Atomic Swap only ever submits one transaction to the blockchain. It will move the assets between your two wallets at the exact same time. You can verify this by looking up your transaction on cardanoscan after you have made a successful swap. So there is no way for anyone to get screwed since your funds will only be transferred if they also transfer their funds at the same time.
All this is accomplished without the need for smart contracts. This is very good since it isn't needed! It means that the swap is faster (only one transaction instead of at least two), more secure (it vastly reduces the number of potential bugs), and cheaper (because there is only one transaction).
Enabling peer-to-peer trading on Cardano. Trade multiple tokens and NFTs with another users for multiple tokens and NFTs without smart contracts or a 3rd party.
How it Works
Atomic Swap use a feature of the Cardano blockchain to conduct peer-to-peer, non-custodial token (FTs and NFTs) swaps between users. It doesn't use smart contracts. Atomic Swap work because anyone can include any UTxO, from any wallet, in a transaction. However, the transaction only executes if the wallet holding the included UTxO signs the transaction.
Atomic Swap builds a transaction using UTxOs from both the wallets involved. Signatures are then required from both wallets to lock and execute the transaction. If both signatures are not received then the transaction doesn’t happen.
"Freeze" Function for Security
Whilst building the transaction each user has the ability to “freeze” the transaction. This doesn’t freeze the transaction, as such, instead it sets the program to remember the inputs that were there at the time the freeze button was clicked. If the other user changes the value of these inputs, say reduces the amount from 10,000 tokens to 10 tokens, then the platform alerts the user that clicked freeze things are different from what they previously agreed to.
This makes it very difficult for one party to change the parameters of the transaction and dupe the other into committing to a swap they didn't intend to create.
Conditions and Features of Atomic Swap
Each user pays half of the blockchain fee (~0.1ADA each)
2ADA commission is paid to the platform (1ADA per party)
Every swap has a maximum time to live, TTL, of 24 hours. If it isn’t registered on the blockchain in that time then it is canceled.
After setting up an Atomic Swap users should wait until it is completed before making any other transactions from their wallet. This is due to the fact that a UTxO can only be consumed once, and if the Atomic Swap is yet to be processed and another transaction uses the UTxO intended for the Atomic Swap then the swap will fail.
Currently Yoroi, Nami, ccVault, and Flint are the wallets that are integrated and can be used with the Atomic Swap platform.