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

Potentially unsafe ERC20 transaction verification #34

Closed
davesque opened this issue Jul 12, 2019 · 1 comment
Closed

Potentially unsafe ERC20 transaction verification #34

davesque opened this issue Jul 12, 2019 · 1 comment

Comments

@davesque
Copy link
Collaborator

davesque commented Jul 12, 2019

What was wrong?

The code here that we use to get token transfer information from ERC20 contract transactions is potentially unsafe. It will fail if an ERC20 token contract does not throw an exception when a sender has insufficient funds for a transfer. In that case, an attacker could make a transfer for the correct amount without having adequate token funds and the resulting transaction will pass our verification checks. We've confirmed that the DAI contract will throw an exception when a sender doesn't have adequate funds so this issue doesn't currently affect our supported payment tokens (which are only DAI).

How can it be fixed?

If a token contract does not raise for insufficient funds, we'll need to check for log events, in payment transactions, that indicate a successful transfer.

@ligi
Copy link
Member

ligi commented Sep 23, 2022

not a problem anymore

@ligi ligi closed this as completed Sep 23, 2022
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

2 participants