[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6Q471RJCFEJC6HDEYSWN5H5":3,"skill-same:01M6Q471RJCFEJC6HDEYSWN5H5":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6Q471RJCFEJC6HDEYSWN5H5","jb-omnichain-payout-limits",null,"Omnichain projects have per-chain payout limits, not aggregate limits. This is a fundamental\nconstraint with no perfect solution. Use when: (1) user wants a fixed total fundraising cap\nacross chains, (2) asking about aggregate payout limits on omnichain projects, (3) designing\nomnichain projects with payout constraints, (4) exploring oracle or monitoring solutions for\ncross-chain state. Covers the limitation, why it exists, and practical approaches with tradeoffs.","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F视觉与设计\u002Fjuicy\u002Fjb-omnichain-payout-limits\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"limits","jb omnichain payout limits","across","constraint","for","with","about","it","chain","fundraising","oracle","practical","cap","use","cross-chain","user","projects","why","monitoring","state","2026-11-10 10:12:30",false,"---\nname: jb-omnichain-payout-limits\ndescription: |\n  Omnichain projects have per-chain payout limits, not aggregate limits. This is a fundamental\n  constraint with no perfect solution. Use when: (1) user wants a fixed total fundraising cap\n  across chains, (2) asking about aggregate payout limits on omnichain projects, (3) designing\n  omnichain projects with payout constraints, (4) exploring oracle or monitoring solutions for\n  cross-chain state. Covers the limitation, why it exists, and practical approaches with tradeoffs.\n---\n\n# Omnichain Payout Limit Constraints\n\n> **Note**: This applies to projects using payout limits (standard Juicebox projects with treasury distributions). Revnets don't use payout limits - they use unlimited surplus allowances for loans via REVLoans, so this limitation doesn't affect them.\n\n## The Problem\n\n**Payout limits in Juicebox V5 are per-chain, not aggregate.**\n\nWhen you deploy an omnichain project (linked via Suckers), each chain has its own independent payout limit. Setting a 10 ETH payout limit on a 5-chain project means you could potentially pay out 50 ETH total (10 ETH × 5 chains), not 10 ETH total.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Omnichain Project with 10 ETH \"Payout Limit\"                       │\n│                                                                     │\n│  Chain 1 (Ethereum):  Limit = 10 ETH  →  Can pay out 10 ETH        │\n│  Chain 2 (Optimism):  Limit = 10 ETH  →  Can pay out 10 ETH        │\n│  Chain 3 (Base):      Limit = 10 ETH  →  Can pay out 10 ETH        │\n│  Chain 4 (Arbitrum):  Limit = 10 ETH  →  Can pay out 10 ETH        │\n│                                          ─────────────────         │\n│                                          TOTAL: 40 ETH possible    │\n│                                                                     │\n│  User expectation: 10 ETH max                                       │\n│  Reality: 40 ETH max                                                │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n## Why This Is Fundamentally Hard\n\nCross-chain state is **asynchronous**. There is no atomic way to know the aggregate raised\u002Fpaid across all chains in real-time.\n\nAny solution that coordinates cross-chain state introduces:\n- **Latency**: Not real-time (seconds to minutes of delay)\n- **Trust assumptions**: Who runs the oracle? Who can manipulate it?\n- **Manipulation windows**: Attackers can exploit sync delays\n- **Gas costs**: Cross-chain messaging is expensive\n- **Complexity**: More moving parts = more failure modes\n\nThis is not a bug in Juicebox - it's a fundamental property of multi-chain systems.\n\n## Approaches\n\n### Approach 1: Accept & Design Around It\n\n**Best for**: Projects where approximate limits are acceptable\n\nSet per-chain limits that sum to your target, accepting that distribution may not match expectations.\n\n```solidity\n\u002F\u002F Goal: ~100 ETH total across 5 chains\n\u002F\u002F Strategy: 20 ETH limit per chain\n\n\u002F\u002F Each chain's ruleset config:\nfundAccessLimitGroups: [{\n    terminal: MULTI_TERMINAL,\n    token: NATIVE_TOKEN,\n    payoutLimits: [{\n        amount: 20 ether,  \u002F\u002F Per-chain limit\n        currency: 1        \u002F\u002F ETH\n    }],\n    surplusAllowances: []\n}]\n```\n\n**Tradeoffs**:\n- One chain might hit its limit while others have slack\n- Total raised could be less than desired if distribution is uneven\n- No coordination required - simplest approach\n\n**When to use**:\n- Soft caps (nice-to-have limits, not hard requirements)\n- Projects where ~80-120% of target is acceptable\n- Early-stage projects testing omnichain\n\n---\n\n### Approach 2: Monitoring + Manual Pause\n\n**Best for**: Projects with active operators who can respond quickly\n\nUse Bendystraw to monitor aggregate raises, manually pause payments when approaching threshold.\n\n```typescript\nconst BENDYSTRAW_API = 'https:\u002F\u002Fbendystraw.xyz\u002F{API_KEY}\u002Fgraphql';\n\n\u002F\u002F Query aggregate balance across all chains\nasync function getAggregateBalance(suckerGroupId: string) {\n  const query = `\n    query($id: String!) {\n      suckerGroup(id: $id) {\n        balance\n        volume\n        projects_rel {\n          chainId\n          balance\n        }\n      }\n    }\n  `;\n\n  const data = await fetch(BENDYSTRAW_API, {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify({ query, variables: { id: suckerGroupId } })\n  }).then(r => r.json());\n\n  return data.data.suckerGroup;\n}\n\n\u002F\u002F Monitoring loop\nasync function monitorAndAlert(suckerGroupId: string, threshold: bigint) {\n  const group = await getAggregateBalance(suckerGroupId);\n  const balance = BigInt(group.balance);\n\n  if (balance >= threshold * 90n \u002F 100n) {\n    \u002F\u002F 90% of threshold - send alert\n    console.log('ALERT: Approaching threshold, consider pausing');\n  }\n\n  if (balance >= threshold) {\n    \u002F\u002F At threshold - operator should pause\n    console.log('THRESHOLD REACHED: Pause payments now');\n    \u002F\u002F Could trigger notification (email, Telegram, Discord webhook)\n  }\n}\n```\n\n**Manual pause action**:\n```typescript\n\u002F\u002F Project owner calls on each chain\nawait controller.queueRulesetsOf(projectId, [{\n  \u002F\u002F ... existing config\n  metadata: {\n    \u002F\u002F ... existing metadata\n    pausePay: true  \u002F\u002F Disable new payments\n  }\n}]);\n```\n\n**Tradeoffs**:\n- Requires active monitoring (someone watching)\n- Reaction time matters - payments during delay\n- Human error risk (forget to pause, pause wrong chain)\n- Not suitable for trustless\u002Fautonomous projects\n\n**When to use**:\n- Projects with dedicated operators\n- Lower stakes where brief overruns are acceptable\n- Transitional approach while building automation\n\n---\n\n### Approach 3: Automated Cron + Relayr\n\n**Best for**: Projects wanting automation without full oracle complexity\n\nA cron job monitors aggregate balance via Bendystraw, uses Relayr to pause payments across all chains when threshold approaches.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Automated Threshold Monitor                                        │\n│                                                                     │\n│  ┌──────────────┐     ┌──────────────┐     ┌──────────────┐        │\n│  │   Cron Job   │────►│  Bendystraw  │────►│  Check       │        │\n│  │  (every 5m)  │     │    Query     │     │  Threshold   │        │\n│  └──────────────┘     └──────────────┘     └──────┬───────┘        │\n│                                                   │                 │\n│                                    threshold met? │                 │\n│                                                   ▼                 │\n│  ┌──────────────────────────────────────────────────────────┐      │\n│  │  Relayr Bundle: Pause payments on all chains             │      │\n│  │                                                          │      │\n│  │  Chain 1: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  │  Chain 2: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  │  Chain 3: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  │  Chain 4: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  └──────────────────────────────────────────────────────────┘      │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n**Implementation requirements**:\n1. **Operator address**: Needs `QUEUE_RULESETS` permission on each chain's project\n2. **Cron infrastructure**: Reliable job runner (AWS Lambda, Cloudflare Workers, dedicated server)\n3. **Bendystraw API key**: For querying aggregate state\n4. **Relayr integration**: For multi-chain transaction bundling\n\n```typescript\n\u002F\u002F Simplified cron handler\nasync function checkAndPauseIfNeeded(config: {\n  suckerGroupId: string;\n  threshold: bigint;\n  projectIds: { chainId: number; projectId: number }[];\n  operatorKey: string;\n}) {\n  \u002F\u002F 1. Check aggregate balance\n  const group = await getAggregateBalance(config.suckerGroupId);\n  const balance = BigInt(group.balance);\n\n  if (balance \u003C config.threshold) {\n    return; \u002F\u002F Under threshold, do nothing\n  }\n\n  \u002F\u002F 2. Build pause transactions for each chain\n  const pauseTxs = config.projectIds.map(({ chainId, projectId }) => ({\n    chain: chainId,\n    target: CONTROLLER_ADDRESSES[chainId],\n    data: encodeFunctionData({\n      abi: JB_CONTROLLER_ABI,\n      functionName: 'queueRulesetsOf',\n      args: [projectId, \u002F* rulesetConfigs with pausePay: true *\u002F]\n    }),\n    value: '0'\n  }));\n\n  \u002F\u002F 3. Submit via Relayr\n  const bundle = await relayr.createBundle(pauseTxs);\n  await relayr.payForBundle(bundle, config.operatorKey);\n\n  console.log(`Paused payments across ${config.projectIds.length} chains`);\n}\n```\n\n**Tradeoffs**:\n- **Latency**: 5-minute cron + Relayr execution time = potential overshoot\n- **Trust**: Operator key holder can act unilaterally\n- **Infrastructure**: Requires running and maintaining a service\n- **Cost**: Relayr fees + gas on all chains\n- **Reliability**: Cron failures = missed threshold\n\n**When to use**:\n- Projects with some trust in a designated operator\n- Soft caps where ~5-10% overshoot is acceptable\n- Projects without resources for full oracle implementation\n\n---\n\n### Approach 4: Oracle in Pay Hook\n\n**Best for**: Projects requiring hard limits with strong guarantees\n\nA pay hook checks an oracle for aggregate state before allowing payments. The oracle is updated by a relayer watching all chains.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Oracle-Based Aggregate Limit                                       │\n│                                                                     │\n│  ┌─────────────────────────────────────────────────────────────┐   │\n│  │  Oracle Contract (deployed on each chain)                    │   │\n│  │  ├── aggregateBalance: uint256 (updated by relayer)         │   │\n│  │  ├── threshold: uint256                                      │   │\n│  │  └── lastUpdate: uint256 (timestamp)                        │   │\n│  └─────────────────────────────────────────────────────────────┘   │\n│                           ▲                                         │\n│                           │ update                                  │\n│  ┌────────────────────────┴────────────────────────────────────┐   │\n│  │  Relayer Service                                             │   │\n│  │  ├── Watches PayEvents on all chains                        │   │\n│  │  ├── Calculates aggregate balance                           │   │\n│  │  └── Updates oracle on all chains                           │   │\n│  └─────────────────────────────────────────────────────────────┘   │\n│                                                                     │\n│  Pay Flow:                                                          │\n│  User → pay() → PayHook.beforePayRecordedWith() → Oracle.check()   │\n│                                                                     │\n│  If oracle.aggregateBalance + payAmount > threshold:                │\n│     REVERT \"Aggregate limit exceeded\"                              │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n**Implementation sketch**:\n\n```solidity\n\u002F\u002F Oracle contract\ncontract AggregateBalanceOracle {\n    uint256 public aggregateBalance;\n    uint256 public threshold;\n    uint256 public lastUpdate;\n    address public relayer;\n\n    function updateBalance(uint256 newBalance) external {\n        require(msg.sender == relayer, \"UNAUTHORIZED\");\n        aggregateBalance = newBalance;\n        lastUpdate = block.timestamp;\n    }\n\n    function wouldExceedThreshold(uint256 additionalAmount) external view returns (bool) {\n        return aggregateBalance + additionalAmount > threshold;\n    }\n}\n\n\u002F\u002F Pay hook that checks oracle\ncontract AggregateLimitPayHook is IJBPayHook {\n    AggregateBalanceOracle public oracle;\n    uint256 public maxStaleness = 5 minutes;\n\n    function beforePayRecordedWith(JBBeforePayRecordedContext calldata context)\n        external view override returns (uint256, uint256, uint256, JBPayHookSpecification[] memory)\n    {\n        \u002F\u002F Check oracle freshness\n        require(\n            block.timestamp - oracle.lastUpdate() \u003C= maxStaleness,\n            \"Oracle stale\"\n        );\n\n        \u002F\u002F Check aggregate limit\n        require(\n            !oracle.wouldExceedThreshold(context.amount.value),\n            \"Aggregate limit exceeded\"\n        );\n\n        \u002F\u002F Allow payment\n        return (context.weight, context.newlyIssuedTokenCount, context.totalSupply, new JBPayHookSpecification[](0));\n    }\n}\n```\n\n**Tradeoffs**:\n- **Complexity**: Multiple contracts + relayer service\n- **Latency**: Oracle updates lag behind reality\n- **Staleness window**: Payments during oracle delay can exceed limit\n- **Relayer trust**: Single point of failure\u002Fmanipulation\n- **Cost**: Continuous relayer operation + oracle update gas\n- **UX**: Payments can fail if oracle is stale or near threshold\n\n**When to use**:\n- Hard regulatory\u002Fcompliance limits that must be enforced\n- High-stakes projects where overshoot is unacceptable\n- Projects with resources to build and maintain infrastructure\n\n**Current status**: No off-the-shelf implementation exists. Would need custom development.\n\n---\n\n### Approach 5: Single-Chain Treasury\n\n**Best for**: Projects that can centralize treasury operations\n\nAccept payments on all chains, but bridge all funds to a single \"home\" chain for treasury operations. Payout limit on home chain is the only one that matters.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Single-Chain Treasury Pattern                                      │\n│                                                                     │\n│  Chain 1 (Home): Treasury lives here                               │\n│  ├── Payout limit: 100 ETH (THIS IS THE REAL LIMIT)               │\n│  ├── Accepts payments                                               │\n│  └── All payouts happen here                                       │\n│                                                                     │\n│  Chain 2-4: Payment collection only                                │\n│  ├── Payout limit: 0 (no direct payouts)                           │\n│  ├── Accept payments                                                │\n│  └── Funds bridged to Chain 1 via Suckers                          │\n│                                                                     │\n│  Flow:                                                              │\n│  User pays on Chain 2 → Tokens issued on Chain 2                   │\n│                       → User bridges funds to Chain 1 (manual)     │\n│                       → Chain 1 treasury grows                     │\n│                       → Payouts from Chain 1 only                  │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n**The blocker**: Suckers require explicit user action to bridge. The project cannot automatically sweep funds from other chains to the home chain. Users must:\n1. Call `prepare()` on the source chain\n2. Wait for bridging\n3. Call `claim()` on the destination chain\n\n**Potential workarounds**:\n- Incentivize users to bridge (bonus tokens, lower fees on home chain)\n- Build a \"sweeper\" bot that bridges on behalf of users (requires trust + gas)\n- Accept that some funds remain distributed\n\n**Tradeoffs**:\n- **User friction**: Extra steps to bridge funds\n- **Fragmentation**: Funds spread across chains until bridged\n- **Complexity**: Users must understand the pattern\n- **Cannot enforce**: Can't force users to bridge\n\n**When to use**:\n- Projects where most activity naturally happens on one chain\n- Projects willing to accept some treasury fragmentation\n- Transitional approach for projects moving toward single-chain\n\n---\n\n## Comparison Matrix\n\n| Approach | Enforcement | Latency | Trust Required | Complexity | Best For |\n|----------|-------------|---------|----------------|------------|----------|\n| Accept & Design | Soft | N\u002FA | None | Low | Soft caps |\n| Manual Monitoring | Soft | Minutes | Operator | Low | Active teams |\n| Cron + Relayr | Soft | ~5-10 min | Operator | Medium | Automation |\n| Oracle Pay Hook | Hard* | Seconds | Relayer | High | Compliance |\n| Single-Chain | Medium | N\u002FA | None | Medium | Centralized ops |\n\n*Oracle enforcement has latency window during updates\n\n---\n\n## Recommendations by Use Case\n\n### \"We need a hard cap for regulatory compliance\"\n**Answer**: This is very difficult in omnichain. Consider:\n1. Single-chain only (no omnichain)\n2. Oracle pay hook (complex, custom development)\n3. Accept that enforcement is approximate\n\n### \"We want a fundraising goal but it's not legally binding\"\n**Answer**: Use Approach 1 (Accept & Design) or Approach 2 (Manual Monitoring)\n- Set per-chain limits that sum to ~80% of your goal\n- Monitor via Bendystraw\n- Pause manually when approaching target\n\n### \"We have an operator who can manage this\"\n**Answer**: Use Approach 3 (Cron + Relayr)\n- Automate the monitoring and pausing\n- Accept 5-10% potential overshoot\n- Ensure operator key security\n\n### \"We're building a revnet\"\n**Answer**: This limitation doesn't apply to revnets\n- Revnets don't use payout limits - they use surplus allowances for loans (via REVLoans)\n- Surplus allowances are unlimited by design (for loan collateral access)\n- If you need aggregate fundraising caps on a revnet, see the oracle or monitoring approaches above\n\n---\n\n## Future Considerations\n\n### Could Juicebox natively support aggregate limits?\n\nTheoretically, but it would require:\n1. **Cross-chain messaging protocol**: Native integration with bridges\n2. **Consensus on aggregate state**: Which chain is source of truth?\n3. **Latency acceptance**: Users accept payments may fail during sync\n4. **Cost distribution**: Who pays for cross-chain messages?\n\nThis is a significant protocol-level change, not a simple feature add.\n\n### Could a shared oracle service exist?\n\nYes - a community-run oracle service could:\n- Watch all Juicebox projects across chains\n- Provide aggregate state queries\n- Update on-chain oracles\n\nThis could be built as infrastructure, but requires:\n- Ongoing operational funding\n- Trust in the service operator\n- Integration with pay hooks\n\n---\n\n## Related Skills\n\n- `\u002Fjb-omnichain-ui` - Building omnichain frontends\n- `\u002Fjb-suckers` - Cross-chain token bridging mechanics\n- `\u002Fjb-bendystraw` - Querying aggregate project data\n- `\u002Fjb-relayr` - Multi-chain transaction bundling\n- `\u002Fjb-fund-access-limits` - Per-chain payout limit configuration\n","# Omnichain Payout Limit Constraints\n\n> **Note**: This applies to projects using payout limits (standard Juicebox projects with treasury distributions). Revnets don't use payout limits - they use unlimited surplus allowances for loans via REVLoans, so this limitation doesn't affect them.\n\n## The Problem\n\n**Payout limits in Juicebox V5 are per-chain, not aggregate.**\n\nWhen you deploy an omnichain project (linked via Suckers), each chain has its own independent payout limit. Setting a 10 ETH payout limit on a 5-chain project means you could potentially pay out 50 ETH total (10 ETH × 5 chains), not 10 ETH total.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Omnichain Project with 10 ETH \"Payout Limit\"                       │\n│                                                                     │\n│  Chain 1 (Ethereum):  Limit = 10 ETH  →  Can pay out 10 ETH        │\n│  Chain 2 (Optimism):  Limit = 10 ETH  →  Can pay out 10 ETH        │\n│  Chain 3 (Base):      Limit = 10 ETH  →  Can pay out 10 ETH        │\n│  Chain 4 (Arbitrum):  Limit = 10 ETH  →  Can pay out 10 ETH        │\n│                                          ─────────────────         │\n│                                          TOTAL: 40 ETH possible    │\n│                                                                     │\n│  User expectation: 10 ETH max                                       │\n│  Reality: 40 ETH max                                                │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n## Why This Is Fundamentally Hard\n\nCross-chain state is **asynchronous**. There is no atomic way to know the aggregate raised\u002Fpaid across all chains in real-time.\n\nAny solution that coordinates cross-chain state introduces:\n- **Latency**: Not real-time (seconds to minutes of delay)\n- **Trust assumptions**: Who runs the oracle? Who can manipulate it?\n- **Manipulation windows**: Attackers can exploit sync delays\n- **Gas costs**: Cross-chain messaging is expensive\n- **Complexity**: More moving parts = more failure modes\n\nThis is not a bug in Juicebox - it's a fundamental property of multi-chain systems.\n\n## Approaches\n\n### Approach 1: Accept & Design Around It\n\n**Best for**: Projects where approximate limits are acceptable\n\nSet per-chain limits that sum to your target, accepting that distribution may not match expectations.\n\n```solidity\n\u002F\u002F Goal: ~100 ETH total across 5 chains\n\u002F\u002F Strategy: 20 ETH limit per chain\n\n\u002F\u002F Each chain's ruleset config:\nfundAccessLimitGroups: [{\n    terminal: MULTI_TERMINAL,\n    token: NATIVE_TOKEN,\n    payoutLimits: [{\n        amount: 20 ether,  \u002F\u002F Per-chain limit\n        currency: 1        \u002F\u002F ETH\n    }],\n    surplusAllowances: []\n}]\n```\n\n**Tradeoffs**:\n- One chain might hit its limit while others have slack\n- Total raised could be less than desired if distribution is uneven\n- No coordination required - simplest approach\n\n**When to use**:\n- Soft caps (nice-to-have limits, not hard requirements)\n- Projects where ~80-120% of target is acceptable\n- Early-stage projects testing omnichain\n\n---\n\n### Approach 2: Monitoring + Manual Pause\n\n**Best for**: Projects with active operators who can respond quickly\n\nUse Bendystraw to monitor aggregate raises, manually pause payments when approaching threshold.\n\n```typescript\nconst BENDYSTRAW_API = 'https:\u002F\u002Fbendystraw.xyz\u002F{API_KEY}\u002Fgraphql';\n\n\u002F\u002F Query aggregate balance across all chains\nasync function getAggregateBalance(suckerGroupId: string) {\n  const query = `\n    query($id: String!) {\n      suckerGroup(id: $id) {\n        balance\n        volume\n        projects_rel {\n          chainId\n          balance\n        }\n      }\n    }\n  `;\n\n  const data = await fetch(BENDYSTRAW_API, {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify({ query, variables: { id: suckerGroupId } })\n  }).then(r => r.json());\n\n  return data.data.suckerGroup;\n}\n\n\u002F\u002F Monitoring loop\nasync function monitorAndAlert(suckerGroupId: string, threshold: bigint) {\n  const group = await getAggregateBalance(suckerGroupId);\n  const balance = BigInt(group.balance);\n\n  if (balance >= threshold * 90n \u002F 100n) {\n    \u002F\u002F 90% of threshold - send alert\n    console.log('ALERT: Approaching threshold, consider pausing');\n  }\n\n  if (balance >= threshold) {\n    \u002F\u002F At threshold - operator should pause\n    console.log('THRESHOLD REACHED: Pause payments now');\n    \u002F\u002F Could trigger notification (email, Telegram, Discord webhook)\n  }\n}\n```\n\n**Manual pause action**:\n```typescript\n\u002F\u002F Project owner calls on each chain\nawait controller.queueRulesetsOf(projectId, [{\n  \u002F\u002F ... existing config\n  metadata: {\n    \u002F\u002F ... existing metadata\n    pausePay: true  \u002F\u002F Disable new payments\n  }\n}]);\n```\n\n**Tradeoffs**:\n- Requires active monitoring (someone watching)\n- Reaction time matters - payments during delay\n- Human error risk (forget to pause, pause wrong chain)\n- Not suitable for trustless\u002Fautonomous projects\n\n**When to use**:\n- Projects with dedicated operators\n- Lower stakes where brief overruns are acceptable\n- Transitional approach while building automation\n\n---\n\n### Approach 3: Automated Cron + Relayr\n\n**Best for**: Projects wanting automation without full oracle complexity\n\nA cron job monitors aggregate balance via Bendystraw, uses Relayr to pause payments across all chains when threshold approaches.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Automated Threshold Monitor                                        │\n│                                                                     │\n│  ┌──────────────┐     ┌──────────────┐     ┌──────────────┐        │\n│  │   Cron Job   │────►│  Bendystraw  │────►│  Check       │        │\n│  │  (every 5m)  │     │    Query     │     │  Threshold   │        │\n│  └──────────────┘     └──────────────┘     └──────┬───────┘        │\n│                                                   │                 │\n│                                    threshold met? │                 │\n│                                                   ▼                 │\n│  ┌──────────────────────────────────────────────────────────┐      │\n│  │  Relayr Bundle: Pause payments on all chains             │      │\n│  │                                                          │      │\n│  │  Chain 1: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  │  Chain 2: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  │  Chain 3: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  │  Chain 4: queueRulesetsOf(projectId, {pausePay: true})  │      │\n│  └──────────────────────────────────────────────────────────┘      │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n**Implementation requirements**:\n1. **Operator address**: Needs `QUEUE_RULESETS` permission on each chain's project\n2. **Cron infrastructure**: Reliable job runner (AWS Lambda, Cloudflare Workers, dedicated server)\n3. **Bendystraw API key**: For querying aggregate state\n4. **Relayr integration**: For multi-chain transaction bundling\n\n```typescript\n\u002F\u002F Simplified cron handler\nasync function checkAndPauseIfNeeded(config: {\n  suckerGroupId: string;\n  threshold: bigint;\n  projectIds: { chainId: number; projectId: number }[];\n  operatorKey: string;\n}) {\n  \u002F\u002F 1. Check aggregate balance\n  const group = await getAggregateBalance(config.suckerGroupId);\n  const balance = BigInt(group.balance);\n\n  if (balance \u003C config.threshold) {\n    return; \u002F\u002F Under threshold, do nothing\n  }\n\n  \u002F\u002F 2. Build pause transactions for each chain\n  const pauseTxs = config.projectIds.map(({ chainId, projectId }) => ({\n    chain: chainId,\n    target: CONTROLLER_ADDRESSES[chainId],\n    data: encodeFunctionData({\n      abi: JB_CONTROLLER_ABI,\n      functionName: 'queueRulesetsOf',\n      args: [projectId, \u002F* rulesetConfigs with pausePay: true *\u002F]\n    }),\n    value: '0'\n  }));\n\n  \u002F\u002F 3. Submit via Relayr\n  const bundle = await relayr.createBundle(pauseTxs);\n  await relayr.payForBundle(bundle, config.operatorKey);\n\n  console.log(`Paused payments across ${config.projectIds.length} chains`);\n}\n```\n\n**Tradeoffs**:\n- **Latency**: 5-minute cron + Relayr execution time = potential overshoot\n- **Trust**: Operator key holder can act unilaterally\n- **Infrastructure**: Requires running and maintaining a service\n- **Cost**: Relayr fees + gas on all chains\n- **Reliability**: Cron failures = missed threshold\n\n**When to use**:\n- Projects with some trust in a designated operator\n- Soft caps where ~5-10% overshoot is acceptable\n- Projects without resources for full oracle implementation\n\n---\n\n### Approach 4: Oracle in Pay Hook\n\n**Best for**: Projects requiring hard limits with strong guarantees\n\nA pay hook checks an oracle for aggregate state before allowing payments. The oracle is updated by a relayer watching all chains.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Oracle-Based Aggregate Limit                                       │\n│                                                                     │\n│  ┌─────────────────────────────────────────────────────────────┐   │\n│  │  Oracle Contract (deployed on each chain)                    │   │\n│  │  ├── aggregateBalance: uint256 (updated by relayer)         │   │\n│  │  ├── threshold: uint256                                      │   │\n│  │  └── lastUpdate: uint256 (timestamp)                        │   │\n│  └─────────────────────────────────────────────────────────────┘   │\n│                           ▲                                         │\n│                           │ update                                  │\n│  ┌────────────────────────┴────────────────────────────────────┐   │\n│  │  Relayer Service                                             │   │\n│  │  ├── Watches PayEvents on all chains                        │   │\n│  │  ├── Calculates aggregate balance                           │   │\n│  │  └── Updates oracle on all chains                           │   │\n│  └─────────────────────────────────────────────────────────────┘   │\n│                                                                     │\n│  Pay Flow:                                                          │\n│  User → pay() → PayHook.beforePayRecordedWith() → Oracle.check()   │\n│                                                                     │\n│  If oracle.aggregateBalance + payAmount > threshold:                │\n│     REVERT \"Aggregate limit exceeded\"                              │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n**Implementation sketch**:\n\n```solidity\n\u002F\u002F Oracle contract\ncontract AggregateBalanceOracle {\n    uint256 public aggregateBalance;\n    uint256 public threshold;\n    uint256 public lastUpdate;\n    address public relayer;\n\n    function updateBalance(uint256 newBalance) external {\n        require(msg.sender == relayer, \"UNAUTHORIZED\");\n        aggregateBalance = newBalance;\n        lastUpdate = block.timestamp;\n    }\n\n    function wouldExceedThreshold(uint256 additionalAmount) external view returns (bool) {\n        return aggregateBalance + additionalAmount > threshold;\n    }\n}\n\n\u002F\u002F Pay hook that checks oracle\ncontract AggregateLimitPayHook is IJBPayHook {\n    AggregateBalanceOracle public oracle;\n    uint256 public maxStaleness = 5 minutes;\n\n    function beforePayRecordedWith(JBBeforePayRecordedContext calldata context)\n        external view override returns (uint256, uint256, uint256, JBPayHookSpecification[] memory)\n    {\n        \u002F\u002F Check oracle freshness\n        require(\n            block.timestamp - oracle.lastUpdate() \u003C= maxStaleness,\n            \"Oracle stale\"\n        );\n\n        \u002F\u002F Check aggregate limit\n        require(\n            !oracle.wouldExceedThreshold(context.amount.value),\n            \"Aggregate limit exceeded\"\n        );\n\n        \u002F\u002F Allow payment\n        return (context.weight, context.newlyIssuedTokenCount, context.totalSupply, new JBPayHookSpecification[](0));\n    }\n}\n```\n\n**Tradeoffs**:\n- **Complexity**: Multiple contracts + relayer service\n- **Latency**: Oracle updates lag behind reality\n- **Staleness window**: Payments during oracle delay can exceed limit\n- **Relayer trust**: Single point of failure\u002Fmanipulation\n- **Cost**: Continuous relayer operation + oracle update gas\n- **UX**: Payments can fail if oracle is stale or near threshold\n\n**When to use**:\n- Hard regulatory\u002Fcompliance limits that must be enforced\n- High-stakes projects where overshoot is unacceptable\n- Projects with resources to build and maintain infrastructure\n\n**Current status**: No off-the-shelf implementation exists. Would need custom development.\n\n---\n\n### Approach 5: Single-Chain Treasury\n\n**Best for**: Projects that can centralize treasury operations\n\nAccept payments on all chains, but bridge all funds to a single \"home\" chain for treasury operations. Payout limit on home chain is the only one that matters.\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│  Single-Chain Treasury Pattern                                      │\n│                                                                     │\n│  Chain 1 (Home): Treasury lives here                               │\n│  ├── Payout limit: 100 ETH (THIS IS THE REAL LIMIT)               │\n│  ├── Accepts payments                                               │\n│  └── All payouts happen here                                       │\n│                                                                     │\n│  Chain 2-4: Payment collection only                                │\n│  ├── Payout limit: 0 (no direct payouts)                           │\n│  ├── Accept payments                                                │\n│  └── Funds bridged to Chain 1 via Suckers                          │\n│                                                                     │\n│  Flow:                                                              │\n│  User pays on Chain 2 → Tokens issued on Chain 2                   │\n│                       → User bridges funds to Chain 1 (manual)     │\n│                       → Chain 1 treasury grows                     │\n│                       → Payouts from Chain 1 only                  │\n└─────────────────────────────────────────────────────────────────────┘\n```\n\n**The blocker**: Suckers require explicit user action to bridge. The project cannot automatically sweep funds from other chains to the home chain. Users must:\n1. Call `prepare()` on the source chain\n2. Wait for bridging\n3. Call `claim()` on the destination chain\n\n**Potential workarounds**:\n- Incentivize users to bridge (bonus tokens, lower fees on home chain)\n- Build a \"sweeper\" bot that bridges on behalf of users (requires trust + gas)\n- Accept that some funds remain distributed\n\n**Tradeoffs**:\n- **User friction**: Extra steps to bridge funds\n- **Fragmentation**: Funds spread across chains until bridged\n- **Complexity**: Users must understand the pattern\n- **Cannot enforce**: Can't force users to bridge\n\n**When to use**:\n- Projects where most activity naturally happens on one chain\n- Projects willing to accept some treasury fragmentation\n- Transitional approach for projects moving toward single-chain\n\n---\n\n## Comparison Matrix\n\n| Approach | Enforcement | Latency | Trust Required | Complexity | Best For |\n|----------|-------------|---------|----------------|------------|----------|\n| Accept & Design | Soft | N\u002FA | None | Low | Soft caps |\n| Manual Monitoring | Soft | Minutes | Operator | Low | Active teams |\n| Cron + Relayr | Soft | ~5-10 min | Operator | Medium | Automation |\n| Oracle Pay Hook | Hard* | Seconds | Relayer | High | Compliance |\n| Single-Chain | Medium | N\u002FA | None | Medium | Centralized ops |\n\n*Oracle enforcement has latency window during updates\n\n---\n\n## Recommendations by Use Case\n\n### \"We need a hard cap for regulatory compliance\"\n**Answer**: This is very difficult in omnichain. Consider:\n1. Single-chain only (no omnichain)\n2. Oracle pay hook (complex, custom development)\n3. Accept that enforcement is approximate\n\n### \"We want a fundraising goal but it's not legally binding\"\n**Answer**: Use Approach 1 (Accept & Design) or Approach 2 (Manual Monitoring)\n- Set per-chain limits that sum to ~80% of your goal\n- Monitor via Bendystraw\n- Pause manually when approaching target\n\n### \"We have an operator who can manage this\"\n**Answer**: Use Approach 3 (Cron + Relayr)\n- Automate the monitoring and pausing\n- Accept 5-10% potential overshoot\n- Ensure operator key security\n\n### \"We're building a revnet\"\n**Answer**: This limitation doesn't apply to revnets\n- Revnets don't use payout limits - they use surplus allowances for loans (via REVLoans)\n- Surplus allowances are unlimited by design (for loan collateral access)\n- If you need aggregate fundraising caps on a revnet, see the oracle or monitoring approaches above\n\n---\n\n## Future Considerations\n\n### Could Juicebox natively support aggregate limits?\n\nTheoretically, but it would require:\n1. **Cross-chain messaging protocol**: Native integration with bridges\n2. **Consensus on aggregate state**: Which chain is source of truth?\n3. **Latency acceptance**: Users accept payments may fail during sync\n4. **Cost distribution**: Who pays for cross-chain messages?\n\nThis is a significant protocol-level change, not a simple feature add.\n\n### Could a shared oracle service exist?\n\nYes - a community-run oracle service could:\n- Watch all Juicebox projects across chains\n- Provide aggregate state queries\n- Update on-chain oracles\n\nThis could be built as infrastructure, but requires:\n- Ongoing operational funding\n- Trust in the service operator\n- Integration with pay hooks\n\n---\n\n## Related Skills\n\n- `\u002Fjb-omnichain-ui` - Building omnichain frontends\n- `\u002Fjb-suckers` - Cross-chain token bridging mechanics\n- `\u002Fjb-bendystraw` - Querying aggregate project data\n- `\u002Fjb-relayr` - Multi-chain transaction bundling\n- `\u002Fjb-fund-access-limits` - Per-chain payout limit configuration\n",{"name":5,"description":7},"main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","视觉与设计\u002Fjuicy\u002Fjb-omnichain-payout-limits",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill jb-omnichain-payout-limits",{"tool":57,"command":58},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill jb-omnichain-payout-limits",{"tool":60,"command":61},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill jb-omnichain-payout-limits","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F视觉与设计\u002Fjuicy\u002Fjb-omnichain-payout-limits\u002FSKILL.md",true,[],[66,88,123,134,144,173],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":38},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[68,73,74,75,76,33,31,77,78,79,80,81,82,83,84,85,86,87],"safe","ethereum","defi","Optimization","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":106,"publishedAt":38},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[93,98,101],{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":99,"categoryName":100,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[107,108,109,110,111,112,113,75,114,77,115,116,117,118,119,20,120,121,122],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","positions","token","prices",{"skillNo":124,"name":125,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":131,"publishedAt":38},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[128,129,130],{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},{"categoryNo":99,"categoryName":100,"taxonomyType":96,"taxonomyTypeDesc":97},{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},[107,132,133,108,109,110,111,112,113,75,114,77,116,117,118,119,20,120,121,122],"api skill","zerion api skill",{"skillNo":135,"name":136,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":142,"publishedAt":38},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[139,140,141],{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},{"categoryNo":99,"categoryName":100,"taxonomyType":96,"taxonomyTypeDesc":97},{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},[110,107,143,108,109,111,112,75,114,77,115,116,117,118,119,20,120,121,122],"zerion api mcp",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":153,"publishedAt":38},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[150],{"categoryNo":151,"categoryName":152,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000040","财务",[154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,22],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":180,"publishedAt":38},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[179],{"categoryNo":151,"categoryName":152,"taxonomyType":104,"taxonomyTypeDesc":105},[154,155,157,181,182,183,184,185,186,165,187,188,189,190,191,192,193,194,122,172],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]