Skip to content

Commit

Permalink
Merge branch 'master' into bucanero-arbitrum-1
Browse files Browse the repository at this point in the history
  • Loading branch information
bucanero authored Feb 16, 2024
2 parents fd47a7b + a51d792 commit fdb0934
Show file tree
Hide file tree
Showing 23 changed files with 5,415 additions and 10,224 deletions.
10 changes: 5 additions & 5 deletions docs/1.concepts/3.advanced/papers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ sidebar_label: Papers

Join us as we dive deep into our technology.

[The NEAR White Paper](https://near.org/papers/the-official-near-white-paper/)<br/>
[The NEAR White Paper](https://pages.near.org/papers/the-official-near-white-paper/)<br/>
*This document describes the approach NEAR takes to designing and implementing the core technology of its system.*

[Economics in a Sharded Blockchain](https://near.org/papers/economics-in-sharded-blockchain/)<br/>
[Economics in a Sharded Blockchain](https://pages.near.org/papers/economics-in-sharded-blockchain/)<br/>
*Incentives are a crucial part of any decentralized protocol. In this paper, we review the specific economic decisions that must be made, and the logic behind them.*

[Sharding Design: Nightshade](https://near.org/papers/nightshade/)<br/>
[Sharding Design: Nightshade](https://pages.near.org/papers/nightshade/)<br/>
*This document outlines the general approach to blockchain sharding, the major problems that need to be overcome, including state validity and data availability problems, and presents Nightshade, the solution NEAR Protocol is built upon that addresses those issues.*

[Fast Finality: Proof of Space-Time](https://near.org/papers/proof-of-space-time/)<br/>
[Fast Finality: Proof of Space-Time](https://pages.near.org/papers/proof-of-space-time/)<br/>
*We present a design for a fork choice rule, Sybil resistance mechanism and finality gadget that collectively provide fast finality, resistance to long range attacks, and discourage pooling. The design is based on both proof of stake and proof of space time, and uses a finality gadget similar to Casper FFG.*

[NEAR Randomness](https://near.org/papers/randomness/)<br/>
[NEAR Randomness](https://pages.near.org/papers/randomness/)<br/>
*We present a randomness beacon scheme that is unpredictable and unbiasable for as long as more than 1/3 of participants follow the protocol, is live for as long as 2/3 of participants follow the protocol, doesn’t depend on verifiable delay functions and doesn’t require distributed key generation.*
2 changes: 1 addition & 1 deletion docs/1.concepts/basics/actors.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ Here are some of the best **introductory videos**:

And you can read more in these **educational resources**:
- The [Beginner’s Guide to the NEAR Blockchain](https://near.org/blog/the-beginners-guide-to-the-near-blockchain/)
- The [Official NEAR white paper](https://near.org/papers/the-official-near-white-paper/#design-principles)
- The [Official NEAR white paper](https://pages.near.org/papers/the-official-near-white-paper/#design-principles)
- Blog post on [Thresholded Proof of Stake](https://near.org/blog/thresholded-proof-of-stake/)
6 changes: 3 additions & 3 deletions docs/1.concepts/basics/transactions/gas-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ With this level of complexity, it's no longer useful to walk through an example,
<blockquote className="lesson">
**How much of the gas fee goes as a 30% reward to the smart contract account?**

The NEAR Whitepaper mentions that [30% of all gas fees](https://near.org/papers/the-official-near-white-paper/) go to smart contract accounts on which the fees are expensed.
The NEAR Whitepaper mentions that [30% of all gas fees](https://pages.near.org/papers/the-official-near-white-paper/) go to smart contract accounts on which the fees are expensed.

This amount can be calculated for function calls in two ways:
1. Summing all values in the gas profile
Expand Down Expand Up @@ -78,7 +78,7 @@ Multiplying Ethereum's gas units by gas price usually results in an amount that'

While some of these operations on their surface appear to only be about a 10x improvement over Ethereum, something else to note is that the total supply of NEAR is more than 1 billion, while total supply of Ethereum is more like 100 million. So as fraction of total supply, NEAR's gas fees are approximately another 10x lower than Ethereum's. Additionally, if the price of NEAR goes up significantly, then the minimum gas fee set by the network can be lowered.

You can expect the network to sit at the minimum gas price most of the time; learn more in the [Economics whitepaper](https://near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees).
You can expect the network to sit at the minimum gas price most of the time; learn more in the [Economics whitepaper](https://pages.near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees).

[fungible token]: https://github.com/near-examples/FT/pull/42
[1.1m]: https://github.com/chadoh/erc20-test
Expand Down Expand Up @@ -203,7 +203,7 @@ Developers prefer predictable pricing so they can budget and provide prices for

</blockquote>

To dig deeper into how and why gas works the way it does on NEAR, check out the [Economics](https://near.org/papers/the-official-near-white-paper/#economics) section of the main whitepaper and the [Transaction and Storage Fees](https://near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees) section of the economics whitepaper.
To dig deeper into how and why gas works the way it does on NEAR, check out the [Economics](https://pages.near.org/papers/the-official-near-white-paper/#economics) section of the main whitepaper and the [Transaction and Storage Fees](https://pages.near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees) section of the economics whitepaper.

:::tip Got a question?
<a href="https://stackoverflow.com/questions/tagged/nearprotocol"> Ask it on StackOverflow! </a>
Expand Down
4 changes: 2 additions & 2 deletions docs/1.concepts/basics/validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All transaction fees (minus the part which is allocated as the rebate for contra

## Intro to Validators

[Validators](https://near.org/papers/the-official-near-white-paper/#economics) are responsible for producing blocks and the security of the network.
[Validators](https://pages.near.org/papers/the-official-near-white-paper/#economics) are responsible for producing blocks and the security of the network.

Since Validators validate all shards, high requirements are set for running them (an 8-Core CPU with 16GB of RAM and 1 TB SSD of storage). The cost of running a block-producing validator node is estimated to be $330 per month for hosting. Please see our [hardware and cost estimates page](https://near-nodes.io/validator/hardware) for more info.

Expand All @@ -46,7 +46,7 @@ You can read more about our consensus strategy on our <a href="https://github.co

The Chunk-Only Producer is a more accessible role with lower hardware and token requirements. This new role will allow the network's validator number to grow, creating more opportunities to earn rewards and secure the NEAR Ecosystem.

[Chunk-Only Producers](https://near.org/papers/the-official-near-white-paper/#economics) are solely responsible for [producing chunks](https://near.org/papers/nightshade/#nightshade) (parts of the block from a shard, see [Nightshade](https://near.org/papers/nightshade/) for more detail) in one shard (a partition on the network). Because Chunk-Only Producers only need to validate one shard, they can run the validator node on a 8-Core CPU, with 16GB of RAM, and 500 GB SSD of storage.
[Chunk-Only Producers](https://pages.near.org/papers/the-official-near-white-paper/#economics) are solely responsible for [producing chunks](https://pages.near.org/papers/nightshade/#nightshade) (parts of the block from a shard, see [Nightshade](https://pages.near.org/papers/nightshade/) for more detail) in one shard (a partition on the network). Because Chunk-Only Producers only need to validate one shard, they can run the validator node on a 8-Core CPU, with 16GB of RAM, and 500 GB SSD of storage.

Like Validators, Chunk-Only Producers will receive, at minimum, 4.5% annual rewards. If less than 100% of the tokens on the network is staked, Chunk-Only Producers stand to earn even more annual rewards. For more details about the Validator’s economics, please check out [NEAR’s Economics Explained](https://near.org/blog/near-protocol-economics/).

Expand Down
2 changes: 1 addition & 1 deletion docs/1.concepts/storage/storage-staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you’re familiar with Ethereum’s pricing model, you may know that, like NE

## How does NEAR's design align incentives?

Storage-staked tokens are unavailable for other uses, such as validation staking. This increases the yield that validators will receive. Learn more in [the economics whitepaper](https://near.org/papers/economics-in-sharded-blockchain/).
Storage-staked tokens are unavailable for other uses, such as validation staking. This increases the yield that validators will receive. Learn more in [the economics whitepaper](https://pages.near.org/papers/economics-in-sharded-blockchain/).

## When do tokens get staked?

Expand Down
2 changes: 1 addition & 1 deletion docs/2.develop/contracts/whatiscontract.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: What is a Contract?

Smart contracts are pieces of **executable code** that live in a NEAR account. They can **store data**, **perform transactions** in the account’s name, and **expose methods** so other accounts can interact with them.

![img](/docs/assets/welcome-pages/contracts.png)
![img](/docs/assets/welcome-pages/contracts-landing.png)

Do not worry if you don't know how smart-contract blockchains work. As a developer, it is sufficient to understand that NEAR smart-contracts:
1. Have **limited** computational resources.
Expand Down
2 changes: 1 addition & 1 deletion docs/2.develop/web3-apps/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {CodeTabs, Language, Github} from "@site/src/components/codetabs"

Web3 Applications - also known as decentralized apps (dApps) - leverage [smart contracts](../contracts/whatiscontract.md) and blockchain data to offer **transparency**, **security** and **giving back control** to users over their assets and data.

![img](/docs/assets/welcome-pages/examples.png)
![img](/docs/assets/welcome-pages/examples-landing.png)

NEAR simplifies building Web3 apps for the general public, making it easy to **interact** with different blockchains, while helping to **onboard users** that are not familiarized with crypto.

Expand Down
2 changes: 1 addition & 1 deletion docs/4.tools/fastauth-sdk.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: fastauth-sdk
title: FastAuth SDK
sidebar_label: FastAuth SDK
sidebar_label: FastAuth (Email Login)
---

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion docs/6.integrator/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Please see the [documentation for accounts](/concepts/basics/accounts/model) for

- For exchanges, NEAR supports [implicit account](https://nomicon.io/DataStructures/Account.html#implicit-account-ids) creation which allows the creation of accounts without paying for transactions.
- You can create an implicit account by following the steps in [this guide](/integrator/implicit-accounts).
- Accounts must have enough tokens to cover its storage which currently costs `0.0001 NEAR` per byte. This equates to a minimum balance of `0.00182 NEAR` for an account with one access key. You can query the live storage price using the [`protocol-config`](https://docs.near.org/api/rpc/setup#protocol-config) RPC endpoint. For more details on storage fees see [this section of the economics paper](https://near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees).
- Accounts must have enough tokens to cover its storage which currently costs `0.0001 NEAR` per byte. This equates to a minimum balance of `0.00182 NEAR` for an account with one access key. You can query the live storage price using the [`protocol-config`](https://docs.near.org/api/rpc/setup#protocol-config) RPC endpoint. For more details on storage fees see [this section of the economics paper](https://pages.near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees).

## Transfer from Function Call {#transfer-from-function-call}

Expand Down
2 changes: 1 addition & 1 deletion docs/6.integrator/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ We use a simple binary serialization format that's deterministic: https://borsh.
- Whitepaper

- General overview at [The Beginner's Guide to the NEAR Blockchain](https://near.org/blog/the-beginners-guide-to-the-near-blockchain)
- [NEAR Whitepaper](https://near.org/papers/the-official-near-white-paper/)
- [NEAR Whitepaper](https://pages.near.org/papers/the-official-near-white-paper/)

- Github
- https://www.github.com/near
Expand Down
16 changes: 0 additions & 16 deletions docs/7.primitives/welcome.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/7.primitives/whatareprimitives.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {CodeTabs, Language, Github} from "@site/src/components/codetabs"

Primitives are fundamental building blocks that can be combined to create a fully functional application. Blockchain primitives include [Fungible Tokens (FT)](#fungible-tokens-ft), [Non Fungible Tokens (NFT)](#non-fungible-tokens-nft), [Decentralized Autonomous organizations (DAO)](#decentralized-autonomous-organizations-dao), [Link Drops](#linkdrops) and more.

![img](/docs/assets/welcome-pages/primitives-landing.png)

---

#### Fungible Tokens (FT)
Expand Down
74 changes: 74 additions & 0 deletions docs/8.abstraction/what-is.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
id: what-is
title: What is Chain Abstraction?
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {CodeTabs, Language, Github} from "@site/src/components/codetabs"

The idea behind `chain abstraction` is quite simple: **blockchain** technology should be **abstracted away** from the user experience. In other words, people should **not realize** when they are **using a blockchain**, nor **which blockchain** they are using.

![img](/docs/assets/welcome-pages/chain-abstraction-landing.png)

To help on this task, NEAR Protocol provides services that allow to **create** and **recover accounts** using **email addresses**, use the account **without acquiring funds**, and **control accounts** in **other chains**. All in the most **seamless** way possible.

<!-- ---
## NEAR, the abstraction layer
Do you know how your favorite apps are built and which database they use?. Chances are not, since we choose apps based on their functionality, and not their underlying tech.
While the **same should be true for blockchain apps**, the reality is that apps tend to be defined by its underlying network instead of the problems they actually solve. Moreover, since blockchains tend to be **disconnected**. Accounts from one chain cannot be used on other chains. This is a problem for both users and developers, since their accounts and applications end up locked in a specific chain.
NEAR Protocol provides a set of services that allow to **abstract away** the blockchain from the user experience. This means that users can use blockchain-based application - both in NEAR and **other chains** - without realizing they are using a blockchain. Through a combination of multiple technologies, NEAR allows to create a very simple user flow, in which users can use their email to create an account, start using the account without acquiring funds, and use the same account in other chains.
-->

---

## Fast-Auth: Email onboarding
One of the first barriers that new users face when entering the world of Web3 is the need to create a crypto wallet. This generally implies the need to choose a wallet, create and store a recovery phrase, and obtain deposit funds to start using the account.

With FastAuth, users only need to provide an email address to create a NEAR account. Using the same email address the user will be able to use their account across applications and devices.

:::info
FastAuth accounts are kept safe through multi-party computation (MPC) on a decentralized network. This means that the user's private key is never stored in a single location, and thus it is never exposed to any single party.
:::

<hr subclass="subsection" />

## Relayers: Cover gas fees
Allowing users to start using a dApp without having to acquire funds is a powerful tool to increase user adoption. NEAR Protocol provides a service that allows developers to subsidize gas fees for their users.

This concept, known as "Account Abstraction" in other chains, is a **built-in feature** in NEAR. User can wrap transactions in messages known as **meta-transaction**, that any other account can relay to the network.

:::tip
In NEAR the relayers simply attach NEAR to cover gas fees, and pass the transaction to the network. There, the transaction is executed as if the **user had send it**.
:::

<hr subclass="subsection" />

## Multi-chain signatures: One account, multiple chains
Currently, users and applications are siloed in different chains. This means that a user needs to create a new account for each chain they want to use. This is not only cumbersome for the user, but also for the developer who needs to maintain different codebases for each chain.

NEAR Protocol provides a multi-chain signature service that allows users to use their NEAR Account to sign transactions in **other chains**. This means that a user can use the same account to interact with **Ethereum**, **Binance Smart Chain**, **Avalanche**, and **NEAR**.

:::info
Multi-chain signatures work by combining **smart contracts** that produce signatures, with indexers that listen for these signatures, and relayers that submit the transactions to other networks. This allows users to hold assets and use applications in **any** network, only needing to have a single NEAR account.
:::

<!--
## Chain Abstraction: The holistic view
The combination of these services allows to create a **seamless** user experience, in which users can use blockchain-based applications without realizing they are using a blockchain.
Users will simply login with an email, and a **zero-funds** account will be created for them. No seed phrases to remember, no private keys to safe keep, and no need to acquire funds.
Once having their account, apps can ask the user to create transactions and embed them in **meta-transactions**, which can be sent to any relayer. The relayer will pass the transaction to the network, attaching NEAR to pay for the execution fees. The transaction will then be executed as if the user had sent it, since the relayer is only there to attach NEAR to the submission.
If the user sees another blockchain-based application, they can use the same account to interact with it. For this, a **multi-chain** app can simply ask the user to sign a transaction for another chain, and then relay the transaction to the right network, covering GAS fees.
As an example, this would allow users to collect NFTs across different chains, without ever needing to explicitly create an account or acquire crypto. All with just a single email login.
-->
2 changes: 1 addition & 1 deletion docs/bos/tutorial/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {WidgetEditor} from "@site/src/components/social-widget"

NEAR Components are a new way to build web applications. They are composable, reusable and decentralized.

![img](/docs/assets/welcome-pages/bos-big.png)
![img](/docs/assets/welcome-pages/bos-landing.png)

:::tip
You can login to interact with the examples in this section.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Welcome, this is the starting point for all NEAR documentation. Learn to build a
<a href="/bos/tutorial/quickstart">
<div className="card">
<div className="card__image">
<img src={require("@site/static/docs/assets/welcome-pages/bos-landing.png").default} alt="Web3 Components" />
<img src={require("@site/static/docs/assets/welcome-pages/bos-big.png").default} alt="Web3 Components" />
</div>
<div className="card__body">
<h3>Web3 Components</h3>
Expand Down
Loading

0 comments on commit fdb0934

Please sign in to comment.