Lines of code
<https://github.com/prepo-io/prepo-monorepo/blob/feat/2022-12-prepo/apps/smart-contracts/core/contracts/RedeemHook.sol#L22>
<https://github.com/prepo-io/prepo-monorepo/blob/feat/2022-12-prepo/apps/smart-contracts/core/contracts/WithdrawHook.sol#L77>
Several functions are send()using is used by the across several functions to transfer ETH/WETH. send() uses a fixed amount of gas, which was used to prevent reentrancy. However this limit your protocol to interact with others contracts that need more than that to process the transaction.
These will inevitably fail when:
send() uses a fixed amount of gas, which can result in revert. <https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/>
Manual Review
Use call instead of send(). Example: (bool succeeded, ) = _to.call{value: _amount}(“”); require(succeeded, “Transfer failed.”);
The text was updated successfully, but these errors were encountered:
All reactions