PointsHook on Optimism
Uniswap v4 Hook Contract 0x0c78f4f855a07eb98b1ffd48e0bf7c5f40c64040 on Optimism · Rewards · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 2
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 1
What it does
Awards POINTS tokens to users who swap TOKEN_A for the paired token in v4 pools, at a rate of 1 point per 10 TOKEN_A spent.
How it works step by step
- Restricts reward eligibility to pools where one currency is the hardcoded TOKEN_A address.
- Only rewards swaps in the direction where TOKEN_A is being spent for the other token.
- Computes the reward from the TOKEN_A spend amount, rounded down to multiples of 10 units.
- Mints POINTS (6 decimals) to tx.origin through the PointsToken contract deployed in the constructor.
- Returns zero hook delta, so it does not alter swap amounts or take tokens.
- Swap behaviour
- After each swap in a pool containing TOKEN_A, if the user is buying the other token with TOKEN_A, the hook mints POINTS to tx.origin based on the TOKEN_A spend amount; other swaps are ignored.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee; the hook takes no fee and does not alter fees.
- Owner & admin controls
- The PointsToken owner (the deployer, set via Ownable at construction) can mint unlimited POINTS to any address; there is no pause, upgrade or parameter-change function on the hook itself.
Enabled Uniswap v4 callbacks
afterSwap
afterSwap is the only enabled callback; it awards POINTS tokens to the swapper after swaps in pools that include TOKEN_A when the user spends TOKEN_A.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The Ownable owner of PointsToken can mint arbitrary amounts of POINTS to any address, so the points supply is fully controlled by one key. This affects only the points token, not pool funds.
Risk to user funds: The hook does not hold, move or block pool or user tokens; it returns zero delta and only mints POINTS. User funds in the pool are not exposed to the hook logic.
Security findings
- [low] Points awarded to tx.origin: The attributed user is tx.origin, not the swapper contract or router, so a contract-based swapper or relayer may receive points for the wrong party, and an intermediate contract can route swaps while the EOA receives points.
- [low] Rounding and amount derivation: Points are minted from the swap amount via integer division, so amounts below 10 units of TOKEN_A yield zero points, and the awarded amount depends on the amountSpecified or delta sign convention, which may not reflect the actual spent amount for exact-output swaps.
- [medium] Unbounded owner minting: The owner can mint unlimited POINTS, so the reward token has no supply cap and its value depends on trust in the owner.
- [info] Hardcoded token address: The hook is deployed with a constructor that creates the PointsToken internally, and the TOKEN_A address is hardcoded, so the hook only works for pools containing that exact token.
Contract details
- Verified source
- Yes (PointsHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 4,002 bytes
- Upgradeable proxy
- No
- Detected patterns
- rewards
Pools using PointsHook
- C / A (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- B / A (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today