Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 1014 Bytes

Avoid transfer(), send() as reentrancy mitigations.md

File metadata and controls

18 lines (17 loc) · 1014 Bytes

Although transfer() and send() have been recommended as a security best-practice to prevent reentrancy attacks because they only forward 2300 gas, the gas repricing of opcodes may break deployed contracts. Use call() instead, without hardcoded gas limits along with checks-effects-interactions pattern or reentrancy guards for reentrancy protection. (see here and here)


Slide Screenshot

015.jpg


Slide Text

  • ETH transfer() & send() Reentrancy Mitigations
  • Gas Subsidy 2300
  • Reentrancy -> No Gas
  • Opcode Gas Repricing -> Break Contracts
  • call() & CEI Pattern & Reentrancy Guards

References


Tags