First Time Deposits at Mango Markets
Mango Markets is a decentralized, cross-margin trading platform with lightning speed and near-zero fees because it is natively built on Solana. There is a one time fee of .035 SOL to open a trading account on Mango Markets. How many new trading accounts have been created by users since February 10th? How much SOL has been transferred into Mango Markets (don't count the one time fee) since February 10th from first time deposits? What was the average deposit amount? Create a visualization showing these trends over the time specified.
Introduction
Mango provides a single venue to lend, borrow, swap, and leverage trade cryptoassets through a powerful risk engine.
Due to the hiked fees on the Ethereum chain, the Mango Market is built on the Solana chain to reduce trading fees. No fees on interest.
Serum uses a tiered structure that determines fee rates based on the amount of SRM held in an account; the more SRM users hold in an account, the less they pay in fees and earn as a maker. Mango Market leverages this on its margin structure.
SRM deposits are combined with all users to collectively reach a higher tier and benefit when trading on the platform. However, it should be noted that SRM deposits are exempt from liquidation and not counted toward margin collateral on the Mango Market margin platform.
Methodology
Following the sample query in the bounty, I queried the solana.events
table with the conditions below to find all successful create account events on Mango Markets:
instruction:programId = 'mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68'
as Mango Markets identifierinner_instruction:instructions[0]:parsed:type = 'createAccount'
succeeded = 'TRUE'
From all the transactions (around 3300) found in the above query, not all follow the pattern of the sample transaction from the bounty, so I further filtered to select only the ones with the same pattern to find the new deposits since February 10th.
Once this transactions were identified, I selected following parameters:
-inner_instruction:instructions[0]:parsed:info:lamports/pow(10,9) as fee
-instruction:parsed:info:lamports/pow(10,9) as deposit
With these values, I can calculate the net deposit (deposit - one time fee) and the total and average values per day.
New trading account vary between 201 in February 12th and 21 in February 10th. Two spikes can be seen on February 12th (201 accounts) and February 16th (169).
I would not rely 100% on data from February 19th since at the time of the query some data might have not been uploaded, so I would not argue that new accounts have seen a temporary spike on mid February and are now back to low numbers.
Total fees is a factor of new accounts created as expected (each new account pays the one time fee). The spikes on February 12th and February 16th amount to 6.2 SOL and 5.2 SOL as total fee.
The average fee is 0.03079 SOL which differs from the 0.035 SOL fee mentioned in the bounty. After searching in Mango Markets FAQ, I found that the fee is 0.032 SOL and on Social Media Mango Markets Twitter, one can find lots of referral links to open a new trading account with 4% discount on fees. These would explain a 0.03072 SOL Fee, which does not match with the 0,03079 SOL but is closer than 0,035 SOL.
There is an increase in the number of new accounts as well as in the net deposit throughout the studied timeframe. As stated above, the data from February 19th does not continue the trend but this might be explained by some data upload missins. How this trend continues until the end of February could indicate if Mango Markets is attracting new users or not.
From the average fee paid by each account, which does not match with either 0,035 SOL as stated in the bounty and 0,032 SOL from Mango Markets FAQ, I can assume that there has been some marketing strategy on Social Media to incentivize new trading account opening (4% discount on fees) that might have triggered this increase.
From the net deposit vs new account opening data, it is quite difficult to draw conclusions because there is no clear trend.
Total and average net deposits have a fluctuating behaviour.
For the days analysed, total net deposits remain between 38-120 SOL per day except for two big spikes on February 16th (675 SOL) and February 18th (376 SOL).
The average net deposit follows the trend from total net deposit but with some interesting details:
-
highest average net deposit happens on February 10th (5.29 SOL), although new trading accounts are the lowest for the series (21 accounts)
-
February 16th (3.99 SOL) and 18th (4.47 SOL) are the 2nd and 3rd highest average net deposit but new accounts do not match the trend: 169 accounts on February, 2nd highest and 84 accounts on February 18th.
-
Highest number of new account on February 12th are 201 with the lowest average net deposit of 0.28 SOL