Creating Standard Pools
This guide explains how to create a new standard liquidity pool (xyk model) on OroSwap. The factory contract allows any user to create pools permissionlessly, provided they follow the required asset and configuration guidelines.
Prerequisitesβ
To create a standard pool on OroSwap testnet, the following conditions must be met:
1. Token Requirementsβ
- You need two native tokens on ZIGChain.
- Quote Token: Must be one of the supported quote assets (
ZIGorORO)βthese are set by the protocol for stability. - Base Token: Can be a native ZIGChain token created by the user via:
- CLI: Using
zigchaind tx bankto create and mint a token. - 3rd-party token creation UIs on ZIGChain (community projects).
- CLI: Using
Step-by-Step: Creating a Poolβ
Step 1: Ensure Token Availabilityβ
Make sure you control the wallets holding both tokens, and that they have sufficient balances to provide initial liquidity. The base token must already exist on-chain before proceeding.
Step 2: Select Token Pairβ
Choose a valid pair where:
- One token is
ZIGorORO(quote) - The other is your base token
Example: MYTOKEN / ORO
Step 3: Set Initial Priceβ
Set an initial price ratio between the two tokens. This determines the starting market price in the pool. For instance, if you want:
1 MYTOKEN = 100 ORO
You must provide liquidity in the ratio 1 MYTOKEN : 100 ORO.
Step 4: Add Initial Liquidityβ
When creating the pool, you'll be asked to deposit both tokens in the exact ratio matching your initial price. This ensures the x * y = k invariant is respected from the beginning.
Note: Failing to maintain the correct ratio may result in slippage or rejection of the transaction.
Technical Detailsβ
- Pools are created via the
create_pairmessage on the OroSwap Factory contract. - The
pair_typemust bexyk, which is the only supported type currently. - The pool instantiation will automatically:
- Deploy a new pair contract with swap and liquidity functions
- Register the pair in the factory for future queries
- Mint LP tokens to your address representing your liquidity position
Next Stepsβ
Once the pool is created:
- Users can start swapping tokens using the pool
- Other LPs can join by providing assets in the same token ratio
- You can monitor the pool via the OroSwap frontend or CLI queries
Support for more flexible pool types and quote tokens is coming in future releases.