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

Better Transfers/Balances Tables #5969

Open
hildobby opened this issue May 22, 2024 · 2 comments
Open

Better Transfers/Balances Tables #5969

hildobby opened this issue May 22, 2024 · 2 comments

Comments

@hildobby
Copy link
Collaborator

A few months back I made a PR to create fungible.transfers but it got turned down because you guys wanted to build it internally. My main issue with tokens.transfers is that it includes both fungibles and NFTs which given their different implications are basically never analysed together.

For nft transfers i made nft.transfers quite some months ago which is faster to use than tokens.transfers.

What would be cool would be to have materialised fungible.transfers tables including a crosschain one. Including NFTs in the latter would really slow down any analysis using it, and current tokens.transfers tables are slowed down because of NFTs too.

The same can be done with balances tables but i don't use balances tables really anyways since they're more accurate if I make them myself in query (they're missing staking withdrawals, block rewards, uncle rewards, rebase events)

what are your thoughts @jeff-dude @aalan3 @0xRobin?

@0xRobin
Copy link
Collaborator

0xRobin commented May 22, 2024

I just checked, tokens.transfers only contains native and erc20 data, not NFT?

Balances do include both tokens and erc20s in 1 schema. We had some discussions about splitting them but decided against it to keep it more maintainable (and the performance gain with splitting was negligible due to the low amount of NFT data in those tables)

tokens.transfers should aim to serve whatever you wanted to do with fungible.transfers, so if there are other shortcomings, we definitely want to know!

@aalan3
Copy link
Contributor

aalan3 commented May 27, 2024

Yeah we planned on putting nft transfers in token.transfers but decided never actually did it, and sounds like we shouldn't.

The same can be done with balances tables but i don't use balances tables really anyways since they're more accurate if I make them myself in query (they're missing staking withdrawals, block rewards, uncle rewards, rebase events)

Our balances are not sums of transfers, they are the actual values you'd get from doing eth_call/getBalance against a node. So if there's a value for a block number it should be the correct value. However, there needs to be an event we track so that we can get the value. ETH withdrawals are tracked but not rebase events for specific tokens for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants