LithosDocs
ProtocolPayoutsTokenStatsDocs
Start mining
Documentation home
Protocol
  • Lithos Protocol
  • LFSM
    • Rollups
    • NISPs
    • Emissions
    • Mining on Lithos
    • Candidate building
    • Ergo Voting
  • LithosDex
    • Choosing a pool
    • Trading with orders
    • Providing liquidity
    • Creating a pool
    • Difficulty forwards
Run Lithos
  • Startup guide
    • Setting up an Ergo node
  • Configuration
    • Node connection and security
    • Stratum and difficulty
    • Block packages
    • Batching and orders
    • Collateral and emission
    • Wallet and consolidation
    • Statistics and web panels
    • Synchronization and storage
    • Tasks and dispatchers
    • Failure modes
    • Reporting issues
    • Renting hashrate into Lithos
    • Checking your wallet
Client API
  • Overview
    • getLithos client information
    • getList UTXO ids for blocks
    • getUTXO ids by block height
    • getBlock info by UTXO id
    • postBlock info for multiple UTXO ids
    • getGet a block's miner set
    • getList all pool blocks
    • getGet Lithos payouts
    • getStatistics overview
    • getMining and payment totals
    • getMining statistics by hour or day
    • getEstimate Lithos hashrate
    • getNetwork difficulty by epoch
    • getThis client's own hashrate
    • getThis client's hashrate over time
    • getThis client's payouts and claims
    • getCollateral inventory
    • getThis wallet's lending earnings
    • getLocal mining activity
    • getCollateral market snapshot
    • getList queue boxes
    • getList the active set
    • getPermit price history
    • getYour lending status
    • postQuote joining the queue
    • postJoin the collateral queue
    • getLithosDex pool state
    • getEvery LithosDex pool
    • getOne LithosDex pool and its vault
    • getList your outstanding orders on any pool
    • postQuote a direct swap on any pool
    • postSwap directly on any pool
    • postQuote a direct deposit on any pool
    • postDeposit directly on any pool
    • postQuote a direct redemption on any pool
    • postRedeem a provision directly on any pool
    • getList your provisions on any pool
    • postClaim a provision's fees on any pool
    • postCheck a flush on any pool
    • postFlush any pool
    • getA verified pool's price history
    • getA verified pool's fee history
    • getA verified pool's recent activity
    • getA provision's fee history on a verified pool
    • postQuote a new LithosDex pool
    • postCreate a LithosDex pool
    • postQuote a swap order on any pool
    • postPlace a swap order on any pool
    • postQuote a deposit order on any pool
    • postPlace a deposit order on any pool
    • postQuote a redeem order on any pool
    • postPlace a redeem order on any pool
    • getLithosDex fee vault state
    • getList your outstanding orders
    • postQuote a swap order
    • postPlace a swap order
    • postQuote a deposit order
    • postPlace a deposit order
    • postQuote a redeem order
    • postPlace a redeem order
    • postCancel an order
    • postQuote a swap
    • postQuote a swap by desired output
    • postExecute a swap
    • postQuote a liquidity deposit
    • postDeposit liquidity
    • postQuote a liquidity redemption
    • postRedeem liquidity
    • getList liquidity provisions
    • postLook up provision NFTs
    • postClaim settled fees for a provision
    • postQuote a provision resize
    • postResize a provision
    • postCheck a pending fee flush
    • postFlush pending fees to the vault
    • getPool-wide fee history
    • getPool price history
    • getRecent pool activity
    • getFee history for one provision
    • getDifficulty accumulator and the next epoch's difficulty
    • getList open offers
    • postCreate an offer
    • postQuote an offer
    • postQuote filling an offer
    • postFill an offer
    • postQuote cancelling an offer
    • postCancel an offer
    • getThe whole market
    • getYour settled positions and closed offers
    • getList your positions and offers
    • postQuote settling a position
    • postSettle a position
    • getWallet balances
    • getYour block rewards
    • postClaim unlocked block rewards
    • getVerified tokens
    • getGet Stratum information
    • getGet candidate settings
    • getGet difficulty commitment
    • postCommit a difficulty
    • getGet best NISP at height
Lithos

A decentralized mining pool protocol on Ergo. Miners build their own blocks; contracts pay them for proven work.

Live on Ergo mainnet
Protocol
  • How Lithos works
  • Mining on Lithos
  • NISPs
  • Emissions
  • LFSM contracts
Run Lithos
  • Startup guide
  • Configuration
  • LithosDex
  • Difficulty forwards
  • Client API
  • Failure modes
Network
  • Live stats
  • Public stats API
  • Ergo Platform↗
  • SOAT Miner↗
Community
  • Telegram↗
  • X / Twitter↗
  • GitHub↗
Lithos
© 2026 Lithos Protocol. The Lithos client, its contracts and Lithos Launcher are open source under CC0.λίθος — stone
Docs/Protocol/LithosDex

Creating a pool

Creating an ERG/token or token/token LithosDex pool, what it costs, what is locked for good, and what you get back.

Advanced4 min readAssumes you know what a provision is and how a pool's price follows its reserves. Read Providing liquidity first.

