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/Run Lithos/Configuration

Batching and orders

Filling other people's DEX orders for their executor fee, arbitrage in your own blocks, and the fees your own orders carry.

Advanced20 min readAssumes you know what a DEX order box is and how mempool chaining works. Start with Block packages if not.

A batcher finds orders that other people have placed, executes them correctly, and keeps the executor fee the order's own script pays. This page covers four blocks:

  • batching, which configures the two DEX batchers, the difficulty forwards batcher, the SigmaFi liquidation batcher and arbitrage in your own blocks.
  • lithosdex.orders, which sets the fees on orders you place.
  • forwards.offers, which limits the difficulty forwards you offer or fill.
  • sigmafi.bonds, which sets the default lender reserve for SigmaFi orders you fill.

How a batcher earns#

An order is a box whose script pays a fixed executor fee to whoever fills it correctly. The contract fixes the price bound, the owner's reward script and the fee. You choose the moment and keep the fee.

Nothing about filling an order needs your own capital. No path selects a wallet box: a run is funded entirely by the orders it fills, and its takings chain from one execution to the next.

There are two ways to execute, and the difference is the miner fee:

Candidate, in your own blockBroadcast, through the mempool
Miner feeNonemin(order cap, broadcastMinerFeeCeiling) out of the executor fee
Pool boxConfirmed onlyFollowed to its mempool tip
Competing spendsSupersededNever displaced
ShipsOn for bothOn for both

In your own block an execution pays no fee at all, so the whole executor fee is revenue. A broadcast has to pay the network, so its revenue floor is higher. To fill orders only in your own blocks, set batching.<name>.broadcast = false.

Note
Two switches must both be on for candidate execution

batching.<name>.enabled runs the batcher, which scans and can broadcast. Inserting executions into your own block additionally needs stratum.candidate.blockTransactions and the matching stratum.candidate.sources.<name> source. A batcher runs whether or not this node mines, because broadcasting needs no stratum.

Settings both batchers share#

These keys exist under both batching.ergodex and batching.lithosdex:

SettingDefaultRangeWhat it does
enabledtruetrue or falseRun this batcher at all
scanIntervalMs80005000 to 3600000 msMilliseconds between confirmed-order scans. The node's indexer is read again only once it has indexed a new block
maxTrackedOrders5121 to 4096Order ids retained between scans. Boxes are reloaded before execution
maxOrdersPerBlock200 to 100Transaction slots per candidate build or broadcast pass, carried ancestors included
minRevenueNanoErg10000000 to 1000000000000Minimum gross revenue per fill. An opening fill must also fund a takings box
broadcastMinRevenueNanoErg25000000 to 1000000000000Minimum revenue for broadcasts. Net takings must stay positive after the miner fee
broadcastMinerFeeCeiling20000000 to 100000000Most of the executor fee a broadcast may spend as a network fee, further limited by the order's own cap
broadcasttruetrue or falseBroadcast fills to the mempool rather than only filling in your own block
broadcastMempoolOrderstruetrue or falseWith broadcast on, also broadcast orders still unconfirmed
skippedOrderTtlMs360000060000 to 86400000 msHow long an order that priced but could not be built is left out
maxSkippedOrders40960 to 100000Such orders remembered at once, oldest forgotten first. About 200 bytes each
maxAncestorTxs20 to 100Unconfirmed transactions one order may need carried ahead of it. 0 executes confirmed orders only
maxMempoolOrders640 to 4096Unconfirmed orders one pass takes
maxMempoolOrdersPerTx41 to 4096Unconfirmed orders any single transaction may contribute
maxUnbuildablePerRun321 to 1000Orders a run fails to build before it stops trying more
maxUnbuildablePerTx21 to 1000Orders from one transaction a run fails before passing over that transaction's others
strategymaxFeesmaxFeesHow each run chooses which orders to execute against a pool, and in what order
searchBudgetMs2500 to 10000 msMost time the strategy may search one plan. 0 plans greedily without searching

