pen-rulerSmart Contract Architecture

Here is a rough architecture diagram of Livo Launchpad system:

Key Fund Flows

1. Token Creation

  • Creator calls createToken() on LivoLaunchpad

  • Launchpad deploys a token implementation: LivoToken or LivoTaxableTokenUniV4 so far

  • Assigns a ConstantProductBondingCurve for pricing

  • Configures a graduator (Univ2 or Univ4)

2. Pre-Graduation Trading

  • Trader calls buyTokensWithExactEth() to purchase tokens

    • ETH sent to launchpad reserves

    • Bonding curve calculates token amount

  • Trader calls sellExactTokens() to sell tokens

    • ETH returned from reserves (minus fee)

    • Bonding curve calculates token amount

3. Graduation (Triggered Automatically)

When ETH reserves reach graduation threshold:

V2 Graduation Path

  • Launchpad calls graduateToken() on LivoGraduatorUniswapV2

  • Creates Uniswap V2 Pool

  • Adds liquidity and locks LP tokens at dead address

V4 Graduation Path

  • Launchpad calls graduateToken() on LivoGraduatorUniswapV4

  • Creates Uniswap V4 Pool via initializePair()

  • Adds two liquidity positions (balanced + single-sided ETH) for capital efficiency

  • Locks LP NFTs in LiquidityLockUniv4WithFees (a contract where liquidity is locked but from where fees can be claimed).

  • LivoSwapHook enforces time-limited sell taxes (0-14 days post-graduation)

4. Post-Graduation Fee Collection (V4 only)

  • Creator calls collectEthFees() on graduator

  • Graduator claims fees from locked LP positions

  • Splits 50/50 between creator and protocol treasury

Last updated