NestDevelopers

Build on Nest

Technical documentation and TypeScript examples for integrating Nest on Solana.

Nest consists of Solana programs for collateralized nUSD borrowing, USDC and nUSD conversion, and snUSD staking. An integration builds a transaction, the user's wallet signs it, and the programs validate the accounts and protocol constraints on-chain.

Integration workflows

  1. Configure the shared client in Project setup.
  2. Select the relevant workflow below.
  3. Read current accounts, calculate the quote, simulate the transaction, and verify the resulting state after confirmation.
OperationDocumentation
Borrow nUSD against a supported tokenBorrow nUSD
Convert USDC into nUSDUSDC → nUSD
Redeem nUSD for USDCnUSD → USDC
Convert nUSD into snUSDnUSD → snUSD
Convert snUSD back into nUSDsnUSD → nUSD
Read positions without building a transactionOn-chain queries

Mainnet safety

Pin a reviewed deployment manifest, use a trusted Solana RPC, simulate each transaction, and use the connected wallet as the signer. The integration should not request or handle the user's private key.

Product accounting

These products share nUSD, but they do not share accounting:

  • Borrowing creates a debt position tied to one owner and one collateral market. Stability fees accrue until repayment.
  • PSM conversion exchanges USDC and nUSD. It does not open or repay a debt position.
  • Staking exchanges nUSD for snUSD shares. snUSD is not a rebasing balance; its nUSD value changes through share-price accounting.