Skip to content

Lithos Mainnet 1.0.8

Latest

Choose a tag to compare

@K-Singh K-Singh released this 11 Nov 04:31

Arbitrage & SigmaFi V2

Lithos blocks now include arbitrage transactions. ErgoDex, LithosDex, and Machina Finance are all used to generate arbitrage opportunities, with profits generally ranging from 0.5 to 4 ERG in one block. Arbitrage will automatically initiate when you have at least 20 ERG in your wallet. When initiated, 10 ERG is sent to your arbitrage address (owned and accessible only by you), where it is used to make profit generating trades. The ERG can be withdrawn at any time through the UI or API. To accommodate arbitrage and make use of block space more efficiently, limits for candidate sources have all been raised. Additionally, SigmaFi V2 bonds arrive as an extension: Lithos blocks liquidate bonds for their batching fees, and the API and web panel have added functionality to borrow, lend, repay and claim tokenized zero-coupon bonds.

Commit: 4d0de1f

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

  • Arbitrage is on. While the stratum task and block transactions are on and the wallet holds at least 20 ERG spendable, the client sends 10 ERG to your arb address about a minute after start. That ERG leaves your wallet balance; reclaim it at any time. Set batching.arb.autoReserve = false to fund the address yourself, or batching.arb.enabled = false to run no arbitrage.

Arbitrage

  • Cycles of two to four swaps that start and end in ERG, through ErgoDEX ERG/token and token/token pools and LithosDex pools of both kinds. Every swap of a cycle lands in the same block or none does. Nothing arbitrage builds is broadcast.
  • Built after both DEX batchers, on the pool boxes their runs leave, never spending a box they spend, and admitted after every other source. Both batchers' deniedPools and batching.ergodex.maxPoolAgeBlocks apply, and a LithosDex pool other than ERG:LIT must pass the LithosDex batcher's contract check.
  • The stake sits at your arb address, a special address which only you can access. Only your key spends it, and the node wallet does not list it, meaning that normal wallet transfers will not interfere with arbitrage. Cycles start from the largest box there holding at least 0.1 ERG and no tokens, and return it whole in the same block.
  • batching.arb.autoReserve sends one box of stakeNanoErg (10 ERG) there when no arbitrage stake exists. The wallet must have at least 2 times stakeNanoErg (20 ERG by default) for autoReserve to initiate the transfer.
  • GET /wallet/arb shows the address and its boxes. POST /wallet/arb/reclaim, or Reclaim on the Wallet page, sends everything there to your first address stops arbitrage until the client restarts.
  • A cycle's profit, at least minProfitNanoErg (0.001 ERG), goes to the block's holding box with your executor fees, shared by score.

Machina Finance

  • With arbitrage on, the ErgoDEX batcher also prices each Machina order against the LithosDex ERG pools of its token. An order a LithosDex pool fills for more is filled by the arb stage through that pool, after the LithosDex batcher's run and before any cycle, with no stake. A Machina order for LIT goes through ERG:LIT. Broadcasts still go through ErgoDEX.
  • Token/token grid orders are filled on the arb stake: the fill through the best token/token pool of the pair on either DEX, then the sale of the base-token gap through that token's deepest ERG pool, in the same block. Only a sale returning at least minProfitNanoErg is built.
  • Grid orders on the ErgoTree version 2 header (1af401…), whose tree is otherwise the current grid's byte for byte, are now filled. 5 of the 63 open grid orders carried it on 2026-11-10.
  • With arbitrage off, every Machina order goes through ErgoDEX as in 1.0.7, and token/token grids are not filled.

Candidate Building

  • LithosDex and ErgoDex pools now use tracked boxes, held in memory and transformed when blocks are applied rather than by scanning through the node index. This increases batching and arbitrage speed, and will be used for more candidate specific states in the future (such as collateral boxes).
  • Arbitrage and both DEX batchers read their own blocks' pools from it. A build that does not get it in time (2 s for a batcher, a 0.5 s for arbitrage) reads the node as before. Broadcasts and order scans are unchanged.

