Tadle

Tadle
DeFi
30,000 USDC
View results
Submission Details
Severity: low
Invalid

Using of `transfer` is not recommended it has 2300 gas cap

Summary

Using of transfer is not recommended it has 2300 gas cap and no longer recommended for sending Ether.

Vulnerability Details

In withdraw function of TokenManager.sol, transferfunction is used here :

IWrappedNativeToken(wrappedNativeToken).withdraw(claimAbleAmount);
payable(msg.sender).transfer(claimAbleAmount);

Using of transfer is not recommended it has 2300 gas cap and no longer recommended for sending Ether. In case the gas cost increases the limit of 2300 it can breaking of the function.

Check here : https://solidity-by-example.org/sending-ether/

Link to code: https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/TokenManager.sol#L137-L189

Tools Used

Manual review

Recommendations

Use OpenZeppelin's transfer/ transferFrominstead

Updates

Lead Judging Commences

0xnevi Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

[invalid] finding-TokenManager-withdraw-transfer-2300-gas

Invalid, known issues [Medium-2](https://github.com/Cyfrin/2024-08-tadle/issues/1)

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.