[Investment Research] "How does Babylon achieve BTC "trustless staking"? —— Analysis of BTC's first-layer staking steps"

- Last week, @babylon_chain community test event bbn-test-3 has ended. I wonder if everyone has participated?

- The biggest highlight of the Babylon project is that it allows BTC to achieve "trustless staking". Simply put, BTC assets can participate in staking activities and obtain benefits without leaving the control of their own wallets.

- When participating in the test before, I found that Babylon's staking process requires a total of 5 steps. The so-called "trustless staking" is achieved through these 5 steps. Next, let's take a look at how these 5 steps work.

[Acknowledgements] When disassembling the entire staking process, I asked Chang Nima Laoshi about the implementation mechanism of BTC UTXO transaction construction and different signature methods. Thank you very much. However, we can't see the specific source code of Babylon's implementation of staking, so the disassembly implementation mechanism may be wrong. Welcome to criticize at any time.

1️⃣ Create a pledge transaction (BTC network)

- The first step is to create a pledge transaction on the BTC network. This transaction needs to achieve two functions: 1) Using BTC's time-lock script, the BTC involved in the pledge is locked and not allowed to be used; 2) Punishment transaction, which is to prevent users from committing evil in the future (such as using their own pledged BTC to attack the POS chain) and can be punished (Slashing), and the pledged BTC will be destroyed.

- The punishment here is the use of EOTS signatures (Extractable one-time signatures, extractable one-time signature scheme), which allows the private key to be automatically extracted from the signature generated by malicious behavior when the user commits evil. Babylon will spend the "output" of the pledge transaction on a destruction address, turning it into an unspendable transaction output.

2️⃣ Create a pledge contract and release the pledge transaction (BTC network)

- This step mainly implements two operations. The first is to create a pledge contract, that is, to create a covenant to determine the operation of step 1 above in the form of a contract; the other operation is to create an unbonding transaction. The core purpose of this operation is to allow users to use their private keys to redeem these assets and reuse these BTC after the lock-up period ends.

3️⃣ Create a de-staking contract (BTC network)

- This step is to create restrictive clauses (covenants) for de-staking BTC. That is, to build a de-staking contract and finally realize the BTC redemption operation.

- The above three signatures are finally realized in the same BTC transaction (as shown in the figure below). Here, multiple branches in a transaction are actually realized through multiple signatures, which can be understood as a transaction to realize the three operations of staking, punishment, and redemption.

- In addition, we found that in this transaction, our BTC was still sent to an unfamiliar wallet. I was very curious about this at the time. Didn’t Babylon claim that the funds would not be out of the control of the wallet? How could BTC be sent to an unfamiliar wallet? Later, after consulting, I understood that because the private key was originally the only condition for BTC UTXO, but when conditions such as time-lock were added, a new wallet must be created in the end to achieve multi-condition unlocking. The private key of our original payment wallet is one of the necessary conditions to unlock the new wallet UTXO, so in the end, to redeem this UTXO, we still need to use the private key of our payment wallet.

4️⃣ Bind the reward account (Babylon network)

- At the last two steps, the entire staking process is basically completed. The fourth step is mainly to bind your wallet address and the BTC staking event completed in the first 3 steps on the Babylon network, so that your Babylon wallet has the qualification to obtain staking rewards.

5️⃣ Bind the reward account (BTC network)

- The last step is still completed on the BTC network, the purpose is to bind your BTC wallet to the staking behavior of Babylon on the POS chain (this step is more questionable, just look at the literal meaning of the interpretation, in fact, I don’t understand the necessity of this step).

Well, at this step, our staking operation is completed, and the final confirmation of the transaction will take another 7 BTC blocks.

#BTC #Babylon #staking #restaking