code-423n4 / 2021-09-defiprotocol-findings

1 stars 0 forks source link

Re-entrancy guard #207

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Consider using ReentrancyGuard to protect functions that have external calls and do not follow Checks Effects Interactions pattern. An example of a function that needs to prevent re-entrancy is settleAuction as it calls withdrawBounty before updating the state and because anyone can add new bounties with no restrictions, it may contain tokens with callbacks on transfer (e.g. erc777) which may call this function again and again.

Recommended Mitigation Steps

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol

frank-beard commented 2 years ago

https://github.com/code-423n4/2021-09-defiprotocol-findings/issues/31

GalloDaSballo commented 2 years ago

Duplicate of #270