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/Client API/Collateral Market

Quote joining the queue

post/collateral/join/checkapi_key

What creating count positions costs right now: principal per position, network fee per join, and the permit for each. Permits escalate because each join lengthens the queue the next one is priced from.

priorityFeeEachNanoErgs is the ERG added to the box above the floor, so it raises principalEachNanoErgs one for one. A miner spends whichever collateral box pays it most, so a fee buys a place ahead of the boxes offering nothing. Past breakEvenPriorityFeeNanoErgs the 3 ERG coinbase no longer covers the principal and netAtCoinbaseEachNanoErgs goes negative — the rest then has to come from the transaction fees of the block the box is mined against.

Also reports whether the join would be accepted: check manualJoinAllowed and blockedReason before enabling a send control, and send no more than fitting positions. While emission.autoCollateralize is on, every quote is blocked with AUTO_COLLATERALIZE: the client's own pass owns joining, so turn it off to join by hand. Requires an api_key, since the quote names this wallet's lender addresses and its shortfall.

Request body

CollateralJoinCheckRequest · application/json
  • countinteger · int32

    Positions to create, each under its own key

    default 11 – 25
  • priorityFeeEachNanoErgsstring

    nanoERG each position adds above the 2.915 ERG floor. Part of it goes to whichever miner spends the collateral box, which is what buys the position priority. Omitted or '0' posts at the floor; anything else is at least minPriorityFeeNanoErgs.

    default "0"decimal string

Responses

200Quote for the requested number of positionsCollateralJoinQuote▶
  • countinteger · int32required
  • principalEachNanoErgsstringrequired

    What one position locks up: the 2915000000 floor plus the whole priority fee. Identical for every position in the quote. Decimal string.

  • priorityFeeEachNanoErgsstringrequired

    The fee this quote was priced at, echoed back. Decimal string.

  • minPriorityFeeNanoErgsstringrequired

    The smallest non-zero fee that may be posted. Fixed at 1000000 (0.001 ERG); below it the block's finder is left too little to be worth the output it is paid in.

  • breakEvenPriorityFeeNanoErgsstringrequired

    The largest fee the 3 ERG coinbase repays on its own, which is the whole spread a lender earns. Fixed at 85000000. A fee above it is accepted; the difference then has to come from the mined block's transaction fees.

  • netAtCoinbaseEachNanoErgsstringrequired

    Block reward minus principal, per position, before the mined block's own fees. Signed — negative above breakEvenPriorityFeeNanoErgs. Decimal string.

  • txFeeEachNanoErgsstringrequired

    Network fee per join transaction. Decimal string.

  • permitsLitstring[]required

    Permit for each position, in join order. Each join lengthens the queue, so these escalate. Decimal strings.

  • permitTotalLitstringrequired

    Sum of permitsLit. Decimal string.

  • totalNanoErgsstringrequired

    Total ERG leaving the wallet — principals plus fees. Decimal string.

  • firstPositioninteger · int64required

    Queue position the first join takes; the rest follow consecutively

  • emissionTipBoxIdstringrequired

    Emission box the quote was made against. Send back as expectedEmissionBoxId.

  • affordNowbooleanrequired

    Whether the wallet can cover it today

  • shortfallNanoErgsstringrequired

    How much short the wallet is when affordNow is false. Decimal string.

  • ownRoomLeftinteger · int32required

    Positions the configured exposure budget would still allow after this

  • manualJoinAllowedbooleanrequired

    Whether POST /collateral/join will accept this join. Disable the send control when false. The join endpoint checks the same conditions itself, so a quote taken before a configuration change does not license the send.

  • blockedReasonstring

    Why manualJoinAllowed is false; absent when it is true. Only the first applicable reason is reported, in the order listed above.

    AUTO_COLLATERALIZE — the client joins on its own timer and refuses manual joins. BUDGET_EXHAUSTED — maxOwnCollateral leaves room for fewer positions than requested. WALLET_LOCKED — new keys are needed, but the node wallet could not be unlocked to derive them. NO_LENDER_KEYS — fitting is below keysRequired. INSUFFICIENT_FUNDS — the wallet cannot cover totalNanoErgs.

    one ofAUTO_COLLATERALIZEBUDGET_EXHAUSTEDWALLET_LOCKEDNO_LENDER_KEYSINSUFFICIENT_FUNDS
  • lenderAddressesstring[]required

    The lender keys this join would use, in join order, matching permitsLit index for index. Shorter than count when the join would derive new keys to make up the difference; those addresses do not exist yet and cannot be named in advance. Empty when blockedReason is NO_LENDER_KEYS.

  • freeLenderKeysinteger · int32required

    Keys with status FREE at the moment of quoting

  • keysRequiredinteger · int32required

    Keys this join consumes — one per position, so equal to count

  • keysDerivableinteger · int32required

    Keys the join may still derive through the node wallet, below emission.maxLenderKeys. The client unlocks the node wallet itself when a derivation needs it.

  • fittinginteger · int32required

    Positions a join would accept right now: the smaller of the room under maxOwnCollateral and the free keys plus those that can be derived. A join asking for more is refused whole.

400Malformed body, or a count outside 1..25.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

503Node or wallet unavailable. Retry.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

← PreviousYour lending statusNext →Join the collateral queue
Request
curl -X POST "http://localhost:9000/collateral/join/check" \
  -H "api_key: $LITHOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "count": 3, "priorityFeeEachNanoErgs": "10000000" }'
Response
{
  "count": 3,
  "principalEachNanoErgs": "2925000000",
  "priorityFeeEachNanoErgs": "10000000",
  "minPriorityFeeNanoErgs": "1000000",
  "breakEvenPriorityFeeNanoErgs": "85000000",
  "netAtCoinbaseEachNanoErgs": "60000000",
  "txFeeEachNanoErgs": "1000000",
  "permitsLit": [
    "19370000000",
    "19380000000",
    "19390000000"
  ],
  "permitTotalLit": "58140000000",
  "totalNanoErgs": "8748000000",
  "firstPosition": 1247,
  "emissionTipBoxId": "88c297f99da7172f6aa20efbead69aa40e2b7734a1873d66ca1db6b19d214db6",
  "affordNow": true,
  "shortfallNanoErgs": "0",
  "ownRoomLeft": 4,
  "manualJoinAllowed": true,
  "blockedReason": "AUTO_COLLATERALIZE",
  "lenderAddresses": [
    "3WwbQFz3vgi8ChY9dM1haQLGDeQYe5U9z98bwWW4TqxxEAvyYu5y"
  ],
  "freeLenderKeys": 4,
  "keysRequired": 3,
  "keysDerivable": 28,
  "fitting": 3
}