TokenManager::withdraw() function will revert for native tokens as TokenManagerdoes not have receive()or fallback()function to accept native tokens directly.
In the withdraw(...)function, if the tokenAddressis a wrapped native token, then the logic transfers the wrapped native token into TokenManagercontract first using _transfer(...)function.
After that, it withdraws the native token from the wrappedNativeTokencontract by calling withdraw(...)
IWrappedNativeToken(wrappedNativeToken).withdraw(claimAbleAmount);
Example demo using WETH contract's withdraw that sends ETH to the msg.senderwhich in our case is TokenManager
The withdraw function will try to send native tokens directly to TokenManagercontract, but since the token manager contract does not have receive()or fallback()functions implemented, the TokenManagercontract cannot accept native tokens directly. This will result in revert.
Withdrawals for wrappedNativeTokenwill revert
Manual review
Add receive()function to support receiving of native token into TokenManagercontract.
Also restrict the receive to accept ether from wrappedNativeTokencontract to limit the contracts from where native tokens can be received into.
Invalid, TokenManager is the implementation contract of 9the transparent upgradeable proxy, as can seen by the comments [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/proxy/UpgradeableProxy.sol#L15). The receive payable is implemented as seen [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/proxy/UpgradeableProxy.sol#L37)
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.