It will be unable to run external rebalancing in backing manager until tradeEnd[DUTCH_AUCTION] expires, even when a Dutch auction has already been settled.
Proof of Concept
To prevent an external rebalancing in the same block of the settlement, the BackingManager has the following restriction:
a Dutch auction is considered settled as soon as any bidder places a bid, regardless of the remaining auction period.
Let's assume the following scenario.
There is a collateral default, so starts a dutch auction of 6 days (the maximum auction length is 7 days).
After 3 days are passed, the auction is settled by a bidder, and as there's no more collateral default, the next rebalancing is just returned without running a new auction.
In the next day, a new collateral default happens, so when trying to run rebalancing by external call, it is reverted by the restriction of tradeEnd[DUTCH_AUCTION] because 2 days are remaining.
Therefore, during the remaining auction period, calling the rebalance() function will be reverted by the above restriction.
Tools Used
Manual Review
Recommended Mitigation Steps
I would suggest updating tradeEnd[DUTCH_AUCTION] in the settleTrade() function:
Lines of code
https://github.com/code-423n4/2024-07-reserve/blob/3f133997e186465f4904553b0f8e86ecb7bbacbf/contracts/p1/BackingManager.sol#L116
Vulnerability details
Impact
It will be unable to run external rebalancing in backing manager until
tradeEnd[DUTCH_AUCTION]
expires, even when a Dutch auction has already been settled.Proof of Concept
To prevent an external rebalancing in the same block of the settlement, the
BackingManager
has the following restriction:a Dutch auction is considered settled as soon as any bidder places a bid, regardless of the remaining auction period.
Let's assume the following scenario.
tradeEnd[DUTCH_AUCTION]
because 2 days are remaining.Therefore, during the remaining auction period, calling the
rebalance()
function will be reverted by the above restriction.Tools Used
Manual Review
Recommended Mitigation Steps
I would suggest updating
tradeEnd[DUTCH_AUCTION]
in thesettleTrade()
function:Assessed type
Invalid Validation