Open smithmonnnnnnn opened 10 months ago
Yes, the situation described will occur. When the new max_slot is smaller than the previous one, some liquidation funds set in a higher slot will not be executed, but users can withdraw this part of the funds that will not be used. This makes it easier to manage the number of effective slots when max_slot needs to be reduced.
Description: The
update_collateral_info
from liquidation_queue contract allows to modify the max_slot parameter at anytime. If the new value is lower than before and there were some bids in the last positions, those bids will never be used when theexecute_liquidation
function is executed because the for loop will not reach them. Code Location: krp-cdp-contracts/contracts/liquidation_queue/src/contract.rs#L326-L331