Closed howlbot-integration[bot] closed 1 month ago
This functionality is precisely covered by repayAndProcessUnpaidWithdrawalBatches
, and the UI invokes either this or repay
appropriately depending on whether or not the withdrawal queue is non-empty.
Not a finding.
As per sponsor's comment, this finding highlights a failure happening in the scenario of a user error - the wrong function is called.
3docSec marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarketWithdrawals.sol#L251 https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarketWithdrawals.sol#L247
Vulnerability details
The
executeWithdrawal
function does not account for delinquent debt payment. It calculates the withdrawal amount based on the batch'snormalizedAmountPaid
and the user'sscaledAmount
, but it doesn't factor in any additional funds that may have been repaid during a delinquency period leading to loss of funds for lendersProof of Concept
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarketWithdrawals.sol#L212
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarketWithdrawals.sol#L247
https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarketWithdrawals.sol#L251
The issue is as follows :
Paste this in
WildcatMarketWithdrawalsTest.sol::WithdrawalsTest
Recommended Mitigation Steps
Modify
executeWithdrawal
function to account for delinquent debt repaymentsAssessed type
Other