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

Borrowing on SigmaFi

Posting a SigmaFi borrow order, choosing its terms, and repaying, adding collateral or closing the loan early.

Advanced7 min readAssumes you know what a token and a block height are, and have read the SigmaFi overview.

This page covers everything a borrower does: posting an order, choosing each of its terms, and what you can do once a lender fills it. It names the action in the Lithos web panel and the API route for each step. Lending is on Lending, and the maths behind priced orders is on Pricing.

Posting an order#

An order locks your collateral and states the loan you want. It waits until a lender fills it, you cancel it, or it expires. In the Lithos web panel, open Extensions > SigmaFi, then Create > Borrow. Through the API, call POST /sigmafi/zc/orders/check to preview and POST /sigmafi/zc/orders to send.

An order has the following terms. Every one is your choice, and no client fills one in for you except where a default is named:

TermWhat it sets
MarketERG or SigUSD: the currency you borrow and repay in
PrincipalWhat you receive when the order fills
RepaymentWhat you repay by maturity. It never changes after you post
TimingWhen the loan matures: a fixed height, a term counted from the fill, or a window the lender chooses inside. See Choosing when the loan matures
PricingFixed principal, or a principal that follows a yield while the order waits. See Fixed or yield pricing
CollateralERG and up to 30 kinds of token, locked until the loan ends
Liquidation ruleMaturity or Oracle. See Choosing a liquidation rule
Fill guardOracle orders only: the least cover at which the order may fill. On by default
ExpiryThe height from which anyone may return the order to you. Default 5,040 blocks (about 7 days), or half the term of a fixed maturity if that is shorter
Expiry feeWhat a batcher earns for returning the order after it expires. Default 0.005 ERG, at least 0.002 ERG. When the order fills instead, the fee comes back to you with the principal

In a SigUSD order the principal and repayment are SigUSD. Any ERG the order names beside them is at most 0.001 ERG, enough to cover box minimums.

Choosing when the loan matures#

You choose one of the following timings:

TimingMaturityWhen to use it
FixedA block heightYou need the money back by a known date. A height at least 21,600 blocks away snaps to the nearest multiple of 21,600 (about 30 days), unless you keep it exact
TermThe fill's height plus a duration of at least 30 blocksYou want the same loan length whenever the order fills
WindowAny duration from your minimum to your maximum, chosen by the lender at the fillYou want the order to meet lenders at many maturities. Needs window pricing

The snapping to multiples of 21,600 is a client default. Bonds that mature at the same height can be pooled later, and every maturity stays fillable. The panel shows the snapped height before you sign.

Fixed or yield pricing#

With fixed pricing the lender pays exactly your principal. With a fixed maturity, the rate you pay then rises the longer the order waits, because the same repayment covers fewer blocks.

With yield pricing you name the yield you pay instead. The principal is worked out at the fill from your repayment and the blocks left, so the rate stays where you put it. The principal you enter becomes a floor: you never receive less. You can also let the yield move in a straight line while the order waits. For example, ask for 8% now, rising to 12% by the order's expiry, so the order gets easier to fill the longer it waits.

Window pricing goes with window timing. You name a yield curve: the most yield you pay at each maturity, up to 20 points, and a cap. The lender picks a maturity in your window, and the principal is your repayment discounted at your curve's yield for that maturity. A longer maturity pays you less now, because the repayment is fixed. The principal floor still binds at every maturity.

The formulas are on Pricing.

Choosing a liquidation rule#

You choose one of the following rules:

RuleLiquidated
MaturityFrom the maturity height on, if not repaid
OracleFrom maturity on, and before it whenever the collateral is worth less than your ratio of the repayment at an ERG/USD oracle no older than your oracle age

An oracle rule values the collateral against the repayment, not the principal, and leaves the lender's fee reserve out. With a 150% ratio on a 100 SigUSD repayment, the loan can be liquidated as soon as the collateral is worth less than 150 SigUSD. The default oracle age is 60 blocks.

An oracle loan lets a lender accept less margin, since the lender can liquidate early. It also means a price drop can cost you the collateral before maturity. The oracle rule counts only the ERG and SigUSD in the collateral, with SigUSD at $1. Other tokens add nothing to the cover it measures.

Danger
A liquidation takes all the collateral

