DeFi

Use cases of DeFi on Stacks

Stacks enables users to put their BTC to work in trust-minimized ways: borrowing against it, providing liquidity, earning yield, or participating in programmable financial products that settle on Bitcoin. This ecosystem gives builders the foundation to extend Bitcoin from a passive store of value into an active financial layer.

Here are some powerful demonstrations of unlocking DeFi for Bitcoin:

Hermetica

Hermetica is a DeFi protocol built on Stacks whose mission is to bring fully Bitcoin-native stablecoins and yield products to the Bitcoin ecosystem. Their flagship asset is USDh — a Bitcoin-backed, yield-bearing synthetic dollar.

Implementation highlight: The code snippet below highlights the migration lock, manager assignment, and token deprecation logic all in one tight block. It captures the “power unlock” of the contract without pulling in the entire file:

  • Safely upgrade USDh by freezing old token operations once migration starts.

  • Assigns a migration manager to burn and migrate balances securely.

  • Ensures consistent supply and a trust-minimized transition to the new token.

Check out more from Hermetica
  • [Official] Official website of Hermetica

  • [Stacks YT] Earn up to 25% with Your BTC as Collateral with Jakob Schillinger

  • [Hiro YT] Lessons From Building Bitcoin DeFi

  • [Hiro Blog] How Hermetica Uses Chainhook to Track Bitcoin Deposits

  • [contract] SPN5AKG35QZSK2M8GAMR4AFX45659RJHDW353HSG.usdh-token-v1


StackingDAO

StackingDAO is the hub for liquid stacking on Stacks. One of their liquid stacking services stSTXbtc, is a liquid stacking token (LST) backed 1-to-1 with STX, and holders receive sBTC rewards daily that can be claimed at any moment.

Implementation highlight: This function initiates a withdrawal of stSTXbtc, locks the underlying STX for withdrawal, burns the derivative token, and mints an NFT that represents the user’s withdrawal claim. It effectively transforms a liquid derivative token into a time-locked withdrawal right.

  • Enforces protocol-level safety checks

  • Determines the unlock Bitcoin (burn) height

  • Links the withdrawal to an NFT “claim ticket”

  • Coordinates state changes across multiple protocol contracts

Check out more from StackingDAO
  • [Hiro YT] Going Under the Hood of stSTXbtc with Philip De Smedt from StackingDAO

  • [Hiro YT] A Simple Breakdown of the StackingDAO Clarity Contracts on Stacks

Last updated

Was this helpful?