Skip to content

0xblackbot/rainbow-swap

Repository files navigation

Rainbow 🌈

An open source repository for Rainbow Swap front end interface and smart contracts maintained by Blackbot. Rainbow Swap is a Aggregator on TON πŸ’Ž.

main banner.png

Interfaces

Socials / Contact

Problem

TON DEXes have fragmented liquidity, each with its own set of liquid tokens. As the TON ecosystem grows, this uneven distribution worsens, leading to inefficient trades and arbitrage opportunities. Users often lose money due to the high price impact when swapping tokens on a single DEX.

Solution

Rainbow Swap aggregates liquidity from multiple TON DEXes, distributing trade volume across optimal routes to minimize price impact and slippage. This ensures users get the best possible prices in a single transaction.

Examples

not example.png usdt example.png

Results

Our user-friendly interface allows seamless swaps with the most efficient routes, considering swap distribution and gas costs. Swap now with our bot @rainbow_swap_bot and share your thoughts and suggestions in Community Chat! πŸŒˆπŸš€

Development info

Getting Started

  1. Clone repository
git clone https://github.com/0xblackbot/rainbow-swap.git && cd rainbow-swap
  1. Install dependencies
yarn
  1. Start the development server
yarn start

Instruction on how to run development application as TMA

If you want to contribute your code, before making a pull request - ensure, that code passes all pipeline checks. You can manually check it before a pull request running commands

yarn ts
yarn lint

Smart contract

Rainbow routing wallet smart contract acts as a middleman, enabling seamless swaps between two different decentralized exchanges (DEXes) in a single transaction.
In order to insure against the loss of assets (there was no such cases yet), it also allows users to withdraw TON or jettons, similar to a Jetton Wallet contract.

Events diagram:

smart-contract-events-diagram.svg

Smart contract are written using FunC language.
All code could be found in contracts folder.

To build Rainbow routing wallet smart contract run

yarn build:contract

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.