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
    • SigmaFi bonds
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
    • getList open orders
    • postCreate an order
    • postQuote an order
    • postQuote cancelling an order
    • postCancel an order
    • postQuote filling an order
    • postFill an order
    • getList live bonds
    • postQuote repaying a bond
    • postRepay a bond
    • postQuote liquidating a bond
    • postLiquidate a bond
    • postQuote a claim
    • postClaim a settled bond
    • postLook up bond assets
    • getThis wallet in SigmaFi
    • getList configured oracle feeds
    • getCurrent oracle state and recent confirmed history
    • getWallet balances
    • getYour block rewards
    • postClaim unlocked block rewards
    • getVerified tokens
    • getArb stake
    • postReclaim the arb stake
    • 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

What LithosDex is, how a trade is priced, what it costs, and how orders reach the pool.

Standard5 min readFor anyone trading through the Lithos client. No Ergo or smart contract experience needed.

LithosDex is a decentralized exchange for ERG, LIT and other Ergo tokens. It runs entirely on Ergo smart contracts, and your Lithos client includes a web interface for it. This page explains how a trade is priced, what it costs, and how your trade reaches the exchange, using the ERG:LIT pool as the example.

It does not cover the other pools, which are in Choosing a pool, depositing into a pool, which is in Providing liquidity, or the settings a miner uses to fill other people's orders, which are in Batching and orders.

How the price is set#

The ERG:LIT pool holds ERG and LIT together in a single box on Ergo. You trade against the pool, not against another person, so a trade never waits for someone to take the other side. Every other LithosDex pool works the same way with its own pair, either ERG and a token or two tokens.

The pool sets its price from its own reserves. It keeps the product of its ERG and its LIT constant across a trade, before fees. Two things follow from that:

  • Every trade moves the price. Buying LIT takes LIT out of the pool and puts ERG in, so the next LIT costs a little more.
  • Large trades move it further. The bigger your trade is against the reserves, the worse your average price. The web interface shows the price you will get before you confirm.

The reserves belong to liquidity providers, who deposit ERG and LIT together and earn the fees trades pay.

What a trade costs#

Every swap on ERG:LIT pays about 0.3% of what you put in, in two equal parts. Other pools set their own fees, shown on each pool's page:

FeeShare of your inputWhere it goes
Pool fee0.15%Stays in the reserves, which raises the value of every provider's share
Permanent fee0.15%Set aside for providers, who claim it separately

On top of that you pay:

  • A network fee on the transaction you send, as with any Ergo transaction.
  • An executor fee, if you trade with an order. It is paid only when a miner fills the order.

Orders and direct trades#

A trade reaches the pool in one of two ways. The Use orders switch in the web interface picks between them, and it is on by default:

OrderDirect trade
What you sendAn order box that holds your funds and your termsA transaction that spends the pool itself
Who completes itA miner, who fills the order against the poolYou, if your transaction lands
Extra costThe executor fee, 0.003 ERG by default, paid only on fillNone
When several trades arrive at onceMiners fill them one after another in the same blockOnly one can spend the current pool box. The rest fail and must be sent again
If you change your mindCancel the order and your funds come backNothing to cancel once it is sent

Use orders. The pool is one box, so direct trades collide with each other and with miners. A miner filling orders replaces any unconfirmed direct trade in the blocks it builds, and that trade then has to be sent again against the new pool. An order does not collide: it waits in its own box until a miner fills it at your price or better.

Trading with orders covers placing, following and cancelling an order.

Who fills orders#

Miners do. A Lithos miner with block transactions turned on fills LithosDex orders in the blocks it mines, and keeps each order's executor fee. A miner can also fill orders by broadcasting them to the network, paying the network fee out of the executor fee.

Filling is permissionless and checked by the order's own contract. A miner cannot fill your order at a worse price than your minimum, and cannot take anything but the executor fee you set.

An order paying less than miners accept waits. Miners skip orders whose executor fee is below their own minimum. The default executor fee clears the shipped minimum of every miner running this client, so leave it unless you have a reason to change it.

Using the web interface#

Open LithosDex in the client's navigation bar. Every tab but Pools acts on the pool chosen in the header, ERG:LIT by default. The interface has the following tabs:

TabWhat you do there
SwapTrade one side of the pool for the other, and follow or cancel your orders
LiquidityDeposit into the pool, close a position, or look up a provision NFT
FlushMove the permanent fees the pool has collected into the vault, where providers claim them
FeesSee and claim the permanent fees your positions have earned
HistoryChart the fees earned over time, for the whole pool or one position. Verified pools only
PoolsFind a pool, check its badge, or create a pool

Anything that sends a transaction needs the client's API key. Enter it under Settings on the Swap tab. The key is kept in memory, so you enter it again after refreshing the page, unless you turn on Remember API key in this browser. Read Remembering the key in the web panel before you do. Settings also holds auto-refresh and your own executor fee for new orders.

Danger
Your client signs with your node wallet

LithosDex trades spend funds from the node wallet the client uses. Keep the client's port off the open internet, and change the shipped API key. See Node connection and security.

Next steps#

  • Choosing a pool: the other pools, and what the client checks before you trade on them.
  • Trading with orders: placing, following and cancelling an order.
  • Providing liquidity: depositing into a pool and claiming its fees.
  • Batching and orders: the settings for filling other people's orders.
Edit this page on GitHubsynced from aa061a5
← PreviousErgo VotingNext →Choosing a pool
On this page
  • How the price is set
  • What a trade costs
  • Orders and direct trades
  • Who fills orders
  • Using the web interface
  • Next steps