Flash loans are one of the most powerful — and most misunderstood — features in DeFi. They let you borrow millions of dollars with zero collateral, use the funds for any purpose, and repay everything within a single transaction. If the loan isn't repaid, the entire transaction reverts as if it never happened.
On Solana, flash loans execute in milliseconds rather than seconds, opening up opportunities and risks that don't exist on slower chains. This guide explains how they work, who uses them, and why every Solana DeFi user should understand the concept — even if you never use one directly.
A flash loan is an uncollateralized loan that must be borrowed and repaid within a single atomic transaction. "Atomic" means the entire transaction either succeeds completely or fails completely — there's no in-between state where the lender has given out funds without getting them back.
How It Works (Simplified)
- You initiate a transaction that borrows $1,000,000 USDC from a lending protocol
- Within the same transaction, you use that $1M however you want (swap, liquidate, arbitrage)
- At the end of the transaction, you repay the $1M plus a small fee
- If step 3 fails (you can't repay), the entire transaction — including step 1 — reverts
The lender faces zero risk because the loan either gets repaid or it never happened. This is why no collateral is required.
Flash Loans vs Traditional Borrowing
| Aspect | Flash Loan | Traditional DeFi Loan |
|---|
| Collateral required | None | 100-150%+ of loan value |
| Duration | Single transaction (~400ms on Solana) | Open-ended |
| Maximum amount | Up to the protocol's total liquidity | Limited by your collateral |
| Interest | Small flat fee | Ongoing variable rate |
| Risk to lender | Zero (atomic repayment) | Liquidation risk |
| Accessibility | Requires technical knowledge | Any user via UI |
Flash Loan Protocols on Solana
Save (formerly Solend)
Save (previously known as Solend) is one of the original Solana lending protocols and supports flash loans. Developers can borrow up to the total available liquidity in any Save pool within a single transaction.
Flash loan fee: Typically 0.01-0.3% of the borrowed amount (varies by pool).
Marginfi offers flash loan functionality through its lending protocol. As one of Solana's largest lending platforms, it provides access to significant liquidity pools.
Kamino Finance supports flash loans through its lending markets. Kamino's integration with automated yield strategies means flash loans can interact with concentrated liquidity positions and other complex DeFi operations.
Primary Use Cases
1. Arbitrage
The most common flash loan use case is arbitrage — exploiting price differences between venues.
Example: SOL is priced at $155.00 on Raydium but $155.50 on another DEX. A flash loan lets you:
- Borrow 10,000 USDC via flash loan
- Buy ~64.5 SOL on Raydium at $155.00
- Sell 64.5 SOL on the other DEX at $155.50
- Receive 10,004.75 USDC
- Repay the 10,000 USDC loan + fee
- Pocket the profit (~$4.50 minus fees)
Without a flash loan, you'd need $10,000 of your own capital to execute this trade. With a flash loan, you need effectively $0 in capital — just enough SOL to pay the transaction fee.
Important reality check: Simple two-venue arbitrage like this is extremely competitive. Professional MEV bots and searchers execute these trades in milliseconds. Retail traders are unlikely to find profitable simple arb opportunities. The real money is in more complex multi-hop arbitrage paths.
2. Liquidations
When a borrower's collateral falls below the required ratio on lending protocols, their position can be liquidated. Flash loans enable liquidators to operate without capital:
- Flash borrow the repayment token
- Repay the borrower's debt (which triggers liquidation)
- Receive the borrower's discounted collateral
- Sell the collateral for more than the repayment amount
- Repay the flash loan
- Keep the liquidation bonus
On Solana, liquidation bots powered by flash loans help keep lending protocols like Marginfi and Kamino solvent by quickly clearing undercollateralized positions. If you're a borrower rather than a liquidator, our guide to avoiding liquidation on Solana DeFi covers the health-factor monitoring and LTV discipline that keeps you off the other end of this trade.
3. Collateral Swaps
Want to switch your lending collateral from SOL to USDC without closing your position? Flash loans make this possible in one transaction:
- Flash borrow enough to repay your debt
- Repay your debt and free your SOL collateral
- Swap SOL to USDC on Jupiter
- Deposit USDC as new collateral
- Borrow again to repay the flash loan
Without flash loans, you'd need extra capital or would have to close and reopen your position (potentially missing out on your borrowing rate or triggering tax events).
4. Self-Liquidation
If your lending position is approaching liquidation and you want to deleverage:
- Flash borrow the debt token
- Repay part (or all) of your debt
- Withdraw freed collateral
- Sell collateral for the debt token
- Repay the flash loan
This lets you manage your position efficiently without needing spare capital.
5. Yield Strategy Optimization
Some yield strategies use flash loans to amplify returns:
- Flash borrow USDC
- Deposit into a yield protocol
- Borrow against the deposit
- Use the borrowed funds to repay the flash loan
- Result: A leveraged yield position created in a single transaction
This is essentially looping (depositing, borrowing, depositing again) compressed into one atomic operation.