This repo contains wip frontend for T-Dex

T-Dex: A decentralized exchange (DEX) on the TON blockchain providing
efficient exchange of various token types with a high degree of asset abstraction.
Goal of this repository is to provide example of integration with on-chain contracts to develop user interface for swaps and their estimations.
This is dApp, which means that this web applications works without any backend, relying only on blockchain data and contract get-methods. Backend can be developed separately: to collects statistics, perform pools and vaults indexing, optimize liquidity provisioning - so to turn this prototype into full scale product.
All blockchain related logic is implemented inside services directory. To connect to the blockchain this project uses centralized testnet Toncenter API, it can be easily changed to other provider or public lite-servers.
Wrappers, that are used for get methods and transaction creation, were generated by Tact compiler in T-Dex repo and vendor locked in this project. Later, when such tools will appear in the ecosystem, it is possible that they will be changed to npm module from contracts repository.
T-Dex contracts are deployed in testnet and are ready for usage and testing purposes.
-
Proxy liquidity deposit (Non-existent because was destroyed after tx)
-
T-Dex factory (No tx on it, used for get-methods)
-
Ton Vault (Inited, but no pools with it yet)
- A-B Jettons liquidity provisioning (Lp jettons minting in the end)
- A->B Jettons exact-out swap with slippage (Notice partial A jetton refund because of slippage)
- A->B Jettons exact-in swap
- B->A Jettons swap with low decimals
- B Vault initialization
This simple example can be improved further by:
- Adding liquidity provisioning interface with tx status tracking
- Fixing too much mutatable state in the applications (maybe use state manager lib)
- Supporting multihop swaps
- Adding verified or recent jettons modal