deniedPools also exists on both as a list of pool NFT ids never to execute against. It defaults to empty and is not validated at startup. Ids are compared lowercased.

Choosing which orders a run executes#

Every fill moves the pool's price, so the order a run fills orders in changes what each one pays. One order can push another below its minimum, or bring it back within it. strategy names how a run settles that, and maxFees is currently the only strategy.

maxFees looks for the set and sequence of orders that earns you the most:

  1. It starts from a greedy plan that re-prices every remaining order after each fill.
  2. It then tries dropping each planned order and inserting each unplanned one at every position, and keeps any change that earns strictly more.
  3. Between plans that earn the same, it keeps the one that leaves the price nearest where the run opened, since that keeps more of the other orders within their minimums.

The search considers at most 64 orders per pool, the most valuable first, and stops after searchBudgetMs. It never takes more than a quarter of the time left to build, whatever the budget, so a deep order book cannot hold up your block. Startup refuses a strategy name it does not know.

Raising searchBudgetMs can find a better plan on a busy pool, at the cost of build time on every run. The first plan is ready long before the budget runs out, so a budget of 0 still executes orders. It only skips the search for a better set.

Executing unconfirmed orders#

An order placed seconds ago is worth more than one that has sat for a block, so both batchers read the mempool themselves and carry the transaction that placed an order ahead of the execution. That is where most of the revenue is, and three rules keep it safe.

A placement must be a wallet's, not a bot's. Its inputs must be uncontested and spendable by one key alone, with no data inputs and no pool output. A transaction that executes an order and places a new one fails this test, so a competitor's work is never carried.

Depth is bounded by maxAncestorTxs. Each carried transaction is one more that can invalidate your whole run.

Spam is bounded per creating transaction, not per order. Order boxes are cheap to make and transactions are not, so unconfirmed orders are taken in rounds across the transactions that created them. maxMempoolOrdersPerTx caps what any one transaction contributes, so a transaction carrying hundreds of order boxes takes four places rather than all of them.

The two maxUnbuildable settings work the same way for failures. A run stops after maxUnbuildablePerRun failures in total, and passes over a single transaction's remaining orders after maxUnbuildablePerTx of them fail, so one spam transaction cannot use up the whole run's attempts.

Note
What a failure costs you is fees, never funds

An order that cannot be built is passed over and skipped for an hour. A run that overruns its budget offers nothing. An unbuildable order leaves the owner's funds in their own refundable box. Each failure is one wasted signature, which is why the bounds exist at all.

ErgoDEX only#

The ErgoDEX batcher fills the following orders:

OrdersPoolsWhat a fill does
ErgoDEX swaps, deposits and redemptionsERG/token poolsExecutes the order against its pool
ErgoDEX swaps, deposits and redemptions that pay their executor fee in ERGToken/token poolsExecutes the order against its pool
Machina Finance limit and grid orders between ERG and a tokenERG/token poolsTrades with the order and the pool in one transaction

The ErgoDEX batcher covers MewDex too, since MewDex is the same contracts under a different interface. ErgoDEX orders that pay their executor fee in SPF are not filled.

A Machina Finance fill needs no capital either. One transaction buys from the order and sells into an ErgoDEX pool, or the reverse, and the price gap between the two is your revenue, in ERG. The client fills only the newest Machina contracts. Token/token grid orders are left to arbitrage, as Machina token/token grids describes. A Machina fill joins the run on its pool beside the ErgoDEX orders, so it uses the batching.ergodex settings and candidate source and has none of its own. Statistics count it under ErgoDEX.

While arbitrage runs, a Machina order can go through LithosDex instead. The batcher also prices each order against the LithosDex ERG pools of its token. An order a LithosDex pool fills for more is left out of the ErgoDEX run, and arbitrage fills it in your own block through that pool, as Machina orders through LithosDex describes. Broadcasts still go through ErgoDEX pools.

ErgoDEX executes against many pools, so it bounds how many it tracks and skips idle ones:

