Summary
LlamaRisk supports creating a Risk Oracle to address liquidation mechanism issues that lead to dust collateral and delayed deficit realization. Despite v3.3 improvements, dust positions persist due to asset-parameterized liquidations and multi-asset cross-collateralization. When profitable liquidation pairs are cleared, unprofitable dust pairs can remain, leaving positions economically insolvent but mechanically non-deficit. The Risk Oracle automates the cleanup of these positions, ensuring timely deficit realization so Umbrella can act promptly and prevent stakers from front-running accounts with pending deficits.
Deficit Realization Mechanism
In Aave v3, a deficit is realized only when a liquidation leaves a user with zero collateral across all reserves while outstanding debt remains. This is implemented through the hasNoCollateralLeft check, which compares the user’s total collateral in base currency against the collateral liquidated in the transaction. When this condition is true, and there is outstanding debt, the protocol records a deficit event and emits DeficitCreated, transferring the bad debt to the reserve’s deficit counter. This design means the deficit is a mechanical, on-chain event tied to zero collateral, not economic insolvency.
bool hasNoCollateralLeft = vars.totalCollateralInBaseCurrency ==
vars.collateralToLiquidateInBaseCurrency;
// ...
uint256 outstandingDebt = borrowerReserveDebt - actualDebtToLiquidate;
if (hasNoCollateralLeft && outstandingDebt != 0) {
debtReserve.deficit += outstandingDebt.toUint128();
emit IPool.DeficitCreated(borrower, debtAsset, outstandingDebt);
}
Umbrella’s coverage triggers only on realized deficits recorded in the reserve’s deficit parameter. This creates a timing gap where bad debt exists economically but is not recognized by the onchain logic, expanding the window for information asymmetry and potential front-running of cooldown dynamics.
How Dust Positions Arise
Dust positions emerge from a structural mismatch between pair-level liquidation constraints and position-level deficit checks. Each liquidation call must specify exactly one collateral asset and one debt asset, and the MIN_LEFTOVER_BASE check applies only to that specific pair. Meanwhile, hasNoCollateralLeft evaluates total collateral across all reserves. This asymmetry allows liquidators to fully clear profitable pairs while leaving unprofitable dust pairs untouched.
function executeLiquidationCall(
// ...
DataTypes.ExecuteLiquidationCallParams memory params
) external {
// params.collateralAsset - single asset
// params.debtAsset - single asset
Dust positions arise when liquidation becomes economically unprofitable, be it in multi-asset positions or due to oracle-driven price movements, where the remaining collateral value and liquidation incentives are insufficient to cover gas costs and price slippage (common in governance tokens due to low liquidity depth), leaving residual unliquidatable dust collateral balances.
Conclusion
The dust regime in Aave v3.3 stems from a fundamental design choice: deficit accounting occurs post-liquidation only when collateral reaches exactly zero, creating a disconnect between economic insolvency and mechanical deficit realization. While v3.3’s improvements reduce the probability of dust states, they do not eliminate them because the core constraint, asset-parameterized liquidations with pair-level dust checks but position-level deficit checks, remains.
The Risk Oracle and ClinicSteward mechanism provides a constrained, governance-controlled solution to force deficit realization in these edge cases. By automating the final cleanup step that brings collateral to zero, the system ensures timely deficit recognition and enables Umbrella to act promptly.
Disclaimer
This review was independently prepared by LlamaRisk, a DeFi risk service provider funded in part by the Aave DAO. LlamaRisk is not directly affiliated with the protocol(s) reviewed in this assessment and did not receive any compensation from the protocol(s) or their affiliated entities for this work.
The information provided should not be construed as legal, financial, tax, or professional advice.