Repository navigation
feat: dynamic borrow cap UI options (design review) - #3183
Draft
Agill-Sheron wants to merge 1 commit into
Draft
Agill-Sheron wants to merge 1 commit into
Agill-Sheron wants to merge 1 commit into
Conversation
Options for showing a reserve whose borrow cap is dynamic: the cap the
pool enforces (the current cap) is kept about one buffer above total
borrowed, raised automatically up to a max cap. Read against the
current cap alone, such a reserve looks nearly full most of the time.
All options sit behind a floating Tweaks popover that is only active
when NODE_ENV=development or NEXT_PUBLIC_ENABLE_TWEAKS=true. The
choice rides the URL so a link opens the version it was copied from.
Production builds always show the default (Today, unchanged UI).
- Reserve page (?dyncap=): today | notice | max-cap | vs-max | combined
- vs-max / combined: usage bar on the max cap scale (borrowed,
available now, current cap tick); ?barhover=on|off adds hover
tooltips per part
- combined: notice + bar + a Max cap column next to Current cap
- Markets page, independent switches: ?mktnotice= (notice above the
list), ?mkttag= (tag on total borrowed), ?mktcol= (Dynamic cap
column with a check and the reserve's caps in a tooltip)
- Borrow modal and reserve actions: notes for available now, current
cap used up (waiting for a raise) and max cap reached
- Dashboard borrow list: compact dynamic cap hint
Data is SIMULATED until the contracts are deployed:
- simulatedCaps.ts marks Arbitrum v3 USDC as dynamic and rewrites
borrowCap to a current cap in usePoolFormattedReserves; ?capstate=
picks topped-up | headroom | cap-reached | at-max. The header
documents the contract reads that replace it.
- simulatedWallet.ts (?wallet=small|large) watches an unused address
through read-only mode and substitutes a WETH-collateral position
and balances, so the borrow flow can be reviewed without a wallet.
Read-only mode cannot sign.
Remove the losing options, DynamicCapsTweaks, the simulated files and
their hooks once a direction is chosen. DYNAMIC_CAPS_LEARN_MORE_URL
is a placeholder.
|
@Agill-Sheron is attempting to deploy a commit to the Aave Team on Vercel. A member of the Team first needs to authorize it. |
Agill-Sheron
marked this pull request as draft
November 12, 2026 16:35
This branch has not been 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.
Design-review options for reserves with a dynamic borrow cap (current cap kept just above total borrowed, raised automatically up to a max cap). Against the current cap alone, these reserves look nearly full all the time; these options show the max cap instead.
General Changes
?dyncap=): Today (default, unchanged) · Notice · Max cap · Vs max · Combined. Vs max and Combined add a usage bar on the max cap scale, with optional hover tooltips (?barhover=).?mktnotice=,?mkttag=,?mktcol=).Developer Notes
next devor withNEXT_PUBLIC_ENABLE_TWEAKS=true. Production always shows Today.simulatedCaps.tsmarks Arbitrum v3 USDC as dynamic (?capstate=picks the state), andsimulatedWallet.ts(?wallet=small|large) fakes a read-only position so the borrow flow can be reviewed without a wallet. The header ofsimulatedCaps.tslists the contract reads that replace it.DYNAMIC_CAPS_LEARN_MORE_URLis a placeholder.Once an option is chosen
Lock it in and remove the review scaffolding. Example prompt for a coding agent:
Reviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
.env.examplefile as well as the pertinant.github/actions/*files