Introduction

swap.cash is a constant product market maker built on Bitcoin Cash. We’re utilising the power of bitcoin scripting capabilities to enable automated liquidity provision across BCH<>SLP pairs. swap.cash comes with a maximally Uniswap-like UX, and its functionality effectively powered by zero-conf nature of Bitcoin Cash transactions with the aim of providing low-cost and near-instant user interactions.

swap.cash

How It Works?

In technical standpoint, we designed a Pool Covenant that holds some amount of BCH and some amount of SLP token. The multiplication between is a constant of which the covenant enforces rules over introspection. swap.cash utilizes the x * y = k formula, where x is the amount of BCH pool holds, y is the amount of the token pool holds, and k is the fixed constant indicating the pool’s total liquidity always remain the same.

The Pool Covenant inherits previous state from itself, updates and constructs new state, and continues to operate in an anyone-can-spend fashion with respective to unconfirmed transaction chain limit. swap.cash

Product Stage

As part of the CoinParty hackathon, we built a primitive version which can facilitate BCH<>SLP swaps upon initial pool setup. Advanced features like adding/removing liquidity can be added later due to current limitations of the SLP protocol which supports only one type of token in one transaction (unable to support LP token apart from pair token).

Please note that swap.cash is at the moment ready for testing, however rolling out for production requires Bitcoin Cash network to upgrade for larger integer support and miner validated tokens.

What’s Next?

We will continue to build swap.cash! We need to do research & development on how to implement a contract-enforced token validation scheme with the existing network resources. From production deployment to scaling thousands of swaps per second, we have a long way to go.

Wallet Addresses

Hopefully swap.cash demonstrates everyone how powerful bitcoin scripting is, and what possibilities Bitcoin Cash can open up for further applications. Feel free to shoot your CKK tokens our SLP address below: swap.cash SLP address: simpleledger:qrr7ye5gtemkn6stvnfhh762g234tc4c2sqhruyr2f

Cash address: bitcoincash:qrr7ye5gtemkn6stvnfhh762g234tc4c2svvg83r5h

Useful Links

BitAuth IDE template: https://t.co/0fZnYSlxoh?amp=1

GitHub repository: https://github.com/serenitytomorrow/cashswap-interface

Twitter account: https://twitter.com/swap_cash

Built With

+ 3 more
Share this project:

Updates