PointsHook on Optimism
Uniswap v4 Hook Contract 0x6d7a7ef698f9cd4c6268f9eb77eff1c0d84a8040 on Optimism · Rewards · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 2
What it does
Awards POINTS reward tokens to users who spend TOKEN_A to buy the paired token in pools that include TOKEN_A.
How it works step by step
- Runs only in afterSwap; all other hook callbacks are disabled.
- Restricts awards to pools where one currency is the hardcoded TOKEN_A address.
- Awards only when the swap direction spends TOKEN_A (buying the other token).
- Decodes the reward recipient address from caller-supplied hookData.
- Mints POINTS at 1 point per 10 TOKEN_A spent, with integer rounding.
- POINTS is a separate ERC20 with 6 decimals owned by the hook deployer.
- Swap behaviour
- After each swap, if the pool contains TOKEN_A and the swap spends TOKEN_A, the hook mints POINTS to the address decoded from hookData at a rate of 1 POINT per 10 TOKEN_A spent, rounded down to whole points; other swaps are ignored.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee. The hook does not set, take or share fees.
- Owner & admin controls
- The PointsToken is owned by the deployer contract address via Ownable; the owner can mint unlimited POINTS tokens to any address. PointsHook itself has no owner or pause functions.
Enabled Uniswap v4 callbacks
afterSwap
afterSwap is enabled and used to award POINTS tokens to the user decoded from hookData when a swap buys the TOKEN_A-paired token by spending TOKEN_A.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The PointsToken owner can mint arbitrary amounts of POINTS to any address, so the points supply is unbounded and controlled by a single key.
Risk to user funds: The hook does not hold, move or block pool or user funds; it only mints the separate POINTS token after swaps. Pool liquidity and swap flow are unaffected.
Security findings
- [medium] Unlimited points minting by owner: The mint function is onlyOwner with no supply cap, so the owner can mint any amount of POINTS at will.
- [info] Recipient taken from caller-supplied hookData: Points are awarded to whatever address is encoded in hookData, which is supplied by the caller, so a user can direct points to any recipient.
- [info] Rounding to zero for small amounts: Points are computed from the swap amount with integer rounding, so small swaps award zero points and the afterSwap hook still executes the mint call.
- [info] No fund custody or return delta: The source is verified and the hook takes no tokens and returns no delta, so it cannot hold, move or block pool funds.
Contract details
- Verified source
- Yes (PointsHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 3,903 bytes
- Upgradeable proxy
- No
- Detected patterns
- rewards, self-unlock
Pools using PointsHook
- B / A (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today