Closed c4-bot-8 closed 5 months ago
Seems invalid as WiseLending
will call
_sendValue(
msg.sender,
withdrawAmount
);
Where msg.sender is PendlePowerFarm
Submission also lacks a POC
GalloDaSballo marked the issue as insufficient quality report
Should be invalid.
trust1995 marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-02-wise-lending/blob/79186b243d8553e66358c05497e5ccfd9488b5e2/contracts/PowerFarms/PendlePowerFarm/PendlePowerFarm.sol#L157-L179 https://github.com/code-423n4/2024-02-wise-lending/blob/79186b243d8553e66358c05497e5ccfd9488b5e2/contracts/WiseLending.sol#L902-L933
Vulnerability details
Description:
withdrawAmount is been withdrawn twice in
PendlePowerFarm.sol::_manuallyWithdrawShares
internal function. It makes a_safeTransfer
with a value to the msg.sender inwithdrawExactShares
and a_safeTransfer
is being called in the same code block right after.Impact:
This would Lead to a loss of funds to the protocol since users can now withdraw from their deposited shares twice in a single transaction.
Tools Used
Manual Review
Proof Of Concept:
Recommended Mitigation Steps:
Change the code logic to allow for only a single withdrawAmount in the
_manuallyWithdrawShares
internal functionAssessed type
ETH-Transfer