-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[proposal] sector-level spells redesign #4637
Comments
dex.trades
redesign
fyi to dune team / RWs: @aalan3 @couralex6 @antonio-mendes @0xRobin @Hosuke fyi to frequent contributors: @hildobby @MSilb7 @henrystats @tomfutago edit: tagging more who have contributed plz link back to this issue for any conversation that relates to sector-wide designs 🙏 |
gm gm wizards 🌞 the dex sector redesign foundational PR has been merged #4533 -- thanks again for all the feedback and iterations. specific items from the PR to callout:
next steps (for
|
@0xRobin curious your thoughts on this macro: |
I have considered this macro to be very temporary (until these columns are in the source tables, which should be asap). -- |
@jeff-dude @0xRobin We are planning to reuse May be it's better to make it more generic? e.g.:
|
let me open a PR to get this moving PR: #4757 |
closing in favor of #4759 where we apply to dex sector as first example for all to follow. readme in dex sector directory contains some info on the design & can be modified via PRs any time |
overview
note: for the purposes of simplicity, most of this will focus on
dex.trades
as it's actively starting the redesign, but all sectors apply!dex.trades
has more or less followed the same table design since the early days of abstractions on dune. when spellbook was built, a bit more structure was put in place around howdex.trades
is built & how it is orchestrated in production to ensure fresh data for all users. over time, as more and more projects have been added & the tech stack which we use to build the spells has improved, we've found various opportunities for improvement. this redesign effort will look to implement all of these opportunities for an improved spell experience for all.what's changing (and why)?
uniswap_v1_ethereum.base_trades
,uniswap_v3_optimism.base_trades
dex.trades
dex.trades
and filters on blockchain/project/version/whatever is neededunion all
of input spells, i.e. spells from the previous step on the same blockchaindex_<blockchain>.base_trades
— this will allow for another building block towardsdex.trades
todo: check if these will be exposed or not on the app, likely notwill not expose for nowthese chain union spells will be materialized incrementally (or try a view, if not intended to be queried on the app?)the chain union spells are viewsfrom
,to
,index
dex.trades
union all
on all blockchainsdex.trades
tokens.erc20
,prices.usd
, etc.amount_usd
to tradesprices.trusted_tokens
to find large mcap tokens with most accurate pricing -- if find a match, use trusted tokentoken_bought
,token_sold
like beforewho is leading this effort?
dune team & resident wizards, along with any helpful ideas/contributions/feedback from the community 🙏
where can the code be found?
there'll be various PRs over time, but two examples:
1 - #4533 for
dex.trades
redesign effort, starting with_beta
until we get all projects migrated to the format --plz note, this is still WIP!2 - #4519 for
referral.awards
new sector led by @0xRobin, who is using the new sector design principlesthere have been quite a few PRs already for
nft.trades
redesign, all work can be found here -- plz note, this is also in_beta
phase until all spells in the lineage are formatted to the new design.final words
we want to add more structure and rigid design to sector-level spells. there are plenty of existing sectors in spellbook, and surely plenty more to come. all sectors should be able to follow similar design principles. once we get these sectors cleaned up, it'll make everyone's lives easier to both contribute & support moving forward.
we can use this issue to continue conversation on sector-level designs, then eventually close and use the learnings to build a robust
readme
for universal sector spell design, as well as sector-specificreadme
files to talk through nuances of each.looking forward to continuing to improve spellbook 🚀
appendix
organizing suggestions from the community in a bullet-point list:
dex.trades
new columns:block_number
,tx_index
to help differentiate trades within a transaction, within a blockdex.trades
if no pricing data available fromprices.usd
, should we coalesce the field to pull fromdex.prices
as a backup?project
column to new<sector>.info
spells, which will containproject
and various other information to inform users of what the project is, how to find, etc.<sector>.info
spellsThe text was updated successfully, but these errors were encountered: