How NEAR’s Simple Nightshade Gives dApps Infinite Scalability

Published in
7 min read Dec 24, 2021

--

Nightshade: supercharging dApps

Disrupting business models and inventing exciting new ones, there has been a surge of decentralized apps (dApps) making their debut on NEAR Protocol. This swell in dApp developers building on NEAR owes much to its fast transactions, low gas fees, elegant simplicity, and even its carbon-neutrality.

Now that Simple Nightshade is live with its November 15th launch, developers and end users alike stand to benefit even more from this first step (Phase 0) toward a fully-sharded blockchain. Simple Nightshade’s sharding approach is immediate and profound: it presents unmitigated potential for growth and scalability, with faster and simpler user onboarding, much higher transaction volume without sacrificing 1 to 2 second finality, and much more.

Before we get into how NEAR ecosystem developers will benefit from this launch, let’s briefly discuss how Simple Nightshade and sharding work on a practical level.

Simple Nightshade: the first phase of a fully-sharded blockchain

Most blockchains require every node (stakeholders maintaining the network) to store all of the chain’s information as well as process all of the network’s transactions for block production. While keeping the network secure, this requirement can lead to extreme inefficiency and unbearable slowness, as it takes varying amounts of time for all nodes to keep themselves up to date.

Sharding alleviates inefficiency and bottlenecks by partitioning a database into smaller pieces (shards). Nodes are divided into small groups responsible for one part of the chain’s data and are able to process transactions simultaneously. With sharding, the inefficiency of one node verifying transactions in one block is supplanted by multiple nodes verifying transactions in multiple blocks. The result is exceptional speed and throughput on the chain.

In introducing Simple Nightshade at NEARCON 2021, NEAR’s Head of Engineering Maksym Zavershynskyi asserted, “Our super weapon is the ability to do protocol upgrades.” Indeed, over the past 15 months, 20 different upgrades to the protocol have been released. NEAR’s mechanism for stable software releases has been fine-tuned and will be no different with the implementation of a sharding mechanism on the protocol.

NEAR has built a mechanism to split a shard into multiple parts through live upgrades, which will serve as the foundation for dynamic resharding in the future. Simple Nightshade begins its journey with Phase 0, currently live on mainnet. This step introduces sharding of state with the existing mechanism for processing remaining in place. The current state will be split into four shards while having all validators track each shard. Even at the beginning, the throughput of the network will significantly increase.

Sharding paves the way for mass adoption

When it comes to measuring a blockchain’s performance, transactions per second (TPS) is the gold standard. While generalized, it can describe scalability and volume on any chain.

Currently, Bitcoin (BTC) is capable of ~5 TPS and Ethereum 15. In comparison, the centralized VISA payment network processes roughly 1,700 TPS with a theoretical (and previously unattained) maximum of 24,000 TPS. With the introduction of sharding on NEAR Protocol, one shard will be capable of 800–1000 TPS, increased to 2500–3000 TPS once quadratic sharding (four shards) is deployed.

A fully-sharded NEAR protocol would put decentralized applications, from DeFi to NFTs and beyond, ahead of traditional centralized payment networks like Visa, American Express, etc.

Scalability has been one of crypto’s biggest challenges. While many new blockchains claim to have thousands of TPS and many layer-2 scaling solutions, their claims are debatable. While it’s true that they are faster than BTC and other major blockchains, they’re also highly centralized, relying on a much lower number of validator nodes, among other things. And due to their non-sharded designs, they are all likely to hit an upper limit at some point in time.

By implementing sharding, NEAR has the capacity to scale infinitely with the number of shards, quickly satisfying the demand for transactions as users of NEAR continue to grow. This puts NEAR in prime position for mass consumer adoption — up to billions of users. For NEAR-based DeFi dApps, like token launchpad Skyward Finance and token trading platform Ref Finance, sharding will expand throughput to help onboard new users into their token and other financial asset ecosystems.

Ultimately, NEAR’s Nightshade is theoretically limitless (by increasing the number of shards) and will be able to handle millions of transactions per second. Just as critically, future updates to Nightshade will allow more and more transactions to be processed in the same 1 to 2 second timeframe (finality).

What dApps, their developers, and end users stand to gain

Dubbed the Impulse Generation, studies have shown the average human attention span has dwindled to a mere 8 seconds. Infinite scrolling, ever-increasing connection speeds, and the multitude of apps and content competing for attention have trained todays’ tech (and crypto) users to quickly move to the next thing when performance doesn’t meet expectations. The mechanism for sharding and impressive potential for millions of TPS translates to real world gains for dApps, their developers, and end users.

First, developers and end users will experience a boost in overall speed and performance of their dApps, intelligently scaling to keep up with the demand of their user bases. The network’s maximum capacity (which has only reached a top utilization of 13% thus far) will increase fourfold, making its capabilities more robust with added stability. At the same time, with every shard still being validated by all validators, no compromises are being made in terms of security and safety.

Developers using Aurora, for instance, will be able to scale and extend their apps to other platforms while maintaining super-fast transaction speeds. Elsewhere, apps like Paras, Mintbase, Satori, and any other future NEAR-based NFT marketplaces will be able to expand their user bases and NFT offerings exponentially, while trusting that Simple Nightshade’s security protocols will protect their artists’ and buyers’ creative assets.

Gaming ecosystems like OP Games’ NFT-based platform, OP Arcade, also stand to benefit from NEAR’s sharding. With Phase 0 of Simple Nightshade now underway, OP Games and other NEAR gaming apps will continue to welcome loads of new game developers and players, and without any lag in NFT smart contract transactions.

Developers will also be relieved to know that there is no need to upgrade smart contracts with the introduction of Simple Nightshade. As the foundations for these mechanisms were built into NEAR Protocol from inception, upgrades are rolled out on the backend with no disruption. Sharding also increases the speed at which the network can be joined, meaning that a new era of super light clients is just beginning.

Whereas other blockchains create incentives (and consequently headaches) for collocating on the same shard, NEAR’s approach removes these hurdles while maintaining the same low fees and short finality time for each transaction. Intra-shard and inter-shard calls are treated exactly the same, allowing builders to focus on what matters: their dApp and community of users.

The road ahead: unlocking NEAR to infinite scale

Simple Nightshade, Phase 0 of NEAR’s roadmap to a fully-sharded blockchain went live on mainnet on November 15th, 2021. Over 2022, phases 1 to 3 will be realized, with the end goal of the network itself being able to dynamically adjust the number of shards based on utilization with no validators needing to validate all the shards.

This achievement will make NEAR almost infinitely scalable and extremely adaptable to short-term usage spikes.

While the implementation and successful rollout of sharding on-chain is significant, it doesn’t mark an evolutionary dead end for NEAR Protocol. Instead, it marks the finish line of a path with many divergent forks, as a number of improvements on the protocol level are in development, with mainstream usage and adoption in mind.

NEAR is setting the perfect stage for explosive growth as developers and their dApps take advantage of unprecedented security, user-friendliness, and scalability. All elevated by the sharding introduced with Simple Nightshade.

About NEAR

NEAR is a high-performance blockchain that is designed to be super-fast, incredibly secure, and infinitely scalable. NEAR’s vision is to create a network that enables people to re-imagine finance, creativity, and community in new and inclusive ways. NEAR is built by an award-winning team of engineers and entrepreneurs to be simple to use, inclusive and good for the environment. NEAR is backed by top VCs such as A16Z, Pantera Capital, Electric Capital, Dragonfly Capital, Coinbase Ventures, Blockchain.com, and Baidu Ventures.

Join NEAR’s community:

Website | Twitter | Telegram | Discord | Youtube | Medium

NEAR is the network for a world reimagined. Through simple, secure, and scalable technology, millions are empowered to invent and explore new experiences.