Skip to main content
Staking is one transaction. Leaving is two, with a 30-day wait in between. This page describes how the contract behaves, so your app shows customers exactly what will happen.

Stake

stake(assets) takes USDh from the caller and mints sUSDh to the same address at the current sUSDh price.

Unstake

1

Ask to unstake

requestUnstake(shares) burns the customer’s sUSDh at once. The USDh they will receive is fixed at the sUSDh price at that moment. From then on, that amount no longer earns rewards.
2

Wait 30 days

The exit waits for the exit period. Read the exact time it ends from the contract rather than calculating it yourself: pendingExit(customer) returns the sUSDh waiting and availableAt, the time the exit can be claimed.
3

Claim

After availableAt, claim() sends the USDh to the customer. Nothing is sent automatically. Your app must show a claim button.

Three behaviors to design around

A customer can have one pending exit at a time. If they ask to unstake more while waiting, both amounts are combined at an average price, and the full wait starts again for the total. Warn customers before they do this.
claimAndRequestUnstake(shares) claims a finished exit, if there is one, and starts a new one in the same transaction. Use it when a customer wants to leave in stages.
If the sUSDh price rises during the wait, the pending exit does not gain from it. Show the amount from getUserView (exitingAssets6), which is what the customer will receive.

Example

unstake.ts

When a call fails

Last updated: Nov 17, 2026