BTB
/

Turbos Finance

Dexswebsite
Concentrated-liquidity (Uniswap-v3-style CLMM) DEX on Sui. Agents can quote and execute swaps, open/adjust/close LP positions (NFTs), and collect fees and rewards through Move calls or the official TypeScript SDK (turbos-clmm-sdk).

What you can do

swapSwap one coin for another.SDK: q = sdk.trade.computeSwapResultV2({pools:[{pool, a2b, amountSpecified}], address, amountSpecifiedIsInput:true}); tx = sdk.trade.swap({routes:[{pool, a2b, nextTickIndex: sdk.math.bitsToNumber(q[0].tick_current_index.bits)}], coinTypeA, coinTypeB, address, amountA, amountB: q[0].amount_b, amountSpecifiedIsInput:true, slippage:"0.5"}); sign and execute. Direct: moveCall <published-at>::swap_router::swap_a_b (or swap_b_a) with the pool type args.
add liquidityOpen a CLMM position (NFT).position_manager::mint with pool, Positions 0xf576…e52d, coin vectors, tick range (abs + is_neg), desired/min amounts, recipient, deadline (ms), clock 0x6, Versioned 0xf1cf…5b6f; or sdk.pool.addLiquidity.
remove liquidityWithdraw from a position.position_manager::decrease_liquidity then collect (and collect_reward per reward index); burn the NFT when empty. SDK: removeLiquidity / decreaseLiquidity.
find a poolLocate the pool object for a pair/fee tier.sdk.pool.getPools() or read the PoolConfig (0xc294…170c) pools table; pool type is Pool<CoinA, CoinB, FeeType>.
Upgradeable Move package: the CLMM package has been upgraded many times (on-chain version 22 at research time). Always call the latest published-at id (from contract.json) and pass the Versioned object; old package ids revert on version checks.
Admin powers held via PoolFactoryAdminCap / AclConfig roles: pause/unpause pools (toggle_pool_status), set protocol fee share, add fee tiers, manage rewards, migrate positions, admin decrease_liquidity (decrease_liquidity_admin) and package upgrade.
After the May 2025 Cetus exploit (overflow bug in a shared math library), Verichains reported that the same flawed function existed in the Turbos codebase but was not used; Turbos stated it was not affected.
Concentrated liquidity: positions out of range earn no fees and suffer impermanent loss; set amount_min / slippage and deadlines.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
Turbos CLMM package (latest, published-at)router on sui0xa5a0c25c79e428eba04fb98b3fb2a34db45ab26d4c8faf0d7e39d66a63891e64
write swap_router::swap_a_b<CoinTypeA,CoinTypeB,FeeType>(pool: &mut Pool<A,B,Fee>, coins_a: vector<Coin<A>>, amount: u64, amount_threshold: u64, sqrt_price_limit: u128, is_exact_in: bool, recipient: address, deadline: u64, clock: &Clock, versioned: &Versioned, ctx)
Entry. Swap coin A -> coin B in one pool. is_exact_in=true: amount = exact A in, amount_threshold = min B out; false: amount = exact B out, amount_threshold = max A in. sqrt_price_limit: use MIN_SQRT_PRICE 4295048016 for no limit. Output and leftover A are sent to recipient. Type args <CoinTypeA, CoinTypeB, FeeType> must equal the pool object's type (read it from the pool, e.g. Pool<SUI, USDC, 0x91bf…::fee3000bps::FEE3000BPS>). clock = 0x6, versioned = Versioned object 0xf1cf…5b6f. deadline is a unix timestamp in milliseconds.
write swap_router::swap_b_a<CoinTypeA,CoinTypeB,FeeType>(pool: &mut Pool<A,B,Fee>, coins_b: vector<Coin<B>>, amount: u64, amount_threshold: u64, sqrt_price_limit: u128, is_exact_in: bool, recipient: address, deadline: u64, clock: &Clock, versioned: &Versioned, ctx)
Entry. Swap coin B -> coin A. Same semantics as swap_a_b; no-limit sqrt_price_limit is MAX_SQRT_PRICE 79226673515401279992447579055.
write swap_router::swap_a_b_with_return_<A,B,Fee>(...same args as swap_a_b) -> (Coin<B>, Coin<A>)
Public (PTB-composable) version of swap_a_b: returns (output coin B, leftover coin A) instead of transferring. The Turbos SDK uses the *_with_return_ functions.
write swap_router::swap_b_a_with_return_<A,B,Fee>(...same args as swap_b_a) -> (Coin<A>, Coin<B>)
)
write swap_router::swap_a_b_b_c<CoinTypeA,FeeTypeA,CoinTypeB,FeeTypeB,CoinTypeC>(pool_a: &mut Pool<A,B,FeeA>, pool_b: &mut Pool<B,C,FeeB>, coins_a: vector<Coin<A>>, amount: u64, amount_threshold: u64, sqrt_price_limit_a: u128, sqrt_price_limit_b: u128, is_exact_in: bool, recipient: address, deadline: u64, clock, versioned, ctx)
read pool_fetcher::compute_swap_result<A,B,Fee>(pool: &mut Pool<A,B,Fee>, a_to_b: bool, amount_specified: u128, amount_specified_is_input: bool, sqrt_price_limit: u128, clock: &Clock, versioned: &Versioned, ctx) -> ComputeSwapState
write position_manager::mint<A,B,Fee>(pool: &mut Pool<A,B,Fee>, positions: &mut Positions, coins_a: vector<Coin<A>>, coins_b: vector<Coin<B>>, tick_lower_index: u32, tick_lower_index_is_neg: bool, tick_upper_index: u32, tick_upper_index_is_neg: bool, amount_a_desired: u64, amount_b_desired: u64, amount_a_min: u64, amount_b_min: u64, recipient: address, deadline: u64, clock: &Clock, versioned: &Versioned, ctx)
write position_manager::increase_liquidity<A,B,Fee>(pool: &mut Pool<A,B,Fee>, positions: &mut Positions, coins_a: vector<Coin<A>>, coins_b: vector<Coin<B>>, nft: &mut TurbosPositionNFT, amount_a_desired: u64, amount_b_desired: u64, amount_a_min: u64, amount_b_min: u64, deadline: u64, clock: &Clock, versioned: &Versioned, ctx)
write position_manager::decrease_liquidity<A,B,Fee>(pool: &mut Pool<A,B,Fee>, positions: &mut Positions, nft: &mut TurbosPositionNFT, liquidity: u128, amount_a_min: u64, amount_b_min: u64, deadline: u64, clock: &Clock, versioned: &Versioned, ctx)
write position_manager::collect<A,B,Fee>(pool: &mut Pool<A,B,Fee>, positions: &mut Positions, nft: &mut TurbosPositionNFT, amount_a_max: u64, amount_b_max: u64, recipient: address, deadline: u64, clock: &Clock, versioned: &Versioned, ctx)
write position_manager::collect_reward<A,B,Fee,RewardCoin>(pool: &mut Pool<A,B,Fee>, positions: &mut Positions, nft: &mut TurbosPositionNFT, vault: &mut PoolRewardVault<RewardCoin>, reward_index: u64, amount_max: u64, recipient: address, deadline: u64, clock: &Clock, versioned: &Versioned, ctx)
write position_manager::burn<A,B,Fee>(positions: &mut Positions, nft: TurbosPositionNFT, versioned: &Versioned, ctx)
read position_manager::get_position_info(positions: &Positions, nft_address: address) -> (I32, I32, u128)
write pool_factory::deploy_pool_and_mint<A,B,Fee>(pool_config: &mut PoolConfig, fee_type: &Fee<FeeType>, sqrt_price: u128, positions: &mut Positions, coins_a, coins_b, tick_lower_index: u32, tick_lower_index_is_neg: bool, tick_upper_index: u32, tick_upper_index_is_neg: bool, amount_a_desired: u64, amount_b_desired: u64, amount_a_min: u64, amount_b_min: u64, recipient: address, deadline: u64, clock, versioned, ctx)
read pool_factory::get_pool_id<A,B,Fee>(pool_config: &mut PoolConfig) -> Option<ID>