jb-simplify

0
0
Source

Checklist to simplify Juicebox project designs. Reduce custom contracts by leveraging native protocol mechanics.

Install

mkdir -p .claude/skills/jb-simplify && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6178" && unzip -o skill.zip -d .claude/skills/jb-simplify && rm skill.zip

Installs to .claude/skills/jb-simplify

About this skill

Juicebox V5 Simplification Checklist

Before writing custom contracts, run through this checklist to find simpler solutions.

The Simplification Principle

Native mechanics > Off-the-shelf hooks > Custom hooks > Custom contracts

Every level of abstraction you can avoid:

  • Reduces deployment costs
  • Reduces attack surface
  • Improves UI compatibility
  • Makes the project easier to audit

Pre-Implementation Checklist

1. Do You Need a Custom Pay Hook?

What You WantSimpler Solution
Mint NFTs on paymentUse nana-721-hook-v5 directly
Buy tokens from DEX if cheaperUse nana-buyback-hook-v5 directly
Restrict who can payUse off-chain allowlists or payment metadata
Different tokens per tierUse 721 hook tiers with different prices
Cap individual paymentsConsider if this is actually needed

Only write a custom pay hook if: You need logic that modifies payment recording that no existing hook provides.


2. Do You Need a Custom Cash Out Hook?

What You WantSimpler Solution
Burn NFT to redeemUse nana-721-hook-v5 - it already does this
Pro-rata redemption against surplusSet cashOutTaxRate: 0 - native behavior
Partial redemption (bonding curve)Set cashOutTaxRate to desired value
Time-locked redemptionsUse ruleset with pauseCashOut: true, queue future ruleset
Redemption against external poolThis might actually need a custom hook

Only write a custom cash out hook if: Redemption value must come from somewhere other than project surplus.


3. Do You Need a Custom Split Hook?

What You WantSimpler Solution
Send to multiple addressesUse multiple splits with direct beneficiaries
Send to another JB projectSet projectId in the split
Add to project balance instead of payingSet preferAddToBalance: true
Restrict who can claimSet beneficiary to a multisig/contract
Swap tokens before forwardingYes, need split hook
Add to LP positionYes, need split hook

Only write a custom split hook if: You need to transform tokens or interact with external protocols.


4. Do You Need Multiple Queued Rulesets?

What You WantSimpler Solution
Monthly distributionsOne ruleset with duration: 30 days
Increasing/decreasing token issuanceUse weightCutPercent for automatic issuance cut
Different phases over timeQueue rulesets only for actual changes
Vesting over 12 monthsOne cycling ruleset, NOT 12 queued rulesets

Only queue multiple rulesets if: Configuration actually changes between periods.


5. Do You Need Custom NFT Logic?

What You WantSimpler Solution
NFT minting on paymentUse nana-721-hook-v5 directly
Different prices per tierConfigure tiers in 721 hook
Static artwork per tierUse encodedIPFSUri in tier config
Dynamic/generative artImplement IJB721TokenUriResolver only
Composable/layered NFTsImplement IJB721TokenUriResolver only
On-chain SVGImplement IJB721TokenUriResolver only
Custom minting logicThis might need a custom hook

Only write a custom pay/data hook if: You need to change how the 721 hook processes payments. For custom content, use the resolver interface.

Reference: banny-retail-v5 shows composable NFTs using only a custom resolver.


5b. When DO You Need to Extend 721-Hook?

Extending the 721-hook (not just resolver) is necessary when you need to change treasury mechanics, not just content:

What You WantWhy You Need Custom Delegate
Dynamic cash out weightsRedemption value changes based on outcomes
First-owner trackingRewards go to original minter, not current holder
Phase-based restrictionsDifferent rules during different game phases
On-chain governance for outcomesScorecard voting determines payouts

Reference: defifa-collection-deployer-v5 shows prediction games with dynamic weights.


6. Do You Need a Custom Contract at All?

What You WantSimpler Solution
VestingPayout limits + cycling rulesets
Treasury reserveSurplus allowance
NFT-gated treasury721 hook + native cash outs
Immutable configurationTransfer ownership to burn address
Multi-sig controlSet owner to Safe/multisig
GovernanceUse existing governance frameworks

Simplification Questions

Ask these questions in order. Stop at the first "yes":

For Payments

  1. Can the 721 hook handle this? → Use 721 hook
  2. Can the buyback hook handle this? → Use buyback hook
  3. Can payment metadata + off-chain logic handle this? → Use native pay
  4. → Consider custom pay hook

For Redemptions

  1. Is it just burning NFTs for surplus? → Use 721 hook
  2. Is it just tokens for surplus? → Use native cash out with tax rate
  3. Does value come from project surplus? → Use native cash out
  4. → Consider custom cash out hook

For Distributions

  1. Are recipients just addresses? → Use native splits
  2. Are recipients other JB projects? → Use splits with projectId
  3. Do you need token transformation? → Use split hook
  4. → Consider custom split hook

