NestDocs
Stake nUSD

Stake nUSD

Calculate snUSD conversion rates and move between nUSD and snUSD in one transaction.

snUSD is a six-decimal share token representing a pro-rata claim on the nUSD accounted by the staking pool. It is not a rebasing token and should not be displayed as permanently equal to one nUSD.

nUSD → stake with minimum shares → snUSD
snUSD → unstake with minimum net nUSD → burn exit fee → nUSD

ActionGuide
Quote shares and stake nUSDConvert nUSD into snUSD
Quote net value and unstake immediatelyConvert snUSD into nUSD

Conversion rates

The entry and exit calculations use the current staking-pool accounts:

redeemable assets = max(stakingVaultNusd - reservedPendingClaims, 0)
pending revenue = max(revenue vault balance - revenueBaselineNusd, 0)
entry assets = redeemable assets + pending revenue

quoted snUSD = nUSD input × totalShares / entry assets
gross nUSD exit = snUSD shares × redeemable assets / totalShares
exit fee = round up(gross nUSD exit × target APR × 1 day / 1 year)
net nUSD exit = gross nUSD exit - exit fee

If totalShares is zero, the first stake mints shares 1:1, subject to the protocol's minimum initial stake. The stake instruction checkpoints target revenue before calculating final shares, so always use minSharesOut.

Immediate exits

unstake completes the entire exit atomically. It burns the owner's snUSD, burns the fee amount of nUSD from the staking vault, and transfers the net nUSD to the owner. There is no request PDA, cooldown, claim window, or later claim transaction.

The fee is always one day of the current on-chain target APR. At a target APR of 6%, it is approximately 0.01644% of the gross exit value. It is charged on every unstake, including an exit immediately after staking, and is burned rather than routed to another account.

Both stake and unstake checkpoint protocol target revenue, reject while staking is paused or protocol bad debt is outstanding, and enforce the user's minimum-output argument on-chain.

Legacy account field

cooldownSeconds remains in the staking-state account to preserve the deployed account layout. It has no role in the current unstake flow.

On this page