What is Ref Finance? A Step-by-Step Guide

7 min read
To Share and +4 nLEARNs

NEAR Protocol is slowly gaining momentum as one of the leading DeFi protocols. As of now, the total value locked in NEAR DeFi is a little south of half a billion dollars. However, the metric to note is in the bottom left corner.

More than 50% of the TVL is dominated by Ref Finance, making it – by and large – the biggest DeFi app on NEAR. Ref Finance was the first DeFi app on NEAR, and it combines multiple functionalities like decentralized exchange (DEX), lending protocol, synthetic asset issuer, etc.

Ref Finance – A Brief Introduction

Ref Finance was created by the co-founder of NEAR Protocol – Illia Polosukhin. The application was officially deployed in April 2021. Proximity Labs received a grant from NEAR Foundation to bootstrap and scale Ref Finance.

Ref closed a private sale in March 2022 with investments from Jump Crypto (Lead), Alameda Research, Dragonfly Capital, etc. The primary purpose of the funding was to get enough liquidity to stay afloat for 24 months starting from March 2022. Ref Finance raised $4.8m in stablecoins for 3,664,943 REF tokens. 

REF – Token Utility

The native token of Ref Finance is REF. It’s a NEP-141 fungible token with a 100 million total supply. The tokens are distributed as such:

The main roles of the REF token are as follows:

  • Users can stake REF to earn protocol fees.
  • Uses can provide liquidity to token pairs with REF and earn swap fees.
  • REF LP tokens can be further farmed to earn more rewards.
  • REF stakers can participate in network governance.

Looking Into Ref Finance

Let’s take a closer look at Ref Finance and what it brings to the table. The app has the following features:

  • Swaps (including stableswaps)
  • Liquidity aggregation
  • Pools
  • Farms
  • xREF staking.


The first feature of note is swapping. The user experience here is pretty simple. First, you connect your NEAR wallet to Ref Finance → Choose the tokens you want to swap → Complete the swap.

On the backend, the Ref swap is pretty similar to Uniswap’s. Multiple pools contain different token pairs with their corresponding liquidity. Every swap has a corresponding swap fee ($0.005), distributed to the liquidity providers.

Do you want to test out the swap feature? Go to the testnet and swap using the LNC tokens.

Oh, and don’t worry, this is a testnet, so you will not be using any real tokens.  At the core of the swapping function is the constant product formula popularized by Uniswap: x * y = k

So, what exactly does this formula mean?

Each liquidity pool in Ref has two tokens – x and y. “K” is a constant that’s determined by the governance. The formula states that trades must not change the value of x*y from k. As per the formula, large transactions usually execute at worse rates than smaller ones.


There is one more cool subfeature of the swapping function. This feature lets you swap between the following stablecoins – USN, USDT, USDC, and DAI.

The underlying formula here is the one that Michael Egorov and Curve Finance popularized.

In this equation:

  • D is the invariant
  • A is a coherent factor, which is set to 240 (can be adjusted by the DAO)
  • n is the number of stable tokens

So, why do stablecoin swaps need a new formula? As per Egorov, since the slippage is so high, the returns for a stablecoin pool that uses the constant product formula will produce paltry returns.

The stableswap formula provides a better tool to swap stablecoins and reduces market friction by improving DeFi arbitrage.

Multi-chain liquidity aggregation

One of Ref Finance’s main goals is to create a multi-chain future Via a liquidity aggregator. As a first step, Ref Finance will be using the EVM-compatible Aurora Liquidity Aggregator. The aggregator accumulates data across all Dexes on the Aurora chain and NEAR. The aggregator allows users to freely interact with both NEAR and EVM-friendly DeFi ecosystems.

The aggregator works like this:

  1. First, it queries relevant trading data on Auror.
  2. Then, it finds the optimal route across all liquidity pools on NEAR and Aurora to swap Token A for Token B.

The swapping on Aurora’s liquidator aggregator works like this:

  • The tokens get transferred to a mapping address on Aurora.
  • The swap happens on Aurora via the user’s NEAR account keys.
  • The tokens get transferred from Aurora’s mapping address to the user’s NEAR wallet.

