Skip to main content
Find BDEX pools, compare quotes across every route, and swap BOT, WBOT and USDT from the command line or a browser widget.
Ready. This template is published in uzolabs/templates and has been deployed and verified on testnet. It’s a learning template and hasn’t been audited. Use test funds only.

What it does

This template uses the BDEX pools that are already live, so there’s nothing to deploy and you don’t need Foundry or Hardhat. The widget quotes every route as you type, labels the best, and walks you through approve and swap. Every script prints your balances before and after, with a BOTScan link for each transaction.

Quick start

You need Node.js 20.19+, a browser wallet and some tBOT. See Prerequisites. A swap costs about 0.003 tBOT of gas and an approval about 0.001 tBOT.
Terminal
npm run quote works without a key. Open http://localhost:5173, connect your wallet and pick BOT on top and USDT below.
The DEX integration swap widget on BOT Chain testnet, connected to a wallet, with a Swap card for BOT, WBOT and USDT
To send swaps from the scripts, paste your test wallet’s key after PRIVATE_KEY= in .env. To get the USDT that the BDEX pools trade, choose Test USDT on the BOT Chain faucet, or swap some tBOT for it:
Terminal

How it works

Every BDEX address and ABI comes from getAddresses(chainId) in @uzolabs/sdk/contracts. Pool addresses are never stored. Each run asks the factories where the pools are. Approvals cover only the amount of the trade. The walkthrough explains BOT and WBOT, quotes, slippage and the widget.

Tested on testnet

Every script was run against the live BDEX pools on BOT Chain Testnet on 1 October 2026, with the default 0.5% slippage. The widget was then used with MetaMask to quote and send a swap. Each swap received exactly the quoted amount. Pool balances and prices change as people trade, so your numbers will differ.

Walkthrough

Routes, quotes, slippage and the widget.

Customize

Slippage, tokens, multi-hop and exact output.

Source on GitHub

The template folder and its README.

Swaps guide

The same swaps written by hand.

DEX integration template walkthrough

A file-by-file tour of the contracts and scripts in the DEX integration template.

Customize the DEX integration template

Ideas and steps for turning the DEX integration template into your own project.
Last modified on October 3, 2026