RevokeCash / revoke.cash

❌ Revoke or update your token approvals
https://revoke.cash
MIT License
679 stars 238 forks source link

Question: Can we show approvals for tokens that don't emit approval events #190

Open rkalis opened 10 months ago

rkalis commented 10 months ago

See https://twitter.com/Pybasteth/status/1750876924824457428

Apparently the BNB token on Ethereum does not emit Approval events, so it does not show up in Revoke.cash (or other tools like Etherscan Token Approvals).

Are there any viable ways we can still support such tokens in our UI?

We could potentially try to retrieve all approve() function call transactions for a user, but that would be very hard to do without becoming very intensive.

Potentially we could use a service such as https://www.shadow.xyz/ to add "shadow events" when the regular Approval event should go. That also doesn't sound ideal since it adds another service to the mix.

All input on this is welcome. It would be beneficial if we can somehow still support these tokens, even if we have to create a manual list of tokens for which we need to apply this strategy (presumably not a lot of tokens do this).

Pybast commented 10 months ago

We could potentially try to retrieve all approve() function call transactions for a user, but that would be very hard to do without becoming very intensive.

It would indeed be intensive as we also have to take into account smart contract wallets (i.e. Gnosis Safe contracts). It makes it significantly more complex to parse and understand the calldata for such transactions, especially since the approval is an "internal transaction" (transaction's to is not the token).

I'll look further into this and come back with what I find.