LithosDocs
ProtocolPayoutsTokenStatsDocs
Start mining
Documentation home
Protocol
  • Lithos Protocol
  • LFSM
    • Rollups
    • NISPs
    • Emissions
    • Mining on Lithos
    • Candidate building
    • Ergo Voting
  • LithosDex
    • Trading with orders
    • Providing liquidity
Run Lithos
  • Startup guide
    • Setting up an Ergo testnet 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
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
    • getLocal mining activity
    • getCollateral market snapshot
    • getList queue boxes
    • getList the active set
    • getPermit price history
    • getYour locked block rewards
    • postClaim unlocked block rewards
    • postQuote joining the queue
    • postJoin the collateral queue
    • getLithosDex pool state
    • 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
    • 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
    • getWallet balances and lending status
    • 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
  • Client API
  • Failure modes
Network
  • Live stats
  • Public stats API
  • Ergo Platform↗
  • SOAT Miner↗
Community
  • Telegram↗
  • X / Twitter↗
  • GitHub↗
Lithos
© 2026 Lithos Protocol. Open source under the MIT licence.λίθος — 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. 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. NO_LENDER_KEYS — freeLenderKeys + keysDerivable is below keysRequired. INSUFFICIENT_FUNDS — the wallet cannot cover totalNanoErgs.

    one ofAUTO_COLLATERALIZENO_LENDER_KEYSBUDGET_EXHAUSTEDINSUFFICIENT_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

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

← PreviousClaim unlocked block rewardsNext →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
}