Chia's forks aren't listed on any exchanges. To overcome this, the community created a few servers with channels dedicated to trading and some people have become trusted escrows. I knew that HTLCs would provide a faster, cheaper, and safer alternative to escrow trading, so I began building the first version of yakuSwap.
After launching the software, I became aware of another problem: Chia itself isn't listed on a lot of exchanges. I'm also working on an update that lets users swap Chia for one of the most popular cryptocurrencies on the market, Ethereum.
What it does
yakuSwap lets users swap Chia with one of its forks (Flax, Chaingreen, Chives, etc.), as well as Ethereum (testnet only).
How I built it
The project is divided into two main parts: the server and the UI. The server is a python application that exposes an API on localhost:4143. It is responsible for storing data, communicating with Chia and Chia-like RPC servers, and handling the swap logic. The UI is built with Flutter and is responsible for presenting everything to the user, as well as communicating with MetaMask.
The Chialisp Hash Time-Locked Contract implementation is compiled and curried by the server. It was tested extensively on the Chia and Flax blockchains. The Ethereum contract, on the other hand, was tested using Hardhat (both with unit tests and on a local network) - you can find the project in the 'yakuswap-eth' repository.
Challenges I ran into
I actually began writing an article for my blog before seeing this prompt. When I began developing the project, I wasn't aware that Chia's Keybase was so active and there were almost no resources for learning Chialisp - I figured out a lot of things just by looking at Chia's source code.
Accomplishments that I'm proud of
Honestly, I'm proud that I finished this project. It certainly involved a lot of work and testing and I'm very happy about the latest version.
What I learned
A lot of things! Programming-wise, I learned Chialisp, Solidity, and how to use GitHub Actions. I also got to learn a little about presenting and pitching a product. The most important lesson, however, was the value of listening to other people's suggestions: most of the features you see in the final app were most likely someone else's idea, from the little status indicators in the 'Currencies' tab to the simple trade creation screens and short swap window.
What's next for yakuSwap
I'm currently concentrating on obtaining funding to develop the project further and integrating yakuSwap into the Chia + forks communities (I hope to abolish the need for escrows and centralized exchanges).