For Time-Based Logic

  1. Is it recurring at fixed intervals? → Use cycling ruleset
  2. Is it a one-time schedule change? → Queue one future ruleset
  3. Is it conditional on external events? → Consider approval hook
  4. → Consider custom logic

For NFT Content

  1. Is artwork static per tier? → Use encodedIPFSUri in tier config
  2. Need dynamic/generative art? → Implement IJB721TokenUriResolver
  3. Need composable NFTs? → Implement IJB721TokenUriResolver
  4. Need to change minting logic? → Consider wrapping 721 hook

For Games/Predictions

  1. Fixed redemption values per tier? → Use standard 721-hook
  2. Outcome determines payout distribution? → Extend 721-hook (Defifa pattern)
  3. Need on-chain outcome voting? → Add Governor contract
  4. Rewards to original minter only? → Track first-owner in delegate

Common Over-Engineering Mistakes

Mistake 1: Wrapping the 721 Hook

❌ WRONG: Create DataHookWrapper that delegates to 721 hook
✅ RIGHT: Use 721 hook directly, achieve goals via ruleset config

Mistake 2: Vesting Split Hook

❌ WRONG: VestingSplitHook that holds funds and releases over time
✅ RIGHT: Payout limits reset each cycle, achieving the same result

Mistake 3: Queue 12 Rulesets for 12-Month Vesting

❌ WRONG: Queue 12 identical rulesets with different start times
✅ RIGHT: One ruleset with duration: 30 days that cycles automatically

Mistake 4: Split Hook for Simple Forwarding

❌ WRONG: Split hook that just forwards ETH to an address
✅ RIGHT: Set the address as the split beneficiary directly

Mistake 5: Custom Redemption Math

❌ WRONG: Custom hook calculating pro-rata share of surplus
✅ RIGHT: cashOutTaxRate: 0 gives linear redemption natively

Mistake 6: Custom Hook for NFT Artwork

❌ WRONG: Write custom pay hook to generate dynamic NFT metadata
✅ RIGHT: Use 721 hook + custom IJB721TokenUriResolver for content only

Complexity Cost Table

SolutionGas CostAudit RiskUI Support
Native config onlyLowestLowestFull
Off-the-shelf hooksLowLowFull
Custom token URI resolverLowLowFull
Custom split hookMediumMediumPartial
Custom pay hookMediumMediumPartial
Extended 721-hook delegateMedium-HighMedium-HighCustom UI needed
Custom cash out hookHighHighLimited
Full custom systemHighestHighestNone

When Higher Complexity Is Justified

Not all complexity is bad. These patterns justify extending hooks:

PatternJustification
Prediction games (Defifa)Dynamic weights can't be done any other way
Composable NFTs (Banny)Resolver-only keeps treasury mechanics standard
Phase-based gamesRulesets + custom delegate is cleaner than alternatives

Key insight: Extend hooks for treasury mechanics, use resolvers for content only.


Final Checklist

Before finalizing your design, verify:

  • No custom hook where a direct beneficiary works
  • No split hook where multiple native splits work
  • No wrapped data hook where using the hook directly works
  • No multiple queued rulesets where one cycling ruleset works
  • No custom vesting where payout limits work
  • No custom treasury where surplus allowance works
  • No custom redemption where native cash out works
  • No custom pay hook where IJB721TokenUriResolver handles content needs

If all boxes are checked and you still need custom code, proceed with confidence that it's actually necessary.


Related Skills

  • /jb-patterns - Common design patterns with examples
  • /jb-project - Project deployment
  • /jb-pay-hook - When you DO need a custom pay hook
  • /jb-cash-out-hook - When you DO need a custom cash out hook
  • /jb-split-hook - When you DO need a custom split hook

seedream-image-gen

openclaw

Generate images via Seedream API (doubao-seedream models). Synchronous generation.

2359

ffmpeg-cli

openclaw

Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.

6623

context-optimizer

openclaw

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Features intelligent compaction (merging, summarizing, extracting), query-aware relevance scoring, and hierarchical memory system with context archive. Logs optimization events to chat.

3622

a-stock-analysis

openclaw

A股实时行情与分时量能分析。获取沪深股票实时价格、涨跌、成交量,分析分时量能分布(早盘/尾盘放量)、主力动向(抢筹/出货信号)、涨停封单。支持持仓管理和盈亏分析。Use when: (1) 查询A股实时行情, (2) 分析主力资金动向, (3) 查看分时成交量分布, (4) 管理股票持仓, (5) 分析持仓盈亏。

9121

himalaya

openclaw

CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).

7921

garmin-connect

openclaw

Syncs daily health and fitness data from Garmin Connect into markdown files. Provides sleep, activity, heart rate, stress, body battery, HRV, SpO2, and weight data.

7321

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.