Closed howlbot-integration[bot] closed 1 month ago
The withdrawal prioritization is listed in the core behavior page of the docs on the repo:
Your suggested mitigation would involve potentially massive increases in gas costs to all lenders interacting with the market when unpaid batches exist, and could even lead to a DOS vector in markets with infrequent use and low batch durations.
Closing as intended behavior.
3docSec marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-08-wildcat/blob/main/src/market/WildcatMarketBase.sol#L460
Vulnerability details
Impact
Current implementation slightly favours current expiry batch over unpaid old ones.
Proof of Concept
Within
_getUpdateState
, there's a check if there's an outstanding expiry batch and if there is, an attempt to fulfil a part of is made.In order to value the FIFO order, it does only check for available liquidity, which basically takes into account previous unpaid batches.
Consider however the following scenario:
Tools Used
Manual review
Recommended Mitigation Steps
Within
_getUpdateState
check if there's unpaid batches and if there's available liquidity, pay them.Assessed type
Context