Shaving on Robinhood Chain
Uniswap v4 Hook Contract 0xfbf7a5dacd833f061911587b1a68979c1687e0cc on Robinhood Chain · Fee sharing · 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
- 0
What it does
Every swap in this coin's ETH pool pays a fixed ETH cut of 0.75% to 5% that is split among four payee trays, so buyers and sellers both pay it regardless of direction.
How it works step by step
- Acts as both an ERC20 token (Shaving, fixed supply of 1,000,000,000 minted to the Lathe at construction) and the hook of its own Uniswap v4 home pool paired against native ETH
- Takes a cut of every swap in the home pool, denominated in ETH, between 0.75% and 5% (cutBps set at deployment, bounded by CUT_FLOOR_BPS and CUT_CEILING_BPS)
- Holds the taken ETH as an ERC-6909 claim inside the PoolManager and sorts it into four tray balances: wright (creator), shop (community credits), guild (10% shared), house (platform, remainder)
- Lets each tray's payee draw its balance via draw(), which burns the claim and sends ETH to that payee; only the payee address can call draw for its tray
- Sets owner to zero by renouncing ownership in the constructor, so no privileged key remains to change fees, addresses or pause the hook
- Restricts the pool to exactly one canonical key (ETH/this token, fee 0, tick spacing 1, this hook) that can be initialized once by the Lathe
- Swap behaviour
- Swaps in the home pool pay the cut in ETH. On buys with exact-in ETH, the cut is taken from the ETH the buyer sends before the pool runs. On sells with exact-out ETH, the pool is asked for a grossed-up ETH amount and the cut is the difference. On buys with exact-out coins, the ETH paid is grossed up after the swap and the cut is the difference. On sells with exact-in coins, the cut is a slice of the ETH received after the swap. Partial fills of legs that name ETH revert with ShortFilled.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee of 0 at the pool level; the hook charges its own ETH cut of cutBps (immutable, between 75 and 500 basis points) on every home-pool swap, rounded up, and returns it as a hook delta. The cut is split 80% to the creator side (wright and shop, with shop receiving creditBps of that side) and 10% to guild, with the remainder to house.
- Owner & admin controls
- Ownership is renounced in the constructor, so owner() is the zero address and no owner-only function is reachable. Fee parameters, tray payees and the metadata URI are immutable or set once at construction. No pause, blacklist, upgrade proxy or parameter-change function is present in the decoded interface. The only per-tray control is that each payee controls its own draw.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool creation to the Lathe with the canonical key and records the home pool. beforeSwap computes and takes the cut on ETH-naming legs and returns it as a before-swap specified delta. afterSwap computes and takes the cut on coin-naming legs using the realised ETH delta and returns it as an after-swap unspecified delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can keep the cut.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key exists: ownership was renounced in the constructor and no admin or upgrade functions are exposed. The four tray payees are the only addresses with power, limited to drawing their own tray balance.
Risk to user funds: The hook holds ETH claims (ERC-6909 balance inside the PoolManager) equal to accumulated cuts, which are released only to the tray payees via draw(). Swappers pay the cut through hook deltas, and the hook cannot move pool liquidity beyond those cut amounts. The hook can revert swaps but cannot block withdrawals of LP positions, since it has no liquidity callbacks.
Security findings
- [info] Hook takes a fee through return deltas: beforeSwap and afterSwap return a positive hook delta equal to the cut, so every home-pool swap pays up to 5% of ETH value to the trays; traders should expect this cost by design.
- [low] Tray payees fully control their own draws: draw() can only be called by the tray payee and transfers the full balance of that tray to them on demand, so a compromised payee key could drain its tray, but not the other trays or pool liquidity beyond the cut balance.
- [medium] Pool-wide swap revert on short fills: afterSwap reverts with ShortFilled when an ETH-naming leg is not filled exactly, and beforeSwap reverts with UnreasonableAmount on extreme or inconsistent amounts, so certain swap sizes or partial liquidity conditions can make the home pool unusable for that trade.
- [info] Immutable payee addresses: wright, shop, guild and house are immutable, so if any payee address is lost or unusable, the funds allocated to that tray are stuck with no recovery path in the contract.
Contract details
- Verified source
- Yes (Shaving)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 8,131 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, moves-currency, ownable, return-delta, self-unlock
Pools using Shaving
- ETH / TEST (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today