Skip to content

Add LendsProtocolHook hook on robinhood#1141

Merged
Ponx merged 1 commit into
mainfrom
hooks/robinhood/0x78f535390f5c3ac2ac67d11abb9f6e48043340cc
Jul 24, 2026
Merged

Add LendsProtocolHook hook on robinhood#1141
Ponx merged 1 commit into
mainfrom
hooks/robinhood/0x78f535390f5c3ac2ac67d11abb9f6e48043340cc

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

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

Flag Value
beforeInitialize false
afterInitialize false
beforeAddLiquidity false
afterAddLiquidity false
beforeRemoveLiquidity false
afterRemoveLiquidity false
beforeSwap true
afterSwap true
beforeDonate false
afterDonate false
beforeSwapReturnsDelta true
afterSwapReturnsDelta true
afterAddLiquidityReturnsDelta false
afterRemoveLiquidityReturnsDelta false

Properties

Property Value
dynamicFee false
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess governance

Warnings

  • Submitter-proposed description rejected: claims "single-pool" but contract supports multiple pools via a poolTaxConfig mapping, and references unverifiable "uniroute routing (ROUTE-1500)" not present in source. Using AI-generated description.

Closes #1137

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment Jul 24, 2026 5:52pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ✓ — beforeSwap returns 0 for lpFeeOverride; no updateDynamicLPFee() calls. The hook adjusts deltas, not LP fees.
  • upgradeable: false ✓ — Uses Ownable, no proxy pattern, no delegatecall, no mutable implementation storage, no SELFDESTRUCT.
  • requiresCustomSwapData: false ✓ — The hookData parameter in both beforeSwap and afterSwap is unnamed and completely ignored by the logic.
  • vanillaSwap: false ✓ — beforeSwapReturnsDelta and afterSwapReturnsDelta are set and actively used to collect fees via BeforeSwapDeltaLibrary.toBeforeSwapDelta and the int128 return of afterSwap. Swap execution is materially altered.
  • swapAccess: "governance" ✓ — _enabledPoolConfig() checks poolTaxConfig[poolId].enabled, a boolean flag set by the owner via setPoolTaxConfig. Disabled pools revert with PoolNotEnabled. This fits the governance classification.

Metadata

  • chainId: 4663 ✓ — matches chains.json for robinhood.
  • name: "LendsProtocolHook" ✓ — matches the on-chain contract name and source_meta.json.
  • verifiedSource: true ✓ — source_meta.json confirms verified: 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
Ponx merged commit 50be7db into main Jul 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hook: LendsProtocolHook on robinhood

1 participant