Skip to content
/ BEVM Public
forked from btclayer2/BEVM

#BTC #Layer2: Decentralized BTC cross-chain implemented by Bitcoin light nodes and #Taproot. Support #EVM, BTC native Gas, #metamask wallet can be used directly

License

Notifications You must be signed in to change notification settings

chanjiii/BEVM

 
 

Repository files navigation

BEVM

WechatIMG475

Technical features:

  • EVM: Fully compatible with EVM ecology, wallets such as metamask, development frameworks such as truffle/hardhat, and solidity programming language.
  • BTC native gas: Use native BTC as the gas fee for EVM. Similar to ETH layer2 OP/Starknet, ETH is used as the gas fee of Layer2.
  • Taproot Threshold Signature: On-chain POS nodes to ensure the decentralization of threshold signature verifiers. singal privacy communication protocol to ensure the security of the aggregated schnorr signature pubkey/msg.
  • bitcoin light node: Light nodes on the BTC chain that support the Wasm version (no_std).
  • Signal Privacy Distributed Protocol: Signal protocol to ensure the privacy and security of message communication between nodes when schnorr aggregate signature and Mast contract combined threshold signature.
  • zkstark ultra-light node: To optimize the light nodes mentioned above, zkstark technology can be used to realize the ultra-light nodes of BTC.

Four advantages compared to other layer2/cross-chain bridges (Take tBTC as an example)

  • 1, No centralized initial setup required. There is no need to use sharding private keys to implement distributed threshold signatures, which avoids the security problem of private key leakage caused by sharding private keys. Directly use BTC's native threshold signature scheme: MuSig2.
  • 2, Distributed network on the chain, more decentralized. The validators of the distributed threshold network are all block verification nodes on the chain, and the network on the chain increases trust. It avoids the opaque and easy-to-operate defects of the distributed network under the chain.
  • 3, No permission required, just trust the code. The BTC to Layer2 network uses BTC light nodes. The blockchain logic of fully trusting the code avoids the centralized fraud problem caused by the submission of data oracle to the distributed network under the chain.
  • 4, Distributed network communication with complete privacy. The Signal protocol is used to complete the communication problem of the BTC taproot threshold signature. Solve the privacy communication problem of distributed network. Avoid the risks of data leakage, collusion or external attacks when threshold signatures appear

EVM system with BTC as native Gas

The benefits of BTC as native Gas

  • The largest BTC ecology, which is convenient for BTC users to hold BTC and use Layer2.
  • BEVM's Sequencer can charge BTC fees to motivate BEVM Sequencer nodes.

BTC is compatible with EVM system

  • BTC needs a Turing-complete smart contract platform to settle assets issued on BTC and BTC.
  • The EVM ecology occupies more than 90% of the smart contract ecology in the market, and the compatible EVM ecology can accommodate the most expensive on-chain developers and user communities.

Technical realization

  • Adopt substrate frame
  • Precompiled system contracts, using BTC as gas
  • Porting EVM platform

Taproot Threshold Signature

Musig2 is a multi-signature protocol that only needs two rounds of communication to complete communication. It is a continuation and upgrade of Musig, and its practicability is greatly improved. This repo fully reproduces the multi-signature scheme proposed by Musig2 Paper which the version is 20210706:150749.At the same time, we implemented versions for secp256k1 and sr25519, respectively, so that we can use the Musig2 protocol in BTC and Polka.

secp256k1

The naming of the functions, states, and variables are aligned with that of the protocol. At the same time, it is compatible with the schnorr signature process proposed by Bitcoin bip340, making it applicable to the Bitcoin network.

sr25519

Implements musig2 protocol on Ristretto compressed Ed25519 points.

Contribution

Any kinds of contribution are highly welcome. Feel free to submit an issue if you have any question or run into any issues.

Metamask config for BTC

Network name: BEVM Canary network
RPC URL: https://rpc-canary-1.bevm.io
Chain ID: 1501
Currency symbol: BTC
Block explorer URL (Optional): https://scan.bevm.io/

License

GPL v3

References

About

#BTC #Layer2: Decentralized BTC cross-chain implemented by Bitcoin light nodes and #Taproot. Support #EVM, BTC native Gas, #metamask wallet can be used directly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 79.5%
  • Solidity 18.1%
  • Python 1.1%
  • JavaScript 0.6%
  • Shell 0.3%
  • Handlebars 0.2%
  • Other 0.2%