SettingDefaultRangeWhat it does
batching.ergodex.maxTrackedPools2561 to 1024Pools tracked, newest first
batching.ergodex.maxPoolAgeBlocks201601 to 10000000Skip pools whose current box was included more than this many blocks ago

Its candidate source ships on, so ErgoDEX executions reach your blocks. To keep them out, set stratum.candidate.sources.ergodex.enabled = false. The batcher keeps scanning to broadcast, since batching.ergodex.broadcast ships on. Set that to false as well and it stops scanning.

LithosDex only#

LithosDex always executes against the ERG:LIT pool. Anyone can create another LithosDex pool, ERG/token or token/token, and the batcher can serve those too:

SettingDefaultRangeWhat it does
batching.lithosdex.autoFlushtruetrue or falseClose each candidate run with a flush, moving the pool's pending fees to the vault
batching.lithosdex.discoverPoolstruetrue or falseAlso execute orders for LithosDex pools of either kind other than ERG:LIT, in your own blocks and by broadcast
batching.lithosdex.maxTrackedPools2561 to 1024With discoverPools on, the most pools served besides ERG:LIT, newest first

A flush is what lets liquidity providers claim the fees the pool has accumulated. It pays you nothing and costs nothing in a block besides the small space it takes up in size and cost. It is enabled by default to ensure permanent fees are moved quickly. It is never broadcast, because a broadcast flush would pay a network fee for no return.

A discovered pool is served only when it checks out. The client rebuilds the pool and vault contracts from the pool's own token ids and requires them to match what is on chain exactly. A pool that fails the check is ignored, so a look-alike box cannot draw your executions. The verified list and lithosdex.pools.hidden play no part here: the batcher serves any pool that passes. To exclude a pool that passes, add its NFT id to batching.lithosdex.deniedPools. For what LithosDex is and how its orders work, see LithosDex.

Difficulty forwards#

The batching.forwards block runs the work that keeps difficulty forwards going. Once per difficulty epoch it records Ergo's difficulty into the forwards accumulator, and it settles every position whose window has been recorded. Each recording and each settlement pays you 5 LIT. Mining > Payments lists that LIT under Tokens to you, apart from ERG. It does nothing on a network where no accumulator is deployed.

Each epoch of 128 blocks is split in two. Before broadcastAfterBlocks, the work is left to Lithos blocks, yours included, which carry it fee-less. From then on your client broadcasts it with a 0.001 ERG fee, and your own block offers none of it, so the two never compete:

SettingDefaultRangeWhat it does
batching.forwards.enabledtruetrue or falseRecord and settle at all
batching.forwards.scanIntervalMs300005000 to 3600000 msMilliseconds between scans of the accumulator and the open positions
batching.forwards.maxTrackedOrders5121 to 4096Due positions held between scans. Boxes are reloaded before settling
batching.forwards.maxOrdersPerBlock101 to 100Transactions one broadcast pass sends, the recording included
batching.forwards.broadcasttruetrue or falseBroadcast recordings and settlements from broadcastAfterBlocks onward
batching.forwards.broadcastAfterBlocks30 to 120Blocks into each epoch before broadcasting starts
batching.forwards.skippedOrderTtlMs360000060000 to 86400000 msHow long a position that could not be built is left out
batching.forwards.maxSkippedOrders40960 to 100000Such positions remembered at once, oldest forgotten first

The default of 3 leaves Lithos blocks two chances an epoch. The Lithos client can record an epoch in a block only once the epoch's second block is on chain. At 3, the epoch's third and fourth blocks can carry the work fee-less, and your client broadcasts it once the fourth block is on chain. At 0 or 1, your client broadcasts every recording.

A settlement pays its broadcast fee out of the position's own ERG. A recording that no settlement carries pays its 0.001 ERG fee from your wallet, at most once an epoch, which is about 0.006 ERG a day.

