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/Client API/Lithos Dex

Quote a new LithosDex pool

post/dex/pools/create/check

What creating a pool with reserves amountX and amountY would do. tokenX is ERG for an ERG/token pool. All of it goes into the pool at genesis, at the price the two amounts set, and genesis gives this wallet a provision for all of the supply but 1,000,000 shares. Those shares are locked for good, and with them a millionth of the pool. An ERG/token pool box must always keep over 0.01 ERG, so a warning says when a full exit by its only provider would leave more than the locked share behind. Lists any pool already trading the pair.

Request body

LDPoolCreateRequest · application/json
  • tokenXstringrequired

    ERG for an ERG/token pool, or a token/token pool's first token id

  • tokenYstringrequired

    The pool's other token id

  • amountXstringrequired

    The pool's reserve of X at genesis; nanoERG for ERG, at least 0.01 ERG

  • amountYstringrequired
  • ▶
    feeParamsLDFeeParams

    Fee numerators over feeDenom. dexFeeNum stays in the pool; ergFeeNum / tokenFeeNum are set aside for liquidity providers.

    • dexFeeNuminteger · int64required
    • ergFeeNuminteger · int64required
    • tokenFeeNuminteger · int64required
    • feeDenominteger · int64required

      Denominator of every numerator above

Responses

200The quoteLDPoolCreateQuote▶
  • kindstringrequired
    one ofn2tt2t
  • tokenXstringrequired
  • tokenYstringrequired
  • ▶
    feeParamsLDFeeParamsrequired

    Fee numerators over feeDenom. dexFeeNum stays in the pool; ergFeeNum / tokenFeeNum are set aside for liquidity providers.

    • dexFeeNuminteger · int64required
    • ergFeeNuminteger · int64required
    • tokenFeeNuminteger · int64required
    • feeDenominteger · int64required

      Denominator of every numerator above

  • reserveXstringrequired
  • reserveYstringrequired
  • sharesstringrequired

    The creator's provision: all of the genesis supply but lockedShares

  • lockedSharesstringrequired

    Supply no provision may represent, so its share of the reserves is locked for good

  • lockedSharenumber · doublerequired

    That supply's fraction of the pool

  • lockedErgstringrequired

    nanoERG nobody can take back: the vault box, and a token/token pool box

  • ▶
    lockedTokensLDTokenAmount[]required

    Tokens nobody can take back beyond the locked share: a token/token vault's one of each

    • tokenIdstringrequired
    • amountstringrequired

      Raw token units. Decimal string.

  • poolBoxValuestringrequired
  • vaultBoxValuestringrequired
  • provisionBoxValuestringrequired

    nanoERG the provision box holds, which a redeem returns

  • totalErgRequiredstringrequired

    nanoERG that leaves the wallet across the four transactions

  • ▶
    tokensRequiredLDTokenAmount[]required
    • tokenIdstringrequired
    • amountstringrequired

      Raw token units. Decimal string.

  • networkFeestringrequired

    The four transactions' fees together

  • warningsstring[]required

    Pools already trading this pair or why none were looked for, and an ERG/token pool's exit floor

400The request is malformed, names ERG as tokenY or one token twice, offers an ERG reserve under 0.01 ERG, or gives fees out of bounds.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

defaultErrorApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

← PreviousA provision's fee history on a verified poolNext →Create a LithosDex pool
Request
curl -X POST "http://localhost:9000/dex/pools/create/check" \
  -H "Content-Type: application/json" \
  -d '{ "tokenX": "string", "tokenY": "string", "amountX": "string", "amountY": "string", "feeParams": { "dexFeeNum": 9985, "ergFeeNum": 15, "tokenFeeNum": 15, "feeDenom": 10000 } }'
Response
{
  "kind": "n2t",
  "tokenX": "string",
  "tokenY": "string",
  "feeParams": {
    "dexFeeNum": 9985,
    "ergFeeNum": 15,
    "tokenFeeNum": 15,
    "feeDenom": 10000
  },
  "reserveX": "string",
  "reserveY": "string",
  "shares": "string",
  "lockedShares": "string",
  "lockedShare": 0,
  "lockedErg": "string",
  "lockedTokens": [
    {
      "tokenId": "86e272f770aa4ef48ad7e6d6dbe98b5069edd8383a403a8edb3ceed8a3d5cea3",
      "amount": "152000000"
    }
  ],
  "poolBoxValue": "string",
  "vaultBoxValue": "string",
  "provisionBoxValue": "string",
  "totalErgRequired": "string",
  "tokensRequired": [
    {
      "tokenId": "86e272f770aa4ef48ad7e6d6dbe98b5069edd8383a403a8edb3ceed8a3d5cea3",
      "amount": "152000000"
    }
  ],
  "networkFee": "string",
  "warnings": [
    "string"
  ]
}