New DEX Users
Q40. Let's use the algorand.swap table to look at users who are using the new DEXes(Decentralized Exchange): PactFi, AlgoFi, WagmiSwap and whether or not they previously used the Tinyman exchange? What percent of wallets for each of the new DEXes(swap_programs:PactFi, AlgoFi, Wagmiswap) had previously used Tinyman to perform a swap?
In the new algorand.swaps
table there are four DEXes as swap_program
as of March 22nd 2022. This bounty will explore the most popular ASA Pools on the DEXes below:
- Tinyman: decentralised trading protocol with an open and safe marketplace. A vulnerability on the smart contract was exploited on January 1st and rebuild in v1.1.
- Algofi: decentralised lending market with own stablecoin STBL
- Pact.fi: a decentralised peer-to-peer protocol which launched on mainnet on February 22nd 2022. Had over 9000 unique users in testnet as of February 12th 2022.
- WagmiSwap: First Algorand Virtual Machine Automated Market Maker (AVM AMM) DEX currently available through its own WagmiSwap Wallet
Introduction
DEXes allow users to exchange cryptocurrencies in a decentralised way by providing different services using smart contracts to subsitute the need of a trusted third party, also called middleman, to verify and secure a transaction like CEXes do.
A very common service for DEXes is the swap of two different cryptocurrencies. In a swap, two type of parties interact in the following way:
-
A swapper exchanges one cryptoasset he owns for a different one paying an exchange fee on the process. The exchange operation happens directly between the user's wallet and the liquidity pool.
-
A liquidity provider locks a pair of assets in a defined relation in a smart contract (liquidity pool) expecting to earn some passive income from the exchange fees.
Methodology
For this query, two separate CTE were created in one query:
NEWDEX_USERS
with a list of all distinct addresses which swapped in Algofi, Pactfi or Wagmiswap with the constraintwhere swap_program in ('algofi', 'pactfi', 'wagmiswap')
TINYMAN_USERS
with a list of all addresses fromNEWDEX_USERS
which swapped as well in Tinyman.
These two tables were joined with a left join, counting all the addresses aggregated by new DEX (Algofi, Pactfi or Wagmiswap) and by a variable previous_user
, which with a case gave a 'yes' to addresses which transacted with Tinyman previously, and a 'no' to those who didn't.
Disclamer: it is always assumed that users swap in Tinyman before any of the other DEX based on the previous launch of Tinyman and the market share that it has compared to the other 3 DEXes (see previous dashboards Popular Swaps on DEXes here). It is not 100% checked with data on the queries though.
Figure 2 shows the number of new DEX users that previously transacted with Tinyman. Algofi has 1228 previous users that used Tinyman and 287 that didn't, Pactfi has 286 previous users that used Tinyman and 72 that didn't and Wagmiswap has 31 and 7 that didn't.