Lending / Yield·Bitcoin · Stacks
sBTC
Stacks-native, 1:1 BTC-pegged SIP-010 token enabling Bitcoin to be used in DeFi on Stacks. Designed as a decentralized two-way peg secured by Stackers in the Nakamoto release.
- 01BTC yield via Stacks DeFi
- 02BTC-collateralized lending
- 03Bitcoin in Clarity contracts
- 04decentralized BTC peg
- 05sBTC swaps on ALEX
- pnpm add sbtc @stacks/transactions @stacks/network
| Variable | Scope | Description |
|---|---|---|
| SBTC_BRIDGE_API_URL | Client | Hiro/Stacks sBTC bridge API endpoint. |
| NEXT_PUBLIC_STACKS_NETWORK | Client | Network identifier: 'mainnet' or 'testnet'. |
Use sBTC to bring Bitcoin into Stacks DeFi as a SIP-010 token. For deposits, use the `sbtc` package: `const dep = await sbtcDepositHelper({ amountSats, stacksAddress, signersPublicKey, bitcoinChangeAddress, feeRate, utxos })` to build a deposit transaction; user signs and broadcasts it on Bitcoin (Xverse/Leather). The Stacks signer set notarizes the deposit and mints sBTC on Stacks. Read sBTC balance via the SIP-010 `get-balance` read-only call against the sBTC contract. For withdrawals, call the sBTC withdrawal contract function from Stacks; Stackers fulfill the BTC payout on L1.
- ⚑Peg security depends on the active Stacker signer set — review the threshold (typically 70% of stacking weight) and the slashing model before treating sBTC as 'as good as BTC'.
- ⚑Deposits and withdrawals span two chains: Bitcoin finality is hours, Stacks confirmation is minutes — surface the slower leg in UX, not just the Stacks side.
- ⚑sBTC is SIP-010 on Stacks (Clarity), not ERC-20 — set Clarity post-conditions on every transfer or contract call may move funds you didn't intend.
- ⚑Withdrawal queues can back up under load; design timeouts and retry UI rather than promising synchronous BTC settlement.
- ⚑Early mainnet phases have caps and may run with a permissioned signer set; the trust model evolves toward fully decentralized — document the current state honestly.
- ⚑Don't conflate sBTC with custodial wraps (WBTC, BTCB) — they have very different trust assumptions.