Third-Party Integration Guide
Comprehensive architecture and technical specifications for programmatically creating liquidity pools and routing swaps through PumpSui Factory on Sui Mainnet.
Zero DEX Overhead
Plug into battle-tested Sui Move AMM contracts without deploying custom exchange routers.
Atomic Execution
Initialize liquidity pools, deposit seed reserves, and burn or lock LPs in a single atomic PTB.
Competitive 0.8 SUI Fee
Flat one-time 0.8 SUI pool creation fee with zero protocol fees on adding or removing liquidity.
Native Sui Primitives
Full compatibility with Sui Move 2024.beta, shared object architectures, and standard Clock 0x6.
Prerequisites & Shared Objects
To interface with the PumpSui Factory, make sure your caller has access to the following on-chain resources:
On-Chain Sui Move Contract Integration
Best for launchpads, bonding curve graduation mechanisms, and DAOs automating LP creation without external relayer infrastructure:
module my_protocol::pool_creator {
use sui::coin::{Self, Coin};
use sui::sui::SUI;
use sui::clock::Clock;
// Import PumpSui Pool Factory
use suilab_factory::factory::{Self, Factory};
use suilab_factory::lp_coin::LP;
/// Create a liquidity pool directly from your protocol PTB
public entry fun create_pool_for_token<TokenA, TokenB>(
factory: &mut Factory,
token_a: Coin<TokenA>,
token_b: Coin<TokenB>,
payment: Coin<SUI>, // Protocol fee: 0.8 SUI (800,000,000 MIST)
clock: &Clock,
ctx: &mut TxContext
) {
// Create the pool using Factory's public entrypoint
let (pool_id, lp_tokens) = factory::create_pool_from_contract<TokenA, TokenB>(
factory,
payment, // 0.8 SUI creation fee
token_a, // Your token
token_b, // Paired token (often SUI)
clock,
ctx
);
// Transfer LP tokens to caller
transfer::public_transfer(lp_tokens, tx_context::sender(ctx));
// Or burn LP for rug-proof permanent liquidity:
// transfer::public_transfer(lp_tokens, @0x0);
}
}Client-Side TypeScript PTB (DApp or Bot)
Best for web apps, wallet interfaces, or backend bots orchestrating liquidity pool deployments with modern @mysten/sui/transactions:
import { Transaction } from '@mysten/sui/transactions';
import { SuiClient } from '@mysten/sui/client';
const FACTORY_ID = "0x7fde6f522facdf8708aca3152edc5725f5c00ee5e3341b8baac28cb17962cb3e"; // Mainnet
const POOL_FEE_MIST = 800_000_000n; // 0.8 SUI
async function createPoolFromDApp(
client: SuiClient,
tokenAType: string,
tokenBType: string,
tokenACoinId: string,
tokenBCoinId: string,
senderAddress: string
) {
const txb = new Transaction();
// Split 0.8 SUI for protocol creation fee
const [feeCoin] = txb.splitCoins(txb.gas, [txb.pure.u64(POOL_FEE_MIST)]);
const [poolId, lpCoin] = txb.moveCall({
target: `${FACTORY_ID}::factory::create_pool_from_contract`,
typeArguments: [tokenAType, tokenBType],
arguments: [
txb.object(FACTORY_ID),
feeCoin,
txb.object(tokenACoinId),
txb.object(tokenBCoinId),
txb.object('0x6'), // Sui System Clock
],
});
// Transfer LP tokens to creator or locker
txb.transferObjects([lpCoin], txb.pure.address(senderAddress));
return txb;
}Network Configuration & Protocol Fee Schedule
| Operation | Protocol Fee | Gas Cost | Destination / Note |
|---|---|---|---|
| Create AMM Pool | 0.8 SUI | ~0.005 SUI | PumpSui Fee Collector treasury |
| Add Liquidity | FREE (0 SUI) | ~0.002 SUI | Mints LP<A, B> tokens to sender |
| Remove Liquidity | FREE (0 SUI) | ~0.002 SUI | Burns LP tokens, returns reserves |
| Swap Execution | 0.30% | ~0.003 SUI | 0.25% to LPs, 0.05% protocol burn |
Token Ordering In Sui AMM
The factory sorts token type strings alphabetically (e.g. 0x2::sui::SUI < 0x...::my_coin::MY_COIN). Ensure token arguments match canonical lexicographical order when making direct Move calls, or use the SDK helper sortTokenTypes().