Tinyman LP Actions
Algorand Q28: Let's look at LP actions on Tinyman since launching Tinyman 1.1 at the beginning of 2022. -Show the number of mint and burn actions each day. -Create a table of the LP pools with the most mint and burn actions
Introduction
Tinyman is a decentralized trading protocol which utilizes the fast and secure framework of the Algorand blockchain, creating an open and safe marketplace for traders, liquidity providers, and developers.
Tinyman enables users to trade/swap Assets (Tokens/Currencies) at market rates. There are two classes of users of Tinyman: Swappers who trade assets and Poolers who provide asset liquidity for the trading Pools.
For this bounties, we will focus on the poolers activities. My minting a Liquidity Pool asset, a Pooler creates the LP asset by adding the both tokens of the pair in the exchange relation. By burning, the LP asset is destroyed and the Pooler withdraws both token in the exchange relation.
Methodology
To identify the mint and burn actions in Tinyman, I looked in the algorand.application_call_transaction
table for the decoded tx_message:txn:apaa[0]::string
limiting the query to tx since January 1st in Tinyman (app_id = '552635992'
) as hinted in the bounty.
To associate this tx to the different LP pools, I followed a discussion on Discord where user @lambdadelta recognised a pattern to filter the LP Token asset_id
through the tx_message:txn:apas
array. When this array has 3 values, the LP Token is the [2] position and the other two are the tokens that form the LP Pair. When the array has only 2 values, the [1] position is the LP Token and the other position is the ASA Token which together with ALGO forms the LP Pair.
By using some logic statements in a case, one can join the algorand.asset
with the query from the first question to obtain a table with the LP names and the burn and mint transactions. Different queries have been created to shows the results below.
For the second question, I separate the top 10 LP by burns and mints and show them on two donut graphs that shows the number and the percentage of the burns for all the top 10 LP. A table containing the info is also displayed.
YLDY-ALGO and AKTA-ALGO are the 1st and 2nd pools with more burns and mints.
The graph below shows the total mint and burns in Tinyman per day since January 1st. A big spike ocurred in the first 3 days of January. Max burns occurred in February 10th.
Since not all top 10 mint pools are found in the top 10 burns, I was curious about the relation mint/burn inside a pool. that is why I created the graph below, the top 10 LP by mints and their burns in the analysed period.
I also was curious if any pool had more burns than mints resulting in a decrease in LP tokens; the following charts shows 10 top pools with negative delta mints - burns. I still don't understand the meaning of this, specially since it seems that this pools are not open to public (searching for some of these in Tinyman's webpage did not yield any results.
Acknowledgements and Conclusions
This bounty was done by discussing the best approach to obtain the results with users s.castellano. Queries and content of the bounty has been made by each one of us independently but a common approach, specially based on the discussion from Discord was used.
Tinyman's 1.1 activity seems to be good after the hack. A lot of minting transactions happened the first 3 days of January, which could be a sign of people transferring their LP tokens to the new 1.1 version to not being exposed to the hack anymore. The number of mints is much greater than the burns, so I assume more liquidity is being added to the pools.
Most pools are formed by a token-ALGO Pair, while ASA Pairs are less common. YLDY, AKTA and ARCC seem to be the most popular ASA's, ALGO and USDC are also in the top pools.