A Look at the OAX Parachain Atomic Swap

OAX
2 min readJul 24, 2020

--

This week we start getting into some interesting features that was highlighted in our Polkadot summary — Atomic Swap.

What does Atomic Swap do? In simplified terms, it allows the swapping of two different tokens to be done in one single transaction through the use of a smart contract.

In our scenario, Alice and Bob both start out with their own respective tokens. Bob wants to make a swap with Alice so that both of them can have some AliceTokens and BobTokens in their wallet. Without Atomic Swap, this would have to be two separate transactions — Bob would have to do a single transaction giving 100 BobTokens to Alice, and trustthat Alice after receiving the tokens would honor her end of the bargain and send 200 AliceTokens (or vice versa).

But with Atomic Swap, this agreement can be done in one transaction. Bob and Alice no longer need to worry about trusting the other party to hold up their end of the bargain. The process also speeds up, since users are only waiting for one transaction to go through versus two.

Bob makes an offer to Alice with the terms that he will give 100 BobTokens in exchange for 200 AliceTokens, and signs this offer. He then sends this offline to Alice. As Alice reviews this offer and if she’s willing to accept the terms, she broadcasts it to the blockchain. When she does so, the swap occurs in a single transaction, and both Bob’s and Alice’s balances are updated.

https://youtu.be/CnDJlnioNkU

The team is working hard on pulling together for our next feature functionality — MultiTransfer. Can’t wait to show everyone soon!

More about OAX Foundation:

Website: www.oax.org

Reach out to OAX Foundation via e-mail:

Collaboration Proposals: ProjectStallman@oax.org

Other Inquiries: Info@oax.org

Social Media:

Discord: discord.gg/ZH5YHkb

Twitter: twitter.com/OAX_Foundation

LinkedIn: www.linkedin.com/company/oax-foundation/

BitcoinTalk: bitcointalk.org/index.php?topic=1943946

Reddit: www.reddit.com/r/OpenANX/

Telegram English: t.me/openanxteam

--

--

OAX
OAX

Written by OAX

OAX Foundation believes that the future is shaped by the work done today. Go to http://www.oax.org to learn more.

No responses yet