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
  • SigmaFi
    • Borrowing
    • Lending
    • Trading bonds and shares
    • The Lithos client and panel
      • Contracts
      • zcs1 off-chain standard
      • Pricing
      • Building on the Lithos API
    • Difficulty forwards
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
    • getZC market info
    • getList asks
    • getList lend offers
    • getBid and ask curves
    • getOrder book
    • getFill history
    • getWhat a box would match
    • postSimulate a draft
    • getOpen auctions
    • getLook up an id
    • getSearch by id prefix
    • postDescribe tokens
    • getThis wallet in ZC
    • getThis wallet's ZC activity
    • postCreate an order (quote)
    • postCreate an order
    • postCreate a lend offer (quote)
    • postCreate a lend offer
    • postCreate an ask (quote)
    • postCreate an ask
    • postCreate a lot auction (quote)
    • postCreate a lot auction
    • postFill an order (quote)
    • postFill an order
    • postBuy from an ask (quote)
    • postBuy from an ask
    • postBuy a lot (quote)
    • postBuy a lot
    • postBuy a vault auction (quote)
    • postBuy a vault auction
    • postPull a settled bond (quote)
    • postPull a settled bond
    • postFractionalize a bond unit (quote)
    • postFractionalize a bond unit
    • postRepay a bond (quote)
    • postRepay a bond
    • postAdd collateral (quote)
    • postAdd collateral
    • postLiquidate a bond (quote)
    • postLiquidate a bond
    • postExtinguish a bond (quote)
    • postExtinguish a bond
    • postClaim a settled bond (quote)
    • postClaim a settled bond
    • postWrap a token (quote)
    • postWrap a token
    • postUnwrap (quote)
    • postUnwrap
    • postRun a mint (quote)
    • postRun a mint
    • postCancel a box (quote)
    • postCancel a box
    • 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
    • postResume arb after a reclaim
    • 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/Protocol/SigmaFi/For developers

SigmaFi pricing

How SigmaFi prices loans, with the yield convention, two-point yields, lend offer curves, window orders, fees, share prices and auction prices, and worked examples.

Advanced7 min readAssumes you are comfortable with percentages and simple formulas, and have read the SigmaFi overview.

This page gives the exact rules SigmaFi uses to price loans, bonds and shares, with a worked example for each. Every rule here is checked by a contract or an expression on chain, except where it says a client chooses. Which expression a box uses is on Contracts.

Pricing is either fixed or yield. A fixed price is a number the owner commits to. A yield price is worked out at the moment of the trade from the yield the owner commits to.

The yield convention#

Every SigmaFi yield is a simple return in basis points per 262,800 blocks, which is one year of 2-minute blocks. For a bond repaying R with D blocks to maturity, bought for P:

yield = (R / P - 1) × 262,800 / D

The following hold for every yield on SigmaFi:

  • It is simple, never compounded.
  • It is measured in blocks, not calendar time. Ergo's block time varies.
  • It assumes full repayment at maturity. A liquidated bond pays its collateral instead.
  • 100 basis points are 1%, so 1,000 bps is 10%.

Contracts never divide. Each test below multiplies both sides out in BigInt and compares, so the boundary is exact to one raw unit.

Two-point yields#

A yield-priced order or ask commits two points in time:

(start height h0, start yield y0, end height h1, end yield y1),   h1 > h0

The yield is y0 up to h0, y1 from h1 on, and on the straight line between them in between. Equal yields give one fixed rate. Clients put h0 at the current height and h1 at the box's expiry. With:

B  = 10,000 × 262,800
L  = h1 - h0
at = HEIGHT, clamped to [h0, h1]
Y  = y0 × L + (y1 - y0) × (at - h0)          the yield at HEIGHT is exactly Y / L
D  = maturity - HEIGHT
F  = R for a whole bond, or R × units / N for shares

the least principal or payment satisfies:

paid × (B × L + Y × D) ≥ F × B × L          that is,   paid ≥ F / (1 + yield × D / 262,800)

A rising yield makes the price fall while the box waits. A falling yield makes it rise. Any fixed floor the owner set still binds.

Example. A borrower posts at height 1,900,000 with a yield moving from 800 bps to 1,200 bps by the order's expiry at 1,905,040. At height 1,902,520, halfway, Y = 800 × 5,040 + 400 × 2,520, so the yield is Y / L = 1,000 bps, 10%. A bond repaying 110 with 131,400 blocks left then needs a principal of at least 110 / (1 + 0.10 × 131,400 / 262,800) = 104.7619.

Because the price can move between signing and inclusion, a client pays the most the price asks at any height from now to 3 blocks ahead.

Priced orders#

A priced order prices only the principal. The repayment, the collateral, the maturity rule, the liquidation rule and the fees never move. The principal stored in the order is a floor. The bond records the principal actually paid:

  • ERG: the payout's nanoERG, less the refunded expiry fee.
  • SigUSD: the payout's SigUSD exactly. The small ERG beside it stays as committed.

Paying above the minimum is allowed, which gives the lender room for the inclusion height to move.

