DarkHooks on Robinhood Chain

Uniswap v4 Hook Contract 0xb9662ea9819b6068d62d771db3a473e5012b2888 on Robinhood Chain · Custom pricing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
4
Swaps (24h)
4 (1 traders)
Total swaps
4

What it does

DarkHooks is a dark-pool hook that adds no liquidity and fills every swap against a maker's signed quote via DarkDesk, charging a fee of up to 10 bps that is paid by the swapper inside the delta, while the pool's own fee is zero.

How it works step by step

  • Creates Uniswap v4 pools that pair a listed base token with USDG at fee 0 and tick spacing 1, with the hook as the only pool-level logic
  • Holds no liquidity: adding liquidity to a DarkHooks pool always reverts, so pool reserves are empty
  • On every swap, requires a maker-signed two-sided quote passed in hookData and settles it through DarkDesk.fill with the hook as taker
  • Uses beforeSwapReturnDelta so the specified delta consumes the entire amountSpecified, bypassing the empty curve
  • Routes four modes: exact-in base sell, exact-out base buy, exact-in USDG buy capped at quote size, and exact-out USDG buy is unsupported
  • Takes the swapper's input from the pool manager and pays output back to it, with DarkDesk fees charged to the hook and recovered inside the swapper's delta
Swap behaviour
Each swap must include an abi-encoded (Quote, signature) in hookData, signed by the maker and not expired or used. Base-in exact-in sells the given base amount and the swapper receives the quote amount minus DarkDesk fee at the maker's bid. Exact-out base-out buys the requested base and the swapper pays the ask-based quote amount plus the fee. USDG-in exact-in buys the largest base amount affordable at the ask after the fee, capped at the quote size, with at most 2 micro-USDG of rounding kept by the hook. Exact-out with USDG out reverts with UnsupportedMode. Swaps revert if the maker cannot deliver, unless the maker is external and the bond slashing path applies.
Liquidity behaviour
beforeAddLiquidity always reverts with LiquidityNotAllowed, so no liquidity can be added. Remove-liquidity callbacks are not implemented and revert with HookNotImplemented.
Fee behaviour
The pool itself uses a static fee of 0. DarkDesk charges a fee in basis points on the quote-token amount (feeBps, capped at 10 bps by the constant MAX_FEE_BPS); it is paid to feeTo, charged to the hook as taker and effectively passed to the swapper inside the delta. Takers holding at least feeFreeBalance of $DESK pay no fee when a DESK token is set and the waiver is enabled.
Owner & admin controls
The owner can set listed base tokens, sweep any token held by the hook to an address of its choice, and transfer ownership via a two-step pending owner flow. In DarkDesk the owner can pause fills, change feeTo and feeBps (up to 10 bps), mark house makers that need no bond, set the DESK token once, and set minBond, slashAmount and feeFreeBalance. No upgradeability or proxy pattern was observed.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize: only the owner can initialize a pool, restricted to USDG pairs with fee 0, tick spacing 1, hook set to this contract and a listed base token. beforeAddLiquidity: reverts to block all liquidity. beforeSwap: settles the signed quote via DarkDesk and returns a delta that consumes the whole specified amount. beforeSwapReturnDelta: enabled so the hook can supply the swap amounts instead of the curve.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner of DarkHooks can list tokens and sweep hook balances; the owner of DarkDesk can pause trading, change the fee recipient and fee rate up to 10 bps, designate house makers exempt from bonds, and set bond and slash parameters. A compromised key could redirect fees, halt all swaps or sweep dust held by the hook.

Risk to user funds: Users never deposit into the hook; the swapper's tokens move through the pool manager and are settled to the swapper via the delta. The hook transiently holds the pool-side tokens during a swap and approves DarkDesk for transfers, and can sweep residual balances. DarkDesk moves funds between the taker, maker and feeTo, and holds bonds posted by external makers which can be slashed to compensate takers.

Security findings

  • [medium] Owner can sweep hook balances: The owner can call sweep on any token held by the hook, which includes rounding dust and any tokens received through swaps, sending them to an arbitrary address.
  • [medium] Owner controls routing and pausing of trades: The owner can list or delist base tokens, which controls which pools can be initialized, and the DarkDesk owner can pause all fills, blocking swaps through the hook.
  • [medium] Dependence on DarkDesk fee and maker behaviour: The fee is set by DarkDesk and can be raised to 10 bps by its owner, and swap outcomes depend on maker-signed quotes; a defaulting house maker causes the swap to revert, while an external maker default returns zero and reverts the hook with MakerDefaulted.
  • [low] Hook holds funds during swap settlement: The hook temporarily takes tokens from the pool manager and approves DarkDesk for unlimited amounts, so any compromise of DarkDesk would expose hook-held tokens; the hook itself only holds transient balances and rounding dust.
  • [info] Pool initialization restricted to owner: Only the owner (sender) may initialize DarkHooks pools, so pool creation is centralized.

Contract details

Verified source
Yes (DarkHooks)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
10,334 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, ownable, return-delta

Pools using DarkHooks