Add LendsProtocolHook hook on robinhood#1141
Merged
Ponx merged 1 commit intoJul 24, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Review: hooks/robinhood/0x78f535390f5c3ac2ac67d11abb9f6e48043340cc.json
Address Flags
Address ends in ...40cc. Lowest 14 bits: 0x40cc & 0x3FFF = 0xCC = 1100 1100₂.
| Bit | Flag | Hook File | Verified |
|---|---|---|---|
| 7 | beforeSwap | true | ✓ |
| 6 | afterSwap | true | ✓ |
| 5 | beforeDonate | false | ✓ |
| 4 | afterDonate | false | ✓ |
| 3 | beforeSwapReturnsDelta | true | ✓ |
| 2 | afterSwapReturnsDelta | true | ✓ |
| 1 | afterAddLiquidityReturnsDelta | false | ✓ |
| 0 | afterRemoveLiquidityReturnsDelta | false | ✓ |
| 13–8 | all others | false | ✓ |
Confirmed by source: REQUIRED_HOOK_FLAGS = BEFORE_SWAP_FLAG | AFTER_SWAP_FLAG | BEFORE_SWAP_RETURNS_DELTA_FLAG | AFTER_SWAP_RETURNS_DELTA_FLAG.
Properties
- dynamicFee: false ✓ —
beforeSwapreturns 0 forlpFeeOverride; noupdateDynamicLPFee()calls. The hook adjusts deltas, not LP fees. - upgradeable: false ✓ — Uses
Ownable, no proxy pattern, nodelegatecall, no mutable implementation storage, noSELFDESTRUCT. - requiresCustomSwapData: false ✓ — The
hookDataparameter in bothbeforeSwapandafterSwapis unnamed and completely ignored by the logic. - vanillaSwap: false ✓ —
beforeSwapReturnsDeltaandafterSwapReturnsDeltaare set and actively used to collect fees viaBeforeSwapDeltaLibrary.toBeforeSwapDeltaand theint128return ofafterSwap. Swap execution is materially altered. - swapAccess: "governance" ✓ —
_enabledPoolConfig()checkspoolTaxConfig[poolId].enabled, a boolean flag set by the owner viasetPoolTaxConfig. Disabled pools revert withPoolNotEnabled. This fits the governance classification.
Metadata
- chainId: 4663 ✓ — matches
chains.jsonforrobinhood. - name: "LendsProtocolHook" ✓ — matches the on-chain contract name and
source_meta.json. - verifiedSource: true ✓ —
source_meta.jsonconfirmsverified: true. - description ✓ — Accurately describes: owner-configurable fee capped at 5% (
MAX_TOTAL_TAX_BPS = 500,BPS_DENOMINATOR = 10_000), collected in the quote currency, distributed to up to 10 weighted recipients (MAX_RECIPIENTS = 10,FeeRecipient[]), via beforeSwap/afterSwap delta adjustments. No marketing or audit language.
All checks pass.
Ponx
approved these changes
Jul 24, 2026
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
Charges an owner-configurable fee (up to 5%) on swaps in explicitly enabled pools, collecting it in the quote currency and distributing it proportionally to up to 10 weighted fee recipients via beforeSwap and afterSwap delta adjustments.
Flags
Properties
Warnings
Closes #1137