Fixed or yield: choosing for an order#

How the rate behaves while an order waits depends on its timing and pricing:

TimingPricingWhile the order waits
Term from the fillFixedPrincipal, repayment and duration stay the same, so the rate does too
Term from the fillYieldDuration stays the same. Only a moving yield changes the quote
Fixed maturityFixedFewer blocks remain, so the rate the borrower pays rises
Fixed maturityYieldThe principal follows the fixed repayment at the stated yield as blocks run out

A borrower who thinks in a target rate can work out the repayment: R = P × (1 + yield × D / 262,800), rounded up to a raw unit.

The lend offer's yield curve#

A lend offer holds a minimum yield and up to 20 points of (yield, blocks left to maturity), blocks strictly increasing. For a bond with D blocks left the yield it requires follows these rules:

  • Between two neighbouring points, it is on the straight line joining them.
  • Below the first point it is the first point's yield, above the last it is the last's.
  • It is never below the minimum yield. With no points, the minimum is the one yield.
  • The offer's least and most blocks to maturity bound what it buys at all.

On a segment from (y1, D1) to (y2, D2), with L = D2 - D1 and Y = y1 × L + (y2 - y1) × (D - D1), the offer buys when:

R × B × L ≥ cost × (B × L + Y × D)

For u of N shares, R is replaced by R × u / N. On an ERG offer, the cost includes the batcher fee. The curve is keyed by blocks left, so it rolls with time: a resting offer keeps bidding the same rate for a 30-day bond whatever day it is.

Example. An offer with a 5% minimum and points 6% at 21,600 blocks, 8% at 131,400 and 10% at 262,800 meets a bond repaying 107 with 76,500 blocks left. That is halfway along the first segment, so it requires 7%. The most it pays is 107 / (1 + 0.07 × 76,500 / 262,800) = 104.8632. On an ERG offer with a 0.005 ERG batcher fee, the price itself may be at most 104.8582.

Window orders#

A window order lets the lender pick the maturity, any duration from the borrower's minimum to their maximum. The borrower commits a curve: a cap and up to 20 points of (yield, blocks left). It is the offer's curve read the other way round: each point is the most the borrower pays, and the cap is a ceiling. With D the blocks to the chosen maturity, the yield is the curve's at D, capped, and:

principal × (B × L + Y × D) ≥ R × B × L          that is,   principal ≥ R / (1 + yield × D / 262,800)

The repayment is fixed, so a longer maturity pays the borrower less now. The principal floor still binds at every maturity.

Example. A borrower repays 6, with a 12% cap and points 8% at 21,600 blocks and 12% at 131,400. A lender who picks 43,200 blocks gets a curve yield of 8.787%, so the principal is at least 5.9146. At 131,400 blocks the yield is 12% and the principal at least 5.6604.

When a lend offer fills a window order, zcs1 fixes the maturity a batcher picks. See Batching.

Fees and yields#

A borrower's or seller's yield is the most they offer, which sets a least price. A lender's yield is the least they accept, which sets a most cost. Ignoring fees, an ask offering 10% crosses a bid requiring 8%, and one offering 6% does not.

Fees change that in the following ways:

  • On an ERG lend offer, the cost is the price plus the batcher fee.
  • A SigUSD offer pays its fees in ERG, separately, with a reward per fill proportional to the capital filled and a cap on the total.
  • On a short or small loan the batcher fee can exceed the interest, so equal rates may not match. On a 60-block loan repaying 0.12 ERG, leaving room for a 0.005 ERG fee takes a yield in the tens of thousands of percent.

Share prices#

Shares are quoted as a percentage of face. A price p for u raw shares of a bond repaying R, with N raw shares in all, is:

percentage of face = p × N / (u × R)

Example. 10 shares (10,000,000 raw) of a bond repaying 105.5 SigUSD, offered for 10.20 SigUSD, are at 10.20 × 100,000,000 / (10,000,000 × 105.5) = 96.68% of face.

Auction prices#

Auctions use straight-line prices over blocks, and each price only falls:

AuctionPrice at a height
Lot auctionThe opening until the start, falling in a straight line to the floor at the end, then the floor until the expiry
Share vault, floor auctionA target for the vault's currency: the repayment times a basis-point figure falling from the opening to the floor over the length, then holding. A buyer brings the vault up to the target
Share vault, excess auctionThe opening times the repayment, falling to zero over the length. A sale must pay more than zero

A falling price means a purchase priced now stays valid when it lands, so clients buy at the current height's price.

Next steps#

  • Lending and Borrowing: where these prices meet in practice.
  • The zcs1 off-chain standard: the matching order and pricing-ahead rules batchers follow.
  • Contracts: which expression checks which formula.
Edit this page on GitHubsynced from 8d4d4d8
← Previouszcs1 off-chain standardNext →Building on the Lithos API
On this page
  • The yield convention
  • Two-point yields
  • Priced orders
  • Fixed or yield: choosing for an order
  • The lend offer's yield curve
  • Window orders
  • Fees and yields
  • Share prices
  • Auction prices
  • Next steps