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

Some of the logic for attributing user could be wrong if user is using a smart contract like Zapper an Furocombo #3

Closed
tomafc330 opened this issue Dec 11, 2020 · 3 comments
Assignees
Labels
Priority: Low Type: Bug Something isn't working

Comments

@tomafc330
Copy link

Just reviewing the code for the subgraph (if you don't mind me doing so), I noticed that:

https://github.com/oceanprotocol/ocean-subgraph/blob/main/src/mappings/pool.ts#L427 and https://github.com/oceanprotocol/ocean-subgraph/blob/main/src/mappings/pool.ts#L439 that it's using

event.params.(from|to).toHex()

This could be an issue if the user is using a smart contract to do the mint/burn/swap. As an example, look at this tx: https://etherscan.io/tx/0x09717991d7144b0c7ae61877ce3e25f2c44af752fa3d7fa8166ff3073cb95286

The correct attribution should be the original user that minted/burned the LP token, not the contract.

If you'd like, I can make a PR to address this!

@tomafc330
Copy link
Author

By the way we noticed this when we were developing https://apy.vision and we also had this logic initially but realized that this wouldn't work with smart contract interactions :)

@alexcos20
Copy link
Member

thanks for pointing that out

@trentmc
Copy link
Member

trentmc commented Jan 12, 2021

This sounds like a cool idea.

If you'd like, I can make a PR to address this!

Go for it! We'd like that. :) :)

@trentmc trentmc added the Type: Bug Something isn't working label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants