Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

ERC-777 token support #37

Open
MicahZoltu opened this issue Jul 30, 2019 · 2 comments
Open

ERC-777 token support #37

MicahZoltu opened this issue Jul 30, 2019 · 2 comments

Comments

@MicahZoltu
Copy link

MicahZoltu commented Jul 30, 2019

As is widely known at this point, Uniswap is not safe to use with ERC-777 tokens (even if you are only using the ERC-20 interface). More broadly speaking, the Uniswap contracts incorrectly assume that the token contract being called will not call out into any third party (potentially trader-controlled) code prior to returning.

Uniswap vNext should address this issue.

@haydenadams
Copy link
Contributor

More broadly speaking, the Uniswap contracts incorrectly assume that the token contract being called will not call out into any third party

Imo tokens that do this are inherently unsafe and should not be used.

That said, mutex has already been added in the v2 branch
https://github.com/Uniswap/contracts-vyper/blob/v2/contracts/uniswap_exchange.vy#L66

Hopefully EIP 2200 makes it into the Istanbul (final decision this friday) so its not a huge gas hit.

@MicahZoltu
Copy link
Author

While I disagree that tokens that call into the recipient are inherently unsafe, I don't think that is relevant here since Uniswap cannot dictate how tokens function internally. Since Uniswap supports arbitrary tokens (one of its biggest selling points!), I think it needs to assume the worst and that the token will do all of the worst things possible when called.

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

No branches or pull requests

2 participants