Skip to content

Add LatentSpaceHookV4 hook on ethereum - #7162

Merged
Ponx merged 2 commits into
mainfrom
hooks/ethereum/0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc
Sep 17, 2026
Merged

Ponx merged 2 commits into
mainfrom
hooks/ethereum/0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

A token/ETH pool hook that burns a configurable percentage (up to 10%) of token amounts on each swap. Sells (token→ETH) are additionally gated: a designated gatekeeper EOA can block specific addresses from selling (warded mapping) or globally pause all sells (gateSealed flag).

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 allowlist

Warnings

  • Submitter did not provide a name. Using AI-derived "LatentSpaceHookV4".
  • Submitter did not provide a description. Using AI-generated description.
  • Source file is named src_InariaHook.sol but the deployed contract is LatentSpaceHookV4 — the code may have been rebranded or repurposed.
  • Hook implements one-sided sell gating: the gatekeeper EOA can block individual addresses (warded mapping) or freeze all sells (gateSealed), while buys are unrestricted — honeypot-style behavior is possible.

Closes #7150

@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/ethereum/0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc.json

Flags ✓

Address 0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc — last two bytes 0x80cc = 1000 0000 1100 1100. Lowest 14 bits encode:

Bit Flag Address File
7 beforeSwap 1 true ✓
6 afterSwap 1 true ✓
3 beforeSwapReturnsDelta 1 true ✓
2 afterSwapReturnsDelta 1 true ✓
all others 0 false ✓

Confirmed by getHookPermissions() in the verified source.

Properties

  • dynamicFee: false ✓ — beforeSwap returns 0 for the fee override; no poolManager.updateDynamicLPFee() call.

  • upgradeable: false ✓ — All key addresses (poolManager, authorized, gatekeeper) are immutable; no proxy or delegatecall to mutable address. source_meta.json confirms "proxy": false.

  • requiresCustomSwapData: false ✓ — hookData (the bytes calldata parameter) is never read in beforeSwap or afterSwap.

  • vanillaSwap: false ✓ — Correct; beforeSwapReturnsDelta and afterSwapReturnsDelta are both true, and the hook actively skims and burns token amounts.

  • swapAccess: "allowlist" ✗ — Incorrect. beforeSwap applies two distinct access control mechanisms to sells (!params.zeroForOne):

    1. gateSealed — a boolean flag toggled by the gatekeeper admin (sealGate()/openGate()). This matches the "governance" definition (a boolean flag set by an owner/admin).
    2. warded[tx.origin] — an address-based blocklist managed by the gatekeeper. This matches the "allowlist" definition (checks caller against an address set).

    Since neither "allowlist" nor "governance" alone captures both mechanisms, the correct classification is "other".

Metadata ✓

  • name: "LatentSpaceHookV4" matches the verified contract name.
  • chainId: 1 is correct for ethereum.
  • verifiedSource: true is confirmed.
  • description accurately describes the burn mechanism and dual sell-side gating. No audit claims or marketing language.

Required Change

"swapAccess": "other"

@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/ethereum/0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc.json

Contract: LatentSpaceHookV4 — verified source confirmed.

Flag Verification

Address low 14 bits: 0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc & 0x3FFF = 0x00CC = 0b00000011001100

Bit Flag Address JSON
7 beforeSwap 1 true ✓
6 afterSwap 1 true ✓
3 beforeSwapReturnsDelta 1 true ✓
2 afterSwapReturnsDelta 1 true ✓
all others 0 false ✓

Matches getHookPermissions() in source exactly.

Properties Verification

  • dynamicFee: false ✓ — No updateDynamicLPFee() call; beforeSwap returns 0 for the fee slot. The burnFeeBps is a token-burn deduction, not an LP fee override.
  • upgradeable: false ✓ — No proxy pattern, no mutable delegatecall target, no SELFDESTRUCT. All critical addresses are immutable.
  • requiresCustomSwapData: false ✓ — The hookData parameter is unused in both beforeSwap and afterSwap. Swaps proceed normally without any custom data.
  • vanillaSwap: false ✓ — Correctly false; both beforeSwapReturnsDelta and afterSwapReturnsDelta are true, and the hook takes token amounts out of the pool and burns them.
  • swapAccess: "other" ✓ — beforeSwap gates sells via two orthogonal mechanisms: a warded blocklist mapping (allowlist-style) and a gateSealed global pause flag (governance-style). Neither alone fully characterizes the access control, so "other" is appropriate.

Metadata Verification

  • verifiedSource: true ✓ — confirmed by source_meta.json.
  • chainId: 1 ✓ — ethereum mainnet.
  • name: "LatentSpaceHookV4" ✓ — matches contractName in Etherscan metadata.
  • description ✓ — accurately describes: token burn on swaps (up to 10% via MAX_BURN_FEE_BPS = 1000), sell-side gating by a gatekeeper EOA via the warded mapping and gateSealed flag. No audit claims, safety guarantees, or marketing language.

All fields verified. Approving.

@Ponx Ponx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Bot review verified; bitmask/flags/properties check out. LGTM.

@Ponx
Ponx merged commit 96400a7 into main Sep 17, 2026
5 checks passed
@Ponx
Ponx deleted the hooks/ethereum/0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc branch September 17, 2026 00:31
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: 0x5a8ed93ca6aa5835f4e09ef4a0cb412aa56180cc on ethereum

1 participant