What is RainFi?
RainFi is a decentralized lending protocol that provides:- Instant loans with crypto collateral
- Competitive interest rates
- Multiple currency support (SOL, USDC, USDT, etc.)
- Flexible loan durations
- No credit checks required
RainFi uses a pool-based lending model where liquidity providers supply assets that borrowers can access against collateral.
How lending works
Review terms
Check loan parameters:
- Interest rate and APR
- Loan duration
- Collateral required
- Liquidation threshold
Execute loan
Confirm and sign the transaction. Your collateral is locked and borrowed funds are received.
Getting a loan quote
Request quote with AI agent
Use natural language to get loan quotes:Supported commands
The AI agent recognizes:- “quote loan calculator”
- “calculate loan”
- “get loan quote”
- “loan quote calculator”
Quote implementation
Here’s how loan quotes work:Quote parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amountIn | number | Yes | Amount to borrow in smallest units (lamports) |
currencyIn | string | Yes | Collateral currency address |
currencyOut | string | Yes | Borrow currency address |
borrower | string | Yes | Your wallet address (auto-filled) |
Quote response
A successful quote includes:Executing a loan
Once you have a quote, execute the loan transaction.Build and execute loan
Use the AI agent with loan parameters:Loan execution implementation
Transaction parameters
| Parameter | Type | Description |
|---|---|---|
borrower | string | Wallet address (auto-filled) |
amountIn | number | Collateral amount in lamports |
currencyIn | string | Collateral token address |
currencyOut | string | Borrow token address |
simulation | object | Loan simulation from quote |
slippage | number | Slippage tolerance (BPS) |
options | object | Transaction fee options |
Transaction options
Use “fast” priority for time-sensitive loans or during high network congestion. This costs more in fees but ensures faster execution.
Managing active loans
View your loans
Check all your active loans:Get loans implementation
Loan details
Each loan includes:Repaying loans
Repay with AI agent
Use natural language to repay:Repayment implementation
Repayment parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
borrower | string | Yes | Your wallet address |
amountIn | number | Yes | Repayment amount (lamports) |
loan | string | Yes | Loan address to repay |
options | object | Yes | Transaction options |
Understanding loan parameters
Interest rates
Interest is calculated based on:- Loan duration
- Pool APR
- Collateral type
- Borrowed asset
- Pool liquidity
APR examples
Liquidation threshold
Liquidation occurs when:Loan strategies
Conservative borrowing
- Risk-averse users
- Volatile market conditions
- First-time borrowers
Moderate borrowing
- Regular users
- Stable market conditions
- Temporary liquidity needs
Aggressive borrowing
- Experienced users
- Bullish market outlook
- Leveraged strategies
Pool conditions
Each lending pool has specific conditions:Currency support
Pools support multiple currencies with different parameters:Different collateral types have different LTV ratios. Stablecoins typically have higher LTV than volatile assets.
Fees and costs
Loan origination
- Network fee: ~0.00001 SOL
- Priority fee: Variable (0.00001-0.01 SOL)
- Rain protocol fee: Included in simulation
- No origination fee: RainFi doesn’t charge extra fees
During loan
- Interest: Based on APR and duration
- No maintenance fees: Pay only at repayment
Repayment
- Principal: Original borrowed amount
- Interest: Accumulated interest
- Network fee: Transaction fee to repay
- No prepayment penalty: Repay early without penalty
Example cost breakdown
Best practices
Before borrowing
Before borrowing
- ✅ Understand loan terms fully
- ✅ Check current interest rates
- ✅ Calculate liquidation price
- ✅ Ensure sufficient repayment funds
- ✅ Start with smaller loans to learn
- ✅ Monitor market volatility
During loan period
During loan period
- ✅ Monitor collateral value daily
- ✅ Track expiration date
- ✅ Keep repayment funds ready
- ✅ Watch for liquidation warnings
- ✅ Add collateral if needed
- ✅ Consider early repayment
Managing risk
Managing risk
- ✅ Maintain healthy LTV ratio
- ✅ Use conservative leverage
- ✅ Set price alerts
- ✅ Have emergency repayment plan
- ✅ Don’t max out borrowing capacity
- ✅ Diversify collateral types
Troubleshooting
Quote request failed
Quote request failed
Common issues:
- Invalid currency addresses
- Amount below minimum
- Pool liquidity insufficient
- Authorization issues
- Verify token addresses
- Check minimum loan amounts
- Try different pools
- Get fresh authorization
Loan transaction failed
Loan transaction failed
Possible causes:
- Quote expired (authorization timeout)
- Insufficient collateral
- Network congestion
- Insufficient SOL for fees
- Get new quote immediately
- Increase collateral amount
- Use higher priority fee
- Ensure adequate SOL balance
Cannot repay loan
Cannot repay loan
Issues preventing repayment:
- Insufficient repayment token balance
- Invalid loan address
- Loan already repaid
- Network issues
- Check token balance for principal + interest
- Verify correct loan address
- Check loan status first
- Try again with higher fees
Risk of liquidation
Risk of liquidation
If approaching liquidation:
- Monitor collateral ratio closely
- Prepare to add more collateral
- Consider partial repayment
- Have emergency repayment ready
- Use conservative LTV
- Set price alerts
- Monitor market regularly
Security considerations
- ✅ RainFi is a smart contract protocol - understand the risks
- ✅ Only borrow what you can afford to repay
- ✅ Monitor collateral prices during volatile markets
- ✅ Set calendar reminders for loan expiration
- ✅ Keep extra funds for emergency repayment
- ⚠️ Liquidations are automatic and irreversible
- ⚠️ Price oracles may have delays during extreme volatility
Related resources
Token operations
Manage tokens for loan collateral and repayment
Swapping tokens
Swap to get needed currencies
DeFi operations
Overview of all DeFi features
Staking
Use liquid staked tokens as collateral