Decentralized exchanges have brought more security, privacy and freedom to the financial field. However, there are some unsolved problems such as bad user experiences, being subject to censorship etc. Kyber's on-chain liquidity protocol provides a decentralized solution that allows easy token swaps. However, currently there are still not enough dapps built on top of it and the UX is usually not very user-friendly. Plus, most of the DEX dapps are still not fully decentralized because they are hosted on centralized servers. The IPFS protocol provides new possibility to host dapps in a decentralized way. KuSwap takes advantage of IPFS to create a decentralized user-interface for the Kyber network

What it does

KuSwap is an instant token swap web app hosted on IPFS and interacts with Kyber's smart contract. It is a barebones but intuitive interface that allows any user (especially those new to the cryptocurrency space) to easily swap between different ERC20 tokens including Ether. As KuSwap is hosted on IPFS, it's more decentralized than other similar dapps.

How I built it

Vue.js was used to build the static website. Web3.js, MetaMask and Infura were used to connect the UI to the Kyber smart contracts. The static files were bundled and then uploaded to an IPFS node, which was set up on DigitalOcean. An IPFS hash for the hosted files was then generated to allow access to the UI. To make it easier for users to access KuSwap. The domain name was registered and CloudFlare was used to map the IPFS hosted UI to the domain name.

Challenges I ran into

I ran into some issues calling the Kyber smart contracts, especially for setting the correct parameters. Setting up and IPFS node and upload the bundled code was also a challenge.

Accomplishments that I'm proud of

The basic token swapping function is now totally working. The dapp can now be accessed using both an IPFS hash address and the domain name (which just maps to the IPFS hosted site). Nothing is local hosted. Everything is live! Even working on the mainnet!

What I learned

Building dapps that interact with smart contract is still not easy at the current stage. Using IPFS turned out to be not that difficult.

What's next for KuSwap

Will continue building KuSwap. As the domain name has been secured, it will quite likely become a popular dapp!

Built With

Share this project: