Hook Bazaar solves 9 critical market failures in the Uniswap v4 ecosystem:
- No marketplace for hooks — Supply and demand exist but no mechanism connects them
- High barriers to entry — Custom hooks cost $10k–$100k+ and take weeks/months to develop
- No developer incentives — No monetization model or audience for hook developers
- Lack of standardization — No way to objectively evaluate hook safety or correctness
- No hook composition — Cannot safely combine multiple hooks despite v4 support
- No competition mechanism — Best hooks don't naturally rise to the top
- No IP protection — Public code prevents premium algorithm development
- No reputation system — High adoption risk due to lack of trust signals
- Unsustainable economics — No revenue model to support ecosystem growth
Result: Despite Uniswap v4's powerful hooks primitive, the ecosystem lacks the infrastructure to enable widespread adoption and sustainable development.
📖 Read the full Problem Description for detailed analysis of each market failure and how Hook Bazaar solves them.
Hook Bazaar is a decentralized marketplace and infrastructure layer for Uniswap v4 hooks that:
- For Developers: Direct monetization (flat/revenue-share/hybrid), professional reputation profiles, IP protection via FHE
- For Protocols: Instant deployment (minutes vs weeks), lower costs ($100s vs $10k+), pre-audited hooks, multi-hook composition
- For Ecosystem: Self-sustaining economic model, quality through competition, accelerated v4 adoption
- Centralized Discovery Layer: Connects hook supply with protocol demand
- Ready-Made Hooks: Reduces deployment time from weeks to minutes
- Direct Monetization: Fixed-price, revenue-share, or hybrid licensing models
- Mathematical Specifications: Hook Specification Format for objective behavior verification
- MasterHook Diamond: Safe multi-hook composition with selector-level routing
Encrypts hook implementations on-chain to prevent bytecode decompilation and IP theft.
- Encrypted type wrappers (
EPoolKey,ESwapParams,EBalanceDelta) - Plaintext ↔ encrypted boundary at
CoFHEHookcontract - Authorized verifier access for AVS sampling
Provides cryptoeconomic guarantees for hook specification compliance via staked operators.
HookAttestationTaskManager: Task creation and response handlingHookAttestationServiceManager: Operator registration and slashing- Challenge mechanism with 50% slash for false positives, 30% for false negatives
- Off-chain operator runtime for state sampling and compliance checking
AVS Integration Spec | Operator Runtime
- Hook developers: IP protection, monetization, reputation building
- Protocol designers: Instant deployment, lower costs, pre-verified hooks
- Ecosystem: Self-sustaining economics, quality improvement through competition
flowchart TB
subgraph HookBazaar["Hook Bazaar System"]
ProtocolPkg["protocol-pkg"]
HooksOperatorAVS["hooks-operator-avs"]
HookPkg["hook-pkg"]
MasterHookPkg["master-hook-pkg"]
end
ProtocolAdmin["Protocol Admin"] -->|"create_protocol\ncreate_pool"| ProtocolPkg
HookDeveloper["Hook Developer"] -->|"commitToHookSpec"| HookPkg
AVSOperator["AVS Operator"] -->|"respondToTask"| HooksOperatorAVS
ProtocolPkg -->|"initialize"| UniswapV4["Uniswap V4"]
HooksOperatorAVS -->|"register/slash"| EigenLayer["EigenLayer"]
HookPkg -->|"fetch spec"| IPFS["IPFS"]
HookPkg -.->|"encrypted"| Fhenix["Fhenix CoFHE"]
Goal: Define environment boundary between Hook Bazaar and external systems (Uniswap V4, EigenLayer, IPFS, Fhenix).
| Package | Purpose |
|---|---|
protocol-pkg |
Protocol lifecycle management for pool administration |
hooks-operator-avs |
EigenLayer AVS for hook specification attestation |
hook-pkg |
Hook development, marketplace, and IP protection |
master-hook-pkg |
Diamond-pattern multi-hook composition |
operator/ |
Off-chain attestation task processing runtime |
| Dimension | Bonded Hooks | Hook Bazaar |
|---|---|---|
| Primary Focus | Low-code composition | IP-protected marketplace |
| Target User | Pool admins | Hook developers |
| Verification | Centralized AVS | Decentralized EigenLayer AVS |
| IP Model | Open source | Encrypted implementations |
Key Differentiator: Hook Bazaar provides mathematical specification verification with cryptoeconomic guarantees (slashing).
Full Comparison | Operator EigenLayer Integration
- Node.js v18+
- Foundry
npm install
forge install
forge build# Run implemented tests only (excludes placeholder test files)
make test-implemented
# Run fork tests (requires ALCHEMY_API_KEY env var)
make test-fork
# Run all tests including placeholders
forge testNote: Some test files in
contracts/test/are placeholders for future implementation (e.g.,hook-pkg/,hooks-operator-avs/). Usemake test-implementedfor actual test coverage.
cd operator && npm test# Terminal 1
anvil
# Terminal 2
cd operator
npm install
npx tsx integration/runSimulation.ts# Frontend
npm run dev
# Frontend runs on: http://localhost:3000
# Operator (dry-run mode)
cd operator
cp .env.example .env
anvil # on separate terminal
npm startOperator Constraints:
- Dry-run mode only (on-chain contracts not yet deployed)
- Uses mock state sampler (real IHookStateView pending)
- BLS signatures and multi-operator consensus pending EigenLayer integration
See operator/README.md for full documentation.
