NEAR VISION #5: How NEAR Works
Last time, we have learned about how Near blockchain works. Today we’ll find out how Near works and the elements of Near’s platform.
NEAR VISION #6 will be on @insight_near soon. Stay tune.
How NEAR Works
NEAR provides a community-operated cloud infrastructure for deploying and running decentralized applications. It combines the features of a decentralized database with others of a serverless compute platform. The token which allows this platform to run also enables applications built on top of it to interact with each other in new ways. Together, these features allow developers to create censorship resistant back-ends for applications that deal with high stakes data like money, identity and assets and open-state components which interact seamlessly with each other.
These application back-ends and components are called “smart contracts,” though we will often refer to these all as simply “applications” here.
The infrastructure which makes up this cloud is created from a potentially infinite number of “nodes” run by individuals and organizations around the world who offer portions of their CPU and hard drive space — whether on their laptops or, more likely, professionally deployed servers. Developers write smart contracts and deploy them to this cloud as if they were deploying to a single server, which is a process that feels very similar to how applications are deployed to existing centralized clouds.
Once the developer has deployed an application, called a “smart contract”, and marked it unchangeable (“immutable”), the application will now run for as long as at least a handful of members of the NEAR community continue to exist. When end users interact with that deployed application, they will generally do so through a familiar web or mobile interface just like any one of a million apps today.
In a centralized cloud hosted by Amazon or Google, developers pay for their applications each month based on how much usage they required, for example based on the number of requests generated by users visiting their webpages. The NEAR platform similarly requires that either users or developers provide compensation for their usage to the community operators of this infrastructure. Like today’s cloud infrastructure, NEAR prices usage based on easy to understand metrics that aren’t heavily influenced by factors like system congestion. Such factors make it very complicated for developers on alternative blockchain-based systems today.
In a centralized cloud, decisions are made unilaterally by the controlling corporation. The NEAR community-run cloud is decentralized so updates must ultimately be accepted by a sufficient quorum of the network participants. Updates about its future are generated from the community and subject to an inclusive governance process which balances efficiency and security.
In order to ensure that the operators of nodes — who are anonymous and potentially even malicious — run the code with good behavior, they participate in a staking process called “Proof of Stake”. In this process, they willingly put a portion of value at risk as a sort of deposit which they will forfeit if it is proven that they have operated improperly.
Elements of the NEAR Platform
The NEAR platform is made up of many separate elements. Some of these are native to the platform itself while others are used in conjunction with or on top of it.
The NEAR Token
NEAR token is the fundamental native asset of the NEAR ecosystem and its functionality is enabled for all accounts. Each token is a unique digital asset similar to Ether which can be used to:
1. Pay the system for processing transactions and storing data.
2. Run a validating node as part of the network by participating in the staking process.
3. Help determine how network resources are allocated and where its future technical direction will go by participating in governance processes.
The NEAR token enables the economic coordination of all participants who operate the network plus it enables new behaviors among the applications which are built on top of that network.
Other Digital Assets
The platform is designed to easily store unique digital assets which may include, but aren’t limited to:
- Other Tokens: Tokens bridged from other chains (“wrapped”) or created atop the NEAR Platform can be easily stored and moved using the underlying platform. This allows many kinds of tokens to be used atop the platform to pay for goods and services. “Stablecoins,” specific kinds of token which are designed to match the price of another asset (like the US Dollar), are particularly useful for transacting on the network in this way.
- Unique Digital Assets: Similar to tokens, digital assets (sometimes called “Non Fungible Tokens” (NFTs) ranging from in-game collectibles to representations of real-world asset ownership can be stored and moved using the platform.
The NEAR Platform
The core platform, which is made up of the cloud of community-operated nodes, is the most basic piece of infrastructure provided. Developers can permissionlessly deploy smart contracts to this cloud and users can permissionlessly use the applications they power. Applications, which could range from consumer-facing games to digital currencies, can store their state (data) securely on the platform. This is conceptually similar to the Ethereum platform.
Operations atop the platform which require computation, network usage or storage require payment to the platform in the form of fees which the platform then distributes among its community of validating nodes. These operations can include the creation of new accounts, the deployment of new contracts, the execution of code by a contract and the storage or modification of data by a contract.
The platform can be interfaced with permissionlessly. As long as the rules of the protocol are followed, any independent developer can write software which interfaces with it (for example, by submitting transactions, creating accounts or even running a new node client) without asking for anyone’s permission first.
The NEAR Development Suite
The NEAR platform is designed to be used independently and permissionlessly but a set of tools and reference implementations is being created to facilitate its use by those developers and end users who prefer them. These tools include:
- Gitpod for NEAR: NEAR uses existing technology Gitpod to create zero time onboarding experience for developers. Gitpod provides an online “Integrated Development Environment” (IDE), which NEAR customized to allow developers to easily write, test and deploy smart contracts from a web browser. The NEAR Examples website contains templates that can be deployed in one-click to make the process of building on NEAR for both new and old developers as simple as possible.
- NEAR Wallet: A wallet is a basic place for developers and end users to store the assets they need to use the network. NEAR Wallet is a reference implementation that is intended to work seamlessly with the progressive security model that lets application developers design more effective user experiences. It will eventually include built-in functionality to easily enable participation by holders in staking and governance processes on the network.
- NEAR Explorer: To aid with both debugging of contracts and the understanding of network performance, Explorer presents information from the blockchain in an easily digestible web-based format.
- NEAR Command Line Tools: The NEAR team provides a set of straightforward command line tools to allow developers to easily create, test and deploy applications from their local environments.
All of these tools are being created by the community in an open-source manner so they can be modified or deployed by anyone.