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

dex.trades: add HOT-AMM support #6726

Merged
merged 8 commits into from
Sep 18, 2024

Conversation

0xrusowsky
Copy link
Contributor

@0xrusowsky 0xrusowsky commented Sep 17, 2024

Thank you for contributing to Spellbook 🪄

Update!

Please build spells in the proper subproject directory. For more information, please see the main readme, which also links to a GH discussion with the option to ask questions.

Contribution type

Please check the type of contribution this pull request is for:

  • New spell(s)
  • Adding to existing spell lineage
  • Bug fix

Note: You can safely discard any section below which doesn't apply based on selection above


For adding to existing spell lineage

If you are adding to an existing spell lineage, please provide the following information:

  • Description:
    • Added dex.trades support for HOT-AMM, a new AMM developed by Valantis and Arrakis.
    • Added valantis support in dex_info
    • So far the AMM is only deployed on mainnet and arbitrum, so i added those sources and created a macro to process the data.

@dune-eng
Copy link

Workflow run id 10899696880 approved.

@dune-eng
Copy link

Workflow run id 10899697283 approved.

@dune-eng
Copy link

Workflow run id 10900135371 approved.

@dune-eng
Copy link

Workflow run id 10900135587 approved.

@dune-eng
Copy link

Workflow run id 10900148226 approved.

@dune-eng
Copy link

Workflow run id 10900148669 approved.

@dune-eng
Copy link

Workflow run id 10900493929 approved.

@dune-eng
Copy link

Workflow run id 10900494094 approved.

@0xrusowsky
Copy link
Contributor Author

hey guys! @Hosuke @jeff-dude
sorry to tag u directly, but i'm trying to add support for a new amm on dex.trades and despite the project compiles, i am facing some CI errors that i don't understand.

could you please have a look whenever u have time?

thanks a lot!

@jeff-dude jeff-dude added WIP work in progress dbt: dex covers the DEX dbt subproject labels Sep 17, 2024
@dune-eng
Copy link

Workflow run id 10923004720 approved.

@dune-eng
Copy link

Workflow run id 10923005212 approved.

@dune-eng
Copy link

Workflow run id 10924078967 approved.

@dune-eng
Copy link

Workflow run id 10924079296 approved.

@0xrusowsky
Copy link
Contributor Author

@jeff-dude @Hosuke the query results LGTM, i'd say it is ready for review 🙂

thanks!

@0xrusowsky
Copy link
Contributor Author

0xrusowsky commented Sep 18, 2024

also, something which may be worth mentioning is that this dex is already live, so idk if data will be backfilled automatically or if it is possible to do it manually (it is not a big deal, but flagging that just in case)

@jeff-dude
Copy link
Member

a bit confused on the hot_amm vs. valantis relationship and naming standards. based on the code, i would think all of these spells should be named valantis?

@jeff-dude jeff-dude self-assigned this Sep 18, 2024
@jeff-dude jeff-dude added question Further information is requested in review Assignee is currently reviewing the PR and removed WIP work in progress labels Sep 18, 2024
@0xrusowsky
Copy link
Contributor Author

a bit confused on the hot_amm vs. valantis relationship and naming standards. based on the code, i would think all of these spells should be named valantis?

@jeff-dude i'm flexible on the naming, and we can change it to accommodate what u think its best. let me try to explain how it works (high-level as i don't fully know all the technical details):
valantis is a new DEX protocol that has 2 pool types:

  • sovereign pools
  • universal pools

sovereign pools are like the building block for a modular dex, and on top of them, you can add your liquidity module (here is where HOT-AMM comes into play) >> Arrakis and Valantis co-design the idea of a Hybrid-Order-Type (HOT) AMM which is accepts both RFQ quotes and permisionless swaps (like uniV3).

for further details, here you have their docs:


my logic when naming stuff was that down the line, more pool types may be built on top of valantis (idk how feasible that is, but it's possible), so i named hot_amm the stuff that is related to the HOT liquidity module (contract that emits HOT_evt_HotSwap).

if you feel like everything should be named valantis i'm cool with that haha, was just trying to create future-proof stuff

@jeff-dude
Copy link
Member

jeff-dude commented Sep 18, 2024

a bit confused on the hot_amm vs. valantis relationship and naming standards. based on the code, i would think all of these spells should be named valantis?

@jeff-dude i'm flexible on the naming, and we can change it to accommodate what u think its best. let me try to explain how it works (high-level as i don't fully know all the technical details): valantis is a new DEX protocol that has 2 pool types:

  • sovereign pools
  • universal pools

sovereign pools are like the building block for a modular dex, and on top of them, you can add your liquidity module (here is where HOT-AMM comes into play) >> Arrakis and Valantis co-design the idea of a Hybrid-Order-Type (HOT) AMM which is accepts both RFQ quotes and permisionless swaps (like uniV3).

for further details, here you have their docs:

my logic when naming stuff was that down the line, more pool types may be built on top of valantis (idk how feasible that is, but it's possible), so i named hot_amm the stuff that is related to the HOT liquidity module (contract that emits HOT_evt_HotSwap).

if you feel like everything should be named valantis i'm cool with that haha, was just trying to create future-proof stuff

how about valantis_hot_amm_<chain>? this matches your version value in the spell too (hot). or maybe even do just valantis_hot_<chain> to match version name?

then future additions can be valantis_<version>_<chain>

@0xrusowsky
Copy link
Contributor Author

sounds good to me! will do the changes

@dune-eng
Copy link

Workflow run id 10925846492 approved.

@dune-eng
Copy link

Workflow run id 10925846465 approved.

@jeff-dude jeff-dude added ready-for-merging and removed question Further information is requested in review Assignee is currently reviewing the PR labels Sep 18, 2024
@jeff-dude jeff-dude merged commit ff5622a into duneanalytics:main Sep 18, 2024
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dbt: dex covers the DEX dbt subproject ready-for-merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants