Third-Party Integration

Learn how to integrate SUI Lab Factory into your DeFi protocol, launchpad, or dApp.

🎯 Overview

SUI Lab Factory allows third-party developers to programmatically create liquidity pools from their smart contracts or applications. Our infrastructure is battle-tested and handles all the complexity of pool management.

No DEX Development

Use our proven infrastructure

Instant Liquidity

Pools ready in one transaction

💰

Competitive Fees

1.5% swap fee (1% LP + 0.5% protocol)

🎁

Free Operations

No fees for add/remove liquidity

📦

Install via NPM

The easiest way to integrate is using our official npm package:

npm install @suilab/factory-sdk

🚀 Quick Start

From Move Smart Contract

module my_protocol::pool_creator {
    use suilab_factory::factory::{Self, Factory};
    use suilab_factory::lp_coin::LP;
    
    public entry fun create_pool_for_token<TokenA, TokenB>(
        factory: &mut Factory,
        token_a: Coin<TokenA>,
        token_b: Coin<TokenB>,
        payment: Coin<SUI>,
        clock: &Clock,
        ctx: &mut TxContext
    ) {
        let (pool_id, lp_tokens) = factory::create_pool_from_contract<TokenA, TokenB>(
            factory,
            payment,      // 3 SUI creation fee
            token_a,
            token_b,
            clock,
            ctx
        );
        
        // Transfer LP tokens to caller
        transfer::public_transfer(lp_tokens, tx_context::sender(ctx));
    }
}

From TypeScript/JavaScript

import { Transaction } from '@mysten/sui/transactions';

const FACTORY_ID = "0x7fde6f522facdf8708aca3152edc5725f5c00ee5e3341b8baac28cb17962cb3e"; // Mainnet

async function createPool(tokenAType, tokenBType) {
  const txb = new Transaction();
  
  const [poolId, lpCoin] = txb.moveCall({
    target: `${FACTORY_ID}::factory::create_pool_from_contract`,
    typeArguments: [tokenAType, tokenBType],
    arguments: [
      txb.object(FACTORY_ID),
      txb.object(suiPaymentCoinId),
      txb.object(tokenACoinId),
      txb.object(tokenBCoinId),
      txb.object('0x6'), // Clock
    ],
  });
  
  txb.transferObjects([lpCoin], txb.pure.address(sender));
  return await client.signAndExecuteTransaction({ transaction: txb });
}

🔧 Configuration

NetworkFactory IDPackage ID
Mainnet0x7fde6f522facdf8708aca3152edc5725f5c00ee5e3341b8baac28cb17962cb3e0x9a67f826e3d9ad2cdc7d735466435a9d6da0428705a3eb0840be271f2e62dcb6
Testnet0xda14593db0d4258202871d40ffb73c0e0bee1d9064d1b076a666946e3eb0a0200x47be8b5d9f9fbac048c54ca8ce2766bb1fa8f8d459a0ff1f19af615efe9f5415
OperationFee
Create Pool3 SUI (one-time)
Add LiquidityFREE ✅
Remove LiquidityFREE ✅
Swap1.5% (1% to LPs + 0.5% protocol)

💡 Use Cases

🚀 Automated Launchpads

Graduate tokens from bonding curves and automatically create DEX pools with locked liquidity.

create_pool_and_lock_liquidity<MyToken, SUI>()

🏛️ DAO Treasury Management

DAOs can vote to create liquidity pools for governance tokens.

dao::create_liquidity_pool<GOV_TOKEN, SUI>()

🎮 Gaming Platforms

List in-game tokens on DEX automatically when certain milestones are reached.

game::list_token_on_dex<GAME_TOKEN, SUI>()

📚 Resources

Ready to Integrate?

Join leading DeFi protocols building on SUI Lab Factory