ethernaut icon indicating copy to clipboard operation
ethernaut copied to clipboard

Solidity 0.5 Version: Re-entrancy outdated advice

Open bergarces opened this issue 6 years ago • 0 comments

:computer: Environment Solidity 0.5 Version of Ethernaut (https://solidity-05.ethernaut.openzeppelin.com/)

:memo: Details After finishing the Re-entrancy level (10) in Ethernaut, a tip appears suggesting to use transfer to move funds out of the contract.

As per Steve Marx's recent blog post and your own analysis of contracts affected by Istanbul, I believe that a word of warning should be given against transfer/send, and instead provide advice on the Checks-Effects-Interactions pattern and other solutions such as ReentrancyGuard.

:1234: Steps to reproduce Complete Re-entrancy level (10) of Ethernaut with Solidity 0.5.

bergarces avatar Nov 30 '19 12:11 bergarces