Closed c4-bot-1 closed 5 months ago
suggested code edit does not make sense. if feeManager is set to 0x0 as suggested then all fees would go to burn address. please read code carefully and understand why feeManager must be a legit value and should not be set to 0x0 address as proposed.
setting feeManager should be allowed only once that is why input is compared to > ZERO_ADDRESS
this submission can be dismissed and marked as invalid
GalloDaSballo marked the issue as insufficient quality report
trust1995 marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-02-wise-lending/blob/79186b243d8553e66358c05497e5ccfd9488b5e2/contracts/PositionNFTs.sol#L71-L88
Vulnerability details
Description:
Fee manager's funds get stuck in smart contract after the first transfer.
Impact:
Loss of funds meant to be paid as fees to the
feeManager
Tools Used
Manual Review
Proof Of Concept:
Upon declaration the
feeManger
address is equal to zero, which passes the "if" check and sends thefeeManager
aFEE_MANAGER_NFT
. subsequent transfer will fail the "if" check and revert "NotPermitted()" because thefeeManager
address will now be initialized with the_feeManagerContract
which is a dynamic address passed as a parameter to the `forwardFeeManagerNFT.Recommended Mitigation Steps:
Re configure the logic and set
feeManager
address back to zero after every successfull_transfer()
.Assessed type
Token-Transfer