# Frequently Asked Questions
Author: [@fbsloXBT](https://twitter.com/fbsloXBT)
---
***What are Atomic Swaps?***
An atomic swap is a trustless exchange of cryptocurrencies from separate blockchains.
It uses Hashed Timelock Contract (HTLC) to lock assets on different blockchains and
will only release them on either both sides or the swap fails. Learn more [[here](https://www.bitpanda.com/academy/en/lessons/what-is-an-atomic-swap/)].
---
***Which blockchains are supported?***
Currently, we support:
* Koinos
* EVM chains: BNB Smart Chain & Polygon & Avalance C-chain.
---
***How to create an Atomic Swap?***
1) Traders come to an agreement.
2) The EVM-side trader should create a Swap (using `create` page) and share the ID.
3) The Koinos-side trader verifies the details and creates a Swap (using `view` page).
4) EVM-side trader verifies the details and unlocks the Swap (on Koinos).
5) Koinos-side trader unlocks the Swap (on EVM chain).
<sup>EVM-side: has funds on the EVM chain at the start</sup>
<sup>Koinos-side: has funds on the Koinos at the start</sup>
***Example:***
We have 2 traders, Bob has 1 BUSD on BNB Smart Chain (aka BSC), and Kevin has 1 KOIN on Koinos.
Traders must first come to an agreement about the trade and must have some way to communicate, maybe they are using Discord. They agreed that they want to trade 1 BUSD for 1 KOIN.
1) Bob will initialize a swap on the EVM chain. **EVM-side trade is always the first to be initialized.**
He will receive a Swap ID and Swap Secret, and will store the secret securely.
Behind the scenes, Swap Secret will be hashed using a SHA-256 function, and then trade details will be recorded to the smart contract and BUSD will be transferred to a smart contract. They can only be unlocked by using a secret whose SHA-256 hash matches the one that was used when creating the trade.
2) Once Bob is finished, he will send the Swap ID to Kevin, who will then verify Bob's trade details and if he agrees, will use it to create a Swap trade on Koinos.
It's recommended to use at least 2 ways to verify the Swap details (the official frontend / self-hosted frontend / block explorer / ...), since it's possible that the official frontend was hacked or that you are using a phishing site. ***Don't trust, verify!***
Trade created on Koinos will use the same hash that was used on BSC, but Kevin doesn't yet know what the original secret is, so he can't unlock the Swap on BSC.
3) Once Kevin is finished, he will notify Bob, who will then verify Kevin's Swap details, and if he agrees, will use the Swap Secret to unlock
and release KOIN on Koinos.
Since all blockchain data is public, this will reveal the secret to everyone, including Kevin.
4) Kevin will now use the secret to unlock the Swap on BSC and release BUSD.
{%youtube G6YBXY3BwNw %}
---
***What happens if I don't want to complete the trade?***
You can wait until it expires and then recover your original funds.
Possible expiration times:
- On EVM: 3 days, 5 days, 7 days
- On Koinos: 2 days, 3.5 days, 5 days
The expiration time is shorted on Koinos to prevent the EVM-side trader from unlocking the Swap on Koinos in the last possible second and then immediately recovering his original funds.
---
***Is the code open-source?***
Yes: https://github.com/fbslo/koinos-atomic-swaps
---
Contract addresses:
| Chain | Address |
| -------- | -------- |
| BNB Smart Chain | [0xB4fcA931C5337B5ce924C6Ac87BD82b604dcdB51](https://bscscan.com/address/0xB4fcA931C5337B5ce924C6Ac87BD82b604dcdB51) |
| Polygon | [0xB4fcA931C5337B5ce924C6Ac87BD82b604dcdB51](https://polygonscan.com/address/0xB4fcA931C5337B5ce924C6Ac87BD82b604dcdB51) |
| Avalance C-chain| [0xB4fcA931C5337B5ce924C6Ac87BD82b604dcdB51](https://snowtrace.io/address/0xB4fcA931C5337B5ce924C6Ac87BD82b604dcdB51) |
| koinos | 1AtomicxFzn5XbFpSbsW2D1xj4Vo291vE2 |
---
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.