In TokenManager
contract, transfer()
function is used by the protocol to transfer ETH to the msg.sender
when he calls withdraw()
. The problem is that this function will revert if more than 2300 gas was used and if the msg.sender
is a smart contract that implements receive()
functionality, the transaction will revert.
Take a look at withdraw()
functionality in TokenManager
smart contract:
https://github.com/Cyfrin/2024-08-tadle/blob/main/src/core/TokenManager.sol#L168-169
The problem here is that the protocol uses transfer()
to transfer ETH. And if the msg.sender
is a smart contract that implements receive()
functionality, the call will use more than 2300 gas and that will lead to tx revert.
The transaction for user will revert and it'll not be possible to withdraw ETH.
Manual review.
Use call()
instead of transfer()
Invalid, known issues [Medium-2](https://github.com/Cyfrin/2024-08-tadle/issues/1)
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.