The constant product formula x*y = k is ideal for?

Correct! Wrong!

Liquidity Pools

Up next, we have the bread-and-butter of DeFi protocols – liquidity pools. A liquidity pool has two (or more) tokens that allow users to trade without going through an intermediary. Instead, users can give liquidity by locking up tokens in the pool. In return, they earn LP tokens and trading fees. 

Ref Finance charges a fee for using their pools. The pool fee varies from 0.05% to 0.3%. Fees are accrued in real-time and can be claimed when you withdraw liquidity.

Let’s look closer at one of the more popular pools on Ref – the WBTC/ETH pool. Usually, this pair is pretty popular across DeFi.

As you can see, the WBTC/ETH pool has the following relevant metrics:

  • TVL: $28 million
  • 24-hour volume: 512,000
  • Total WBTC: 424.69
  • Total EH: 5,860

If you want to create a new pool, you will simply need to enter the token pair and the accepted fees.


Up next, we have farming. The prerequisite for farming is that you must be providing liquidity to one of Ref Finance’s pools. When you provide liquidity, you get LP tokens as a receipt of your contribution. So, you can earn on top of your LP rewards by further staking your LP tokens. This process of staking your LP and earning rewards is called yield farming.

By going to the “Farm” menu, you can see both live and ended farms. Currently, the farm with the high APR is the REF-wNEAR one.

The REF-wNEAR farm has a staggering 71.1% APR with a 2X boost. In addition, this farm paid out $133,000 in rewards last week. The farming rewards are paid out in marmaj, DBIO, SKYWARD, REF, MYRIA, and PARAS tokens.

xREF Staking

Up next, we have xREF staking. Upon staking your REF, you exchange it for xREF. Over time, you will continually earn more REF by holding xREF tokens. 

Being an REF staker gives you the right to earn fees generated by the protocol. 100% of the protocol fees generated are used to buyback REF, of which:

  • 75% is transferred to the xREF contract.
  • 25% is allocated to the treasury. The treasury is responsible for funding grants and community initiatives.

The staking rewards are released linearly every quarter and has in built boosts for the first three years (which could be changed by the governance):

  • Year 1: 2x
  • Year 2: 1.5x
  • Year 3: 1.2x
  • Year 4: 1x

Here are some numbers for xREF staking:

Feature Number
Staking APR 12.22%
Number of Unique Stakers 5465
Revenue Shared with xREF Holders 105,561.75 REF
Total REF Staked 3,101,195.30 REF
Total xREF Minted 2,916,845.51 xREF
Cumulative REF Buyback 132,011.31 REF

Cross-chain Interoperability

Allbridge is a cross-chain bridge launched on the NEAR Protocol that allows it to interact with other blockchains like Solana, Celo, and Terra. However, for Ethereum-NEAR interoperability, the rainbow bridge still remains the best option. Users can access these disparate blockchain ecosystems through these bridges via Ref Finance.

So, not only can you access the best of NEAR’s DeFi on Ref, but you can also jump over to access liquidity in other DeFi-rich blockchains.

Ref Finance users can interact with EVM-compatible ecosystems via:

Correct! Wrong!

Ref Finance Governance

Ref Finance governance happens via the DAO that was set up by Proximity in June 2021. The DAO currently uses SputnikDAO contract to manage its affairs. The DAO has two different types of members – Council and Community.

  • Council: The council members can create proposals and vote on them. Only council members can create proposals.
  • Community: Community members can vote on the proposals.


Ref Finance is the OG of the NEAR DeFi ecosystem. It has well throughout tokenomics and brings together the functionalities of Uniswap and Curve Finance under one roof. Check out the app first-hand by going to the testnet. Try swapping with the LNC tokens. The testnet allows you to trade without using any actual money.

I have USN-USDT LP tokens but want to earn more yield. Which feature should I use on Ref FInance?

Correct! Wrong!

Generate comment with AI 2 nL

Leave a Comment

To leave a comment you should to:

Scroll to Top
Report a bug👀