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

0 stars 0 forks source link

Usage of transfer #39

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

cmichel

Vulnerability details

The address.transfer function is used in sweepFees and (and swapByQuote) to send ETH to an account. It is restricted to a low amount of GAS and might fail if GAS costs change in the future or if feeRecipient is a smart contract and its fallback function handler implements anything non-trivial.

Recommended Mitigation Steps

Consider using the lower-level .call{value: value} instead and check it's success return value.

Shadowfiend commented 2 years ago

Duplicate of #20.