Add LatentSpaceHookV4 hook on ethereum - #7162
Conversation
There was a problem hiding this comment.
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 ✓ —
beforeSwapreturns0for the fee override; nopoolManager.updateDynamicLPFee()call. -
upgradeable: false ✓ — All key addresses (
poolManager,authorized,gatekeeper) areimmutable; no proxy or delegatecall to mutable address.source_meta.jsonconfirms"proxy": false. -
requiresCustomSwapData: false ✓ —
hookData(thebytes calldataparameter) is never read inbeforeSwaporafterSwap. -
vanillaSwap: false ✓ — Correct;
beforeSwapReturnsDeltaandafterSwapReturnsDeltaare both true, and the hook actively skims and burns token amounts. -
swapAccess: "allowlist" ✗ — Incorrect.
beforeSwapapplies two distinct access control mechanisms to sells (!params.zeroForOne):gateSealed— a boolean flag toggled by thegatekeeperadmin (sealGate()/openGate()). This matches the"governance"definition (a boolean flag set by an owner/admin).warded[tx.origin]— an address-based blocklist managed by thegatekeeper. 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: 1is correct for ethereum.verifiedSource: trueis confirmed.descriptionaccurately describes the burn mechanism and dual sell-side gating. No audit claims or marketing language.
Required Change
"swapAccess": "other"There was a problem hiding this comment.
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;beforeSwapreturns0for the fee slot. TheburnFeeBpsis a token-burn deduction, not an LP fee override. - upgradeable: false ✓ — No proxy pattern, no mutable
delegatecalltarget, noSELFDESTRUCT. All critical addresses areimmutable. - requiresCustomSwapData: false ✓ — The
hookDataparameter is unused in bothbeforeSwapandafterSwap. Swaps proceed normally without any custom data. - vanillaSwap: false ✓ — Correctly
false; bothbeforeSwapReturnsDeltaandafterSwapReturnsDeltaare true, and the hook takes token amounts out of the pool and burns them. - swapAccess: "other" ✓ —
beforeSwapgates sells via two orthogonal mechanisms: awardedblocklist mapping (allowlist-style) and agateSealedglobal pause flag (governance-style). Neither alone fully characterizes the access control, so"other"is appropriate.
Metadata Verification
verifiedSource: true✓ — confirmed bysource_meta.json.chainId: 1✓ — ethereum mainnet.name: "LatentSpaceHookV4"✓ — matchescontractNamein Etherscan metadata.description✓ — accurately describes: token burn on swaps (up to 10% viaMAX_BURN_FEE_BPS = 1000), sell-side gating by a gatekeeper EOA via thewardedmapping andgateSealedflag. No audit claims, safety guarantees, or marketing language.
All fields verified. Approving.
Ponx
left a comment
There was a problem hiding this comment.
Bot review verified; bitmask/flags/properties check out. LGTM.
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
Properties
Warnings
Closes #7150