Token hook on Ethereum
Uniswap v4 Hook Contract 0xece9583b466a5101af95442089adfc677da7a040 on Ethereum · Token
- Volume (24h)
- $279
- Value locked (TVL)
- $231
- All-time volume
- $240.12K
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 651
What it does
RUBY is an ERC-20 whose token contract is also the Uniswap v4 hook for its own pool, where whole units start blank and holders can permanently etch a custody policy onto some of them.
This read was written for the hook 0xb2a5…a040 on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Holds the full 100,000 RUBY supply and mints all of it blank, tracked by a blankSupply counter that only falls as units are inscribed
- Lets a holder inscribe whole tokens onto a registered policy, burning a 0.75% tithe and creating an active lot with a permanent mark
- Splits each balance into blank, a scarred bucket, and active policy-bound lots, with default transfers moving bucket and blank but never active lots
- Seeds a single-sided v4 position through the PositionManager in seed() and keeps the LP NFT in the hook
- Allows timed lots to unbind after the policy delay and any lot to be purged for a 30% burn that returns the rest to blank
- Swap behaviour
- Swaps in the RUBY pool use the pool's 0 fee; afterSwap only returns zero delta and never takes tokens. Transfers into the pool manager accept only blank units, so policy-bound or scarred units cannot be sold into the pool.
- Liquidity behaviour
- No liquidity callbacks are enabled. Liquidity is seeded once through the Uniswap v4 PositionManager in seed(), which mints a single-sided position owned by the hook; the NFT is held by the hook and not withdrawable by admin functions.
- Fee behaviour
- Uses the pool's static fee of 0 (POOL_FEE = 0). A 0.75% tithe (TITHE_BPS = 75) is burned from amounts inscribed into a policy lot, not charged on swaps. Purge burns 30% of a lot to return the rest to blank.
- Owner & admin controls
- Owner (fixed at deploy, renounce disabled) can call setCard once to wire the RubyCard collection and can call seed once to initialize the pool and mint the launch LP position; ownership transfer uses a two-step handover. Owner cannot pause, freeze balances, or change fees (pool fee fixed at 0 with tick spacing 60). Policy registration in PolicyRegistry is permissionless for third-party modules, while audited flag is owner-only. Holders can set their own ward (setWard) and must wait 7 days to lift it.
Enabled Uniswap v4 callbacks
beforeInitialize, afterSwap
beforeInitialize: restricts pool initialization to the seed() flow via the transient seeding flag so no one else can open the canonical pool. afterSwap: no-op telemetry returning zero delta, never reverts and takes no tokens.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, high confidence).
Who controls it: Owner can seed the pool once and set the card contract once; owner cannot seize or freeze holder balances, change the swap fee, or upgrade the contract (no proxy). Policy modules are immutable per id and pinned by codehash, and holders control their own policies.
Risk to user funds: The hook holds the entire initial supply and the seeded LP position, and it can block transfers of inscribed lots through policy modules. Holders can lose access to funds only through policies they chose to inscribe; blank and bucket balances are freely transferable by the token logic.
Security findings
- [info] Pool sells accept only blank units: The hook pools blank and coded units differently: transfers into the pool manager revert unless the amount is within the sender's blank balance, so coded or scarred tokens cannot be sold into the pool.
- [medium] Policy modules can block transfers of inscribed units: Policy checks are performed via STATICCALL to registry-listed modules with a 60k gas stipend; a module can deny transfers of lot units, and holders are protected from policy veto forever by a maxExitDelay ceiling of 30 days, but timed policies can still delay exit up to that ceiling.
- [low] Hook custodies seeded liquidity NFT: The hook owns the LP NFT and the full token supply at seed; there is no admin path to withdraw the position, so liquidity is held by contract logic rather than an owner key.
- [info] Owner role is limited to one-time setup: Ownership cannot be renounced and is transferable via two-step handover; a compromised owner key could call setCard once only and seed once only, limiting post-deploy admin power.
Contract details
- Verified source
- No
- Bytecode size
- 15,066 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, ownable
Pools using Token hook
- ETH / RUBY (0.00% fee) — 24h volume $279, TVL $231, 1 swaps today