Lucene search

K
code423n4Code4renaCODE423N4:2022-03-LIFINANCE-FINDINGS-ISSUES-144
HistoryMar 30, 2022 - 12:00 a.m.

use of transfer() instead of call() to send eth

2022-03-3000:00:00
Code4rena
github.com
5

Lines of code

Vulnerability details

Impact

Use of transfer might render ETH impossible to withdraw becuase after istanbul hardfork , there is increases in the gas cost of the SLOAD operation and therefore breaks some existing smart contracts.Those contracts will break because their fallback functions used to consume less than 2300 gas, and they’ll now consume more, since 2300 the amount of gas a contract’s fallback function receives if it’s called via Solidity’s transfer() or send() methods.
Any smart contract that uses transfer() or send() is taking a hard dependency on gas costs by forwarding a fixed amount of gas: 2300.

<https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/&gt;

<https://blog.openzeppelin.com/opyn-gamma-protocol-audit/&gt;

#Proof of Concept

Tools Used

manual review

Recommended Mitigation Steps

use call() instead of transfer() to send eth


The text was updated successfully, but these errors were encountered:

All reactions