Nirvana Labs — Enlightening Blockchain Infrastructure

Engineering @ Nirvana Labs
Nirvana Labs
5 min readNov 15, 2022

--

Why Did We Do It?

What defines decentralization? Is a blockchain really decentralized if the majority of nodes in the ecosystem ultimately are controlled by one party? At the time of writing this, 67% of Blockchain nodes run on AWS Cloud. As web3 engineers, we wanted a tool that we and our peers could use to build web3 applications quicker and cheaper.

We looked at the available options in the marketplace and after months of testing them, using them in production and spending tens of thousands of our money and clients’ money on these off-the-shelf solutions we found that many had:

  • Pricing models that did not scale. They became too expensive to justify the cost of the service.
  • Experienced unexpected total outages and suffered from bandwidth loss during times of high traffic demand
  • Used the same data centers as their upstream compute provider so many of the outages happened to all providers at once, thus incorrectly shifting the blame to the Blockchain itself.
  • The APIs and SDKs between each service provider differed greatly and integrations between them are none to few. Requiring you to buy multiple services to build one dApp
  • SDKs and APIs would receive unstable updates and breaking changes with little to no heads-up to the developers using the products
  • The latency, data accuracy and bandwidth were poor to suboptimal throughout all of the existing services especially when querying off-chain or semi-off-chain data.
  • Global computational coverage was lacking. All providers only utilize a few data center regions in the US and very few in Europe. This leaves all “The Rest of the World” having to deal with latency issues.

What Do We Offer?

Nodes as a Service

When building a decentralized application (dApp), companies must be able to send and receive blockchain transaction data at a massive scale. The quickest and most accurate way to get this data is through a blockchain node.

Running a node is easy enough for a developer with some Linux experience. Maintaining 100% uptime, globally low response latencies and ensuring node security remains very difficult. In order for lean blockchain startups to grow, they must usually outsource this service versus staffing, deploying and managing a network of nodes themselves.

Of course, blockchain data providers such as Moralis, Infura and Alchemy offer you the option to take this worry off of your hands. But what have you really done there? You have added a new dependency to your decentralized application. Your dApp now entirely depends on this vendor to provide correct and timely data in order to function.

We’ve mitigated this dependency risk by first vertically integrating our entire infrastructure stack and cutting out any middle-men that bottlenecked our performance, latency or overall just created a centralized point of failure in our system. We added multi-regional data redundancy in case of natural disasters or wide-scale outages. The biggest constraint during construction was to maintain a cloud-agnostic solution. We don’t even have an AWS account. We’ve taken the time to configure everything from scratch at the bare metal level and we’ve used some next-level virtualization tech as a cherry-on-top.

The results: Our pricing, performance, uptime and security have set a new standard for what’s possible.

IPFS Storage Clusters

Need to store your NFT metadata somewhere? Okay but wait, you have thousands of users around the world that want to see your NFTs as soon as they drop!? Well, I can say from personal experience, that’s easier said than done when you’re using existing solutions. Web3 storage providers such as Pinata, NFT.storage, and web3.storage all have something in common: they lack a competitive pricing structure to compete with web2 storage providers, especially in relation to bandwidth. (gigabytes per dollar). This is the main reason NFT collections have issues with metadata availability at launch time.

How’d we solve this one? Surely running an IPFS node should do the trick right? Wrong. When considering scalability, the node is just one small part of the entire equation. To start with, there must be a robsut gateway in between the IPFS node and the user to be able to handle multiple users at once. The further the user is from the geographic location from the IPFS node, the higher their response time. Additionaly the node operator must enable and maintain security using a firewall and file scanning service. Now let’s multiply this by 10,000 NFTs and 5,000 NFT viewers (users that want to see your NFT). Each provider is different but every single one will start hitting rate limits and bandwidth limits very quickly.

Try comparing our IPFS storage costs with Pinata or even compare it with AWS block volume cost. It’s immediately apparent that Nirvana Storage allows dApp developers to serve metadata to more users for less money. Since all metadata is replicated across all nodes in our global cluster the moment they are uploaded, a developer can pin a 4k video form California to IPFS and then serve it to users in Japan in UNDER A SECOND.

ChainQuery — Next-Gen NFT API

We combined both our blockchain and storage nodes to create the ultimate NFT Indexer API. Query data about any NFT from any marketplace on any of our supported blockchains. Need to get the metadata for all 10,000 NFTs in the collection? All at once? Do you need a list of all current and historical NFT owners with spot prices? Would it be handy to get a news feed of relevant news articles and blog posts about a specified NFT contract? Do you want to know the rarity of an NFT immediately after mint? All of this is now possible with the ChainQuery NFT API. Everything you need in one API so you don’t have to buy 2 or 3 separate NFT API services to build one dApp. Unlike our competitors, we offer this as an a-la-carte option. If your dApp doesn’t need NFT data then you shouldn’t need to pay for that. Vice Versa, if your dApp only needs NFT data then why buy a node? You can just get the NFT API as a standalone product! No node required!

Looking to the Future

Now that we’ve properly decentralized our blockchain data service, the next step is to decentralize ourselves. Yes, eventually Nirvana Labs will become a protocol. The blockchain and token utility will not be decided until we have established ourselves a noteworthy and reputable name in the Web3 space.

Our process of “Gradualized Decentralization” allows us to build freely and incrementally, solving more intricate and smaller problems on our path to full decentralization. More importantly, we don’t box ourselves into a protocol that we must then build around to fit our constraints.

Help us enlighten blockchain infrastructure so web3 developers can build a better world! Soon enough, your smart fridge will host nodes and hold snacks at the same time. 😉

--

--

Engineering @ Nirvana Labs
Nirvana Labs

Our mission is to make blockchain infrastructure economical and accurate, ultimately lowering the barriers to entry for web3 engineers.