SigmaFi Bonds

  • The initial implementation of SigmaFi V2 has been added. Changes from v1 include, lender-held NFTs, the ability to create custom liquidation scripts, and removal of the dev fee.
  • A borrower locks collateral in an order. A lender fills it and funds a batching fee of their choice in case of liquidation (sigmafi.bonds.batchingFeeNanoErg). Repayments and liquidations go to vaults that the owner of the bond NFT can claim.
  • Lithos blocks liquidate matured bonds for a minimum of 0.05 ERG. From broadcastAfterBlocks (1) after maturity the client also broadcasts them, paying the 0.001 ERG fee out of the reserves. A batch that does not fit the sigmafi source is split up.
  • 16 routes under /sigmafi. Orders, bonds and POST /sigmafi/assets are open; the portfolio and every action need api_key, and every action has a /check quote that signs nothing. A fill takes an optional {"batchingFee": "…"};
  • A claim waits until the bond's settlement is confirmed. It takes the bond's own settlement output and burns the NFT to claim the repayment or liquidation.
  • A repayment counts only in a block below maturity. Warnings are displayed for bonds extremely close to their deadline.
  • POST /sigmafi/assets checks bond assets against the chain.

Oracle Feeds

  • GET /oracles and GET /oracles/{feedId} (paged history, optional atBlockId) serve confirmed oracle pool state, without the API key. One feed ships, ERG/USD v2 on mainnet, pinned by its pool NFT and the blake2b256 of its tree. A price older than maxAgeBlocks (30) is returned with stale = true.

Statistics

  • Arbitrage cycles in any Lithos block is recorded as batching protocol arb. User specific arb profits are counted in pool.batching.arb.
  • SigmaFi liquidations are recorded as sigmafi, standard maturity liquidations only.
  • The block package in GET /stats names each arbitrage transaction's kind: arb (a cycle through ErgoDEX pools only), arb-lithosdex (a cycle through a LithosDex pool), arb-machina (a Machina fill through LithosDex) and arb-grid (both transactions of a token/token grid).
  • GET /mining/candidate lists the sigmafi and arb sources.

Configuration

  • Changed: stratum.candidate.blockShare 0.5 → 0.75; stratum.candidate.sources.rent.maxTxs 2 → 8; sources.ergodex.maxTxs and sources.lithosdex.maxTxs 20 → 40.
  • Added stratum.candidate.sources.sigmafi: on, maxTxs 20, maxBytes 262144, maxCost 1000000.
  • Added stratum.candidate.sources.arb: on, maxTxs 100, maxBytes 327680, maxCost 2000000.
  • Added batching.sigmafi: enabled (true), scanIntervalMs (30000), maxTrackedOrders (512), maxOrdersPerBlock (20), broadcast (true), broadcastAfterBlocks (1), minBatchingFeeNanoErg (50000000), skippedOrderTtlMs (3600000), maxSkippedOrders (4096).
  • Added batching.arb: enabled (true), stakeNanoErg (10000000000), minProfitNanoErg (1000000), autoReserve (true).
  • Added sigmafi.bonds.batchingFeeNanoErg (50000000), and oracles: defaultHistoryLimit (100), readTimeoutMs (3000), readBudgetMs (10000) and feeds with the ERG/USD entry.
  • Added three dispatchers under lithos-contexts, named in Upgrade Notes.

Webpanel

  • Wallet page: an Arb stake card with the address, what it holds, its status and Reclaim. SigmaFi bond assets are checked against the chain and shown like LithosDex provisions.
  • Extensions > SigmaFi: Market, Borrow, Portfolio and Search, with USD estimates and collateral ratios from the ERG/USD feed and checked LithosDex routes. Diff Forwards has its own Extensions entry.
  • Mining > Payments shows Arb and SigmaFi beside the other batching sources.
  • Mining > Block package draws the four arbitrage kinds and SigmaFi liquidations apart.
  • LithosDex: provision NFT lookups moved to an NFT search tab, opened from the wallet and from collateral.

WebDocs

  • New page: SigmaFi bonds.
  • Updated Batching and orders (arbitrage, the arb address, Machina through LithosDex, token/token grids, SigmaFi liquidations), Block packages (the sigmafi and arb sources), Building a candidate, the wallet configuration and Wallet page guides, LithosDex liquidity, and Renting hashrate into Lithos (2 November figures).
  • Regenerated the API reference.