However far the collateral's value is above the repayment, a liquidation sends all of it to the bond's holder. Leave room above your ratio, and repay before maturity.

The fill guard#

An order can sit open while the price moves. Without protection, a lender could then fill it into a bond that can be liquidated at once. The fill guard stops that: the contract refuses a fill unless the new bond's collateral is worth at least the guard's ratio at a fresh oracle.

Every oracle order gets the fill guard by default, at the rule's own ratio. You may raise it to keep room after the fill. Turning it off is possible, and the client still refuses to post an unguarded order that is already under its ratio. The panel shows the ERG price at which the guard stops fills.

Before the order fills#

You can cancel the order at any time: Portfolio > Cancel, or POST /sigmafi/zc/boxes/{boxId}/cancel. Cancelling needs one of your own boxes at the address that posted the order.

From the expiry height on, anyone may return the order to you and keep the expiry fee. You get the collateral back either way.

When the order fills#

A fill pays your principal to you, plus the unused expiry fee, and creates the bond. The bond holds your collateral and the fee reserve, ERG the lender adds to pay whoever liquidates. The default reserve is 0.05 ERG. The bond records its start height and maturity.

From then on the collateral leaves the bond in one of three ways: you repay, you extinguish the loan, or someone liquidates it when the rule allows.

Repaying#

Repay before maturity: Portfolio > Repay, or POST /sigmafi/zc/bonds/{assetId}/repay. The repayment and the lender's fee reserve go to the bond's vault, and all your collateral comes back to you. Anyone may repay a bond, but the collateral always returns to the borrower.

Repaying from the collateral. If your collateral holds the repayment currency (ERG on an ERG loan, SigUSD on a SigUSD loan), you can pay part or all of the repayment out of it and bring only the shortfall. Set fromCollateral to an amount or to max. Only the borrower can do this.

Warning
Repay before the maturity height

A repayment must land in a block below the maturity. From the maturity height on, anyone may liquidate the loan instead, and batchers do so within a block or two.

Adding collateral#

Add collateral to move an oracle loan away from its ratio: Portfolio > Add collateral, or POST /sigmafi/zc/bonds/{assetId}/recollateralize. You may add the following:

  • ERG.
  • More of a token the bond already holds.
  • On a SigUSD loan holding none, SigUSD.

No other new token can be added, and nothing can be taken out. Only the borrower can add collateral, at most once every 60 blocks, counted from when the bond last moved. A loan that matures within 60 blocks of its start can never take more collateral, so add margin before you post.

Closing a loan early#

If you hold the circulating unit of your own loan, you can extinguish it at any height, before or after maturity: Portfolio > Extinguish, or POST /sigmafi/zc/bonds/{assetId}/extinguish. All three units of the bond token burn, and the collateral and the fee reserve come back to you. You pay no repayment.

You get the unit by buying it, for example at a discount from an ask. Listings that sell a claim on your own loan carry borrowedByMe in the API and Your loan in the panel, with a Buy back action:

  • Buy the unit first, then extinguish from Portfolio or the bond's page.
  • A yield-priced ask reads the live bond while you buy, so the purchase and the extinguish are always two transactions.
  • If the bond was split into shares, buy all 100 shares, then use Un-fractionalize to get the unit back before extinguishing.

While the loan runs#

The following happen without you:

  • Refresh. After about two years (525,600 blocks), anyone may re-create the bond unchanged for a bounty of up to 0.01 ERG out of its value, so storage rent never reaches it. A refresh is not allowed in the 720 blocks before maturity, and it leaves you free to add collateral at once.
  • Liquidation. Batchers watch every loan and liquidate it the moment the rule allows. The fee reserve pays them.

Next steps#

  • Lending: what the other side of your loan does.
  • Trading bonds and shares: buying back a claim on your loan.
  • Pricing: how yield and window orders price the principal.
  • The Lithos client and panel: the panel views these actions live in.
Edit this page on GitHubsynced from 8d4d4d8
← PreviousSigmaFiNext →Lending
On this page
  • Posting an order
  • Choosing when the loan matures
  • Fixed or yield pricing
  • Choosing a liquidation rule
  • The fill guard
  • Before the order fills
  • When the order fills
  • Repaying
  • Adding collateral
  • Closing a loan early
  • While the loan runs
  • Next steps