call() should be used instead of transfer() on an address payable #303
Labels
bug
Something isn't working
grade-c
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-10-holograph/blob/main/contracts/HolographOperator.sol#L596
https://github.com/code-423n4/2022-10-holograph/blob/main/contracts/enforcer/PA1D.sol#L396
Vulnerability details
Impact
The use of the deprecated transfer() function for an address will inevitably make the transaction fail when the caller is a smart contract and:
Additionally, using higher than 2300 gas might be mandatory for some multisig wallets.
Proof of Concept
https://github.com/code-423n4/2022-10-holograph/blob/main/contracts/HolographOperator.sol#L596
https://github.com/code-423n4/2022-10-holograph/blob/main/contracts/enforcer/PA1D.sol#L396
Tools Used
Manual review
Recommended Mitigation Steps
using call() instead of transfer() is recommended as suggested in https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/
The text was updated successfully, but these errors were encountered: