Ref Finance: The Rising Star of Near DeFi Landscape

    Introduction

    This analysis will focus on Ref Finance, a platform on the Near chain related to decentralized finance (DeFi). According to DefiLama, Ref Finance is the second highest-ranking platform on Near chain regarding total value locked (TVL). Its current TVL is approximately $18 million. With this in mind, I examined Ref Finance, focusing on three key activities available on the platform.

    1. Swap
    2. Liquidity
    3. Staking
    What is Ref-Finance?

    Ref Finance is a decentralized finance platform that serves various purposes and is developed using the NEAR Protocol. The platform efficiently utilizes NEAR's features, such as low transaction fees, speedy finality within one-to-two seconds, and its runtime based on WebAssembly, which supports the Rust programming language for smart contracts.

    Ref Finance offers several benefits, including having multiple pools in a single contract, enabling users to switch between pools without switching contracts.

    Method

    Swaps: The first part of my research involved analyzing the swap activities on Ref Finance. I used Flipside's Swap Table for Near chain to accomplish this, which records all swap activities. I filtered the table by the Receiver to Ref Finance and extracted all the swaps on the platform. Then, I calculated the swap volume in USD by joining my findings with the Price table.

    Liquidity: The second part of my research focused on analyzing the Add and Remove Liquidity transactions on Ref Finance. I extracted the transaction hashes from the near.core.fact_actions_events_function_call table by filtering the receiver ID to Ref Finance. Then, I used these transaction hashes in the near.core.fact_receipts table and decoded the Logs column. Like the previous section, I joined my findings with the Price table and calculated the volume in USD.

    Staking $Ref token: The final section of my research involved analyzing the staking activities of the $Ref token. I decoded the Log column from the Receipts table and extracted the staking $Ref token data to accomplish this.

    db_img
    db_img