# Welcome to PembRock Finance

PembRock Finance is the first leveraged yield farming protocol built on the NEAR blockchain, providing:

* Stable and secure returns for lenders.
* Loans for yield farmers, who can leverage their existing holdings by up to 3x for greater returns.
* Staking for governance voting as part of our DAO.
* Rewards for early adopters.
* Clear and informative how-to and strategy guides to help you educate yourself and get the most out of leveraged yield farming.

### Join our Social Media!

PembRock is first and foremost a community-driven project. Join us on social media to become a Pembrocker!

* [**Twitter**](https://twitter.com/PembrockFi)
* [**Telegram**](https://t.me/pembrock_finance)
* [**Discord**](https://discord.gg/JZ94hj8vaD)


# Risks

Knowing the risks for both lending and leveraged yield farming means you can get the most out of our platform. Take a look through our two documents before you start.

* [Risks for Farmers](https://docs.pembrock.finance/risks/risks-for-farmers)
* [Risks for Lenders](https://docs.pembrock.finance/risks/risks-for-lenders)


# Risks for Farmers

The level of risk when engaging in leveraged yield farming depends on both the tokens that are involved in the pair and also the amount of leverage that a farmer takes advantage of.

### **Impermanent loss**

Impermanent loss is a risk that comes up every time someone provides liquidity to a liquidity pool. It is to do with the need to keep the dollar ratio of assets in a pool the same at all times, meaning that if one token goes up or down while another stays relatively stable (or moves in an opposite direction), the pool has to be rebalanced.

This changes the proportion of your tokens in the pool and can lead to a loss compared to if you just held the two assets. Impermanent loss is indeed a risk but can be mitigated by the yields gained from providing the funds to the liquidity pool.

### **Liquidation**

Liquidation occurs when a farmer’s leveraged position suffers from impermanent loss, taking on more debt than can be covered by the value of the initial investment. The risk of liquidation rises in line with the amount of funds leveraged, as is shown in this table.

<div align="center"><img src="/files/CK2naAT1fJ93mrPCC1RY" alt=""></div>

The more funds that are leveraged, the bigger the risk should a token in the pair fall. Having debt that cannot be covered by the farmer’s initial investment brings liquidation.

### **No leverage (1x)**

If the farmer simply uses their own funds, without any leverage, then the risks are no different than using any other yield farming platforms. Impermanent loss is the only consideration.

### **Leverage (more than 1x)**

Leveraged yield farming brings the risk of impermanent loss, as well as that of liquidation if the loss crosses over a certain threshold determined by the platform.

### **Negative APY**

Negative APY is a risk that occurs when the borrowing interest rate is higher than the yield generated from farming with leverage. With debts growing faster than the gains that are made, this could trigger liquidation if not properly monitored.

### **Smart Contract Risks**

If a smart contract has any bugs or vulnerabilities, it can be exploited by malicious actors. This risk is compounded when it comes to DeFi products that are rushed to market or created by those without so much experience in the industry.

PembRock Finance has been created by experienced blockchain builders, and will gain an external audit before launch, making sure that the smart contracts employed in our leveraged yield farming protocol are watertight!

### **Update: Temporary Corner Cases**

Having just launched and handling the transactions of many users, some have experienced corner cases, including:&#x20;

* Temporary inoperability or the freezing of funds&#x20;
* Gas usage errors&#x20;
* NEAR wallet maintenance&#x20;
* Other cases of maintenance concerning third-party resources; for example, RPCs and nodes.

We would like to assure you that all funds on PembRock Finance are secure, and we are continuously working on improving user experience so that such situations do not occur in the future.

**If you have experienced a corner case,** [**please contact us on Discord**](https://discord.gg/RtpwJkj5nV)**, we’ll do our best to help you as soon as possible. You can also consult our** [**user guides**](https://docs.pembrock.finance/education/how-to-guides) **to get the optimal experience.**


# Risks for Lenders

While leveraged yield farming carries some risk, it is commensurate with the high rewards that can be gained. On the other side of the coin we can examine lenders, who undertake less risk than the farmers they lend to, but nonetheless should be aware of some pitfalls. While we intend to make the lending process as easy and secure as possible, no investment is without some risk, which is why we are here to clearly outline some of the things you should look out for.

### Outstanding farming debt

As we have mentioned in our [doc on yield farming myths](https://docs.pembrock.finance/education/leveraged-yield-farming-education/yield-farming-myths-busted), lenders cannot be liquidated. Similarly, the liquidation thresholds for borrowed funds that are written into our smart contracts keep lenders safe; however, extreme market volatility can cause these positions to not be liquidated in time. *Note that this is a very unlikely scenario.*

### Slower asset return

If at any time you wish to stop lending, you can withdraw your funds in a few clicks; however, there may be a slight delay with them being delivered to your wallet if the pool utilization rate is extremely high. This occurs when the amount being borrowed from a lending pool comes close to matching the total value of the pool.

In order to avoid this as much as possible, we employ tiered interest rates; that is, beyond 90% pool utilization, lending fees increase on a steep scale up to 150%. This has the effect of encouraging both lenders who can benefit from greater APY, and farmers who become more motivated to pay off outstanding loans.

### Smart contract vulnerabilities

As seen in recent high-profile project hacks, smart contracts can be vulnerable to exploits leading to stolen funds. To counter this, more projects are doing their best to conduct internal and external audits.

PembRock greatly minimizes any chance of smart contract exploits due to its internal testing, and the fact that we have hired two respected companies — BlockSec and Certik — to produce comprehensive reports. Both companies have lots of experience in undertaking smart contract audits. What’s more, we also make sure any integrated projects follow the same high standards that we ourselves abide by.

### **Update: Temporary Corner Cases**

Having just launched and handling the transactions of many users, some have experienced corner cases, including:&#x20;

* Temporary inoperability or the freezing of funds&#x20;
* Gas usage errors&#x20;
* NEAR wallet maintenance&#x20;
* Other cases of maintenance concerning third-party resources; for example, RPCs and nodes.

We would like to assure you that all funds on PembRock Finance are secure, and we are continuously working on improving user experience so that such situations do not occur in the future.

**If you have experienced a corner case,** [**please contact us on Discord**](https://discord.gg/RtpwJkj5nV)**, we’ll do our best to help you as soon as possible. You can also consult our** [**user guides**](https://docs.pembrock.finance/education/how-to-guides) **to get the optimal experience.**


# What is Leveraged Yield Farming?

To understand leveraged yield farming, it’s important to understand regular yield farming. Here’s a short summary of each to get you started.&#x20;

### **What is yield farming?**

In a nutshell, yield farming is the act of lending your cryptocurrency to the most profitable platforms in order to earn the highest DeFi yields.

But why do DeFi platforms require users’ funds at all? It has to do with the use of Automated Market Makers (AMMs) to execute trades within an application. AMMs are a feature of many DEXes, and allow users to make token swaps near instantaneously.

The traditional order book model of matching buyers and sellers to execute a trade does not apply. All trades are regulated by algorithms written into smart contracts and drawn from pools of funds (liquidity pools). This is precisely where the user comes in, providing funds to make sure that there are tokens available to be exchanged.

#### How yield farming works

Farmer provides tokens to a liquidity pool (an equal share of (usually) two different tokens locked in a smart contract).

Farmer receives LP (liquidity pool) tokens, representing their equal share of tokens within the liquidity pool. The longer they leave their assets in the pool, the more LP tokens they receive, based on the pool’s APY.

Farmer stakes these LP tokens within a farming pool, receiving extra rewards in the form of the protocol’s native-crypto (in PembRock’s case, this would be $PEM), a different cryptocurrency, or a governance token, which has its won value but can also be used to make decisions through voting within the protocol. In the governance case, the number of votes usually corresponds to the amount a farmer has staked, relative to the total amount of tokens.

The main difference between staking and yield farming is that the latter is defined by its mobility. Yield farming often involves the quick movement of crypto funds — either manually or through automated tools — to chase the highest rate of return, calculated by APY; however this is not a strict rule, and yield farmers who find a great protocol can reap fantastic rewards over a long period of time.&#x20;

### What is leveraged yield farming?&#x20;

Leveraged yield farming is simply normal yield farming but supercharged! It is the practice of borrowing external liquidity to farm a larger amount of crypto, thus gaining the ability to get increased returns.

While many DeFi lending platforms still require users to overcollateralize (put up funds of a greater value than those being borrowed), our leveraged yield farming platform undercollateralizes, meaning: A lower barrier to entry. Fewer funds laying dormant. Greater rewards for users. PembRock gives farmers the opportunity to leverage their existing funds by up to 3x, taking advantage of great yield farming opportunities with a larger amount of crypto, while lenders get predictable and stable returns for providing these funds to the protocol.


# About PembRock

## **PembRock Introduction**

### What is PembRock?

PembRock is the first leveraged yield farming protocol built on the NEAR blockchain. Users can provide liquidity, farm with leverage, stake, and take governance decisions to secure the future of the platform, all on a fast, secure, cheap, and user-friendly blockchain.

### Why did we build PembRock?

Yield farming is one of the key drivers of the DeFi ecosystem, with the liquidity provided by users helping protocols to innovate, building new features for the benefit of the entire community. Despite this symbiotic relationship, the DeFi sector is still in its experimental stages, meaning that current yield farming projects can be temperamental, hard-to-use, and occasionally, less than secure. It is only through trusted projects that decentralized finance can move into a more mature phase.

We wanted to play our part in this exciting sector, and what better opportunity could we get than building on NEAR, a blockchain which has made huge strides over the past year but is yet to house a leveraged yield farming platform.

Like our developers, NEAR Protocol wishes to accelerate the dream of DeFi as an integral part of Web 3.0 that is accessible to all. NEAR:

* Is a fast, inexpensive and carbon-neutral blockchain.
* Incorporates a user-friendly wallet.
* Operates with the Delegated Proof of Stake (DPoS) consensus mechanism, encouraging greater community participation.
* Has a large dedicated community.

One of the most exciting things about NEAR is its promotion of [Guilds](https://nearguilds.com/guilds/) — teams of developers from the community who are creating innovative apps that are accessible to all users, which is one of the important aspects of continued DeFi growth. PembRock Finance is supported by both INC4 and Minerall Guilds in its development.

The NEAR ecosystem is expanding, with volume on DEXs such as [Ref.finance](https://www.ref.finance/) increasing. With the demand for NEAR’s native products and a desire by crypto users to get maximum returns, now is a great time for PembRock Finance’s release. The NEAR Team seems to agree, which is why they provided us with a grant to assist us with the development of PembRock.

### **Update: Temporary Corner Cases**

Having just launched and handling the transactions of many users, some have experienced corner cases, including:&#x20;

* Temporary inoperability or the freezing of funds&#x20;
* Gas usage errors&#x20;
* NEAR wallet maintenance&#x20;
* Other cases of maintenance concerning third-party resources; for example, RPCs and nodes.

We would like to assure you that all funds on PembRock Finance are secure, and we are continuously working on improving user experience so that such situations do not occur in the future.

**If you have experienced a corner case,** [**please contact us on Discord**](https://discord.gg/RtpwJkj5nV)**, we’ll do our best to help you as soon as possible. You can also consult our** [**user guides**](https://docs.pembrock.finance/education/how-to-guides) **to get the optimal experience.**


# How PembRock Finance Works

![](/files/8IX1KPJqN3ndFTCGVlcc)

### How does PembRock work?

PembRock couples lenders and yield farmers who are rewarded for providing liquidity within the NEAR ecosystem. We are supporting all major farms and assets on [Ref.Finance](https://www.ref.finance/).‌

#### Lender

The lender deposits their NEAR and earns interest from the borrowing fees paid by yield farmers.

#### Leveraged Farmer

The yield farmer opens a leveraged yield farming position on a trading pair, borrowing NEAR from the vault and joining the farming pool with leverage. The yield farmer gets higher returns due to the larger stake, but pays a 10% premium for the privilege of using borrowed funds.

**Staker**

The staker locks their PEM and earns portion of all profits generated by the protocol (the bigger the amount and the longer the period, the larger the reward). The staker also gets to vote on the size of rewards to be distributed among lenders and farmers every month.

#### Liquidator bot

The liquidator bot monitors all yield farming positions, liquidating those that become too risky. If a leveraged yield farming position does get liquidated, 5% of the position’s fee goes to the protocol, and is then distributed among those who have staked the PEM token.


# Ref Finance integration

As the first leveraged yield farming platform within the NEAR ecosystem, we can bring great benefits for farmers and also the NEAR blockchain itself. PembRock as one of the expanding suite of products will result in greater liquidity being brought to the blockchain, as new and established users invest their crypto to get great rewards, becoming part of the expanding NEAR community in the process.

With the launch of PembRock Finance, we are proud to announce our integration with Ref Finance. A promising DeFi project with growing volumes running through it, Ref Finance provides the trusted infrastructure needed for PembRock users to use liquidity pools and farms.

### What is Ref Finance?

Ref Finance is a community-driven, expanding set of DeFi products built around a core AMM. It is at once a decentralized exchange, lending platform, synthetic asset issuer, and much more, providing:

Multiple pools in a single contract. Traders can trade across pools atomically in a single transaction. Customizable LP fees per pool. LPs can charge higher fees for illiquid or highly volatile tokens. Developers can earn rewards for building UIs and other applications on top of Ref Finance. Ref Finance benefits from the one to two second finality and cheap transactions offered by the NEAR blockchain (just $0.005 per swap). This puts Ref Finance pretty much on par with centralized exchanges, helping bring greater legitimacy and trust to decentralized finance.

Best of all, NEAR’s Rainbow Bridge to Ethereum means that traders can currently utilize ERC-20 assets from Ethereum on NEAR, with other bridges in development for BSC, Polygon, and Cosmos.

### PembRock and Ref Finance

Our Ref Finance integration gives greater value for holders of the versatile PEM token. We hope to give a boost to Ref Finance and every farmer, while also establishing our credentials as the go-to leveraged yield farming project, even for those who have never transacted on NEAR protocol before.

#### How it works

Yield farmers and lenders through PembRock are able to contribute to liquidity pools, with lenders receiving a stable high APY for providing the funds needed for borrowers to farm with leverage. With auto-reinvest, gains are automatically put back to work for even larger rewards!

![](/files/8IX1KPJqN3ndFTCGVlcc)

#### What does this mean for farmers and NEAR Protocol?

We are already supporting all major farms and assets on Ref Finance, allowing farmers to use more available tokens to create a leveraged position. As shown above, lenders can also provide liquidity to these farmers, getting high-levels of interest with minimal risk by staking their stablecoins.

For NEAR, more money is flowing through its ecosystem, helping to showcase its ability to handle large numbers of transactions with high throughput and extremely low fees.


# User Story: Lender

PembRock Finance is the very first leveraged yield farming protocol to launch on the NEAR blockchain. If you’ve read our other communications, you will know that on launch, there are two main ways you can earn:

* Lending
* Yield farming

Like the NEAR blockchain itself, we focus on user-friendliness, meaning you can benefit from PembRock’s yields whether you’re an experienced DeFi investor or a new user.

To give you a taste of what it’s like to use PembRock, we’ll highlight the experience of Steve, a lender who got to test out our platform.

![](/files/7XyWTkpoIXZOLIRFcCoT)

### **PembRock case study: Steve (a lender)**

#### **What was your overall experience of using PembRock?**

I really enjoyed it. I have actually put my crypto into many different projects, so I’m not exactly a beginner, but it’s always nice to have something intuitive and simple. In DeFi, there are a lot of funds moving quickly, so you want to have something that lets you get returns without having to go through a hundred different steps.

#### **What did you think of the returns against the risks?**

No complaints at all — as I was only investing USDT, there were no real risks. The price of USDT stays the same, and I get a nice return that auto-compounds. The fact that you can easily invest yourself at the click of a button and generate greater interest than most other investments is awesome!

***\*Please note:** PembRock is committed to the comfort and ease of use of all our users, and we want to give as much financial freedom as possible; however, on launch, as we continue to attract investment, it may temporarily not be possible to withdraw a large amount of funds all at once from the liquidity pool. This is to ensure that the pool remains stable, benefiting every PembRock user.*

### **Earn with PembRock**

With PembRock, you can be lending and getting in profits in just minutes. Once you set up a NEAR wallet and connect to the platform, you simply need to go to our *Lend* section and select the amount you wish to deposit, and we take care of the rest! A fully-audited platform designed by blockchain experts, we make sure your security is top priority.

**Join our socials for up-to-date news and any giveaways we have in store!**

[**Website**](https://pembrock.finance/)

[**Twitter**](https://twitter.com/PembrockFi)

[**Telegram**](https://t.me/pembrock_finance)


# User Story: Farmer

PembRock Finance is the very first leveraged yield farming protocol on the NEAR blockchain. In our other blog posts, we have highlighted that on launch, there will be two main ways to earn — either as a lender or a yield farmer.

To give you an understanding of how easy it is to use PembRock, we will now share with you the experience of Bruce, a yield farmer who got a chance to test our platform for himself. Bruce is someone who has used crypto for a while, but that doesn’t mean he didn’t appreciate the fact that our protocol is so user-friendly. We want you to know that you can benefit from PembRock’s yields whether you’re an experienced DeFi investor or a new user.

**To read about the experiences of Steve, a lender who got a preview of PembRock Finance, check out our other blog** [**here**](/about-pembrock/user-story-lender)**.**

![](/files/HBR38djuMuccNsNg0uIg)

### **PembRock case study: Bruce (a farmer)**

#### **What was your overall experience of using PembRock?**

People’s main objective when interacting with yield farming protocols is to gain profits, but of course, it makes a big difference when a platform is so easy to use. Interacting with PembRock is fun, and it really only takes a few steps to put your funds to work.

#### **What did you think of the returns against the risks?**

Yield farming will always have some risks, but they can be managed depending on your knowledge of the market and the kind of coins you choose to farm. USDT is predictable, and NEAR is a coin with great potential, so I was happy to open a position with these cryptocurrencies.

For those that don’t have so many funds, being able to leverage provides a way to boost returns in comparison with traditional yield farming, and PembRock gives you the flexibility to farm with or without leverage, the choice is yours. I can open a position with 1x leverage or scale it up to 3x (or anywhere in between) if I’m feeling confident.

#### **Farm with PembRock**

With PembRock’s leveraged yield farming, a new avenue of profit-making is open to you. For those that don’t have so many funds, being able to leverage provides a way to really boost returns in comparison with traditional yield farming. What’s more, it helps provide greater liquidity to the DeFi ecosystem, making it a win-win for both the farmer and the DeFi sector itself. Once you set up a NEAR wallet and connect to the platform, you simply need to go to our *Farm* section. You then choose the asset you wish to deposit along with the asset you wish to borrow, and put up your collateral, leveraging between 1x and 3x. Remember that once you start farming you always have the option to adjust or close your position at any time!

#### **Join our socials for up-to-date news and any giveaways we have in store!**

[**Website**](https://pembrock.finance/)

[**Twitter**](https://twitter.com/PembrockFi)

[**Telegram**](https://t.me/pembrock_finance)


# Audits

### PembRock Contracts

* [BlockSec](https://github.com/PembROCK-Finance/audits/blob/main/2022-07-01%20BlockSec%20Security%20Audit%20Report%20for%20PembRock%20Contracts.pdf)


# Borrowing Interest Rate on PembRock

Discover interest rates that users are charged for borrowing digital assets using PembRock Finance protocol.

Utilization below simply shows how liquid a pool is.

If it’s not liquid enough (which translates to a utilization of 90% or more), the interest rate is high, meaning borrowers are incentivized to repay their debts while lenders, to supply more.

If it is liquid enough, the interest rate is low, meaning borrowers are incentivized to take out more.

The optimal utilization range is between 60.0% and 89.9%. Within it, the borrowing interest rate always stands at 20%.

### General Borrowing Interest Rate for all assets excluding NEAR, stNEAR, LINEAR, NearX

| Utilization Range | Interest Rate @ Min. | Interest Rate @ Max. |
| :---------------: | :------------------: | :------------------: |
|    0.0% – 59.9%   |          0%          |          20%         |
|   60.0% – 89.9%   |          20%         |          20%         |
|   90.0% – 100.0%  |          20%         |         150%         |

To better understand the relationship, take a look at the chart below.

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

### Borrowing Interest Rate for stNEAR, LINEAR, NEARX

| Utilization Range | Interest Rate @ Min. | Interest Rate @ Max. |
| :---------------: | :------------------: | :------------------: |
|    0.0% – 59.9%   |          0%          |          10%         |
|   60.0% – 89.9%   |          10%         |          10%         |
|   90.0% – 100.0%  |          10%         |         150%         |

To better understand the relationship, take a look at the chart below.&#x20;

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

### Borrowing Interest Rate for NEAR&#x20;

| Utilization Range | Interest Rate @ Min. | Interest Rate @ Max. |
| :---------------: | :------------------: | :------------------: |
|    0.0% – 59.9%   |          0%          |          13%         |
|   60.0% – 89.9%   |          13%         |          13%         |
|   90.0% – 100.0%  |          13%         |         150%         |

To better understand the relationship, take a look at the chart below.

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


# Parameters & Key Figures

PembRock Finance aims to provide the ultimate experience for its users, which is why we have put in place limits to the minimum that can be borrowed, and instituted what we believe to be the best possible parameters for different operations within our app. This contributes to the stability of the platform while allowing for great user returns and continued development.

### **Minimum Debt Size**

The minimum debt size represents the smallest amount of a particular asset a user can borrow when creating a leveraged position. For all currencies on our platform, the minimum amount is equivalent to $1 in that particular crypto, subject to change based on the rate of the currency being borrowed at the time.

### **Global Parameters**

Please note that all of the fees outlined below are already factored into the APYs that are displayed when you view your farming position, meaning no other fees will be subtracted further down the line.

|        Parameter        | Value |
| :---------------------: | :---: |
|    Liquidation Bounty   |   5%  |
| Lending Performance Fee |  10%  |
| Farming Performance Fee |  10%  |

At present, all fees go to the PembRock treasury. As part of our [<mark style="color:yellow;">roadmap</mark>](https://docs.pembrock.finance/roadmap), one of the next steps is to integrate staking, which will allow PEM token holders to stake and receive protocol profit, derived from the liquidation bounty and lending/farming performance fees.


# Roadmap

### **Q1 2022**

✅ Obtained grant from NEAR Foundation

✅ Fundamental research of crypto-economics and farming projects

✅ Developed contract architecture, vesting contract, borrow/lending mechanics, and basic yield farming

✅ Integration with Ref. finance

✅ Design system creation and implementation

✅ Social Media set-up & introduction of PembRock in the NEAR ecosystem

✅ $PEM Tokenomics finalized

✅ $PEM Token deployed on mainnet

✅ The first round of token sale completed

✅ Succesful partnership

✅ Vesting contact deployed to mainnet & web application launched for early contributors

### **Q2 2022**

✅ Developed the liquidation of positions

✅ Rainbow Bridge integration

✅ Partnership with leading NEAR Projects (Meta Yield, Skyward, Boca Chica, Jumbo)

✅ $PEM Token IDO

✅ Listing on DEXes

✅ Creation of Liquidity pools

### **Q3 2022**

✅ Launch of LP incentivization program

✅ Audit of smart contracts

✅ Creation of user guides and educational content

✅ App launch on the testnet

✅ New website design

✅ App launch with deposit function

✅ App full launch with leveraged farming

✅ Staking mechanism enable

✅ Integration with NEAR farming platforms

✅ Application UI/UX improvements

✅ Adding new farms and assets to the platform

✅ Adding farming strategies and more educational content

### Q4 2022

✅ Launch of the PembRock DAO

✅ Integration into mobile wallets

✅ Addition of new farms and assets to the platform

✅ Support of Stable Farming Pools (STNEAR-NEAR, NearX-NEAR, etc.)

✅ Position adjustment: Add debt

✅ Position adjustment: Add collateral

✅ Creation of an educational hub for the community

✅ Improvements to mobile UI/UX

✅ Roll-out of PembRock Indexer

### Q1 2023

✅ Release of Adjust position UI

✅ Fundamental research on Delta neutral position

✅ Fundamental research on Grid Strategies

✅ Smart contract architecture for Grid Strategy

✅ Back-end architecture for Grid automated algo

✅ General UI layout development for Automated strategies

✅ Delta neutral release for PembRock main smart contract

### Q2 2023

Release of Partial close UI

Developing Delta neutral UI

Developing Grid Smart contract prototype

Developing Grid UI Layout

Developing of Grid automated algo prototype

### Q3 2023

Releasing Delta Neutral UI

Automated Grid strategy release on mainnet

Developing Leveraged shorts UI

Developing stop - loss mechanism for Farm positions

### Q4 2023

Releasing Grid UI

Releasing Leveraged Shorts UI

Releasing stop-loss mechanism for Farm position


# Tokenomics

## PembRock Token

**Token name:** PembRock Finance Token \
**Token ticker:** PEM \
**Total supply:** 160 000 000 PEM \
**Blockchain:** NEAR Protocol \
**Contract address:** [token.pembrock.near](https://explorer.near.org/accounts/token.pembrock.near)

PEM is the native token that helps PembRock Finance to function. It is used:

* To stake within the PembRock Finance ecosystem — with rewards paid out in PEM.
* As a part of our reward mechanism for interacting with our protocol.
* As an additional bonus for those who provide funds to our liquidity pools.
* For DAO participation — users can stake [PEM](https://www.coingecko.com/en/coins/pembrock) to receive vePEM, our governance token.

***All fees are collected as profit and are distributed among PEM holders who have staked in our protocol!***

### **How our protocol collects fees**

* Farmers are charged 10% of their yield farming rewards.
* Lenders are charged 10% of their borrowing profit.
* Every time a position is liquidated, 5% of the position’s value is paid as a fee.

![](/files/kUpyRvJ5n9fZpVTnZGNr)

![](/files/E5t4FuTTacHMx4SkA169)

<table data-header-hidden><thead><tr><th></th><th width="150"></th><th></th></tr></thead><tbody><tr><td></td><td><em><strong>Allocation</strong></em></td><td><em><strong>Vesting</strong></em></td></tr><tr><td>DAO Balance for future projects</td><td>40%</td><td>120-month linear unlock (unlock from April 2023)</td></tr><tr><td>IDO</td><td>5%</td><td> 9-month linear unlock (depending on the platform)</td></tr><tr><td>Community Treasury</td><td>15%</td><td>60-month linear unlock</td></tr><tr><td>Long term investors</td><td>16,25%</td><td>24-month lockup (linear unlock starts from buying date)<br>12-month lockup (linear unlock starts after 12 months from the purchase date)</td></tr><tr><td>PembRock Labs Incentives</td><td>12.5%</td><td>48-month linear unlock (unlocked for development from February 2023)</td></tr><tr><td>LP incentivization program</td><td>7,5%</td><td>6-month linear unlock</td></tr><tr><td>Early PEM contributors &#x26; NEAR Ecosystem</td><td>2,25%</td><td><p><em>Early PEM contributors</em> - 12-month linear unlock (unlock from April 2023) <em>Advisors incentivisation</em> - 12-month linear unlock (unlock from February 2023) </p><p><em>NEAR Ecosystem</em> - 6-month linear unlock (unlock from April 2023)</p></td></tr><tr><td>Initial LP on DEX's</td><td>1,5%</td><td>no vesting period</td></tr></tbody></table>


# FAQ

### **What is PembRock?** <a href="#id-31shc39o5gpd" id="id-31shc39o5gpd"></a>

PembRock is the first leveraged yield farming protocol built on the NEAR blockchain. Users can provide liquidity, farm with leverage, stake, and take governance decisions to secure the future of the platform, all on a fast, secure, cheap, and user-friendly blockchain.

### **What is yield farming?** <a href="#neef92h8si5d" id="neef92h8si5d"></a>

Yield farming is the act of lending your cryptocurrency to the most profitable platforms in order to earn the highest DeFi yields. Rather than the traditional order book model that matches real buyers and sellers of assets, DeFi applications employ the Automated Market Maker (AMM) model. AMMs allow trades to be executed immediately through the use of algorithms and pools of tokens. This is where users come in, helping to provide liquidity to pools in exchange for a percentage return on investment.

The main difference between staking and yield farming is that the latter is defined by its mobility. Yield farming often involves the quick movement of crypto funds — either manually or through automated tools — to chase the highest rate of return, calculated by APY; however this is not a strict rule, and yield farmers who find a great protocol can reap fantastic rewards over a long period of time.

### **What is leveraged yield farming?** <a href="#g7a7e6o8yqqc" id="g7a7e6o8yqqc"></a>

Leveraged yield farming is simply normal yield farming but supercharged! It is the practice of borrowing external liquidity to farm a larger amount of crypto, thus gaining the ability to get increased returns.

While many DeFi lending platforms still require users to overcollateralize (put up funds of a greater value than those being borrowed), our leveraged yield farming platform undercollateralizes, meaning:

* A lower barrier to entry
* Fewer funds laying dormant
* Greater rewards for users.

### **Why did we build PembRock?** <a href="#id-21okoaefoicf" id="id-21okoaefoicf"></a>

Yield farming is one of the key drivers of the DeFi ecosystem, with the liquidity provided by users helping protocols to innovate, building new features for the benefit of the entire community. Despite this symbiotic relationship, the DeFi sector is still in its experimental stages, meaning that current yield farming projects can be temperamental, hard-to-use, and occasionally, less than secure. It is only through trusted projects that decentralized finance can move into a more mature phase.

We wanted to play our part in this exciting sector, and what better opportunity could we get than building on NEAR, a blockchain which has made huge strides over the past year but is yet to house a leveraged yield farming platform.

Like our developers, NEAR Protocol wishes to accelerate the dream of DeFi as an integral part of Web 3.0 that is accessible to all. NEAR:

* Is a fast, inexpensive and carbon-neutral blockchain.
* Incorporates a user-friendly wallet.
* Operates with the Delegated Proof of Stake (DPoS) consensus mechanism, encouraging greater community participation.
* Has a large dedicated community.

One of the most exciting things about NEAR is its promotion of[ Guilds](https://nearguilds.com/guilds/) — teams of developers from the community who are creating innovative apps that are accessible to all users, which is one of the important aspects of continued DeFi growth. PembRock Finance is supported by both INC4 and Minerall Guilds in its development.

The NEAR ecosystem is expanding, with volumes on DEXes such as [<mark style="color:yellow;">Ref.Finance</mark>](https://www.ref.finance/) increasing. PembRock can tap into the demand for NEAR’s native products and a desire by crypto users to get maximum returns. The NEAR Team seems to agree with our assessment, which is why they provided us with a grant to assist our development.

### **How can I participate in PembRock Finance?**

With PembRock’s leveraged yield farming platform, you can participate as a:

* **Lender** - providing funds to individuals who wish to farm with leverage for high returns.
* **Farmer** - opening a position with leverage of up to 3x for greater rewards when farming on Ref.Finance.
* **Staker** - locking up your $PEM tokens and getting vePEM in return, which allows you to shape the future of the protocol and share in all of its profits.

### **Where does my yield come from?**

It’s the rule in DeFi that you should always try to understand where your yield comes from.

With PembRock, you can earn great yields from both lending and leveraged yield farming.

* **As a lender**, you will earn from interest paid by borrowers who open leveraged yield farming positions.
* **As a yield farmer**, you will earn money from fees paid by the pool you invest in.
* Later we will introduce **governance staking**, giving users another way to earn with PembRock!

### I want to unstake my PEM. Can I do that?

No, you can only prolong the lock-up period. We strongly advise you to carefully think about for how long you are ready to keep your tokens out of circulation in advance.

### **What is the $PEM token and why should I hold it?**

$PEM is PembRock Finance’s native token, used:

* To stake within the PembRock Finance ecosystem — with rewards paid out in PEM.
* As a part of our reward mechanism for interacting with our protocol.
* As an additional bonus for those who provide funds to our liquidity pools.
* For DAO participation — users can stake PEM to receive xPEM, our governance token.<br>

The 10% of the borrowing and farming interest profits that we collect from people, as well as the 5% fee that is charged when a position is liquidated, is distributed among the PEM holders who have staked in our protocol!

As leveraged yield farming allows you to profit regardless of market trends, the $PEM token has utility in both bull and bear markets.

### **Where can I buy the $PEM token?**

Presently, you can purchase the $PEM token on Ref Finance, [<mark style="color:yellow;">Tonic</mark>](https://app.tonic.foundation/), and [<mark style="color:yellow;">Spin</mark>](https://spin.fi/) DEXes, but it will be progressively rolled out to further CEXes and DEXes, giving people more avenues to get involved with PembRock Finance!

### **Can I be liquidated as a lender?**

No — only those that farm with leverage can be liquidated, if one or both of the coins in the pair lose a certain amount of value relative to the funds leveraged in the position.

### **What’s the fee for using PembRock Finance?**

* **Farmers** are charged 10% of their yield farming rewards as a fee, which goes to the protocol.
* **Lenders** are charged 10% of their borrowing interest profit as a fee, which goes to the protocol.
* A 5% fee is charged every time a position is liquidated, which goes to the protocol.

### **Have your contracts been audited?**

Auditing is part of Milestone 5 in our [<mark style="color:yellow;">roadmap</mark>](https://docs.pembrock.finance/roadmap). On mainnet release, PembRock had already undergone a thorough external audit by [<mark style="color:yellow;">BlockSec</mark>](https://github.com/PembROCK-Finance/audits/blob/main/2022-07-01%20BlockSec%20Security%20Audit%20Report%20for%20PembRock%20Contracts.pdf), one of the most trusted teams out there.

### **What's the fundamental difference between 2x and 3x leverage?**

Leveraged yield farming allows users to receive undercollateralized loans, multiplying the investment they would otherwise be able to lock in. This has the benefit of allowing farmers to get more yield, while also benefiting the DeFi protocol through greater liquidity and fees from profits.

* **Leverage of 2x** means that your initial investment will be matched by the platform > if you have $100 worth of $PEM, you can now farm with $200 worth.
* **Leverage of 3x** means that your initial investment will be tripled by the platform > if you have $100 worth of $PEM, you can now farm with $300 worth.

### **Why did you build on NEAR Protocol?**

We built on NEAR protocol for quite a few reasons:

* NEAR’s wallet and Dapps put a focus on user-friendliness. We love this ethos as it will help bring DeFi into the mainstream.
* The [blockchain is carbon neutral](https://near.org/blog/near-climate-neutral-product/#:~:text=NEAR%20Protocol%20has%20been%20awarded,2\)%20and%20other%20greenhouse%20gases.), already putting it a step ahead of its competitors.
* It is secure, fast, and cheap.
* The NEAR community is great! Its members are incredibly passionate and really believe in the future of the blockchain.
* [NEAR Guilds](https://near.org/guilds/) provide great support to developers looking to build innovative Dapps within the ecosystem.
* We will be the first leveraged yield farming protocol on the blockchain, having received a $75,000 grant from the NEAR Foundation!

### **How do your reinvest mechanics work?**

Reinvesting allows you to receive compound interest; that is, profit on top of profit that has already been generated. Reinvesting is done automatically.

The infographic below shows how reinvesting works with PembRock:

![](/files/8IX1KPJqN3ndFTCGVlcc)

### **Which wallets do PembRock Finance support?**

PembRock Finance supports the native NEAR Wallet, Sender, and MyNearWallet.

### **Who is the team behind PembRock Finance?**

PembRock Finance was created by a team of blockchain experts, led by Igor Stadnyk, CEO of [INC4](https://inc4.net/). Everything about our team is transparent, as we understand the importance of trust when engaging with new DeFi projects. You can [read about each of our developers here](https://pembrock.finance/).


# Quick Links

[Mainnet](https://app.pembrock.finance/)

[Testnet](https://testnet.pembrock.finance/)

\
[Website](https://pembrock.finance/)

[Twitter](https://twitter.com/PembrockFi)

[Telegram](https://t.me/pembrock_finance)

[Discord](https://discord.gg/JZ94hj8vaD)

[Medium](https://medium.com/@pembrock.finance)


# How-To Guides

Wanted to get start with leveraged yield farming on NEAR Protocol? Well, now’s your chance!

Our simple guides can have you setting up a NEAR Wallet, lending a range of tokens for stable returns, and securely borrowing to create customized leveraged positions that bring high rewards in just minutes.

The NEAR Wallet is your key to the NEAR universe. Get set up with the secure and easy-to-use web wallet super quickly.[\
\ <img src="/files/7QFy3UAE42TIjhu1iS3l" alt="" data-size="original">](/education/how-to-guides/how-to-create-a-near-wallet)

### Want to get high returns with minimum risk?

With lending, you can earn by providing funds to yield farmers who wish to leverage their crypto. Here’s how to do it in just a few clicks, with no risk of liquidation[\
\
![](/files/1sk3h7iPRFc5ZqO18xY3)](/education/how-to-guides/lending-step-by-step-guide)

### **Maximize your yield with leveraged farming strategies**

Why does yield farming need to involve different platforms and token transactions? With our quick farming guide, you’ll be opening leveraged positions with ease — profiting by the time you get to the end of the guide.

[![](/files/q5yvRmzrZIRuRZK0nB0I)](/education/how-to-guides/farming-step-by-step-guide)

### Buy PEM in a few clicks

Our step-by-step guide shows how you can get PEM onto your NEAR Wallet, ready to leverage in PembRock Finance's profitable farming pools!

[**How to Buy PEM**](https://docs.pembrock.finance/education/how-to-guides/how-to-buy-pem)

### What is PembRock Finance?&#x20;

PembRock Finance is the first leveraged yield farming platform on NEAR Protocol, providing tools for both lenders and farmers to profit, and increasing liquidity within the blockchain’s ecosystem.

A community-first project, staking and a DAO will be incorporated into the project’s operations in the near future, while the native [$PEM token](https://coinmarketcap.com/currencies/pembrock/) (currently listed on [Ref Finance](https://www.ref.finance/) and [Tonic DEX](https://tonic.foundation/)) will be rolled out to further decentralized and centralized exchanges.


# How to create a NEAR wallet

NEAR Protocol’s wallet is designed to be user-friendly, with a simple interface, the ability to select your own user name, and easy options to top up. In this guide, we’ll give you a short rundown on how to create a NEAR wallet, setting you up to interact with [PembRock Finance](https://pembrock.finance/) and all the other Dapps within the ecosystem.

### How to create a NEAR wallet

NEAR’s non-custodial web-based wallet can be set up in just a few minutes. Here’s how you can do it:

1. Go to <https://wallet.near.org/> and click *Create Account*.

![](/files/r1KNyFvhfIQ545Tv7AjS)

Unlike IDs on other blockchains that consist of a long series of letters and numbers, NEAR allows you to pick your own human readable ID.

2\. Choose your account recovery method. On sign-up, you can choose from two options: *Secure Passphrase* or *Ledger Hardware Wallet*. Once your account has been created you can also choose from *Two-Factor Authentication*, either through SMS or email.

![](/files/omNU2lDafzV5DHMwqQwI)

a) If you choose the **secure passphrase option**, twelve randomly generated seed words will be shown on the screen. Write these down or copy and paste them into a secure document as they will serve as your recovery option should you log out or need to import your wallet into another device/browser. As no centralized service is responsible for your account, losing your seed words means you will lose access to your account and funds forever.\
\
b) NEAR recommends using the Ledger Nano S or X **hardware wallet**, as its storage of private keys provides the highest level of security when using the NEAR Wallet.

### Putting funds on your NEAR Wallet

To be able to finalize the creation of your account and interact with any Dapps in the NEAR Ecosystem, you are required to put funds in your wallet. Luckily, there are a bunch of ways to do this in just a few clicks.

1. **Buy and send NEAR from CEXes** - NEAR is listed on a whole range of centralized and decentralized exchanges for purchase. If you are holding NEAR on a centralized exchange such as Binance, you can easily send it directly to your NEAR wallet. ***Remember*** to send the token through the NEAR network.
2. **Bridge from the Ethereum Network** - If you have purchased NEAR on an Ethereum-based DEX, you can bridge tokens from decentralized wallets such as MetaMask through the [Aurora Network’s Rainbow Bridge](https://rainbowbridge.app/transfer) to your NEAR Wallet.<br>

![](/files/5BvfcWCyWtmgsR1Pyeq0)

3\. **Buy directly from your NEAR Wallet** - In the *Wallet* section of your application, click the *Top Up* button.

![](/files/MeMoyRYkRZUeIpcnlviY)

This will take you to a page with a range options for purchasing NEAR tokens.

![](/files/0R52sx7SufXF7xEf7KZS)

Buying through these services will then deposit the NEAR tokens directly in your wallet without any further steps.

### How to create a NEAR wallet with PembRock

1. Open [PembRock App](https://app.pembrock.finance/).
2. Find the **Connect wallet** button in the upper-right corner and click it.
3. A window will pop up. On the right, you'll see the **Get wallet** button. Press it and choose a provider—*NEAR Wallet*, *Sender*, or *MyNearWallet*.

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

4\. Click **Get**, and you'll be taken to a webpage where you'll be able to set up your NEAR wallet.&#x20;

### Check out NEAR Names

As a fun way to connect friends who are involved in the NEAR Ecosystem, NEAR Names is a service that allows you to gift an account name to someone else in just a few quick steps.

[**Find out more here.**](https://nearnames.com/)

**All that's left to say is: have fun exploring NEAR’s growing ecosystem of Dapps!**


# Lending: Step-by-step guide

In this quick guide we’ll take you through the PembRock lending functionality step-by-step, giving you all the info you need to know to get stable returns.

### How lenders benefit from PembRock Finance

There are two roles on [PembRock Finance](https://pembrock.finance/), lender and yield farmer. Farmers are able to leverage their current holdings by up to 3x to receive triple the rewards, while lenders provide the funds that make this possible. Consequently, they are rewarded — without taking on any of the risks of liquidation, they can gain regular returns which are auto-compounded.

### PembRock’s lending functionality: step-by-step

If you haven't created a NEAR wallet and loaded it with crypto, see the NEAR Guide for how to do it in the easiest possible way: <https://docs.near.org/docs/develop/basics/create-account>

Once you have NEAR or other tokens in your wallet, they can be swapped for PEM, REF, or other tokens not listed on centralized exchanges through the NEAR DEXes [Ref Finance](https://app.ref.finance/), [Spin](https://spin.fi/) or [Tonic](https://app.tonic.foundation/).\
\
Then, follow these few easy steps to start lending on PembRock Finance:

<mark style="color:orange;">**Step 1:**</mark> Open the [PembRock Finance app](https://app.pembrock.finance/) and connect your NEAR wallet by clicking on the Connect wallet button in the top right corner.

![](/files/oyN4y1irsMgvq5UScboT)

<mark style="color:orange;">**Step 2:**</mark> Once you connect you’ll find yourself in the Portfolio Overview section; select the currency you wish to lend and press Lend. You can also do this in the Lend section of the PembRock app.

![](/files/0MNiOwWWIY2okHHH32rD)

<mark style="color:orange;">**Step 3:**</mark> You will be taken to the specific page of the token you wish to lend, and there you can enter the amount you wish to provide and confirm the transaction.

![](/files/oouvGDePinGxe9h9kyPR)

<mark style="color:orange;">**Step 4:**</mark>**&#x20;**<mark style="color:yellow;">**Congratulations**</mark>, your crypto is already working for you. You will be able to check your balance by clicking the Lend pools tab. What's more, early lenders can take a share in our fair launch rewards, which start being distributed on July 15 at 4pm (CET).

![](/files/Mm9iMmPSDH2SMuKPpuJK)

> Please note: You can lend in more than one pool at a time. It simply depends on how many different types of currencies you choose to put in your NEAR wallet.

### How to claim rewards

1. Go to your portfolio and click Lend pools&#x20;
2. On the top right-hand side, you will see the amount of unlocked rewards on the platform.&#x20;
3. Click Claim to approve the transaction.&#x20;
4. Congratulations! Funds will appear in your NEAR wallet.

![](/files/LPcN8vW3CGxVQK0ns5nG)

### How to withdraw

1. Go to the Lend tab.
2. Next to your position(s), you will see a Withdraw button, click it to go to your position.
3. Select the amount you wish to withdraw, and then confirm the transaction.
4. Congratulations, you have withdrawn funds to your NEAR wallet!

![](/files/aWqz0CnUbM5W1iYnzgNh)

To learn more about leveraged yield farming and how you can profit, visit our [School of PembRock](https://docs.pembrock.finance/).


# Farming: Step-by-step guide

In this quick guide we’ll take you through the PembRock farming functionality step-by-step, giving you all the info you need to get higher returns by leveraging your current holdings by up to 3x.

### How farmers benefit from PembRock Finance

There are two roles on PembRock Finance, lender and yield farmer. Farmers are able to leverage their current holdings to receive great rewards, while lenders provide the funds that make this possible. As yield farmers, users can take advantage of up to 3x leverage, maximizing returns while being able to adjust their positions in response to any changes in the crypto market.

Our platform ensures that your positions can be up and running quickly, with most processes automated. One of our main goals is to extend yield farming opportunities to more people — even those who have never participated in farming before.

### Step-by-step: how to access PembRock’s farming functionality

Note: If you haven't created a NEAR wallet and loaded it with crypto, see the NEAR Guide for how to do it in the easiest possible way: <https://docs.near.org/docs/develop/basics/create-account​&#x20>;

Once you have NEAR or other tokens in your wallet, they can be swapped for PEM, REF, or other tokens not listed on centralized exchanges through [Ref Finance](https://www.ref.finance/), [Spin](https://spin.fi/) or [Tonic](https://app.tonic.foundation/).

Then, follow these few easy steps to start lending on PembRock Finance:

**Step 1:** Open the PembRock Finance app and connect your NEAR wallet by clicking on the *Connect wallet* button in the top right corner.

![](/files/SdS8qxn4izx7AwDyBJ98)

**Step 2:** Once you connect, in the Portfolio Overview section, you can view all the *Lend* and *Farm* pools. You can also do this in the respective *Farm* and *Lend* sections of the app.

**Step 3:** Once you have selected the token pair you wish to farm, click *Farm*.

![](/files/nBrZDKGwovjFDIfVaWZ6)

***Please note:*** When farming a pair with leverage, you will need to have funds representing (at least) one of the coins in your wallet.

For example: If farming the PEM-USDT pair, you will need to have funds in your wallet in either PEM (if borrowing USDT) or USDT (if borrowing PEM). If you are holding wNEAR, it will need to be swapped on Ref Finance or Jumbo Exchange to one of the coins in the pair.

**Step 4:** Once you have clicked *Farm*, you’ll be taken to the corresponding page where you can choose which asset in the pair you wish to deposit, the asset you wish to borrow, the exact amounts, and how much leverage you wish to farm with through the slider (1x to 3x).

Then, click Farm to confirm the transaction.

![](/files/rEqyWtoAq9TmvPX9XnDJ)

**Step 5:** <mark style="color:yellow;">Congrats</mark>, you’re officially farming with PembRock Finance! Through automation, we allow you to farm in the click of a button — no need to go to another exchange, add liquidity, collect LP tokens, and then deposit them into separate farming pools.

* You will be able to check your balance and adjust your position by clicking the Farm Position tab.

***Please note:*** You can open more than one farming position at a time. It simply depends on how many different types of currencies you have in your NEAR wallet.

### How to close your farming position and claim rewards&#x20;

**Step 1:** Go to your Portfolio and click *Farm Positions*.

![](/files/0oW9eGpMWLjCiqOHCrIO)

**Step 2:** In this section you will see all the active positions in your portfolio. Click *Close* next to the position you wish to exit.

![](/files/gAADO9pnlB2LFHSQBy7H)

**Step 3:** You will be taken to a screen where you have the option to close the entire position, or just a certain percentage of the position value.

***Please note:*** Not all data is working properly right now; however, all available positions are secure.

![](/files/MFsskZMKY31EFsPkfA07)

**Minimize Trading** means that we will convert the minimum required amount of tokens into the borrowed token to pay back any debt and return the remaining assets to you. This can potentially save on trading fees and a negative price impact.&#x20;

**Convert all** means that your entire position will be converted to the borrowed token and returned to you after the debt is paid.&#x20;

**Step 4:** If you wish to completely close your position. Go to the bottom of the screen and click *Close Position*, then approve the transaction in your NEAR Wallet.

![](/files/LlRXWbmKcFNGwuCFIYU9)

**Step 5:** When the position is closed, the tokens automatically fall into the corresponding lend pools. In case you want to get them on your wallet, you need to make withdrawal specifically from lend pools.&#x20;

***To learn more about leveraged yield farming and how you can profit, visit our*** [***School of PembRock***](https://docs.pembrock.finance/)***.***


# How to buy PEM

PEM is the token at the center of PembRock, unlocking access to a greater number of features and giving you more chances to profit.

With PEM, you can:

* Farm PEM pairs for high APY.&#x20;
* Lend PEM for stable APY.&#x20;
* Stake PEM for a share in protocol profit.&#x20;
* Access lending rewards as an additional bonus for funding liquidity pools.&#x20;
* Gain governance rights to help steer the direction of the platform.

[**You can read in more detail about PEM tokenomics here.**](https://docs.pembrock.finance/tokenomics)

### **How to Buy PEM**

PembRock Finance only launched recently, with our token listed on the NEAR DEXes [Ref Finance](https://www.ref.finance/), [Spin](https://spin.fi/), and [Tonic](https://app.tonic.foundation/); however, as we hit the remaining milestones of our [roadmap](https://docs.pembrock.finance/roadmap), PEM will be made available across more decentralized exchanges on NEAR and other blockchains, as well as leading centralized exchanges. We will update this page as new listings occur.

#### How to Buy PEM on Ref Finance

Built on NEAR Protocol, buying PEM on Ref Finance is really easy. Just follow these simple steps:

1. Make sure you have set up your NEAR wallet and have put some funds on there. If you haven’t done this yet, please [see our step-by-step guide](https://docs.pembrock.finance/education/how-to-guides/how-to-create-a-near-wallet).
2. Go to [Ref Finance](https://app.ref.finance/#wrap.near|token.pembrock.near) and click *Connect* to NEAR in the top right-hand corner.

![](/files/ZIqC2xaFvR0oufN7GxbJ)

3\. Make sure you are in the *Swap* part of the app, and then select the token in your wallet. If you haven’t swapped for PEM before, you will need to search for it.

![](/files/qMEto2BRtLwYjTLbYvRx) ![](/files/WydFW6njwb1eQ4HZOKZT)

4\. Once you have selected the PEM token, click the green *Swap* button down the bottom and confirm the transaction in your NEAR wallet.

![](/files/8MRCQYV4n4zX5ieFbVao)

5\. You will get a confirmation when your swap is complete and your funds will appear soon after in your NEAR Wallet.

![](/files/HQOngRxeUZmLQIesFijN)

There you have it! You now have PEM in your wallet, which means you can unlock everything PembRock Finance has to offer!


# How to Stake PEM & Join DAO

Learn how to stake PEM step by step and receive vePEM in order to become part of PembRock’s Decentralized Autonomous Organization.

The DAO comes bundled with staking. If you want to have influence over the course of PembRock’s development and get a portion of its earnings, you need to lock your PEM.

The longer you keep PEM staked, the bigger your influence. For example:

* 1,000 PEM staked for 4 years ≈ approx. 1,000 voting power (VP)
* 1,000 PEM staked for 2 years ≈ approx. 500 VP
* 1,000 PEM staked for 1 year ≈ approx. 250 VP

Voting power is expressed in vePEM tokens that are available to you right after staking the original PEM. The more tokens you stake, the higher the voting power.

The most vital feature of the DAO is that 100% of protocol profits are shared among stakers based on their voting power. What does this mean, exactly?

Say Alice stakes 2,000 PEM for 4 years, while Bob stakes 1,000 PEM for 1 year. Together, their voting power is 2,250 vePEM.

Of this 2,250 vePEM, 2,000 belong to Alice, and only 250 belong to Bob (because he staked less and for a shorter period). So if a protocol generates 100 PEM in weekly rewards, Alice will get 88.88 PEM, and Bob just 11.12 PEM.

In a nutshell, there are two factors that determine how much of an impact you can make:

1. The amount of PEM you stake
2. The period for which you stake that amount

In this walkthrough guide, we will tell you how to:

* stake PEM and get vePEM;
* adjust amount and duration, if needed;
* take part in the DAO;
* claim and withdraw.

### How to Stake PEM and Get vePEM

Obviously, you need to have PEM in the wallet you connect first. If you don’t hold our tokens yet, [here’s](/education/how-to-guides/how-to-buy-pem) how you can buy them.

**Step 1.** Go to <https://app.pembrock.finance/staking>;

**Step 2.** Click on the **Connect Wallet** button;

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

**Step 3.** Grant limited rights to the PembRock app inside the NEAR wallet;

**Step 4.** After that, you’ll be redirected back to the **Staking** page. Enter the amount you want to stake and the period (you may see the volume of voting power you get under the **End Date** drop-down menu). At the protocol level, stakes are re-calculated on *Thursdays*, so if you make the lock on any other day, the final amount of vePEM you’ll receive may slightly differ from what’s displayed here.

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

**Step 5.** Press **Confirm.**

### How to Make Adjustments

The VP is decreasing gradually, but you can adjust your position to counter that.

For example, you’ve put 1,000 PEM for 4 years and got 1,000 VP. In a year, you come back to see that you have only 750 VP left (because one year has passed and there are three more to go).

You can adjust the position by adding another 1,000 PEM and getting +750 VP. You’d then have 2,000 PEM staked for 3 years with a VP of 1,500. Additionally, you can also prolong your staking for 1 extra year; that way, you’d have 2,000 VP staked for 4 years.

**Step 1.** Scroll down to the bottom of the [Staking](https://app.pembrock.finance/staking) section;

**Step 2.** **Your balance** shows tokens that are in your wallet but haven’t been staked yet. That’s the maximum you can put here. Type in the amount you’d like to add to staking and press **Confirm**;

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

**Step 3.** After that, you can continue to prolong the lockup period. Please note that you cannot decrease it.

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

### **How to Take Part in DAO**

The very first vote held by the DAO is on the distribution of community rewards set to go out in November.

**Step 1.** Go to the [Voting](https://app.pembrock.finance/voting) section. There, you’ll see two subsections — *Lenders’ Rewards* and *Borrowers’ Rewards*.

*Lenders’ Rewards* are the returns generated by those who deposit assets into lending pools. *Borrowers’ Rewards* are the returns generated by those who borrow assets from leveraged yield-farming pools.

The steps below are identical for both categories.

**Step 2.** Allocate your voting power among pools using the **Vote** column. The higher % you give, the bigger the reward it will earn.

<figure><img src="/files/4hIFYHFKX86FYVX5KwBJ" alt=""><figcaption></figcaption></figure>

Remember that all % should add up to 100. Don’t worry, though — in case you miscalculate, the borders will turn red, and the **Voting power used** will tell you by exactly how much you overvoted.

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

**Step 3.** Press **Vote** and confirm the transaction in the wallet.

If you change your mind, you can re-vote while the voting window is still open. When making changes, please keep in mind that you’ll have to type in % for all assets again, and not only those you want new values for.

### How to Claim & Withdraw

To withdraw your PEM tokens once the lockup period is over or claim the PEM rewards accrued to date, visit the [Staking](https://app.pembrock.finance/staking) section. You’ll see two corresponding boxes right next to each other (the buttons won’t be gray when available).

<figure><img src="/files/0EnWLb1SNIAT9aDMOjyb" alt=""><figcaption></figcaption></figure>

***To learn more about leveraged yield farming in general, as well as various trading opportunities, risks, and strategies, visit our*** [***School of PembRock***](https://docs.pembrock.finance/)***.***


# How to claim $PEM token on Meta Yield

PEM is the native token of PembRock, unlocking access to a greater number of features and giving you more chances to profit.

[You can study tokenomics here.](https://docs.pembrock.finance/tokenomics)

With PEM, you can:

* Farm PEM pairs for high APY.&#x20;
* Lend PEM for stable APY.&#x20;
* Stake PEM for a share in protocol profit.&#x20;
* Get lending rewards as an additional bonus for funding liquidity pools.&#x20;
* Gain governance rights to help steer the direction of the platform.

From January PEM supporters on Meta Yield can claim their tokens and join PembRock by using farming, lending or staking functionalities. Let’s check detailed guides for all ways.

### How to claim $PEM token on Meta Yield

1. Go to <https://metayield.app/project/0> and connect your wallet. After you make it, available bonds will appear as on the screenshot below.

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

&#x20;  2\. Go to <https://metabondmarket.app/home>  and connect your wallet. In the *My Bonds* section the bond with $PEM will be available as on the screenshot.&#x20;

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

&#x20;  3\. Hit the button with 3 dots and choose *Claim*.

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

&#x20;  4\. After that tokens will be available on your wallet and you could join PembRock by trying each of the functionality!

Staker, lender or farmer – from now on, the possibilities on PembRock are unlimited for you! <https://app.pembrock.finance/>

### If you claim your $PEM tokens and want to continue your experience with PembRock, you can:

* maximize your profit by investing in the 12 farming pools with up to 3X leverage;&#x20;
* use lending pools and earn with minimal risks;
* stake $PEM & decide not only about community rewards distribution but also vote for the impeccable events by joining DAO.

A great tip from our team. After you claim your $PEM you can open a PEM-USDC farm position by borrowing USDC and earn up to 200% APY!&#x20;


# NEAR Protocol Introduction

In this PembRock’s Decentralized Finance (DeFi) 101 lecture, you’ll find out what NEAR Protocol has to offer to players in the space as a layer-1 blockchain.

## **What L1 Is**

In the blockchain space, L1 (or Layer-1) means a base network that everything—DeFi apps included—is built upon. NEAR is an example of L1, along with other popular chains such as Bitcoin, Ethereum, and Binance’s BNB Smart Chain. Often, base networks fail to meet certain requirements, so they need L2 (or Layer-2) solutions.&#x20;

For example, until the recent major upgrade called The Merge, Ethereum was running on the outdated PoW (Proof-of-Work) consensus algorithm. Solutions like Optimism and Arbitrum helped it be more scalable and lowered transaction fees for the end user.&#x20;

Sometimes, introducing such a pivotal change isn’t easy, and certain chains like Bitcoin are still powered by the PoW model. The history’s first distributed ledger also has an L2 solution of its own. Lightning Network opens a direct channel between the sender and the receiver, enabling them to transact (including micro-payments) at a lightning-fast (hence the name) speed and more-than-affordable cost. The channel is closed only after all transfers have been made, which is then reflected on Bitcoin’s main chain.&#x20;

Developers of other, more recent networks, such as NEAR, had been observing all the bottlenecks that old-gen tech inflicted on existing chains and made a decision to do everything right from the very beginning.

## **Why NEAR Protocol Is a Great Match for DeFi**

**The most significant metric for any decentralized finance application is total value locked, or TVL. But rather than being just a numerical value, it shows the value that users give to the platform, its trustworthiness. According to data aggregator** [**Artemis**](https://www.gokustats.xyz/dashboard)**, NEAR has the highest correlation between its market capitalization and total value locked among the most popular chains. It means that within the NEAR ecosystem, DeFi takes a much more center stage than anywhere else.**

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

&#x20;**To cut a long story short, there are six features that make the NEAR DeFi boom a reality.**

**Feature #1:** Low-fee

Transaction cost is a serious concern for DeFi users. Most of them get involved with several earning opportunities at once and use different DEXes for that. On NEAR, an average transaction fee stands at less than US$0.01, which makes switching between options and platforms a cost-efficient activity.<br>

**Feature #2:** Fast

Another top consideration for someone in the DeFi space is speed. NEAR comes out on top here as well with just around 2.5 seconds needed to reach finality. For comparison, on Ethereum-based DeFi platforms, it takes \~10–15 seconds at regular gas prices for a transaction to be finalized.<br>

**Feature #3:** Scalable

Once the NEAR’s sharding architecture is up and running in its entirety, the protocol is expected to be processing up to 100,000 transactions per second (TPS)—a threshold on par with that of Ethereum’s anticipated [Surge](https://www.coindesk.com/markets/2022/07/21/vitalik-buterin-discusses-ethereums-upcoming-merge-and-surge-at-ethcc-in-paris/). The NEAR developer team has already [kicked off](https://www.coindesk.com/business/2022/09/12/near-blockchain-moves-ahead-with-phase-one-of-sharding-upgrade/) the first phase of its sharding roll-out on September 12, and once it’s delivered in 2023, such DeFi users as high-frequency traders will have even more flexibility on-chain.

**Feature #4:** Multi-chain

Instead of being forced to stay within the NEAR boundaries, the users have the ability to interact with the Ethereum network and send tokens across the two chains through [Aurora](https://aurora.dev/)‘s [Rainbow Bridge](https://rainbowbridge.app/transfer). Needless to say, this unlocks even more opportunities for DeFi token hunters who can swiftly jump from one hype train onto another.<br>

**Feature #5:** User- & dev-friendly

On top of all the advantages NEAR gives to regular users, it also incentivizes developers. For example, the protocol lets one run a Solidity contract through its own EVM, enables Terra and Solana engineers to natively transfer their Rust contracts to NEAR, and allows for the launch of substrate-based app-chains via [Octopus Network](https://oct.network/). Also, NEAR Foundation offers numerous grant programs, which can be found [here](https://near.org/ecosystem/get-funding/).<br>

**Feature #6:** Environmentally conscious

With the appearance of the regenerative finance (ReFi) community that’s been gaining momentum lately, the greener blockchain ecosystems are poised to lead the crypto market in the not-so-distant future. As a sign of acknowledgment, the South Pole organization [awarded](https://medium.com/nearprotocol/how-near-went-carbon-neutral-e656db96da47) NEAR with the Climate Neutral Product label, finding that the network’s energy-efficiency is 200,000 times better than that of Bitcoin.<br>

## Growth of DeFi Ecosystem on NEAR

Around this time last year, the number of DeFi projects fueled by the NEAR protocol [stood](https://web.archive.org/web/20210927202125/https://awesomenear.com/categories/defi/) at just 18, according to the AwesomeNEAR curated catalog. Today, there [are](https://awesomenear.com/categories/defi) as many as 195 of them. Some of the most popular DeFi projects on NEAR include—but are not limited to—[Ref.finance](https://www.ref.finance/) (a decentralized exchange), [Burrow](https://app.burrow.cash/) (a lending platform similar to Compound and Aave), and [PembRock Finance](https://pembrock.finance/) (leveraged yield farming protocol).

As we’ve already mentioned at the beginning of this lecture, TVL is the one and only indicator critical to measuring the DeFi health. And NEAR is staying fitter than ever, having reached its all-time high (ATH) of US$1.8 billion earlier this year—a fact that can be [observed](https://nearweek.com/stats) on NEARWEEK.

![](https://files.cdn.thinkific.com/file_uploads/714527/images/312/32c/2e4/graf.png)

## Getting Started with NEAR

To begin using NEAR, you’ll need a wallet. There are two types of them—custodial and non-custodial. Custodial wallets are those created for you—for example, when you sign up for a centralized crypto exchange like Binance. In this case, you don’t in fact have full ownership of your funds.

Non-custodial wallets are those created by you. This means that you have a private key (12/24-word seed phrase) and are the one and only owner. To set up a non-custodial wallet, choose a provider—for example, a [native NEAR Wallet](https://wallet.near.org/), [Sender](https://sender.org/), or [MyNearWallet](https://app.mynearwallet.com/). Other wallet services, such as super-popular [MetaMask](https://metamask.io/) are not supported yet, but are expected to enter the NEAR ecosystem soon.

Almost there! Once you’ve created a wallet and logged in, you’ll need to top it up to cover transaction fees in future. You can either transfer NEARs that you have somewhere else, or buy them using other cryptos or fiat ([learn more](https://wallet.near.org/buy)).<br>


# General DeFi Investing

In this sub-section of our *Education* collection, you'll get an understanding of general investing principles that you can utilize not just on PembRock, but throughout the entire world of DeFi!


# What Is DeFi?

Find out what DeFi means, how it was invented, and what bottlenecks it aims to remove.

### History of DeFi

DeFi stands for Decentralized Finance. In a nutshell, DeFi means a collection of money-making techniques that involve swapping digital tokens sitting on distributed ledgers, also known as blockchains. There are several techniques—trading, lending, borrowing, yield farming, leveraged yield farming, and staking.

Some, namely lending and borrowing, were available to people all over the world for centuries before digitalization and on-chainization began. Trading with leverage is also something that’s been around for quite some time now, but only in traditional finance. Others, like (leveraged) yield farming and staking, are unique to the decentralized world.

As a term, “DeFi” was coined (no pun intended!) back in August 2018 in a Telegram chat whose members were entrepreneurs and developers building on Ethereum. So it’s only logical that the first DeFi project ever, Maker, was based on the Ethereum network. It had been formulated as a concept in 2014—long before the term “DeFi” was even invented—and managed to attract investment from a large venture capital fund.

Once Maker went live in late 2017, others followed, leading their own ICOs (initial coin offerings) to crowdfund the development and marketing efforts. With time, Ethereum stopped being the only platform for decentralized finance, and projects started choosing the likes of NEAR, which offered faster confirmation times and lower fees, which is critical for such quick-paced activities.

But the real boom happened during the great DeFi Summer of 2020 when Compound launched an incentivization program for those who borrowed and lent $COMP—the platform’s native digital currency. The move gave birth to yield farming as such since users were encouraged to hunt for pairs that would rake in the largest amount of $COMP rewards.

This was also when Uniswap, one of the largest and most popular DeFi projects on Ethereum, launched its own utility token $UNI and airdropped \~US$1,400 worth of it to all of its early adopters. This earned Uniswap a lot of credibility and caused an influx of new liquidity providers to the platform.

While many DeFi projects, such as Uniswap, are decentralized exchanges meant to challenge the conventional trading system, some—like Synthetix, which provides exposure to digitized derivatives—are more niche. That being said, the total value locked (“TVL”) on all DeFi platforms [stands](https://defillama.com) at a staggering US$94.6 billion as of Wednesday, November 2, 2022. Seeing that level of trust, you should be asking, *But what pain points does DeFi heal, exactly?*

### What Problems DeFi Should Solve

To cut a long story short, DeFi was designed to respond to four critical challenges.

#### Challenge #1: Inclusion

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

Traditional financial markets have a high entry threshold, meaning that users need to undergo some sort of identity verification before proceeding to trading (by the way, the same rule applies to centralized crypto exchanges). Then again, the first barrier that everybody faces is the availability of a given trading services provider in one’s country of residence. The regulatory landscape is harsh and ever-changing, so obtaining required licenses usually takes too much time and effort.

With DeFi, things get much easier as all you really need to have is a wallet with digital assets you want to trade in and Internet access, of course.

#### Challenge #2: Speed of capital movement

In the fiat world, markets open and close at a specified time. This gives you less flexibility in terms of moving your capital in time in order to make the most of it. DeFi, on the other hand, is accessible 24/7/365, and all earning options are interconnected within a single ecosystem, which means you can take advantage of them simultaneously.

#### Challenge #3: Returns

One of the most pressing issues with centralized venues is the low returns they offer. In DeFi, literally anyone can start their own token, which may later skyrocket and bring its holders hundreds and even thousands of percent in revenues. Remember, however, that cryptos are subject to high volatility, exit scams, rug pulls, and hacks, which means there’s always a fair chance you can end up losing all of your hard-earned money. Stay aware, diversify, and always do your own research rather than jump straight into the “next big thing.”

#### Challenge #4: Transparency & equality

You can track the total value locked across all DeFi projects out there in real-time. Moreover, you can also see all the transactions in a given pool, all the shares its participants have, and all the operations made by any address. If that’s not complete transparency, then what is? With regards to shares, they also contribute to making decentralized finance protocols as equal as possible because everyone gets rewarded in accordance with the size of their contribution.

DeFi enables *anyone* to become a liquidity provider and earn % of the fees paid by those who make swaps (even if they’re short of capital). This means that in the DeFi space, you can not only buy crypto and hold it but also invest in a certain trading pair to boost its liquidity and, therefore, support the entire crypto market while getting richer yourself.

### What Makes DeFi Truly Decentralized

There are two major cornerstones behind DeFi’s delivery on the decentralized promise.

#### Cornerstone #1: Underlying tech

In general, blockchains are distributed and decentralized. It is this technology that fuels all of DeFi. The operation of a certain chain is maintained by nodes, who ensure that all data is valid and there’s no malicious behavior. There are numerous nodes (e.g., over 400,000 on Ethereum), and they are usually situated in different data centers scattered across the globe.

#### **Cornerstone #2: Governance principles**

Decentralized autonomous organizations (DAOs) are another integral part of the DeFi multiverse. Through them, participants of a protocol can express their opinion on matters related to its further progress. For example, at PembRock, we have a [DAO](https://docs.pembrock.finance/education/how-to-guides/how-to-stake-pem-and-join-dao) of our own, which directly impacts how much both lenders and farmers make every month, on top of 100% protocol profit distribution.

To sum up, although DeFi is still in its infancy, it’s already managed to make a substantial impact. There are surely many more interesting players to enter the market yet—think of traditional finance giants who’d like to turn on-chain, at least partially.


# CEX vs. DEX

## **Key Differences between CEX and DEX**

In the blockchain space, there are three types of platforms where you can buy or sell cryptocurrency—CEXs (centralized exchanges), DEXs (decentralized exchanges), and over-the-counter. Over-the-counter (or OTC) trading simply means that you exchange tokens or coins directly with another person. This is pure peer-to-peer transactions—something that Bitcoin’s founder Satoshi Nakamoto envisioned as an original use case. One of the largest and oldest OTC trading platforms in the game is LocalBitcoins, which was founded back in 2012.

<table><thead><tr><th width="311.3333333333333">Parameter</th><th align="center">CEX</th><th align="center">DEX</th></tr></thead><tbody><tr><td><strong>Possibility of being blocked</strong></td><td align="center"><strong>✅</strong></td><td align="center"><strong>❌</strong></td></tr><tr><td><strong>Full control over your money</strong></td><td align="center"><strong>❌</strong></td><td align="center"><strong>✅</strong></td></tr><tr><td><strong>Need to upload your ID</strong></td><td align="center"><strong>✅</strong></td><td align="center"><strong>❌</strong></td></tr><tr><td><strong>Support for smart contracts</strong></td><td align="center"><strong>❌</strong></td><td align="center"><strong>✅</strong></td></tr><tr><td><strong>Use of Automated Market Maker</strong></td><td align="center"><strong>❌</strong></td><td align="center"><strong>✅</strong></td></tr></tbody></table>

As the crypto industry was making progress and saw the influx of new blockchains—some of which differed from Bitcoin to a large extent—it needed venues where those digital assets could be traded. Centralized exchanges were a pioneer here, since they offered a model that had been tested in the traditional stock market over the decades.&#x20;

The DeFi revolution provoked a rise in the popularity of decentralized exchanges, which often came bundled with a richer pool of trading opportunities, such as liquidity mining, yield farming, lending, and staking. Speaking of the differences between CEXs and DEXs, we’d like to highlight the following:

### **Control over funds**

Centralized exchanges like KuCoin or Kraken have a final say in whether a certain transaction will pass through. Moreover, they reserve the right to block your account at any time. There have been numerous instances when some CEXs refused to allow users to withdraw their funds to external wallets or exchanges and requested that additional documents be submitted for review. Those who were more lucky had to wait until the verdict was reached; others had their crypto stuck in limbo.

### Ownership

Building on the previous point, it is important to mention that with centralized exchanges, your money is not really yours. The thing is that when you create an account, a CEX would generate wallets for all different cryptos on your behalf, meaning it’ll have private keys to them. Using DEXs, you simply use the WalletConnect feature and sign in with the wallet that is owned by you, meaning you have a seed phrase and can manage it as you see fit.

### Identity verification

Identity verification All major centralized crypto exchanges have KYC (Know-Your-Customer) and AML (Anti-Money Laundering) procedures in place nowadays. In order to channel to the fiat world, CEXs must be licensed in the areas they operate in. This is dictated by the rapid expansion of the industry that is making regulators worldwide more and more cautious. On DEXs, you don’t have to submit any personal documents and can start trading with your wallet only.

## **The Core of DEX**

There are two backbones of any decentralized exchange’s operation.

#### Backbone #1: Smart contracts

The idea of smart contracts was first introduced by a famous American computer scientist Nick Szabo in 1997. Even though it was a quarter-century ago, Szabo envisioned lending—which is part of today’s DeFi—as one of the use cases for smart contract technology by proposing to embed collateral as a contractual cause into the “\[...] software we deal with.” A smart contract is essentially code. It is a set of programmable commands that get executed in various scenarios (for example, when token A is swapped for token B, or the impact that swap has on the price of both). Resolution by machine is much more just than resolution by people. One may argue, however, that since smart contracts are also written by people, they are prone to errors and vulnerabilities. That is right, but to mitigate those risks, projects send their smart contracts over to be checked by recognized auditors such as Certik, and we highly recommend that before you decide to join a certain DEX, you find out whether its code has been validated.

#### Backbone #2: AMM (Automated Market Maker)

The idea of an automated market maker was proposed by Ethereum founder Vitalik Buterin in 2016. In his legendary Reddit thread, he outlined everything—from the lock of tokens to pump initial liquidity into the pairs to ‘shares’ according to which profits would be distributed among users.

In a nutshell, AMM allows for the near-instant order settlement as all funds are pre-deposited into the pools, unlike with centralized exchanges where one needs to place an order and wait for it to be filled through a matching algorithm sourcing from the order book. One of the features lacking by AMMs in comparison to traditional exchanges was limit orders, which enabled people to buy/sell when the price increased/decreased to a certain level.

The project to change that and bring limit orders to DEXs was Uniswap with its v3 release. A feature called ‘Range Orders’ has allowed liquidity providers (or LPs) to put a single token into a custom range that is either higher or lower than the current price. If the market price falls within that range, one asset is sold for another along a smooth curve. Another benefit versus centralized execution is that while that exchange is being done, LPs earn swap fees in the meantime.

Decentralized exchanges in many ways resemble traditional P2P exchange platforms, which host liquidity in two assets. Those assets are brought in by investors and other users act as automated market makers, while the exchange rate is dynamic—not fixed—and determined by the volume of reserves a given P2P platform has. To understand the rate, you need to derive one asset’s value based on the other’s. For example, there’s 20 NEAR and 20 PEM, meaning a trader can buy 10 PEM with 10 NEAR. Once this transaction is made, there will now be a shift in reserves to 30 NEAR and 10 PEM, meaning to buy an additional 10 PEM, the trader will have to spend 30 NEAR this time as the PEM’s value has increased in relation to that of NEAR.

## **Top DEXes**

The 24-hour trading volume across the DEX sector reached its all time-high (ATH) of US$8.9B on Thursday, May 20, 2021.

<figure><img src="https://lh6.googleusercontent.com/Cb0rPB-FvuZ0EcR24EESpnuaNYsERSfHJQ_Q8jr12vi6FzOiBGfo6j3CtKOvsLrukNxx8-CQWJxENAwYEZKVXa1ZFk7ALS5sgNJvIvruliOBeMnWMcr9Nex7A9MSKiwVN7MXyJXUCU_cdJIi1BxaGs8uD3Njr4qlIViawPlDgxuwIe42vA8a0uZ4ZQrbfA" alt=""><figcaption></figcaption></figure>

According to analytics aggregator DefiLlama, the most popular DEXs in terms of daily trading volume are (as of Wednesday, October 26, 2022):

* Uniswap (Ethereum): US$1.94B&#x20;
* DODO (multi-chain)&#x20;
* Curve (Ethereum)

As for the NEAR ecosystem, the most widely used decentralized exchange here is Ref.finance, which ranks 9th and has over US$100 million in total value locked.

DEXs are still in their infancy, and yet they are crucial to the functioning of DeFi apps. If decentralized finance is destined to gain sufficient adoption to eventually overthrow centralized venues, that won’t be possible without decentralized exchanges backing them.


# How to Become a Liquidity Provider (LP)

## How to Become a Liquidity Provider (LP)

To provide liquidity into a pool on a decentralized exchange, you need to have a non-custodial wallet (meaning you have a passphrase to it) with two cryptos in it—the ones that you want to supply. Apart from that, you also have to hold the native digital coin of the blockchain that the platform is built upon in order to cover gas fees (for example, ETH when adding liquidity on Uniswap, BNB on PancakeSwap, or NEAR on Ref.finance).

Although the liquidity provision process may (slightly) differ from DEX to DEX, the general rules are to make sure that:

1. there is a small amount of native tokens in your wallet before connecting it to a DEX of your choice;
2. you have equal worths of cryptos you want to provide—that’s the requirement of the AMM algorithm.

For example, there’s the PEM/USDC pair. Since USDC is a stablecoin, its worth is supposed to always be close to US$1. As for PEM, its price at the time of writing stands at US$0.085. This means that if you wanted to become a liquidity provider of this pool, you’d need to have 11.76 PEM and 1 USDC in your wallet, or 23.52 PEM and 2 USDC, and so on. The key is to always keep the 50/50 ratio in U.S. dollar terms.

For reference, [here’s](https://guide.ref.finance/products/pooling) a how-to article on adding liquidity on Ref.finance.

## H2: Quick Intro to Ref.finance

Ref.finance is NEAR Protocol’s largest DEX in terms of daily trading volume. It allows you to provide liquidity into pools, as well as engage in making swaps, yield farming, and staking. To find out more about the Ref.finance’s capabilities, check out this awesome step-by-step [guide](https://learnnear.club/what-is-ref-finance-a-step-by-step-guide/) by Learn NEAR Club.

## H2: What Is Wrapping & When Do You Need It?

The process of wrapping is needed in two cases:

1. When a token is ‘imported’ from another chain
2. When tokens sit on the same chain, but are of different standards

Case #1 example: Uniswap wanted to list Bitcoin, the most famous and widely used cryptocurrency in the world. But Bitcoin had its own chain, so in order for Ethereum (and by proxy, Uniswap) users to be able to use it, it needed to be ‘mirrored’ onto the Ethereum network. That was done through the issuance of wBTC (which stands for Wrapped BTC) on the Ethereum network.

Case #2 example: Uniswap wanted to list Ether, Ethereum network’s native digital token. Since Uniswap was powered by Ethereum, that shouldn’t have been a problem, right? The thing is, token standards that most digital assets use (such as ERC-20) were created much later than the original ETH had been invented. So in order for them to be compatible, there was a need for an ERC-20 version of ETH, which came around as wETH (or Wrapped ETH).

We will not go into the technicalities, but when the wrapping/unwrapping happens, tokens are burned on one chain and released on the other; that’s how the 1:1 peg is maintained. The feature of moving tokens across chains is enabled by services called ‘bridges.’

## How to Make Swaps

To make a swap (which is, essentially, buying one crypto with another/selling one crypto for another), you need to visit the corresponding section of a decentralized exchange you want to do that through. Usually, the process is pretty straightforward: you just need to make sure the amount of the asset that you have is sufficient to buy the desired amount of the asset that you need (don’t forget to account for all fees that come with it). Some DEXs also allow you to customize the slippage tolerance, which can happen because of two reasons: a) the market volatility is high, and b) the liquidity is low. For example, you want to swap 1 PEM for USDC, and when you initiate the deal, the DEX estimates that you will receive 0.085 USDC in return. Once the swap has gone through, you end up with 0.08 USDC only, meaning the slippage you experienced was \~6%.

For reference, [here’s](https://guide.ref.finance/products/swap) a how-to article on trading on Ref.finance.

## Who Are LPs & Why Can’t DEXs Function without Them?

Liquidity providers, or LPs for short, are those without whom decentralized exchanges simply wouldn’t exist. According to the principles of the AMM mechanism, all pools (or trading pairs) need to be pre-funded, and those initial deposits (just like any other that follow) are made by liquidity providers.

LPs ensure that all members of a DEX can buy or sell a given asset at any time. For that, they are accrued LP tokens (also known as ‘shares’) that reflect their share in the total amount locked. The larger it is, the bigger the LP reward they receive on each swap.

Example: there is a pool with 117.6 PEM and 10 USDC in it. You’ve decided to supply 11.76 PEM and 1 USDC, meaning your share would be 10%. Imagine that in one day, 5 PEM has been sold via the pool. Since the liquidity provider fee is paid in the token sold, you’d be entitled to 10% of that amount. On Ref.finance, the pool fee ranges between 0.05% and 0.3%, of which 80% [goes](https://guide.ref.finance/products/swap) to LPs. Assuming the pool fee is 0.3%, the amount you’d make from this single swap would be (5 PEM \* 0.3% \* 80%) \* 10% = 0.012 PEM \* 10% = 0.0012 PEM.

## Most Common Risks of Liquidity Provision

There are two major enemies for any Liquidity Provider—impermanent loss and liquidation.

To put it simply, impermanent loss is a situation when the dollar value of your withdrawal is lower than the dollar value you could get by doing absolutely nothing or doing something other than LP’ing.

Consider this: after you supplied 11.76 PEM and 1 USDC into the pool, the price of 1 PEM has risen to 0.2 USDC. How would that change your stake? Uniswap provides a formula to calculate that (for simplicity, let’s assume that token1 is a token that has changed in price, while token2 is the one we compare it against):

token1\_liquidity\_pool = sqrt(constant\_product / token1\_price)&#x20;

token2\_liquidity\_pool = sqrt(constant\_product \* token1\_price)

First, we need to multiply existing liquidities of both tokens, in our case:

117.6 \* 10 = 1,176

Next, we need to find new liquidities according to the formula above by taking square roots:

PEM = sqrt (1,176 / 0.2)

USDC = sqrt (1,176 \* 0.2)

The price change would give us the following new values for the pool: 76.68 PEM and 15.34 USDC. To verify, simply multiply the new values, and you’ll get the same product as before (in this particular example, the resulting value would be a bit lower because of the rounding that was carried out for better illustration).

Given that your share is 10%, the amount you’d be able to take out is 7.67 PEM and 1.53 USDC. At 0.2 USDC per PEM, you’d receive 7.67 \* 0.2 + 1.53 = 3.06 USDC in total.

What would’ve you had if you’d held onto your initial PEM and USDC or put them to use somewhere else? At 0.2 USDC per PEM, that would’ve been 11.76 \* 0.2 + 1 = 3.35 USDC. Your impermanent loss would be equal to 0.29 USDC; while this seems like a bearable amount to lose, keep in mind that this concrete number is an absolute one, meaning the larger the initial deposit and the fluctuation, the larger the loss. It’s called ‘impermanent’ because if you wait the turbulence out and things get back to normal, the loss will disappear as well.

To give you a better grasp, Uniswap [provides](https://docs.uniswap.org/protocol/V2/concepts/advanced-topics/understanding-returns) the following figures:

<figure><img src="https://lh3.googleusercontent.com/WNqYofeeqjK08RZVuO9ihLayhOQrFFXJtBn8CmESVyalqFTmjPCtqWcduIyTFAlpZrpEZh2w8Nh6ipUgFTuBTNNI0EHNfFUftl7gGbtezsTi89-Y6e2EM_oNWIltFNHhr43wXUdEs0T_hmBgPqxErHxrgXTHm2xMFHN7b6NQ0SYPst-jV7u8cy-WvSrlVw" alt=""><figcaption></figcaption></figure>

* a 1.25x price change results in a 0.6% loss relative to HODL
* a 1.50x price change results in a 2.0% loss relative to HODL
* a 1.75x price change results in a 3.8% loss relative to HODL
* a 2x price change results in a 5.7% loss relative to HODL
* a 3x price change results in a 13.4% loss relative to HODL
* a 4x price change results in a 20.0% loss relative to HODL
* a 5x price change results in a 25.5% loss relative to HODL

To mitigate the risk of impermanent loss, one may stick to the pairs that are less ‘exotic’ and less prone to high volatility, or stablecoin pairs, or diversify by canceling out impermanent loss in one pool via profiting in another.

The second enemy, liquidation, is far worse than impermanent loss as with it, one loses all of their money. In the context of liquidity provision, it happens when the price of either asset falls to 0. With the release of its [v3](https://uniswap.org/blog/uniswap-v3#capital-efficiency), Uniswap, however, offered a workaround by allowing LPs to deploy their capital across a specific price range—which acts as a kind of liquidity stop-loss—while keeping the rest to invest however they see fit.

## H2: LP Incentivization Mechanisms

LP incentivization mechanisms are those that make it even more lucrative for liquidity providers to supply their funds into the pools. One such mechanism is yield farming (more on that below); some other could include airdrops, referral systems, or competitions. The DEXs get really creative with this one, so it could be literally anything.

## H2: Where Do Coins Come From?

As we’ve already mentioned, the LP rewards come from fees that are paid by those who make swaps within the pools. As for the incentivization initiatives, the financing can come from the project’s treasury—usually, DEXs reserve a certain volume for themselves that they later distribute towards activities exactly like this.

## H2: How Yield Farming Works

On DEXes, yield farming is an extra type of reward that liquidity providers earn by staking their LP tokens. Yes, that’s right—on top of the LP fees, they also build an additional inflow of capital on their share itself! Terms and conditions vary from platform to platform, so if you want to find out what programs there currently are, make sure to navigate the DEX app that you’re using and follow all its latest news and announcements.

<br>

<br>


# Understanding Impermanent Loss

Impermanent loss is a unique feature that arises when providing liquidity to automated market makers (AMMs). It is a real risk that yield farmers come up against, which is why we’ll give you a clear understanding of what it is in this quick explainer.

### The background — AMMs and Liquidity Pools

Automated Market Makers, popularized by UniSwap, SushiSwap, PancakeSwap, and Ref Finance, are the mechanism by which decentralized exchanges (DEXes) can function. The main feature of DEXes is that they allow you to swap tokens without any intermediaries or the traditional order book technique that matches buyers and sellers.

So how does this work? Successful swaps using AMMs rely on two things, liquidity pools, and smart contracts. Smart contracts automatically execute any swaps that occur on the exchange, and liquidity pools hold the required funds needed to make the transaction — no counterparty is needed.

Liquidity pools are funded by users, who then receive a percentage of transaction fees and other rewards for lending out their coins; this is where yield farming comes from.

### So where does impermanent loss factor in?

Impermanent loss is due to the automatic rebalancing of funds that occurs when the price ratio in a liquidity pool changes relative to the price you deposited at. Unless you’re farming stablecoins, the impermanent loss is a common occurrence.

Impermanent loss is not always disastrous, and doesn’t always mean a loss in dollar terms, which is why it is sometimes referred to as an opportunity cost — impermanent loss means you would have done better simply holding the two coins rather than depositing them in a liquidity pool.

### How impermanent loss works

As part of AMMs, liquidity pools work when the total value of each asset in the pool is equal.

For example, with NEAR worth $5 and USDT worth $1, there must always be 5 times as many USDT as NEAR in the pool, creating a 50:50 ratio. If NEAR goes to $6, there must be 6 times as many USDT to keep the balance.&#x20;

*Let’s imagine you put have 100 NEAR ($500) and 500 USDT (total $1000), which you deposit into a liquidity pool.*

NEAR surges 10% to $5.50 meaning your 100 NEAR is now worth $550. This is good for you, but not for the liquidity pool, as there is no longer a 50:50 balance.

* To keep ratios equal, some of your NEAR will be exchanged to USDT, giving you 524.4 USDT and 95.35 NEAR.
* The total in dollar terms of your tokens is now $1,048.81, which is great, you’ve made some profit! But if you simply held your tokens without depositing, your holdings would come to $1,050. This means your impermanent loss is $1.19, or 0.11%.

![](/files/Js5iY9qYX8cObWqHi1HG)

While this doesn’t sound so dramatic, it’s important to note that this was a fairly conservative example. Impermanent loss can be much greater when farming two volatile assets (or less when farming two stable assets).

### Impermanent loss — things to note

* Impermanent loss can occur irrespective of whether token prices go down or up. It is to do with the different value ratios between the two coins you are farming.
* Impermanent loss can be offset by yield farming rewards — if you’re getting a 140% APY return, a small impermanent loss is unlikely to worry you.
* Impermanent loss is not permanent — further shifts in token prices can cause the pool to rebalance in your favor.
* Leveraged yield farming adds an extra layer of risk because you can be liquidated before rebalancing occurs, leaving you with impermanent loss, and a fall in the value of your position which is also subject to protocol fees.
* Impermanent loss is most dangerous when: \
  \- One token drastically increases in price. \
  \- One token drastically decreases in price. \
  \- One token increases, while the other one decreases.

To get more of an understanding of how impermanent loss works and look at some examples, we encourage you to look at these impermanent loss calculators:

[Daily DeFi impermanent loss calculator](https://dailydefi.org/tools/impermanent-loss-calculator/) - a simple calculator based on UniSwap’s algorithm. [WhiteboardCrypto impermanent loss calculator](https://whiteboardcrypto.com/impermanent-loss-calculator/) - three calculators with varying degrees of explanation behind the calculation of your impermanent loss.


# Token Correlation

Correlation is the relationship between two or more instruments. We can examine the correlation between certain tokens to create a yield farming strategy that remains profitable even through token retracements and market dips.

### Statistical and fundamental token correlation

There are different reasons why one token may follow and/or affect the price of another, but we can group the correlation of assets within two distinct categories; those that are correlated due to an underlying fundamental, and those that are linked purely statistically.

An example of a statistical relationship can be shown with ETH & BTC. The correlation of this pair is extremely strong over the long run; meaning that as BTC has risen, so has ETH, and when BTC goes down, this negatively affects the price of ETH. There is no real reason why this should occur; after all, they aren’t serving the same purposes and are reaching into different sectors. ETH is a blockchain solution that involves smart contracts. BTC is a completely different platform that doesn’t support Dapps. Regardless of what the tokens’ functions are, there is a statistical correlation.

A fundamental correlation can be found in projects that are linked such as NEAR and stNEAR. Their movements are closely linked as the staked value of NEAR is derived from the token’s original price.

### Why is token correlation important when investing?

Understanding the correlation between tokens means we can formulate different strategies with a high degree of probability about what the outcome will be.

When investing in a liquidity pool, it is best practice to put money into assets that move independently of each other; that is, they do not correlate. In holding a portfolio with coins that are not correlated, a market dip won’t affect your balance sheet very much.

It is shown time and again that with any fall or correction, assets exhibit multidirectional dynamics. While most things will fall, there will always one or more sectors that grow. This often happens because investors want to shift their investments for more profit, hedge their bets, buy what they believe to be an undervalued token, and a whole bunch of other reasons.

![Portfolio with a clear correlation](/files/BrRbpTb3j976xruqmo2v)

In this image we see a portfolio without a clear correlation. Even when there are falls in one coin, others grow or stay consistent.

![Portfolio without a clear correlation](/files/7RtxbrxYJCBXRt0HfJWs)

If a portfolio looks like this, the coins are correlated and everything moves in the same direction. This is not a good portfolio to have as market downturns can have severe consequences as you experience losses across the board.

Farming in liquidity pools is a long-term game, so each asset should have its own dynamics, meaning you can bring in more consistent returns without experiencing periods of huge losses, which can lead to liquidations and the closing of positions when leveraging cryptocurrencies.

To explore correlations between different pairs of cryptocurrencies, you can use a handy site called [Cryptowatch](https://cryptowat.ch/en/correlations).


# The Importance of Diversification

Talk to any seasoned investor or follow the practice of large investment groups, and you will see diversification at work. Although trading is never risk-free, diversifying your portfolio brings, on average, more stable results, as there is not just one area of exposure. The phrase “don’t put all your eggs in one basket” is popular for a reason.

When funding liquidity pools, the principle of diversification should also be pursued. Different pairs have varied dynamics and risks, so as well as monitoring positions and studying a token’s history to get a better understanding of its movements, it’s best to divide your capital across different pairs.

### Consider correlation

In [another document in this series](https://docs.pembrock.finance/education/why-its-important-to-consider-token-correlation), we talk about the correlation between tokens. This correlation may be purely statistical, or because the projects share a fundamental. When diversifying, correlation also plays an important role.

Consider you are choosing to diversify your farming portfolio with REF/USDT and JUMBO/USDT. What could the problem here be?

Ref.finance and Jumbo are both in the DEX space, which brings some correlation. If interest in this area faces a setback, both coins are likely to be negatively affected.

### Tokens from different sectors

Your LP investment portfolio should incorporate tokens from different sectors, such as those associated with the metaverse, DEXes, blockchain solutions, bridges, stablecoins, and so on. This means that even if one position is affected, others should continue to perform, reducing your overall risk.

### Other forms of diversification

While people commonly think of diversification in terms of different cryptocurrencies and the role that they play, there are other forms of diversification that we can consider:

* **Blockchain diversification** - Do not hold all assets on one network.&#x20;
* **Platform diversification** - Hold assets on different platforms.&#x20;
* **Stable coins diversification** - Purchase and use different stablecoins.


# Leveraged Yield Farming Education

In this sub-section of our *Education* collection, you'll get a deep understanding of everything leveraged yield farming — from how it works all the way to top strategies that the experts use.


# Farming roles explained

The world of DeFi is moving fast, meaning there are constantly new products being developed. They come with their own user roles and terminology, some of which stick and then become the default within the industry.

With so many articles, guides, and whitepapers, you may feel overwhelmed at conflicting definitions that are out there — which is exactly why PembRock puts a premium on simplicity. Step-by-step we aim to give you a DeFi education in plain English, and what better place to start than with the main roles users can undertake on our platform.

By the end of this quick explainer, you’ll have a concrete understanding of the difference between lenders, liquidity providers, and farmers.

### Lenders

Lending is one of the easiest and safest ways you can put your money to work within PembRock. It involves simply lending your funds which will be used by liquidity providers and yield farmers.

What do you get in return? A dependable return from borrowing interest — unlike farmers, lenders cannot be liquidated, so your funds will never be at risk.

![](/files/Z0c8CRddwR65xWHbRQqG)

### Liquidity Providers

Liquidity providers are those that deposit in liquidity pools. While lenders often lock up one asset at a time, funding a liquidity pool involves depositing two coins\*; the amounts of which need to be of equal valuation.

* For example, if you have $1000 you would like to add to a NEAR-USDT liquidity pool, you would need 500 USDT and 150 NEAR (at the price of $3.33 per NEAR) — an exact 50/50 split.

In return, the liquidity providers receive liquidity pool (LP) tokens, representing the equal split of the two assets in the pool. The tokens automatically earn fees proportional to the share of the pool, often paid out in the same LP token, which can usually be redeemed at any time. APY can vary drastically depending on the platform used and the assets provided.

### Farmers

Farming operates like a supercharged liquidity provision, earning those who deposit tokens extra rewards. As illustrated in our graphic below, yield farmers are also liquidity providers, depositing in pools and receiving LP tokens; however, then there is another step — these LP tokens are put into a *farming* pool, where incentives include high APY, airdrops, the provision of governance tokens, and more.

![](/files/CyjMDRg0ARiXtBoPirWh)

If you think farming sounds complicated, you’re not wrong. There are many different protocols with varied layouts and functionality, meaning yield farming can be difficult. PembRock aims to make it simple, with an intuitive interface and a [<mark style="color:yellow;">range of guides</mark>](https://docs.pembrock.finance/education/how-to-guides) to help you access great returns — without having to navigate all the complexity.

### Leveraged Yield Farming

With a world of opportunity in yield farming, we allow crypto holders to leverage their assets by up to 3x. This means they can farm with three times the crypto for greater rewards and execute strategies such as shorting a coin within a position, which isn’t possible to do without leverage.

**To read more about our** [<mark style="color:yellow;">**strategies for leveraged yield farming, see our other doc**</mark>](https://docs.google.com/document/d/17140Rj7G8AkCCg6vdIhMzizAtA-4wjlxk2OHtzwzuow/edit)**.**

\*The majority of liquidity pools are made up of two coins; however, products like [<mark style="color:yellow;">SAUCE pools on Ref.Finance</mark>](https://app.ref.finance/sauce) (USDT/USDC/DAI) require the liquidity provider to add a certain amount of all three assets.


# Providing Liquidity to DEXes — Key Benefits

Before jumping into any farming protocol, it’s important to understand where your money is going and how your rewards are generated. By reading this, you will understand what farming is and where your returns come from.

### What is a DEX?&#x20;

A DEX (decentralized exchange) is a platform that enables straight P2P transactions using virtual currency. Unlike the traditional order book method and third-party control that is the feature of centralized exchanges, DEXes give you full control over your own data, and allow you to buy tokens without having to match with a seller, and vice versa. The reason that you can buy or sell without a counterparty is due to the fact that all trades are regulated through smart contracts, with funds taken or added to liquidity pools. DEXes require large reserves of funds to make sure that enough liquidity is required to facilitate trades, meaning users are incentivized to lend out tokens that can be used by the protocol, receiving a proportion of the fees and other rewards — this is what’s known as yield farming.

### Why provide liquidity to DEXes?

With many competing DeFi platforms on the market, DEXes need to provide generous conditions to entice participants to farm with them. Simply a share in the fees is not usually enough. Farmers are often provided with higher than usual APY, governance tokens, or extra rewards. Getting a handsome return for simply locking up your token can allow you to quickly grow your investment, but of course, is subject to price dips and impermanent loss as risk factors.

### How to provide liquidity & farm

While there are small differences depending on the DEX you are providing liquidity to, the following steps generally apply.

1. Select the DEX
2. Select the pair
3. Make sure an equal amount of both tokens is in your wallet
4. Provide liquidity to the liquidity pool
5. Get LP tokens — representing your 50:50 token share in the pool
6. Stake your tokens for farming rewards

### Why farm with leverage through PembRock?

Farming with leverage gives you the option to capitalize on the great farming rewards offered by DEXes. Through an undercollateralized loan, you can farm 3x the amount of crypto, generating larger rewards than you would be otherwise able to do. Sound complicated? We make it simple, with:

* An easy-to-use interface
* Automated farming
* Auto-reinvestment

PembRock counters the clunky and hard to use DeFi products that discourage the sector from being utilized by the wider community. In addition, we work on NEAR Protocol, a blockchain that is fast, inexpensive, scalable, and secure.

### PEM Farms on Ref Finance

PembRock sits at the center of NEAR’s rapidly growing ecosystem, allowing us to capitalize on integrations with the freshest and most innovative projects. At launch we have already partnered with Ref Finance, meaning PEM token holders can already take advantage of rewards offered by this DEX

If you are PEM holder and want to start with DEX farms today, there are a growing number of options available to you.

**Ref.Finance** (<https://app.ref.finance/farms>)&#x20;

See how to take advantage of the PEM farms available on [Ref.Finance](https://app.ref.finance/farms) by checking out our [step-by-step guide](https://medium.com/@pembrock.finance/join-the-pem-wnear-farm-on-ref-finance-for-high-apr-and-rewards-in-usn-a-step-by-step-guide-22c5d85dd939).

Also, PembRock recently announced its own [LP incentivization program](https://docs.pembrock.finance/tokenomics/lp-incentivization-program), where you can get a 20% bonus on liquidity provided to participating DEXes.


# Undercollateralization: The Key to Leveraging

PembRock leveraged yield farming allows you to earn greater rewards by borrowing up to 3x the amount of crypto that you are currently holding. Sounds great, right? But in an environment where users can be anonymous, how are these loans secured? In this doc, we’ll quickly explain to you how undercollateralized lending is the key to leveraged yield farming like a pro.

### Collateralization - how it's used in DeFi lending

Collateral in the world of finance is defined as funds that a borrower puts up in order to secure a loan. It acts as a guarantee to the lender and is forfeited to them in the event that the borrower is unable to repay the loan.

A similar principle works in the world of DeFi, where borrowers put up crypto in order to secure loans that are automated by smart contracts. For this reason, they are quick to obtain.

#### **Overcollateralization**

Aave, Maker, and Compound, the three Ethereum-based platforms that helped to popularize lending and yield farming provide overcollateralized loans. This means that you need to put up more funds than you borrow. To use an example from the NEAR universe, to borrow $150 worth of ETH on [<mark style="color:yellow;">Burrow</mark>](https://app.burrow.cash/#/deposit), you would need to put up 200 USN ([<mark style="color:yellow;">NEAR’s stablecoin</mark>](https://medium.com/nearprotocol/announcing-usn-v2-0-towards-true-stability-f4dbc6897d1f)) as collateral.

You may be asking, why not use the funds you have rather than locking them up to get a loan that is smaller in value? There are two big reasons:

* You don’t have to sell the crypto you have in order to get liquidity. You can keep your underlying funds while using a borrowed coin to farm or perform any other transaction in the DeFi ecosystem.
* Those with bad or non-existent credit scores navigating the world of traditional finance can get access to loans at much better rates than they would otherwise be able to.

#### **What is the&#x20;*****collateral factor*****?**

You might see collateral factor mentioned when consulting lending platforms. This relates to the amount that needs to be put up to obtain a loan, and varies according to the token that is being used as collateral, as well the platform used.

Using our example with ETH & USN above (200 USN to borrow $150 worth of ETH), we see a collateral factor of 75%. If 300 USN was required to borrow the ETH, the collateral factor would be 50%.

### **Undercollateralized loans for leveraged yield farming with PembRock Finance**

One of the big differences between our platform and others in the DeFi space is that we provide *undercollateralized loans* for farmers. This means that you can obtain loans that are of greater value than the initial funds provided.

For example, a farmer who wants to open a leveraged position can put up 100 NEAR and receive 200 more, bringing their total to 300 NEAR which can be farmed. This means greater utility for the user as well as greater liquidity for products such as [<mark style="color:yellow;">Ref Finance</mark>](https://app.ref.finance/) within the NEAR ecosystem, the DEX we have integrated with on launch.

#### **What’s to guarantee that an undercollateralized loan will be paid back?**

PembRock puts in place appropriate liquidation thresholds so that funds provided by lenders will never be in any danger. If a token in the position falls to a point where the farmer is in danger of not being able to cover the loan, their position will be automatically liquidated.

This handy graphic gives you an idea of how the risk of liquidation rises as more funds are leveraged. With PembRock, you can leverage anywhere between 1 and 3x, with auto-reinvesting meaning you benefit from compound interest without having to lift a finger.

![](/files/2PZlFT83ZuXvn2EDRbpB)

In the example where we borrow 200 NEAR against 100 NEAR of collateral, the leverage level is now 3 with a debt ratio of 67%. If the price of NEAR drops by more than 31%, it means your collateral no longer covers the losses you have incurred. For this reason, liquidation protects both the protocol and you from losing all your funds.


# Yield Farming Myths Busted!

*Don’t know much about leveraged yield farming? You’re not alone! Being a new sector, there is not so much information out there, and what you can read may fail to properly explain what is a pretty complex topic.*

*Luckily, our PembRock Finance experts are here to bust some of the biggest myths, making sure you get the information you need to farm with us safely.*

### Myth 1 - Leveraged yield farming is more dangerous than regular yield farming

Answer: When leveraging funds to farm, you are indeed staking more crypto with a threat of liquidation by the protocol if your debts outstrip the amount that your initial investment covers.

Both yield farming and leveraged yield farming can be risky, but this risk can be significantly lowered depending on the research you do on the projects and the coins you choose to farm, and whether you monitor and adjust your position according to current market conditions.

### Myth 2 - Lenders can be liquidated

Answer: Lenders cannot be liquidated. As stated in our first myth, liquidation is a process the protocol undertakes to make sure that losses with borrowed funds do not outstrip the initial collateral that is provided for leveraging. Using their own funds, lenders on PembRock receive predictable rewards based on the borrowing interest rates paid by farmers.

### Myth 3 - Once I open a position, it can’t be altered until I withdraw my funds

Answer: All positions can be monitored and altered; in fact, we encourage this practice! With fluctuations in the market, adjusting a position can prevent liquidation during a temporary market downturn.

### Myth 4 - Lenders can be exposed due to the failure of farmers to repay loans

Answer: This is also completely incorrect. We apply conservative liquidation thresholds to ensure that farmers have no choice but to pay back loans, meaning funds provided by lenders are completely protected. Lending rewards are gained as advertised and then auto-reinvested for even greater returns!

### Myth 5 - Leveraged yield farming is only good for gaining short-term profits

Answer: This is one of the biggest myths in the yield farming space. Yes, it’s true that some people farm for as little as a day, bank their profits, and then put their money elsewhere, but some of this comes out of fear of a coin nosediving or a lack of trust in the platform they are using. Farming reliable coins means you don’t have to constantly move your funds around, and operating on a secure platform like PembRock Finance means you can safely farm over a longer period of time with your profits auto-compounding!

### Myth 6 - You can’t profit from leveraged yield farming in a bear market

Answer: The great thing about leveraged yield farming is that you have the potential to profit in any market conditions. Below is an example of how even if the price of a coin goes down, you can still profit:

*For the purpose of this example, NEAR = $5 USD*

*You have 1000 USDT and borrow the 400 NEAR ($2000) needed to farm with PembRock Finance with 3x leverage.*

*Some of the NEAR you borrowed will be automatically converted to USDT to ensure you have a 50:50 value ratio within the pool. Your starting position will consist of 1,500 USDT and 300 NEAR.*

*In an event where the price drops by 50% (making the price of 1 NEAR $2.50), the pool rebalances to keep the 50:50 value ratio.*

*Your position will now consist of 1125 USDT and 450 NEAR.*

*If you choose to close your position, from your initial $1000 principle, you will be left with:*

*1125 USDT*

*50 NEAR (your 400 NEAR loan will be paid back automatically)*

*If you sell this 50 NEAR straight away at $2.50, that will be $125, bringing your total to $1250 — $250 clear profit.*

*Please also note that you can only profit using this strategy when leveraging by 2x or more.*

![](https://i.ibb.co/nn3kc79/TW-25-1-9.png)


# Key Leveraged Farming Strategies

PembRock Finance gives you the tools to farm in any market conditions with the ability to maximize your yields! Here are some common strategies that you can put in place right now with our easy-to-use platform.

### Strategy #1 - Farm a token pair without leverage

Farming without leverage means you do not take out any uncollateralized loans and use only your own funds, removing the risk of liquidation. You can choose from any of our constantly expanding number of token pairs to farm with, with any profits automatically reinvested, compounding your rewards!

### Strategy #2 - Farm a token pair with leverage

PembRock gives you the ability to maximize your farming profits by taking out undercollateralized loans. This means you can leverage your existing funds by up to 3x, with the ability to adjust your position any time based on the prevailing market conditions.

### Strategy #3 - Opening a long position with leveraged funds

With leveraged yield farming, borrowed tokens are immediately put to work, bringing in farming gains while the borrowing interest is paid back.

If you open a long position, it basically means you are confident in a token’s ability to rise, which commonly occurs in a bull market. Longing one coin means taking a short position in another coin and can be done when leveraging by 2x or more. Let’s examine how this can be done with the pair PEM-USN:

* Let’s say market conditions are favorable and you believe the price of PEM will go up. To gain maximum profits, you will want to open a long position on PEM.
* Go to PembRock Finance and open a PEM-USN position, borrowing the USN stablecoin with leverage.
* You can put up $4000, leveraging 3x to borrow 8000 USN (which you will short), giving you a total of $12,000. This is split evenly between PEM and USN.
* For the purposes of the example, let’s say PEM is $0.10 and you choose to farm 60,000 tokens, roughly corresponding to 6,000 USN. In sum, your position will come to US$12,000 — the 50/50 ratio of 60,000 PEM and 6,000 USN required within the liquidity pool contract.

> Remember, you must return the coin you’ve borrowed, so you are banking on the fact that PEM will outperform USN.

* As your initial deposit and borrowed tokens are converted to a 50/50 farming position, your holdings will look like this:

> Long 60,000 PEM ($6000) - farmed in the liquidity pool Short 6,000 USN ($6000) - farmed in the liquidity pool

#### Having $2000 more PEM than your original investment means you are longing the coin with a leverage of 1.5x, while earning triple the farming yields!

### Strategy #4 - Opening a short position with leveraged funds

Leveraged yield farming gives you more options — a case in point; it is one of the few products in the DeFi ecosystem that allows you to create short positions. Regular yield farming doesn’t allow you to create these positions, which farmers can become painfully aware of in the event of a market downturn.

Luckily, even in a bear market, PembRock can work for you, with the drop in the price of an asset serving as an advantage. Here we’ll show you another example using PEM and USN, where basically the opposite strategy is employed to ensure you can keep farming profitably.

* Imagine the market is facing a correction and you believe PEM will go down. To gain maximum profits in these conditions, you will want to open a short position on PEM.
* Go to PembRock Finance and open a PEM-USN position, borrowing PEM with leverage.
* As with the above example, let’s say PEM is $0.10 and you choose to farm 60,000 tokens, roughly corresponding to 6,000 USN. In sum, your position will come to US$12,000 — the 50/50 ratio of 60,000 PEM and 6,000 USN required within the liquidity pool contract.
* You can put up $4000, leveraging 3x to borrow 80,000 PEM tokens ($8000) (which you will short), giving you your total of $12,000 which is split evenly between PEM and USN.

> Remember, you have to return the coin you’ve borrowed, so you are banking on the fact that USN will outperform PEM.

* As your initial deposit and borrowed tokens are converted to a 50/50 farming position, your holdings will look like this:

> Short 60,000 PEM ($6000) - farmed\
> Long 6,000 USN ($6000) - farmed

#### With a PEM exposure of 1.5x, you will be earning 3x the amount of farming rewards you otherwise would be, while having to pay back less due to the fall in the value of PEM. While being able to monitor and adjust your positions at any time, PembRock allows you to get the most from your farming, no matter the conditions.

### Strategy #5 - Hedging your risk by farming multiple positions with leverage

If you’re feeling cautious, you can actually open multiple positions, combining longing and shorting to give you a neutral hedge while still receiving 3x farming rewards.

You may be asking, why not just farm stablecoins then? This is indeed a valid question, but we should recognize that due to a lower level of risk, stablecoins usually don’t give you the kind of returns that you will get from farming other cryptocurrencies.

Please note, that if you are going to undertake this strategy, it is important to frequently monitor your positions. In a crypto market that is quite volatile, overseeing and adjusting your position accordingly can help you avoid liquidation, especially as you take on more leverage.


# How to Avoid Getting Rekt in Leveraged Yield Farming

PembRock Finance’s philosophy and mechanics are built around the fact that when you win, we win. We don’t want anyone on our platform to lose money, which is why aim to provide you with easy-to-understand educational docs. Read on to see what the main leveraged yield farming risks are, and once you understand them, you can better invest your money, manage any risks, and leverage for success!

### Leveraged Yield Farming Risks (And How to Mitigate Them)

For those who know what they are doing, using borrowed funds to farm with leverage by up to 3x provides a way to quickly grow your portfolio; however, as with borrowing and cryptocurrencies in general, there are associated risks which can cause greater losses than if you were staking, or farming without leverage. Luckily, you don’t have to be a helpless bystander if something doesn’t go your way; by knowing what your risks are and how to mitigate them, you can still protect your funds and give yourself much greater chances of profiting.

#### Volatility

This one is unavoidable to some degree, regardless of whether you are holding, staking, farming, or performing any other DeFi operation. Leveraged yield farming presents increased risk when it comes to volatility due to the possibilities of impermanent loss and liquidation (which we cover below) or negative APY (where your losses outstrip the amount you earn from farming).

**How to mitigate:** Mitigating volatility could involve:

* [Diversifying funds](/education/general-defi-investing/the-importance-of-diversification) to spread your risk.
* Considering [token correlation](/education/general-defi-investing/token-correlation) to hedge your risks properly.
* Picking coins to farm that are generally less volatile.
* Farming stablecoins.

#### Security

Not every DeFi protocol is created equal. As products are rushed onto the market to cash in on the latest craze, it could be at the expense of quality control, leading to smart contract exploits or other hacks.

**How to mitigate:** While it can be difficult to assess the level of security of a project, looking at whether it has an experienced team and has undergone solid testing and platform audits is a good start. Just for the record, PembRock Finance is created by a skilled and experienced team which you can read about [here](https://pembrock.finance/about-us). The project has also undergone intensive internal testing as well as an external audit by [BlockSec](https://blocksec.com/). Establishing trust between our platform and its users is of top priority.

#### Impermanent Loss

Impermanent loss is a unique feature that arises when providing liquidity to AMMs. In short, it is the opportunity cost that can occur when the price ratio in a liquidity pool changes relative to the price you deposited at.

**How to mitigate:** Linked to volatility, impermanent loss can be greater or smaller depending on the assets you farm and whether they are likely to move in the same or opposite directions. Impermanent loss needn’t be disastrous at all, especially if your farming APY far outstrips the percentage loss you incur.

To get a full understanding of [impermanent loss](/education/general-defi-investing/understanding-impermanent-loss), read our documentation — complete with examples!

#### Liquidation

A necessary process that protects the protocol and lenders from losing any funds, liquidation is the biggest risk to those that borrow crypto to farm with leverage. Liquidation involves the automatic closure of your position and repayment of all fees, occurring when your debt level is set to surpass the amount of funds that you have put up as collateral.

<figure><img src="/files/2YIbndEjNpLurIvu4LpH" alt=""><figcaption></figcaption></figure>

**How to mitigate:** As with impermanent loss, liquidation can be averted through considering the volatility of your token pair. If one or both coins in your pair is really volatile, you may be best off taking on a smaller debt ratio; however, if you wish to gain the biggest farming rewards possible with 3x leverage, the best way to avoid liquidation is to carefully monitor and adjust your position as required.

**Farm with all these steps above and you’ll see that your chances of getting rekt are minimized.**


# Calculating Leveraged Yield Farming Returns

Want to know how much you are likely to earn from your farming position? With all the different calculations it can be difficult to tell, and in crypto, due to the volatile nature of the market, returns can change quickly due to rises and falls in the prices of tokens.

Despite this, it’s still worth understanding how your returns are calculated, and it will give you an understanding of what you’re likely to receive.

### The difference between APY and APR

Both APY and APR are used to calculate the annual rate that you will earn if you have invested money, or that you will owe if you have borrowed money.

**APY = Annual percentage yield.** \
This calculation takes into account compound interest. This means that the longer you leave your money invested, the greater returns you get, due to the fact that your profits are constantly added to your deposit, itself gaining interest.

> Knowing how often a position is compounded is very important as it shows you how the APY is reached.

**APR = Annual percentage rate.** \
This calculation does not take into account compound interest and gives a flat rate of return that does not change.

### How are crypto project rates calculated?

Crypto projects will usually calculate your return in terms of APY, and PembRock is no exception. With our auto-reinvest feature, farming rewards are compounded.

***So how does this look in a real-life example?***

Firstly, if farming a token pair advertises ≈ 140% APY, things aren’t as simple as dividing that 140% by 12 to calculate your monthly earnings.

For example, a 140% APY may represent a 90.6% interest rate that is compounded monthly, or an 87.65% interest rate compounded daily.

<table><thead><tr><th width="236.04603325532554">Principle investment of $1000 — APR 87.65%</th><th width="236.20504117648773">Difference between APR and APY</th><th>Principle investment of $1000 — APY 140% (87.65% interest rate)</th></tr></thead><tbody><tr><td>An APR of 87.65% with a $1000 investment held for one year would deliver a total of <strong>$1,876.5.</strong> Each day would net you a flat $2.40 in profit.</td><td>With the same principle investment, an APY of 140% (compounded daily) would also net you $2.40 in profit on the first day, but this would then be added to your $1000, meaning the next day you would earn 87.65% on $1002.40, and so on.</td><td>By the end of the year, your compounding interest will deliver you $2400, a difference of $523.5.</td></tr></tbody></table>

### Farming with leverage for great APY

As you can see, compounding interest is a powerful tool. While gains may start relatively small, earning interest on top of your interest can lead to great rewards if you keep your investment in for a decent period.

While yield farming is associated with short-term gains, we aim to give you a user-friendly secure platform along with educational tools, so you can profit over the long term!

In the meantime, you can play around with two cool tools for looking at the difference between APR and APY and seeing the difference between returns using different interest rates, compounding periods, and other parameters.

* [APY Calculator](https://www.omnicalculator.com/finance/apy)&#x20;
* [APR to APY Calculator](https://www.aprtoapy.com/)


# The Power of Hedged Positions

**In another one of our educational docs, we talked about** [**diversification**](https://docs.pembrock.finance/education/general-defi-investing/the-importance-of-diversification)**, a popular way that investors offset their risk. Hedging may seem similar, in that different positions are taken to minimize losses if an asset crashes. Hedging is more complicated, but you definitely shouldn’t be turned off, as the practice can bring profits even if an asset falls, which diversification cannot.**

### The Difference Between Diversification and Hedging

**Diversification** is the practice of spreading your investment across different assets. In the world of crypto, this can mean moving your funds across tokens from different sectors. Correlation plays a part here; for example, investing in a number of DEX tokens whose movements are correlated is not great diversification. Then there is diversification across blockchains, platforms, and even stablecoins to consider. As we have recently seen, a large drop in the market can cause certain stablecoins to lose their peg against the asset they are linked to.\
\
**Hedging** can also involve looking at correlation, but is less about diversification and more about taking opposite approaches to investing in the same or closely related asset. There are many different ways you can hedge, but one of the most straightforward ways is to take a long position in an asset, while simultaneously taking a short position; that is, betting that it will go lower in price. As crypto is volatile, you may profit in the long run through your long position while collecting profits from a short-term fall from your short position. If this doesn’t occur, you are still offsetting some risk, as you will see some gains regardless of whether the coin has a sustained upward run or falls.

### How can you hedge with leveraged yield farming?

Leveraged yield farming involves putting up collateral and borrowing tokens. With PembRock Finance, you can borrow up to 3x your current holdings to take advantage of the high APY that farms are offering. This does, however, leave you with debt that is paid off as a percentage of rewards that are accrued.

**To read more about collateral, how it can be calculated and how it works in leveraged yield farming,** [**see our more in-depth doc on the topic**](https://docs.pembrock.finance/education/leveraged-yield-farming-education/undercollateralization-the-key-to-leveraging)**.**

This is where it gets interesting! Leveraging by 2x or more puts you in a position where you can effectively short the coin in your token pair that you have borrowed, providing an effective hedge in the event of a market downturn. This works due to the fact that you can profit from the position of the coin you used as collateral while paying back a smaller amount of debt, due to the borrowed coin’s fall in value.

### PEM-USN

[PEM-USN](https://app.pembrock.finance/farm) is the farm that (at the time of writing) offers the greatest rewards on PembRock Finance, with an APY of 542%, or 175% APR.

Farmers that want the opportunity to maximize their returns can borrow PEM; with leverage above 2x, users can get returns from the APY and hedge the value of the PEM token.

* If the PEM token rises, the farmer will profit from the increased value of the overall position and the compounding interest gained from farming.&#x20;
* If the PEM token falls, the farmer will profit from the compounding interest gained from farming, while their debt value shrinks relative to their overall position.

**Here’s how it can be done:**

* Go to PembRock Finance and open a PEM-USN position, borrowing PEM with leverage.
* Let’s say PEM is $0.12 and you choose to farm 60,000 tokens, roughly corresponding to 7,200 USN. In sum, your position will come to US$14,400 — the 50/50 ratio of 60,000 PEM and 7,200 USN required within the liquidity pool contract.
* You can put up $4800, leveraging 3x to borrow 80,000 PEM tokens ($9600) (which you will short), giving you your total of $14,400 which is split evenly between PEM and USN.
  * Remember, you have to return the coin you’ve borrowed, so you are banking on the fact that USN will outperform PEM.
* As your initial deposit and borrowed tokens are converted to a 50/50 farming position, your holdings will look like this:
  * Short 60,000 PEM ($7,200) - farmed&#x20;
  * Long 6,000 USN ($7,200) - farmed

**With a PEM exposure of 1.5x, you will be earning 3x the amount of farming rewards you otherwise would be while having to pay back less due to the fall in the value of PEM.**

***Please note:*****&#x20;This kind of position works best as a short-term strategy to hedge against any long-term positions.**


# The Big Short—PembRock Style

PembRock was launched in the NEAR ecosystem to give DEXes expanded capabilities and allow everyday users to take advantage of the benefits of leveraged yield farming within an easy-to-use platform.

One of the best things about using PembRock is that you can profit in any market, employing strategies to make gains regardless of whether a token is going up or down. Especially with the volatile market we find ourselves in, the ability to use PembRock Finance to short a token is a big advantage, and we’ll show you how to do it!

*Keep reading to see how.*

### **What is longing and shorting a token?**

Longing is the conventional way to invest in an asset, and involves purchasing a cryptocurrency in the expectation that the price will rise. It is then sold at a pre-defined price or when the investor is happy with their profit.

**Example:** You buy 1 Ethereum at $2000, selling when the price hits $2400, making a $400 profit.

Shorting is done when a person believes that the price of an asset will go down. It is mostly the practice of more experienced investors, as the practice involves borrowing, payment deadlines, and commissions. In simple terms, opening a short position involves borrowing a certain number of tokens, selling them at the current market price, and then buying them back at a later date once the price has dropped. These tokens are then returned, with the price difference kept by the investor (minus the borrowing fee).

**Example:** You open a position on an exchange where you borrow 2 Ethereum (with 1 Ethereum as collateral) for $2000 each. These are sold at the market price for $4000. Once the price drops to $1600, you decide to repay your loan, buying back the 2 Ethereum for a total of $3200. This nets you a profit of $800, minus the borrowing and handling costs.

### Where can you short tokens?

Bigger exchanges with a lot of liquidity such as Binance offer margin trading, as do certain DEXes such as dYdX. On these platforms, you can easily borrow assets to short cryptocurrencies like in the example described above.

#### Why is PembRock finance better?

While the platforms described above allow you to borrow for the purposes of shorting a cryptocurrency, you can’t earn while you wait. It may take a month or more for a cryptocurrency to fall to your desired level, and all that time you will be paying borrowing fees.

But what if the borrowing fees are 0%? Well, when this is the case, it is often because funds are secured by overcollateralization—where a collateral amount larger than the cost of the loan is put up. With these funds locked up, there is what is referred to as an *opportunity cost*.

**PembRock Finance is different**, as you have the ability to short a cryptocurrency while profiting from farming APY in the process. We also offer undercollateralized loans, where you can borrow 3x the amount of crypto that you put up, boosting your rewards.

We’ll give you a step-by-step look into how this works.

### **Creating a short position with PembRock**

*It’s important to note that creating a short position with PembRock is only possible when leveraging funds by 2-3x.*

**For the purposes of this example we will use the** [**PEM-USN**](https://app.pembrock.finance/farm) **pair — USN being NEAR’s algorithmic stablecoin pegged to the US dollar, and PEM being PembRock’s native token — which currently offers 285% APY with 3x leverage.**

Imagine the market is facing a correction and you believe PEM will go down. This is where opening a short position will come into play.

1. Go to PembRock Finance and open a PEM-USN position, borrowing PEM with leverage.
2. Let’s say PEM is $0.10 and you choose to farm 60,000 tokens, roughly corresponding to 6,000 USN. In sum, your position will come to US$12,000 — the 50/50 ratio of 60,000 PEM and 6,000 USN required within the liquidity pool contract.
3. By putting up 4000 USN and leveraging 3x to borrow PEM, you will get 80,000 tokens ($8000). 20,000 of these PEM tokens will be converted to 2000 USN, giving you your total of 6000 USN and 60,000 PEM tokens.

**Remember**, you have to return the coin you’ve borrowed, so you are banking on the fact that USN will outperform PEM; that is, PEM will drop.

**Let’s examine three scenarios:**

* **Both coins stay the same** - even though you are hoping to profit on a drop in the value of PEM, you still profit through farming yields. After just two weeks your yield farming returns will increase your position value to *$12,548.93* (minus borrowing fees).
* **PEM drops to $0.08** - PEM drops to $0.08 - If you choose to close your position now, you will be required to pay back 80,000 tokens at $0.08, meaning you now pay back $6400.\
  \
  You borrowed $8000, so $1600 is kept as profit, **plus** the yield farming returns which are compounded daily.
* **PEM sharply increases -** A sharp increase can put you in a loss-making position, as farming gains are outstripped by the fact that you need to pay back 80,000 PEM at an increased value.

So there you have it — that’s how you can profit from the fall of a cryptocurrency you are farming!

**Please note** that leveraged yield farming offers you a great chance to receive high APY, but there is also the risk of liquidation, where your debt increases to a point where it is not able to be covered by your collateral, necessitating the automatic closure of your position. When shorting, a token dump won’t result in liquidation, but it can in other situations, meaning it’s always good practice to monitor your position.

<figure><img src="/files/2YIbndEjNpLurIvu4LpH" alt=""><figcaption></figcaption></figure>


# Yield Farming with Leverage: How to Maximize Returns

Yield farming is one of the buzzwords that came out of DeFi’s rise to prominence in 2020. People are generally aware that it involves depositing money and getting rewards — but how does it actually work?

### What Is Yield Farming?

In simple terms, yield farming involves lending your cryptocurrency to DeFi platforms that operate with [Automated Market Maker (AMM)](/education/yield-farming-glossary#amm-automated-market-maker) models and require liquidity. Of course, to lend out their tokens, users need to be compensated, which is why high APY, other rewards & giveaways, and gamification is employed by DeFi apps to incentivize farmers to provide liquidity to them.

### How Does Yield Farming Differ from Staking and Liquidity Providing?

While all three of these methods are used to gain greater rewards than simply holding your cryptocurrencies, there are some distinct differences.

#### Staking

Staking involves providing assets to be used as collateral for decentralized nodes in networks that operate with the Proof-of-Stake (PoS) consensus algorithm. Stakers are chosen to validate transactions and secure the network, incentivized with rewards to do so.

#### Liquidity Providing

Very similar to yield farming, liquidity providing is the practice of providing funds to DeFi protocols by depositing in pools such as BTC/USDT, receiving rewards in the the form of LP tokens (which represent a 50:50 split of the tokens in the pool that has been invested in), often as well as governance tokens which allow users to have a say in the direction of a protocol.

#### Yield Farming

As stated above, yield farming helps provide liquidity to platforms that operate using AMMs. Rather than LP token rewards, users get a high APY return in one of the tokens they invested in, or sometimes even in a third coin. As with liquidity providers, governance tokens can also be thrown in as an extra incentive, as well as airdrops of certain tokens and other rewards.

### How Can Farming with Leverage Help Maximize Your Rewards?

Yield farming is defined by its fluidity and the ability to make great returns, which is why it has become so popular. Leveraged yield farming brings together the phenomena of yield farming and leveraging assets so that farmers can gain even larger rewards!

PembRock Finance allows farmers to leverage anywhere between 1.25 and 3x their initial crypto investment, meaning they can benefit from farming greater amounts. Just a 10% fee is taken, while you keep the rest of the profit gained on borrowed funds.

**To see more about how leveraged yield farming works on our platform,** [**check out our user story here**](https://docs.pembrock.finance/about-pembrock/user-story-farmer)**. To learn more about the associated risks,** [**visit this page**](/risks/risks-for-farmers)**.**


# Useful Links & Tools

## [CoinGecko](https://www.coingecko.com)

CoinGecko is a crypto market data aggregator. It allows you to see current prices, market capitalizations, and trading volumes. On top of that, CoinGecko also lets you take a look at past historical data and make comparisons.

## [NEAR Explorer](https://explorer.near.org)

NEAR Explorer is a service that allows you to, well, explore the NEAR network. There, you will find it all—addresses, balances, incoming and outgoing transfers, smart contracts, and more.

## [DefiLlama](https://defillama.com)

DefiLlama is an analytics portal that provides stats related to the Decentralized Finance industry. It gives visibility into indicators such as Total Value Locked and dominance, among others, and allows you to filter by chain, category, project, and a number of other parameters.

## [ODYSSEY](https://odyssey.fi)

Odyssey is your portfolio management solution for the NEAR protocol. Among its features, the most unique one is an ability to control your investments, risks, and positions.

## [WhiteboardCrypto](https://whiteboardcrypto.com/impermanent-loss-calculator)

At WhiteboardCrypto, you can estimate your potential impermanent loss.

## [Omni Calculator](https://www.omnicalculator.com/finance/apy)

With Omni Calculator, you can calculate the APY (annual percentage yield) of your position.

## [APR to APY](https://www.aprtoapy.com)

Here, you can convert the APR (annual percentage rate) value to APY (annual percentage yield).

## [Cryptowatch](https://cryptowat.ch/en/correlations)

On Cryptowatch, you can find the correlation between different tokens to better diversify your portfolio.

## [Ref Finance Stats](https://stats.ref.finance)

This portal provides data regarding NEAR-powered tokens involved in the DeFi trade.

## [Rainbow Bridge](https://rainbowbridge.app)

This is a website that enables you to move tokens across Ethereum, Aurora, and NEAR.

<br>


# Yield Farming Glossary

### AMM (Automated Market Maker)

An Automated Market Maker is a smart contract designed to automatically and instantly facilitate cryptocurrency token swaps drawing on funds held in liquidity pools. The AMM does away with the traditional order book model of trading that occurs on centralized platforms.

### APR (Annual Percentage Rate)

Annual Percentage Rate is the interest earned on an investment over a specific period without compounding.

### APY (Annual Percentage Yield)

Annual Percentage Yield is the interest earned on an investment over a specific period, taking into account compounding interest.

### Auto-reinvest

Auto-reinvesting is the process whereby funds accrued through interest are automatically added to the principle investment amount, generating [compound interest](#compound-interest).

### Closed Position

A closed position is a trade that is no longer operational, and can occur manually or automatically.

### Collateral

Collareral is an amount of money put up as security in order to receive a loan.

### Compound Interest

Compound interest occurs when interest accrued is added to the principle amount, effectively allowing you to gain interest on the interest you have earned.

### Debt Ratio

Your debt ratio is your debt value divided by your position value, often expressed as a percentage of decimal.

For example, if you have 300 NEAR and leverage 3x, your entire position is now worth 900 NEAR, giving you a debt ratio of 66.66%. This debt ratio will (hopefully) decrease over time as you incur farming rewards, which grow the value of your position.

### DAO (Decentralized Autonomous Organization)

A decentralized autonomous organization is a collective of members with rights to democratically govern the direction of a protocol with the help of smart contracts. Management is not hierarchical and power through proportional voting rights are usually conferred onto stakeholders through staking, holding governance tokens, node ownership, or completing certain actions within a platform. Transparency is achieved through decisions that are automatically enforced through smart contracts.

### DEX (Decentralized Exchange)

A decentralized exchange is a platform for buying, selling, and swapping digital assets. DEXes operate using peer-to-peer (P2P) functionality to conduct financial operations, doing away with centralized intermediaries. Most DEXes use [AMMs](#amm-automated-market-maker) to facilitate near-instant trading, and users are custodians of their own funds.

### Diversification

Diversification in cryptocurrency trading relates to holding or utlizing assets that come from different sectors, fill different roles in the DeFi economy, and aren’t necessarily correlated in terms of their movements.

### Farming Pool

A farming pool is where [liquidity pool (LP)](#liquidity-pool-lp) tokens can be lent out to gain extra rewards, such as a high APY return, airdrops, or the right to participate in governance decisions.

### Governance Token

Governance tokens are features of [DAOs](#dao-decentralized-autonomous-organization), conferring voting rights usually proportional to a person’s stake in the DeFi platform. Governance tokens can be used to vote through proposals affecting the very direction of the protocol.

### Lending

Lending is the process of providing funds for borrowers to use for farming and other DeFi operations, gaining a percentage reward as an incentive to provide capital.

### Lending Pool

A lending pool is the place where lenders provide their coins that are then used by borrowers.

### Leveraging

Leveraging in the context of trading refers to borrowing a sum of money to add to your principle investment for the purposes of getting greater returns.

### Liquidation

Liquidation is the closing of a trading position, usually where an exchange or platform is in danger of not being able to recover funds from a trader that has incurred mounting debts relative to the collateral provided.

### Liquidation Threshold

Liquidation threshold is the point at which a position is closed. (See liquidation)

### Liquidity

Liquidity in crypto refers to the ease with which tokens can be swapped for other tokens.

### Liquidity Pool (LP)

A liquidity pool is a set of funds locked within a smart contract, used by automated market makers for the purposes of making seamless token swaps.

### LP Token

An LP is a token that represents a liquidity provider’s equal share of the tokens in a liquidity pool.

### Liquidity Provider

A person who provides liquidity to a liquidity pool or DeFi platform.

### $NEAR

The native cryptocurrency of NEAR Protocol.

### NEAR Protocol

A Layer 1 blockchain solution and home to an expanding ecosystem of decentralized applications. PembRock is the first leveraged yield platform built on NEAR Protocol.

### Open Position

A trade that is still ongoing. An open position can be adjusted at any time on PembRock Finance.

### $PEM

The native token of PembRock Finance, used for farming, accruing rewards, participation in incentivization programs, and participation in the PembRock DAO.

### Position Value

The amount your entire position is worth, including principle and leveraged funds.

### Ref Finance

Ref Finance is a community-led, multi-purpose Decentralized Finance (DeFi) platform built on NEAR Protocol. Ref takes advantage of NEAR’s low fees, one-to-two second finality, and WebAssembly-based runtime.

### Safety Buffer

Your safety buffer is the gap in funds between your debt ratio and the liquidation threshold. A small safety buffer means your are in danger of liquidation if one or both coins in your farming pair drop any further.

### Smart Contract

A smart contract is code that self-executes when certain preconditions are met. Smart contracts automate trades within decentralized exchanges and form the basis of decentralized applications.

### Spin

Spin is a DeFi derivatives infrastructure built on NEAR Protocol offering an on-chain order book solution that gives CEX-competitive experience to DeFi users. By using an order book model, users get advantages that include a better user experience compared to AMM, flexible liquidity, easy access for institutional traders, secure and transparent on-chain verification, opportunity to price different types of instruments, and trading robot interoperability.

### Stablecoin

Stablecoins are cryptocurrency tokens that remain consistent in value to a particular asset, whether that be a physical item (hard currency, precious metal, real estate), or virtual items such as one or more crypto assets. Stablecoins may be backed one-to-one by the physical asset it mirrors, and is often also regulated through pre-determined conditions written into smart contracts.

### Staking

Staking is a part of the Proof of Stake (PoS) consensus mechanism, and involves users locking their cryptocurrency assets on a network to ensure the security and decentralized nature of the chain. Staked assets are often held in a validator node or crypto wallet and incur rewards as blocks are verified.

### Token Correlation

Token correlation measures the relationship of movements between two or more cryptocurrencies. Those that rise and fall together have a close correlation, while those that move independently do not.

### Tonic

Tonic brings the speed and convenience of centralized exchanges to NEAR while being fully decentralized. Through a high-performance, fully decentralized trading platform, users can buy and sell any NEAR-based token with low fees, deep liquidity and precise pricing, secured by NEAR Protocol.

### Total Borrowed

The total amount of assets that have been borrowed at the protocol level.

### Total Supply

The total amount of tokens that are available for distribution. The $PEM token has a total supply of 24,220,000.

### Total Value Locked (TVL)

TVL is a common way to measure value in DeFi, counting the value deposited in a specific project or blockchain ecosystem.

### Trading Fees

The fees you are required to pay to the protocol for conducting financial operations. Fees can vary depending on the protocol and blockchain used.

### Undercollateralization

Undercollateralization refers to loans that are worth more than the principle sum put up as security. PembRock allows lenders to leverage their crypto but up to 3x, meaning that with 100 NEAR as collateral, you can secure 200 NEAR as a loan for farming.

### Utilization ratio

The utilization ratio is the total amount of outstanding debt divided by the supply volume in the liquidity pool, usually expressed as a percentage. The utilization ratio is often monitored to detect unusual activity and can fluctuate depending on crypto market volatility.

### Yield Farming

Yield farming is the process of investing [liquidity pool ](#liquidity-pool-lp)tokens to receive even greater rewards. Depending on the farming pool, farmers may receive more LP tokens, a governance token, or other crypto rewards.


# PembRock Finance Cookies Policy

Our website uses cookies. By using this website and agreeing to this policy, you consent to PembRock’s use of cookies in accordance with the terms of this policy. ​ Cookies are files sent by web servers to web browsers, which then store them. The information is then sent back to the server each time the browser requests a page from the server. This enables a web server to identify and track web browsers.

### Google Cookies

Google uses two types of cookies: session cookies and persistent cookies. Session cookies are temporary, deleted when you close your browser, while persistent cookies remain stored on your computer until they are manually deleted or reach some predetermined expiry date.

In order to improve performance and understand how users behave on our website, we use Google Analytics, which generates statistical and other information about website use through cookies stored on users’ computers. ​ To see more about which information Google collects, why this is collected, and how it is used, you can explore Google’s privacy policy at: <https://policies.google.com/privacy>​&#x20;

We publish Google AdSense interest-based advertisements on this website. These are tailored by Google to reflect your interests. To determine your interests, Google will track your behavior across the web using cookies. You can view, delete or add interest categories associated with your browser using Google Ads Preference Manager, available at: [ ](<https://www.google.com/ads/preferences/ >)You can opt-out of the AdSense partner network cookies at: <https://www.google.com/policies/technologies/ads/>. However, this opt-out mechanism also uses a cookie, and if you clear the cookies from your browser your preference to opt out will be reset; that is, you will need to opt out again.

To ensure that an opt-out is maintained when using a particular browser, you can use the Google browser plug-in available at: <https://www.google.com/ads/preferences/plugin>

Refusing Cookies

Most browsers give you the option to refuse cookies. \
**In Chrome, you can refuse all cookies by clicking:**&#x20;

* Settings, Privacy & Security,&#x20;
* Cookies and other site data — Block all cookies ​&#x20;

**In Firefox, you can adjust your cookies settings by clicking:**&#x20;

* Settings, Privacy & Security, and then scroll down to the section on Cookies. ​&#x20;

> Please note: Blocking cookies can sometimes affect your user experience.


