code-423n4 / 2021-10-tally-findings

0 stars 0 forks source link

.transfer is used for transferring ether #51

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

payable(msg.sender).transfer(toTransfer); feeRecipient.transfer(address(this).balance); It is no longer recommended to use .transfer when sending ether as recipients with custom fallback functions (smart contracts) will not be able to handle that. You can read more here: https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/

Recommended Mitigation Steps

Solution (make sure to keep nonReentrant): https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol#L53-L59

Shadowfiend commented 2 years ago

Duplicate of #20.