EtherPortalHook on Ethereum
Uniswap v4 Hook Contract 0xe23544e5741aa1b1384b4ee4600de31d6b2020cc on Ethereum · Token · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 4 (2 traders)
- Total swaps
- 4
What it does
Buys and sells in the ETH/ETC pool each pay a percentage tax taken in ETH that goes to the Reward Vault, with buys paying the entry toll and sells paying the exit toll, and both are heavily taxed during the first 22 minutes.
How it works step by step
- Taxes every swap in the native ETH / ETC pool by taking a percentage of the ETH side of the trade
- Takes the tax as ERC-6909 credit inside the PoolManager via mint during beforeSwap or afterSwap, then fillTreasure burns that credit and pays ETH to the Reward Vault
- Applies a launch tax that starts at 85% and decays linearly to the configured toll over 22 minutes after pool initialization
- Restricts pool initialization to the portalOpener address and validates the pool key is ETH against the configured token
- Buy and sell tolls are adjustable by the owner or tollKeeper, bounded between 1% and 90%
- Swap behaviour
- On buys with exact-in (ETH paid in) and sells with exact-out (ETH received), the hook charges the entry or exit toll in beforeSwap via a return delta. On buys with exact-out and sells with exact-in, the toll is charged in afterSwap on the ETH delta. Both taxes are only ever taken on the ETH side.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- The hook takes a percentage toll (entryToll for buys, exitToll for sells) in ETH, floored during the first 22 minutes by a launch toll decaying from 85% to 1%. The pool's own fee is separate from this toll.
- Owner & admin controls
- The owner can set entry and exit tolls within 1% to 90%, appoint or remove a tollKeeper who can also change tolls within that range, change the vault address, and transfer ownership. There is no pause and no upgrade mechanism in the code shown.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool creation to portalOpener and records the pool id. beforeSwap and afterSwap compute and collect the ETH toll. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take the toll out of the swap amounts.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: A single owner key controls tax rates (up to 90%), the vault destination, and the tollKeeper; a compromised key could redirect all future tax revenue or set punitive taxes instantly.
Risk to user funds: The hook takes ETH from swaps via return deltas and holds it as ERC-6909 credit until fillTreasure is called; it cannot block swaps other than through the owner-set tax rate.
Security findings
- [medium] Owner can raise the tax to 90%: Tolls() can set entryToll and exitToll up to 9000 bps (90%) at any time, so the owner or tollKeeper can make trades almost entirely taxed.
- [info] Return deltas let the hook take user funds: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap amounts; this is the intended tax mechanism but users receive less than the pool quote.
- [info] Anyone can trigger vault payout: fillTreasure is permissionless and sends collected ETH to the vault address, which the owner can change via setVault, redirecting future tax revenue.
- [medium] Owner key controls vault destination: setVault lets the owner change where all future ETH tolls are sent, with no timelock visible in the code.
Contract details
- Verified source
- Yes (EtherPortalHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 8,605 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, launchpad, liquidity-management, moves-currency, ownable, return-delta, self-unlock, tax