> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usdh.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Show a customer's sUSDh position and let them stake, in a few lines of code.

**This page gets you from nothing to a working stake button and position display.** The examples use [viem](https://viem.sh). Any Ethereum library works the same way.

**1. Add the two contracts**

```typescript contracts.ts theme={null}
export const USDH = "0xbcFC42391e55484129191eDfcC766a2c6F9eb503"; // 6 decimals
export const SUSDH = "0x0a2F67c696B3845DaceEf73fa7982FEA77e678C2"; // 18 decimals
```

Use these proxy addresses. Never use the implementation addresses behind them.

**2. Show the customer's position**

One call returns everything your screen needs.

```typescript position.ts theme={null}
import { formatUnits } from "viem";

const [
  stakedShares,   // sUSDh still earning rewards (18 decimals)
  stakedAssets6,  // what those sUSDh are worth now, in USDh (6 decimals)
  exitingShares,  // sUSDh waiting to be claimed
  exitingAssets6, // USDh the customer will receive when they claim
  cooldownStart,  // when the exit started (0 if none)
  cooldownEnd,    // when it can be claimed (0 if none)
  secondsLeft,    // seconds until it can be claimed
  claimable,      // true if the customer can claim now
] = await client.readContract({
  address: SUSDH, abi: susdhAbi, functionName: "getUserView", args: [customer],
});

console.log(`Staked: ${formatUnits(stakedAssets6, 6)} USDh`);
```

**3. Let them stake**

Two transactions, both signed by the customer.

```typescript stake.ts theme={null}
import { parseUnits, erc20Abi } from "viem";

const amount = parseUnits("1000", 6); // 1,000 USDh

await walletClient.writeContract({
  address: USDH, abi: erc20Abi, functionName: "approve", args: [SUSDH, amount],
});

await walletClient.writeContract({
  address: SUSDH, abi: susdhAbi, functionName: "stake", args: [amount],
});
```

The customer receives sUSDh in the same wallet that signed.

**4. Check where they are**

Before you show the stake button, make sure staking is offered where your customer is. See [Rules for offering staking](https://docs.usdh.money/partners/rules.md).

## Next

* Unstaking and claiming: [Stake and unstake from code](https://docs.usdh.money/partners/stake-and-unstake.md)
* Showing rewards: [Show balances and rewards](https://docs.usdh.money/partners/balances-and-rewards.md)

*Last updated: Nov 17, 2026*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.