Submitted by SpicyMeatball
https://github.com/code-423n4/2024-07-benddao/blob/main/src/libraries/logic/ConfigureLogic.sol#L504https://github.com/code-423n4/2024-07-benddao/blob/117ef61967d4b318fc65170061c9577e674fffa1/src/libraries/logic/IsolateLogic.sol#L320-L321https://github.com/code-423n4/2024-07-benddao/blob/117ef61967d4b318fc65170061c9577e674fffa1/src/libraries/logic/IsolateLogic.sol#L423-L424
Auctions created before the auction duration was changed will have their duration shortened/extended, which may catch their participants off guard.
When an isolated position reaches its liquidation threshold, users can put it up for auction to pay off the debt and take the collateral NFT. The auction has a fixed duration during which borrower can redeem the debt and if it doesnt happen, the last bidder will pay off the debt and receive the NFT at the end.
The PoolAdmin can customize the auctionDuration variable with the setAssetAuctionParams function. This can be a problem because the protocol checks whether the auction has ended as follows:
Thus, the new duration will be applied to auctions that were started before the duration change. For example, if the duration was shortened, some auctions will end prematurely, which may be unexpected for its participants.
Consider calculating and storing the auction end time instead of the start time:
Timing
thorseldon (BendDAO) disputed and commented:
0xTheC0der (judge) commented:
