Datrics builds historical dashboards for the Ref Finance decentralized exchange

Ref Finance is a community-led, multi-purpose DeFi platform built on the NEAR Protocol. Ref takes full advantage of NEAR’s low fees and WebAssembly-based runtime. Also, Ref Finance provides more advantages like - multiple pools in one contract, atomic transactions, and customizable pool fees. Ref has also expanded it offerings to include the lending /borrowing money market in its gamut. This has been possible through the strategic acquisition of Burrow (A lending project in the NEAR ecosystem). Recently Ref Finance launched a new protocol by collaborating with Orderly Network, which is bringing the future-trading to NEAR - a Discretized Liquidity AMM (DLAMM) with limit orders. 

In their pursuit of excellence, Ref Finance, was keen to better understand user activity, exchange transactions, and revenue as a liquidity provider in a much deeper way. To achieve their goals, Ref Finance turned to Datrics.

The Challenges

Without historical dashboards, tracking the earnings of the DEX is impossible. To get a dashboard up and running with the relevant stats, you'll need to extract information from the blockchain logs and restore the liquidity's dynamic in the liquidity pools, considering liquidity adding and removing and trading transactions (tokens' swap). All of these operations provide the revenue to separate liquidity providers and Ref Finance, as a Liquidity Protocol provider.

Ref Finance needed a way to clarify the process and make it more user-oriented to easily track the protocol earnings. 

Thus, the idea for a protocol revenue dashboard developed in partnership with Datrics consisted of the following objectives: 

  • Depict the overall picture of DEX protocol, including historical retrospective.
  • Provide users with detailed information about Liquidity Pools, both individual and grouping by different categories like types of Liquidity Pools, Tokens, etc.
  • Display revenue the protocol is making.
  • Make the data readily available, readable, and accessible for regular users.
  • Reveal potential insights from the analytics data.


The Solution

The dashboards created by Datrics team, leveraging the proprietary no-code data science platform, displayed the revenue each specific liquidity pool could generate. The functionality also allows Ref Finance to run a historical analysis using the daily amounts of revenue generated in terms of the number of shares generated. The DEX can also calculate the price of a liquidity pool token by effectively calculating the TVL and the number of shares.

One of the critical questions that Ref Finance was interested in was understanding which strategy of the admin's shares extraction from Liquidity Pools potentially maximizes their revenue and how effective the current strategy is.

Today, Ref Finance operates on a quarterly extraction process. Meaning that at the end of every quarter, they withdraw shares and then use different tokens to convert and buy back ref. The team could perform simulations using Datrics no-code analytics tool of the different strategies for the admin's shares extraction - daily, monthly, and weekly- compared with their initial strategy - quarterly-based shares extraction. 

These simulations are based on the accumulation dynamic by the admin and total shares, considering the historical price of the separate tokens in the pools. 

Datrics delivered dashboards that opened the door to dynamic revenue management for Ref Finance.


The Results 

Thanks to these dashboards, Ref Finance has a better understanding of the revenue generated and its sources (simple pools, stable pools, or yield-bearing token pools). With this deeper understanding, Ref Finance is better able to:

  • Make adjustments to their revenue-generating model
  • Understand how they should collect their revenue 
  • Understand how they can improve user experience overall 

The dashboards created by the Datrics team allow Ref Finance to quickly perform historical analyses and come up with new ways to boost the company’s performance. In the future, Datrics hopes to expand on this new and improved functionality by implementing machine learning algorithms that are capable of predicting the ideal time to withdraw shares. 

Do you want to discover more about Datrics?

Read more

A Bank’s Journey to Simplified Data Analytics

Our Client, a leading European bank, faced a challenge. Despite having a large analytics team, they had only a handful of data scientists.

A Fraud Detection System for the Payments Provider

Datrics helped build an in-house system that detects suspicious transactions hosted on-premises, so that data does not leave the client's infrastructure.

Automatic Foundational Analytics for a leading Game Developer

Datrics transformed data collection and analytics for a game developer, saving time, enabling daily insights, and enhancing decision-making.
BACKED
BY