The smart contracts on BSC(Layer1) for ZkRollup BNB Application Side Chain.
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.
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:
- 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.
- 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.
- L2 to L1 Communication. Each
Rollup L2 Block
including a batch ofL2 operation
that need to be processed by L1 contracts. - "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.
yarn install
npx hardhat compile
npx hardhat test
ZkBAS-contract
is released under the Apache License, Version 2.0.