Appearance
Lending
Users borrow a coin by locking another coin as collateral. You set up a pool for each coin users can borrow (limits, terms, rates), and choose which coins can be locked as collateral and how much.
Turning lending on
The Lending section and pages appear only when it's enabled in .env:
ini
LENDING_ENABLED=true
Pools
One pool per coin users can borrow. Click Add a lending pool.
| Field | Meaning |
|---|---|
| Coin | What users borrow (one pool per coin) |
| Status | Whether users can borrow from it |
| Smallest loan / Largest loan | Per loan |
| Loan terms | Turn on the terms users can choose. Fixed terms are repaid after 7 or 30 days. Flexible loans can be repaid any time. Turn on at least one term, otherwise users can't borrow. |
| Yearly rate | Interest per year, for each term |
The What borrowers see panel previews the pool.
Delete pool: users can no longer borrow this coin.
Collateral
Under each pool's Collaterals, choose the coins users can lock to borrow, and the LTV ladder for each.
Loan-to-value (LTV) = loan value ÷ collateral value. It rises when the collateral's price falls.
| Field | Meaning | Typical |
|---|---|---|
| Initial LTV | The most a user can borrow against the collateral when opening a loan | 65% |
| Margin call | At this LTV the user is emailed a warning to add collateral or repay | 80% |
| Liquidation | At this LTV the loan is liquidated: it's closed, the collateral is kept to cover it, and the user is emailed | 90% |
The three values must rise: initial < margin call < liquidation. Riskier coins need a lower initial LTV, so a price drop doesn't reach liquidation too fast.
Example
With an initial LTV of 65%, locking 1,000 USDT worth of BTC lets a user borrow up to 650 USDT. If BTC falls until the loan is 80% of the collateral value, the user gets a margin call email. At 90%, the loan is liquidated.
Remove collateral: users can no longer lock that coin.
What runs automatically
| Task | How often |
|---|---|
| Check every loan's LTV, send margin calls and liquidate | Every minute |
| Charge interest on open loans | Every hour |
Hourly interest = remaining debt × yearly rate ÷ 365 ÷ 24. It is converted into the collateral coin at current USD prices and deducted from the loan's collateral (never more than the collateral left). See Lending → Interest.
Loans are listed in Reports → Lending.
