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
xStocksXsoC…DF2WD1xj…drqm6tL1…XCys870%80%pyth-lazer
QQQx
QQQx
xStocksXs8S…mWHZ5KaX…UFKA7tcP…6ptS860%70%pyth-lazer
AAPLx
AAPLx
xStocksXsbE…JzJp2s5n…po1J7u7F…w71a850%60%pyth-lazer
GOOGLx
GOOGLx
xStocksXsCP…q6aN7CJE…bn651XrA…6SCR850%60%pyth-lazer
METAx
METAx
xStocksXsa6…o5ZuDyfT…jwUK5Tnk…Z2oZ850%60%pyth-lazer
NVDAx
NVDAx
xStocksXsc9…9qEh2U7G…H6CzBgjD…LSyf850%60%pyth-lazer
TSLAx
TSLAx
xStocksXsDo…HzoBC24f…kgXtXuMD…hvPV850%60%pyth-lazer
COINx
COINx
xStocksXs7Z…PxNuE9Cy…WAEN4sVw…Ns3U850%60%pyth-lazer
CRCLx
CRCLx
xStocksXsue…3bd1Giy4…QXrwGFwm…Ai3G850%60%pyth-lazer
SPCXx
SPCXx
xStocksXs3o…qpH8G8we…B7jNzUVg…4Cqw850%60%pyth-lazer
SPCX
SPCXbp
BackpackSPCX…imGb6QUv…Gyvx5xmg…WpaG650%60%pyth-lazer
MU
MU
BackpackMUxE…Gay1J8hc…sMeCFLfD…KXRc640%50%jupiter-signed
SNDK
SNDK
BackpackSNDK…RhfHHXpV…xvcQ5VU7…ofNP640%50%jupiter-signed
DRAM
DRAM
BackpackDRAM…Y4Cw3oPc…Hw8w3b7V…Rpv3640%50%jupiter-signed
SPYon
SPYon
Ondok18W…ondoE4ZH…WZ9qHzhV…uJvS970%80%jupiter-signed
QQQon
QQQon
OndoHrYN…ondoFKDn…oGyWFkrc…3oxr960%70%jupiter-signed
BOT
BOT
BackpackBoTx…6d8T7jKL…YP91BNC7…Gg7C640%50%jupiter-signed
SKHY
SKHY
BackpackSKHY…9EQ386uK…Jgnj3KnB…ms4x640%50%jupiter-signed
HOOD
HOOD
BackpackHooD…3e9A8JG2…7ijMHLvi…Vk9N640%50%jupiter-signed
INTC
INTC
BackpackiNTC…xFaFGbbP…iR5x4Qs9…nheE640%50%jupiter-signed
SOL
SOL
SolanaSo11…1112HGgE…2DJx3BkA…o9Xk950%65%pyth-lazer
JitoSOL
JitoSOL
JitoJ1to…GCPnA4Tj…i7v98vA5…w5iL950%65%pyth-lazer
MSTR
MSTR
BackpackMSTR…U7NzJADC…fJdZ7wWt…SP9Y640%50%jupiter-signed
TTWO
TTWO
BackpackTTWo…FbKoFfXx…EeCC3zWw…86sR640%50%jupiter-signed
SILV
SILV
DominionSiLV…B35LHnSb…aeKW6toV…V97r660%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