-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup queries for Nabla backend for campaign and mainnet reward program #58
Comments
Follow up of this ticket |
@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: #52 (review) |
@ebma How does the 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 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.The text was updated successfully, but these errors were encountered: