Chains

BNB Smart Chain

Build Web3 dApps effortlessly

BNB Beacon Chain

Sunset soon

BNB Chain ecosystem’s staking & governance layer

DocumentationGitHubFaucetStake BNBBscScanBSCTraceDev ToolsLearn more about FusionDocumentationBeacon Chain ExplorerStake BNBDocumentationGitHubFaucetBridgeGreenfieldScanDCellarDev ToolsDocumentationGitHubFaucetBridgeopBNBScanDev ToolsDocumentationGitHubFaucetBridgezkBNBScanMarketplace

Developers

Developers

Start building on BNB Chain

Start Building
Developers
BNB Smart ChainBNB Beacon ChainBNB GreenfieldopBNBzkBNBDAU Incentive ProgramTVL Incentive ProgramKickstartMVB Accelerator ProgramBuilder GrantsSpace BMEME Innovation ProgramSee All Programs
Contact UsStart Building
Contact UsStart Building

Deep Dive: Programmable Access Control of BNB Greenfield

2023.11.21  •  8 min read
Blog post image.

BNB Greenfield introduces an entirely new structural and economic paradigm for data in the Web3 era. The ownership, usage and monetization of data is now possible first and foremost for users, as well as all participants in the BNB Chain ecosystem.

The ability to programmable configure permissions on data in a native smart-contract-enabled environment is the mechanism that enables myriad potential business models that will benefit users and other BNB Greenfield participants.

Problem Statement

Customized access control in a decentralized storage network presents a complex challenge. There is no centralized authority or single entity responsible for managing access permissions.

Instead, data is distributed across multiple nodes or participants in the network, making it challenging to establish uniform and fine-grained access controls. Striking a balance between tailored access and network security remains a significant hurdle in distributed environments. 

On the other hand, the lack of programmable access control design impedes the development of Datafi and Socialfi dApps like NFPrompt and Friend3

  • A well-crafted prompt is aligned with NFPrompt user's intentions and helps to steer the AI model in the right direction and encourages it to produce content that is contextually appropriate and coherent. Bundling AIGC trading with prompts is vital to ensure the content's relevance, transparency, and ethical use while also preserving the content creators' rights and intentions. It enhances the overall quality and reliability of AI-generated content in the marketplace. 
  • Access control in Friend3 is essential not only for preserving user privacy and security but also for ensuring compliance with regulations and providing a secure and user-friendly experience in the context of decentralized finance and social interactions. A well designed access control can help filter and moderate content, ensuring that only legitimate and safe content is visible to users. This is especially important for preventing scams and misinformation.

Why Choose BNB Greenfield? 

The main aim of BNB Greenfield is to provide users and dApps with a secure and decentralized storage solution that largely targets the shift of complete control and ownership of data into the hands of the owners.

Based on cutting-edge decentralized technology, BNB Greenfield aims to be the flag bearer in the realms of data ownership and data economy. By facilitating decentralized data management and access, BNB Greenfield aims to transform the landscape of the data economy by streamlining the storage and management of data using advanced encryption systems.

  • Simplicity: The design prefers this first principle over the other considerations. Simple solutions are not only easy to implement, run, maintain, and extend, but also friendly to software performance, which is a main goal of the design. For example, high computing-intensive proof, like what Filecoin adopts, is ruled out according to this principle.
  • Open platform: The biggest lesson learned from the crypto industry and BNB ecosystem is that the community have the most talent and power to build more applications and infrastructure in different self-driven ways. The design should focus on the core platform and technical foundation that provide enough interface, tools, and other facilitation to the developer community to build upon them.

Cross-Chain Programmability

The communication between BNB Greenfield and BSC is achieved through three layers. 

  • The Cross-Chain Communication Layer handles and verifies communication packages between BSC and Greenfield blockchains, ensuring smooth and secure information transfer. 
  • The Resource Mirror Layer manages resource assets on Greenfield, mirroring them onto BSC. Users can interact with these assets on BSC using smart contracts based on Greenfield's primitives, enabling seamless cross-chain asset management and resource allocation.
  • At the top, the Application Layer consists of community-developed smart contracts on BSC, allowing them to operate the mirrored resource entities on the Resource Mirror Layer. While Greenfield itself lacks programmability, the Application Layer can interact with Greenfield Core and supporting infrastructures, empowering developers to create innovative decentralized applications and leverage Greenfield's robust infrastructure and cross-chain capabilities.

The advantages of this design include increased flexibility and control over decentralized storage on BNB Greenfield for all dApps on BSC. By transferring control to the BSC smart contract, mirroring leverages BSC's smart contract functionality to enhance the functionality and interoperability between the two platforms, enabling seamless management of objects on BSC while preserving data integrity on BNB Greenfield.

Comparison

In the field of decentralized web technologies, IPFS and Storj offer robust solutions with distinct focuses. IPFS employs Gateway Access Controls through PinataPinata to safeguard decentralized content retrieval, featuring access tokens, IP address restrictions, and host origin restrictions for flexible access management.

These controls strike a balance between openness and security. Storj, on the other hand, prioritizes data security and privacy, employing end-to-end encryption and erasure coding for global data distribution.

Unique object encryption and decentralized, capability-based access control enhance flexibility in data storage and retrieval. Lit Protocol, in conjunction with Bundlr for Arweave, leverages threshold cryptography for encrypting static content, unlocking on-chain conditions, and authorizing network signatures, providing versatile data encryption and storage options.

Lighthouse, designed for permanent file storage on the Filecoin network, introduces an encryption layer and access control to address concerns about the public accessibility of data on Filecoin and IPFS. BLS threshold cryptography ensures data consistency and resistance to attacks, with decryption keys generated and fragmented at the user's end for enhanced security.​​


Greenfield

IPFS

StorJ

Lit Protocol

Lighthouse

Smart Contract Support

EVM capability on BSC via native cross-chain mechanism

No

No


SmarWeave


FVM


Model

Capability-based access control

Rule-based access control

Capability-based access control

Cryptographic access control

Cryptographic access control


Scalability

Inherently scalable, well-suited for dynamic, distributed, and large-scale environments.

relatively scalable, especially in large organizations with well-defined roles. 

Inherently scalable, well-suited for dynamic, distributed, and large-scale environments.

Can scale depends on consensus mechanism 

Can scale depends on consensus mechanism 

Greenfield's Trinity Architecture

The image below illustrates the general architecture of the BNB Greenfield. This structure is termed as Trinity because of its architecture's three major components: the BNB Greenfield dApps, BNB Greenfield Core, and the BNB Smart Chain (BSC).

Source: https://www.bnbchain.org/en/blog/why-bnb-greenfield-is-the-ultimate-storage-solution 

The three components in the Trinity architecture hold the following functionality:

  1. The BNB Greenfield Core is actually comprised of the BNB Greenfield blockchain and the SPs. It accepts requests and observations, on behalf of the users, from the Greenfield dApps. It also receives directives from BSC to work together for various business situations.
  2. The BNB Greenfield dApps component facilitates user demands by assisting in creating, reading, and executing data on the BNB Greenfield, Greenfield Storage Providers, and BNB Smart Chain. These are decentralized applications that can either be client toolings or applications using Greenfield systems as their infrastructure. These applications will use blockchain addresses as user identifiers and interact with features and smart contracts on the Greenfield blockchain, Greenfield SPs, and BSC.
  3. The third component is cross-chain communication with the BNB Smart Chain, which is responsible for accepting data assets that are transferred from BNB Greenfield, thus offering more business scenarios via smart contracts to new classes of Greenfield dApps.

The consumers can, directly and indirectly, access the three members of the Trinity architecture, allowing the developers full control over the architectural design of the applications.

Permission Models

Greenfield data resources, such as objects, buckets, payment accounts, and groups, require specific permissions to be accessed. These authorizations dictate the actions that can be taken by each account. Overall, the interface semantics of the permission module are similar to S3.

The permission module on the BNB Greenfield blockchain introduces innovative mechanisms for managing access control within its storage network. It operates on a sophisticated set of rules that govern who can access and manipulate data resources such as files, buckets, and payment accounts. The system is designed to grant specific permissions to individual accounts or groups, allowing for a granular and secure management of data operations. Notably, the permissions metadata are recorded on the blockchain, offering transparency and immutability. 

Principal

Effect

Actions

Resources

Duration

Accounts/Groups

Allow/Deny

UpdateBucketInfo

DeleteBucket

… …

Bucket

Customized

Accounts/Groups

Allow/Deny

CreateObject

DeleteObject

CopyObject

GetObject

ExecuteObject

… …

Object

Customized

Accounts/Groups

Allow/Deny

UpdateGroupMember

DeleteGroup

… …

Group

Customized

Data Marketplace Demo

Smart Contract SDK

This demo is developed with Smart Contract SDK, designed to facilitate the development of community-driven projects. The SDK serves as an upper layer wrapper for the

Greenfield-Contracts library, which implements the cross-chain communication functionality. By providing a user-friendly interface to the underlying interface, the SDK simplifies the development process and enables developers to create and manage a variety of greenfield resources, like bucket, group, and object on BSC through smart contract directly.

Data marketplace is a data exchange platform where users can freely create, list, trade, and sell data assets, including digital publications, scientific experimental data, and specific domain data.

Workflow

Data owners can list their assets by following these steps:

1. Create a group on Greenfield

2. Bind group with object or bucket on Greenfield

3. Mirror this group to BSC

4. Approve the data marketplace smart contract to operate the mirrored group

5. List the group on BSC data marketplace smart contract with a price

To buy data asset from BSC:

  1. BSC smart contract add the buyer to the group
  2. Cross-chain to Greenfield to take effect
  3. Then, when the buyer downloads the file, Greenfield can verify that he has the right to download.

Demo Link

  • Mainnet: https://marketplace.greenfield-sp.bnbchain.org/index.html
  • Testnet: https://data-marketplace.gnfd-testnet-sp4.bnbchain.org/index.html

Source Code

Future Work

The future roadmap for Greenfield entails a comprehensive set of improvements, innovations, and features that will reshape decentralized storage and data management.

Expanded Cross-Chain Management Scope

The introduction of the ability to "un-mirror" objects back to Greenfield offers promising opportunities for mirroring BNB Greenfield objects to BSC L2s, like opBNB which is much cheaper and faster than BSC, as well as other blockchains, expanding the ecosystem's interoperability and reach. This potential integration with other blockchains unlocks new possibilities for cross-chain collaborations and data sharing.

Data Version Control

Introducing data version control to enable querying and restoration of historical data versions, enhancing data backup and protection.

Improved Privacy Features

Future enhancements aim to incorporate Zero Knowledge Proof technology, which will bring a new layer of privacy to the permissions, allowing actions to be verified without revealing the identity of the parties involved. This represents a significant step forward in combining blockchain security with advanced privacy-preserving technologies, setting a new standard for permissioned data access in decentralized storage solutions.

Conclusion 

In conclusion, BNB Greenfield's Programmable Access Control emerges as a transformative solution in decentralized storage, reshaping data ownership dynamics in the Web3 era.

Overcoming the complex challenge of tailored access control in decentralized networks, the platform's innovative permission models strike a crucial balance between individualized access and network security. The Data Marketplace Demo showcases the platform's user-friendly interface and the potential for community-driven projects.

Looking forward, Greenfield will focus on expanding cross-chain management, introducing data version control, and enhancing privacy features, promising continuous innovation and improved user experiences.

Follow us to stay updated on everything BNB Chain!

Website | Twitter | Telegram | dApp Store | YouTube | Discord | LinkedIn | Build N' Build Forum | Dev Community|

References:

https://www.bnbchain.org/en/blog/bnb-greenfield-a-new-standard-in-web3-data-ownership-and-utility 

https://www.bnbchain.org/en/blog/why-bnb-greenfield-is-the-ultimate-storage-solution 

https://developer.litprotocol.com/v2/accesscontrol/intro/ 

https://www.bnbchain.org/en/blog/cross-chain-innovation-in-the-bnb-greenfield-programmable-environment 

Share