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

Add Reentrancy Guard #22

Open
haydenadams opened this issue Jan 24, 2019 · 2 comments
Open

Add Reentrancy Guard #22

haydenadams opened this issue Jan 24, 2019 · 2 comments

Comments

@haydenadams
Copy link
Contributor

Uniswap is safe from re-entrancy for tokens that don't allow arbitrary callbacks in transfer functions. However, for tokens that do allow arbitrary callbacks (such as ERC777), a re-entrancy guard could make the contract more secure.

Implementation:
https://github.com/protofire/zeppelin-solidity/blob/master/contracts/ReentrancyGuard.sol

This would add ~5000-1000 gas until https://eips.ethereum.org/EIPS/eip-1283 is merged

@BlinkyStitt
Copy link

BlinkyStitt commented Feb 18, 2019

https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/utils/ReentrancyGuard.sol looks like it has had a few updates.

I haven't been able to find a similar library written in vyper though.

@haydenadams
Copy link
Contributor Author

Can now add the decorator

@nonreentrant(key)

vyperlang/vyper#1264

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