Memetroplis ProductionGuideReference

1. Systems Overview

System and Contract Flow

1. System Overview

The TokenFactory system is a cross-chain meme token launchpad that allows anyone to create a new ERC-20 token and distribute it via an exponential bonding curve sale. When a token is created, users can immediately buy and sell it through the TokenFactory contract, with the token’s price dynamically increasing as more are bought (and decreasing if sold). This bonding curve mechanism ensures a fair launch with no initial liquidity or pre-mine – early buyers get a low price, and price rises exponentially with demand. Each token’s sale continues until a target market cap (e.g. ~$69,000) is reached, at which point the bonding curve phase ends and the system automatically provides liquidity to a Uniswap V2-style pool for open trading. The result is a fair distribution (no team or presale allocation) and a trustless liquidity initialization, with a portion of the liquidity permanently locked by burning the liquidity provider tokens to prevent rug-pulls​.

Figure: Cross-chain architecture of the TokenFactory system (illustrated for two example chains, Ethereum and BSC). Each chain has a local TokenFactory contract that can deploy new Meme Token contracts and handle buy/sell orders. The TokenFactory contracts communicate across chains via LayerZero messages (dotted lines) to synchronize token minting and burning. Pricing math is provided by shared libraries (LogExpMath & TokenFactoryHelper), and once a token’s bonding curve sale ends, initial liquidity is deposited into a DEX (Uniswap on Ethereum, PancakeSwap on BSC, etc.) as shown.

Key capabilities: After deployment, a TokenFactory contract on each supported chain (Ethereum, BSC, Avalanche, Arbitrum, Base) is configured to work together. They use LayerZero v2 endpoints for seamless cross-chain communication, so that a user on any chain can participate in the token sale. For example, a token created on Ethereum can be bought by users on BSC or Avalanche without manually bridging – the TokenFactory contracts will handle the cross-chain minting and update the token’s supply globally. When the token’s sale phase completes, liquidity pools are automatically created on each chain where the token was bought (using the local UniswapV2-compatible DEX), seeded with the collected funds and newly minted tokens. All of this is achieved through on-chain logic, without custodial control: the contracts enforce the bonding curve pricing, track the global supply across chains, and secure the liquidity (by locking or burning it) to protect against rug pulls.

2. Contract Architecture Breakdown

Contract Level Logic