Submitted by unforgiven
https://github.com/code-423n4/2022-11-paraspace/blob/c6820a279c64a299a783955749fdc977de8f0449/paraspace-core/contracts/protocol/pool/DefaultReserveAuctionStrategy.sol#L90-L135
https://github.com/code-423n4/2022-11-paraspace/blob/c6820a279c64a299a783955749fdc977de8f0449/paraspace-core/contracts/protocol/tokenization/libraries/MintableERC721Logic.sol#L424-L434
Attacker can liquidate users NFT collaterals with min price immediately after user health factor gets below the liquidation threshold for NFT collaterals that have old open auctions and setAuctionValidityTime() is not get called for the user. Whenever users account health factor gets below the NFT liquidation threshold attacker can start auction for all of users NFTs in the protocol. User needs to call setAuctionValidityTime() to invalidated all of those open auctions whenever his/her account health factor is good, but if user doesnt call this and doesnt close those auctions then next time users accounts health factor gets below the threshold, attacker would liquidate all of those NFTs with minimum price immediately.
This is calculateAuctionPriceMultiplier() code in DefaultReserveAuctionStrategy:
As you can see when long times passed from auction start time the price of auction would be minimum.
This is isAuctioned() code in MintableERC721Data contract:
As you can see auction is valid if startTime is bigger than users auctionValidityTime. but the value of auctionValidityTime should be set manually by calling PoolParameters.setAuctionValidityTime(), so by default auction would stay open. imagine this scenario:
This scenario can be common because liquidation and health factor changes happens on-chain and most of the user isnt always watches his account health factor and he wouldnt know when his account health factor gets below the liquidation threshold and when its needed for him to call setAuctionValidityTime(). so over time this would happen to more users.
VIM
Contract should check and set the value of auctionValidityTime for user whenever an action happens to user account.
Also there should be some incentive mechanism for anyone starting or ending an auction.
