Skip to main content

Simple Staking DApp

This is a reference implementation of a staking app that can help users to complete staking, delegation and unbonding of their BTC stake through integration with extension and mobile wallets.

Babylon Labs hosts a version of this dApp for the convenience of users.

Testnet Version: https://btcstaking.testnet.babylonlabs.io

Mainnet Version: https://btcstaking.babylonlabs.io

Source Code

The source code of the dApp is open source and can be found here.

Key Features

The dApp is built with the following features:

Staking:

  • Complete staking workflow
  • Support for multiple staking terms
  • Early unbonding workflow

Wallet Integrations:

  • BTC wallets & Cosmos wallets
  • Secure transaction signing
  • Balance updates

Security:

  • BTC and BABY address verification
  • Geographic blockage for compliance
  • Transaction validation
  • Slashing protection
  • Secure key management

Dashboard:

  • Staking positions
  • Transaction history
  • Rewards and claims

Tech Stack

Frontend:

  • Next.js (14)
  • Tailwind CSS (with DaisyUI)
  • TypeScript
  • React

Dependencies:

  • @babylonlabs-io/wallet-connector: Wallet connection management
  • @babylonlabs-io/btc-staking-ts: Bitcoin staking functionality
  • @babylonlabs-io/babylon-proto-ts: Babylon protocol integration
  • @bitcoinjs-lib: Bitcoin transaction handling
  • @cosmjs/stargate: Cosmos blockchain interaction