code-423n4 / 2022-06-canto-findings

0 stars 0 forks source link

CALL() SHOULD BE USED INSTEAD OF TRANSFER() ON AN ADDRESS PAYABLE #41

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/Plex-Engineer/lending-market/blob/2d423c7c3f62d65182d802deb99cc7bba4e057fd/tests/Contracts/Fauceteer.sol#L21 https://github.com/Plex-Engineer/lending-market/blob/2d423c7c3f62d65182d802deb99cc7bba4e057fd/contracts/Reservoir.sol#L64

Vulnerability details

CALL() SHOULD BE USED INSTEAD OF TRANSFER() ON AN ADDRESS PAYABLE

The use of the deprecated transfer() function for an address will inevitably make the transaction fail when:

-The claimer smart contract does implement a payable fallback which uses more than 2300 gas unit. -The claimer smart contract implements a payable fallback function that needs less than 2300 gas units but is called through proxy, raising the call’s gas usage above 2300 and using higher than 2300 gas might be mandatory for some multisig wallets. -The claimer smart contract does not implement a payable function.

nivasan1 commented 2 years ago

duplicate of #14

GalloDaSballo commented 2 years ago

Duplicate send by same warden