Any wallet can create a LithosDex pool, ERG against a token or two tokens, from the web interface or the API. This page covers what creating a pool does, what it costs, and how to create one. Telling pools apart once they exist is in Choosing a pool.

What creating a pool does#

Creating a pool sends the following four transactions from your node wallet, in order:

  1. Mint the pool NFT.
  2. Mint the vault NFT.
  3. Mint the NFT that owns your provision.
  4. Send the genesis, which creates the pool, its vault and your provision.

Everything you put in becomes the pool's reserves, and the ratio of your two amounts sets the opening price. The genesis gives you a provision for every share of the pool but a millionth. That millionth is locked in the pool for good, so a millionth of each reserve can never be taken out.

Danger
The opening price is yours to get right

Anyone can trade against the pool once its genesis is in a block. If your price differs from the market price, the first trades buy the cheap side until the pool's price matches the market, and that difference comes out of your reserves.

What it costs#

Creating a pool charges no fee of its own. You pay the network fees on the four transactions, and the new boxes hold the following ERG:

BoxERG it holdsReturned
Token/token pool6.3 ERGNever
Token/token vault2.3 ERGNever
ERG/token vault0.1 ERGNever
Your provision0.6 ERGWhen you redeem the provision

An ERG/token pool box holds your ERG reserve and nothing more, so that ERG leaves as providers redeem. The pool box must always keep over 0.01 ERG, so the reserve you put in must be at least 0.01 ERG.

A full exit can leave a little behind. Unless an ERG/token pool starts with more than 10,000 ERG, its locked millionth is 0.01 ERG or less. While you are its only provider, redeeming everything then leaves about 0.01 ERG in the pool, and its share of the token. The quote warns you when this applies.

Choosing the fees#

Each swap pays three fees, each a percentage of what the trader puts in:

FeeDefaultWhere it goes
Kept by the pool0.15%Stays in the reserves, raising the value of every share
To providers, selling the first asset0.15%Set aside for providers to claim
To providers, selling the second asset0.15%Set aside for providers to claim

The defaults match ERG:LIT. Each fee may be any percentage from 0 up to, but not including, 100. A pool's fees never change after its genesis.

Creating a pool from the web interface#

Creating a pool spends your wallet's funds, so the interface needs the client's API key, entered under Settings. To create a pool, follow these steps:

  1. Open LithosDex, then the Pools tab, and select Create a pool.
  2. Choose ERG / token or Token / token.
  3. Pick each token from your wallet, and enter how much of each goes into the pool.
  4. Select Fees to change the split, if you want to.
  5. Read What creating it does: the opening price, your provision, the share locked for good, each box's ERG, the network fees and what leaves your wallet.
  6. Read any warnings under the quote, such as a pool that already trades the same pair.
  7. Tick The pool's boxes and the locked share can never be taken back.
  8. Select Create pool.

The token lists show what your wallet holds, verified tokens first. Check each token id before you create the pool, since an unverified token's name was chosen by whoever minted it.

After you send it#

The result lists each of the four transactions as accepted or unsent:

  • All accepted. The pool appears in the pool list once its genesis is in a block. The result names the NFT that owns your provision. Keep it: whoever holds it owns the provision.
  • One not accepted. The client sends none of the later transactions and gives back the wallet boxes it held for them. NFTs already minted stay in your wallet and do nothing on their own. Create the pool again to start over.

A new pool is Unverified until a client release adds it to the verified list. Traders must consent before trading on it, as Choosing a pool describes.

Creating a pool through the API#

POST /dex/pools/create/check returns the quote, and POST /dex/pools/create sends the four transactions. Both need the API key. The request takes the following fields:

FieldWhat it holds
tokenXERG for an ERG/token pool, otherwise the first token's id
tokenYThe other token's id
amountX, amountYWhat goes into the pool, in raw token units. ERG is in nanoERG
feeParamsOptional. Fee numerators over a feeDenom of 10000. Leaving it out takes the defaults
acknowledgeLockedRequired by POST /dex/pools/create. Must be true

In feeParams, dexFeeNum is 10,000 less the share kept by the pool, and ergFeeNum and tokenFeeNum are the provider fees on the first and second asset. The defaults look like this:

POST /dex/pools/create
json
{
  "tokenX": "ERG",
  "tokenY": "TOKEN_ID",
  "amountX": "100000000000",
  "amountY": "5000000",
  "feeParams": { "dexFeeNum": 9985, "ergFeeNum": 15, "tokenFeeNum": 15, "feeDenom": 10000 },
  "acknowledgeLocked": true
}

See Quote a new LithosDex pool and Create a LithosDex pool for every response field.

Next steps#

  • Providing liquidity: what your provision earns and how to close it.
  • Choosing a pool: how other traders see your new pool.
Edit this page on GitHubsynced from main
← PreviousProviding liquidityNext →Difficulty forwards
On this page
  • What creating a pool does
  • What it costs
  • Choosing the fees
  • Creating a pool from the web interface
  • After you send it
  • Creating a pool through the API
  • Next steps