Repository navigation
Conversation
- Only block collateral toggle when disabling a non-zero-LTV asset; enabling collateral never runs validateHFAndLtvzero. - Only block withdraw / swaps from a supply that is enabled as collateral; executeWithdraw and finalizeTransfer skip the check otherwise. - Collateral swap HF: the received asset only counts as collateral when it is a first supply that auto-enables, or the existing supply already has collateral enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
mgrabina
approved these changes
Nov 17, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reported by a tBTC holder on V3 Ethereum Core (tBTC frozen, LTV 0, enabled as collateral alongside WETH, with stablecoin debt). The interface blocked actions the Pool allows, and the collateral-swap review showed Health Factor going up when on-chain it goes down.
The interface applied the zero-LTV check (
validateHFAndLtvzero) more broadly than the protocol does. On-chain it only runs when collateral is removed: withdrawing, transferring or disabling an aToken that is enabled as collateral.calculateHFAfterSwapassumed the received asset always becomes collateral. Supply only auto-enables collateral on the first supply, so an existing supply keeps the user's current flag. The calculation now takestoAssetUserDatainto account.Withdraw and the collateral toggle share a new
isBlockedByZeroLTVhelper inuseZeroLTVBlockingWithdraw.tsx. Follows on from #3164.Testing
isBlockedByZeroLTV,calculateHFAfterSwap, and two extrahasZeroLTVBlockingcases. Each was written failing first.tscis clean and lint shows no errors. 4 suites insrc/utils/__tests__(6 tests) fail onmainas well.Open question
The user reports the first aWBTC from the swap arrived with collateral disabled. By the auto-enable rule a first supply should enable it, so they may already have held aWBTC, or the adapter path behaves differently. Worth a fork simulation with their address. If it's the adapter, the first-swap HF preview can still be too high.
🤖 Generated with Claude Code