Hey PioNEARs š,
In this post, I'll talk about the NEAR protocol, how it works, its token, and why I'm getting involved in the ecosystem. Iām new to the NEAR ecosystem, so I decided to challenge myself to write daily about the NEAR ecosystem until Nearcon on September 12th.
Today is day 1, so of course, it gotta be NEAR.
Note, I am not a dev, just a nerd, so don't expect any lines of code here.
So what is NEAR?
NEAR is a blockchain with smart-contract support that launched its mainnet in 2020. NEAR is focused on addressing common challenges with existing blockchains, including usability, scalability, and security. (Sorry, Ethereum, but youāre just too expensive for me when demand is high š)
The journey for NEAR began in 2018 when Alex Skidanov and Ilia Polosukhin came together to build something new: A blockchain for the masses that developers would enjoy building on.
The NEAR mainnet has been running since April 2020, and in March 2021, the team revealed a bridge to Ethereum called Rainbow Bridge. š
One of NEAR's most significant selling points is its ability to process 100,000 transactions per second with near-instant finality.
But how?
First of all, NEAR is a Proof-of-Stake chain. That means it's not constructed by miners racing to find the correct nonce but by a set of validators who hold the native platform token: $NEAR. PoS networks already tend to have higher tps, but NEAR supercharges this through its sharding technique: Nightshade.
Sharding
"Shard" means a small part of a whole. Consequently, as an activity, it stands for dividing a bigger something into smaller pieces. Applied to the blockchain, it means that not every node in the system will process every transaction, but the load will be split and given to groups of nodes (shards) to process. This enables parallel processing and speeds up execution as a whole.
Another way to look at it would be as a blockchain composed of multiple other blockchains (with each shard being it's own). That is what Ethereum is planning to do whenever it ships sharding, and the sharding Zilliqa has already implemented.
Sharding is what we'd call distributing labor in the real world. If you have a big project, you're often better off dividing it into small tasks and having people work on them simultaneously than doing it all together. Ultimately you get more done.
Yet there are some challenges with the traditional approach to sharding, such as safeguarding transactions across shards, preventing malicious attacks, and ensuring data availability.
Enabling consistent, reliable communication between shards is key to addressing these. Fortunately, the NEAR team has found a way to address these challenges with Nightshade.
Nightshade
Unlike other sharding mechanisms, Nightshade splits the blocks into shards, producing a batch of data called chunks. Transactions are contained inside of these chunks. Every block contains the headers of all chunks, therefore, the entire state of all shards.
With every block change, the state of all shards changes.
For users and other participants, that means they never have to download the entire state, nor even a complete logical block.
Intershard communication: whenever a transaction is verified and executed in one shard (letās call it shard A), it is turned into a so-called Receipt. The receipt is sent to the receiving shard to follow through with the part of the transaction on a different shard (Shard B). Upon receiving the receipt, the nodes in shard B then process the transaction and adjust the account balance accordingly. This way, transactions are complete across shards.
Attacks: A worry with sharding systems is that it's easier to take over shards than an entire blockchain. If you want to explore how subsystems can bring down a bigger system, you might enjoy reading up on the Nakamoto Coefficient.
Nightshade reduces the risk of malicious actors bringing entire shards under their control by randomly reassigning nodes in the network after every epoch, usually every 12 hours.
Blockchain is publicly auditable. Anyone can see the new nodes in different shards at the beginning of epochs. Motivated attackers could try to bribe nodes. But even if they manage to prevent nodes from sharing their part of transactions, the network will tick along as long as no critical mass is breached, thanks to how the network handles data availability.
Missing data: Just as our brain manages to fill in the blanks when we are missing information, Nightshade uses an erasure coding algorithm to fill in missing pieces of data. In practice, validators split their chunk into multiple pieces using erasure code. They send it to all the validators in a shard. Once validators receive their respective part, they sign the block. As soon as half of the validators have signed, even the missing data from a few hijacked nodes wonāt make a difference anymore.
Itās worth mentioning that Nightshade is a work in progress and is being rolled out in phases. The last phase, which will unlock infinite scale, is planned to be delivered in Q4 of this year.
What about average Joe and Jane?
Solving scalability is one thing, but the average non-crypto native will probably have other concerns. Barriers to entry are still fairly high in the crypto and DeFi space, and all the technical concepts one has to familiarize oneself with donāt help much.
Itās fantastic that their transfers are fast, but they need to set up a wallet and have NEAR in their wallet first. Regarding onboarding, Near shines with ease of access and a clean, simple-to-use interface. That happens when a Google engineer and a Microsoft software developer BUIDL together.
One of the most significant factors contributing to a more web2 experience might be the human-readable wallet addresses.
Unlike on other networks, users donāt need to rely on third-party providers like ENS but can simply create new wallets using names in the near wallet app.
Technically, this is made possible by each account being a smart contract, making Near one of the few blockchains using a smart-contract-based account model. As a user, you can generate any number of wallets from one seed. š±
This makes sending things across NEAR as easy as sending an email.
For Devs & blockchain projects
Any blockchain ecosystem that wants to make it must attract sufficient developers to build on it. With developers building apps, an ecosystem can quickly attract users, attracting further developers.
Near supports WebAssembly so that developers can port any traditional web2 app over. It also lets developers create new decentralized Apps using languages theyāre already familiar with from traditional web development, such as Java, C, C++, and Rust.
Recently, the Pagoda Team launched a JavaScript SDK, making developing even more approachable.
NEAR Universityš©āš
For anyone new in the NEAR ecosystem, the NEAR university provides courses and certifications to teach them about Web3 and developing on Near. More than 5,000 students are already learning on the platform, and with over 20 courses offered, chances are youāll find something thatās of interest.
Documentation & Tools š§°
Iām not a developer, but even I can tell that NEAR has one of the most holistic documentation in this space, including various tutorials, SDKs, and a big Learn and discover section.
Every week their developer team hosts office hours during which anyone can join and ask development-related questions. Furthermore, there are various events on and off-line to support devs further and explain how different aspects of NEAR work and can be implemented.
Contract Rewards
Itās no wonder that the creators of NEAR, both developers themselves, recognized the challenges for devs working on smart contracts and not necessarily generating sufficient income through the yet valuable work they do. So they came up with a solution: contract rewards. Developers or organizations behind smart contracts will receive 30% of transaction fees of transactions that involve running their contracts.
This creates business models for developers that otherwise wouldnāt have had a way to monetize their work. It also acts as a powerful incentive to develop beneficial smart contracts since the more they are used, the higher their income. šø
NEAR foundation
The NEAR foundation helped launch the NEAR protocol and the ecosystem around it. It uses its financial and operational resources to support ecosystem growth, to fulfill its vision of creating
ā¦a self-sufficient ecosystem of creators, developers, entrepreneurs, community members and tokenholders whose collaborative efforts make the NEAR ecosystem the best place to build massively impactful projects in the Open Web. (NF)
Most fundamentally, the foundation runs a grants program to help projects make their ideas come true. Theyāve allocated already more than $45 million to NEAR ecosystem projects and just recently raised another round to enhance its decentralization further and benefit the ecosystem.
Near Guilds
The ecosystem also incubates a variety of guilds dedicated to different areas. Guilds in this context are communities that are focused on driving and supporting NEAR in areas such as marketing, local growth, development, and more. When you get started working in the space, joining guilds can help you get up to speed, access resources, and simply hang out with like-minded.
A holistic list of the guilds is here. If there is none for your specific area, you can create your own according to your mission and vision. āØ
And then, because ultimately what enables an ecosystem is its native token.., letās talk about tokenomics.
Tokenomics
Just like other native blockchains, NEAR runs with a native token called NEAR. Itās used:
- to provide network security: validators lock up their stake in NEAR, and earn NEAR for their services.
- as a Medium of exchange for services and other activities
- to pay for transaction fees
- as a unit of account.
- as access to storage: any NEAR holder also acquires the right to store a certain amount of data proportional to their holdings on-chain. With 1 Near in your wallet, youāll gain access to 10kb storage.
While the supply is initially inflationary, transaction fees are collected and burned. As the network grows, issuance could eventually become negative, creating negative inflation. š„
An interesting aspect of Near is that validators do not use transaction fees to decide which transactions to include in blocks. If youāve been following the Ethereum ecosystem, you might have heard of front-running, and MEV (Maximal Extractable Value), which both are based on getting one's transactions in faster than others by paying higher fees.
On NEAR, this is impossible, as validators order all transactions based on their hashes and not on how much one is willing to pay. This further contributes to keeping fees low and making the user experience enjoyable. After all, I have yet to meet a person who enjoyed losing money to a sandwich attack or being front-run.
The total supply of NEAR is capped at a maximum of 1 billion. Once all tokens are issued, as the network grows and burns transaction fees, it might even become deflationary.
The elephant in the room ā decentralization
Critics will often point out the lack of decentralization in NEAR. The team is aware that it started pretty centralized with a limited set of validators but is working on increasing decentralization further. The current goal is 100 validators. In addition to that, part of the NEAR community supported by Pagoda, MetaPool, Everstake, OpenShards Alliance, and the NEAR foundation has launched the Stake Wars.
Stake Wars is an online event running until Friday, September 9th, that incentivizes participants to join a Testnet to figure out Chunk-Only block production and how to run a NEAR validator. Chunk-only production will allow more users to start actively participating in the network construction without requiring a high amount of $NEAR from full block producers.
Safe to say that decentralization is a journey for NEAR, and the community is behind supporting a continuous approach to getting there while ensuring nothing breaks. You can also read more on the āRoad to Decentralizationā here.
Overall, NEAR is a fascinating ecosystem with a holistic approach to supporting developers, projects, and communities coming into it. On a personal note, everyone Iāve met so far from the foundation has been tremendously supportive and helpful.
Sure, decentralization is a work in progress, and some people might have a pure philosophical opposition to proof-of-stake (of course, when I was working for a PoW protocol, I had to share that view regardless of my personal views. For me, what matters more is if things are actually working, and useful for others).
I believe that to get Web3 to non-crypto natives, we have to put ease of use and creation of apps, aka supporting devs, first. While I canāt really judge it, Iāve heard many good things from devs directly on the documentation and all the tools provided by NEAR. Also, setting up a NEAR wallet was easy, and sending transactions to it is a breeze thanks to the human-readable address.
All that being said, Iām super excited to get started creating something on NEAR and getting more involved.
Thatās a wrapš Day 1 ā
If you have any suggestions on NEAR ecosystem players I should cover, let me know!