Skip to content
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

[IDEA / REQUEST] Track Active Liquidity Manager (ALM) volumes like Arrakis Finance #5626

Open
0xrusowsky opened this issue Mar 19, 2024 · 2 comments
Assignees
Labels
in review Assignee is currently reviewing the PR

Comments

@0xrusowsky
Copy link
Contributor

0xrusowsky commented Mar 19, 2024

Similar to dex.trades it would be great to see the subset of trades that were served by liquidity managed by ALMs.

To be more precise I intend to build a spell that tracks the volume served by Arrakis Finance. Nevertheless, i think the broader dune community would benefit if all ALMs (Gamma, etc) were "natively" tracked, so this can serve as the first building block for alm.trades or maybe for creating a subset within the dex.trades table.


Regarding the actual implementation, as this will be my first contribution to the spellbook, I would also appreciate some guidance.

My idea is to base my PR on the structure followed in dex.trades. So I would create:

  • arrakis_trades.sql + arrakis_schema.yml
    • arrakis_chain_trades.sql + arrakis_chain_schema.yml
      • arrakis_v2_chain_trades.sql (implemented initially)
      • arrakis_v1_chain_trades.sql (implemented later on)

I think this is a good starting point, and then it could be expanded to a broader spell (as suggested above) if you guys think that it makes sense.

@0xrusowsky 0xrusowsky changed the title [REQUEST] Track Active Liquidity Manager (ALM) volumes like Arrakis Finance [IDEA / REQUEST] Track Active Liquidity Manager (ALM) volumes like Arrakis Finance Mar 19, 2024
@jeff-dude jeff-dude self-assigned this Mar 19, 2024
@jeff-dude jeff-dude added the in review Assignee is currently reviewing the PR label Mar 19, 2024
@jeff-dude
Copy link
Member

gm @0xrusowsky -- welcome to spellbook and thank you for using GH issues to talk through the new spell idea, love it!

i think this is a great idea & you should be able to follow the journey that dex.trades just completed on how to best design sector-level spells. i'm considering ALM a net new sector spell here.

here is initial PR which kicked off new design for dex.trades lineage of spells:
#4533

the dex readme should also give good info:
https://github.com/duneanalytics/spellbook/blob/main/models/_sector/dex/readme.md

i'd advise you to look closely at these two resources, then open a PR and kick it off!
for the PR, i would also advise to start small -- one project such as Arrakis is a good starting point. i would also start with just one version (i.e. contract) to make it quicker for all to review and merge. once built out, adding more will be easy 🙏

@jeff-dude
Copy link
Member

feel free to ask question here or open the PR and ask for review when ready
fyi @Hosuke -- this should be another fun new sector spell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Assignee is currently reviewing the PR
Projects
None yet
Development

No branches or pull requests

3 participants