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

Yield strategies models and Mantle expansion (including tokens.erc20 for Mantle) #6118

Conversation

yy-analytics
Copy link
Contributor

@yy-analytics yy-analytics commented Jun 9, 2024

Thank you for contributing to Spellbook 🪄

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 new spell(s)

If you are building new spell(s), please provide the following information:

  • Spell name(s): yield_yak.yield_strategies (across avalanche_c, arbitrum and mantle)
  • Description: These spells act as a stop gap and should be replacing this PR until such a time when LiveFetch functions might be able to be used in spellbook. They are views which retrieve all Yield Yak strategy contracts, along with key information, and will be used with LiveFetch functions in a query to update a materialized view in Dune SQL.
  • Who are the new spell(s) for? Internal team
  • How will the new spell(s) be used downstream? These will feed into a materialized view and the main intention is cleaning up code in these views so that we don't have overly long queries on the Dune SQL side and can re-use parts. This will then be used in queries to show performance of various yield strategies over time, with the basic labelling info and necessary static info (deposit token address etc.) to get prices coming from the materialized view that depends on this spell (hope that makes sense).
  • Implementation details: It's a view which takes information from the decoded contracts tables, and adds some info from the creation_traces table to give a list of yield strategies.
  • Test instructions: Uniqueness of contract_address column (tests in schema.yml files)
  • Related issue(s): None

For adding to existing spell lineage

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

  • Description:
    • Addition of Mantle network means we can now include all Yield Yak strategies on the Mantle network (so lots of copy/paste/replace for those).
    • Refactoring the yield_yak_trades models so that they make use of a common macro instead of repeating code.
    • Creating a manual addition of erc20 tokens for Mantle and adding a few tokens which were missing.

Additional information

Please provide any additional information that might help us review your pull request:

  • I wasn't completely sure what counts as "new spell" versus adding to existing. The only new spell which is "exposed" in the UI is listed in the "new spells" section but there are lots of new models created here where it's repeating an existing spell for a new blockchain.
  • The various pieces of work are split into the different commits in the PR, with the final few commits being a few corrections after testing locally with dbt compile and some corrections after initially raising the PR.
  • Any questions or anything I can explain further please let me know.

Thank you for your contribution!

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9434997433 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9434997410 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9434997434 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9435778707 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9435778849 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9435778848 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9436138054 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9436138116 approved.

@dune-eng
Copy link

dune-eng commented Jun 9, 2024

Workflow run id 9436138107 approved.

Copy link
Member

@jeff-dude jeff-dude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lovely, thank you!

@jeff-dude jeff-dude merged commit f94d856 into duneanalytics:main Jun 11, 2024
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2024
@yy-analytics yy-analytics deleted the yield-strategies-models-and-mantle-expansion branch June 12, 2024 06:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants