Skip to content

yutianwu/zkbas-contract

 
 

Repository files navigation

ZkBAS Contract

banner

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

What is ZkBAS Contract

The ZkRollup BNB Application Side Chain(ZkBAS) 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 ZkBAS-contract is one of the core components, it is the entrance and exit of L2 ecosystem. ZkBAS-contract achieves that:

  1. L1 security. The ZkBASVerifier 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 ZkBAS 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 ZkBAS Contract expose several interfaces to support BNB, and BEP20/BEP721 created on BSC or ZkBAS can flow freely to ZkBAS.
  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 ZkBAS.

Getting Started

build && test

yarn install 
npx hardhat compile
npx hardhat test

The deployed contracts on testnet and mainnet(coming soon)

Design

ZkBAS Key Contracts

ZkBAS Name Service

Upgradeable Design

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 75.8%
  • JavaScript 23.9%
  • Other 0.3%