Closed prayagd closed 5 months ago
@pendulum-chain/devs this information enough to setup the queries?
I assume you want to be able to filter the 'Amount LPed (TVL)' and 'Duration (for which the amount is LPed)' per user?
This still needs some technical refinement before someone can work on it but I can do that later.
Yes
I added the technical considerations for this ticket.
Note that this PR is still open which redefines some of the Nabla related entities: https://github.com/pendulum-chain/pendulum-squids/pull/52#pullrequestreview-1893920980
@ebma How does the StakePosition
entity for Zenlink work? Just the linked definition of the schema is not enough for me to understand its semantics (without reading the code). Why would that be required in the first place in order to satisfy the requirements of the ticket – seems to me like the other three entities are sufficient.
I also propose to limit the stored data to the absolute necessary to satisfy this ticket, no need to go further if not required at the moment.
The StakePosition
is used by Zenlink's farming pools and is updated each time a user deposits/withdraws some LP from the farming pool.
It's true that it might not be absolutely necessary to have this entity for Nabla based on the requirements of this ticket, as we can also derive it based on the other deposit/withdrawal entities. I'll remove it from the description again.
Hey team! Please add your planning poker estimate with Zenhub @b-yap @bogdanS98 @ebma @gianfra-t @TorstenStueber
Context
As the Nabla testnet is soon would be ready, growth wants to do a airflyft campaign where they want to track the actions user performed during a certain period of time. After the testnet campaign and mainnet launch, we also want to introduce a reward program based on points, where we will track certain KPI and reward user with points. This is to attract LPs.
Requirement
Technical considerations
Currently, we have four entities for Nabla:
Router
,NablaToken
,SwapPool
andBackstopPool
, see here. We are not storing data about events like swapping or depositing liquidity. We should:NablaSwap
based on the Swap entity we use already for Zenlink.NablaBackstopLiquidityDeposit
andNablaSwapLiquidityDeposit
based on the Mint entityNablaBackstopLiquidityWithdrawal
andNablaSwapLiquidityWithdrawal
based on the Burn entityThe new entities should store the relevant general metadata like
id
,transaction
,timestamp
andpair
and then take the other data from the respective event emitted and processed by the indexer. The available events can be seen in theabi
folder here and here.To derive the values for 'Amount LPed (TVL)' and 'Duration (for which the amount is LPed)' we would then manually (or with a script) compare the
NablaXDeposit
andNablaXWithdrawal
events for each user to be able to say how many tokens were provided as liquidity and for how long.