Skip to content

Add Mundial hook on X Layer - #1062

Closed
Tonyflam wants to merge 3 commits into
Uniswap:mainfrom
Tonyflam:add-mundial-xlayer
Closed

Add Mundial hook on X Layer#1062
Tonyflam wants to merge 3 commits into
Uniswap:mainfrom
Tonyflam:add-mundial-xlayer

Conversation

@Tonyflam

Copy link
Copy Markdown

Adds Mundial — a Uniswap v4 hook on X Layer mainnet (chainId 196) that runs an autonomous eight-team knockout World Cup inside one dynamic-fee OKB/MUNDIAL pool.

Built for the OKX × X Layer "Hook × World Cup" hackathon.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

@Tonyflam is attempting to deploy a commit to the Uniswap Team on Vercel.

A member of the Team first needs to authorize it.

@Tonyflam

Copy link
Copy Markdown
Author

Source verification complete — flipped verifiedSource to true. Evidence: exact-match verification on Sourcify for both the hook (https://repo.sourcify.dev/196/0x51f3d18a574c1DeEC5c04d395573cda9248Dd0C4) and its pool token (https://repo.sourcify.dev/196/0xFB8FB4cF5f92256c52a638F46f8eCC2525303d6f), chain 196.

@marktoda

Copy link
Copy Markdown
Contributor

Maintainer verification (not an approval)

The automated review workflow can't run for external contributors (read-only repo permissions), so I verified this submission manually against the deployed contract. Ground truth: Sourcify has a runtime exact_match for this address on chain 196 (verified 2026-07-12, contract MundialHook, solc 0.8.26). The OKX/OKLink explorer shows no verified source, and the GitHub repo (Tonyflam/2_okx) is byte-identical to the Sourcify-verified source.

Per-property verdicts

Claim Verdict
flags = afterInitialize, beforeSwap, afterSwap, afterSwapReturnsDelta (bitmask 0x10c4) ✅ Confirmed — getHookPermissions() matches exactly
dynamicFee: true ✅ Confirmed — afterInitialize requires dynamic-fee pool; beforeSwap returns override fee (0.10–0.50% tiers)
upgradeable: false ✅ Confirmed — no proxy/delegatecall, all config immutable, no admin functions
requiresCustomSwapData: false ✅ Confirmed — hookData never read; empty-hookData swaps work
vanillaSwap: true Refuted — must be false
swapAccess: "none" ✅ Confirmed — match phases affect fee tier only, never swap access

Required change

vanillaSwap must be false: under this registry's classification rules, dynamicFee=true or afterSwapReturnsDelta=true each independently force it, and both hold here — beforeSwap overrides the LP fee per-swapper and afterSwap skims 0.20% of the unspecified amount from pledged fans' swaps via poolManager.take + returned hook delta. Swaps do not behave identically to a standard v4 pool.

Also worth updating

  • verifiedSource: false is stale — the source is verified via Sourcify (runtime exact_match, chain 196). Whether Sourcify-only verification qualifies for verifiedSource: true is a policy call, but "verification pending" no longer reflects reality.
  • FYI: the hook uses tx.origin for game attribution (documented in your NatSpec; doesn't affect the registry data).

Merge status

This PR is structurally blocked regardless of data correctness: the required review status check cannot pass for read-only actors, and the required validate check has not run either. Once vanillaSwap is corrected, the likely path to landing this is a maintainer-authored equivalent PR or a workflow change — the checks won't go green on this PR as-is.

@Tonyflam

Copy link
Copy Markdown
Author

Thanks for the manual verification and the precise classification note. I corrected properties.vanillaSwap to false in commit 7a99470; verifiedSource remains true based on the Sourcify runtime exact match. The relevant Hooklist tests pass locally (22/22).

Understood that this fork PR cannot satisfy the required review/validate checks with read-only workflow permissions and may need a maintainer-authored equivalent PR or workflow-side path.

@Ponx

Ponx commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Added through #1103

@Ponx Ponx closed this Jul 16, 2026
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.

3 participants