NestDocs
Borrow nUSD

Borrow nUSD

Deposit collateral, mint nUSD, calculate debt and position health, repay debt, and withdraw collateral.

One Nest borrow position is identified by:

owner wallet + collateral config -> vault PDA

The same wallet can have independent positions in multiple supported markets. Debt and collateral are not pooled across those positions.

  1. deposit collateral → 2. refresh oracle + mint nUSD → 3. monitor debt and health
  2. repay nUSD → 5. refresh oracle + withdraw collateral

Supported collateral

Do not route by a ticker alone. Match the exact market symbol, collateral mint, configuration PDA, custody vault, token program, and decimals.

MarketIssuerMintMarket configCustody vaultDecimalsBorrow LTVLiquidationOracle
SPYx
SPYx
xStocksXsoCDF2WD1xjdrqm6tL1XCys870%80%pyth-lazer
QQQx
QQQx
xStocksXs8SmWHZ5KaXUFKA7tcP6ptS860%70%pyth-lazer
AAPLx
AAPLx
xStocksXsbEJzJp2s5npo1J7u7Fw71a850%60%pyth-lazer
GOOGLx
GOOGLx
xStocksXsCPq6aN7CJEbn651XrA6SCR850%60%pyth-lazer
METAx
METAx
xStocksXsa6o5ZuDyfTjwUK5TnkZ2oZ850%60%pyth-lazer
NVDAx
NVDAx
xStocksXsc99qEh2U7GH6CzBgjDLSyf850%60%pyth-lazer
TSLAx
TSLAx
xStocksXsDoHzoBC24fkgXtXuMDhvPV850%60%pyth-lazer
COINx
COINx
xStocksXs7ZPxNuE9CyWAEN4sVwNs3U850%60%pyth-lazer
CRCLx
CRCLx
xStocksXsue3bd1Giy4QXrwGFwmAi3G850%60%pyth-lazer
SPCXx
SPCXx
xStocksXs3oqpH8G8weB7jNzUVg4Cqw850%60%pyth-lazer
SPCX
SPCXbp
BackpackSPCXimGb6QUvGyvx5xmgWpaG650%60%pyth-lazer
MU
MU
BackpackMUxEGay1J8hcsMeCFLfDKXRc640%50%jupiter-signed
SNDK
SNDK
BackpackSNDKRhfHHXpVxvcQ5VU7ofNP640%50%jupiter-signed
DRAM
DRAM
BackpackDRAMY4Cw3oPcHw8w3b7VRpv3640%50%jupiter-signed
SPYon
SPYon
Ondok18WondoE4ZHWZ9qHzhVuJvS970%80%jupiter-signed
QQQon
QQQon
OndoHrYNondoFKDnoGyWFkrc3oxr960%70%jupiter-signed
BOT
BOT
BackpackBoTx6d8T7jKLYP91BNC7Gg7C640%50%jupiter-signed
SKHY
SKHY
BackpackSKHY9EQ386uKJgnj3KnBms4x640%50%jupiter-signed
HOOD
HOOD
BackpackHooD3e9A8JG27ijMHLviVk9N640%50%jupiter-signed
INTC
INTC
BackpackiNTCxFaFGbbPiR5x4Qs9nheE640%50%jupiter-signed
SOL
SOL
SolanaSo111112HGgE2DJx3BkAo9Xk950%65%pyth-lazer
JitoSOL
JitoSOL
JitoJ1toGCPnA4Tji7v98vA5w5iL950%65%pyth-lazer
MSTR
MSTR
BackpackMSTRU7NzJADCfJdZ7wWtSP9Y640%50%jupiter-signed
TTWO
TTWO
BackpackTTWoFbKoFfXxEeCC3zWw86sR640%50%jupiter-signed
SILV
SILV
DominionSiLVB35LHnSbaeKW6toVV97r660%70%jupiter-signed

Borrowing workflow

StepGuideRequires a fresh oracle update?
Open a position and transfer collateralDeposit collateralNo
Borrow nUSDMint nUSDYes, atomically
Display riskPosition healthRead current price
Display current debtAccrued stability feesNo
Reduce or close debtRepay debtNo
Release collateralWithdraw collateralYes while debt remains

Position state

The vault stores:

type BorrowVault = {
  owner: PublicKey;
  collateralConfig: PublicKey;
  collateralRaw: BN;   // collateral mint base units
  principalDebt: BN;   // six-decimal nUSD base units
  accruedFee: BN;      // six-decimal nUSD base units
  lastAccrualTs: BN;   // Unix seconds
};

The stored debt is principalDebt + accruedFee. Before minting, repaying, or withdrawing, the program first accrues fees to the transaction's on-chain clock. Therefore, a wallet read is a snapshot and applications should project the additional fee since lastAccrualTs.

Collateral custody

A deposit moves tokens into the market's canonical collateral vault. The user's position PDA records the deposited amount. An integrating application does not receive or hold the user's collateral or nUSD.

On this page