Direct Integration with Bitcoin

Hey folks,

Here is a relevant security audits for those interested:

  1. "Threshold ECDSA Integration and Bitcoin Canisters - Security Review" by Trail of Bits (third-party security audit #5)

  2. "Canister Sandbox Review" by Trail of Bits (third-party security audit #4)

15 Likes

Update

Bitcoin Testnet

The work on the Bitcoin canister has been progressing very well and we want to launch it for Bitcoin Testnet, probably next week. The replica changes for this will be merged this week likely. The rollout will be done as follows:

  • Deploying the replica change that routes the Bitcoin management canister API to the new Wasm canister instead of the replica implementation;
  • Testing on a first subnet whether the transition from the replica implementation to the canister works without problems;
  • Doing a wider rollout following the standard rollout schedule.

The nice thing about this approach is that there is no interruption of service. Until the replica gets upgraded on a specific subnet, Bitcoin requests continue to be routed to the replica implementation, once a subnet has been upgraded, the requests will be routed to the new Wasm canister. The API does not change, so canister smart contracts should not experience any interruption of service.

Bitcoin Mainnet

Meanwhile, work on the Bitcoin canister for the Bitcoin Mainnet launch continues, as there are still some open things to be addressed:

  • Wait for quiet mechanism to only start serving requests once the blockchain is synched to the tip;
  • Unstable blocks should be stored in stable memory, not on the heap;
  • Increasing the stability threshold to 144; most of the hard part enabling this – the performance optimizations to make this fast – have been implemented already;
  • Monitoring / alerting that checks that the Bitcoin canister’s view is in line with the real blockchain; raise an alert to the on-duty team if the tip of the canister does not agree with the main blockchain. This will help us all to sleep better;

Without giving a firm commitment, late November still seems doable for the Bitcoin Mainnet canister.

48 Likes

This made my day. The community appreciates you :pray:

9 Likes

Thanks @dieter.sommer for the update. I think every single person in this forum is looking forward to seeing how this works out in practice.
I have one question though: is it too optimistic to expect that the first wave of dapps on IC leveraging bitcoin integration should be in main net in Q1-2023?
Thank you.

2 Likes

Hi @dieter.sommer A bit quiet lately so I guess everyone is busy with this. Do we still plan to launch the Bitcoin test net “this week”? Thanks.

1 Like

What is the probability of Musk/ Twitter adopting ICP tech into Twitter once the Bitcoin integration is implemented? Would DESO and ICP be a good fit to unite and help lure more user and devs integration?

1 Like

Indeed, we have all been extremely busy and there was silence here.

tl;dr

Yes!

Testnet

The good news: The Bitcoin Testnet canister has been rolled out onto one subnet already for smoke testing it before the larger rollout.

The better news: The feature is currently being rolled out on the IC. The update that is getting rolled out this week to the subnets contains the code that switches routing over from the replica implementation to the new Wasm Bitcoin canister. People using the feature already should not see any interruption of service. After the update of the respective subnet, the requests will not be routed to the replica of the Bitcoin subnet, but to the Wasm Bitcoin Testnet canister.

Mainnet

For Mainnet, we need to do some remaining implementation tasks. We still think that November is realistic for the Bitcoin Mainnet canister to be ready and be deployed.

19 Likes

Launching the feature within the next couple of weeks means that projects would have a couple of months to adopt the feature and launch their product in production some time in Q1 2023. So I would see this as realistic, knowing that there are projects already building on the beta version of the Bitcoin feature and have something working.

Different topic, but just to mention it: There are also projects who use the beta threshold ECDSA feature and HTTPS outcalls to integrate with Ethereum.

18 Likes

Thanks @dieter.sommer for both answers. What an exciting time ahead for the IC network.
Have a good weekend to you and everyone else in the forum.

3 Likes

Hey everyone, I just wanted to share a quick update that we have open-sourced the bitcoin canister repo in preparation for the upcoming mainnet launch. As @dieter.sommer already mentioned, we’ve been migrating from a replica implementation to a canister implementation, and in the past few days we’ve already started routing all of the bitcoin testnet requests to the canister implementation.

As stated in the README of the repo, it’s still not feature complete. We’re missing some small additions like block validation and the wait-for-quiet mechanism, which will be implemented over the coming days.

27 Likes

It is amazing to see this, thanks for sharing this. I believe ICP will be the king finally :grin: :grin: :grin:

6 Likes

Is there any plan to incorporate the BTC integration into the NNS ( native wallets ) now or in the future, or is this up to third party dapps to provide us with wallets etc ?

4 Likes

That will be awesome!

The current plan is that the NNS dapp would support SNS tokens and ckBTC, but not real BTC directly.

6 Likes

We want $ghost token as well!! Key part of the ecosystem

You guys should consider implementing BTC into the NNS dapp directly. One of the reasons I personally use the NNS dapp (apart from staking) is that I trust the Dfinity Foundation.

There’s going to be a lot of buzz around this BTC integration and I believe there should be at least one “trusted” foundation approved wallet to hold the BTC in. If someone creates a wallet that has a vulnerability so bitcoin gets stolen but the integration is solid, the integration nonetheless may get blamed.

Furthermore, alot of IC enthusiasts are also BTC enthusiasts. Enabling them to keep all their funds in one wallet (NNS dapp) would be a major convenience.

Food for thought. Lmk your thoughts.

17 Likes

I totally agree. Any problem with a third party wallet will be used against Dfinity and the whole innovation by haters. But even without considering the haters : since ICP intends to become an interoperable chain, people must have the possibility to have their ICP and BTC in the « same » wallet, or they won’t use the nns if they must subscribe at least another wallet to hold at least their BTC on ICP Blockchain. Practically and « marketingly » it is problematic, but also systematically because if people can’t use the nns to centralize at least the 2/3 main assets, they won’t use it and won’t participate to the governance.

So we can’t say « yes you can hold your BTC on ICP, but only trusting third parties », per se but also for the consequences.

I know Dfinity want to promote the innovation and the decentralization by letting third parties create their own solutions. It is honorable, but at least to begin and at least to hold the 2/3 main assets which people don’t want to take a chance to lose so easily, a wallet designed by Dfinity is strongly needed, at least for the preadoption.

NNS has always been presented by Dfinity itself as the nucleus of ICP and as hyper secured (it has often been a marketing point), so we can’t ask now people to store their BTC outside of it : a lot have adopted the nns basing themselves on the safety narrative, they can’t be asked to abandon their BTC to a logically less safe place.

None newcomers will inject their BTC if they must jump at board as suddenly and as far by having to withdraw their BTC from Bitcoin to a third party. We are an important number having proceeded by first – in may 2021 – putting our ICP on the nns before exploring very carefully third parties wallet. Maybe we would not have done it if we had to directly go from an exchange to a third party wallet. We proceeded with degrees, gradually. People will need to have the same possibility with their BTC, or none real BTC flooding will happen on ICP.

Let us not forget that lot of third parties wallets hacks happened this year, like the big one on Solana. People from these « countries » joining our blockchain will have experienced such hacks in a way or another, so they won’t start their ic journey with third parties wallets.

Plus, it sends an odd message : « Dfinity implements the BTC within ICP, but not allow to hold it within its own wallet ? Why ? They don’t believe in BTC ? They don’t believe in BTC within ICP ? They don’t believe in their implementation ? They can’t do it ? Bizarre ». We can’t afford this kind of questions.

To recap : we can’t have been promoting and still promote as much the NNS for its security and ask people to forget it when they will want to store their BTC. Same situation for ETH. We are ICP OG, we know the probity of the providers of the third parties wallet and admire their work and yet we want the ability to hold BTC in the nns for safety reasons, so imagine how the newcomers, not knowing the third parties like we do, will feel : they won’t take the chance

10 Likes

Totally agree. Really thought this integration would be baked into the NNS.

Hoping some senior members can perhaps get this looked into / proposals formed as being able to utilise BTC within the NNS would be epic.

5 Likes

This commentary pisses me off A LOT
 BTC integration is ALL about trust and there is nothing MORE trustworthy inside ICP ecosystem than NNS.

So the way I see it
 BTC integration is NOT finished until:

  • I can hold bitcoin in NNS
  • I can swap seamlessly between bitcoin and ckBTC INSIDE NNS

And among all
 this is the way to make the feature visible outside the ecosystem because is the SIMPLEST way to make people interact with it
 as NNS is the entry point.
Come on guys wake up
 I don’t understand how haven’t you come up with this.

6 Likes

And once again I realise how badly Dfinity is doing when it comes to marketing and communicating the product. There is no doubt that ICP has the most advanced technology. But 90% of the crypto world that will interact with ICP is not a software developer.
People want to understand in a very simple way how this new functionality will impact the exchange or custody of their crypto and the simplest use cases: NFT, DEfi, etc.
And that’s why it bothers me so much that the dfinity team has not taken into account such obvious (and necessary) use cases such as being able to hold bitcoin and bridge it with ckbtc within NNS.
Because from the outside, you can’t understand the progress of technology if you don’t make people visualize simple use cases with real impact!

2 Likes