Receiving address might not be able to handle WETH
instead of ETH
#607
Labels
bug
Warden finding
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/utils/SafeSend.sol#L30-L35
Vulnerability details
Impact
Funds might be automatically frozen via
_sendEthOrWeth()
.Proof of Concept
buyFractions()
does not provide the option to pay withWETH
, therefore the receivingaddress
ofsellFractions()
wouldn't expect to receiveWETH
instead ofETH
.If for some unexpected reason the native
ETH
transfer fails,WETH
will be sent to the receiver that might not be able to handle ERC20s, leading to the funds being frozen.https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/utils/SafeSend.sol#L30-L35
Tools Used
Manual Review
Recommended Mitigation Steps
Simply revert if native
ETH
transfer is not successful instead of attemptingWETH
transfer.Other instance:
https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/modules/Buyout.sol#L235-L236
The text was updated successfully, but these errors were encountered: