TheWarHook on Ethereum
Uniswap v4 Hook Contract 0x7af9e7032d0e695c66da23419b40f87ff2c240cc on Ethereum · Launchpad · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $23.46K
- All-time volume
- $163.24K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 651
What it does
THE WAR is a two-team game in which every buy adds to a team score and a 3% tax funds a pot that the winning team shares at the end of each two-hour round.
How it works step by step
- Assigns each player to Bulls or Bears in each round, based on prior allegiance, a block-hash coin flip, or the trailing team during the final 15-minute lock.
- Scores each realised buy by ETH volume, with each player's rank weight latched at their first buy of the round.
- Takes a 3% ETH tax on every swap into an ERC-6909 pot, and enforces exact fills on ETH-specified swaps to avoid charging on unfilled amounts.
- Settles each round after it ends, splitting the pot 80/10/9/1 between winners (flat), officers (rank-weighted), a fixed treasury, and a buyback-and-burn.
- Lets winners claim individually or in batches, provided they still hold the war token, and allows unclaimed residue to be swept back into the live pot after seven days.
- Swap behaviour
- Every buy and sell pays a flat 3% tax in ETH that is added to the round pot. Buys in beforeSwap or afterSwap are scored by the realised fill, and the player is assigned to Bulls or Bears by loyalty, coin flip, or trailing team depending on the state of the round.
- Liquidity behaviour
- No liquidity callbacks. Liquidity can be added or removed by anyone through the normal pool manager; the hook does not intercept these operations. The pool is initialized in the constructor at a caller-supplied launch price.
- Fee behaviour
- A flat 3% tax is taken in ETH on every buy and sell in beforeSwap or afterSwap, with rounding up to at least 1 wei. Each settled pot is split 80% to winners (flat, by score), 10% to officers (by score times rank weight), 9% to a fixed treasury, and 1% to a buyback-and-burn. Defecting between teams costs an escalating ETH fee of 3% to 12% of the slice being acquired.
- Owner & admin controls
- No owner, pause, or upgrade path. The treasury address and fee constants (TAX_BPS 3%, TREASURY_BPS 9%, BURN_BPS 1%, OFFICERS_BPS 10%) are constants or immutables and cannot be changed after deployment. Permissionless functions include settle, sweep, buyback, remitTreasury, and claimMany; anyone can trigger them.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: charges the 3% tax, mints the fee as ERC-6909 claims, and returns a delta so the fee is taken from the swap. afterSwap: scores realised buys, charges the tax on the unspecified currency, and enforces exact fills for ETH-specified swaps. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take the 3% tax from swap amounts. All other IHooks callbacks revert with HookNotImplemented.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key exists. Nobody can change parameters, pause swaps, or redirect the treasury. The only trust assumption is that the hardcoded treasury address is controlled by whoever holds its private key and is able to receive plain ETH.
Risk to user funds: The hook holds pot ETH as ERC-6909 claims on the pool manager and can release it only through its own payout, buyback, or treasury remit paths, each tied to deterministic accounting. Swaps are not blocked by any owner. Users risk losing their claim if they do not hold the war token when claiming, or if the treasury address rejects ETH and the 9% share is stranded.
Security findings
- [info] Pool initialized atomically at deploy: The constructor initializes the bound pool in the same transaction, so no one can front-run a poisoned opening price after deployment.
- [medium] Immutable treasury destination: The treasury is a hardcoded constant that cannot be changed. If that address cannot accept plain ETH transfers, 9% of every pot would be stranded permanently with no recovery path.
- [low] Hold-to-claim check is bypassable: Claims require the claimant to hold the war token at claim time. A user can sell all tokens and then re-buy a single unit just before claiming to pass the check, so the protection is partial.
- [low] Score attribution uses tx.origin: Scoring credits tx.origin. Smart-contract wallets and ERC-4337 bundlers may accrue score to the wrong party, and the design accepts this as a known limitation.
- [medium] Unaudited code: The contract has not been audited. The source contains comments describing a prior adversarial review with nine critical findings in an earlier revision that were fixed, which indicates the code has had security attention but no formal audit is documented.
Contract details
- Verified source
- Yes (TheWarHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 17,654 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, launchpad, moves-currency, return-delta, self-unlock, tax
Pools using TheWarHook
- ETH / WAR (0.30% fee) — 24h volume $0, TVL $23.46K, 0 swaps today