Giter Club home page Giter Club logo

zkbnb-contract's Introduction

ZkBNB Contract

banner

The smart contracts on BSC(Layer1) for ZkRollup BNB Chain.

What is ZkBNB Contract

The ZkRollup BNB Chain(ZkBNB) is an infrastructure for developers that helps them to build large scale BSC-based apps with higher throughput and much lower or even zero transaction fees.

Framework

The above framework shows that the zkbnb-contract is one of the core components, it is the entrance and exit of L2 ecosystem. zkbnb-contract achieves that:

  1. L1 security. The ZkBNBVerifier Contract can verify the SNARKs proofs(succinct non-interactive argument of knowledge) that generated by Layer2 and so that we can prove the validity of every single transaction in the Rollup Block. So the ZkBNB share the same security as BSC does. Thanks to zkSNARK proofs, the security is guaranteed by cryptographic. Users do not have to trust any third parties or keep monitoring the Rollup blocks in order to prevent fraud.
  2. L1 to L2 Communication. The ZkBNB Contract expose several interfaces to support BNB, and BEP20/BEP721 created on BSC or ZkBNB can flow freely to ZkBNB.
  3. L2 to L1 Communication. Each Rollup L2 Block including a batch of L2 operation that need to be processed by L1 contracts.
  4. "Full exit" on BSC. The user can request through L1 smart contract to withdraw funds if he thinks that his transactions are censored by ZkBNB.

Getting Started

build && test

yarn install 
npx hardhat compile
npx hardhat test

The deployed contracts on testnet and mainnet(coming soon)

Design

ZkBNB Key Contracts

ZkBNB Name Service

Upgradeable Design

License

zkbnb-contract is released under the Apache License, Version 2.0.

zkbnb-contract's People

Contributors

cosinlink avatar lbruyne avatar lightning-li avatar sherlzp avatar unclezoro avatar yutianwu 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.