forked from bnb-chain/bnb-chain.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "add mathwallet and remove zkbnb (bnb-chain#566)"
This reverts commit ae75391.
- Loading branch information
Showing
10 changed files
with
246 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: Overview - zkBNB Core Concepts | ||
--- | ||
|
||
## Key Features | ||
|
||
### Digital Asset Management | ||
The zkBNB will serve as an alternative marketplace for issuing, using, paying and exchanging digital assets in a | ||
decentralized manner. zkBNB and BSC share the same token universe for BNB, BEP2 and NFT tokens. This defines: | ||
- The same token can circulate on both networks, and flow between them bi-directionally via L1 <\> L2 communication. | ||
- The total circulation of the same token should be managed across the two networks, i.e. the total effective supply | ||
of a token should be the sum of the token's total effective supply on both BSC and BC. | ||
- The tokens can only be initially created on BSC in BEP20, then pegged to the zkBNB. It is permissionless to peg token onto zkBNB. | ||
|
||
User can **deposit, transfer, and withdraw** both non-fungible token and fungible token on zkBNB. | ||
|
||
Users enter the zk-rollup by **depositing tokens** in the rollup's contract deployed on the BSC. The zkBNB monitor will track deposits and submit it as a layer2 transaction, once committer verifies the transaction, users get funds on their account, they can start transacting by sending transactions to the committer for processing. | ||
|
||
User can **transfer** any amount of funds to any existed accounts on zkBNB by sending a signed transaction to the network. | ||
|
||
**Withdrawing** from zkBNB to BSC is straightforward. The user initiates the withdrawal transaction, the fund will be | ||
burned on zkBNB. Once the transaction in the next batch been rolluped, a related amount of token will be unlocked from | ||
rollup contract to target account. | ||
|
||
### NFT Management and Marketplace | ||
We target to provide an opensource NFT marketplace for users to browse, buy, sell or create their own NFT. | ||
The meta-data of NFT on zkBNB sticks to the [BSC standard](https://docs.bnbchain.org/docs/nft-metadata-standard/). | ||
The ERC721 standard NFT can be seamlessly deposited on zkBNB, or in reverse. | ||
|
||
 | ||
|
||
Above diagram shows the framework of Nft Marketplace and zkBNB. All the buy/sell offer, meta-data of NFT/Collection, | ||
medium resources, account profiles are store in the backend of NFT marketplace, only the **contendHash**, | ||
**ownership**, **creatorTreasuryRate** and few other fields are recorded on zkBNB. To encourage price discovery, anyone | ||
can place buy/sell offer in the marketplace without paying any fees since the offer is cached in the backend instead of | ||
being sent to the zkBNB. Once the offer is matched, an **AtomicMatch** transaction that consist of buy and sell offer | ||
will be sent to zkBNB to make the trade happen. Users can also cancel an offer manually by sending a cancel offer | ||
transaction to disable the backend cached offer. | ||
|
||
### Seamless L1 Wallet Management | ||
zkBNB natively supports ECDSA signatures and follows [EIP712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) signing structure, which means most of the Ethereum wallets can seamless support zkBNB. There is no extra effort for BSC users to leverage zkBNB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: zkBNB Architecture - zkBNB | ||
--- | ||
|
||
# zkBNB Architecture | ||
|
||
zkBNB is a zero-knowledge scalability solution, or L2, which focuses on straightforward token operations and built-in marketplaces for Gaming and Social use cases. It serves as a scalability solution for the BNB Smart Chain by bundling multiple transactions into a single transaction, reducing costs for on-chain transactions. The Zero Knowledge proof system used in zkBNB ensures a much faster finality time of the L2 transactions, that helps improve the user experience. zkBNB is essentially built on the zk-Rollup architecture. | ||
|
||
## zk-Rollup Architecture | ||
|
||
 | ||
|
||
- **committer**. Committer executes transactions and produce consecutive blocks. | ||
- **monitor**. Monitor tracks events on BSC, and translates them into **transactions** on zkBNB. | ||
- **witness**. Witness re-executes the transactions within the block and generates witness materials. | ||
- **prover**. Prover generates cryptographic proof based on the witness materials. | ||
- **sender**. The sender rollups the compressed l2 blocks to L1, and submit proof to verify it. | ||
- **api server**. The api server is the access endpoints for most users, it provides rich data, including | ||
digital assets, blocks, transactions, gas fees. | ||
- **recovery**. A tool to recover the sparse merkle tree in kv-rocks based on the state world in postgresql. | ||
|
||
## Maximum throughput | ||
Pending benchmark... | ||
|
||
## Data Availability | ||
|
||
zkBNB publish state data for every transaction processed off-chain to BSC. With this data, it is possible for | ||
individuals or businesses to reproduce the rollup’s state and validate the chain themselves. BSC makes this data | ||
available to all participants of the network as calldata. | ||
|
||
zkBNB don't need to publish much transaction data on-chain because validity proofs already verify the authenticity | ||
of state transitions. Nevertheless, storing data on-chain is still important because it allows permissionless, | ||
independent verification of the L2 chain's state which in turn allows anyone to submit batches of transactions, | ||
preventing malicious committer from censoring or freezing the chain. | ||
|
||
zkBNB will provide a default client to replay all state on Layer2 based on these call data. | ||
|
||
## Transaction Finality | ||
|
||
BSC acts as a settlement layer for zkBNB: L2 transactions are finalized only if the L1 contract accepts the validity | ||
proof and execute the txs. This eliminates the risk of malicious operators corrupting the chain | ||
(e.g., stealing rollup funds) since every transaction must be approved on Mainnet. Also, BSC guarantees that user | ||
operations cannot be reversed once finalized on L1. | ||
|
||
zkBNB provides relative fast finality speed within 10 minutes. | ||
|
||
## Instant confirmation ZkBS | ||
|
||
Even though time to finality is about 10 minutes, it does not affect the usability of the network. The state transition | ||
happens immediately once the block been proposed on zkBNB. The rollup operations are totally transparent to most users, | ||
users can make further transfers without waiting. | ||
|
||
## Censorship resistance | ||
|
||
Committer will execute transactions, produce batches. While this ensures efficiency, it increases the risk of censorship | ||
:malicious zk-rollup committer can censor users by refusing to include their transactions in batches. | ||
|
||
As a security measure, zkBNB allow users to submit transactions directly to the rollup contract on Mainnet if | ||
they think they are being censored by the operator. This allows users to force an exit from the zk-rollup to BSC without | ||
having to rely on the commiter's permission. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
hide: | ||
- toc | ||
|
||
title: zkBNB | ||
--- | ||
|
||
<style> | ||
.md-source-file, .md-content__button.md-icon { | ||
display: none; | ||
} | ||
</style> | ||
|
||
<div class="section-head"> | ||
<div class="left"> | ||
<h1>zkBNB</h1> | ||
<p>zkBNB is the launchpad to achieve infinite scaling for all things Web3 and GameFi. It offers incredible scalability, Layer-1 level security, and frictionless developer experience to build dApps that can onboard the next billion users.</p> | ||
</div> | ||
<div class="image"> | ||
<img src="static/zkBNB.png" alt="zkBNB" loading="lazy"> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
<div class="section-body"> | ||
<a href="./core-concept/zkbnb-arch.md"> | ||
<div>Architecture</div> | ||
<p>zkBNB is a zero-knowledge scalability solution</p> | ||
</a> | ||
<a href="./resources.md"> | ||
<div>Resources</div> | ||
<p>Providing a Wealth of Resources for Building zkBNB</p> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: zkBNB Overview - zkBNB | ||
--- | ||
|
||
# What is zkBNB? | ||
The 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. | ||
|
||
zkBNB is built on zk-Rollup architecture. zkBNB bundle (or "roll-up") hundreds of transactions off-chain and generates cryptographic proof. These proofs can come in the form of SNARKs (succinct non-interactive argument of knowledge) which can prove the validity of every single transaction in the Rollup Block. | ||
|
||
## Problems zkBNB solves | ||
Today BSC is experiencing network scalability problems and the core developer has proposed to use sidechains in their [Outlook 2022](https://forum.bnbchain.org/t/bsc-development-outlook-2022/44) paper to solve this problem because these sidechains can be designed for much higher throughput and lower gas fees. | ||
|
||
The [BEP100](https://github.com/bnb-chain/BEPs/pull/132/files) propose a modular framework for creating BSC-compatible side chains and connect them by native relayer hub. The security of native relayer hub is guaranteed by the side chain. | ||
|
||
According to [the analysis](https://blog.chainalysis.com/reports/cross-chain-bridge-hacks-2022/) of chainalysis, bridges are now a top target for the hackers and attacks on bridges account for 69% of total funds stolen in 2022. zkBNB can perfectly solve the problem! Thanks to zkSNARK proofs, zkBNB share the same security as BSC does. | ||
|
||
## What are the key features of zkBNB? | ||
|
||
BNB achieves the following goals: | ||
|
||
- **L1 security:** 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. | ||
|
||
- **L1<\>L2 Communication:** BNB, BEP20, BEP721 tokens can flow freely between BSC and zkBNB through our built-in bridging platform. | ||
|
||
_(BEP721 token must be created in zkBNB in order to transfer from L1 to L2)_ | ||
|
||
- **Built-in NFT marketplace:** Users can launch their NFT collections to their communities safely and securely on zkBNB’s built-in marketplace and store them in IPFS or GreenField. zkBNB provides a set of powerful REST APIs. New developers operating in the space will no longer need to interact directly with smart contracts or worry about security. Rich Functions, such as supporting GreenField and supporting modifiable NFT. | ||
|
||
- **Fast transaction speed and faster finality:** zkBNB puts up astonishing figures with an ability to support up to 4 billion addresses, 5k transactions per second (TPS), and minute level finality in the best case. | ||
|
||
- **Low gas fee:** The gas token on the zkBNB can be either BEP20 or BNB. | ||
|
||
- **"Full exit" on BSC:** At any time, a user can request an exit operation to withdraw funds. This means users can withdraw funds at any time within a few minutes. Even zkBNB stops running, user can still safely withdraw all assets. Each collection of NFTs will be withdrawn into a segregated smart contract. | ||
|
||
_**Note:** Full Exit and Exodus Exit are two different types of functionalities on zkBNB. Full exit is just about user can click a button and withdraw all his assets in one go. Exodus exit is about in emergency situation, say the whole zkBNB is down, user can still withdraw all this assets._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Resources - zkBNB | ||
--- | ||
|
||
# Resources | ||
|
||
## 📔 Repos | ||
|
||
- [zkBNB Infra](https://github.com/bnb-chain/zkbnb) | ||
- [zkBNB Smart Contract](https://github.com/bnb-chain/zkbnb-contract) | ||
|
||
|
||
## 👨🔧 Building Dapps on zkBNB | ||
|
||
Start building dapps to create value based on the data assets and their related economy. | ||
- Fund your zkBNB Wallet (_**Coming Soon**_⏰) | ||
- Build a dapp with zkBNB API (_**Coming Soon**_⏰) | ||
|
||
## 🙋♀️ Help & Support | ||
Check out the zkBNB Developer Discord for technical support. (**_TBA_** 📢) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters