Bridging on-chain and off-chain data in NFTs with Fauna

Navigating scalability and security in decentralized NFT marketplaces

NFT architecture

Storing, accessing, and distributing data in NFT dApps fall on a spectrum between being completely on chain and partly off chain. Because NFTs are minted on a blockchain, NFT marketplaces and creators must make decisions that are inevitably mediated by the blockchain trilemma of scalability, security, and decentralization. As such, NFT marketplaces like OpenSea, Rarible, and NBA TopShot, while all leveraging a Layer-1 platform like Ethereum for consensus and hosting the smart contract, must also host other forms of data that aren’t always suitable for a blockchain. NFT marketplaces and creators are exploring a range of solutions to how to best navigate this balance between on-chain and off-chain data, with some combination of metadata and media being stored on-chain or off-chain.

Fauna’s approach to off-chain NFT data storage

Let’s review a common NFT marketplace use case, with metadata containing user login and image information residing in an off-chain database.

  • Temporality
  • GraphQL Interface
  • ABAC

Off-chain storage concerns for NFT marketplaces and how Fauna addresses them

Posterity, long-term permanence and data redundancy

One of the biggest advantages of storing data on chain is the promise of permanence; off-chain data storage methods could lead to NFT owners with a smart contract that has a link to unavailable content. Fauna is a distributed, ACID compliant database — ensuring that any data written to the database is distributed across multiple nodes to guarantee consistency.

Ease of use

Fauna natively supports GraphQL and doesn’t require any database administration. Having GraphQL support makes it simpler for developers to use Fauna alongside blockchain tools like The Graph (which also supports GraphQL), enabling dApps to interoperate between off-chain and on-chain data using GraphQL — all while leaving provisioning, sharding, scaling, and other time-sensitive server administration to Fauna.

Fine-grained data security

NFTs must achieve high security and reliability across their data storage systems and avoid exposing private data in all chains and databases. Attribute-based access control (ABAC) enables dApp teams to have confidence that they can store sensitive user information like wallet addresses in their off-chain databases securely alongside the rest of their application data.

Advanced indexing

Fauna provides powerful indexing capabilities that improve the performance of searching, sorting, and combining results from multiple tables or collections. This ensures that users of dApps aren’t hit with high latency from their off-chain databases when querying between on-chain and off-chain data. This is particularly important when building latency-sensitive applications like an NFT marketplace.

How Fauna solves your off-chain database needs and requirements

Fauna provides a seamless, interoperable environment for your NFT off-chain data needs. Fauna is a document-relational database delivered as an API — you don’t have to worry about any infrastructure operations, and it’s automatically globally distributed as your user base grows. It empowers developers with the essential capabilities needed to build reliable and scalable off-chain storage for NFTs and ship apps faster.

How to get started with Fauna

Fauna is easy to use and quick to get started. Sign up for our forever free pricing plan to explore all the capabilities and start building! If you want to discuss your NFT use case with us or need more assistance, please reach out to us. We’re excited to see what problems you solve for your customers and partner with you in your journey!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Fauna Inc

Fauna is a distributed document-relational database delivered as a cloud API.