# Building smart and fully on-chain applications on BNB Chain - pre-hackathon workshop

- Channel: [ETH Belgrade Community](https://streameth.org/eth-belgrade-community)
- Date: 2024-10-07
- Duration: 39:14
- Watch: https://streameth.org/watch/yt-RJZBIBW2M28
- YouTube: https://www.youtube.com/watch?v=RJZBIBW2M28

## Description

ETH Belgrade hackathon Discord workshop by BNB chain

## Transcript

e so can you see my screen now yes thanks um I'm sorry for the for the technical problems we have today um I'm Jimmy um from the BMB Chan um today I'm going to introduce the the the overview of the BMB CH as well as I can also go through the wish list we have for the workshop um so let's get started so um before I started I I'd like to introduce what the BMB ch um actually the BMB Chen actually is a ecosystem that we are going to uh provide an infrastructure that is open and scalable for anyone to build out so our vision actually is on board next billion web three users we hope that these kind of things um can be easily built on and also provide the most affordable solutions for the for the projects as well as we want to streamline the the user experiences in developer experiences to simplify the developer uh you know to to make the developer work life easier so um I'd like to introduce the B&amp;B Chain by numbers by the numbers um first I let's let me talk about the opnb which is our uh lar two of the BSC BSC actually is our leer one network the opnb actually is a leader to network from the daily transactions pers perspective active actually the opnb has already be one of the you know the most active network uh you can find in the web3 world which is 7 71 million transactions per per day and uh for every transaction cost um I think OB BNB is the one of the lowest among all the ler tools including for example the Bas or arbitrum or optimism um actually this number is built on the current level uh we are going to implement the b336 which is um similar to the EIP 4 4844 to introduce the blob carrying transactions which can reduce the transaction cost of the opnb 10 plus lower so that means uh the opnb will be the most affordable layer too you can find in the market um from the performance perspective actually the opnb has the capacity of 5,000 transaction TPS at this moment and we are going to expand the capacity to 10,000 within 2024 that introduce Innovations like the parallel evm and as also the transaction pool optimization and execution optimization this kind of innovation I will go detail um later today and um in January 9th 20124 actually the B&amp;B has become number one blockchain by Dau I mean the daily active users um that's the opnb um for the BSC um actually BSC is our um you know we we call B&amp;B smart smart um a smart uh chain uh which is uh our defi Hub uh within the B&amp;B CH ecosystem it has more than four billion US dollar tvl um I think it's number three at this moment um the TPS of the BS is 5,000 which is much higher than other EV M ler one network uh for example the evm or any other ler one and U the cost the the BS is one of the lowest uh evm evm Network and U another thing I want to highlight is our security actually um in 2023 in last year it have reduced 85% of the losses reduction of losses from exploits in the bean Beach ecosystem which is done by our Avenger dog which is a community of the security of the BMB I will introduce detail later so first I'd like to introduce why we want to build why we want to build a new paradigm we call the one BNB which um um kind of the you know the this Paradigm or streamline whole developer experiences to simplify or abstract way um of the complexities of web three Developers first um actually you know the web three application right now basically is the partially onchain models for example the um the data or um the you know the the virtual asset media files when any or any other user interactions usually not unchain so right now we are trying to shift the you know from The partially unchain models to the fully unchain models which means the devop ERS Can U build everything onchain to remove the you know the ne necessity of the building the offchain solutions or building offchain on Tex stxs we want to build the 1bn Paradigm to provide this kind of the Tex stack to manage or simplify this transition so what is the 1 BNB actually 1 BNB actually integrating the BSC which is our um you know layer one and opnb which which is our Layer Two and the BMB Green Field which is our decentralized data storage Network to a holistic solution for the web three developers to build um their applications so this is the high level you know Paradigm what is one B&amp;B looks like we call the onetop DF Dev stack which means they can build everything um for your projects on top of inside of the BMB chain ecosystem including I just introduced the the opnb BSC as well as the Greenfield so just like the you know the traditional web two applications web 3 also have the logical three layers for example the front end uh the business logic and also the back end so compared with the current Tech stack in 1 BNB actually the front end actually is a uh we can we can use we can call it web hosting services so actually the B&amp;B Greenfield BMB Greenfield infrastructure provides this kind of the web hosting services so that you can compile your JavaScript or css file and HTM HTML file into a bundle and upload it to the Green Field to uh to do the web hosting service so that means you do not have to you know build your own you know backend servers on the cloud you can just use the BMB Greenfield infra to build your front end besides the besides the front end the business logic actually can be implemented on the smart contract on the L1 evm which is our BSC which uh layer one or Layer Two so the reason between why we have the two layer of the business logic is that uh for the projects who has large or uh user base or have the frequent transaction interactions on chain um this kind of things can reduce the cost especially if your projects actually want to sponsor the users interactions on the Chain so Layer Two actually the opnb is a much more affordable solution for the for the projects both of the opnb and BSC ler one and ler two actually has a we call the cross chain programmability to the to the B&amp;B Greenfield so every object stored on the B&amp;B Green Field can be measured back to the layer one and ler two smart contract so you can use the smart contract to manage the OBC permission for example the read only permission read and write or remove some of the you know the users access Etc this kind of things can be implemented in the smart contract so the user can interact with the Greenfield object through the smart contract on the on the layer one or layer two of the B&amp;B's smart BMB smart chain or op BNB so this kind of cross chain programmability provid provides a flexible way to manage your file or manage your data on chain and at the same time to make sure your data can be fully unchain instead of using you know offchain Solutions like you know the traditional Cloud object storage like the S3 or any other services one more thing I want to highlight is that because the Green Field is hot data friendly that means once you upload your file you can update it or you can remove it at any time uh just like different from the airweave or ipfs which is quite difficult to manage the files on the network so it's very simp it's very suitable for your projects who want to manage the data by the application themselves so this is the detail of the programmability um for example the on on left hand uh which you can see here we I just take the BSE as a example um um the BC actually you can see here between the BC and the Green Field there's a reler level a reler um layer that can transfer the you know related transactions or relay the events from the BC to the Green Field and backward back forth back and back and forth so from the user perspective if you want to interact the Greenfield object through through your DM you can just interact with the smart contract on the BS so the event on the BC of the smart contract will be related to The Green Field to manage the the the object on side of the BM BMB Greenfield or user can directly through the Green Field um or SDK or client that they can just operate the objects directly um of course the Greenfield can be used as a storage simply as a storage is course and this kind of event also can be relayed back to the Green Field uh sorry from the Green Field the BSC to update the status of the BSC smart contract so this kind of the model can used you know um to tokenize the the the data um on the on the Green Field as a nft so the nft can also you know allow the users to exchange the nft to change the ownership or permissions just like for example the virtual assess in a game can be tokenized and then can be exchanged in a Global Network um not only assets like nft but also other types of data for example the conversation of NPC in game NPC or screenshots or achievements these kind of things can be also tokenized or exchanged of course the book can also be tokenized you can you you can you can create a SM smart contract to manage the book and sell your book as a token or as nft to the users who can you know get the permission to read the book by you know purchasing the nft so this kind of things can open a new use case of the data tokenization and data business here is the our BMB chain 2024 Outlook um you can see here um because today already in May so basically 40% 2024 has passed of course we have implemented some of them in this road map already um for example the 1bn 1 BNB Paradigm has been implemented it um partially it's still in progress but the interal ability between the BC and op BNB to the BMB smart B&amp;B Green Field has been implemented already the SDK is still in progress but um yeah it it will be fully ready within this year um another thing I want to highlight is that the B&amp;B Fusion uh which is um on ongoing right now uh we are going to discontinue the B&amp;B B engine and the Stream line the whole process uh with the with the BSC so basically you can use the you know you can create validators in the BSC directly without without worrying about the beacon chain anymore and all the staking and liquid staking also the governance can also be natively supported on B&amp;B smart chain and uh I will go deeper about the high performance evm how we are going to um implement it in parallel evm also optimizing the pbss which is the path-based um um database can can simplify and streamline uh and optimize the performance of the of the node um Greenfield 2.0 also in progress uh it is it's going to enhance the development experiences and also increasing the storage provider performance by five times this could increase the whole user experiences and the developer experiences of the Green Field very much another thing I want to highlight is that U um the stability uh is also in in progress we want to just I mentioned we want to increase the you know the the TPS to 10 10K TPS and also the gas limit of the block of the opnb to 200 million per second which is a very large number and can support you know the higher frequent user interactions on the opmb so this is the high level of the B&amp;B chain 2024 Outlook I will go deeper about the technical U you know Innovations what we are trying to do so first um I'm going to introduce the B&amp;B chain PBS which is the proposer and Builder separation and me solution it's a part of the you know the BMB chain Fusion uh just in this uh in this slide um so we are going to introduce the you know the m boost um based solution as a side car to the validators the only difference between the uh the BMB CH PBS and Al the the ethereum PBS is that we do not have the relayer uh in the middle because you know the the the the security model of the BMB chain and also the block time is different from the ethereum so we we just only have the the setar of the validator which is the you know the proposer and Builder separated so users or an Traders can send transactions through the Searchers um to the Builder as a private you know orderflow to the to the m boost um and the validators directly so these kind of things can protect users from attacking like the sandwich attacking or front running or backand running attacks and make the me or block space Market more transparent so this is the detail you know the the detailed um process of the PBS of BMB Chan so every builders in this p in this Paradigm uh in this uh um process every Builders has to you know register with the validators first before it can submit a beat to the different validators actually each Builder can separate uh register itself for different validators and uh after the registration the Builder can submit a beat and uh through the me Sentry which is a protection between the validators and the public network and the me centry will forward that request to the validators and the validators will select the most profitable beat from different Builders to uh you know to decide which which block will which transactions will be included in in the next block and uh it will retrieve the transactions of the build after you know if the bid is selected and retrieve the transactions and uh the me centry will append payment transactions um you know to pay the validators to include the transactions of course the build the validators also execute the transactions in the bid to verify um all the transactions were uh is is in good shape and notify the builders if something is wrong and uh if everything's fine it will seal a block into the into the B&amp;B chain block in the BSC so you can see here on the right hand um um you can see that MV Sentry it's in the middle between the builders and the external U Builders of vors and external Builders of course the M Sentry is is optional um is optional of course you can just directly connect you with the builders to the validators it depends on you know how the build is implemented we can provide the you know the flexible solutions to the Builder developers as well um this is a use case of the PBS which is uh we call the EA gasless solution um um it's not only for the BSC but also for the opnb because I know the opnb right now has a centralized the sequencer of course you can we can also separate the you know the Builder and the sequencer as a proposer for the opv as well so the logic is same for the BSC and opnb so from this point of view uh from as a web three users you can you know um make a transaction without a gas fee right for for free so this transaction will be included as a bundle by the pay Master service which is the RPC endpoint um then forward the bundle to the Builder and the Builder will you know include the transaction bundle into the block as and seal the block and propos to uh sent to the Builder or sent to the proposer to to includ it in the next block so that's the reason why we can implement the gas L solution for the users this is very useful because we believe that you know the EA will last for at least one or two years in the future or even longer um before the smart contract will be the first assistant so we want to have this kind of the solution to help the you know the the projects to build the gasless solutions for their users even the user are using metamask or uh trest wallet or any other traditional you know the EA account this kind of things can be covered um yeah this is another thing I want to highlight is the the B&amp;B blob storage solution which is different from ethereum because um different from ethereum the B&amp;B chain will only have the execution we do not have the you know the consensus layer just like ethereum so the blob will be saved in the execution layer client as well so you can see here the set car and the verification extra data actually is in the client execution layer of course we do have the separate transaction one is the laxy transaction pool another thing is the blob transaction pool so Layer Two transaction a ler to sequencers or any blob the users that they can you know um send the block BL transactions to the execution layer execution client of the BC to include the blob data um same as the ethereum The Blob data will be saved in the on the on chain for uh for while and then will be deleted it's not a permanent storage just like the ethereum um on the B&amp;B Greenfield we also provide a proxy service to provide the permanent solution of the of the lob data to guarantee the you know the pruned blob data can be permanently retrieved from a service this kind of things has been implemented and uh for any chain who are going to use the you know the the the old block data can also use that kind Pro proxy service that which is built on top of the BMB Greenfield but for the layer two on top of the BC I think the current level of the data is enough and uh they can build layer too on top the BSC easily and reduce the cost of the Leer 2 as well so this is um already online in our test net of the BC it will be online in June um in mnet so basically all the Leer two of the BC will enjoy the benefits of The Blob carrying transactions to reduce the cost even further so next I want to uh introduce the parallel EVN um I think the parallel parallel evm is not a new thing actually it's just a you know um this is the high level introduction of how the parallel evm works so basically the transaction pool the execution instance will pick up the transactions and execute the transactions and uh subit the transaction result um but the parallel actually is difficult to implement this because not all the transactions can be run without a conflict so there must be a conflict detection mechanism in before the transaction result will be passed to the state DB so if there is a transaction conflict um for example if I I transfer my token to one of the friend and uh then I transfer the same token to another friend this kind of the two transactions is conflict each other so it cannot be run in parallel so the conflict detection will find that hey guys this two this two transaction are conflicting each other you have to re rewind again right so this kind of mechanism is the bottleneck of the parallel evm so how are we going to solve this problem um for BMB Chen we do have different um version of the parallel V in this parad in in this paragraph paragram you can see that we have 1.0 1.0 plus and 2.0 so we are going to implement in different stages so parall evm one and E one one point plus has been implemented in in last year so in this in this par uh in this um diagram you can see the feature in Gray and in yellow has been implemented already for example the the uh the transaction execution the conflict detection dispatcher this kind of things and faster IPC and state state parallel State DB has been online what we are trying what we are doing right now is the version 2.0 actually including the dispatcher 2.0 and the conflict detector the new version of conflict detector and streamline p and streaming pipeline SLE will be implemented in this version so how it will be look like after the the new version has been online so it is kind of the hint generator it's it's kind of the hint based parallel EV EVMS so basically we will use uh you know utilize the external hint generator from the transaction pool to detect the potential conflict the hints and forward the hints to the dispatcher so that means the dispatcher before dispatch the transactions to to the execution instances the detection the the conflict will be detected um most I would say most of the conflict will be detected so the dispatcher will know how to dispatch the transactions to the different execution instances it can reduce the you know the the uh the the the possibility of the you know execution conflicts so the conflict detector will also send back the hints to the dispatcher to update the hints on in the dispatcher so this kind of logic will be implemented in new version of the parallel evm which can increase the performance of The Parallel parallel of evm very much so it can reduce the reduce resolve the you know the bottom performance bottleneck and also increase the whole efficiency of the BMB chin ecosystem and in this in this paradig you can also see the state DB also is implemented in the parallel stateb which can have a better performance when we you know execution the transaction in parallel so this is the the Innovations we are bringing to the BMB chain ecosystem within 204 of course you can it's not you know um something out of the you know Innovations we have introduced to the B&amp;B Chen ecosystem you can also find the details from our B&amp;B Chen um forum and also provide your um feedbacks and also your thoughts how to support support the developers more uh better these kind of the you know suggestions or feedbacks are are very welcome so that we can have a deeper discussion in the Forum as well now I'm going to introduce some of the incentives including Financial incentives and non-financial incentives for for the DF developers first is the financial incentives and in ecosystem support uh we do have the M MVB which is the most valuable Builder um program and also we do have the da incentives and the tvl incentives it depends on how how your projects is going to implement it on the BMB chain ecosystem it includes the grounds and kickstop programs and other technical support and uh you know exclusive developer mentorship these kind of things of course Co marketing is also possible so that you can reach out if you are a builder you can just reach out to the bmbg um team and we can Define uh which which incentives is most appropriate for your projects this is the how the most avaluable Builder uh Works actually we do have a two checks one is the founder check and the other one is start start startup check basically um it's some it's a venture Studio the founder check is a venture Studio that commit to incubating um ideas that to address real world needs and start start startup track actually advised new startups to accelerate their growth so this kind of the Builder um most of MVB program uh will help you to build your projects it has already accelerated more than eight projects 80 projects since 2021 this is how Builder grounds Works um you can uh actually just as I mentioned I we provide the financial support and also you know um um nonfinancial support you can also find our ER the focus from our uh wish list which is the GitHub Rebel and uh you can find in our BMB BMB GitHub uh repository to find out what we are trying to focus at this moment from the ecosystem perspective yeah this is the da incentives uh actually we provid the financial support who who can increase exposure and du build on the BC and OPB of course and tvl um which you know amplify the projects to incentive the tvl growth on a b BSC again as I mentioned earlier actually the BSC is our defi Hub which we focus the tvl and and financial applications the opnb actually is our execution layer which focus on the you know high performance execution and the transactions which you know uh it which is the da Focus actually the the the you know the d da and tvl um programs have some you know in re recipients like the kilo X and kinza hooked world of DPN these kind of things you can also find the detail information from our web website also this is the Kickstart and all the projects can get connected with the infrastructure and service providers like the security Auditors cloud service API Etc and you can also find this kind of the essential tools and services our at our um do site finally I'd like to highlight the security of the BMB Chan just I mentioned earlier at the beginning of this presentation actually uh we do have a Avenger do we call it Avenger do actually is a community that unites all the you know our partners to protect the user from you know from hacking or from uh spamming these kind of things um Avenger do also provide the alerts and real-time risk scanner for smart contracts so you can you know use the latest information from Avenger doll to protect your users if you build on on the B&amp;B CH and also the Avenger doll achieved 85% reduction in total Financial losses on the BMB chain last year which is a really really good achievement um compared with other with other chains and uh dmay it's um another thing I want to mention is that it's a d app library that allows users to navigate within the BMB chin ecosystem yeah finally I just put our QR note a QR code here you can scan our QR code to get connected with us um yeah that's pretty much I have right now um yeah this is how the BMB chain looks like and uh again you're welcome to build on top of the BMB chain and also um share your thoughts within our BMB chos uh forum and connect with us for the workshop um I'm going to introduce the wish list of the uh Workshop just to give me a sec can you see that okay so in this Workshop we are going to have two challenges um of course you can see the requirements of the workshop the first thing I want to highlight is that it must be open- sourced and uh the code can be found in the GitHub public reposter and also needs to be devel developed for this Workshop you cannot use the old projects for the uh for the submission and uh another thing is that the smart contract has been deployed to the B&amp;B chain either or on the op BNB and BC both of them are fine of course you can if you can use the BMB Greenfield that's is a bonus as well so here is are the two challenges the first one is the stable coin p ments on the BMB chain so we are looking for a project who can you know develop a onchain payment solutions to facilate the mass adoption so payment solution actually provide a um you know uh better user experiences for the for the non web3 native users for example the users can um loging with their own social media accounts for example the Google account or Apple account and they do not have to worry about the complexities of the web three they can just use it as a normal application and they can recover their the accounts using their email or social media and also enable users making payments effortlessly and if um necessary can the user can also split the bills and uh you can think of think of it as a stable coin focused and we also just mentioned earlier uh we do also have the you know um let me go back to the yeah we do have the gaset solution so if you can integrate the gaset solution into the payment system that will be better for the users that the the you know the non web3 native users do not have to worry about the the gas fees they can just start using it directly so this is the first D Coin payments it it it will be better if you can build a mobile um mobile first application um on on Android or iOS so it depends on what what your target you know users are um The Challenge two actually is a little bit more complex it's we call it onchain credit system for the BMB chain so the the usage of this application is to you know provide a references or provide a snapshot for the users who have the you know active engagement with the BMB chain so for example if I'm a user if I make a transaction on the BMB chain including the BSC op BNB or B&amp;B grain field for example if I upload the file to the BNB Greenfield or if I make a swap on a BSC or make a transaction or call a smart contract to update the state of the B&amp;B so these kind of things can be used to calculate the credit for my for my account so the the credits can be used um for air job or any other act um promotion campaign that if I want to do a air job I can know which accounts are most active we can define a reasonable thread hold who can claim the tokens for which project these kind of things can have a transparent data and um another thing I want to highlight is that developers contribution also be included for example if I can define a list of repository if anyone contribute to the to the repository of the BB chain U this kind of efforts can also be you know calculated uh for the can can also be counted for the credits for the Future air job so this is a challenge number two it is I know it is better U that you can build this kind of the credits on chain um but I know this kind of things could be more expensive offchain solution is also you know um acceptable yeah this is the two challenges we have for this Workshop of course it is open for any new idea or useful idea for on top of the B&amp;B chain so you do not have to restrict yourself to these two challenges you can also have other innovative solutions or projects on the B&amp;B chain so the key point is that if you build your application or projects on on the op on the BMB CH that will be acceptable for this Workshop yeah this is two challenges just two Focus we want to um give you a reference so what we are trying to looking for uh we what we we are trying to solve the BMB Chen from the ecosystem just for your references here yeah um that's all I have um any questions you can just put into the I'm sorry I cannot hear you but I you know you can put the questions in the in text there's any questions feel free so if no other questions um I think we can conclude here yes it looks like there's no questions thank you Jimmy so much for walk through and amazing um talk and we're super excited to have B&amp;B with us so we are super excited to see both you guys at the at the hackaton and we are super excited to see hackers and what they come up with during the hackaton itself thank you for staying tuned in and see you soon thank you guys see you the byee Great
