Published using Google Docs
What is NEAR
Updated automatically every 5 minutes

What is NEAR? [Work in Progress]

Prerequisite: none
Reading time: 25 minutes

Expected result: basic understanding on how NEAR works from end-user perspective

Intro

NEAR is a decentralized application platform which runs atop the NEAR Protocol blockchain. This blockchain, which runs across hundreds of machines around the world, is organized to be permissionless, performant and secure enough to create a strong and decentralized data layer for the new web.

Essentially, NEAR is a platform for running applications which have access to a shared — and secure — pool of money, identity and data which is owned by their users.  More technically, it combines the features of partition-resistant networking, serverless compute and distributed storage into a new kind of platform.

Brief history

missing

How NEAR Blockchain works

The technology underpinning cryptocurrency. Blockchain is a technology that can safely store transaction records on a peer-to-peer network instead of storing them in a single location. Independent servers around the world, called nodes, make up the network that operates the blockchain.

Blockchain: an incentivized, distributed, permanent, irrefutable record of computation and data

Transaction: a cryptographically signed request for work on the blockchain made up of one or more Actions

Storage: the database (key-value store) maintained by the blockchain and available to contracts for state management

Block: a unit of consensus among validators that includes processed transactions

Chunk: a portion of the blockchain which is processed on a single node (one chunk per node per block)

Epoch: a unit of time during which validators of the network remain constant

Validator: a person or company that maintains a computer which processes transactions on the blockchain using Proof of Stake consensus

Node: a computer, run by a validator, that participates on the network and follows one or more shards

Shard: a piece of the blockchain which operates in parallel to store data, process transactions and achieve consensus. (note: there may be one shard or there may be many, depending on how far the chain has scaled)

Genesis: the launch of the chain which includes at least all validators for the first epoch

Consensus: Consensus protocols are used to reach agreement on a single value between multiple participants in a system. If all network participants collaborate in accordance with the consensus protocol, new values may be appended to the ledger and verified by nodes. However, in the case of disputes, the network may focus on either safety or liveness.
The consensus mechanism implemented on NEAR is called Nightshade. Nightshade models the system as a single blockchain. The list of all the transactions in each block is split into physical chunks, one chunk per shard. All chunks accumulate to one block. Note that chunks can only be validated by nodes that maintain the state of that shard.

Theoretically, each logical block contains all the transactions for all the shards. However, since transmitting a logical block across the network would be prohibitively expensive, it is never initiated. Instead, each network participant maintains the state that corresponds to the shards that they validate transactions for and any additional shard that they want to track.

The consensus is based on the heaviest chain consensus. Meaning, once a block producer publishes a block, they collect the signatures of validator nodes. The weight of a block is then the cumulative stake of all the signers whose signatures are included in the block. The weight of a chain is the sum of the block weights. Additionally, the consensus utilises a finality gadget that introduces additional slashing conditions for higher chain security.

NVM

What is 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:

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.

More on

How to start with NEAR?

Account/Wallet

Watch this video:  https://www.youtube.com/watch?v=2_Ekz7w6Eo4&feature=emb_logo

Before you get started with NEAR, the first thing that you want to do is to set up a NEAR account.

The wallet allows you to make contract calls to the blockchain, set up your local node, and send and receive funds from other users. When you register your Account ID, you have to provide a unique name. Although every wallet has to have a unique name, every user can set-up multiple wallets.

You can imagine this similar to a Facebook or Google account. Once you have registered to either of the services, you can use the same account to log into third-party services. The difference between NEAR Account IDs and Google accounts is that the data, stored against an Account ID, is only accessible and manageable by the owner of the wallet. Additionally, all information is stored on a distributed network of nodes instead of a single server.

More information about Accounts at DOCS.NEAR

Create NEAR account right now: https://wallet.near.org/create

Or read more
https://docs.near.org/docs/local-setup/create-account#set-up-your-wallet

NEAR Explorer

How to get NEAR tokens?

There are 3 ways to get $NEAR

Earn it

You can earn $NEAR by taking part in development bounties, by running a community which helps people build on NEAR, by winning a NEAR hackathon or otherwise being an active part of the community.  If you are able to attract other people to lend you tokens for staking, you can also earn $NEAR by running a validator.

Buy it

$NEAR is available on several major exchanges (see below), where you can sign up and buy the token using either fiat currency or crypto.

Exchanges which list $NEAR

You can see overviews of pricing and pairs on coinmarketcap and coingecko.

https://www.binance.com/en/my/wallet/exchange/deposit/crypto/NEAR
https://www.binance.com/en/my/wallet/exchange/deposit/crypto/NEAR

From a Friend

You don’t have to have a NEAR account to receive NEAR tokens!  The “NEAR Drop” approach allows your friend to pre-fund a new account and send you a hot link to retrieve the tokens.

        

What can I do with NEAR tokens?

Transfer NEAR

Send $NEAR back and forth between accounts of your and a friend and check out the transactions in the Block Explorer. Because transaction fees are very low, you can quickly and easily move very small amounts of $NEAR to play with it.

Send them as a gift on http://redpacket.near.org/

Try a NEAR Drop (Invite a friend)

Send your friend a NEAR drop if they need to create an account.

Use NEAR Apps

To view the growing list of apps being built on NEAR, click here.
Easy start with NFT- purchase/publish/trade art on
https://paras.id/
Play with http://berryclub.io/ to participate in collective art creation: https://berryclub.io/

How much does it cost to use NEAR (Gas)?

When you make calls to the NEAR blockchain to update or change data, the people running the infrastructure of the blockchain incur some cost. At the end of the day, some computers somewhere process your request, and the validators running these computers spend significant capital to keep these computers running.

Like other programmable blockchains, NEAR compensates these people by charging transaction fees, also called gas fees.

If you're familiar with web2 cloud service providers (Amazon Web Services, Google Cloud, etc), a big difference with blockchains is that users get charged immediately when they make a call to an app, rather than developers fronting the cost of using all that infrastructure. This creates new possibilities, such as apps that have no long-term risk of going away due to developer/company funds running out. However, it also comes with some usability speed bumps. To help with this, NEAR also provides the ability for developers to cover gas costs for users, to create a more familiar experience to those coming from web2.

When thinking about gas, keep two concepts in mind:

Gas units: internally, transaction fees are not calculated directly in NEAR tokens, but instead go through an in-between phase of "gas units". The benefit of gas units is that they are deterministic – the same transaction will always cost the same number of gas units.

Gas price: gas units are then multiplied by a gas price to determine how much to charge users. This price is automatically recalculated each block depending on network demand (if previous block is more than half full the price goes up, otherwise it goes down, and it won't change by more than 1% each block), and bottoms out at a price that's configured by the network, currently 100 million yoctoNEAR.

Note that the gas price can differ between NEAR's mainnet & testnet. Check the gas price before relying on the numbers below.

Thinking in gas

NEAR has a more-or-less one second block time, accomplished by limiting the amount of gas per block. The gas units have been carefully calculated to work out to some easy-to-think-in numbers:

10¹² gas units, or 1 TGas (TeraGas)...

≈ 1 millisecond of "compute" time

...which, at a minimum gas price of 100 million yoctoNEAR, equals a 0.1 milliNEAR charge

This 1ms is a rough but useful approximation, and is the current goal of how gas units are set within NEAR. Gas units encapsulate not only compute/CPU time but also bandwidth/network time and storage/IO time. Via a governance mechanism, system parameters can be tweaked, shifting the mapping between TGas and milliseconds in the future, but the above is still a good starting point for thinking about what gas units mean and where they come from.

The cost of common actions

To give you a starting point for what to expect for costs on NEAR, the table below lists some common actions and how much TGas they currently require, and what the fee would be, in milliNEAR, at the minimum gas price of 100 million yN.

Operation

TGas

fee (mN)

fee (Ⓝ)

Create Account

0.42

0.042

4.2⨉10⁻⁵

Send Funds

0.45

0.045

4.5⨉10⁻⁵

Stake

0.50

0.050

5.0⨉10⁻⁵

Add Full Access Key

0.42

0.042

4.2⨉10⁻⁵

Delete Key

0.41

0.041

4.1⨉10⁻⁵

How can I earn with NEAR?

Stake your NEAR

Key to the Proof-of-Stake model is how Validators are supported by the community via Staking. Validators earn NEAR token rewards for operating the nodes which run the network in the form of a static inflation rate of 5% each year, creating new tokens for Validators every epoch (~12 hours) as rewards.

Validators must maintain a minimum amount of Stake to keep their Validator seat. Token holders are able to stake with a particular Validator they believe is performing well for the network and earn a portion of Token rewards generated by the network too. This incentivizes Token holders to stay involved with the community!

The NEAR Wallet now has a staking user interface built directly into the web app.

To Stake:

  1. Select “Staking” from the navigation bar (or dropdown on mobile)
  2. Click the “Select Validator” button
  3. Choose a validator
  4. Confirm your choice and select “Stake with Validator”
  5. Enter the amount of NEAR you would like to stake, and click “Submit Stake”

You will need to confirm two transactions, one to select the validator, and another to deposit and stake with the validator.

To Unstake:

  1. On the staking dashboard (/staking), select your current validator
  2. Click “Unstake” and confirm the transaction

After 36 to 48 hours (3 full epochs), you will be able to withdraw your stake. To do so, return to the validator page, and click “Withdraw”.

More on Staking in Docs

Become NEAR Validator

Ready to develop on NEAR?

Jump on Learn to develop on NEAR.

Further Reading:

NEAR White Paper

Don’t

Share your seed phrase

Sleep on NEAR potential - get on-board right away


FAQ

Feedback

Help us make NEAR better: take 2 minutes to fill this simple feedback form and get a chance to find a nice surprise in your NEAR wallet:

https://8l343cij417.typeform.com/to/BaWOSoUi