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.
Borrow nUSD
Open and manage a collateralized nUSD debt position.
Convert USDC
Convert between USDC and nUSD through the Peg Stability Module.
Stake nUSD
Convert nUSD into snUSD shares and redeem snUSD after the cooldown.
Integration workflows
- Configure the shared client in Project setup.
- Select the relevant workflow below.
- Read current accounts, calculate the quote, simulate the transaction, and verify the resulting state after confirmation.
| Operation | Documentation |
|---|---|
| Borrow nUSD against a supported token | Borrow nUSD |
| Convert USDC into nUSD | USDC → nUSD |
| Redeem nUSD for USDC | nUSD → USDC |
| Convert nUSD into snUSD | nUSD → snUSD |
| Convert snUSD back into nUSD | snUSD → nUSD |
| Read positions without building a transaction | On-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.