Skip to content

Add GoldenGoalHook hook on xlayer#1057

Merged
marktoda merged 1 commit into
mainfrom
hooks/xlayer/0x742d6c5ec8eca72096c24a1287f5ef0efd0c50c4
Jul 13, 2026
Merged

Add GoldenGoalHook hook on xlayer#1057
marktoda merged 1 commit into
mainfrom
hooks/xlayer/0x742d6c5ec8eca72096c24a1287f5ef0efd0c50c4

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

A Uniswap v4 hook implementing a sports-themed trading arena: applies match-phase dynamic fees, accumulates per-swap goal points, takes configurable skim fees split between a communal prize pot and GOAL token buyback-and-burn, enforces a temporal anti-snipe buy limit window, and allows pro-rata pot claims at match end.

Flags

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

Properties

Property Value
dynamicFee true
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess temporal

Warnings

  • Submitter-proposed description rejected: specific numerical values ('20 bps', '50/50 pot/buyback') are not verifiable from source code—they reference storage variables (skimBps, POT_SHARE_BPS) that may be constructor parameters. Using AI-generated description.

Closes #1056

@vercel

vercel Bot commented Jul 11, 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 11, 2026 1:17pm

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/xlayer/0x742d6c5ec8eca72096c24a1287f5ef0efd0c50c4.json

Address Flags

Address 0x...50c40x50c4 & 0x3FFF = 0x10c4 = 0001 0000 1100 0100:

Bit Flag Expected JSON
13 beforeInitialize false false ✓
12 afterInitialize true true ✓
11 beforeAddLiquidity false false ✓
10 afterAddLiquidity false false ✓
9 beforeRemoveLiquidity false false ✓
8 afterRemoveLiquidity false false ✓
7 beforeSwap true true ✓
6 afterSwap true true ✓
5 beforeDonate false false ✓
4 afterDonate false false ✓
3 beforeSwapReturnsDelta false false ✓
2 afterSwapReturnsDelta true true ✓
1 afterAddLiquidityReturnsDelta false false ✓
0 afterRemoveLiquidityReturnsDelta false false ✓

All flags match the address bitmask. getHookPermissions() in source returns identical values.

Properties

  • dynamicFee: true ✓ — _beforeSwap returns fee | LPFeeLibrary.OVERRIDE_FEE_FLAG with a phase-variable fee (Kickoff=3000, Live=5000, ExtraTime=10000, FinalWhistle=5000). _afterInitialize also calls poolManager.updateDynamicLPFee(key, fee).

  • upgradeable: false ✓ — Immutable contract (NatSpec: "@dev Immutable"). No proxy pattern, delegatecall, or mutable implementation pointer. source_meta.json confirms proxy: false.

  • requiresCustomSwapData: false ✓ — _beforeSwap ignores hookData entirely. In _afterSwap, hookData is optional: if 32 bytes, decodes a trader address for point attribution; otherwise falls back to tx.origin/sender. Swaps function correctly with empty hookData.

  • vanillaSwap: false ✓ — Correctly false: dynamicFee=true, afterSwapReturnsDelta=true, and _afterSwap takes a skim fee via poolManager.take() returned as a delta all independently mandate non-vanilla behavior.

  • swapAccess: "temporal" ✓ — _enforceAntiSnipe gates large buys on block.timestamp > antiSnipeUntil. This is a configurable time-window restriction (anti-snipe on pool launch), correctly classified as temporal.

Metadata

  • verifiedSource: true ✓ — source_meta.json confirms verified: true.
  • chainId: 196 ✓ — Matches xlayer in chains.json.
  • name: "GoldenGoalHook" ✓ — Matches the Solidity contract name exactly. No promotional language.
  • description ✓ — All claims are substantiated by source: match-phase fees (phaseFee[_phase]), goal points accumulation (_points[trader]), skim split to pot/buyback (_takeSkim), anti-snipe window (_enforceAntiSnipe), pro-rata pot claims (claimPot()). No audit claims, safety guarantees, or marketing language.

All checks pass.

@marktoda marktoda 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.

Bot review verified. GoldenGoalHook — dynamic-fee hook on xlayer. Bitmask 0x10c4 → afterInitialize, beforeSwap, afterSwap, afterSwapReturnsDelta. Desc length 320/500 OK. dynamicFee=true, swapAccess=temporal per bot review. LGTM.

@marktoda marktoda merged commit 7938b8e into main Jul 13, 2026
7 checks passed
@marktoda marktoda deleted the hooks/xlayer/0x742d6c5ec8eca72096c24a1287f5ef0efd0c50c4 branch July 13, 2026 18:13
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: GoldenGoalHook on xlayer

1 participant