In your own blocks the work also needs stratum.candidate.sources.forwards, which ships on. A recording in your block with no settlement to carry it holds one confirmed wallet box of yours, at least 0.001 ERG, for that block. The box comes back to you whole with the reward, whether or not the block is found.

SigmaFi bond liquidations#

The batching.sigmafi block liquidates SigmaFi bonds that matured without being repaid. A liquidation sends the bond's collateral to the vault its lender claims from, and you keep the bond's batching fee. It spends none of your boxes. Only bonds under the maturity liquidation script are taken, and only those paying at least minBatchingFeeNanoErg.

For broadcastAfterBlocks blocks after a bond matures, only Lithos blocks carry its liquidation. At the shipped value of 1, that is the block at the maturity height alone. Your block carries it fee-less, every due bond in one transaction, and the fees go to the pool with your other batching takings. Your block also replaces any pending transaction that already liquidates one of those bonds. From then on your client broadcasts the liquidation too, paying the 0.001 ERG network fee out of the fees and sending the rest to your wallet:

SettingDefaultRangeWhat it does
batching.sigmafi.enabledtruetrue or falseLiquidate at all
batching.sigmafi.scanIntervalMs300005000 to 3600000 msMilliseconds between scans of the bond scripts. A scan reads the chain once per block at most
batching.sigmafi.maxTrackedOrders5121 to 4096Due bonds held between scans, oldest maturity first
batching.sigmafi.maxOrdersPerBlock201 to 100Bonds one block or broadcast pass liquidates. They share one transaction
batching.sigmafi.broadcasttruetrue or falseBroadcast liquidations from broadcastAfterBlocks onward
batching.sigmafi.broadcastAfterBlocks10 to 720Blocks after a bond matures that only Lithos blocks carry its liquidation
batching.sigmafi.minBatchingFeeNanoErg500000002000000 to 100000000000The least batching fee a bond must pay to be liquidated
batching.sigmafi.skippedOrderTtlMs360000060000 to 86400000 msHow long a bond that could not be built is left out
batching.sigmafi.maxSkippedOrders40960 to 100000Such bonds remembered at once, oldest forgotten first

Keep the fee floor at 0.05 ERG unless you have a reason. Anyone can build a bond whose liquidation pays everything back to themselves. Below the floor, such bonds would fill your blocks for free. At the floor, each one costs its builder the fee.

In your own blocks the work also needs stratum.candidate.sources.sigmafi, which ships on. Mining > Payments lists liquidations as SigmaFi.

Arbitrage in your own blocks#

When one token trades at different prices in two pools, a cycle of swaps that starts and ends in ERG can return more ERG than it put in. The batching.arb block runs those cycles in your own blocks, and ships on.

Each cycle is two to four swaps through ErgoDEX and LithosDex pools, of both the ERG/token and token/token kinds. Each swap is one transaction, and every swap of a cycle goes into the same block. Nothing arbitrage builds is broadcast. The client builds cycles after both DEX batchers have built their runs, so a cycle trades against each pool as those runs leave it and never spends a box a run spends.

Unlike order execution, arbitrage needs capital. The client keeps that capital, the stake, at your arb address, under the following rules:

  • The arb address is your wallet's first key under a script of its own. Only your key spends it, but your node wallet does not list boxes there, so no other program using the wallet can select them.
  • The stake is the largest box at the arb address that holds at least 0.1 ERG and no tokens.
  • ERG at the arb address is not part of your wallet balance or your reported spendable balance.
  • Each cycle spends the stake and returns it whole to the arb address in the same block. The returned box becomes the next stake. No wallet box is spent.
  • If the address holds no stake, the client sends one, as Funding the arb address explains. ERG you send to the address yourself is used as well, without a restart.

The stake limits how large one cycle can be, not how many cycles a block holds, because each cycle hands the stake on to the next. The following settings control arbitrage:

SettingDefaultRangeWhat it does
batching.arb.enabledtruetrue or falseRun arbitrage at all
batching.arb.stakeNanoErg10000000000100000000 to 10000000000000ERG autoReserve sends to the arb address, and the most one cycle puts in
batching.arb.minProfitNanoErg10000000 to 1000000000000Least profit, in nanoERG, a cycle must leave to be built. Below 1000000 it acts as 1000000, since the profit needs a box of its own
batching.arb.autoReservetruetrue or falseSend a stake from your wallet to the arb address when it holds none of full size

The client finds the stake by reading the arb address, so arbitrage needs the node's extra index, ergo.node.extraIndex = true.

Arbitrage runs only while all four of the following are on. All four ship on:

  • The stratum task, lithos-tasks.stratum-server
  • stratum.candidate.blockTransactions
  • The arb source, stratum.candidate.sources.arb, with 100 slots
  • batching.arb.enabled

Both batchers' deniedPools lists apply to arbitrage as well, and so does batching.ergodex.maxPoolAgeBlocks. A LithosDex pool other than ERG:LIT is traded only when it passes the same contract check the LithosDex batcher applies.

A cycle's profit goes to the pool, not to you alone. It is added to the holding box your block's genesis transaction creates, with your executor fees, so every miner who submits to that rollup is paid a share of it by score. On Mining > Payments it appears as Arb, under Into the pool.

Machina orders through LithosDex#

Arbitrage also fills the Machina Finance orders the ErgoDEX batcher hands it: those a LithosDex ERG pool of the order's token fills for more than any ErgoDEX pool does. A Machina order for LIT has only the ERG:LIT pool, so it is filled this way or not at all. Each fill works as follows:

  • It needs no stake and spends none of your boxes. It runs even while the arb address holds no stake.
  • It is one transaction, laid out as a fill through an ErgoDEX pool: the pool, the order's next box, and the gap in ERG.
  • It builds on the pool as the LithosDex batcher's run in the same block leaves it, after every LithosDex order, and before any cycle, so a cycle through the same pool trades against what the fill left.
  • It must leave at least batching.ergodex.minRevenueNanoErg, and at least 1000000, since the gap needs a box of its own.
  • It is never broadcast.

The gap goes to the pool with your other takings. Statistics count the fill under ErgoDEX, like a Machina fill through an ErgoDEX pool.

Machina token/token grids#

A Machina token/token grid order trades its own token against another token, its base, both ways. A fill through a token/token pool of the pair needs no capital, but leaves the gap in the base token. Arbitrage turns that gap into ERG in your own block, on the stake, in the following two transactions:

  1. Fill the order through the token/token pool of its pair that leaves the biggest gap, ErgoDEX or LithosDex. The stake passes through and takes the gap.
  2. Sell the gap through the deepest ERG pool of the base token, on either DEX. The stake returns whole to the arb address, and the ERG goes to the pool as profit.

Both transactions go into the same block or neither does. The pair is built only when the ERG the sale returns is at least batching.arb.minProfitNanoErg. It takes two of the arb source's slots, ahead of the cycles, and needs a stake at the arb address. Statistics count it as an arbitrage cycle. Few such orders exist: an order whose ERG cannot cover the box its fill must create is never filled.

Funding the arb address#

With autoReserve on, the client sends a stake to the arb address when no box of at least stakeNanoErg with no tokens is there or on its way. It acts only while your wallet's spendable ERG is at least twice stakeNanoErg, which is 20 ERG at the default, so as much again stays free for everything else.

It sends one transaction that pays the 0.001 ERG minimum fee, built as follows:

  • It is funded like any other transaction the client sends, from any of your wallet's boxes.
  • It creates one box of exactly stakeNanoErg at the arb address.
  • Your change, with any tokens the spent boxes held, returns to your first address.

Cycles start from the new box once it confirms. The client first checks about a minute after it starts, then every 10 minutes, about 5 blocks, until a stake is at the address. If your wallet holds less than twice the stake, the client logs one warning with what it holds. Send ERG to your wallet, or lower stakeNanoErg.

