Repository navigation
Arbitrage Improvements & SigmaFi ZC Standard
Lithos Client 1.0.9 completes the SigmaFi V2 ZC Standard first released in the 1.0.9 beta: live tracking, the
/sigmafi/zc/*API and web panel, fill history from the first ZC block, self-funded batching, and collateral arbitrage both in your own blocks and, for simple cases, in every block. Arbitrage gains two sources: ErgoDEX concentrated liquidity positions, and the SigmaUSD bank. Arb gets a reserved share of the block, a Resume button after a reclaim, and 150 slots. Additionally added some performance and security fixes, along with cleanups of old and/or dead code.
Released: November 27, 2026
Commit: 088a863
To run the application, unzip the file and then run the script in the /bin directory.
./lithos-client
This will automatically read from lithos.conf in your /bin folder.
To run with a custom configuration file add the argument -Dconfig.file=
./lithos-client "-Dconfig.file=path/to/custom/config/file.conf"
To build from source run:
sbt dist
This will create a new zip file in the /target/universal directory.
Release Notes:
Upgrade Notes
- Keep
ergo.node.storageRentCollectionoff in your Ergo node's config. Ergo node 6.0.8 has this setting, off by default. Enabling it can cause issues with normal Lithos rent collection. - Arb's block budget grew.
stratum.candidate.sources.arbships atmaxTxs = 150,maxBytes = 491520andmaxCost = 3000000, and themaxTxsceiling for every source rose from 100 to 200. Alithos.confthat sets the old arb values keeps them. NewreservedShare = 0.25holds a quarter of the package for arbitrage when it has cycles to offer. - SigmaFi ZC is pinned at Sigma-Finance-V2
adce8ac. OnlyWrapMintchanged from the 1.0.9 beta. A wrap request posted by a 1.0.9 beta client is under the old contract, which this release does not track. - ErgoDEX CL positions are pinned at the launch deployment (swap script hash
70286f99…). A new ErgoDEX position or swap script needs a client release. - First-generation SigmaFi routes moved to
/sigmafi/old/*with no aliases, and first-generation bond batching was removed.batching.sigmafiruns the ZC batcher only. - No statistics store is rebuilt. CL and SigmaUSD bank cycles, ZC collateral arbitrage and ZC batching record into the existing totals from 1.0.9 on.
Arbitrage
- Arb cycles in mempools are removed from Lithos blocks in most cases.
- Added ErgoDex CL positions as an arb source.
- Added SigmaUSD bank as an arb source.
- Arb size is now adjusted according to remaining blockspace.
- Resume after a reclaim.
POST /wallet/arb/resume, or Resume on the Wallet page, runs arbitrage andautoReserveagain without a restart. It is refused while a pending transaction spends a box at the arb address. GET /wallet/arbreports the stake from the first read of the arb address, rather than 0 until the first block build.- Machina fills, by the ErgoDEX batcher and by the arb stage, share one pricer and one builder.
SigmaFi ZC Standard Tracking & Fill History
- Exact pinned contract table from
Sigma-Finance-V2commitadce8accovering both ERG and SigUSD markets (Order,PricedOrder,Bond,BondVault,LendOffer,SaleOrder,PricedAsk,LotAuction,FractionalMint,FractionalVault,DutchAuctionMint,DutchAuctionVault,WrapMint,WrapVault, and every standard liquidation, pricing, guard and policy expression). The trees are pinned, never compiled by the client. - Live
ZcTrackerfollows confirmed ZC boxes directly fromStateFrameblocks (no extra block reads after its first seed scan), follows candidate parents ahead of sync, and lays an unconfirmed mempool overlay over the book for reads, capped atsigmafi.zc.maxBoxes(default10000, evicting the boxes holding the least ERG first under spam). - Bounded
ZcResolvercaches proven token origins,zcs1disclosed party scripts (context variable64), serialized box bytes, and offer and ask chain roots, without letting a mempool miss poison the cache. - Fill history is on.
sigmafi.zc.fillsFromHeightships at1918857, the first mainnet block holding a box under the pinned ZC contracts.
SigmaFi ZC Standard API & Web Panel
- Full
/sigmafi/zc/*read and write API (documented inconf/openapi.yamland/api): market info, rate curves, order book, asks, offers, deterministiczcs1match previews, draft simulations (rate-limited), open lot and Dutch-vault auctions, lookup and search, asset verification, fill history, portfolio with cost basis and P&L, wallet activity, and all 19 write actions (POST /sigmafi/zc/...), each with a/checkpreview that signs nothing. - Rebuilt Extensions > SigmaFi web panel: Market (rate curves, order book, fill chart, order ticket and oracle price-shock simulator), Auctions (lot auctions and Dutch auction vaults), Portfolio (borrowing, lending, shares, wraps, cancellations, activity), Search, and the Create menu (Borrow, Lend, Sell a bond, Sale auction, Split into shares, Wrap an NFT).
- Extinguish / Close Position A borrower holding their own loan's circulating unit closes the loan at any height by burning all three units, taking back the collateral and the fee reserve without a repayment (
POST /sigmafi/zc/bonds/{assetId}/extinguish, or Extinguish in Portfolio). Listings that sell a claim on your own loan carryborrowedByMeand show Your loan with a Buy back action. - First-generation SigmaFi endpoints remain available under
/sigmafi/old/*.
SigmaFi ZC Standard Batching (batching.sigmafi)
- Replaces the first-generation liquidation batcher with
ZcBatcher, reading confirmed ZC state fromZcTrackerandZcResolverrather than polling the node every tick. - Strictly self-funded: it never spends your wallet boxes. It runs every
zcs1batchable action:- Offer matches across ERG and SigUSD markets, chaining an offer's continuation across several orders and asks in the same block.
- Packed liquidations, expiry refunds and refreshes (up to 20 pieces per transaction, split by bisection on failure): matured and early-oracle liquidations (
minBatchingFeeNanoErg, default 0.05 ERG), expired orders, offers, asks and lots, and paid storage-rent refreshes (minActionFeeNanoErg, default 0.002 ERG; aged bond refreshes packed separately per EIP-39). - Standalone actions: share mints (
FractionalMint,DutchAuctionMint), settlement pulls into share vaults, wrap mints, and agedWrapVaultrefreshes.
- Off-critical-path
ZcPrecomputedMatcheskeeps candidate builds fast (about 33 ms on a 10,000-box synthetic book). - Lithos blocks carry the work fee-less, supersede competing mempool spends, and send fees to the block's holding box. From
broadcastAfterBlocks(default1) on, uncontested work is also broadcast, paying the 0.001 ERG miner fee out of protocol fees.
SigmaFi ZC Collateral Arbitrage
- Liquidation and sale auctions are arbitraged through existing arb routes.
- In every block (
batching.sigmafi.collateralArb). One wallet-funded transaction buys an ERG-market lot, vault or sale order and sells its collateral to one ErgoDEX or LithosDex ERG pool in the same transaction, sent only when it returns at leastminReturnPercent(10) andminProfitNanoErg(0.01 ERG), taking at mostmaxErgIn(10 ERG). The profit returns to your wallet. - Pricing scope: only pool-traded fungible tokens, and SigUSD and SigRSV at the bank, are priced. Unpriced tokens (ZC bond units, shares and wrapped NFTs among them) are valued at
0ERG and swept to your wallet, deducting the 0.001 ERG box minimum from profit, only when the priced collateral still confirms a net profit.
Mining
- Arb cycles are now atomically included or excluded from blocks.
- Fixed bug with fraud proofs of same type not resolving with different miners.
- Genesis outputs are now sized using the minimum ERG/byte value based on on-chain parameters.
Other
- Due storage rent boxes are read back oldest first, 100 per request and at most 1,000 per build, rotating through the backlog. A box that stays live and uncollectible is dropped.
- Multiple fixes and security hardening changed related to spam resistance and performance
Batching
batching.<name>.deniedOrderslists order box ids no batcher scans, fills, broadcasts or hands to arbitrage.batching.ergodex.deniedOrdersships with the one token/token Machina grid no one can fill.- The ErgoDEX batcher's check of a LithosDex pool's fee vault is read once per pool and kept.
- A wallet request for ERG alone takes the smallest box that covers it on the page read, rather than the first.
Statistics
- Arbitrage statistics now record CL and SigmaUSD bank cycles. Bank cycles were not recorded in the 1.0.9 beta.
- ZC batching counts under
sigmafi, and ZC collateral arbitrage, in your blocks and in every block, underarb.
Configuration
- Added
stratum.candidate.sources.arb.reservedShare(0.25). Arb source nowmaxTxs = 150,maxBytes = 491520,maxCost = 3000000.maxTxsceiling 200. - Added
batching.arb.pendingSwaps(true). - Added
batching.ergodex.deniedOrders(one grid) andbatching.lithosdex.deniedOrders([]). - Added
batching.sigmafi.collateralArb:broadcast(true),minReturnPercent(10),minProfitNanoErg(10000000),maxErgIn(10000000000). - Added
sigmafi.zc:enabled(true),maxBoxes(10000),fillsFromHeight(1918857),fillsRetentionDays(1460). - Added
batching.sigmafi.minActionFeeNanoErg(2000000). - Added
batching.arb:zcEnabled(true),zcMinProfitNanoErg(1000000),zcMaxCostNanoErg(0),zcMaxBundlesPerBlock(5),zcMinLegProceedsNanoErg(100000).
WebDocs
- Multiple new SigmaFi Webdocs additions
- Changes to batching, storage rent, and configuration documentation
- Added and completed SigmaFi V2 UI
- The OpenAPI reference (
/api) for/sigmafi/zc/*,/sigmafi/old/*andPOST /wallet/arb/resume, with the keyed routes, the429limits and the pool index'struncatedflag.