BOT BEHAVIOUR
By defining a maximum number of transactions for any given day, we are able to obtain two user types : humans, which always remain under this threshold, and bots, which have exceeded this limit at least once in the period analysed.
Both the active users and daily swaps visualizations show that the human user types have almost disappeared since March 7th.
The City inside NEAR City
NEAR City’s Financial District is full of protocols building decentralized financial services leveraging the fast transactions and low fees from NEAR Blockchain. According to Awesome NEAR, up to 170 protocols are building decentralized exchanges (DEX), automated market makers (AMM), yield farming, lending and borrowing Dapps, taking advantage of the cross-chain compatibility between NEAR and Aurora.
TOKEN BREAKDOWN
What are the most popular tokens swapped from and to? The majority of swaps involve NEAR token in both directions, followed by USDT.
Some trends by user type can also be identified, with REF, PARAS and SKYWARD tokens being more traded by humans than bots than NEAR or some stablecoins (USDT, USDC, DAI). This is caused by having more utility use cases for regular users compared to arbitrage opportunities which are bigger with high volume stablecoins.
Methodology
The main query structure is made by creating a CTE with raw trasnsaction data joining the near.core.fact_transactions
and the near.core.fact_actions_events_function_call
tables. Subsequent CTE and additional constraints are made throughout the several queries used in this dashboard.
Swap transactions are identified by filtering by method_name = ‘swap’
and tx_receiver = ‘v2.ref-finance.near’
.
Daily new users are found by creating a CTE with the min (block_timestamp)
for each tx_signer
to get the first date when the users made a swap. By aggregating the results of this CTE by date we obtain the daily and accumulated new users.
Human-readable addresses are defined as addresses with a length < 64, while implicit addresses are always 64 alfanumeric characters.
Failed transactions have been filtered out by querying the near.core.receipts
table and filtering to find a ’Failure’
substring in the status_value
parameter on any receipt_ids - these are the underlying transactions for each tx_hash
. This method was inspired by @Pinehearst’s comment in Discord. A token list provided by Pinehearst was used as well,
All queries have been set to refresh daily to keep track of the protocol’s performance.
DISCLAIMER: some discussions in Flipside Discord hint at some swaps being called by other method name, i.e. ft_transfer_call
. The amount of txs found by this and other method names are insignificant in comparison with swap
, so my analysis assumed all swap transactions as method_name = ‘swap’
. There is however a very significant decrease in number of users, with the current active users reduced to a merely 25 users per day. Although this could be explained by the bot vs human breakdown, I believe there is an additional explanation to why the user base has been almost reduced to the 25 most profitable bot trader profiles and most “human” users

Start your NEAR DeFi journey with Ref Finance
Ref Finance is a community-led, multi-purpose DeFi platform where users can engage in the following activitites:
- Trade: exchange two tokens, also known as swap, by paying a swap fee.
- Pool: deposit a token pair into a liquidity pool, to allow users to trade them. Liquidity providers receive a percentage of the swap fees.
- Farming: certain tokens yield rewards if users deposit them in farming pools.
- Staking: REF, the internal governance token of the platform can be staked receiving rewards in return.
A more detailed overview can be found in Ref Finance Docs - Overview.
STABLECOIN BREAKDOWN
Next, stablecoin breakdown is shown through several visualizations. USDT is the most popular stablecoin for swaps in both directions. USDC and DAI are tied for second place in swaps from and USDC takes the second place in swaps to, while DAI keeps third. Other stablecoins like cUSD (CELO protocol stablecoin), nUSDO (Oin Finance protocol stablecoin) and USN (NEAR’s native stablecoin ) show levels which are only noticeable with a log scale on Y-axis since they are way below the main ones.
Most significant spikes were caused at blockchain launch (September 8th 2021), on the Terra collapse event (May 9th-10th 2022) and during the lending platforms crisis (June 13th 2022).

NEAR TVL stats source: Defi Llama
From the NEAR DeFi TVL data published in Defi Llama, there are around 70M $NEAR tokens locked in (as of August 10th 2022). The leading platform is Ref Finance, with a dominance of around 65%. This dashboard will take a deep dive on Ref Finance to get to know the DeFi mammoth in NEAR better.
This TVL could higher since other protocols might have not yet been added to DeFi Llama yet. But one fact can be highlighted - Ref Finance is a leading protocol in NEAR Financial District.

Conclusions
-
Onboarding of new users for swaps in Ref Finance was quite high during the first months after launch, with spikes over 800 new users transacting daily. Levels then dropped significantly to around 50 new users per day to finally getting close to zero since March. There are virtually no new users now.
\
-
Over 31k users have swapped on the platform, 96% of which use human-readable addresses instead of the implicit addresses given when creating a new account on NEAR.
\
-
In terms of daily users, similar trend as with new users can be seen: 3 months of intense activity with between 500 and 2500 daily active users, another 3 months of contained activity between 100 and 500 daily active users that turns into and almost flat line graph around 20 daily active users since March.
\
-
Daily swaps trend is decoupled from this diminished user activity since March. Highest spike was seen in October 5th with 23k swaps, followed by October 25th with 11k swaps, May 11th (Terra collapse) with 7k and June 13th (lending platform crisis) with 9k swaps respectively. In total, around 1 million swaps have been done, incurring in 1600 NEAR in network fees. With a current valuation of 5.6$ in August 10th, this efectively results in less than 1 cent per swap transaction.
\
-
The breakdown in user type (human vs bot) shows that the decrease in user activity is caused by human users, while daily active bots have been more constant. It is ultimately these bots’ activity that has been swapping since March. Accumulated swaps by user type show a stable increase for swaps by bots (can be approximated to a straight line) and a stagnated line for swaps by human.
\
-
Most popular token swapped in both directions is NEAR, with over 50% of all swaps. USDT comes second in line and is swapped mainly by bots, like other stablecoins as DAI and USDC. Utility tokens like REF, PARAS and SKYWARD are mainly swapped by humans.
\
-
In terms of stablecoins, USDT, USDC and DAI are the dominants ones showing a much more significant volume and number of swaps than other stables like USN, cUSD and nUSDO. Since March, DAI activity since March has virtually stopped.