An introduction to BTC staking on the Babylon network
What is Babylon
Babylon enables you to stake your BTC and delegate to a Finality Provider of your choice. By doing so, you will earn rewards from Bitcoin Secured Networks (BSNs) leveraging the Babylon protocol.
The first BSN is the Babylon Genesis Chain which pays rewards in their native token BABY.
Ecosystem UI'sPier Two are currently working on building UI support for Babylon Staking. In the meantime, you can view details of your delegations using the following ecosystem UI's:
Pier Two's role
Pier two run a Babylon Finality Provider that enforces the rules of the Babylon network on your behalf and earns you staking rewards from BSNs that utilise this Bitcoin-backed security model.
Pier two never gain access to your BTC, we simply facilitate providing proof to Babylon and other BSNs that your BTC is staked with the Babylon protocol.
Staking mechanism overview
Staking BTC involves locking your BTC into a specially formatted UTXO where it can only be moved under 3 conditions:
- Withdrawal back to your address after your specified staking time period has elapsed
- Early withdrawal back to your address by way of unbonding
- Partial withdrawal to your address after a slashing event occurs (a portion of your assets are burnt and then rest are returned). Read more about Babylon slashing here
Proof of your staked BTC is then embedded in a transaction on the Babylon Genesis Chain (a Cosmos based blockchain network). The Babylon Genesis Chain now has the means of verifying your locked BTC and issuing rewards as a result.
Staking flow
There are 2 different approaches available when staking BTC with Babylon:
Pre-stake Flow
Official Babylon technical docs
This is the suggested flow and provides a better UX for both end users and developers. It involves the following steps:
- Signal intent to stake BTC by submitting a transaction to the Babylon Chain with your staking inputs (BTC staking address, finality provider id, staking amount, staking timelock, etc)
- Submit the matching BTC staking transaction directly to the Bitcoin chain
- Wait for Babylon network to verify your deposit which will be automatically activated after the configured block depth threshold (currently set to 30 blocks).
Post-stake flow
This flow is more involved but offers more control and less reliance on Babylon's system to automatically link and verify your transactions between the Bitcoin network and Babylon Genesis chain.
- Lock your BTC into a specially formatted UTXO on the Bitcoin chain
- Wait for the protocol defined confirmation depth to elapse (currently 30 blocks)
- Submit a corresponding transaction to the Babylon Genesis chain which contains a reference to the BTC transaction from the first step
Getting started
The easiest way to stake BTC with the Pier Two API is to use our typescript SDK and refer to our Bitcoin Staking API Scripts which demonstrate the various interactions required to create and manage BTC staking positions.