feat(AAV-962): BORROW_BL incentive zeroing in simulation#458
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Add borrowBlacklist to CampaignGroup type + Zod schema + OpenAPI. Zero supply incentive in 4 functions (merklGroupMultiplier, walletMerklGroupMultiplier, crossReserveNetEligibleUsdFn, walletCrossReserveNetEligibleUsdFn) when group.borrowBlacklist=true and user has borrow position. Golden Rule #1 preserved: current uses wallet-only borrow, after uses total borrow. 17 new tests (5 aggregation + 8 simulation + 4 field-canary).
0xPabloLI
force-pushed
the
feat/aav-962-borrow-bl-incentive
branch
from
July 23, 2026 09:41
041909b to
8f43711
Compare
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
Implements BORROW_BL incentive zeroing logic for Merkl supply opportunities where users have borrow positions.
Closes AAV-962
Changes
borrowBlacklist?: truetoCampaignGrouptype, Zod schema, and OpenAPI specrateSimulationCalculator.tsnow checkgroup.borrowBlacklist === true && side === 'supply'and return 0 when user has borrow positioncurrentuses wallet-only borrow,afteruses total borrow — current never changes with simulation inputDesign decisions
currentalready useswalletMerklGroupMultiplier(AAV-1101) — no change neededcrossReserveNetEligibleUsdFn) needed zeroing too because it ignoresmerklGroupMultiplierborrowBlacklist?: true(notboolean) — onlytrueis meaningful, absent = noneValidation