For Lenders

This guide walks through lending on Amish. You set your terms, get matched with borrowers, and receive a tradeable debt token representing your position - with 100% of your capital earning yield.

Before you start

You need:

  • A connected wallet with principal assets (typically stablecoins)

  • One-time approval for Amish to access your principal tokens

Creating intents is gasless - you sign a message off-chain. The protocol executes loan activation on your behalf. You only pay gas for: approving tokens (once per asset) and redeeming your debt tokens after repayment.

The lending process

1. Create your intent

An intent describes what you want to lend and your terms:

// API: POST /lend/intents
{
  // What you offer to lend (can specify multiple)
  principals: [
    {
      chainId: 42161,                      // Arbitrum
      contractAddress: "0x...",            // USDC address
      amount: "100000000000"               // 100,000 USDC (6 decimals)
    }
  ],

  // What collateral you accept (can specify multiple)
  acceptedCollaterals: [
    { chainId: 1, contractAddress: "0x..." },      // WETH on Ethereum
    { chainId: 1, contractAddress: "0x..." }       // wBTC on Ethereum
  ],

  // Loan terms
  minLoanAmountUsd: "5000",               // Minimum $5,000 loan
  maxLtvBps: 8000,                        // Maximum 80% LTV
  minAprBps: 600,                         // Minimum 6% APR
  loanLifetime: 2592000,                  // 30 days in seconds

  // EIP-712 signature binding you to these terms
  signatureProof: {
    message: "...",
    signature: "0x..."
  }
}
Field
What to specify

principals

Which tokens you offer to lend, how much, and on which chain

acceptedCollaterals

Which tokens you accept as security

maxLtvBps

Highest loan-to-value you extend in basis points (8000 = 80%)

minAprBps

Lowest interest rate you require in basis points (600 = 6%)

loanLifetime

Duration in seconds (604800 = 7 days, 2592000 = 30 days)

Sign the intent with your wallet. Your capital stays in your wallet until a match forms.

2. Wait for a match

The matching engine looks for borrowers with compatible terms:

  • They offer collateral you accept

  • They want principal you offer

  • Your LTV and APR ranges overlap

  • Loan amounts meet both parties' minimums

When matched, you see the effective terms. The loan uses your maximum LTV and your minimum APR - protecting your position while giving the borrower the best rate you're willing to accept.

3. Transfer principal

After matching and after the borrower deposits collateral (verified for cross-chain loans), transfer your principal through the DebtIssuer contract.

4. Receive your debt token

When the loan activates, you receive an ERC-20 debt token representing your claim:

  • Token amount equals your principal

  • Token value increases as repayments come in

  • Tokens are transferable - sell anytime for liquidity

5. Redeem after repayment

When the borrower repays, redeem your debt tokens for principal plus interest.

Understanding debt tokens

Your debt token is an ERC-20 representing your claim on repayment.

Initial value: 1:1 with principal (10,000 USDC lent = 10,000 debt tokens)

After repayment: Value increases with interest. If the borrower repays 10,700 USDC, each token is worth 1.07 USDC.

Redemption: Burn tokens to receive your share of accrued funds at any time.

Transferability: Sell tokens on DEXs or transfer directly for immediate liquidity.

Partial fills

Your intent may match multiple borrowers. If you offer 100,000 USDC:

  • Borrower A matches for 30,000

  • Borrower B matches for 45,000

  • Borrower C matches for 25,000

You receive three separate debt tokens. Each loan has independent terms and health.

Understanding risk metrics

Every loan quote includes transparent risk metrics computed by the pricing engine:

P(Loss): The probability that you lose money on this loan. The system simulates thousands of price scenarios and counts how often collateral value drops enough that liquidation does not fully recover your principal.

E[PnL]: Expected profit/loss - the probability-weighted average outcome across all simulated scenarios. Positive means the loan is expected to be profitable on average.

VaR 99%: Value at Risk - the worst-case outcome in 99% of scenarios. Only 1% of simulated futures result in losses worse than this amount.

These metrics help you evaluate whether a loan's return justifies its risk. A loan with 8% APR but 5% P(Loss) may be less attractive than one with 6% APR and 0.5% P(Loss).

The pricing engine computes LTV dynamically based on current volatility and liquidity rather than using fixed per-asset limits. This provides more accurate risk assessment.

For more details, see Pricing and Risk.

Cross-chain lending

When lending cross-chain:

  1. Borrower deposits collateral on Chain A

  2. Storage proof verifies the deposit

  3. You transfer principal on Chain B

  4. Borrower receives principal on Chain B

Your principal and debt token stay on your chain. Collateral lives on the borrower's chain.

Managing your positions

Monitor borrower health

Watch the health of loans you fund:

Health
Status
Implication

Above 150%

Safe

Likely full repayment

110-150%

Warning

Monitor closely

Below 110%

Critical

Potential liquidation

Redemption strategies

After full repayment: Redeem all tokens for principal plus interest

Partial redemption: Take some profits while maintaining exposure

Before liquidation: If health looks bad, redeem what you can

Selling positions

Debt tokens are standard ERC-20s, enabling liquidity before repayment:

  • Transfer directly to a buyer

  • Sell on DEXs if liquidity exists

  • The buyer receives all future repayments

What happens at outcomes

Borrower repays

  1. Funds flow to debt contract

  2. Price per token increases

  3. Redeem tokens for principal plus interest

Borrower defaults

  1. Loan expires without repayment

  2. Collateral is seized and sold

  3. Proceeds go to debt contract

  4. Redeem tokens for whatever was recovered

Position liquidates

  1. Collateral value dropped

  2. Liquidator seized and sold collateral

  3. Proceeds minus liquidation bonus go to debt contract

  4. Redeem tokens for proceeds

Liquidation and default may return less than full principal plus interest.

Last updated