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,// ArbitrumcontractAddress:"0x...",// USDC addressamount:"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 termsminLoanAmountUsd:"5000",// Minimum $5,000 loanmaxLtvBps:8000,// Maximum 80% LTVminAprBps:600,// Minimum 6% APRloanLifetime:2592000,// 30 days in seconds // EIP-712 signature binding you to these termssignatureProof:{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%)
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.