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

add fasol bot #7492

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

add fasol bot #7492

wants to merge 13 commits into from

Conversation

clizzard7
Copy link
Contributor

add trades, schema and seed for Fasol Trading Bot (SOLANA)
Dune dashboard TBD
https://x.com/fasol_robot

@github-actions github-actions bot marked this pull request as draft January 18, 2025 11:03
@github-actions github-actions bot added WIP work in progress dbt: solana covers the Solana dbt subproject labels Jan 18, 2025
@clizzard7 clizzard7 marked this pull request as ready for review January 19, 2025 08:35
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Jan 19, 2025
- Extract prices.usd and solana.transactions into separate filtered CTEs
- Select only necessary columns in CTEs
- Move incremental filters to CTE level
- Simplify JOIN conditions in botTrades CTE
Copy link
Collaborator

@Hosuke Hosuke left a comment

Choose a reason for hiding this comment

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

blockchain: solana
sector: dex
project: fasol
contributors: whale_hunter
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe you can add your credit:

Suggested change
contributors: whale_hunter
contributors: whale_hunter, clizzard7

@Hosuke Hosuke added ready-for-final-review and removed ready-for-review this PR development is complete, please review labels Jan 20, 2025
@jeff-dude jeff-dude self-assigned this Jan 20, 2025
@jeff-dude jeff-dude added in review Assignee is currently reviewing the PR and removed ready-for-final-review labels Jan 20, 2025
@jeff-dude
Copy link
Member

i think we should consider this one similar to photon, even though it finished in CI (though it took almost the full 90m)

@whalehunting
Copy link
Contributor

@jeff-dude we had a discussion on how to improve performance (next to the changes @Hosuke made here) and decided to split fee payments and trades into separate spellbooks. hope this improves it, lmk if you have other ideas on this!

@jeff-dude
Copy link
Member

thanks for first step to break this up a bit. i think we need to take it a step further, seeing as it's still timing out in CI on a pretty good size cluster.

let's consider the dex_solana.trades pipeline. the architecture goes like this:

  • project level model, with decoded sources + few joins to essentials such as transfers, token accounts, etc
    • for bot trades, this would be the bot level models (like fasol here)
  • cross-project base_trades model which unions all projects and nothing else
    • for bot trades, this would union each bot model
  • final dex_solana.trades, which joins in metadata related info, with prices being a big part of that (prices is a large table, making joins expensive to do often)

with that in mind, can we break out bot trades pipeline to match something similar? we can start with fasol only here, then continue to add the others into the new dex_solana.base_bot_trades introduced. you can try with first only removing prices from bot-level models, then add prices back in the final dex_solana.bot_trades model. if it's still not performant, we can consider removing the join to solana.transactions and standardize that at another level downstream too.

looking closer at transactions table, looks like that is only used to filter out tx's. is there a world where we can build a spell upstream of this, similar to fees, which loads all tx's by that fee receiver? and maybe we can even make it universal, where you add a project field or something to separate rows from one another, then use it for any bot trades model that filters the same way? then that intermediate table can be just distinct project/id/signer?

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

Successfully merging this pull request may close these issues.

4 participants