Learn how to use marginfi on Solana: supply, borrow, e-mode for correlated assets, borrow against staked SOL (LSTs), liquidation rules, PWA access, and SDKs for builders.

About marginfi
marginfi is a Solana-native, overcollateralized lending and borrowing protocol. It lets you supply assets to earn variable yield and borrow against your deposits using a transparent, on-chain risk engine. Positions are contained within a single “mrgnlend” account, which continuously computes your account health based on live oracle prices and collateral factors. This structure makes marginfi useful for Solana traders who need fast, low-fee leverage, as well as long-term holders who want to put idle tokens to work.
At its core, marginfi plugs into Solana’s performance to deliver instant, non-custodial actions: deposit, borrow, repay, and withdraw. Variable interest rates are determined by an interest-rate model per asset (“bank”), and liquidation rules are public and predictable. If the value of your collateral falls (or your borrow grows) enough to breach the configured thresholds, liquidators can reduce your debt in exchange for a small penalty on the repaid amount.
marginfi runs audited programs on Solana, including the marginfi-v2
lending program and an optional Liquidity Incentive Program that is separate from the core lending product. The marginfi-v2
program has been audited by Ottersec, with fuzz tests and continuous monitoring layered on top.
marginfi Features
Solana traders often need clear tools rather than buzzwords. marginfi focuses on a few practical, verifiable capabilities you can use right away.
Borrow against staked assets
Use LSTs as collateral to unlock liquidity while keeping staked exposure, per-asset risk limits apply.
Secure and non‑custodial
This tool never accesses private keys—transactions are signed through your wallet.
Referral Program
Earn rewards by inviting other users.
What makes marginfi special?
marginfi distinguishes itself with a clean, measurable risk framework and thoughtful quality-of-life features for Solana users.
Clear risk controls and design transparency. The protocol openly documents how it prices risk (e.g., interest-rate curves per “bank”), how account health is computed, and what happens during liquidation. This helps traders reason about leverage rather than guess.
e-mode for correlated assets. Many Solana users hold SOL or SOL-adjacent assets like LSTs. e-mode focuses on these correlations, allowing more efficient borrowing when the collateral and debt are in the same risk bucket.
Staked collateral, explained step-by-step. Instead of forcing you to unwind staked positions, marginfi provides a guide to using LSTs as collateral—useful for anyone who wants to keep staking yield while accessing liquidity.
Audited core with additional programs cataloged. The
marginfi-v2
program is audited by Ottersec, and the docs clearly separate the core lending product from other programs like the Liquidity Incentive Program. This separation reduces confusion between lending and any incentives infrastructure.Builder-first tooling. The official SDKs cover the full lifecycle—create an account, fetch a bank, deposit, borrow, simulate, and even “loop” actions—so teams can embed lending flows in trading terminals or strategy bots.
Pricing
Discover the pricing options available for marginfi
Using marginfi is free; there are no upfront costs to participate in the protocol.
Users can lend, borrow, and engage in platform activities without any initial financial investment.
How to get started
Getting started only takes a few minutes. The steps below assume you already have a Solana wallet and some SOL for fees.
Launch the app
Open the marginfi app from your browser. From here you’ll see asset “banks,” APYs, and a prompt to connect a wallet.
Connect a Solana wallet
Connect a supported wallet through the standard wallet adapter. On mobile, you can also open marginfi inside a wallet’s in-app browser; the PWA guide shows the flow and home-screen install option.
Deposit collateral
Choose a supported asset and deposit the amount you want to post as collateral. Your account health will update immediately after the transaction confirms.
(Optional) Enable e-mode
If your intended borrow asset is closely correlated to your collateral, enable e-mode to use the e-mode parameters for that asset bucket.
Borrow and manage risk
Borrow the target asset. Keep an eye on utilization, interest, and your health factor. If markets move against you, repay or add collateral to avoid liquidation (which carries a 5% penalty on the repaid amount).
Pro Tips
If you’re on mobile, install the PWA and use a wallet’s in-app browser (e.g., Phantom) to keep a fast, app-like entry point on your home screen.
Builders can integrate directly with the TypeScript SDK to automate deposit/borrow/repay flows or to simulate loops before executing them in production.
Frequently Asked Questions
Get answers to the most common questions about this tool
What is marginfi?
It’s an overcollateralized lending protocol on Solana. You supply tokens to earn yield and can borrow other tokens against your deposits, subject to risk limits and live account health tracking.
How does marginfi work?
Users can deposit assets into marginfi's lending pools to earn interest or use them as collateral to borrow other assets. The platform aggregates liquidity from multiple sources, providing competitive rates for both lenders and borrowers.
Does marginfi offer leverage trading?
Yes, marginfi allows users to engage in leverage trading by borrowing assets against their collateral, enabling traders to amplify their exposure and potential returns.
What is the MRGN token?
The MRGN token is marginfi's governance token, granting holders the ability to participate in decision-making processes and influence the platform's future developments.