The AuctionManager::setAuctionDuration() function enables an admin to alter the duration of Dutch auctions. However, this flexibility poses risks to existing auctions. Modifying the auction duration mid-process could cause auctions to revert, execute at unfavorable prices, or conclude at higher prices, potentially discouraging users from participating in liquidations.
Recommendation
To mitigate these risks, implement caching of the auctionDuration at the time of auction creation in the auctionData struct. Utilize this cached variable within AuctionManager::bidInfo() and AuctionManager::bid(). This approach ensures that changes to the global auctionData won't impact existing auctions.
To verify the issue, follow this guide and include this test in the codebase. The test demonstrates how the protocol accrues bad debt by the inability to liquidate a vault when there is a huge change in the auction duration as well as by executing a liquidation at prices lower than the lowestDebtToAuction.
Impact
Severity: High Likelihood: Medium
Context
AuctionManager::bid() AuctionManager::bidInfo() AuctionManager::setAuctionDuration()
Description
The
AuctionManager::setAuctionDuration()
function enables an admin to alter the duration of Dutch auctions. However, this flexibility poses risks to existing auctions. Modifying the auction duration mid-process could cause auctions to revert, execute at unfavorable prices, or conclude at higher prices, potentially discouraging users from participating in liquidations.Recommendation
To mitigate these risks, implement caching of the
auctionDuration
at the time of auction creation in theauctionData
struct. Utilize this cached variable withinAuctionManager::bidInfo()
andAuctionManager::bid()
. This approach ensures that changes to the globalauctionData
won't impact existing auctions.PoC
To verify the issue, follow this guide and include this test in the codebase. The test demonstrates how the protocol accrues bad debt by the inability to liquidate a vault when there is a huge change in the auction duration as well as by executing a liquidation at prices lower than the
lowestDebtToAuction
.