Collateral inventory
/stats/collateralHow many unspent boxes match the configured collateral script and token, what they hold in total, and what they bid. This is protocol-wide inventory — not this client's spendable balance, not mining income, and no promise that the local miner can use any given box.
fees is the live bid book. A miner spends whichever collateral box pays it most, so the
distribution there is what a lender is bidding against and fees.bestNanoErg is the bid to
beat. Read it with /collateral/active, which names the individual boxes behind it.
queue is the same for boxes still waiting. The queue activates boxes strictly in order, and live
boxes compete by bid in whole 0.001 ERG steps, so queue.firstNanoErg, the least bid in the step
above every queued bid, puts a new box ahead of every box queued before it.
selection is what lenders put in and got back over the retained history, by how each spent box
was taken: by bid, or through clearance once its box was clearanceAge blocks old. It covers the
Lithos blocks recorded since this release could read selections; coveredBlocks says how many.
Each background read looks at up to 1,000 boxes; hitting that cap sets partial and reports
only what was scanned. Check status and observedAt before showing the numbers as current:
loading and disabled responses hold placeholders, and a failed refresh keeps the previous
inventory under an unavailable status. The request never refreshes the inventory itself.
Responses
200The cached inventory, with freshness and completeness.CollateralStats▶
statusstringrequiredFreshness of the inventory. Only
readyis current as of the last successful check.one ofloadingdisabledreadystaleunavailableobservedAtinteger · int64When the inventory was read, in Unix milliseconds. Absent before the first successful read.
▶
sourceMiningCursorThe processed chain point a statistics result was read from.
heightintegerrequiredblockIdstringrequiredparentIdstringrequiredtimestampinteger · int64requiredThe block's own timestamp in Unix milliseconds, not the time the client read it.
boxesintegerrequiredUnspent collateral boxes seen. A partial result counts only what was scanned.
0 – 1000nanoErgstringrequiredExact total nanoERG in those boxes. Not a wallet balance and not mining income.
decimal stringpartialbooleanrequiredTrue when the scan hit its cap, or no complete observation exists yet.
▶
feesCollateralFeeStatsrequiredThe priority bids carried by the observed boxes — the book a miner picks from, since a miner spends whichever box pays it most.
Percentiles cover every observed box, floor and bid alike, because that is the distribution a lender competes against. While most boxes sit at the floor the median is
0, which is the honest answer rather than a gap in the data.bestNanoErgis the bid to beat.atFloorintegerrequiredBoxes bidding nothing.
0 – …biddingintegerrequiredBoxes offering the finder something.
0 – …unreadableintegerrequiredBoxes whose R4 could not be read. Always 0 in practice — the contract writes it — and a non-zero value means the inventory counts more boxes than the distribution does.
0 – …totalNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringbestNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringmedianNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringp90NanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal string▶
bucketsCollateralFeeBucket[]requiredThe floor band first, then quarters of break-even, then everything above it.
fromNanoErgstringrequiredAn exact nonnegative integer as a decimal string. Parse it without going through a float.
decimal stringtoNanoErgstringAbsent on the open-ended top band, which holds every bid above break-even.
decimal stringboxesintegerrequired0 – …
errorstringShort failure summary. Details stay in the client log.
▶
queueCollateralQueueStatsThe bids of the boxes waiting in the queue, read with the live inventory.
boxesintegerrequiredQueued boxes seen, including any whose bid could not be read.
biddingintegerrequiredQueued boxes bidding above the floor.
unreadableintegerrequiredQueued boxes whose fee channel could not be read. Left out of every bid figure.
bestNanoErgstringrequiredThe highest priority fee in the queue,
0when every box is at the floor.bestStepBoxesintegerrequiredQueued boxes whose bid falls in the same 0.001 ERG step as the best, which tie with it once live.
firstNanoErgstringrequiredThe least priority fee in the step above the best queued bid. A box bidding it is taken ahead of every box queued before it, unless one of those reaches the clearance age first.
partialbooleanrequiredTrue when the queue held more boxes than one read takes (1,000).
▶
selectionCollateralSelectionStatslithosBlocksinteger · int64requiredLithos blocks in the retained history.
coveredBlocksinteger · int64requiredOf those, the blocks whose selection was recorded. The rest were recorded before this release, or the index does not show their activation.
fromHeightintegerThe first retained height.
clearanceAgeintegerrequiredBlocks a live box must age before any client takes it first whatever it bids, as this release ships it.
▶
bidCollateralPathStatsrequiredWhat the lenders of boxes taken one way put in and got back. Cost is the queue box: the principal and the whole priority fee. What came back is the block reward less re-emission, and the block's fees, both paid to the lender's key.
boxesinteger · int64requiredmeanPriorityFeeNanoErgstringAbsent with no boxes.
meanWaitBlocksinteger · int64Mean blocks from the block that included the queue box to the one that spent the collateral. Absent with no boxes.
costNanoErgstringrequiredreceivedNanoErgstringrequirednetNanoErgstringrequiredWhat came back less the cost. Signed.
aprPercentnumber · doubleThe net over every box's ERG locked from its queue box's block until its reward unlocks, 720 blocks after the spend, as a simple yearly rate at 262,800 blocks a year. Pooled, so a large box weighs more than a small one. ERG only: the LIT permit is left out. Absent with nothing locked.
▶
clearanceCollateralPathStatsrequiredWhat the lenders of boxes taken one way put in and got back. Cost is the queue box: the principal and the whole priority fee. What came back is the block reward less re-emission, and the block's fees, both paid to the lender's key.
boxesinteger · int64requiredmeanPriorityFeeNanoErgstringAbsent with no boxes.
meanWaitBlocksinteger · int64Mean blocks from the block that included the queue box to the one that spent the collateral. Absent with no boxes.
costNanoErgstringrequiredreceivedNanoErgstringrequirednetNanoErgstringrequiredWhat came back less the cost. Signed.
aprPercentnumber · doubleThe net over every box's ERG locked from its queue box's block until its reward unlocks, 720 blocks after the spend, as a simple yearly rate at 262,800 blocks a year. Pooled, so a large box weighs more than a small one. ERG only: the LIT permit is left out. Absent with nothing locked.