Lending on SigmaFi
Filling SigmaFi orders, posting standing lend offers with yield curves, liquidating, and claiming when a loan ends.
This page covers the lender's side: filling one order yourself, posting a lend offer that buys loans for you, and getting paid when a loan ends. Buying existing bonds and shares from other holders is on Trading bonds and shares. The yield maths is on Pricing.
Two ways to lend#
You can lend in either of the following ways:
| Way | You choose | Who runs it |
|---|---|---|
| Fill an order | One specific order, now | You, from your wallet |
| Post a lend offer | The yields you accept at each maturity, and the risk you accept | Batchers, whenever an order or ask meets your terms, while you are offline |
Either way you end up holding the loan's circulating unit, or shares of it.
Filling an order#
Pick an order in the panel's Market view and fill it from the order ticket, or call
POST /sigmafi/zc/orders/{boxId}/fill/check then POST /sigmafi/zc/orders/{boxId}/fill. A fill does
the following:
- Pays the principal to the borrower, from your wallet.
- Adds the fee reserve to the bond: ERG that pays whoever liquidates the loan, and comes back to the vault if the loan is repaid. It is at least 0.05 ERG, which is also the default.
- Mints the bond token. One unit, named
ZCS-Bond-Unit-and the first six characters of its id, comes to your wallet. Two stay locked with the bond.
A fill takes the following options:
| Option | What it sets |
|---|---|
maturity | Window orders only: the maturity you pick inside the borrower's window. Default the earliest multiple of 21,600 blocks in it, else the window's shortest maturity |
reserveNanoErg | The fee reserve, at least 50000000 nanoERG (0.05 ERG) |
allowLiquidatable | Fill even though the new bond would start under its own oracle ratio. Off by default, and a fill guard can never be overridden |
A yield-priced order is quoted at the most it asks over the next 3 blocks, because your fill lands at a later height and the price can move either way. The bond records what you actually paid.
The client refuses a fill that the order's fill guard would refuse, and a fill that would start a bond already liquidatable under its own oracle rule. In that second case the right move is to wait, since anyone could liquidate the new bond at once.
Posting a lend offer#
A lend offer holds your capital in a box and buys whatever loans meet your terms, at any time, while you
are offline. Batchers do the buying and earn a fee you set per fill. In the panel use Create > Lend.
Through the API call POST /sigmafi/zc/offers/check then POST /sigmafi/zc/offers.
An offer has the following terms:
| Term | What it sets |
|---|---|
| Capital | What the offer may spend, in the market's currency |
| Minimum yield | The least yield the offer ever accepts, in basis points per 262,800 blocks |
| Curve | Up to 20 points of (blocks left to maturity, yield). Between points the yield it requires is on the straight line, beyond the ends it is flat, and never below the minimum |
| Maturity window | The fewest and most blocks to maturity it buys. Default 1 to 262,800 |
| Collateral floor | The least cover, in percent of the repayment, a bond must have when bought |
| Oracle age | The oldest oracle the offer trusts for that check. Default 30 blocks. A bond's own rule must allow an oracle at least this old |
| Fee reserve | The reserve each new bond it creates gets. Default 0.05 ERG |
| Batcher fee | ERG offers: what each fill pays the batcher, at least 0.002 ERG. Default 0.005 ERG |
| SigUSD funding | SigUSD offers: ERG carried for fees (default 0.5 ERG), the least fill (default 1% of the capital) and a total reward budget (default 0.2 ERG) |
| Share bounds | Whether it buys shares, and the least auction floor and longest auction expiry it accepts. Left out, it buys no shares |
| Delivery | Where a bought bond unit goes: to you, or into a Selective or Dutch share mint so you receive shares instead |
| Expiry | From then, anyone may return the remaining capital to you for one batcher fee. Default 5,040 blocks |
An offer buys only loans with the oracle liquidation rule, because it measures cover at the oracle price. The bond's own rule must fire at or above your collateral floor, and the collateral must be worth the floor when bought.
What an offer buys#
An offer can buy from three kinds of source:
- New loans. It fills an open order directly. One new loan per transaction.
- Existing bond units from any ask, after checking on chain that the unit is a genuine bond token and that the loan is still live.
- Shares from any ask, only Selective or Dutch shares whose auction terms clear your share bounds.
For each candidate the offer runs its yield test: the price, plus the batcher fee on an ERG offer, must earn at least the yield your curve requires at the bond's blocks left. A bought loan never earns less than your curve. The formula is in Pricing.
Which loans a batcher matches first#
Batchers that follow zcs1 match in one fixed order, so every batcher picks the same trades:
- Offers go first by the largest batcher reward still left.
- Each offer takes the order or ask that gives it the highest yield.
- Ties go to the lower box id.
Nothing on chain enforces best execution. A batcher may route through any ask your offer accepts, but your offer still never pays more than its curve allows.
Changing or ending an offer#
An offer cannot be edited. Cancel it and post a new one: Portfolio > Cancel, or
POST /sigmafi/zc/boxes/{boxId}/cancel. After its expiry anyone may return the rest of the capital to
you.
When a loan ends#
A loan ends with a repayment or a liquidation, and in both cases the money goes to the bond's vault.
Whoever holds the circulating unit then claims the vault: Portfolio > Claim, or
POST /sigmafi/zc/claims/{tokenId} with the unit's token id. The claim burns all three units and pays
you everything in the vault.
| How the loan ended | The vault holds |
|---|---|
| Repaid | The repayment, plus the fee reserve back |
| Liquidated | All the collateral, ERG and tokens. The fee reserve paid the liquidator |
A liquidation pays you in kind: you receive the collateral tokens themselves. To turn them back into the loan's currency, sell them in a lot auction.
Liquidating a loan yourself#
Anyone may liquidate a loan once its rule allows: Portfolio or the bond's page, or
POST /sigmafi/zc/bonds/{assetId}/liquidate. The liquidator keeps the fee reserve, less the miner fee.
If you hold the loan, liquidating it yourself keeps that reserve too. Batchers liquidate due loans
quickly, so you usually only claim.
Risks a lender takes#
The following risks are yours:
- The collateral may be worth less than the repayment. A maturity-rule loan is never liquidated early, whatever happens to the price. An oracle loan is liquidated below its ratio, but a fast price move can still pass the ratio before a liquidation lands.
- Tokens no one prices. Collateral tokens other than ERG and SigUSD add nothing to the oracle cover, and may be hard to sell after a liquidation.
- Fake tokens. A token can carry any name. Buy only units and shares whose origin the client proves, which the Lithos panel shows for every listing.
- A yield is conditional. It assumes full repayment. It is not a valuation of the collateral.
Next steps#
- Trading bonds and shares: selling your unit before maturity, or splitting it into shares.
- Borrowing: what the borrower can do with the loan you funded.
- Pricing: the offer's yield test and curve.
- The Lithos client and panel: how your client batches offers for everyone.