What you can do
| swap | Swap 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 liquidity | Open 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 liquidity | Withdraw 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 pool | Locate 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>)
Public version of swap_b_a returning (output coin A, leftover 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)
Entry. Two-hop swap A -> B -> C. Note the type-arg order (A, FeeA, B, FeeB, C). Variants swap_a_b_c_b, swap_b_a_b_c, swap_b_a_c_b cover the other pool orientations; each has a *_with_return_ form.
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
Quote a swap without executing it; call it through devInspect/dry-run (the SDK reads amount_a, amount_b, fee_amount, sqrt_price, tick_current_index from the result). The SDK's trade.computeSwapResultV2 wraps this.
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)
Entry. Open a concentrated-liquidity position; mints a TurbosPositionNFT to recipient. Ticks are passed as absolute value + is_neg flag and must be multiples of the pool tick spacing. Unused coins are returned. Positions = 0xf576…e52d. mint_with_return_ returns (NFT, Coin<A>, Coin<B>).
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)
Entry. Add liquidity to an existing position (nft comes after the coin vectors on-chain; the docs page lists a different order).
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)
Entry. Remove `liquidity` units from a position. On-chain there is no recipient argument (the docs page shows one). decrease_liquidity_with_return_ returns (Coin<A>, Coin<B>).
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)
Entry. Collect trading fees owed to the position (use u64::MAX for all).
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)
Entry. Claim liquidity-mining rewards for reward_index; the reward vault id is in the pool's reward_infos.
write position_manager::burn<A,B,Fee>(positions: &mut Positions, nft: TurbosPositionNFT, versioned: &Versioned, ctx)
Entry. Burn an empty position NFT (decrease all liquidity and collect fees/rewards first).
read position_manager::get_position_info(positions: &Positions, nft_address: address) -> (I32, I32, u128)
Tick lower, tick upper and liquidity of a position NFT.
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)
Entry. Create a new pool for a pair/fee tier and add initial liquidity. fee_type is the Fee object of the tier (ids in contract.json "fee"). deploy_pool(...) creates a pool without liquidity.
read pool_factory::get_pool_id<A,B,Fee>(pool_config: &mut PoolConfig) -> Option<ID>
Find the pool id for a pair and fee type (via devInspect). Off-chain, the SDK pool.getPools() reads the PoolConfig pools table.
Turbos CLMM package (original id, used in type names)other on sui0x91bfbc386a41afcfd9b2533058d7e915a1d3829089cc268ff4333d54d6339ca1
PoolConfig (shared object, pool registry)factory on sui0xc294552b2765353bcafa7c359cd28fd6bc237662e5db8f09877558d81669170c
Positions (shared object, position manager)other on sui0xf5762ae5ae19a2016bb233c72d9a4b2cba5a302237a82724af66292ae43ae52d
Versioned (shared object, passed to every call)other on sui0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f
Turbos Automated Rebalance Vault package (latest)vault on sui0x0ca0dbe2da5ea7c7b0d0d0796e7918413f9328c4e4bf72e2f6bcd8bf3c993c45
TURBOS token (coin type)token on sui0x5d1f47ea69bb0de31c313d7acf89b890dbb8991ea8e03c6c355171f84bb1ba4a::turbos::TURBOS