SyncSwap pool factories create markets by deploying a pool for a token pair, registering it with Pool Master, and leaving the router to seed it with liquidity.
SyncSwap is a decentralized exchange protocol on zkSync Era whose markets are smart-contract pools, not listings in a central order book. A pool holds two tokens and applies an automated market maker formula to quote trades from its reserves.
The factory is the market-creation layer
Each pool model has its own factory. Classic pools use the constant-product model, x × y = k, for general assets. Stable pools use a curve designed for assets that should trade near parity. Aqua pools use a more flexible concentrated-liquidity model for volatile or liquid-staking assets.
The factory interface is deliberately small. It exposes master(), getDeployData(), and createPool(bytes data). For a two-token pool, the data normally ABI-encodes the two token addresses. ABI means the application binary interface: the contract-readable format that turns those addresses into the byte string sent in the transaction.
When the factory creates the pool contract, the new pool reads its deployment data from the factory. It stores the token addresses, the Pool Master address, and the Vault address. The factory then registers the new pool with Pool Master, which acts as the protocol’s registry. You can query the factory or Pool Master to find the pool for a given token pair and model.
That sequence matters. A newly deployed pool is not automatically a liquid market. It is an empty contract until someone deposits both assets and mints liquidity-provider tokens.
Two ways to create the same pool
There are two practical entry points, but they do not create two different kinds of market.
The first is a direct factory call. Your wallet or contract chooses the correct factory, ABI-encodes the token pair, and calls createPool(data). This is the cleanest option for an integration that already controls its own transaction flow. Check getPool(tokenA, tokenB) first. If a pool already exists for that factory and pair, use its address instead of deploying another one.
The second is the router path. SyncSwap’s router exposes createPool(factory, data) as a wrapper. The router forwards the request to the selected factory and makes pool deployment composable with other router operations, including multicall workflows. This is useful when your application already handles approvals, Vault deposits, liquidity, or several actions in one user transaction.
The line between the two falls at the contract boundary. The factory owns pool deployment and registration. The router adds coordination. Calling the router does not change the pool model, pricing curve, token pair, or registration process.
When you are ready to turn that model into a transaction, use the SyncSwap pool-creation guide.
How to create and fund a market
- Choose the network and token addresses. Connect to zkSync Era and use contract addresses, not token symbols. Confirm that both tokens implement the expected ERC-20 behavior.
- Choose the factory. Use Classic for broadly traded, uncorrelated assets. Use Stable for tightly pegged assets. Use Aqua when its concentrated-liquidity mechanics match your market and integration.
- Check for an existing pool. Query the selected factory before sending a transaction. A pair can have separate pools under different pool models, so the factory choice is part of the lookup.
- Create the pool. ABI-encode the two token addresses and call either the factory directly or the router wrapper. Wait for the receipt and read the pool address from the creation event or a follow-up lookup.
- Add initial liquidity. Approve the router or use the supported permit flow, then deposit both tokens through the router. The first deposit establishes the starting reserve ratio and therefore the initial market price.
- Verify the result. Check the pool’s token addresses, Pool Master registration, reserves, and LP-token balance before presenting the market to users.
The first liquidity ratio is the detail most new pool creators underestimate. If the opening deposit implies the wrong price, arbitrageurs can trade against it immediately. The loss comes from the pool creator’s reserves, not from a later oracle correction. SyncSwap’s AMM calculates prices from pool balances; the Chainlink Network is not consulted by the factory to initialize a market.
FAQ
Does creating a pool make it tradable?
No. Creation deploys and registers the pool. It becomes useful only after both assets are deposited and liquidity is minted.
Can I create both a Classic and Stable pool for the same tokens?
Yes, if the corresponding factories permit that pair. They are separate markets with different pricing behavior and liquidity.
Should an application call the factory or the router?
Call the factory directly when you need a minimal deployment transaction. Use the router when pool creation must fit into a broader approval, deposit, or multicall flow.