Giter Site home page Giter Site logo

hcytmz / btclayer2-bevm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from btclayer2/bevm

0.0 0.0 0.0 63.67 MB

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

Home Page: https://bevm.io

License: GNU General Public License v3.0

Shell 0.30% JavaScript 0.63% Python 1.07% Rust 79.53% TypeScript 0.01% Makefile 0.09% Handlebars 0.20% Dockerfile 0.07% Solidity 18.10%

btclayer2-bevm's Introduction

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

btclayer2-bevm's People

Contributors

liuchengxu avatar atenjin avatar gguoss avatar koushiro avatar toxotguo avatar eee-byte avatar icodezjb avatar hacpy avatar aaweidai avatar alannotnerd avatar andresilva avatar shawntabrizi avatar threewebcode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.