Skip to content

Add Mundial hook on xlayer#1103

Merged
Ponx merged 1 commit into
mainfrom
hooks/xlayer/0x51f3d18a574c1deec5c04d395573cda9248dd0c4
Jul 16, 2026
Merged

Add Mundial hook on xlayer#1103
Ponx merged 1 commit into
mainfrom
hooks/xlayer/0x51f3d18a574c1deec5c04d395573cda9248dd0c4

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

A Uniswap v4 hook that runs an 8-team knockout World Cup tournament inside a single pool. Pledged fans receive dynamic LP fee discounts based on tournament state (neutral, fan-alive, match-live, golden-goal). afterSwap skims a Champions Pot via delta returns; match outcomes are determined by swap volume with extra-time and penalty tiebreakers.

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 none

Warnings

  • Submitter did not provide a description. Using AI-generated description.

Closes #1068

@vercel

vercel Bot commented Jul 16, 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 16, 2026 4:32pm

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

Address Flags (lowest 14 bits of 0x...d0c4)

0xd0c4 = 1101 0000 1100 0100 — decoded against the flag table:

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

All flags match the address bitmask.

Properties Verification

  • dynamicFee: true ✓ — afterInitialize enforces key.fee.isDynamicFee(). beforeSwap returns fee | LPFeeLibrary.OVERRIDE_FEE_FLAG via feeFor(), which varies by tournament state (FEE_NEUTRAL, FEE_FAN_ALIVE, FEE_MATCH_LIVE, FEE_GOLDEN_GOAL).
  • upgradeable: false ✓ — source_meta.json confirms proxy: false. No delegatecall, mutable implementation slot, or SELFDESTRUCT found.
  • requiresCustomSwapData: false ✓ — beforeSwap's bytes calldata parameter is unnamed and unused. Swaps execute correctly with empty hookData.
  • vanillaSwap: false ✓ — Correctly false: dynamic fee override is active, afterSwapReturnsDelta is true, and afterSwap skims tokens from the pool into a Champions Pot.
  • swapAccess: "none" ✓ — beforeSwap applies no access control; all addresses can swap. Fan vs. neutral status only affects fee tier, not swap permission.

Metadata

  • chain/chainId: xlayer / 196 matches chains.json
  • name: "Mundial" — contract is MundialHook; "Mundial" is a recognized abbreviation, no promotional language ✓
  • verifiedSource: true — confirmed by source_meta.json
  • description: Accurately describes the World Cup tournament mechanics, dynamic fee tiers, Champions Pot skim via delta returns, and penalty tiebreakers — all substantiated by the Solidity source ✓

Everything checks out.

@Ponx
Ponx merged commit 17fad6b into main Jul 16, 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: Mundial on XLayer

1 participant