H-1: Loss reports can finish with borrowable liquidity above the post-burn backing cap
Description:
PR #110 describes the new subordination deployment cap as a rebalance-point invariant. However, USD3.report() can itself finish above the new cap after a loss because the report-time tend runs before sUSD3 loss absorption.
The relevant order is:
src/usd3/USD3.sol:563captures pre-report totals and calls_reportInternal().- Inside the Yearn report flow,
src/usd3/USD3.sol:335runs_harvestAndReport(). src/usd3/USD3.sol:340calls_tend()before the loss is recorded and before sUSD3 shares are burned.src/usd3/USD3.sol:573burns sUSD3's USD3 shares after_reportInternal()returns.- No second tend or pullback runs after that burn, so
suppliedWaUSDC()can remain aboveeffectiveDeployCapWaUSDC().
A focused integration test was temporarily added and removed during validation. It showed this sequence succeeds:
- Deposit 1,000,000 USDC into USD3 and move 500,000 USD3 into sUSD3.
- Set
MIN_SUSD3_BACKING_RATIO = 100%and tend; USD3 deploys about 500,000 waUSDC. - Simulate a 400,000 waUSDC loss from the local buffer.
- Call
USD3.report(). - The report burns sUSD3 backing down to about 100,000 USD3, but supplied waUSDC remains about 500,000.
- A credit-lined borrower borrows the roughly 400,000 waUSDC excess before the next tend.
Impact:
High.
Recommendation:
Ensure the sUSD3-backed deployment invariant is restored before USD3.report() returns after loss absorption. The implementation should account for the fact that the effective cap can decrease when _postReportHook() burns sUSD3-held USD3 shares.
The exact implementation can be chosen by the team, but report() should not be able to finish with borrowable MorphoCredit liquidity above the post-loss sUSD3-backed cap. This can be addressed within the USD3 report/loss-absorption flow; a broader borrow-time guard would be defense-in-depth rather than required to resolve this report-created violation.
Developer Response:
Fixed in 24c4642.