# Introduction

LiNEAR Protocol is a multichain liquid staking and liquid restaking protocol. It allows users to restake $NEAR, $SOL, $BTC and other assets, earn yields from staking & restaking, and receive liquid receipt tokens representing their deposit that can be used in other protocols.

LiNEAR plans to launch liquid restaking solutions built on the Meshed Restaking infrastructure [Allstake](https://allstake.org/), and to support other restaking infrastructure such as Eigenlayer in the future. LiNEAR is set to become the strategic manager of Allstake and the provider of the Liquid restaking token, thereby optimizing the security of Actively Validated Services (AVS) or Application Chains. Users of the LiNEAR protocol will be able to earn higher yields compared to traditional PoS or single-instance staking models by leveraging a variety of supported assets.\
$LiNEAR is the biggest LST(Liquid Staking Token) in the NEAR ecosystem. It can be [restaked](https://app.allstake.org/) to earn an even higher yield.


# Understanding Allstake

[Allstake](https://allstake.org/) is the first meshed restaking protocol that brings restaking to all chains. By decoupling consensus and execution, Allstake enables trustless scaling, offering enhanced scalability, security, and decentralization.&#x20;

Allstake extends beyond Ethereum; it builds a “verifiable cloud” for the broader crypto landscape, enabling users to natively restake a wide range of assets (LSTs, LRTs, LP tokens, stablecoins, etc.) on multiple chains including [NEAR](https://near.org/), [Solana](https://solana.com/zh), [Bitcoin](https://bitcoin.org/en/), [Ethereum](https://ethereum.org/), [Ton](https://ton.org/), and more. Allstake comprises a modular toolkit that includes a programmable multi-asset economic module, a restaking hub for managing restaking logics, a chain signature module for synchronizing states and slashing on other chains, and light clients for trustless verification.

The core infrastructure, Allstake Hub, is built on the [NEAR Protocol](https://near.org/); it manages all the Actively Validated Services (AVS) and operators, and tracks all deposit, delegation, and withdrawal states of restakers. Chain Signature’s cross-chain messaging and query capabilities allow Allstake to securely and reliably monitor the users’ stake, delegation, and other messages across different chains, even including non-smart contract ones like Bitcoin and XRP. This integration enables Allstake to streamline operations such as issuing rewards and slashing on other chains, optimizing both the user experience and costs.&#x20;

Allstake empowers multichain applications by providing security from the application layer to even the physical level. AVS derives security from each chain they operate on, creating a decentralized ecosystem where users from all chains can contribute to AVS security. By attracting validators from multiple chains, Allstake increases decentralization and real-world censorship resistance. This validator diversification further improves the security guarantee of AVS.

More details in <https://docs.allstake.org/>

<br>


# How LiNEAR Does Liquid Restaking

LiNEAR protocol significantly reduces the complexity of restaking operations. Users can simply deposit various assets to earn additional yields, without needing to worry about how to select the optimal combination of AVS (Actively Validated Services) or Operators.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfxmzrGLPCwpcRh9nhvyL2IOUI6goaartt37DSXX14y0Wfi74pBehTXXyAbX4RbFvAmWRpaUbMk6anQNaFZw3eiYxgJusNr6Ljj8U2s3N1Y-Hl_n2B6LGSoBCrsKWWLs0lRG4FRc2JZbC4b_8MWz_GBRaio?key=CnP9158EAIt_mfyhDMvR2A" alt=""><figcaption></figcaption></figure>

The diagram uses Allstake as an example to illustrate the main liquid restaking operation of LiNEAR Protocol.


# Product

{% content-ref url="/spaces/VUsjtIZTjrEX8y9oBG0Z/pages/XablgJf2Viodi1xmRGO4" %}
[$LiNEAR](/product/usdlinear)
{% endcontent-ref %}

{% content-ref url="/spaces/VUsjtIZTjrEX8y9oBG0Z/pages/zzCOaUT7pKpUfsZCWOtO" %}
[$bLiNEAR](/product/usdblinear)
{% endcontent-ref %}


# $LiNEAR

$LiNEAR is the receipt token users receive upon staking $NEAR with LiNEAR Protocol. Near PoS rewards accrue constantly, reflected by $LiNEAR appreciating against $NEAR. Users can unstake $LiNEAR any time to get their staked $NEAR back.

Price of $LiNEAR = Total $NEAR staked / $LiNEAR minted

<br>


# How to Stake NEAR?

All you need to do is:

1. Open[ https://linearprotocol.org](https://linearprotocol.org)
2. Connect your wallet
3. Type in the amount of $NEAR you want to stake
4. Click the "Stake" button and approve the transaction in your wallet

That's It!

Connect your wallet\
On the LiNEAR Protocol app, you will see the “Connect wallet” button at the top-right corner. LiNEAR Protocol now supports the[ NEAR web wallet](https://wallet.near.org/).

When you login LiNEAR Protocol, you will be asked to approve the authorization. Click on “Connect” to sign in LiNEAR Protocol successfully. After login, you'll be able to see your $NEAR balance in the LiNEAR Protocol stake form.

After a successful connection, Linear Protocol will automatically detect the amount of $NEAR you have in your wallet.

Decide the amount of NEAR to stake

Now let's start staking your NEAR tokens. First, just by typing in the amount of $NEAR you want to stake in the "Stake Your NEAR" section.

Click the "Stake" button, and you're all set

Now, just click the Stake button to stake your NEAR tokens. You'll be redirected to your wallet to confirm the transaction.

Upon approval of the transaction, you have now successfully staked your NEAR tokens and have received $LiNEAR in return.

$LiNEAR represents your staked NEAR tokens, whose value will increase every epoch by including the staking rewards from validators selected by LiNEAR Protocol.


# How to Restake $LiNEAR?

All you need to do is:

1. Open Allstake app page: <https://app.allstake.org>&#x20;
2. Connect your wallet
3. Select NEAR network
4. Select $LiNEAR
5. Type in the amount of $LiNEAR you want to stake
6. Click the "Deposit" button and approve the transaction in your wallet


# $bLiNEAR

$bLiNEAR (boosted $LiNEAR) is the receipt token users receive upon restaking their $NEAR/$NEAR/$stNEAR with LiNEAR Protocol. $bLiNEAR holders enjoy both NEAR PoS staking rewards and the yield from restaking.

The underlying $NEAR tokens are restaked to a portfolio of AVS available on[ Allstake](https://allstake.org/)  and other supported networks in the future.

LiNEAR plans to launch other liquid restaking assets across multiple blockchains in the future.


# $LNR

{% content-ref url="/spaces/VUsjtIZTjrEX8y9oBG0Z/pages/s92tx39HtnHSfZZbqnKm" %}
[$LNR Distribution](/usdlnr/usdlnr-distribution)
{% endcontent-ref %}

{% content-ref url="/spaces/VUsjtIZTjrEX8y9oBG0Z/pages/4RpSH9WZQmdSaw23do2u" %}
[Utility](/usdlnr/utility)
{% endcontent-ref %}

<br>


# $LNR Distribution

<table><thead><tr><th width="283">Total supply</th><th>1,000,000,000</th></tr></thead><tbody><tr><td>Community Reserve</td><td>27%</td></tr><tr><td>DAO Treasury</td><td>23%</td></tr><tr><td>Marketing &#x26; Operation</td><td>12%</td></tr><tr><td>Future Airdrop</td><td>11%</td></tr><tr><td>Genesis Airdrop</td><td>10%</td></tr><tr><td>Team</td><td>9%</td></tr><tr><td>Protocol Development </td><td>8%</td></tr></tbody></table>


# Utility

**Insurance Fund**: Stake $LNR into an insurance fund, designed to cover potential losses incurred to liquid staking and restaking tokens. Stakers receive $sLNR as a representation of their share of the fund.

**Governance**: The power to set rates for liquid staking and restaking pools, manage delegation strategies, operator whitelisting and oversee the protocol treasury.

**Revenue Sharing**: Gain a share of the protocol’s agreement revenue, with potential increases as the ecosystem grows\
**Incentive Program**: Additional $LNR tokens will periodically be introduced into the insurance fund, promoting liquid restaking tokens liquidity and strengthening governance.


# Developer Guide

LiNEAR Protocol Developer Guide

Note: Only the $LiNEAR (Liquid staking token of $NEAR) related code and algorithm information is available here.

The detailed technical documentation on restaking and $bLiNEAR will be open-sourced and published after the function is released.


# Contract Overview

## LiNEAR Contract

The source code can be found here: <https://github.com/linear-protocol/LiNEAR>

### Description

LiNEAR Protocol is a non-custodial liquid staking protocol built on NEAR blockchain. You can stake $NEAR via LiNEAR Protocol, receiving PoS staking rewards same as every other $NEAR staker, but also receive liquid $LiNEAR token which could be used in DeFi protocols. Furthermore, you can unstake your $LiNEAR and receive back $NEAR instantly with no waiting time, while a small portion of fees will be charged.

The price of $LiNEAR goes up each epoch with staking rewards being accrued into the underlying staked $NEAR.

### Use Case

* Stake $NEAR:&#x20;
  * A user who wants to participate in NEAR staking can stake(deposit) his $NEAR to LiNEAR contract and get back $LiNEAR tokens. The $LiNEAR tokens are standard NEP141 tokens so that he can transfer/sell them freely.
* Unstake $LiNEAR:&#x20;
  * If the user wants to exit staking and get his $NEAR back with his rewards together, he can unstake(withdraw) $NEAR by burning $LiNEAR tokens. There are two approaches he can take:
    * Instant Unstake: Swap $LiNEAR tokens for $NEAR instantly from a liquidity pool in ref.finance. This way the user needs to bear transaction fees and slippage, however he can get $NEAR back immediately without any delay.
    * Delayed Unstake: If the use doesn't want to pay for any swap fees he can choose delayed unstake. Delayed unstake will make LiNEAR contract to actually unstake from underlying validators so that the exchange rate can always be guaranteed. However there is a delay between initiating the unstake and actual receiving the $NEAR back. Typically it takes 4 epochs (\~2.5 days).

### Contracts

* LiNEAR&#x20;
  * There is only one contract of LiNEAR protocol. It handles stake/unstake from users and it's also the NEP141 token contract of $LiNEAR token. You can find the entrance of this contract [here](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/lib.rs)
* Staking Pool&#x20;
  * LiNEAR contract will call staking pool contracts of each validator to perform actual stake/unstake actions. You can find the implementation of staking pool contract [here](https://github.com/near/core-contracts/blob/master/staking-pool/src/lib.rs)

#### Key Functions

* Functions for Users
  * Stake
    * Typically the user stakes his $NEAR tokens via the `deposit_and_stake` function.
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/stake.rs#L21)
  * Unstake
    * Note that unstake will not transfer $NEAR to the user, the funds remain in the LiNEAR contract until user explicitly withdraws them using the function below
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/stake.rs#L70)
  * Withdraw
    * Withdraw unstaked $NEAR to user's wallet.
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/stake.rs#L37)
* Functions for Epoch Operator
  * LiNEAR contract will not do actual stake/unstake actions against staking pools for every user action. Instead it will buffer all the requests for one single epoch and fire stake/unstake requests at once. The following functions are called by an operator account per epoch to interact with underlying staking pools.
  * Epoch Stake
    * If there are more staking requests than unstaking requests, this function will be called at each epoch to perform actual staking to validators
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/epoch_actions.rs#L28)
  * Epoch Unstake
    * If there are more unstaking requests than staking requests, this function will be called at each epoch to perform actual unstaking from validators
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/epoch_actions.rs#L104)
  * Epoch Update Rewards
    * This function will be called in each epoch for every validators that LiNEAR has staked on to update staking rewards.
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/epoch_actions.rs#L104)
  * Epoch Withdraw
    * This function will be called to withdraw unstaked $NEAR from validators to fulfill users' unstake/withdraw requests.
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/epoch_actions.rs#L104)
* Functions of NEP141 token
  * Files in this folder define NEP141 related functions
  * [source code](https://github.com/linear-protocol/LiNEAR/tree/main/contracts/linear/src/fungible_token)
* Functions for Manager/Owner
  * These are privileged functions for manager/owner to manage validator list and update protocol settings.
  * Owner
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/owner.rs)
  * Validator list management
    * [source code](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/owner.rs)

#### State Variables

All state variables are defined [here](https://github.com/linear-protocol/LiNEAR/blob/main/contracts/linear/src/lib.rs#L56) and are detailed commented.

### Privileged Roles

#### Owner

Owner role has the authority to config key parameters (including managing other roles, set treasury account Id and pause/unpause the contract) in the protocol and can also upgrade the contract. Currently the owner is set to the LiNEAR DAO (`linear.sputnik-dao.near`)

#### Manager

Managers are able to manage validators on LiNEAR in the following ways:

* add validators
* remove validators
* update weight of validators
* update base stake amounts of validators (only used by stake war delegation)
* drain a validator (explained later)

#### Operator

Operator is not a privileged role, it's just a normal NEAR account that we used in our off-chain worker to periodically call epoch actions of LiNEAR. The operator account ID is `operator.linear-protocol.near`.

### Draining a Validator

Draining enables us to manually unstake all delegated NEAR from a specific validator, typically this is used when a validator has been offline for a while or it raised its fee to 100%.\
When `drain_unstake` is called by the manager, all staked NEAR will be unstaked from that validator, and after 4 epochs `drain_withdraw` needs be called to withdraw the funds back to the pending pool, which then could be distributed to other validators.

### Validator Whitelist

The NEAR foundation uses a specific contract (`lockup-whitelist.near`) to maintain the whitelist of the staking pool contracts account IDs that are approved by NEAR Foundation which lockup accounts can delegate to. Please find the details [here](https://github.com/near/core-contracts/tree/master/whitelist)

### Pause/Unpause Contract

In case of an emergency incident happened, the contract can be paused by the owner DAO to stop all user interactions and it can be unpaused later when the issues are resolved. The functionalities that could be paused includs:

* All epoch actions (stake, unstake, withdraw, update rewards)
* User deposit, stake, unstake and withdraw
* Changing of manager role
* Changing of treasury
* All validator-related actions (add, remove, update weight)
* LiNEAR token transfers are disabled

### Validator Selection Algorithm

Please refer to the [Automatic Staking Optimization](/developer-guide/automatic-staking-optimization) doc.&#x20;


# Automatic Staking Optimization

The target of the delegation strategy is to provide the best yield for the stakers while making NEAR more decentralized and censorship-resistant.

When the users stake $NEAR on LiNEAR Protocol, the automatic staking optimization determines which validators to be selected and how many $NEAR should be staked ideally.

**Eligibility rules to receive stake from LiNEAR protocol.**

* Validator is in the active set ;
* Validator's APY > 6% ;\
  APY = (1 + ROI) ^ (1 year / epoch\_length) - 1
* Validator's commission fee ≤ 10 % ;
* Satisfy the above three conditions for 10 consecutive epochs.

**We evaluate all the active validators and calculate the score by a variety of metrics.**

Score=CS\*(1-C / 100)\*(1-10R)

[![](https://lh3.googleusercontent.com/EybY48jz_5pw_LDz3U9GyRE5uBj2P-B7mppbwDC4HbIglY0JJzCqZsGlEzbSEc_oxRVt1n6skyHYFQhKs_0IzVn8A1t2XG6BRt5rI1WdD0qpdFoBeqK5AGNnsg9dglCDZUh5T6kkXs917t6N2Etkyo0)](https://www.codecogs.com/eqnedit.php?latex=CS%20%3D%20min\(%5Cfrac%7B100%7D%7B%5Csqrt%7B1-RL%2FRA%7D%7D%2C%205000\)#0)

* RL: The validator’s average ROI in the past 10 epochs
* RA: LiNEAR’s ROI  in the past 50 epochs
* C: Commission fee
* R: The validator’s staked amount / Total active validators staked amount<br>

**Target staked amount of a given validator**=Total $NEAR staked \* Score / Sum(Scores)

**Delta** = Current staked amount - Target staked amount&#x20;

*<mark style="background-color:blue;">**When staking**</mark><mark style="background-color:blue;">,</mark>* the validator with the minimum Delta is selected first until Delta=0, and then the second minimum validator is selected until all the requested $NEAR staking are satisfied.

<mark style="background-color:orange;">**When unstaking**</mark><mark style="background-color:orange;">:</mark>

* The validator which will be selected is the one with the minimum Delta of all the validators under the condition of Delta>Unstake amount;
* If there is no validator that meets the condition above, the validator with the maximum delta/target ratio is selected first and unstake the $NEAR amount no more than max(Target/2, Delta), and then the second maximum validator is selected until all the requested $NEAR unstaking are satisfied.

<br>


# FAQ

Most of your questions can be found here！

{% content-ref url="/spaces/VUsjtIZTjrEX8y9oBG0Z/pages/i62DJOIXeSdyyoam1LnX" %}
[Liquid staking and $LiNEAR](/faq/liquid-staking-and-usdlinear)
{% endcontent-ref %}

{% content-ref url="/spaces/VUsjtIZTjrEX8y9oBG0Z/pages/lPyoXOG521yPC0dx7q68" %}
[Liquid restaking and $bLiToken](/faq/liquid-restaking-and-usdblitoken)
{% endcontent-ref %}


# Liquid staking and $LiNEAR

### Liquid staking and $LiNEAR

***What is liquid staking?***

Liquid staking is the act of delegating your tokens to a service that stakes for you without losing access to your funds. It allows users to stake any amount of $NEAR and unstake their $LiNEAR tokens to receive back their $NEAR instantly.

***Is LiNEAR Protocol custodial?***

No, LiNEAR Protocol is a non-custodial protocol. This means that the tokens are 100% in user's control. Interaction with smart contracts and bots of LiNEAR Protocol is fully permissionless.

***How long would it take to stake and unstake?***

With LiNEAR Protocol, staking is instant. For unstaking, you can choose 1) instant unstaking with a small percentage of fees collected, or 2) delayed unstaking without any fees. Your $NEAR will be available in approximately 49 hours. You will not receive any rewards during that waiting period.

***Are staking rewards staked automatically?***

Yes, when the new epoch begins, the staking rewards from the last epoch are automatically compounded into the staked $NEAR. This is reflected by the $LiNEAR price appreciating against $NEAR.&#x20;

***What fees does LiNEAR Protocol charge?***

The fee structure of LiNEAR Protocol is as follows:

* Stake: 0%
* Delayed unstake: 0%
* Instant unstake: 0.1% (according to the[ $LiNEAR<>$NEAR Stable Pool](https://app.ref.finance/sauce/3515))
* Commission:  6% on staking rewards


# Liquid restaking and $bLiToken

***What is restaking?***

Restaking is a new crypto-economic primitive that enables the reuse of staked consensus assets on a Proof-of-Stake (PoS) blockchain, for example, staked ETH on Ethereum. First introduced by EigenLayer, restaking is beginning to be used to extend existing security to applications and networks external to the base layer PoS blockchain without relying on a new and more risky asset, essentially increasing both return and risk to the stakeholders who restake their consensus assets.

***What is liquid restaking?***

Liquid restaking follows the same general procedure as liquid staking and involves tokenizing the staked ETH into a liquid restaking token (LRT) that retains the value of the original staked ETH while allowing it to be used across various DeFi applications. Essentially, liquid restaking decouples the staking rewards from the operational constraints of traditional staking, providing stakers with greater flexibility, improved capital efficiency, and enhanced reward opportunities.

***What are Actively Validated Services (AVS)?***

Actively Validated Services refer to any systems that require their own distributed validation semantics for verification, such as sidechains, data availability layers, new virtual machines, keeper networks, oracle networks, bridges, threshold cryptography schemes, and trusted execution environments.

***What are Operators?***

Operators are specialized entities (individuals or organizations) that opt to provide a range of services, including running validators, to AVS, enhancing the security and overall reliability of their networks.\
\
An Operator can choose to provide node validation services for 1 AVS or a combination of multiple AVSs.<br>


# Security

LiNEAR Protocol is doing everything we can to ensure the security of everyone's assets.

### Audits

LiNEAR has always taken security seriously. With this in mind, LiNEAR Protocol has undergone several rounds of intensive auditing both internally and externally, by engineers and teams with strong expertise in NEAR smart contracts and DeFi protocols.&#x20;

[BlockSec](https://www.blocksecteam.com/), as one of our key security partners, who has extensive experience in NEAR Rust smart contract auditing, completed the security auditing of LiNEAR Protocol Contract v1.0.0 on Apr 1st, 2022.

According to [BlockSec's auditing report](https://github.com/linear-protocol/audits/blob/main/BlockSec%20-%20Security%20Audit%20Report%20for%20LiNEAR%20-%20202204.pdf), LiNEAR contract code is highly secure: There were no critical issues reported at any point during the auditing. Only a few low-risk minor issues were reported and have been fixed by the LiNEAR engineering after receiving the feedback.

[Hacken](<https://hacken.io/ >) has finished its [security auditing report for LiNEAR](https://github.com/linear-protocol/audits/blob/main/Hacken%20-%20Smart%20Contract%20Code%20Review%20and%20Security%20Analysis%20Report%20for%20LiNEAR%20-%20202405.pdf) in May 2024, with several minor issues reported and have been fixed by LiNEAR team.


# Phoenix Bonds

A novel bonding game built on LiNEAR protocol

## What is Phoenix Bonds?

Phoenix Bonds is a principal-protected bonding platform that help protocols with liquidity-bootstrapping and provide perpetually-boosted yield to users. Phoenix Bonds can work with all yield bearing assets. The first version will be launched for $LiNEAR, the staking derivative token of LiNEAR Protocol.

## How does LiNEAR Phoenix Bonds work？

### Core mechanism

<figure><img src="/files/fVNAc4bi51SJpSURXQcO" alt=""><figcaption></figcaption></figure>

#### Bond

Users bond $NEAR, which goes into the Pending Bucket, and accumulates balance of $pNEAR over time. All $NEAR in the Pending Bucket will be deposited into LiNEAR protocol to generate staking rewards.

$$
A= \frac{t}{t+a}*cap*(1-c)
$$

A: the amount of claimable $pNEAR

t: time lapse after bonding

a: see [Alpha controller](#alpha-controller)

cap: upper limit of $pNEAR amount one can receive，cap=Bonded amount / Redemption price

c: commission fee, c=3%

If you are a $LiNEAR holder and want to bond $NEAR without unstaking,  you could choose to bond by depositing $LiNEAR. Please note that principal protection of Phoenix Bonds is defined in terms of value in $NEAR. This means you may receive less $LiNEAR than what you bonded when cancelling the bond, because $LiNEAR price always grows every epoch.

#### Cancel

Users can withdraw the bonded amount of $NEAR anytime before they choose to claim $pNEAR.

#### Claim

Users can claim the accumulated $pNEAR anytime after bonding. One bond can only be claimed once. After claiming, users get the accumulated $pNEAR, while their bonded $NEAR (now staked as $LiNEAR) enters the Reserve Bucket and the permanent bucket.

A 3% commission is collected upon claim on every bond, which will be mainly used to incentivize $pNEAR/$NEAR liquidity.&#x20;

#### Redeem

Users can always redeem $pNEAR for $NEAR from the Reserve Bucket. The initial redemption price before the first claim is set at 1.0

Redemption price = Total $NEAR in the Reserve / $pNEAR supply

Redemption amount of $NEAR = Redemption price \* Redeemd amount of $pNEAR

### Components

#### Pending Bucket

All bonded $NEAR is held by Pending Bucket until claimed. All staking rewards of $NEAR goes to Reserve Bucket. When users claim $pNEAR, corresponding $NEAR (staked as $LiNEAR) is transferred from Pending Bucket to Reserve Bucket and Permanent Bucket, according to the following formulas:

* Commission transferred to the treasury = Bonded $NEAR amount \* commission fee
* $NEAR transferred to Reserve Bucket = Accumulated $pNEAR \* Redemption price
* $NEAR transferred to Permanent Bucket = Bonded $NEAR amount - (Commission transferred to the treasury + $NEAR transferred to Reserve Bucket)

#### Reserve Bucket

Staking rewards from all three buckets go to Reserve Bucket, creating amplified yield for $pNEAR holders.

#### Permanent Bucket

Protocol-controlled-value (PCV) of Phoenix Bonds. It guarantees boosted yields to $pNEAR even when if Pending Bucket becomes empty.

#### Alpha controller <a href="#alpha-controller" id="alpha-controller"></a>

The alpha parameter of the accrual function variable implements a feedback controller which adjusts the parameter in one direction.

T\_a =(Bond1\_amount \* t\_1 + Bond2\_amount \* t\_2 +...+ BondN\_amount \* t\_N) / Total bonded amount

T\_a: the size weighted average age of pending bonds

N: the amount of pending bonds

t\_N: time lapse after bonding of bondN

T\_target: target average age, T\_target=15 days

When T\_a <= T\_target, alpha remains unchanged

When T\_a > T\_target,  reducing by a 1% for each day

Alpha initial value：4.4 days

Alpha lower limit：0.1 days


# Phoenix Bonds FAQ

### What is $pNEAR (*perpetually-boosted* $NEAR)? <a href="#pqozni7roxdh" id="pqozni7roxdh"></a>

$pNEAR is an NEP141 token that is minted when users forgo their bonded $NEAR to the protocol and claim $pNEAR. The quantity of $pNEAR they can claim depends on their accrued virtual balance of $pNEAR when they claim.

$pNEAR is backed by the funds in the Reserve bucket. $pNEAR can always be redeemed for a proportional share of the Reserve - that is, **x**% of the $pNEAR supply redeems for **x**% of the $NEAR in Reserve(returned as the equal value of $LiNEAR).

$pNEAR captures a boosted rewards compared to $LiNEAR. As a result, the redemption value of a given amount of $pNEAR will grow faster than the underlying amount of $NEAR would grow if staked in LiNEAR pool. The redemption price acts as a price floor for the $pNEAR market price.

### How does Phoenix bonds create boosted rewards? <a href="#p1c400ee03hy" id="p1c400ee03hy"></a>

All of the staking rewards generated by all buckets in the system (Pending, Reserve and Permanent) flows to the Reserve bucket. Since $pNEAR can always be redeemed proportionally for $NEAR in the Reserve bucket, the $pNEAR token captures extra rewards generated by $NEAR that's outside the Reserve, creating an amplified yield.

### How can I get boosted rewards? <a href="#qx78koisbzx3" id="qx78koisbzx3"></a>

You will automatically get boosted rewards by simply holding $pNEAR.&#x20;

There are two ways to obtain $pNEAR:

* You can create a bond, accrue $pNEAR over time and claim your $pNEAR.
* You can buy $pNEAR on [Ref Finance](https://app.ref.finance/#near|phoenix-bonds.near).&#x20;

### What is the fair market price of $pNEAR?

Fair price of $pNEAR is bounded by two formulas:

Lower bound = (Total $NEAR in protocol - $NEAR in pending bucket ) / $pNEAR supply

Upper bound = Total $NEAR in protocol / $pNEAR supply

Although we expect $pNEAR to trade on the open market at a premium over the redemption price, the canonical mathematical definition of a fair price is yet to be solved.

### How is the $pNEAR APR & **Yield Amplification** calculated? <a href="#c2c3valbf2bj" id="c2c3valbf2bj"></a>

* $pNEAR APR = (Total $NEAR in protocol \* $LiNEAR staking APY) / $NEAR in Reserve
* Yield amplification = Total $NEAR in protocol / $NEAR in Reserve

### Can the system ever become unbacked or insolvent? <a href="#msk9k53dn7yb" id="msk9k53dn7yb"></a>

The $pNEAR supply is fully redeemable and is always backed by the underlying $NEAR in the Reserve.

### How can I burn $pNEAR and get back $NEAR or $LiNEAR?

$pNEAR floor price is lower than its market price in most of time. Instead of burning your $pNEAR, a more beneficial and recommended way is to swap $pNEAR to $NEAR on [Ref Finance](https://app.ref.finance/#near|phoenix-bonds.near).&#x20;

For those who choose to burn $pNEAR and receive $NEAR at floor price anyway, you can do that in [this page](https://linear.phoenixbonds.org/redeem).&#x20;

Economically, burning $pNEAR makes only sense when the market price is below the floor price, but it will be very hard for users to compete with arbitrage bots.


# Phoenix Bonds Audits

Phoenix Bonds has been implemented with security as priority. The system has been designed to be safe and secure, and we have spent all the necessary resources in order to ensure that the protocol matches the highest security standards.

Below are the links to the current available audit reports.&#x20;

### Security Audits

| Auditor  | Date         | Report                                                                                                                                                  |
| -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BlockSec | Jan 12, 2023 | [BlockSec Audit](https://github.com/linear-protocol/audits/blob/main/BlockSec%20-%20Security%20Audit%20Report%20for%20Phoenix%20Bonds%20-%20202301.pdf) |


