Near - $NEAR Swap Outflows


What Is NEAR Protocol (NEAR)? → Source
NEAR Protocol is a layer-one blockchain that was designed as a community-run cloud computing platform and that eliminates some of the limitations that have been bogging competing blockchains, such as low transaction speeds, low throughput and poor interoperability. This provides the ideal environment for DApps and creates a developer and user-friendly platform. For instance, NEAR uses human-readable account names, unlike the cryptographic wallet addresses common to Ethereum. NEAR also introduces unique solutions to scaling problems and has its own consensus mechanism called “Doomslug.”

✍️ Description of Work
In this dashboard, we want to check what users swap their $NEAR for ($NEAR Swap Outflows)? Also we want to check the distribution of $NEAR outflow swaps over time. For this, we examine the following:
- Total number of swap from $NEAR to other token
- Total swap volume (In USD and $NEAR) from $NEAR to other token
- Daily/Weekly/Monthly swap volume (In USD and $NEAR) and number of swap from $NEAR to other token
- Top tokens based on number of swaps and swap volume (In $NEAR) that $NEAR has been swapped to
- Distribution of top tokens based on number of swaps and swap volume (In $NEAR) that $NEAR has been swapped to

🧠 Methodology
To deal with this bounty, we use flipsidecrypto data. First, in the near.core schema and the ez_dex_swaps table, we obtain the list of $NEAR swaps to other tokens using the following query:
🔍 Base Query (Get $NEAR swap for other token):
select * from near.core.ez_dex_swaps where token_out = 'wNEAR' and block_timestamp <= current_date - 1
After obtaining the $NEAR Swap Outflows, we obtain the daily price of $NEAR using the average swap of $NEAR to other stablecoins such as DAI, USDC and USDT on a daily basis. The reason for this is that we don't have the full $NEAR price in the near.core.fact_prices table. We get the $NEAR price using the following query:
🔍 Price Query (Get $NEAR daily price):
select block_timestamp::date as days, avg(amount_in / amount_out) as price_usd from near.core.ez_dex_swaps
where token_in in ('USDT', 'USDC', 'DAI') and token_out = 'wNEAR' and amount_in is not null and amount_in > 0 and amount_out is not null and amount_out > 0
group by days
Finally, we join all transactions of $NEAR Swap Outflows with Price Query based on the day and obtain the volume of swaps in USD and perform all our calculations and analyzes on the following query:
select swap.*, price.price_usd from near_token_swap_out_transactions swap join near_token_price_usd price on swap.block_timestamp::date = price.days

✅ Observations
- The highest number of $NEAR Swap Outflows is for 2021
- From Jan 2022 to Mar 2022, the number of $NEAR Swap Outflows has been decreasing, and from late Mar 2022 to Jun 2022, this trend has been increasing, and after that, it has been decreasing until now.
- From Sep 2021 to Mar 2022, the volume of $NEAR Swap Outflows has been in a downward trend, and from the end of Mar 2022 to Jun 2022, this trend has become upward, and after that, it is a downward trend until now.
- The average number of $NEAR Swap Outflows is 1377 Daily, 9.5K Weekly and 39.3K Monthly
- The volume of $NEAR Swap Outflows is 1.097M USD Daily, 7.57M USD Weekly and 31.3M USD Monthly
✅ Observations
- Based on the Number of Swaps and Swaps Volume, $NEAR had the highest Number of Swaps and Swaps Volume to USDT, USDC, REF, DAI and OCT respectively.
- $NEAR has had the highest Number of Swaps and Swaps Volume to stablecoins and users swap more volume of NEAR to USDT
- It can be seen that since May 2022 and after the Crash of LUNA, the largest Number of Swaps and Swaps Volume has been from $NEAR to USDT and USDC.
- Recently, users prefer to swap their $NEAR to stablecoins (USDT
(More)
and USDC)
- Recently, users prefer to swap their $NEAR to stablecoins (USDT
✔️ Conclusion
After analyzing and checking $NEAR Swap Outflows, we reached the following results:
> * The total number of $NEAR Swap Outflows is 589K swaps and the total volume of $NEAR Swap Outflows is ==66.2M NEAR== and ==470M USD > * The highest number of $NEAR Swap Outflows is for ==2021 > * From ==Jan 2022== to ==Mar 2022==, the number of $NEAR Swap Outflows has been decreasing, and from late ==Mar 2022== to ==Jun 2022==, this trend has been increasing, and after that, it has been decreasing until now. > * From ==Sep 2021== to ==Mar 2022==, the volume of $NEAR Swap Outflows has been in a downward trend, and from the end of ==Mar 2022== to ==Jun 2022==, this trend has become upward, and after that, it is a downward trend until now. > * The average number of $NEAR Swap Outflows is ==1377 Daily==, ==9.5K Weekly== and ==39.3K Monthly > * The volume of $NEAR Swap Outflows is ==1.097M USD Daily==, ==7.57M USD Weekly== and ==31.3M USD Monthly > * Based on the Number of Swaps and Swaps Volume, $NEAR had the highest Number of Swaps and Swaps Volume to ==USDT==, ==USDC==, ==REF==, ==DAI== and ==OCT== respectively. > * $NEAR has had the highest Number of Swaps and Swaps Volume to stablecoins and ==users swap more volume of NEAR to USDT > * Since May 2022 and after the Crash of LUNA, the largest Number of Swaps and Swaps Volume has been from $NEAR to USDT and USDC.
✅ Observations
- It can be seen that on June 10, 2022, when the price of NEAR has reached its lowest level, the volume and number of swaps from NEAR to other tokens, especially USDT and USDC, has increased significantly.
- It can be seen that with the increase in the price of NEAR, the number and volume of swaps from it to other tokens has decreased
- From May 11, 2022== to ==May 15, 2022, the price of NEAR has dropped sharply, and the volume and number of swaps have also increased significantly (Crash of LUNA)