You can also fund the address yourself. Any box there with at least 0.1 ERG and no tokens is used, and a box smaller than stakeNanoErg limits each cycle to its own size. With autoReserve off, this is the only way arbitrage gets a stake.

Reclaiming the stake#

The web panel's Wallet page shows the arb address and what it holds, and so does GET /wallet/arb. Select Reclaim there, or call POST /wallet/arb/reclaim, to send everything at the address back to your first address, less the 0.001 ERG fee.

A reclaim stops arbitrage first, and autoReserve sends no new stake, until the client restarts. To keep arbitrage off after a restart, set batching.arb.enabled = false. With arbitrage off, the client never reads or funds the arb address, and anything left there can still be reclaimed.

Fees on orders you place#

The lithosdex.orders block sets the fees carried by orders you place through the API or web panel, when the request does not name its own:

SettingDefaultRangeWhat it does
lithosdex.orders.executorFeeNanoErg3000000Checked per requestWhat your order pays whoever fills it
lithosdex.orders.maxMinerFeeNanoErg1000000Checked per request, must be below the executor feeMost of that fee a filler may spend as a network fee

Both are paid only when a miner fills the order. A cancelled order pays neither.

These are validated per request rather than at startup, so a bad value refuses the order rather than refusing to start the client.

The default executor fee is set to clear the shipped floor of every miner running this client. Miners skip orders paying less than their minRevenueNanoErg, so an order priced below that waits indefinitely rather than failing.

Difficulty forwards you offer or fill#

The forwards.offers block limits how large a short-window difficulty forward you offer or fill can be. Over a few epochs, a miner with a tenth of Ergo's hashrate can move the window's average difficulty by about 7.5%, so short windows are kept small:

SettingDefaultRangeWhat it does
forwards.offers.shortWindowEpochs81 to 121Windows shorter than this many epochs are limited. 121 limits every window
forwards.offers.shortWindowMaxNotionalLit100000 or moreThe largest notional, in whole LIT, such a window may carry. The default is 2,000 LIT of margin, a fifth of it. 0 refuses short windows entirely

The limit binds only your client. Other clients can still offer or fill larger short windows, and your client shows them in the order book but will not fill them.

These are validated per request rather than at startup, so a bad value refuses forwards requests rather than refusing to start the client.

SigmaFi orders you fill#

The sigmafi.bonds block sets the lender-funded batching reserve when you fill a SigmaFi order through the API and omit the fill request’s batchingFee. Order creation rejects that field. The web panel’s lending preview starts at 0.05 ERG and sends the amount you select explicitly.

SettingDefaultRangeWhat it does
sigmafi.bonds.batchingFeeNanoErg50000000Nonnegative nanoERG, checked per fillReserve added above the borrower’s collateral; refunded to the bond holder on repayment or available to the liquidator

The lender may override it with any nonnegative amount, including zero. Below 0.05 ERG, the fill quote warns that clients on shipped settings will not liquidate the bond automatically. The borrower funds the collateral and its box minimum; this reserve is additional ERG supplied by the lender.

Next steps#

  • Block packages: the source budgets that gate candidate execution.
  • Collateral and emission: the other thing the client spends on your behalf.
  • Difficulty forwards: what the forwards batcher records and settles.
  • SigmaFi bonds: the bonds the SigmaFi batcher liquidates.
Edit this page on GitHubsynced from aa061a5
← PreviousBlock packagesNext →Collateral and emission
On this page
  • How a batcher earns
  • Settings both batchers share
  • Choosing which orders a run executes
  • Executing unconfirmed orders
  • ErgoDEX only
  • LithosDex only
  • Difficulty forwards
  • SigmaFi bond liquidations
  • Arbitrage in your own blocks
  • Machina orders through LithosDex
  • Machina token/token grids
  • Funding the arb address
  • Reclaiming the stake
  • Fees on orders you place
  • Difficulty forwards you offer or fill
  • SigmaFi orders you fill
  • Next steps