HOOKHOOD CONCEPT

SplitStream Hook

Programmable revenue routing for every swap.

2ACTIVE CALLBACKS

Routes a bounded exact-input hook fee into configured PoolManager claim recipients using return-delta accounting.

accountingrevenue
HOOK DNA

Callback permissions

Lifecycle

beforeInitialize○ INACTIVE
afterInitialize○ INACTIVE
beforeAddLiquidity○ INACTIVE
afterAddLiquidity○ INACTIVE
beforeRemoveLiquidity○ INACTIVE
afterRemoveLiquidity○ INACTIVE
beforeSwap● ACTIVE
afterSwap○ INACTIVE
beforeDonate○ INACTIVE
afterDonate○ INACTIVE

Advanced accounting

beforeSwapReturnDelta● ACTIVE
afterSwapReturnDelta○ INACTIVE
afterAddLiquidityReturnDelta○ INACTIVE
afterRemoveLiquidityReturnDelta○ INACTIVE
MECHANISM

Read the control surface.

POOL ACTIONbeforeSwap + beforeSwapReturnDeltaSIGNATURE LAB POLICYPOOLMANAGER ACCOUNTING
SOLIDITY

SplitStreamHook.sol

REFERENCE IMPLEMENTATION. Requires a correctly mined permission address. Compilation and tests are separate status signals.
SplitStreamHook.solSOLIDITY 0.8.26
001// SPDX-License-Identifier: MIT002pragma solidity ^0.8.26;003004import {BaseHook} from "@openzeppelin/uniswap-hooks/src/base/BaseHook.sol";005import {Hooks} from "@uniswap/v4-core/src/libraries/Hooks.sol";006import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";007import {SwapParams} from "@uniswap/v4-core/src/types/PoolOperation.sol";008import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";009import {PoolId, PoolIdLibrary} from "@uniswap/v4-core/src/types/PoolId.sol";010import {Currency, CurrencyLibrary} from "@uniswap/v4-core/src/types/Currency.sol";011import {012    BeforeSwapDelta,013    BeforeSwapDeltaLibrary,014    toBeforeSwapDelta015} from "@uniswap/v4-core/src/types/BeforeSwapDelta.sol";016017/// @title SplitStreamHook018/// @notice Exact-input custom accounting reference that routes a 10 bps fee into ERC-6909 claims.019contract SplitStreamHook is BaseHook {020    using CurrencyLibrary for Currency;021    using PoolIdLibrary for PoolKey;022    error ZeroRecipient();023    error UnsupportedExactOutput();024    error InputTooLarge();025    error InvalidShareTotal();026    uint256 public constant BPS = 10_000;027    uint256 public constant HOOK_FEE_BPS = 10;028    uint256 public constant LP_SHARE = 6_000;029    uint256 public constant CREATOR_SHARE = 2_000;030    uint256 public constant REFERRAL_SHARE = 1_000;031    uint256 public constant PUBLIC_GOODS_SHARE = 1_000;032    address public immutable lpRewardsRecipient;033    address public immutable creatorRecipient;034    address public immutable referralRecipient;035    address public immutable publicGoodsRecipient;036    event StreamSplit(037        PoolId indexed poolId,038        Currency indexed currency,039        uint256 totalFee,040        uint256 lpAmount,041        uint256 creatorAmount,042        uint256 referralAmount,043        uint256 publicGoodsAmount044    );045046    constructor(IPoolManager manager, address lp, address creator, address referral, address publicGoods)047        BaseHook(manager)048    {049        if (lp == address(0) || creator == address(0) || referral == address(0) || publicGoods == address(0)) {050            revert ZeroRecipient();051        }052        if (LP_SHARE + CREATOR_SHARE + REFERRAL_SHARE + PUBLIC_GOODS_SHARE != BPS) revert InvalidShareTotal();053        lpRewardsRecipient = lp;054        creatorRecipient = creator;055        referralRecipient = referral;056        publicGoodsRecipient = publicGoods;057    }058059    function getHookPermissions() public pure override returns (Hooks.Permissions memory) {060        return Hooks.Permissions(061            false, false, false, false, false, false, true, false, false, false, true, false, false, false062        );063    }064065    function _beforeSwap(address, PoolKey calldata key, SwapParams calldata params, bytes calldata)066        internal067        override068        returns (bytes4, BeforeSwapDelta, uint24)069    {070        if (params.amountSpecified >= 0) revert UnsupportedExactOutput();071        uint256 input = _abs(params.amountSpecified);072        (uint256 fee, uint256 lp, uint256 creator, uint256 referral, uint256 publicGoods) = previewSplit(input);073        if (fee == 0) return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);074        if (fee > uint256(uint128(type(int128).max))) revert InputTooLarge();075        Currency currency = params.zeroForOne ? key.currency0 : key.currency1;076        uint256 id = currency.toId();077        if (lp > 0) poolManager.mint(lpRewardsRecipient, id, lp);078        if (creator > 0) poolManager.mint(creatorRecipient, id, creator);079        if (referral > 0) poolManager.mint(referralRecipient, id, referral);080        if (publicGoods > 0) poolManager.mint(publicGoodsRecipient, id, publicGoods);081        emit StreamSplit(key.toId(), currency, fee, lp, creator, referral, publicGoods);082        return (BaseHook.beforeSwap.selector, toBeforeSwapDelta(int128(int256(fee)), 0), 0);083    }084085    function previewSplit(uint256 input)086        public087        pure088        returns (uint256 fee, uint256 lp, uint256 creator, uint256 referral, uint256 publicGoods)089    {090        fee = input * HOOK_FEE_BPS / BPS;091        lp = fee * LP_SHARE / BPS;092        creator = fee * CREATOR_SHARE / BPS;093        referral = fee * REFERRAL_SHARE / BPS;094        publicGoods = fee - lp - creator - referral;095    }096097    function _abs(int256 value) internal pure returns (uint256) {098        if (value >= 0) return uint256(value);099        unchecked {100            return uint256(-(value + 1)) + 1;101        }102    }103}104
DEVELOPMENT STATUS

Evidence, not implication.

concept● PASS
reference Code● PASS
compile● PASS
unit Tests● PASS
fuzz Tests● PASS
invariant Tests● PASS
fork Tested○ NOT VERIFIED
external Audit○ NOT VERIFIED
testnet Deployment○ NOT VERIFIED
mainnet Deployment○ NOT VERIFIED
DEPLOYMENTS

Onchain records

NO MAINNET DEPLOYMENT. No testnet deployment metadata has been exported.
SECURITY

Trust no badge blindly.

A compiled contract is not necessarily safe. Tests are not an audit. A verified source can still contain exploitable logic.

  • Review permission bits and constructor configuration.
  • Model custom accounting and rounding independently.
  • Require fork, testnet, independent review, and audit evidence before real assets.
CHANGELOG

Reference history

2026-08-14 — Initial HookHood registry entry. No deployed revisions recorded.